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

Ivan Kalvachev ikalvachev
Tue Feb 19 12:25:02 CET 2008

On Feb 19, 2008 1:04 PM, Reimar D?ffinger
<Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> Hello,
> 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? 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).
> This one is a bit faster, but still not as fast as the original when
> using ffmpeg/ffplay but much faster when using mplayer (whether the data
> is in the cache or not really seems to be what makes the difference?!)...

If you think the cache may be the issue, then worm it up before
running the bench timers. (just read all the data between *p and *end
If this helps then I guess the final code may need prefetch or something.

More information about the ffmpeg-devel mailing list