[x264-devel] about cabac renorm shift

Loren Merritt lorenm at u.washington.edu
Wed Apr 1 10:40:47 CEST 2009


On Wed, 1 Apr 2009, panoply Brilliant wrote:

> I'm reading x264-snapshot-20090214£¬and I have doubt about the line in  the
> file common/cabac.c
>
> " int shift = x264_cabac_renorm_shift[cb->i_range>>3];  ".
>
> In the situation of cb->i_range equal to 2,  which would happen when
> encoding the LPS with pStateIdx equal to
> 63 in H.264 standard, a 7 bit left shift should be performed
> for cb->i_range and cb->i_low, but it seems not be
> so in the code line.

pStateIdx can't be 63. There may be a table entry for that in the 
standard, but it isn't used in anything other than 
cabac_encode_terminal, which we have a special case for (and the standard 
does too).

--Loren Merritt


More information about the x264-devel mailing list