This could happen when there was a frame number gap and frame threading was used.
This fixes#5458.
Debugging-by: Ronald S. Bultje <rsbultje@gmail.com>
Debugging-by: Justin Ruggles <justin.ruggles@gmail.com>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* commit 'a8cbe5a0ccebf60a8a8b0aba5d5716dd54c1595c':
h264_ps: export actual height in MBs as SPS.mb_height
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* commit 'b13fc1e344011949929975a3451f78f226aa1de3':
h264: do not pass H264Context to h264_slice_header_parse()
Conflicts:
libavcodec/h264dec.h
Did not merge the h264_slice_header_parse() part. We use a few other
members of H264Context for error checking in that function.
Merged-by: Timothy Gu <timothygu99@gmail.com>
* commit 'bc7f4268514624e1286ea76d27a89a56b4ee18e1':
h264: drop tests whether the codec id is AV_CODEC_ID_H264
Conflicts:
libavcodec/h264dec.c
Merged-by: James Almer <jamrial@gmail.com>
* commit 'f638b67e5790735f34620bf82025c9b9d6fc7216':
h264: move the parameter set definitions to a new header file
Conflicts:
libavcodec/h264_parse.h
libavcodec/h264_ps.c
libavcodec/h264dec.h
Merged-by: James Almer <jamrial@gmail.com>
* commit 'f966498e433fead2f5e6b5b66fad2ac062146d22':
h264: decode the poc values from the slice header into the per-slice context
Merged-by: Clément Bœsch <u@pkh.me>
* commit '54dd9b1cdd9e54f1ee39ae25af0324f8aba2831b':
h264: set mb_aff_frame in frame_start()
h264: move the block starting a new field out of slice_header_parse()
Both commits are merged at the same time in order to prevent a
regression with Ticket #4440 (see 38660128).
Merged-by: Clément Bœsch <u@pkh.me>
Currently, SPS.mb_height is actually what the spec calls
PicHeightInMapUnits, which is half the frame height when interlacing is
allowed. Calling this 'mb_height' is quite confusing, and there are at
least two associated bugs where this field is treated as the actual
frame height - in the h264 parser and in the code computing maximum
reordering buffer size for a given level.
Fix those issues (and avoid possible future ones) by exporting the real
frame height in this field.
* commit '61f168ae348f94f39e7afc6971654455a5de0e4d':
h264: factor out setting the parameter sets for a frame
Michael's changes on top of the merge undo parts of the original diff
that are not factorization:
"The call point is left where it was before. Such a change should be in
a separate commit and has multiple issues, one being null pointer
dereferences the other is that some safety checks would become
conditional.
I tried to split the PPS init between the new and old functions
similarly to the SPS code."
Merged-by: Clément Bœsch <u@pkh.me>
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* commit 'd1f539c97e04e7cebecaf6916c5064f243d39fcf':
h264: merge the two reinit blocks in slice_header_parse()
Merged-by: Clément Bœsch <clement@stupeflix.com>
* commit '3fba16ecd978d5bed338b8da643c3435e62b3437':
h264: factor starting a new field out of parsing the slice header
Merged-by: Clément Bœsch <clement@stupeflix.com>
* commit '4cec43a9eeb58eb9e581a2d9d25f78e5bfbb0960':
h264: move calculating the POC out of h264_slice_header_parse()
Merged-by: Clément Bœsch <clement@stupeflix.com>
* commit '6dd996c7c81575a1e4969987ab175a6df7beab3d':
h264: move building the reference list out of h264_slice_header_parse()
Merged-by: Clément Bœsch <clement@stupeflix.com>
* commit '0bad254300356005af4aef00a706bf2e8eee96bc':
h264: move initing the implicit pred weight table out of h264_slice_header_parse()
Merged-by: Clément Bœsch <clement@stupeflix.com>
* commit 'ed9a20ebe4a89de119ea97bdccf688ece8c6648c':
h264: split reading the ref list modifications and actually building the ref list
ref_modifications.val are read as u32 instead of u8 in FFmpeg.
Merged-by: Clément Bœsch <clement@stupeflix.com>
* commit '7b50d60442af8d9527e9da46818011fe15a5265a':
h264: call ff_h264_fill_mbaff_ref_list() when constructing the normal ref list
Merged-by: Clément Bœsch <clement@stupeflix.com>
* commit '77a1e2c5f8f8250dfacff24b993eb473260ed13e':
h264: move direct mode inits out of h264_slice_header_parse()
Merged-by: Clément Bœsch <clement@stupeflix.com>
This should not be needed anymore and simplifies the next merge
Requested-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This should not be needed anymore and simplifies the next merge
Requested-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>