[FFmpeg-devel] [PATCH] Split utils.c out of swscale.c.
Ramiro Polla
ramiro.polla
Sun Jan 24 03:10:43 CET 2010
On Fri, Jan 22, 2010 at 12:37 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> 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)
Updated to latest SVN, fixed a bug (hadn't tested altivec && gpl), and
applied. I hope I didn't break anything, I'll watch out for FATE in
the next couple of hours.
More information about the ffmpeg-devel
mailing list