summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_refs.c
Commit message (Collapse)AuthorAgeFilesLines
* h264_refs: validate the SPS pointer in ff_h264_execute_ref_pic_marking()Sean McGovern2017-05-091-0/+7
| | | | | Bug-Id: 1036 CC: libav-stable@libav.org
* golomb: Convert to the new bitstream readerDiego Biurrun2017-01-311-1/+1
|
* h264: Kill broken disabled cruftDiego Biurrun2016-08-171-9/+0
|
* h264: do not pass H264Context to h264_slice_header_parse()Anton Khirnov2016-06-211-9/+9
| | | | | This should make it more clear that this function does not need any decoder-global state other than the parameter sets.
* h264: add H264_ prefix to the NAL unit typesAnton Khirnov2016-06-211-1/+1
| | | | | This will prevent conflicts e.g. in code that deals with both h264 and hevc.
* 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-1/+1
| | | | This is more consistent with the naming of other decoders.
* h264: store {curr,max}_pic_num in the per-slice contextAnton Khirnov2016-06-211-5/+5
| | | | | | | While the value of those variables will be constant for the whole frame, they are only used in two functions called from slice header decoding. Moving them to the per-slice context allows us to make the H264Context passed to slice_header_parse() constant.
* h264: Drop unused function check_opcodes()Diego Biurrun2016-06-141-12/+0
|
* h264: postpone generating the implicit MMCOsAnton Khirnov2016-06-121-17/+16
| | | | | | Do it right before the MMCOs are applied to the DPB. This will allow moving the frame_start() call out of the slice header parsing, since generating the implicit MMCOs needs to be done after frame_start().
* h264: decode the MMCOs into per-slice contextsAnton Khirnov2016-06-121-30/+13
| | | | | | They are stored in the slice header, so technically they are per-slice (though they must be the same in every slice). This will simplify the following commits.
* h264: rename mmco_index to nb_mmcoAnton Khirnov2016-06-121-18/+18
| | | | | The variable stores the number of mmco entries, so the current name is misleading.
* h264: split reading the ref list modifications and actually building the ref ↵Anton Khirnov2016-06-121-88/+109
| | | | | | | | list This will allow postponing the reference list construction (and by consequence some other functions, like frame_start) until the whole slice header has been parsed.
* h264: call ff_h264_fill_mbaff_ref_list() when constructing the normal ref listAnton Khirnov2016-06-121-25/+28
| | | | There is no real reason to call it separately.
* h264: move initialising the explicit pred weight table for MBAFFAnton Khirnov2016-06-121-7/+0
| | | | | | | Currently it's done in the code that initialises the ref list for MBAFF, which is not a logical place for it. Move it to the function that parses the pred table from the bitstream, which is analogous to what is done for the implicit weight table as well.
* h264: drop an outdated commentAnton Khirnov2016-06-121-1/+1
|
* cosmetics: Fix spelling mistakesVittorio Giovara2016-05-041-2/+2
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* h264_refs: remove an unused parameter from ff_h264_fill_mbaff_ref_list()Anton Khirnov2016-04-241-1/+1
|
* h264_refs: make the H264Context const where possibleAnton Khirnov2016-04-241-7/+8
|
* h264_refs: reorder functions to avoid forward declarationsAnton Khirnov2016-04-241-36/+33
|
* h264: factor out calculating the POC count into a separate fileAnton Khirnov2016-04-241-1/+1
| | | | This will allow decoupling the parser from the decoder.
* h264: decouple h264_ps from the h264 decoderAnton Khirnov2016-04-241-4/+4
| | | | | | | | | 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 pred weight table parsing into a separate fileAnton Khirnov2016-03-281-4/+4
| | | | This will allow decoupling the parser from the decoder.
* cosmetics: Drop empty comment linesDiego Biurrun2016-02-181-1/+0
|
* h264_refs: Remove broken trace debug codeDiego Biurrun2016-01-031-16/+0
|
* h264: improve behaviour with invalid reference listsAnton Khirnov2016-01-011-1/+4
| | | | | | | | | | | | | Before 741b494fa8cd28a7d096349bac183893c236e3f9, when the reference list modification description was invalid, the code would substitute the corresponding reference from the initial ("default") reference list. After that commit, it will just return an error. Since there are apparently invalid samples in the wild that used to play fine with the old code, it is a good idea to re-add some sort of error resilience here. So, when the reference list modification results in a missing frame, substitute a previous reference frame for it. The relevant sample again decodes fine with the same output as previously.
* h264: eliminate default_ref_listAnton Khirnov2015-12-061-25/+21
| | | | | | | | | | | | | 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: make sure the current picture is not made a long ref multiple timesAnton Khirnov2015-06-271-0/+9
| | | | | | Fixes possible invalid reads, once one of those refs is freed, but the others remain. CC: libav-stable@libav.org
* h264: use properly allocated AVFramesAnton Khirnov2015-04-291-9/+9
|
* lavc: Replace av_dlog and tprintf with internal macrosVittorio Giovara2015-04-191-2/+2
|
* h264: use a smaller struct for the ref listsAnton Khirnov2015-03-211-43/+47
| | | | | | 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: use a separate GetBitContext for slice dataAnton Khirnov2015-03-211-4/+4
|
* h264: move the ref lists variables into the per-slice contextAnton Khirnov2015-03-211-25/+25
|
* h264: move the slice type variables into the per-slice contextAnton Khirnov2015-03-211-3/+3
|
* h264: split weighted pred-related vars into per-slice contextAnton Khirnov2015-03-211-5/+5
|
* cosmetics: Write NULL pointer inequality checks more compactlyGabriel Dume2014-08-151-1/+1
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-151-1/+1
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* More correct printf format specifiersDiego Biurrun2014-04-021-2/+4
| | | | This avoids compiler warnings about argument and specifier type mismatch.
* mpegvideo: move mpegvideo formats-related defines to mpegutils.hVittorio Giovara2014-03-161-0/+1
|
* h264: move relevant fields from Picture to H264PictureVittorio Giovara2014-03-161-26/+26
|
* h264: fix clang warning about uninitialized variableVittorio Giovara2014-02-281-1/+1
|
* h264: update flag name in ff_h264_decode_ref_pic_list_reordering()Vittorio Giovara2014-02-281-6/+7
| | | | This is the name used in the specifications.
* h264: Refactor ff_h264_decode_ref_pic_list_reorderingLuca Barbato2014-02-131-64/+72
| | | | In preparation for MVC support.
* h264: prevent two matching fields from being both a short/long ref combinationAnton Khirnov2014-01-181-0/+2
| | | | | | | Fixes possible access to freed memory. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
* h264_refs: make sure not to write over the bounds of the default ref listAnton Khirnov2013-11-271-10/+17
| | | | | | Fixes invalid writes. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
* lavc: use buf[0] instead of data[0] in checks whether a frame is allocatedAnton Khirnov2013-11-181-3/+5
| | | | data[0] may be NULL for valid frames with hwaccel pixel formats.
* avcodec: Remove some commented-out debug cruftDiego Biurrun2013-08-201-1/+0
|
* h264_refs: Do not print check_opcodes() return valueDiego Biurrun2013-04-271-3/+3
| | | | | | The return value provides no useful information and removing the printing avoids the following warning: libavcodec/h264_refs.c:788:15: warning: 'i' may be used uninitialized in this function [-Wuninitialized]
* h264: add a parameter to the FIELD_PICTURE macro.Anton Khirnov2013-03-211-6/+6
| | | | This way it does not look like a constant.
* h264_refs: cosmetics, reformatAnton Khirnov2013-03-111-187/+213
|
OpenPOWER on IntegriCloud