Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th August 2005, 02:05   #1  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
libavcodec avc decoding performance test

i today wanted to find out what influences decoding of avc the most with the libavcodec avc decoder as i wanted to know what to best enable/disable in my encodes for getting realtime playback on my good old pentium3 866mhz

therefore i made a bunch of encodes with x264 r287 and benchmarked them with recent libavcodec cvs via mplayer's -vo null -benchmark option with the following "raw" results
the source is the typical matrix1 encode (smith interrogating morpheus, lobby shootout...) 7116 frames:

Code:
640x256  B0	Ref3 p8x8-i4x4 loop-5	    cabac 103.999s	68.44fps
720x288	 B2 	Ref3 p8x8-i4x4		    cabac 105.682s	67.33fps
720x288  B2 	Ref3 p4x4-i4x4		    cabac 107.274s	66.33fps
640x256  B3-Ref Ref5 p4x4-i4x4 loop-5 WBP   cabac 111.700s	63.71fps
640x256  B3-Ref	Ref5 p4x4-i8x8 loop-5 WBP   cabac 113.954s	62.45fps
720x288  B3-Ref Ref5 p4x4-i8x8	      WBP   cabac 114.845s	61.96fps
640x256  B2	Ref3 p8x8-i4x4 loop-5       cabac 117.338s	60.65fps
720x288	 B3-Ref	Ref5 p4x4-i8x8 loop-5 WBP	  119.702s	59.45fps
640x256  B2	Ref3 p8x8-i4x4 loop-5 w(b)p cabac 122.646s	58.02fps
720x288  B0	Ref5 p4x4-i8x8 loop-5 WBP   cabac 123.567s	57.59fps
640x256	 B2	Ref5 p4x4-i4x4 loop-5 	    cabac 127.723s	55.70fps
720x288	 B3-Ref Ref1 p4x4-i4x4 loop-5 WBP   cabac 128.334s	55.45fps
720x288  B2	Ref3 p8x8-i4x4 loop-5	    cabac 133.842s	53.17fps
720x288  B1 	Ref5 p4x4-i8x8 loop-5 WBP   cabac 134.824s	52.78fps
720x288  B3-Ref	Ref3 p4x4-i4x4 loop-5       cabac 136.626s	52.08fps
720x288  B3-Ref Ref3 p4x4-i4x4 loop-5 WBP   cabac 139.901s	50.86fps
720x288	 B3-Ref	Ref5 p4x4-i4x4 loop-5 WBP   cabac 142.535s	49.92fps
720x288	 B3-Ref	Ref5 p4x4-i8x8 loop-5 WBP   cabac 142.565s	49.91fps
720x288	 B3	Ref5 p4x4-i8x8 loop-5 WBP   cabac 143.767s	49.50fps
720x288  B3-Ref Ref5 p4x4-i8x8 loop+6 WBP   cabac 150.636s	47.24fps
grouping the comparable things together we get the following:

Code:
------------------------------------------------------------------------
------------------------------------------------------------------------
blocksizes

p8x8 vs. p4x4

720x288	 B2 	Ref3 p8x8-i4x4		  cabac	105.682s	67.33fps
720x288  B2 	Ref3 p4x4-i4x4		  cabac	107.274s	66.33fps
								 1.00

------------------------------------------------------------------------
i4x4 vs. i8x8

720x288	 B3-Ref	Ref5 p4x4-i4x4 loop-5 WBP cabac	142.535s	49.92fps
720x288	 B3-Ref	Ref5 p4x4-i8x8 loop-5 WBP cabac	142.565s	49.91fps
								 0.01

640x256  B3-Ref Ref5 p4x4-i4x4 loop-5 WBP cabac	111.700s	63.71fps
640x256  B3-Ref	Ref5 p4x4-i8x8 loop-5 WBP cabac	113.954s	62.45fps
								 1.26

------------------------------------------------------------------------
------------------------------------------------------------------------
multiple reference frames

ref1 vs. ref5

720x288	 B3-Ref Ref1 p4x4-i4x4 loop-5 WBP cabac	128.334s	55.45fps
720x288	 B3-Ref	Ref5 p4x4-i4x4 loop-5 WBP cabac	142.535s	49.92fps
								 5.53

------------------------------------------------------------------------
ref1 vs. ref3

720x288	 B3-Ref Ref1 p4x4-i4x4 loop-5 WBP cabac	128.334s	55.45fps
720x288  B3-Ref Ref3 p4x4-i4x4 loop-5 WBP cabac 139.901s	50.86fps
								 4.59

------------------------------------------------------------------------
ref3 vs. ref5

720x288  B3-Ref Ref3 p4x4-i4x4 loop-5 WBP cabac 139.901s	50.86fps
720x288	 B3-Ref	Ref5 p4x4-i4x4 loop-5 WBP cabac	142.535s	49.92fps
								 0.94

