[FFmpeg-devel] [PATCH 3/7] avcodec/golomb, h264*: Fix get_ue_golomb_31()

Michael Niedermayer michael at niedermayer.cc
Tue Jul 14 23:36:35 EEST 2020


On Tue, Jul 14, 2020 at 05:34:50PM +0200, Andreas Rheinhardt wrote:
> get_ue_golomb_31() uses a LUT of 512 entries; therefore it can be used
> to parse exp-golomb codes of length <= 9, i.e. those codes with at most
> four leading bits that have five effective bits; this implies a range of
> 0..30 and not 31. In particular, this function must not be used to parse
> e.g. the H.264 SPS id.

hmm, are you sure ?

1           0
01X         1-2
001XX       3-6
0001XXX     7-14
00001XXXX   15-30
000001..... 31

we need to read 9 bits for this, we do not need to read the bits marked with
a "." because the code is already determined at this point.



[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200714/d489c0b5/attachment.sig>


More information about the ffmpeg-devel mailing list