summaryrefslogtreecommitdiff
path: root/libavcodec/h264_slice.c
Commit message (Collapse)AuthorAge
* cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* h264: eliminate max_contextsAnton Khirnov2016-04-24
| | | | It is always equal to nb_slice_ctx.
* h264: remove an artificial restriction on the number of slice threadsAnton Khirnov2016-04-24
| | | | | This limit is now unnecessary, we can easily support an arbitrary number of threads.
* h264: remove pointless setting of some variables in loop_filterAnton Khirnov2016-04-24
| | | | Those should already be set to the correct values.
* h264: remove a pointless commentAnton Khirnov2016-04-24
|
* h264: make slice threading work with deblocking_filter=1Anton Khirnov2016-04-24
| | | | | | | | | | | | 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.
* h264: remove H264Context.pict_typeAnton Khirnov2016-04-24
| | | | | It is not used for anything internally, just exported in the output frames. So remove the indirection and set it directly in frame_start().
* h264: drop a pointless indirectionAnton Khirnov2016-04-24
|
* h264: eliminate low_delayAnton Khirnov2016-04-24
| | | | | | 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.
* h264_refs: remove an unused parameter from ff_h264_fill_mbaff_ref_list()Anton Khirnov2016-04-24
|
* h264: eliminate copy_fieldsAnton Khirnov2016-04-24
| | | | | It is very fragile against fields being moved and hides what is actually being copied. Copy all the fields explicitly instead.
* h264: decouple h264_sei from the h264 decoderAnton Khirnov2016-04-24
| | | | | Make the SEI parsing independent of the H264Context, to allow decoupling the parser from the decoder.
* h264: factor out calculating the POC count into a separate fileAnton Khirnov2016-04-24
| | | | This will allow decoupling the parser from the decoder.
* h264: decouple h264_ps from the h264 decoderAnton Khirnov2016-04-24
| | | | | | | | | 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.
* h264: factor out parsing the reference count into a separate fileAnton Khirnov2016-04-24
| | | | This will allow decoupling the parser from the decoder.
* h264: move reading direct_spatial_mv_pred out of ff_set_ref_count()Anton Khirnov2016-04-24
| | | | | It has nothing to do with the reference count and so does not belong in this function.
* h264: Add missing ff_ prefix to internally visible h264_init_dequant_tables()Diego Biurrun2016-03-30
|
* svq3: move the dequant buffer to SVQ3ContextAnton Khirnov2016-03-28
| | | | Remove now unnecesary call to ff_h264_alloc_tables()
* h264: factor out pred weight table parsing into a separate fileAnton Khirnov2016-03-28
| | | | This will allow decoupling the parser from the decoder.
* h264data: Move all data tables from a header to a .c fileDiego Biurrun2016-03-25
|
* lavc: Deduplicate zigzag_scan tableDiego Biurrun2016-03-25
|
* lavu: deprecate AV_PIX_FMT_VAAPI_*, replace with AV_PIX_FMT_VAAPIMark Thompson2016-03-19
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* cosmetics: Drop empty comment linesDiego Biurrun2016-02-18
|
* h264: do not call frame_start() for missing framesAnton Khirnov2015-12-07
| | | | | We do not need to do a full setup like for a real frame, just allocate a buffer and set cur_pic(_ptr).
* h264: set frame_num in start_frame(), not decode_slice_header()Anton Khirnov2015-12-06
| | | | | That is a more appropriate place for it, since it is not allowed to change between slices.
* h264: eliminate default_ref_listAnton Khirnov2015-12-06
| | | | | | | | | | | | | 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.
* lavc: AV-prefix all codec flagsVittorio Giovara2015-07-27
| | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* h264: Allow stream and container cropping at the same timeVittorio Giovara2015-06-30
| | | | | | | | The container cropping is applied only when difference is within 16 pixels, and the smallest value between the two is chosen. Bug-Id: 383 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* h264: do not update the context fields copied between threads after ↵Anton Khirnov2015-06-27
| | | | | | finish_setup() Should fix a large number of possible races with frame threading.
* h264: make sure the slices do not overlap during slice threadingAnton Khirnov2015-06-27
| | | | | | Based on a patch by Michael Niedermayer <michaelni@gmx.at>. CC: libav-stable@libav.org Found-by: Kieran Kunhya <kierank@obe.tv>
* h264: er: Copy from the previous reference only if compatibleAndreas Cadhalpun2015-06-15
| | | | | | | | Also use the frame pixel format instead of the one from the codec context, which is more robust. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* h264: Fix HWACCEL_MAX for D3D11Michael Niedermayer2015-06-01
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* h264: Make sure reinit failures mark the context as not initializedLuca Barbato2015-05-30
| | | | | Bug-Id: CVE-2015-3417 CC: libav-stable@libav.org
* D3D11va: add a Direct3D11 video decoder similar to DXVA2Steve Lhomme2015-05-25
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* h264: use properly allocated AVFramesAnton Khirnov2015-04-29
|
* h264: merge the init and reinit paths in update_thread_context()Anton Khirnov2015-04-29
| | | | | There is no real need to handle the init case specially, everything necessary is initialized in the reinit code as well.
* h264: drop the reinit parameter from init_slice_header()Anton Khirnov2015-04-29
| | | | | It is only used to decide whether to call free_tables(), but that function is safe to call on an uninitialized context as well.
* h264: update the current bit depth/chroma type in init_slice_header()Anton Khirnov2015-04-29
| | | | | With frame threading, it is currently only updated in the context where the change occurs, but not in any other contexts.
* h264: copy nal_length_size in update_thread_contextAnton Khirnov2015-04-29
| | | | | | It does not make sense to copy is_avc without copying this as well. This patch should not change anything for now, but will have an effect in later commits.
* h264: move freeing the escaped RBSP buffer to free_context()Anton Khirnov2015-04-29
| | | | | 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.
* h264: eliminate ff_h264_set_parameter_from_sps()Anton Khirnov2015-04-29
| | | | | | | | | | | | | | 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.
* h264: move context reinit lower down in update_thread_context()Anton Khirnov2015-04-29
| | | | | It uses some fields from the SPS, which is not yet set where the reinit is called currently.
* h264: move the DPB init/uninit to init_context()/free_context()Anton Khirnov2015-04-29
| | | | | | | | | | Currently, the DPB is initialized in alloc_tables() and uninitialized in free_tables(), but those functions manage frame size-dependent variables, so DPB management does not logically belong in there. Since we want the init/uninit to happen exactly once per the context lifetime, init_context()/free_context() are the proper place for this code.
* h264: drop H264Context.ouputed_pocAnton Khirnov2015-04-29
| | | | It is only set, but never used for anything.
* h264: drop needs_reallocAnton Khirnov2015-04-29
| | | | It is not needed anymore since switching to refcounted frames.
* lavc: Replace av_dlog and tprintf with internal macrosVittorio Giovara2015-04-19
|
* h264: disable ER by defaultAnton Khirnov2015-04-03
| | | | | The way it is currently designed is fundamentally unsafe and cannot be reasonably fixed without completely rewriting it.
* h264: move [uv]linesize to the per-slice contextAnton Khirnov2015-03-21
| | | | | | 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.
* h264: use a smaller struct for the ref listsAnton Khirnov2015-03-21
| | | | | | 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.
* h264: drop the now unused per-slice H264ContextsAnton Khirnov2015-03-21
|