------------------------------------------------------------------------
------------------------------------------------------------------------
weighted (bi)prediction

wbp vs. nowbp

720x288  B3-Ref	Ref3 p4x4-i4x4 loop-5	  cabac	136.626s	52.08fps
720x288  B3-Ref Ref3 p4x4-i4x4 loop-5 WBP cabac	139.901s	50.86fps
								 1.22

------------------------------------------------------------------------

wp+wbp vs. nowp+nowbp

640x256  B2   Ref3 p8x8-i4x4 loop-5       cabac	117.338s	60.65fps
640x256  B2   Ref3 p8x8-i4x4 loop-5 w(b)p cabac 122.646s	58.02fps
								 2.63

------------------------------------------------------------------------
------------------------------------------------------------------------
b-frames

0 B-frames vs. 3 B-frames

720x288  B0	Ref5 p4x4-i8x8 loop-5 WBP cabac	123.567s	57.59fps
720x288	 B3	Ref5 p4x4-i8x8 loop-5 WBP cabac	143.767s	49.50fps
								 8.09

------------------------------------------------------------------------
0 B-frames vs. 2 B-frames

640x256  B0	Ref3 p8x8-i4x4 loop-5	    cabac 103.999s	68.44fps
640x256  B2	Ref3 p8x8-i4x4 loop-5       cabac 117.338s	60.65fps
								 7.79

------------------------------------------------------------------------
0 B-frames vs. 1 B-frames

720x288  B0	Ref5 p4x4-i8x8 loop-5 WBP cabac	123.567s	57.59fps
720x288  B1 	Ref5 p4x4-i8x8 loop-5 WBP cabac	134.824s	52.78fps
								 4.81

------------------------------------------------------------------------
1 B-frames vs. 3 B-frames

720x288  B1 	Ref5 p4x4-i8x8 loop-5 WBP cabac	134.824s	52.78fps
720x288	 B3	Ref5 p4x4-i8x8 loop-5 WBP cabac	143.767s	49.50fps
								 3.28

------------------------------------------------------------------------
B-ref vs. no B-ref

720x288	 B3-Ref	Ref5 p4x4-i8x8 loop-5 WBP cabac	142.565s	49.91fps
720x288	 B3	Ref5 p4x4-i8x8 loop-5 WBP cabac	143.767s	49.50fps
								 0.41

------------------------------------------------------------------------
------------------------------------------------------------------------
loop

loop-5 vs. no loop

720x288	 B2 	Ref3 p8x8-i4x4		  cabac	105.682s	67.33fps
720x288  B2	Ref3 p8x8-i4x4 loop-5	  cabac	133.842s	53.17fps
								14.16

720x288  B3-Ref Ref5 p4x4-i8x8	      WBP cabac	114.845s	61.96fps
720x288	 B3-Ref	Ref5 p4x4-i8x8 loop-5 WBP cabac	142.565s	49.91fps
								12.05

------------------------------------------------------------------------
loop-5 vs. loop+6

720x288	 B3-Ref	Ref5 p4x4-i8x8 loop-5 WBP cabac	142.565s	49.91fps
720x288  B3-Ref Ref5 p4x4-i8x8 loop+6 WBP cabac 150.636s	47.24fps
								 2.67

------------------------------------------------------------------------
------------------------------------------------------------------------
cabac

cabac vs. no cabac

720x288	 B3-Ref	Ref5 p4x4-i8x8 loop-5 WBP	119.702s	59.45fps
720x288	 B3-Ref	Ref5 p4x4-i8x8 loop-5 WBP cabac	142.565s	49.91fps
								 9.54

------------------------------------------------------------------------
------------------------------------------------------------------------
cabac + noloop vs. loop-5 + nocabac


720x288  B3-Ref Ref5 p4x4-i8x8	      WBP cabac	114.845s	61.96fps
720x288	 B3-Ref	Ref5 p4x4-i8x8 loop-5 WBP	119.702s	59.45fps
								 2.51

------------------------------------------------------------------------
------------------------------------------------------------------------
resolution

720x288 vs. 640x256

640x256  B3-Ref	Ref5 p4x4-i8x8 loop-5 WBP cabac	113.954s	62.45fps
720x288	 B3-Ref	Ref5 p4x4-i8x8 loop-5 WBP cabac	142.565s	49.91fps
								12.54

------------------------------------------------------------------------
------------------------------------------------------------------------
summing the findings up imho i think it can be said that there are three groups of features/things which impact speed:

1) the ones that impact speed a lot:
loop, resolution, cabac and high numbers of b-frames (eg 3), of which cabac and b-frames take less decoding time

2) the ones that hardly impact speed (but in sum might do too):
blocksizes, weighted prediction, weighted biprediction and b-references (which is actually faster than b-frames without b-ref)

