| Commit message (Collapse) | Author | Age |
|
|
|
| |
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>
|
| |
|
|
|
|
|
| |
It now has a fixed size and is initialized only once, so there is no
point in allocating it separately.
|
|
|
|
|
| |
It does not logically belong in free_tables(), since it's not allocated
in alloc_tables() and its size has nothing to do with the frame size.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
That function currently does two things -- reinitializing the DSP
contexts and setting low_delay based on the SPS values.
The former more appropriately belongs in h264_slice_header_init(), while
the latter only really makes sense in decode_slice_header().
The third call to ff_h264_set_parameter_from_sps(), done immediately
after parsing a new SPS, appears to serve no useful purpose, so it is
just dropped.
Also, drop now unneeded H264Context.cur_chroma_format_idc.
|
|
|
|
| |
It is only set, but never used for anything.
|
|
|
|
| |
It is not needed anymore since switching to refcounted frames.
|
| |
|
|
|
|
|
| |
The way it is currently designed is fundamentally unsafe and cannot be
reasonably fixed without completely rewriting it.
|
|
|
|
|
|
| |
While it is a per-frame variable, it is only really used in the
low-level decoding code, so it is more efficient to store it in the
slice context.
|
|
|
|
|
|
| |
There is no need to store a whole H264Picture, with a full AVFrame
embedded in it. This should allow getting rid of the embedded AVFrame
later.
|
| |
|
|
|
|
| |
There is now no need to have per-slice copies of the H264Context.
|
| |
|
| |
|
|
|
|
|
| |
Also change the method for allocating to the same one as used by
edge_emu_buffer.
|
|
|
|
|
|
|
| |
Also change the method for allocating them. Instead of two possible
alloc calls from different places, just ensure they are allocated at the
start of each slice. This should be simpler and less bug-prone than the
previous method.
|
|
|
|
|
| |
All the variables modified by this code are either per-MB arrays or have
been moved to the per-slice context
|
|
|
|
|
| |
All the variables modified by this code are either per-MB arrays or have
been moved to the per-slice context
|
|
|
|
|
| |
All the variables modified by this code are either per-MB arrays or have
been moved to the per-slice context
|
|
|
|
|
| |
All the variables modified by this code are either per-MB arrays or have
been moved to the per-slice context
|