[FFmpeg-devel] [PATCH] swscale: Use function pointers inside swScale().
Michael Niedermayer
michaelni
Thu Apr 2 22:23:53 CEST 2009
On Thu, Apr 02, 2009 at 05:09:49PM -0300, Ramiro Polla wrote:
> Hi,
>
> One more patch (bundled with cosmetics.diff to be applied before) in
> the series...
>
[...]
> Index: swscale_internal.h
> ===================================================================
> --- swscale_internal.h (revision 29130)
> +++ swscale_internal.h (working copy)
> @@ -214,6 +214,37 @@
> uint64_t sparc_coeffs[10] __attribute__((aligned(8)));
> #endif
>
> + /* function pointers for swScale() */
> + void (*yuv2nv12X )(struct SwsContext *, int16_t *, int16_t **, int,
> + int16_t *, int16_t **, int, uint8_t *, uint8_t *, int,
> + int, int);
> + void (*yuv2yuv1 )(struct SwsContext *, int16_t *, int16_t *, int16_t *,
> + uint8_t *, uint8_t *, uint8_t *, uint8_t *, long,
> + long);
> + void (*yuv2yuvX )(struct SwsContext *, int16_t *, int16_t **, int,
> + int16_t *, int16_t **, int, int16_t **, uint8_t *,
> + uint8_t *, uint8_t *, uint8_t *, long, long);
> + void (*yuv2packed1)(struct SwsContext *, uint16_t *, uint16_t *,
> + uint16_t *, uint16_t *, uint8_t *, int, int, int, int,
> + int);
> + void (*yuv2packed2)(struct SwsContext *, uint16_t *, uint16_t *,
> + uint16_t *, uint16_t *, uint16_t *, uint16_t *,
> + uint8_t *, int, int, int, int);
> + void (*yuv2packedX)(struct SwsContext *c, int16_t *, int16_t **, int,
> + int16_t *, int16_t **, int, int16_t **, uint8_t *,
> + long, long);
> +
> + void (*hyscale_internal)(uint8_t *, uint8_t *, long, uint32_t *);
> + void (*hcscale_internal)(uint8_t *, uint8_t *, uint8_t *, uint8_t *, long,
> + uint32_t *);
> + void (*hyscale_fast)(struct SwsContext *c, int16_t *, int, uint8_t *,
> + int, int);
> + void (*hcscale_fast)(struct SwsContext *c, int16_t *, int, uint8_t *,
> + uint8_t *, int, int);
> +
> + void (*hScale)(int16_t *, int, uint8_t *, int , int, int16_t *, int16_t *,
> + long);
> +
these require a clear documentation, that is the documentation must be
sufficient to implement a working optimized function for each.
otherwise it would be yet another undocumented API that would require
global knowledge for any work
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No great genius has ever existed without some touch of madness. -- Aristotle
-------------- 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/20090402/07fa9724/attachment.pgp>
More information about the ffmpeg-devel
mailing list