summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264dec.c
Commit message (Collapse)AuthorAgeFilesLines
* lavc: Add hardware config metadata for decoders supporting hardware outputMark Thompson2017-12-191-0/+28
| | | | | | | | | This includes a pointer to the associated hwaccel for decoders using hwaccels - these will be used later to implement the hwaccel setup without needing a global list. Also added is a new file listing all hwaccels as external declarations - this will be used later to generate the hwaccel list at configure time.
* h264dec: track the last seen value of x264_buildAnton Khirnov2017-07-261-0/+1
| | | | | | | | | | Do not use the one in the SEI directly as that is reset at certain points. Inspired by patches from Michael Niedermayer <michaelni@gmx.at> and Anton Mitrofanov <BugMaster@narod.ru>. CC: libav-stable@libav.org
* h264dec: initialize field_started to 0 on each decode callAnton Khirnov2017-03-121-0/+1
| | | | | | | | It might be incorrectly set to 1 if the previous call exited with an error. Bug-Id: 1019 CC: libav-stable@libav.org
* h264dec: fix dropped initial SEI recovery pointJohn Stebbins2017-02-241-1/+1
|
* golomb: Convert to the new bitstream readerDiego Biurrun2017-01-311-1/+1
|
* h264dec: export cropping information instead of handling it internallyAnton Khirnov2017-01-121-23/+3
|
* h264dec: be more explicit in handling container croppingAnton Khirnov2017-01-121-0/+3
| | | | | | | | | | | | | The current condition can trigger in cases where it shouldn't, with unexpected results. Make sure that: - container cropping is really based on the original dimensions from the caller - those dimenions are discarded on size change The code is still quite hacky and eventually should be deprecated and removed, with the decision about which cropping is used delegated to the caller.
* h264dec: make ff_h264_decode_init() staticAnton Khirnov2017-01-091-2/+2
| | | | It is not called from outside h264dec.c anymore.
* h264dec: make sure to only end a field if it has been startedAnton Khirnov2016-12-191-1/+2
| | | | | | | | Calling ff_h264_field_end() when the per-field state is not properly initialized leads to all kinds of undefined behaviour. CC: libav-stable@libav.org Bug-Id: 977 978 992
* pthread_frame: ensure the threads don't run simultaneously with hwaccelAnton Khirnov2016-12-191-1/+1
|
* h264dec: support broken files with mp4 extradata/annex b dataAnton Khirnov2016-10-021-1/+18
| | | | Bug-Id: 966
* h264dec: reset nb_slice_ctx_queued for hwaccel decodingAnton Khirnov2016-08-031-2/+3
| | | | | | Fixes hwaccel decoding of files with multiple slices. Found-By: Mark Thompson <sw@jkqxz.net>
* h264dec: do not call finish_setup() if we have not started a frameAnton Khirnov2016-07-201-1/+1
| | | | | Found-By: Jan Ruge <jan.s.ruge@gmail.com> Bug-Id: 952
* h264dec: handle zero-sized NAL units in get_last_needed_nal()Anton Khirnov2016-07-201-2/+9
| | | | | | | | The current code will ignore the init_get_bits() failure and do an invalid read from the uninitialized GetBitContext. Found-By: Jan Ruge <jan.s.ruge@gmail.com> Bug-Id: 952
* h264dec: make sure not to call finish_setup() more than once per frameAnton Khirnov2016-07-201-1/+1
| | | | It does not break anything currently, but should not be done anyway.
* h264: fix decoding multiple fields per packet with slice threadsAnton Khirnov2016-07-151-33/+14
| | | | | | | | | | | | | Since we only know whether a NAL unit corresponds to a new field after parsing the slice header, this requires reorganizing the calls to slice parsing, per-slice/field/frame init and actual decoding. In the previous code, the function for slice header decoding also immediately started a new field/frame as necessary, so any slices already queued for decoding would no longer be decodable. After this patch, we first parse the slice header, and if we determine that a new field needs to be started we decode all the queued slices.
* h264: eliminate decode_postinit()Anton Khirnov2016-07-151-165/+12
| | | | | | | | This function's purpose is not very well defined. Currently it does two (only marginally related) things: selecting the next output frame and calling ff_thread_finish_setup() for frame threading. The first of those more properly belongs under field_start(), while the second can be called directly from decode_nal_units().
* h264: handle frame recovery in h264_field_start()Anton Khirnov2016-06-211-18/+0
| | | | | | This is a more appropriate place for this. H264Context.recovery_frame is shared between frame threads, so modifying it where it is right now is invalid.
* h264: discard slices of redundant pictures right after parsing the slice headerAnton Khirnov2016-06-211-2/+4
| | | | | Going through the whole decoder initialization process for a slice we are not going to decode is unnecessary and potentially dangerous.
* h264: call the hwaccel frame_start() from h264_field_start()Anton Khirnov2016-06-211-4/+0
| | | | This is a more appropriate place for it.
* h264: fix the check for mixed IDR/non-IDR slicesAnton Khirnov2016-06-211-6/+0
|
* h264: drop tests whether the codec id is AV_CODEC_ID_H264Anton Khirnov2016-06-211-5/+3
| | | | Those are unused remnants of the old SVQ3 code.
* h264: add H264_ prefix to the NAL unit typesAnton Khirnov2016-06-211-25/+25
| | | | | This will prevent conflicts e.g. in code that deals with both h264 and hevc.
* h264: move the parameter set definitions to a new header fileAnton Khirnov2016-06-211-0/+1
| | | | | The PS parsing code is independent from the decoder, so it makes more sense for it to have its own separate header.
* h264: create a new header for common h264 definitionsAnton Khirnov2016-06-211-0/+1
| | | | | | 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.
* h264: rename h264.[ch] to h264dec.[ch]Anton Khirnov2016-06-211-0/+982
This is more consistent with the naming of other decoders.
OpenPOWER on IntegriCloud