[FFmpeg-devel] [PATCH] Split utils.c out of swscale.c.
Thu Jan 21 23:31:18 CET 2010
On Tue, Jan 19, 2010 at 11:32 AM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
> 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.
More information about the ffmpeg-devel