[FFmpeg-devel] [RFC] use ff_avc_find_startcode in ff_find_start_code

Michael Niedermayer michaelni
Tue Feb 19 03:57:07 CET 2008

On Mon, Feb 18, 2008 at 11:07:38PM +0100, Reimar D?ffinger wrote:
> Hello,
> First I wonder if that ff_find_start_code function is
> not quite buggy anyway, or is it intentional that it searches for 
> 00 00 01 00 in the part involving the state but for 00 00 01 ?? in the
> later code? If so, could somebody document the code?.
> Anyway, this is a quite ugly patch that makes the function use
> ff_avc_find_startcode (since that is in lavf, it can't be used as is of
> course).
> It probably also breaks the original use of ff_avc_find_startcode,
> though I found the current behaviour a bit strange as well, and this
> function is undocumented, too.
> This causes at least a 6% speedup when decoding
> http://samples.mplayerhq.hu/GXF/THX_Science_FLT_1920.gxf (I only tested
> with MPlayer though).

current code:
7054 dezicycles in findsc, 262131 runs, 13 skips
7082 dezicycles in findsc, 262134 runs, 10 skips

your code:
11371 dezicycles in findsc, 262119 runs, 25 skips
11624 dezicycles in findsc, 262115 runs, 29 skips

gcc: 4.3.0 20080127 (experimental)
800mhz duron
ffmpeg -v 9 -i matrixbench_mpeg2.mpg -vcodec copy -an -y test.avi


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you really think that XML is the answer, then you definitly missunderstood
the question -- Attila Kinali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080219/cd1cbffc/attachment.pgp>

More information about the ffmpeg-devel mailing list