On 07/04/2012 04:56 PM, Kostya Shishkov wrote:
> On Tue, Jul 03, 2012 at 11:43:53PM +0100, Mans Rullgard wrote:
>> Instead of inlining everything into ff_h264_hl_decode_mb(), use
>> explicit templating to create versions of the called functions
>> with constant parameters filled in.  This greatly speeds up
>> compilation of h264.c and reduces the code size without any
>> measurable impact on performance.
>>
>> Compilation time for h264.c on an i7 goes from 30s to 5.5s.
>> Code size is reduced by 430kB.
>>
>> Signed-off-by: Mans Rullgard <[email protected]>
>> ---
>>  libavcodec/h264.c             |  543 
>> +----------------------------------------
>>  libavcodec/h264_mb_template.c |  380 ++++++++++++++++++++++++++++
>>  libavcodec/h264_mc_template.c |  160 ++++++++++++
>>  3 files changed, 550 insertions(+), 533 deletions(-)
>>  create mode 100644 libavcodec/h264_mb_template.c
>>  create mode 100644 libavcodec/h264_mc_template.c
> 
> looks extrememly good to me

+1


-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to