summaryrefslogtreecommitdiff
path: root/libavcodec/h264.h
Commit message (Collapse)AuthorAge
* h264: parse frame packing arrangement SEI messages and save relevant ↵Vittorio Giovara2013-12-09
| | | | stereo3d information
* h264: wait for initial complete frame before outputing framesJohn Stebbins2013-10-31
| | | | | | | | This can be optionally disabled whith the "output_corrupt" flags option. When in "output_corrupt" mode, incomplete frames are signalled through AVFrame.flags FRAME_FLAG_INCOMPLETE_FRAME. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavc: Convert some remaining strides to ptrdiff_tRonald S. Bultje2013-10-15
|
* h264_parser: Fix POC parsing for the case where MMCO_RESET is present.Yusuke Nakamura2013-10-15
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* h264_parser: Set field_order and picture_structure.Yusuke Nakamura2013-05-24
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* h264: fully support cropping.Anton Khirnov2013-04-19
| | | | | | Based on a patch by Vittorio Giovara <vittorio.giovara@gmail.com> Fixes Bug 378.
* h264: add a parameter to the CHROMA444 macro.Anton Khirnov2013-03-21
| | | | This way it does not look like a constant.
* h264: add a parameter to the CHROMA422 macro.Anton Khirnov2013-03-21
| | | | This way it does not look like a constant.
* h264: add a parameter to the CABAC macro.Anton Khirnov2013-03-21
| | | | This way it does not look like a constant.
* h264: add a parameter to the FIELD_OR_MBAFF_PICTURE macro.Anton Khirnov2013-03-21
| | | | This way it does not look like a constant.
* h264: add a parameter to the FIELD_PICTURE macro.Anton Khirnov2013-03-21
| | | | This way it does not look like a constant.
* h264: add a parameter to the FRAME_MBAFF macro.Anton Khirnov2013-03-21
| | | | This way it does not look like a constant.
* h264: add a parameter to the MB_FIELD macro.Anton Khirnov2013-03-21
| | | | This way it does not look like a constant.
* h264: add a parameter to the MB_MBAFF macro.Anton Khirnov2013-03-21
| | | | This way it does not look like a constant.
* h264: make ff_h264_frame_start static.Anton Khirnov2013-03-21
| | | | It is not called from outside h264.c
* lavc decoders: work with refcounted frames.Anton Khirnov2013-03-08
|
* Add missing error_resilience includes to files that use ERDiego Biurrun2013-03-07
|
* Remove pointless av_cold attributes in header filesDiego Biurrun2013-02-23
| | | | | | The init functions marked as av_cold have to be executed in any case, so there is no gain from trying to mark paths leading to such functions as unlikely.
* h264/svq3: Stop using draw_edgesRonald S. Bultje2013-02-19
| | | | | | | | | | | Instead, only extend edges on-demand when the motion vector actually crosses the visible decoded area using ff_emulated_edge_mc(). This changes decoding time for cathedral from 8.722sec to 8.706sec, i.e. 0.2% faster overall. More generally (VP8 uses this also), low-motion content gets significant speed improvements, whereas high-motion content tends to decode in approximately the same time. Signed-off-by: Martin Storsjö <martin@martin.st>
* h264: Don't store intra pcm samples in h->mbRonald S. Bultje2013-02-19
| | | | | | | | | Instead, keep them in the bitstream buffer until we read them verbatim, this saves a memcpy() and a subsequent clearing of the target buffer. decode_cabac+decode_mb for a sample file (CAPM3_Sony_D.jsv) goes from 6121.4 to 6095.5 cycles, i.e. 26 cycles faster. Signed-off-by: Martin Storsjö <martin@martin.st>
* 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: remove silly macrosAnton Khirnov2013-02-06
| | | | | They serve no useful purpose and wreak all kind of havoc when h264.h is included elsewhere.
* dsputil: Separate h264chromaDiego Biurrun2013-02-06
|
* dsputil: Separate h264 qpelMans Rullgard2013-01-24
| | | | | | | | | | The sh4 optimizations are removed, because the code is 100% identical to the C code, so it is unlikely to provide any real practical benefit. Signed-off-by: Diego Biurrun <diego@biurrun.de> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* Drop DCTELEM typedefDiego Biurrun2013-01-22
| | | | | | It does not help as an abstraction and adds dsputil dependencies. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* h264: avoid pointless copying of ref listsAnton Khirnov2013-01-18
| | | | | | | | ref_list is constructed from other fields per slice when needed, so do not copy it for both frame and slice threading. default_ref_list is constructed per frame and still needs to be copied to per-slice contexts for slice threading, but a copy is not needed for frame threading.
* 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: support frame parameter changes during frame-mtJanne Grunau2012-12-18
| | | | Fixes CVE-2012-2782.
* h264: increase dist_scale_factor for up to 32 referencesJanne Grunau2012-12-18
| | | | | Compute dist_scale_factor_field only for MBAFF since that is the only case in which it is used.
* h264: prevent decoding of slice NALs in extradataJanne Grunau2012-12-18
| | | | | | | | It is not posible to call get_buffer during frame-mt codec initialization. Libavformat might pass huge amounts of data as extradata after parsing broken files. The 'extradata' for the fuzzed sample sample_varPAR_s5374_r001-02.avi is 2.8M large and contains multiple slices.
* mpegvideo: treat delayed pictures as usedJanne Grunau2012-12-13
| | | | | | This requires to move the avcodec_default_free_buffers() call to ff_MPV_common_end() since otherwise delayed pictures would get freed during a size change.
* h264: set parameters from SPS whenever it changesJanne Grunau2012-12-13
| | | | | Fixes a crash in the fuzzed sample sample_varPAR.avi_s26638 with alternating bit depths.
* h264: add a pointer for weighted prediction temporary bufferJanne Grunau2012-12-07
| | | | | Reusing MpegEncContext's obmc_scratchpad for this becomes a mess with adaptive frame-mt.
* h264: K&R formatting cosmetics for header files (part I/II)Diego Biurrun2012-05-10
|
* h264: Factorize declaration of mb_sizes array.Diego Biurrun2012-04-05
|
* h264: Make ff_h264_decode_end() static, it is not used externally.Diego Biurrun2012-03-30
| | | | Also drop the now unnecessary ff_ prefix from its name.
* h264: disallow constrained intra prediction modes for luma.Ronald S. Bultje2012-02-09
| | | | | | | | | | | Conversion of the luma intra prediction mode to one of the constrained ("alzheimer") ones can happen by crafting special bitstreams, causing a crash because we'll call a NULL function pointer for 16x16 block intra prediction, since constrained intra prediction functions are only implemented for chroma (8x8 blocks). Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* Revert "h264: skip start code search if the size of the nal unit is known"Janne Grunau2011-12-19
| | | | This reverts commit 87eebb3454ff0cd6af6ebf9e1d31bdfd1c3b601b.
* h264: skip start code search if the size of the nal unit is knownJanne Grunau2011-12-18
| | | | | | | | Start code emulation prevention is only required in Annex B bytestream packed NAL units. For other coding formats the size is already known. Looking for a start code prefix can result in false positives like in http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4 which has a false positive in the SPS.
* error_resilience: use the ER_ namespaceLuca Barbato2011-12-13
| | | | | | Add the namespace to {AC_,DC_,MV_}{END,ERROR} macros Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* doxygen: misc consistency, spelling and wording fixesDiego Biurrun2011-12-12
|
* h264: fix frame reordering code.Ronald S. Bultje2011-12-03
| | | | | Fixes fate-h264-conformance-{mr2_tandberg_e,mr3_tandberg_b} without requiring -strict 1.
* h264: improve calculation of codec delay.Ronald S. Bultje2011-11-05
| | | | | | Fixes the following conformance suite samples: HCBP1_HHI_A.264, HCBP2_HHI_A.264, HCMP1_HHI_A.264 (main) HCHP1_HHI_B.264, HCHP2_HHI_A.264, HCHP3_HHI_A.264 (frext)
* h264: 4:2:2 intra decoding supportBaptiste Coudurier2011-10-21
| | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* h264: move fill_decode_neighbors()/fill_decode_caches() to h264_mvpred.hDiego Biurrun2011-07-14
| | | | This fixes a bunch of unused function warnings.
* h264: move decode_mb_skip() from h264.h to h.264_mvpred.hDiego Biurrun2011-07-12
| | | | This resolves a circular dependency between the headers.
* h264: move h264_mvpred.h include.Ronald S. Bultje2011-07-12
| | | | | | | | Fixes the following compile error with darwin/gcc-4.2.1: In file included from libavcodec/error_resilience.c:33: libavcodec/h264.h: In function ‘decode_mb_skip’: libavcodec/h264.h:773: error: ‘always_inline’ function could not be inlined in call to ‘pred_pskip_motion’: the function body must appear before caller libavcodec/h264.h:1334: error: called from here
* 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.
* H.264: merge fill_rectangle into P-SKIP MV prediction, to match B-SKIPJason Garrett-Glaser2011-07-08
|