[FFmpeg-devel] [PATCH] Fix function parameters for rgb48 to YV12 functions.

Ramiro Polla ramiro.polla
Tue Mar 2 04:29:57 CET 2010


On Wed, Feb 24, 2010 at 12:49 AM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
> On Tue, Feb 2, 2010 at 11:48 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> if theres no speed difference i dont mind int being used
>
> Patch attached. It changes all uses of long meant for width, height
> and stride to int. Besides renaming, it adds these chunks to
> hcscale_fast():
> @@ -2469,6 +2469,7 @@ static inline void
> RENAME(hcscale_fast)(SwsContext *c, int16_t *dst,
> ? ? ? ? }
> ? ? } else {
> ?#endif /* COMPILE_TEMPLATE_MMX2 */
> + ? ? ? ?x86_reg dstWidth_reg = dstWidth;
> ? ? ? ? x86_reg xInc_shr16 = (x86_reg) (xInc >> 16);
> ? ? ? ? uint16_t xInc_mask = xInc & 0xffff;
> ? ? ? ? __asm__ volatile(
> @@ -2497,9 +2498,9 @@ static inline void
> RENAME(hcscale_fast)(SwsContext *c, int16_t *dst,
> ?/* GCC 3.3 makes MPlayer crash on IA-32 machines when using "g" operand here,
> ?which is needed to support GCC 4.0. */
> ?#if ARCH_X86_64 && AV_GCC_VERSION_AT_LEAST(3,4)
> - ? ? ? ? ? ?:: "m" (src1), "m" (dst), "g" (dstWidth), "m"
> (xInc_shr16), "m" (xInc_mask),
> + ? ? ? ? ? ?:: "m" (src1), "m" (dst), "g" (dstWidth_reg), "m"
> (xInc_shr16), "m" (xInc_mask),
> ?#else
> - ? ? ? ? ? ?:: "m" (src1), "m" (dst), "m" (dstWidth), "m"
> (xInc_shr16), "m" (xInc_mask),
> + ? ? ? ? ? ?:: "m" (src1), "m" (dst), "m" (dstWidth_reg), "m"
> (xInc_shr16), "m" (xInc_mask),
> ?#endif
> ? ? ? ? ? ? "r" (src2)
> ? ? ? ? ? ? : "%"REG_a, "%"REG_d, "%ecx", "%"REG_D, "%esi"
>
> Tested on linux x86, x86_64, mingw32 x86, mingw-w64 x86_64, and ppc.
> All both with and without gpl.

Ping.



More information about the ffmpeg-devel mailing list