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

Michael Niedermayer michaelni
Tue Mar 2 11:16:00 CET 2010


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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100302/32a1352e/attachment.pgp>



More information about the ffmpeg-devel mailing list