summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
Commit message (Collapse)AuthorAge
* cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* Drop pointless assert.h #includesDiego Biurrun2016-05-03
|
* h264: eliminate max_contextsAnton Khirnov2016-04-24
| | | | It is always equal to nb_slice_ctx.
* h264: allocate some tables per slice contexts, not threadsAnton Khirnov2016-04-24
| | | | | This is more correct and avoids wasting space when frame threading is used.
* 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: 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: remove a stale commentAnton Khirnov2016-04-24
| | | | This comment used to apply to code that was removed.
* 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: stop testing whether the reference count changes in ff_set_ref_count()Anton Khirnov2016-04-24
| | | | It is no longer necessary after 741b494fa8cd28a7d096349bac183893c236e3f9
* 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_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
|
* h264: reimplement 3aa661ec5 in a more explicit wayAnton Khirnov2016-03-28
| | | | | | Instead of handling the problem inside NAL decoding code, add a higher level wrapper function. This should be more robust against future changes (and easier to read).
* h264: move ff_h264_check_intra[4x4]_pred_mode() to h264_parseAnton Khirnov2016-03-28
| | | | It is shared with svq3.
* h264: remove the svq3-specific codeAnton Khirnov2016-03-28
|
* h264: factor out pred weight table parsing into a separate fileAnton Khirnov2016-03-28
| | | | This will allow decoupling the parser from the decoder.
* lavc: add profiles to AVCodecDescriptorAnton Khirnov2015-12-12
| | | | | The profiles are a property of the codec, so it makes sense to export them through AVCodecDescriptors, not just the codec implementations.
* h264: derive the delay from the level when it's not presentAnton Khirnov2015-12-06
| | | | | | | | | | | Fall back to maximum DPB size if the level is unknown. This should be more spec-compliant and does not depend on the caller setting has_b_frames before opening the decoder. The old behaviour, when the delay is supplied by the caller setting has_b_frames, can still be obtained by setting strict_std_compliance below normal.
* 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>
* cabac: Make CABAC states hardcodedAnton Khirnov2015-10-08
| | | | | | | There is not much reason to generate such a small table at runtime. Signed-off-by: Derek Buitenhuis <derekb@vimeo.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* h264: Do not print an error when the buffer has to be refilledLuca Barbato2015-08-06
| | | | Partially amends 9469370fb32679352e66826daf77bdd2e6f067b5
* h264: Use AVERROR return codes instead of -1Jake Sebastian-Jones2015-08-05
| | | | | | And report why it fails. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* h264: fix AVDISCARD_NONKEY for some interlaced contentJohn Högberg2015-07-27
| | | | | | | | | When skip_frame is set to _NONKEY the decoder skips everything except intra slices, which breaks frames that consist of an intra field together with any other field type; half the frame becomes garbage. This patch fixes the issue by letting non-intra slices through if they're part of a keyframe. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-27
| | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* 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: 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: 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: drop a comment that carries no useful informationAnton Khirnov2015-04-29
|
* 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 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: reset the private data in init_thread_copy()Anton Khirnov2015-04-05
| | | | | | | | | | | The generic code copies the main context's private data to all the others. However that is quite dangerous, as it might end up copying some pointers that are or will become invalid. Since everything we actually need will be copied later in update_thread_context(), it's safest to zero the private data in init_thread_copy(), so it works the same way as init for the main context.
* h264: remove a commented out nonsense lineAnton Khirnov2015-04-05
|