• Mark Harris's avatar
    avcodec: Use get_ue_golomb_long() when needed · c51c08e0
    Mark Harris authored
    get_ue_golomb() cannot decode values larger than 8190 (the maximum
    value that can be golomb encoded in 25 bits) and produces the error
    "Invalid UE golomb code" if a larger value is encountered.  Use
    get_ue_golomb_long() instead (which supports 63 bits, up to 4294967294)
    when valid h264/hevc values can exceed 8190.
    
    This updates decoding of the following values:   (maximum)
      first_mb_in_slice                                36863* for level 5.2
      abs_diff_pic_num_minus1                         131071
      difference_of_pic_nums_minus1                   131071
      idr_pic_id                                       65535
      recovery_frame_cnt                               65535
      frame_packing_arrangement_id                4294967294
      frame_packing_arrangement_repetition_period      16384
      display_orientation_repetition_period            16384
    
    An alternative would be to modify get_ue_golomb() to handle encoded
    values of up to 49 bits as was done for get_se_golomb() in a92816c4.
    In that case get_ue_golomb() could continue to be used for all of
    these except frame_packing_arrangement_id.
    Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    c51c08e0
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
arch.mak Loading commit data...
cmdutils.c Loading commit data...
cmdutils.h Loading commit data...
cmdutils_common_opts.h Loading commit data...
cmdutils_opencl.c Loading commit data...
common.mak Loading commit data...
configure Loading commit data...
ffmpeg.c Loading commit data...
ffmpeg.h Loading commit data...
ffmpeg_dxva2.c Loading commit data...
ffmpeg_filter.c Loading commit data...
ffmpeg_opt.c Loading commit data...
ffmpeg_qsv.c Loading commit data...
ffmpeg_vdpau.c Loading commit data...
ffmpeg_videotoolbox.c Loading commit data...
ffplay.c Loading commit data...
ffprobe.c Loading commit data...
ffserver.c Loading commit data...
ffserver_config.c Loading commit data...
ffserver_config.h Loading commit data...
library.mak Loading commit data...
version.sh Loading commit data...