[FFmpeg-devel] MPEG-2 Acceleration Refactor
Greg Hulands
ghulands
Sat Jun 16 20:45:43 CEST 2007
Hi Michael,
On 16/06/2007, at 11:25 AM, Michael Niedermayer wrote:
> Hi
>
> On Sat, Jun 16, 2007 at 10:43:03AM -0700, Greg Hulands wrote:
>> Hi,
>> I am trying to pick up where the original patch left off to get
>> hardware acceleration added for mac os x. In the original thread
>> (http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/35816/
>> focus=35852) It was said that the _fast methods needed to be
>> refactored out before the patch would be accepted. I am attaching the
>> diff for this. I know it looks big, but it is not really as it is
>> removing the 3 _fast functions. I have also benchmarked the changes
>> and they are as follows:
>>
>> Without Patch Applied
>>
>> Tiger1080:~/ffmpeg ghulands$ ./ffmpeg -benchmark -threads 1 -i ~/
>> Desktop/720p-short.m2v -f rawvideo -y /dev/null
>> FFmpeg version SVN-r9329, Copyright (c) 2000-2007 Fabrice Bellard, et
>> al.
>> configuration: --disable-ffserver --disable-mmx --enable-pthreads
>> libavutil version: 49.4.0
>> libavcodec version: 51.40.4
>> libavformat version: 51.12.1
>> built on Jun 15 2007 19:46:35, gcc: 4.0.1 (Apple Computer, Inc.
>> build 5367)
>>
>> Seems stream 0 codec frame rate differs from container frame rate:
>> 59.94 (60000/1001) -> 25.00 (25/1)
>> Input #0, mpegvideo, from '/Users/ghulands/Desktop/720p-short.m2v':
>> Duration: 00:00:08.0, start: 0.000000, bitrate: 38867 kb/s
>> Stream #0.0: Video: mpeg2video, yuv420p, 1280x720, 38810 kb/s,
>> 25.00 fps(r)
>> Output #0, rawvideo, to '/dev/null':
>> Stream #0.0: Video: rawvideo, yuv420p, 1280x720, q=2-31, 200 kb/s,
>> 25.00 fps(c)
>> Stream mapping:
>> Stream #0.0 -> #0.0
>> Press [q] to stop encoding
>> frame= 1244 fps= 77 q=0.0 Lsize= 1679400kB time=49.8
>> bitrate=276480.0kbits/s
>> video:1679400kB audio:0kB global headers:0kB muxing overhead
>> 0.000000%
>> bench: utime=14.061s
>
> a single benchmark run is useless, 5 is minimum
> putting START/STOP_TIMER around the call to the changed function
> would also be a good idea
>
> also dont use --disable-mmx
I did run the tests 5 times as a friend suggested and they were all
in the same ballpark, both in total time and the difference between
them, so I just put in the results for the last benchmark.
I just googled for START/STOP_TIMER on the ffmpeg site, but it
yielded no hits. Can you point me in the right direction please.
The apple assembler in gcc borks on the mmx code, so the only way to
build on OS X is to disbale it.
I'll fix up the tabs. Sorry I missed them.
Thanks,
Greg
More information about the ffmpeg-devel
mailing list