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 a92816c.
In that case get_ue_golomb() could continue to be used for all of
these except frame_packing_arrangement_id.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* commit '5bf3c0fa49afd5bbf43aa841ff78007d72c80736':
h264: drop the now unused per-slice H264Contexts
Conflicts:
libavcodec/h264_slice.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'f42485dbce614b3f63182845da43db690b427b7c':
h264: use a separate GetBitContext for slice data
Conflicts:
libavcodec/h264.c
libavcodec/h264_cavlc.c
libavcodec/h264_parser.c
libavcodec/h264_slice.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '56febc993b928ccc039a32158ca60b234c311875':
h264: move the slice type variables into the per-slice context
Conflicts:
libavcodec/h264.c
libavcodec/h264_cabac.c
libavcodec/h264_cavlc.c
libavcodec/h264_slice.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '31d2039cb42668ebcf08248bc48bbad44aa05f49':
h264_parser: export video format and dimensions
Conflicts:
libavcodec/h264_parser.c
libavcodec/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This also allows replacing several literal numbers by named constants
And it should be faster, the function is not speed relevant though as it is
generally only called a few times at the streams start.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This avoids a potential conflict with the equally named function for closing files
It also could reduce confusion in debugger backtraces
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* commit '9404a47a2d1df418946a338938eb6cdb3afed474':
h264: move parser-only variables to their own context
Conflicts:
libavcodec/h264_parser.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
They are not just inverses of each other.
This should restore behavior to before the introduction of framerate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* qatar/master:
h264_parser: use enum values in h264_find_frame_end()
Conflicts:
libavcodec/h264_parser.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '73e8fab31dc19c4371499e612856accbc00b2820':
h264: print values in case of error
Conflicts:
libavcodec/h264.c
libavcodec/h264_ps.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '4baba6c813b7a1f27370e20fb1a87b05fcb39208':
h264_parser: Fix POC parsing for the case where MMCO_RESET is present.
Conflicts:
libavcodec/h264.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit 'b81dbd6cb7522bea96d78a52f8a4c25a47b820c9':
h264_parser: Fix POC parsing for the case where MMCO_RESET is absent.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
The prev_ values were not set after parsing POC.
Increase length of the buffer decoded to parse enough safely.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
* commit '218d6844b37d339ffbf2044ad07d8be7767e2734':
h264dsp: Factorize code into a new function, h264_find_start_code_candidate
Conflicts:
libavcodec/h264_parser.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '7a82022ee2f9b1fad991ace0936901e7419444be':
h264_parser: Initialize the h264dsp context in the parser as well
Merged-by: Michael Niedermayer <michaelni@gmx.at>