3) the ones in the middle:
small numbers of b-frames (eg 1) and multiple reference frames

hope someone might find this useful (eg maybe for tuning the decoder?)


edit: loop was set with a strenght of -5,-5
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free

Last edited by bond; 25th August 2005 at 22:33.
bond is offline   Reply With Quote
Old 24th August 2005, 02:19   #2  |  Link
Caroliano
Registered User
 
Join Date: Feb 2005
Location: São Paulo, Brazil
Posts: 392
Very intersting. I have an 1.7 celeron and besides that I want that my friends that have even slower computers play my encodes well too.

And why you dont use the defaut value for in-loop filter? It would make any diference?
Caroliano is offline   Reply With Quote
Old 24th August 2005, 04:34   #3  |  Link
CiNcH
Registered User
 
CiNcH's Avatar
 
Join Date: Jan 2004
Posts: 567
I haven't done speed tests yet but my Intel Pentium M 1.6 GHz (Dothan) computer stays at 600 MHz (lowest SpeedStep) when playing back an AVC / aacPlus v2 encode. CPU usage ranges between 50 and 70%.

Video: 720 x 304 / x264 High Profile (CABAC, 5 ref. frames, 3 cons. b-frames, b-pyramid, weighted b-pred., in-loop -2/-2, all mb partitions, 8x8DCT)
Audio: aacPlus v2 (AAC + SBR + PS)
Container: MP4

Demuxer: Haali Media Splitter
Decoder: ffdshow, CoreAAC
__________________
Bye
CiNcH is offline   Reply With Quote
Old 24th August 2005, 09:13   #4  |  Link
ggab
GABriel
 
Join Date: Aug 2005
Location: Buenos Aires, Argentina
Posts: 113
CiNcH, which aacPlus v2 encoder did u use? thks
ggab is offline   Reply With Quote
Old 24th August 2005, 10:17   #5  |  Link
hworldjj
Registered User
 
Join Date: Sep 2004
Posts: 17
Hi, bond,

Did you compare the performance between Moonlight, Nero and ffmpeg H.264 decoder? It seems ffmpeg a little worse than the other two.
hworldjj is offline   Reply With Quote
Old 24th August 2005, 14:38   #6  |  Link
CiNcH
Registered User
 
CiNcH's Avatar
 
Join Date: Jan 2004
Posts: 567
Quote:
CiNcH, which aacPlus v2 encoder did u use? thks
I used the Coding Technologies reference encoder. Check!
__________________
Bye

Last edited by CiNcH; 24th August 2005 at 15:05.
CiNcH is offline   Reply With Quote
Old 25th August 2005, 18:35   #7  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
i now added a few more test:
- i moved multiple reference frames to a "middle" group as their impact on speed is indeed noticeable
- using a higher strength of loop indeed influences speed more than a lower strength (as loop is less used with a lower strength)
- the higher the number of b-frames, the slower the decoding

about the question to also benchmark other decoders, i would of course be very interested in this too, but i dunno how to accurately measure the time with these filters?

is it possible to decode via directshow filters in mplayer?
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free

Last edited by bond; 26th August 2005 at 00:43.
bond is offline   Reply With Quote
Old 26th August 2005, 11:19   #8  |  Link
dimzon
BeHappy/MeGUI developer
 
dimzon's Avatar
 
Join Date: Oct 2003
Location: Moscow, Russia
Posts: 1,727
Quote:
Originally Posted by bond
about the question to also benchmark other decoders, i would of course be very interested in this too, but i dunno how to accurately measure the time with these filters?
You can use my method (check my signature)
dimzon is offline   Reply With Quote
Old 26th August 2005, 12:07   #9  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
Quote:
Originally Posted by dimzon
You can use my method (check my signature)
hm thx thats indeed a possibility, i will have a look
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 26th August 2005, 12:25   #10  |  Link
Sergey A. Sablin
Registered User
 
Join Date: Dec 2004
Location: Tomsk, Russia
Posts: 366
Quote:
Originally Posted by bond
hm thx thats indeed a possibility, i will have a look
You can try to use this direct show filter to measure DShow decoders preformance.
Before starting the graph you need to uncheck Graph->Use clock menu. After graph stopped open property page of this filter and you will see the performance.
Attached Files
File Type: zip ech.zip (24.8 KB, 1570 views)
Sergey A. Sablin is offline   Reply With Quote
Old 26th August 2005, 13:37   #11  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
Quote:
Originally Posted by Sergey A. Sablin
You can try to use this direct show filter to measure DShow decoders preformance.
Before starting the graph you need to uncheck Graph->Use clock menu. After graph stopped open property page of this filter and you will see the performance.
great stuff, thx a lot!!!

btw if you want me to test your decoder too, it might be a nice if you could send me a unlocked copy, cause i cant get things to work with your player as described here
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 26th August 2005, 13:48   #12  |  Link
Sergey A. Sablin
Registered User
 
