[FFmpeg-devel] [PATCH]Fix utvideo regression
christophe.gisquet at gmail.com
Mon Jun 9 13:18:13 CEST 2014
2014-05-29 12:27 GMT+02:00 Derek Buitenhuis <derek.buitenhuis at gmail.com>:
> Have you tried the sample with the official decoder? If that breaks, then its not our
> decoder which needs to be fixed, but our encoder.
Actually, probably both.
Non-existing symbols may get a codelength of e.g. 30 or 31, in turn
causing the initial issue with the vlc parsing code. There's even a
bogus "get_vlc2(&gb, vlc.table, vlc.bits, 4)" in the code (max_depth
above 3 is meaningless).
The issue is that utvideo writes a codelength of 255 for those values
and special-case them in various places. ffmpeg's version tries to
account for this, but somewhat fails, in particular by writing
whatever ff_huff_gen_len_table outputs for absent symbols. This
probably causes less optimal decoding for utvideo official decoder.
ffmpeg codec should probably uses 0 as length internally, depending on
what ff_init_vlc_sparse prefers.
More information about the ffmpeg-devel