[Ffmpeg-devel] [PATCH] h264 - simplify cabac/luma cbp
Michael Niedermayer
michaelni
Thu Mar 1 16:13:30 CET 2007
Hi
On Wed, Feb 28, 2007 at 09:46:00AM -0500, Alexander Strange wrote:
> I noticed that decode_cabac_mb_cbp_luma() had a lot of mispredicted
> branches, so I simplified the logic some.
>
> This also gets rid of lookup tables, which can be very slow on modern
> CPUs.
>
> Original time: 24.855s +/- .0105
>
> New time: 24.699s +/- .0254
>
> This is from running mplayer -benchmark -endpos 00:30 five times on
> each and discarding the highest value.
>
> I tried using the START_TIMER("decode_mb_cabac") instead of mplayer
> timing; not only does it make both the original and patched mplayer
> much slower (~26.3s), the new one reports higher times than the old
> one :(
please redo the -benchmark test the difference of 0.5% is fairly small
and i think 5 runs on each are too little to be sure also iam concerned
that the START_TIMER test reports contradicting results
also add START_TIMER outside decode_mb_cabac() to reduce the chance of
it affecteing the generated code, that is
START_TIMER
decode_mb_cabac
STOP_TIMER
also please try
START_TIMER
decode_mb_cabac
if(!h->prev_mb_skipped){
STOP_TIMER
}
and maybe both with av_noinline decode_mb_cabac
and when benchmarking (without *_TIMER) interleave the tests, that is
new_mplayer -benchmark myfile ...
note result
old_mplayer -benchmark myfile ...
note result
new_mplayer -benchmark myfile ...
note result
old_mplayer -benchmark myfile ...
note result
...
with 30 second file this should be only 10 minutes work if you benchmark
each 10 times and the *_TIMER tests should be significantl less time
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- 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/20070301/7a4e006a/attachment.pgp>
More information about the ffmpeg-devel
mailing list