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

Ramiro Polla ramiro.polla
Sat Mar 13 00:29:32 CET 2010


On Tue, Mar 2, 2010 at 7:16 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Wed, Feb 24, 2010 at 12:49:13AM -0300, Ramiro Polla 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.
>>
>> Ramiro Polla
>
>> ?bfin/internal_bfin.S | ? ?8 +-
>> ?bfin/swscale_bfin.c ?| ? ?8 +-
>> ?colorspace-test.c ? ?| ? ?2
>> ?rgb2rgb.c ? ? ? ? ? ?| ?172 +++++++++++++++++++++++++--------------------------
>> ?rgb2rgb.h ? ? ? ? ? ?| ?146 +++++++++++++++++++++----------------------
>> ?rgb2rgb_template.c ? | ?154 ++++++++++++++++++++++-----------------------
>> ?swscale.c ? ? ? ? ? ?| ? 20 ++---
>> ?swscale_internal.h ? | ? 18 ++---
>> ?swscale_template.c ? | ? 57 ++++++++--------
>> ?9 files changed, 293 insertions(+), 292 deletions(-)
>> 04410ad4397e17866d30731b02fab4728526f5f7 ?use_int.diff
>> diff --git a/bfin/internal_bfin.S b/bfin/internal_bfin.S
>
> many of the functions changed are used by applications directly
> (i remember them in mplayer) so this breaks ABI

Maybe MPlayer should stop using functions that aren't in the API...

Anyways new patch attached doesn't change the rgb2rgb functions used by MPlayer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use_int-2.diff
Type: text/x-diff
Size: 21377 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100312/98adc1bb/attachment.diff>



More information about the ffmpeg-devel mailing list