[FFmpeg-devel] Idea about speedup of startcode search

Reimar Döffinger Reimar.Doeffinger
Fri Feb 8 16:07:24 CET 2008


Hello,
On Fri, Feb 08, 2008 at 07:31:37AM -0700, Loren Merritt wrote:
> On Fri, 8 Feb 2008, Thorsten Jordan wrote:
> > Here one searches for 00 00 03 xx patterns, for mpeg 1/2 or h264 you
> > often look for 00 00 01 xx patterns or 00 00 00 01.
> >
> > This can be done in a simple C loop, but gcc does a bad job and uses up
> > to 7 instructions per scanned byte. On Core 2 Duo measurement shows 2.8
> > instructions per byte.
> 
> Which C implementation is that? It doesn't sound like you tried 
> ff_avc_find_startcode.

Hmm.. Maybe I am missing something, but I think those little/big-endian
comments in that function do not make any sense, do they?
I think using one of those commented-out variants would only detect some
start codes?

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list