[x264-devel] rbsp_alignment_zero_bit
Håkan Hjort
hakan.hjort at gmail.com
Tue Mar 24 21:37:18 CET 2009
2009/3/24 Deepak Singh <deepak.ameen2k at gmail.com>:
>
> I already gave thought on it..and I feel the magic number (0x35a4e4f5) in
> the below line
>
> cb->i_low |= (0x35a4e4f5 >> (h->i_frame & 31) & 1) << 10;
>
> from function x264_cabac_encode_flush is the issue.
> I couldn't figure out the relation between the magic number and the
> h->i_frame.
>
It's a 32-entry lookup table (indexed by the low 5 bits of h->i_frame).
E.g. A compact / efficient way to write
int table[] = { 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0,
1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0 };
cb->i_low |= table[h->i_frame & 31] << 10;
Regards,
Håkan
More information about the x264-devel
mailing list