[FFmpeg-devel] Pipeline: H.264 speed improvements

Jason Garrett-Glaser darkshikari
Tue Dec 23 14:03:53 CET 2008


> what about
> coeff= get_vlc2();
> if(coeff > BIGGEST_ALLOWED_COEFF)
>    do escape with prefix= coeff - BIGGEST_ALLOWED_COEFF;
>
> ?

I don't see how this will work.  Let us say that our VLC table holds 8
bits of information.  Our suffix length is 4 and we read a code as
follows:

0000001XXXX (Xs are suffix)

Our get_vlc will look up the VLC index of [suffix][0b0000001X], which
will return a coeff value of zero because it's a code not stored in
the table.

How could we possibly extract any useful information from 0000001X?
It isn't the entire code, and without the rest of the bits, it means
absolutely nothing.  The escape code has to go back, re-read the
*entire* VLC, and then derive the correct information from that:
*there is no coeff that maps to 0b0000001X with a suffix length of 4*.

Dark Shikari




More information about the ffmpeg-devel mailing list