| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
With comments describing the derivation of each value.
|
|
|
|
|
| |
This will prevent conflicts e.g. in code that deals with both h264 and
hevc.
|
|
|
|
|
| |
The PS parsing code is independent from the decoder, so it makes more
sense for it to have its own separate header.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This is more consistent with the naming of other decoders.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Copy them into the decoder-global context in field_start(). This avoids
modifying the decoder-global context during bitstream parsing.
|
|
|
|
|
|
| |
Replace the decoder-global nal_unit_type/nal_ref_idc variables with the
per-NAL ones. The decoder-global ones still cannot be removed because
they are used by hwaccels.
|
| |
|
|
|
|
|
| |
It does not need the whole context. This will simplify the following
commit.
|
| |
|
|
|
|
|
|
| |
Do it right before the MMCOs are applied to the DPB. This will allow
moving the frame_start() call out of the slice header parsing, since
generating the implicit MMCOs needs to be done after frame_start().
|
|
|
|
|
|
| |
They are stored in the slice header, so technically they are per-slice
(though they must be the same in every slice). This will simplify the
following commits.
|
|
|
|
|
| |
The variable stores the number of mmco entries, so the current name is
misleading.
|
| |
|
|
|
|
|
|
|
|
| |
list
This will allow postponing the reference list construction (and by
consequence some other functions, like frame_start) until the whole
slice header has been parsed.
|
|
|
|
| |
There is no real reason to call it separately.
|
|
|
|
| |
Signed-off-by: Diego Biurrun <diego@biurrun.de>
|
|
|
|
| |
Signed-off-by: Diego Biurrun <diego@biurrun.de>
|
|
|
|
| |
It is always equal to nb_slice_ctx.
|
|
|
|
|
| |
This limit is now unnecessary, we can easily support an arbitrary number
of threads.
|
|
|
|
|
|
|
|
|
|
|
|
| |
In such a case, decode the MBs in parallel without the loop filter, then
execute the filter serially.
The ref2frm array was previously moved to H264SliceContext. That was
incorrect, since it applies to all the slices and should properly be in
H264Context (it did not actually break decoding, since this distinction
only becomes relevant with slice threading and deblocking_filter=1,
which was not implemented before this commit). The ref2frm array is thus
moved back to H264Context.
|
|
|
|
|
| |
It is not used for anything internally, just exported in the output
frames. So remove the indirection and set it directly in frame_start().
|
| |
|
| |
|
|
|
|
| |
It is no longer called from outside the h264 decoder.
|
|
|
|
|
|
| |
It is always unconditionally initialized in decode_postinit() and then
immediately used in one place further below. All the other places where
it is accessed are just useless fluff.
|
| |
|
| |
|
| |
|
|
|
|
| |
This will allow decoupling the parser from the decoder.
|
|
|
|
|
| |
Make the SEI parsing independent of the H264Context, to allow
decoupling the parser from the decoder.
|
|
|
|
| |
This will allow decoupling the parser from the decoder.
|
|
|
|
|
|
|
|
|
| |
Make the SPS/PPS parsing independent of the H264Context, to allow
decoupling the parser from the decoder. The change is modelled after the
one done earlier for HEVC.
Move the dequant buffers to the PPS to avoid complex checks whether they
changed and an expensive copy for frame threads.
|
|
|
|
| |
This will allow decoupling the parser from the decoder.
|
|
|
|
| |
Remove now unused ff_h264_decode_nal().
|
| |
|
| |
|
| |
|
|
|
|
| |
It is shared with svq3.
|
|
|
|
| |
This will allow decoupling the parser from the decoder.
|
|
|
|
|
|
|
| |
Sample-Id: asan_heap-uaf_3660f67_757_cov_1257014655_Hi422FR1_SONY_A.jsv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the spec, the reference list for a slice should be
constructed by first generating an initial (what we now call "default")
reference list and then optionally applying modifications to it.
Our code has an optimization where the initial reference list is
constructed for the first inter slice and then rebuilt for other slices
if needed. This, however, adds complexity to the code, requires an extra
2.5kB array in the codec context and there is no reason to think that it
has any positive effect on performance. Therefore, simplify the code by
generating the reference list from scratch for each slice.
|
|
|
|
|
|
|
| |
This makes the h.264 decoder threadsafe to initialize.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
|
|
|
|
| |
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
|
|
|
|
|
|
| |
Partially based on code by Marton Balint and Kieran Kunhya.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
|
|
|
|
|
|
| |
finish_setup()
Should fix a large number of possible races with frame threading.
|
|
|
|
|
|
| |
Based on a patch by Michael Niedermayer <michaelni@gmx.at>.
CC: libav-stable@libav.org
Found-by: Kieran Kunhya <kierank@obe.tv>
|
| |
|