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

Reimar Döffinger Reimar.Doeffinger
Tue Feb 19 09:34:11 CET 2008

On Tue, Feb 19, 2008 at 04:07:29AM +0100, Michael Niedermayer wrote:
> On Mon, Feb 18, 2008 at 11:07:38PM +0100, Reimar D?ffinger wrote:
> > 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? 
> No, it does not.

Right, I missed it compares tmp, not *state.

> btw, as you already optimize startcode searches why not look at
> ff_h264_find_frame_end()? It should be more fun to understand and optimize :)

The reason is that the find_start_code uses 17% CPU on the sample I gave
above on my PC, downto < 11% with this change.
In addition to the fact that we have now 3 different functions to search
for a start code, so this is not only about optimizing.

Reimar D?ffinger

More information about the ffmpeg-devel mailing list