[FFmpeg-devel] [PATCH] speedhq: make sure the block index is not negative
Steinar H. Gunderson
steinar+ffmpeg at gunderson.no
Tue Jan 31 01:59:16 EET 2017
On Tue, Jan 31, 2017 at 12:49:56AM +0100, Andreas Cadhalpun wrote:
>> How can you get a negative run, which would be required for this to happen?
> Some values in ff_dc_alpha_run_vlc_le.table are negative, e.g.:
> ff_dc_alpha_run_vlc_le.table[32] = {-1, 0}
This sounds like a strangeness in constructing the table, which shouldn't be
papered over in the inner loop of the decoder. I might be missing something
in how this table is used internally in the bitstream reader, but a code of
32 should just immediately hit 0 in the LSB and be interpreted as run=0.
(There are no invalid codes in this VLC, so nothing like run=-1 should ever
happen.)
Do you have an actual input where your code makes a difference?
/* Steinar */
--
Homepage: https://www.sesse.net/
More information about the ffmpeg-devel
mailing list