[FFmpeg-devel] [PATCH] Split utils.c out of swscale.c.

Michael Niedermayer michaelni
Fri Jan 22 15:37:47 CET 2010

On Tue, Jan 19, 2010 at 11:32:18AM -0200, Ramiro Polla wrote:
> Hi,
> Currently swscale.c has most of the swscaler code, including init
> code, some helper functions, some vector-related code, and the main
> scaler path itself (with swscale_template.c).
> Attached patch (needs "svn cp swscale.c utils.c" first) splits helper
> functions and init code to utils.c.
> A few remarks:
> - COMPILE_ALTIVEC and COMPILE_MMX2 in utils.c have been replaced by
> their definition from swscale.c.
> - ff_hardcodedcpuflags() has been created from and left in swscale.c
> because the logic that defines COMPILE_TEMPLATE_xxx is there. Same
> reason also applies to the function below.
> - ff_get_unscaled_swscale() has been created from and left in
> swscale.c so it stays on the same source file as the Wrapper functions
> it references. It should be changed afterwards to, instead of setting
> c->swScale, return the function pointer. I left it as-is to minimize
> this diff.
> - The license header has been left the same in utils.c because there
> is still MMX2 code there, this should be the last GPL code. When it's
> moved to another file, the license should be changed to LGPL.
> - The #includes haven't been changed much, I haven't gone in depth to
> see which ones become unused.
> Regression tests and swscale-example (ignoring the tests that returns
> random results) pass with and without runtime-cpudetect on x86, and
> also on ppc.
> Ramiro Polla

>  Makefile           |    2 
>  swscale.c          | 1555 --------------------------------------------
>  swscale_internal.h |   11 
>  utils.c            | 1867 -----------------------------------------------------
>  4 files changed, 37 insertions(+), 3398 deletions(-)
> 7aec19e912457c881ea4c6e3a9bec8061f9fa861  swscale_split.diff

i trust you, so ok (didnt review the 180k though, its too big for my todo)

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- 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/20100122/8522ec79/attachment.pgp>

More information about the ffmpeg-devel mailing list