summaryrefslogtreecommitdiff
path: root/libavcodec/h264.h
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: 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: remove unused H264SliceContext.rbsp_bufferAnton Khirnov2016-04-24
|
* h264: merge ff_h264_free_context() into h264_decode_end()Anton Khirnov2016-04-24
| | | | It is no longer called from outside the h264 decoder.
* 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_refs: make the H264Context const where possibleAnton Khirnov2016-04-24
|
* h264_parser: remove the remaining dependencies on the h264 decoderAnton Khirnov2016-04-24
|
* h264: decouple extradata parsing from the decoderAnton Khirnov2016-04-24
| | | | This will allow decoupling the parser from the decoder.
* 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_parser: switch to h2645_parse for NAL unescapingAnton Khirnov2016-04-24
| | | | Remove now unused ff_h264_decode_nal().
* h264: Add missing ff_ prefix to internally visible h264_init_dequant_tables()Diego Biurrun2016-03-30
|
* h264: switch to h2645_parse for NAL parsingAnton Khirnov2016-03-28
|
* svq3: drop the build dependency on the h264 decoderAnton Khirnov2016-03-28
|
* h264: move ff_h264_check_intra[4x4]_pred_mode() to h264_parseAnton Khirnov2016-03-28
| | | | It is shared with svq3.
* h264: factor out pred weight table parsing into a separate fileAnton Khirnov2016-03-28
| | | | This will allow decoupling the parser from the decoder.
* h264: Add an AVClass pointer to H264ContextMichael Niedermayer2016-02-22
| | | | | | | 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>
* 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.
* h264: Run VLC init under pthread_onceDerek Buitenhuis2015-10-14
| | | | | | | 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>
* h264: Add support for Closed Caption exportKieran Kunhya2015-07-17
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* h264: Parse registered data SEI message and AFD valueVittorio Giovara2015-06-30
| | | | | | Partially based on code by Marton Balint and Kieran Kunhya. 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: use properly allocated AVFramesAnton Khirnov2015-04-29
|
* h264: embed the DPB in the contextAnton Khirnov2015-04-29
| | | | | It now has a fixed size and is initialized only once, so there is no point in allocating it separately.
* 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: 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
|
* h264: use the main H264Context as the parent for all slice contextsAnton Khirnov2015-03-21
| | | | There is now no need to have per-slice copies of the H264Context.
* h264: move rbsp_buffer into the per-slice contextAnton Khirnov2015-03-21
|
* h264: move remaining ER stuff into the per-slice contextAnton Khirnov2015-03-21
|
* h264: move top_borders into the per-slice contextAnton Khirnov2015-03-21
| | | | | Also change the method for allocating to the same one as used by edge_emu_buffer.
* h264: move the scratch buffers into the per-slice contextAnton Khirnov2015-03-21
| | | | | | | 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.
* h264_loopfilter: constify all uses of H264ContextAnton Khirnov2015-03-21
| | | | | All the variables modified by this code are either per-MB arrays or have been moved to the per-slice context
* h264_cavlc: constify all uses of H264ContextAnton Khirnov2015-03-21
| | | | | All the variables modified by this code are either per-MB arrays or have been moved to the per-slice context
* h264_cabac: constify all uses of H264ContextAnton Khirnov2015-03-21
| | | | | All the variables modified by this code are either per-MB arrays or have been moved to the per-slice context
* h264.c: constify all uses of H264Context in slice and lower-level functionsAnton Khirnov2015-03-21
| | | | | All the variables modified by this code are either per-MB arrays or have been moved to the per-slice context