| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
The patch introduces race conditions.
|
|
|
|
|
|
| |
implying it
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
|
|
|
|
|
|
|
|
| |
Fixes reading freed memory
Fixes: 568/clusterfuzz-testcase-6107186067406848
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit '38efff92f1ef81f3de20ff0460ec7b70c253d714':
FATE: add a test for H.264 with two fields per packet
h264: fix decoding multiple fields per packet with slice threads
This merge includes two commits because the FATE test was useful in
order to make proper testing.
The merge gets rid of the now unused:
- SLICE_SINGLETHREAD and SLICE_SKIPED macros
- max_contexts
- "again" label in decode_nal_units()
This commit also includes the fix from d3e4d406b.
Thanks to wm4 and Michael Niedermayer for their testing.
Merged-by: Clément Bœsch <u@pkh.me>
Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since we only know whether a NAL unit corresponds to a new field after
parsing the slice header, this requires reorganizing the calls to slice
parsing, per-slice/field/frame init and actual decoding.
In the previous code, the function for slice header decoding also
immediately started a new field/frame as necessary, so any slices
already queued for decoding would no longer be decodable.
After this patch, we first parse the slice header, and if we determine
that a new field needs to be started we decode all the queued slices.
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit 'f450cc7bc595155bacdb9f5d2414a076ccf81b4a':
h264: eliminate decode_postinit()
Also includes fixes from 1f7b4f9abc and e344e65109.
Original patch replace H264Context.next_output_pic (H264Picture *) by
H264Context.output_frame (AVFrame *). This change is discarded as it
is incompatible with the frame reconstruction and motion vectors
display code which needs the extra information from the H264Picture.
Merged-by: Clément Bœsch <u@pkh.me>
Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This function's purpose is not very well defined. Currently it does two
(only marginally related) things: selecting the next output frame and
calling ff_thread_finish_setup() for frame threading. The first of those
more properly belongs under field_start(), while the second can be
called directly from decode_nal_units().
|
| |
| |
| |
| | |
It is done unconditionally in ff_h264_field_end()
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
concealment
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
libavcodec/h264_slice.c:1384:9: warning: variable 'droppable' set but not used
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
* commit '58640fe89ec4f2a3d67c0a2585fca8de34440857':
h264: handle frame recovery in h264_field_start()
Conflicts:
libavcodec/h264dec.c
Merged-by: Timothy Gu <timothygu99@gmail.com>
|
| |
| |
| |
| |
| |
| | |
This is a more appropriate place for this. H264Context.recovery_frame is
shared between frame threads, so modifying it where it is right now is
invalid.
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit 'e26c64148be8a20ace7512d96503172fb5e9753b':
h264: discard slices of redundant pictures right after parsing the slice header
Conflicts:
libavcodec/h264_slice.c
libavcodec/h264dec.c
TODO: fix indentation
Merged-by: Timothy Gu <timothygu99@gmail.com>
|
| |
| |
| |
| |
| | |
Going through the whole decoder initialization process for a slice we
are not going to decode is unnecessary and potentially dangerous.
|
|\ \
| |/
| |
| |
| |
| |
| | |
* commit '6efc4638584e1e14d1a6152186ba28f5d48a80c0':
h264: always set redundant_pic_count during slice header parsing
Merged-by: Timothy Gu <timothygu99@gmail.com>
|
| |
| |
| |
| |
| | |
It is always checked in the surrounding code, so this make sure we don't
see a value from an old slice.
|
| |
| |
| |
| | |
This is a more appropriate place for it.
|
| |
| |
| |
| |
| |
| |
| | |
This reverts commit e4af9be0f45c8f2ca148fb971f1e0c6782530e8c and redoes
796027f22154c799e0063e2457b31e0cfd1dddae.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
|
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 796027f22154c799e0063e2457b31e0cfd1dddae, reversing
changes made to bca30ed2b67f095fd31e07319a622ac30ad22978.
Preemptive revert before further testing has been done.
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22':
h264: fix the check for mixed IDR/non-IDR slices
Conflicts:
libavcodec/h264_slice.c
libavcodec/h264dec.c
Merged-by: Timothy Gu <timothygu99@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>
|
| |
| |
| |
| |
| | |
This should make it more clear that this function does not need any
decoder-global state other than the parameter sets.
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit '996f13413b0415097e2a184d161462ffb3ceb647':
h264: fix warnings in fill_filter_caches_inter()
Conflicts:
libavcodec/h264_slice.c
See ef8f6464a55db730cab8c48a1a51fa4e6ca12107
Merged-by: James Almer <jamrial@gmail.com>
|
| |
| |
| |
| |
| |
| | |
The code does some weird casting to a 2-dimensional sub-array of
ref2frm. This is not necessary, since only one dimension is needed
there.
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
* 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>
|
| |
| |
| |
| | |
Those are unused remnants of the old SVQ3 code.
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c':
h264: add H264_ prefix to the NAL unit types
Conflicts:
libavcodec/h264_parse.c
libavcodec/h264_parser.c
libavcodec/h264_slice.c
libavcodec/h264dec.c
Merged-by: James Almer <jamrial@gmail.com>
|
| |
| |
| |
| |
| | |
This will prevent conflicts e.g. in code that deals with both h264 and
hevc.
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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>
|
| |
| |
| |
| |
| | |
The PS parsing code is independent from the decoder, so it makes more
sense for it to have its own separate header.
|
|\ \
| |/
| |
| |
| |
| |
| | |
* commit '251cbb44003caf179fb17afbb8a6c56643c2a646':
h264: create a new header for common h264 definitions
Merged-by: Clément Bœsch <u@pkh.me>
|
| |
| |
| |
| |
| |
| | |
Move the NAL unit types into it. This will allow to stop including the
whole decoder-specific h264dec.h in some code that is unrelated to the
decoder and only needs some enum values.
|
|\ \
| |/
| |
| |
| |
| |
| | |
* commit '9df889a5f116c1ee78c2f239e0ba599c492431aa':
h264: rename h264.[ch] to h264dec.[ch]
Merged-by: Clément Bœsch <u@pkh.me>
|
| |
| |
| |
| | |
This is more consistent with the naming of other decoders.
|
|\ \
| |/
| |
| |
| |
| |
| | |
* commit 'f651c6a259d4bc78f25db11d25df9256d5110bd3':
h264: factor out setting frame properties / side data
Merged-by: Clément Bœsch <u@pkh.me>
|
| |
| |
| |
| |
| |
| | |
Right now this code is mixed with selecting the next output frame. Move
it to a separate function called from h264_field_start(), which is a
more appropriate place for this.
|
|\ \
| |/
| |
| |
| |
| |
| | |
* commit 'bcd91f1644b46dd142c5355c8b742b27d9028903':
h264: move a per-field block from decode_slice_header() to field_start()
Merged-by: Clément Bœsch <u@pkh.me>
|
| |
| |
| |
| | |
This is a more appropriate place for it.
|
| |
| |
| |
| |
| | |
Doing this after ff_thread_finish_setup() is called is invalid and can
conflict with reads from the other thread.
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| | |
* commit 'debca90863e4ee53447efd02483c500f89766384':
h264: store {curr,max}_pic_num in the per-slice context
Merged-by: Clément Bœsch <u@pkh.me>
|
| |
| |
| |
| |
| |
| |
| | |
While the value of those variables will be constant for the whole frame,
they are only used in two functions called from slice header decoding.
Moving them to the per-slice context allows us to make the H264Context
passed to slice_header_parse() constant.
|
|\ \
| |/
| |
| |
| |
| |
| | |
* 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>
|
| |
| |
| |
| |
| | |
Copy them into the decoder-global context in field_start(). This avoids
modifying the decoder-global context during bitstream parsing.
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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>
|