[FFmpeg-devel] MPEG-2 Acceleration Refactor
Michael Niedermayer
michaelni
Sat Jun 16 20:25:35 CEST 2007
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
[...]
> static inline int mpeg1_fast_decode_block_inter(MpegEncContext *s, DCTELEM *block, int n);
> static inline int mpeg2_decode_block_non_intra(MpegEncContext *s,
> - DCTELEM *block,
> - int n);
> + DCTELEM *block,
> + int n,
> + int fast);
cosmetics
tabs
> static inline int mpeg2_decode_block_intra(MpegEncContext *s,
> - DCTELEM *block,
> - int n);
> + DCTELEM *block,
> + int n,
more cosmetics
[...]
> }
> -
even more
> return 0;
> }
>
> @@ -1229,15 +1231,14 @@
> }
> }
> #endif
> -
and more
[...]
> #endif
> -
> if (s->codec_id == CODEC_ID_MPEG2VIDEO) {
and so on, thtougout of the remainder of the patch ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070616/18b63633/attachment.pgp>
More information about the ffmpeg-devel
mailing list