[FFmpeg-devel] [PATCH] swscale: Use function pointers inside swScale().

Ramiro Polla ramiro.polla
Sun Apr 5 00:45:33 CEST 2009


On Sat, Apr 4, 2009 at 7:12 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sat, Apr 04, 2009 at 07:06:29PM -0300, Ramiro Polla wrote:
>> Hi,
>>
>> On Fri, Apr 3, 2009 at 12:38 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> > On Fri, Apr 03, 2009 at 12:07:10AM -0300, Ramiro Polla wrote:
>>
>> [...]
>>
>> >> Index: swscale_internal.h
>> >> ===================================================================
>> >> --- swscale_internal.h ? ? ? ?(revision 29130)
>> >> +++ swscale_internal.h ? ? ? ?(working copy)
>> >> @@ -214,6 +214,55 @@
>> >> ? ? ?uint64_t sparc_coeffs[10] __attribute__((aligned(8)));
>> >> ?#endif
>> >>
>> >> + ? ?/* function pointers for swScale() */
>> >> + ? ?void (*yuv2nv12X ?)(struct SwsContext *c,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?uint8_t *dest, uint8_t *uDest,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?int dstW, int chrDstW, int dstFormat);
>> >> + ? ?void (*yuv2yuv1 ? )(struct SwsContext *c,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?int16_t *lumSrc, int16_t *chrSrc, int16_t *alpSrc,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?uint8_t *dest,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?uint8_t *uDest, uint8_t *vDest, uint8_t *aDest,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?long dstW, long chrDstW);
>> >> + ? ?void (*yuv2yuvX ? )(struct SwsContext *c,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?int16_t **alpSrc,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?uint8_t *dest,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?uint8_t *uDest, uint8_t *vDest, uint8_t *aDest,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?long dstW, long chrDstW);
>> >> + ? ?void (*yuv2packed1)(struct SwsContext *c,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?uint16_t *buf0, uint16_t *uvbuf0, uint16_t *uvbuf1,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?uint16_t *abuf0, uint8_t *dest,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?int dstW, int uvalpha, int dstFormat, int flags, int y);
>> >> + ? ?void (*yuv2packed2)(struct SwsContext *c,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?uint16_t *buf0, uint16_t *buf1,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?uint16_t *uvbuf0, uint16_t *uvbuf1,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?uint16_t *abuf0, uint16_t *abuf1,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?uint8_t *dest,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?int dstW, int yalpha, int uvalpha, int y);
>> >> + ? ?void (*yuv2packedX)(struct SwsContext *c,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?int16_t *lumFilter, int16_t **lumSrc, int lumFilterSize,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?int16_t **alpSrc, uint8_t *dest,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ?long dstW, long dstY);
>> >> +
>> >> + ? ?void (*hyscale_internal)(uint8_t *dst, uint8_t *src,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? long width, uint32_t *pal);
>> >> + ? ?void (*hcscale_internal)(uint8_t *dstU, uint8_t *dstV,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? uint8_t *src1, uint8_t *src2,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? long width, uint32_t *pal);
>> >> + ? ?void (*hyscale_fast)(struct SwsContext *c,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ? int16_t *dst, int dstWidth,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ? uint8_t *src, int srcW, int xInc);
>> >> + ? ?void (*hcscale_fast)(struct SwsContext *c,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ? int16_t *dst, int dstWidth,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ? uint8_t *src1, uint8_t *src2, int srcW, int xInc);
>> >> +
>> >> + ? ?void (*hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW,
>> >> + ? ? ? ? ? ? ? ? ? int xInc, int16_t *filter, int16_t *filterPos, long filterSize);
>> >> +
>> >
>> > all the parameters that have src in their name should be const but they likely
>> > arent the only ones
>>
>> Yes, and that is yet another separate issue. Anyways, 3 patches attached.
>
> anyway, ok

anyway, applied =)



More information about the ffmpeg-devel mailing list