Join Date: Dec 2004
Location: Tomsk, Russia
Posts: 366
Quote:
Originally Posted by bond
great stuff, thx a lot!!!

btw if you want me to test your decoder too, it might be a nice if you could send me a unlocked copy, cause i cant get things to work with your player as described here
Our current decoder is a little bit slower than we have in mooolight time, so we don't want to test it now. But anyway I'll try to help you with decoder evaluation.

BTW when you measure DShow decoders performance you should be aware of output mediatype. Elecard Chegepuga (filter attached above) connects on any mediatype, but different decoders use different media types as first output mediatype - some of them use YV12 (as simplest), some of them use YUY2 or UYVY as fastest to render via graphic cards. Of course second variant is a little bit slower in pure performance (I mean just decoding - not displaying)

EDIT: you can specify media type on ech's property page or use null-in-place filter for that purpose

Last edited by Sergey A. Sablin; 26th August 2005 at 13:57.
Sergey A. Sablin is offline   Reply With Quote
Old 26th August 2005, 14:49   #13  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
Quote:
Originally Posted by Sergey A. Sablin
Our current decoder is a little bit slower than we have in mooolight time, so we don't want to test it now. But anyway I'll try to help you with decoder evaluation.
hm what do you mean with "moonlight time"? does moonlight use another decoder than elecard?

Quote:
BTW when you measure DShow decoders performance you should be aware of output mediatype. Elecard Chegepuga (filter attached above) connects on any mediatype, but different decoders use different media types as first output mediatype - some of them use YV12 (as simplest), some of them use YUY2 or UYVY as fastest to render via graphic cards. Of course second variant is a little bit slower in pure performance (I mean just decoding - not displaying)

EDIT: you can specify media type on ech's property page or use null-in-place filter for that purpose
thx for the info!
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 26th August 2005, 14:59   #14  |  Link
Sergey A. Sablin
Registered User
 
Join Date: Dec 2004
Location: Tomsk, Russia
Posts: 366
Quote:
Originally Posted by bond
hm what do you mean with "moonlight time"? does moonlight use another decoder than elecard?
Elecard developed and supported all the products for moonlight, but in december of 2004 our contract was finished. After that moonlight stopped it's activities and now it is under liquidation process.
So now we are working only on our own products.
Sergey A. Sablin is offline   Reply With Quote
Old 26th August 2005, 15:02   #15  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
Quote:
Originally Posted by Sergey A. Sablin
Elecard developed and supported all the products for moonlight, but in december of 2004 our contract was finished. After that moonlight stopped it's activities and now it is under liquidation process.
So now we are working only on our own products.
ah ic, so as moonlight was swallowed by mainconcept i assume this means that moonlight/mainconcept will not use elecards avc products in the future, but the ones produced by mainconcept?
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 27th August 2005, 10:24   #16  |  Link
Sergey A. Sablin
Registered User
 
Join Date: Dec 2004
Location: Tomsk, Russia
Posts: 366
Quote:
Originally Posted by bond
ah ic, so as moonlight was swallowed by mainconcept i assume this means that moonlight/mainconcept will not use elecards avc products in the future, but the ones produced by mainconcept?
Moonlight is saling out its IP - http://www.moonlight.co.il/rfp.php
Elecard is in the process of merging with Mainconcept. So there will be joint products of elecard-mainconcept.
Sergey A. Sablin is offline   Reply With Quote
Old 27th August 2005, 19:21   #17  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
ah ic, mixed things up
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 27th August 2005, 19:56   #18  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
will/did elecard also write an own avc decoder seperately from moonlight?
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Old 29th August 2005, 04:35   #19  |  Link
Sergey A. Sablin
Registered User
 
Join Date: Dec 2004
Location: Tomsk, Russia
Posts: 366
Quote:
Originally Posted by bond
will/did elecard also write an own avc decoder seperately from moonlight?
As I said previously
Quote:
Originally Posted by Sergey A. Sablin
Our current decoder is a little bit slower than we have in mooolight time, so we don't want to test it now.
so it is now under last stage of development - performance tuning
Sergey A. Sablin is offline   Reply With Quote
Old 29th August 2005, 11:43   #20  |  Link
bond
Registered User
 
Join Date: Nov 2001
Posts: 9,770
ah i understand, well keep things coming
__________________
Between the weak and the strong one it is the freedom which oppresses and the law that liberates (Jean Jacques Rousseau)
I know, that I know nothing (Socrates)

MPEG-4 ASP FAQ | AVC/H.264 FAQ | AAC FAQ | MP4 FAQ | MP4Menu stores DVD Menus in MP4 (guide)
Ogg Theora | Ogg Vorbis
use WM9 today and get Micro$oft controlling the A/V market tomorrow for free
bond is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:16.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.