[Ffmpeg-devel] benchmark of different CABAC routines

Michael Niedermayer michaelni
Wed Oct 11 21:07:14 CEST 2006


Hi

On Wed, Oct 11, 2006 at 09:30:24PM +0300, Uoti Urpala wrote:
> Results on AMD 2500+ for revision 6658.
> These were done with the skip functionality in START/STOP_TIMER disabled
> and repeated a few times because some versions seemed to have
> consistently higher skip counts and I wanted to rule out biased results
> because of that (and the skip functionality probably isn't reliable
> anyway in this case since there is no expectation that every
> decode_cabac_residual call would use a similar amount of time).
> 
> branchless cmov: 4890
> branchless no-cmov: 4834
> non-branchless: 4553
> non-branchless C: 5058
> non-branchless C, modified: 4996
> branchless C: 5440

well, if you repeated them a few times then what are these numbers?
average? minimum? furthermore did you repeat one test several times
and then the next or where they interleaved? its not a silly question
as the skip functionality removes the effects of task switches, without
them removed systematic errors can sneak in and need to be dealt with
for example ive seen cases where repeated mplayer -benchmark gave
10 or so monotonely increasing scores
and standard deviations or all the individual benchmark scores would be
nice too, its just that ive no experience with the modified benchmark 
code you use so iam uncertain about its accuracy


> 
> The modified non-branchless C version has
> 
> 	uint8_t tmp = s + 2;
> 	if (tmp < 126)
> 	    s = tmp;
> 	*state = s;
> 
> instead of
> 
>         *state= ff_h264_mps_state[s];
> 
> Writing it that way instead of the "s += 2; if (s < 128) *state = s"
> which was there earlier (and was slower) makes gcc use cmov instead of a
> branch and is faster.

interresting, i will experiment with this a little ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list