[Mplayer-dev-eng] libavcodec speed

Arpi arpi at thot.banki.hu
Fri Aug 3 17:53:50 CEST 2001


Hi,

> > But why is DCT so slow? Is it so hard to calculate? Or is it unoptimized?
> it is IMHO. Because i386 dir contains asm forward dct, which is used for mpeh 
> encoding but not decoding. We need optimized inverse discrete cosine 
> transform in that place. An optimized idct version of ntels application note 
> 922 which is also used for the fdct in libavcodec can be found at
> http://elecard.com/peter/idct.shtml the at&t version of it is IMHO included 
> in libmpeg2.

right.

i hacked libmpeg2's mmx/mmxext idct code into libavcodec, and it is a big
speed boost! (average 13-20% faster)

File:  /3d/divx/Coyote.Ugly.Sample-highbitrate-atmos.avi
VIDEO:  [DIV3]  640x480  24bpp  25.00 fps  1867.1 kbps (227.9 kbyte/s)
FFmpeg-c  : 15.421s 15.332s 15.422s
FFmpeg-mmx: 12.594s 12.625s 12.624s

File:  /3d/divx/sample.light.it.up.avi
VIDEO:  [DIV3]  640x352  24bpp  23.98 fps  823.5 kbps (100.5 kbyte/s)
FFmpeg-c  : 10.272s 10.286s 10.292s
FFmpeg-mmx: 8.793s 8.773s 8.859s

File:  /3d/divx/405divx_sm_v2[1].avi
VIDEO:  [DIV3]  356x240  24bpp  30.00 fps  343.0 kbps (41.9 kbyte/s)
FFmpeg-c  : 10.241s 10.219s 10.245s
FFmpeg-mmx: 8.944s 8.968s 8.927s

File:  /3d/divx/MI2-Trailer.avi
VIDEO:  [DIV3]  480x204  24bpp  24.00 fps  604.8 kbps (73.8 kbyte/s)
FFmpeg-c  : 9.221s 9.268s 9.293s
FFmpeg-mmx: 7.716s 7.677s 7.714s

File:  /3b/hannibal.avi
VIDEO:  [DIV3]  480x260  24bpp  24.00 fps  153.8 kbps (18.8 kbyte/s)
FFmpeg-c  : 7.614s 7.612s 7.581s
FFmpeg-mmx: 6.911s 6.904s 6.948s

File:  /3b/Star_Wars_Episode_1.avi
VIDEO:  [DIV3]  720x576  24bpp  25.00 fps  1858.5 kbps (226.9 kbyte/s)
FFmpeg-c  : 55.190s 54.923s 54.903s
FFmpeg-mmx: 46.454s 46.723s 46.504s


Now ffmpeg's performace is much closer to divx4linux's, and it's faster
than win32 DLLs in _all_ tests!

Now I only have to get Gerard accepting these changes...
(because he doesn't like libmpeg2's GPL license)

Maybe adding some #ifdefs to use external code.
I think it's better sharing these functions (idct, postprocessing etc)
between codecs, than having them at 3 places (libmpeg2, opendivx decore,
libavcodec).


A'rpi / Astral & ESP-team

--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu

_______________________________________________
Mplayer-dev-eng mailing list
Mplayer-dev-eng at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-dev-eng



More information about the MPlayer-dev-eng mailing list