[FFmpeg-devel] [PATCH] Patch cleanup for MPEG 1 & 2 optimizations
Keiji Costantini
lists
Wed Apr 16 22:31:34 CEST 2008
Benoit Fouet ha scritto:
> Hi,
>
> strites wrote:
>
>> diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
>> index c128949..ba0e73b 100644
>> --- a/libavcodec/mpegvideo.c
>> +++ b/libavcodec/mpegvideo.c
>> @@ -1978,6 +1978,7 @@ skip_idct:
>> }
>> }
>>
>> +av_always_inline
>> void MPV_decode_mb(MpegEncContext *s, DCTELEM block[12][64]){
>>
>>
>
> what exactly is the point of this hunk ??
>
>
Ups...
I corrected that and got actually a speed gain.
MPEG1
-------vanilla---------
bench: utime=27.487s
bench: utime=27.478s
bench: utime=27.673s
bench: utime=27.264s
bench: utime=27.556s
bench: utime=27.537s
bench: utime=27.576s
bench: utime=27.458s
bench: utime=27.709s
bench: utime=27.484s
real 4m37.847s
user 4m35.313s
sys 0m2.490s
--------patched---------
bench: utime=27.391s
bench: utime=27.103s
bench: utime=27.199s
bench: utime=27.262s
bench: utime=27.435s
bench: utime=27.236s
bench: utime=27.312s
bench: utime=27.042s
bench: utime=27.127s
bench: utime=27.204s
real 4m34.983s
user 4m32.403s
sys 0m2.541s
MPEG2
--------vanilla--------
bench: utime=28.886s
bench: utime=29.079s
bench: utime=29.128s
bench: utime=29.020s
bench: utime=28.906s
bench: utime=28.941s
bench: utime=29.102s
bench: utime=29.559s
bench: utime=28.999s
bench: utime=29.599s
real 4m54.070s
user 4m51.314s
sys 0m2.715s
-------patched--------
bench: utime=28.640s
bench: utime=28.692s
bench: utime=28.825s
bench: utime=28.803s
bench: utime=28.710s
bench: utime=28.635s
bench: utime=28.729s
bench: utime=28.653s
bench: utime=28.583s
bench: utime=29.098s
real 4m49.949s
user 4m47.455s
sys 0m2.449s
So it seems that there is a speed gain.
So, I have condensed the three code patches in one, and added a new
patch. These are to be considered substitution of my previous
non-cosmetics patches.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Unroll-codepath.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080416/4e729884/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-Inline-patch.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080416/4e729884/attachment.txt>
More information about the ffmpeg-devel
mailing list