summaryrefslogtreecommitdiff
path: root/libavcodec/h264_refs.c
Commit message (Collapse)AuthorAge
* cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* 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_refs: reorder functions to avoid forward declarationsAnton Khirnov2016-04-24
|
* 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 pred weight table parsing into a separate fileAnton Khirnov2016-03-28
| | | | This will allow decoupling the parser from the decoder.
* cosmetics: Drop empty comment linesDiego Biurrun2016-02-18
|
* h264_refs: Remove broken trace debug codeDiego Biurrun2016-01-03
|
* h264: improve behaviour with invalid reference listsAnton Khirnov2016-01-01
| | | | | | | | | | | | | 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-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: make sure the current picture is not made a long ref multiple timesAnton Khirnov2015-06-27
| | | | | | 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-29
|
* lavc: Replace av_dlog and tprintf with internal macrosVittorio Giovara2015-04-19
|
* 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: use a separate GetBitContext for slice dataAnton Khirnov2015-03-21
|
* h264: move the ref lists variables into the per-slice contextAnton Khirnov2015-03-21
|
* h264: move the slice type variables into the per-slice contextAnton Khirnov2015-03-21
|
* h264: split weighted pred-related vars into per-slice contextAnton Khirnov2015-03-21
|
* cosmetics: Write NULL pointer inequality checks more compactlyGabriel Dume2014-08-15
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-15
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* More correct printf format specifiersDiego Biurrun2014-04-02
| | | | This avoids compiler warnings about argument and specifier type mismatch.
* mpegvideo: move mpegvideo formats-related defines to mpegutils.hVittorio Giovara2014-03-16
|
* h264: move relevant fields from Picture to H264PictureVittorio Giovara2014-03-16
|
* h264: fix clang warning about uninitialized variableVittorio Giovara2014-02-28
|
* h264: update flag name in ff_h264_decode_ref_pic_list_reordering()Vittorio Giovara2014-02-28
| | | | This is the name used in the specifications.
* h264: Refactor ff_h264_decode_ref_pic_list_reorderingLuca Barbato2014-02-13
| | | | In preparation for MVC support.
* h264: prevent two matching fields from being both a short/long ref combinationAnton Khirnov2014-01-18
| | | | | | | 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-27
| | | | | | 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-18
| | | | data[0] may be NULL for valid frames with hwaccel pixel formats.
* avcodec: Remove some commented-out debug cruftDiego Biurrun2013-08-20
|
* h264_refs: Do not print check_opcodes() return valueDiego Biurrun2013-04-27
| | | | | | 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-21
| | | | This way it does not look like a constant.
* h264_refs: cosmetics, reformatAnton Khirnov2013-03-11
|
* lavc decoders: work with refcounted frames.Anton Khirnov2013-03-08
|
* Remove unnecessary dsputil.h #includesDiego Biurrun2013-02-26
|
* h264: deMpegEncContextizeAnton Khirnov2013-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the changes are just trivial are just trivial replacements of fields from MpegEncContext with equivalent fields in H264Context. Everything in h264* other than h264.c are those trivial changes. The nontrivial parts are: 1) extracting a simplified version of the frame management code from mpegvideo.c. We don't need last/next_picture anymore, since h264 uses its own more complex system already and those were set only to appease the mpegvideo parts. 2) some tables that need to be allocated/freed in appropriate places. 3) hwaccels -- mostly trivial replacements. for dxva, the draw_horiz_band() call is moved from ff_dxva2_common_end_frame() to per-codec end_frame() callbacks, because it's now different for h264 and MpegEncContext-based decoders. 4) svq3 -- it does not use h264 complex reference system, so I just added some very simplistic frame management instead and dropped the use of ff_h264_frame_start(). Because of this I also had to move some initialization code to svq3. Additional fixes for chroma format and bit depth changes by Janne Grunau <janne-libav@jannau.net> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* h264: fix ff_generate_sliding_window_mmcos() prototype.Anton Khirnov2013-01-14
| | | | | | | It's been returning an error value since bad446e251405dc250c3cbee199072e083a1e4b9 Also check for the errors it returns.
* h264: don't clobber mmco opcode tables for non-first slice headers.Ronald S. Bultje2013-01-14
| | | | | | | | | | | | | | | | | | | | | Clobbering these tables will temporarily clobber the template used as a basis for other threads to start decoding from. If the other decoding thread updates from the template right at that moment, subsequent threads will get invalid (or, usually, none at all) mmco tables. This leads to invalid reference lists and subsequent decode failures. Therefore, instead, decode the mmco tables only for the first slice in a field or frame. For other slices, decode the bits and ensure they are identical to the mmco tables in the first slice, but don't ever clobber the context state. This prevents other threads from using a clobbered/invalid template as starting point for decoding, and thus fixes decoding in these cases. This fixes occasional (~1%) failures of h264-conformance-mr1_bt_a with frame-multithreading enabled. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* h264_refs: Fix debug tprintf argument typesDiego Biurrun2012-09-27
|
* h264: fix frame reordering code.Ronald S. Bultje2011-12-03
| | | | | Fixes fate-h264-conformance-{mr2_tandberg_e,mr3_tandberg_b} without requiring -strict 1.
* lavc: replace references to deprecated AVCodecContext.error_recognition to ↵Dustin Brody2011-10-22
| | | | | | use AVCodecContext.err_recognition Signed-off-by: Anton Khirnov <anton@khirnov.net>
* h264: correct the check for invalid long term frame index in MMCO decodeJeff Downs2011-08-19
| | | | | | | | The current check on MMCO parameters prohibits a "max long term frame index plus 1" of 16 (frame idx of 15) for the "set max long term frame index" MMCO. Fix this off-by-one error to allow the full range of legal values. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* h264: hide reference frame errors unless requestedDustin Brody2011-08-17
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* h264: add missing brackets.Ronald S. Bultje2011-08-12
| | | | This caused failure of a few fate tests.
* h264: propagate error return values for AV_LOG_ERROR-triggering eventsDustin Brody2011-08-09
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Eliminate FF_COMMON_FRAME macro.Diego Biurrun2011-07-11
| | | | | FF_COMMON_FRAME holds the contents of the AVFrame structure and is also copied to struct Picture. Replace by an embedded AVFrame structure in struct Picture.
* h264: do not print "too many references" warning for intra-only.Ronald S. Bultje2011-05-10
| | | | Fixes issue 2679.
* Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.Stefano Sabatini2011-05-02
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>