summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
Commit message (Collapse)AuthorAge
...
* h264: check one context_init() allocationVittorio Giovara2013-08-10
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* h264: use explicit variable names for *_field_flagVittorio Giovara2013-08-10
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* h264: return meaningful valuesVittorio Giovara2013-08-10
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* vdpau: remove old-style decodersRémi Denis-Courmont2013-08-05
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avcodec: Add output_picture_number to AVCodecParserContextYusuke Nakamura2013-08-02
| | | | | | Set output_picture_number in H.264 parser. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* h264: K&R formatting cosmeticsDiego Biurrun2013-07-27
|
* h264_parser: Set field_order and picture_structure.Yusuke Nakamura2013-05-24
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* h264: Drop unused variableDiego Biurrun2013-04-22
|
* dsputil: Remove dct_bitsRonald S. Bultje2013-04-19
| | | | | | | dct_bits is never set except in h264, where it is never used, thus remove it. Signed-off-by: Martin Storsjö <martin@martin.st>
* h264: fully support cropping.Anton Khirnov2013-04-19
| | | | | | Based on a patch by Vittorio Giovara <vittorio.giovara@gmail.com> Fixes Bug 378.
* h264: Only initialize dsputil if error resilience is enabledRonald S. Bultje2013-04-10
| | | | | | | It is only used for error resilience. This allows building the h264 decoder without dsputil, if error resilience is disabled. Signed-off-by: Martin Storsjö <martin@martin.st>
* h264: Integrate clear_blocks calls with IDCTRonald S. Bultje2013-04-10
| | | | | | | | | The non-intra-pcm branch in hl_decode_mb (simple, 8bpp) goes from 700 to 672 cycles, and the complete loop of decode_mb_cabac and hl_decode_mb (in the decode_slice loop) goes from 1759 to 1733 cycles on the clip tested (cathedral), i.e. almost 30 cycles per mb faster. Signed-off-by: Martin Storsjö <martin@martin.st>
* h264: Clear the mb members via memset instead of using dsputilMartin Storsjö2013-04-10
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* hwaccel: fix use with frame based multithreadingJanne Grunau2013-03-26
| | | | | | | | | | | | Allows use of AVHWAccel based decoders with frame based multithreading. The decoders will be forced into an non-concurrent mode by delaying ff_thread_finish_setup() calls after decoding of the current frame is finished. This wastes memory by unnecessarily using multiple threads and thus copies of the decoder context but allows seamless switching between hardware accelerated and frame threaded software decoding when the hardware decoder does not support the stream.
* h264: Make it possible to compile without error_resilienceRonald S. Bultje2013-03-26
| | | | | | | | | | Error resilience is enabled by the h264 decoder, unless explicitly disabled. --disable-everything --enable-decoder=h264 will produce a h264 decoder with error resilience enabled, while --disable-everything --enable-decoder=h264 --disable-error-resilience will produce a h264 decoder with error resilience disabled. Signed-off-by: Martin Storsjö <martin@martin.st>
* h264: Remove an unused variableMartin Storsjö2013-03-25
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* h264: remove redundant freeing of DPB in h264_decode_endAnton Khirnov2013-03-21
| | | | free_tables() frees it already.
* 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: merge common_init() into ff_h264_decode_init.Anton Khirnov2013-03-21
| | | | There is no point in keeping those separate.
* h264: make ff_h264_frame_start static.Anton Khirnov2013-03-21
| | | | It is not called from outside h264.c
* h264: fix bit depth changes with frame threadingJanne Grunau2013-03-20
| | | | | | | | | AVCodecContext.bits_per_raw_sample is updated from the previous thread in the generic update function before the codec specific update_thread function is called. The check for reinitialization of dsp functions uses bits_per_raw_sample. When called from update_thread_context it will be already at the current value and the dsp functions aren't updated if only the bit depth changes.
* h264: allocate hwaccel privdata after the frame bufferHendrik Leppkes2013-03-19
| | | | | | | | | | This ensures the hwaccel privdata does not leak when a frame buffer could not be allocated (and toggle the assert when the frame is re-used). Having no frame buffer available is quite common when using the DXVA2 hwaccel in situations where the DXVA2 renderer is being re-allocated, for example when moving between displays. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avcodec: av_log_missing_feature(1) ---> avpriv_request_sample()Diego Biurrun2013-03-13
|
* avcodec: av_log_ask_for_sample() ---> avpriv_request_sample()Diego Biurrun2013-03-13
|
* cabac: remove unused argument of ff_init_cabac_states()Michael Niedermayer2013-03-13
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* Add informative messages to av_log_ask_for_sample calls lacking themDiego Biurrun2013-03-12
|
* h264: check that DPB is allocated before accessing it in flush_dpb()Anton Khirnov2013-03-11
|
* h264: remove a useless svq3 conditionAnton Khirnov2013-03-11
| | | | The svq3 decoder does not call ff_h264_frame_start() anymore.
* Replace some forgotten instances of PIX_FMT_* with AV_PIX_FMT_*.Anton Khirnov2013-03-08
|
* lavc: stop setting AVFrame.motion_subsample_log2Anton Khirnov2013-03-08
| | | | | It is not used inside lavc anywhere and now it makes no sense to export it.
* lavc decoders: work with refcounted frames.Anton Khirnov2013-03-08
|
* Add missing error_resilience includes to files that use ERDiego Biurrun2013-03-07
|
* h264: Integrate draw_horiz_band into ff_h264_draw_horiz_bandRonald S. Bultje2013-03-07
| | | | | | | | | | This makes the decoder independent of mpegvideo. This copy of the draw_horiz_band code is simplified compared to the "generic" mpegvideo one which still has a number of special cases for different codecs. Signed-off-by: Martin Storsjö <martin@martin.st>
* h264: Rename the jpeg_420 pixfmt list to match the common naming structureMartin Storsjö2013-03-07
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* lavc: Split out ff_hwaccel_pixfmt_list_420[] over individual codecsRonald S. Bultje2013-03-06
| | | | | | | | | Not all hwaccels implement all codecs, so using one single list for multiple such codecs means some codecs will be represented in the list, even though they don't actually handle that codec. Copying specific lists in each codec fixes that. Signed-off-by: Martin Storsjö <martin@martin.st>
* h264: check for luma and chroma bit dept being equalLuca Barbato2013-03-05
| | | | | | | | | | The decoder assumes a single bit depth for all the planes while the specification allows different bit depths for luma and chroma. Avoid the possible problems described in CVE-2013-2277 CC: libav-stable@libav.org
* h264: set ref_count to 0 for intra slices.Anton Khirnov2013-03-02
| | | | CC:libav-stable@libav.org
* h264: on reference overflow, reset the reference count to 0, not 1.Anton Khirnov2013-03-02
| | | | | | | Since decode_slice_header() returns before the reference lists are constructed, there are zero valid references. CC:libav-stable@libav.org
* h264: do not copy ref count/ref2frm when updating per-frame contextAnton Khirnov2013-03-02
| | | | They are filled in decode_slice_header() anyway.
* 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: Add add_pixels4/8() to h264dsp, and remove add_pixels4 from dsputilRonald S. Bultje2013-02-19
| | | | | | | | | These functions are mostly H264-specific (the only other user I can spot is bink), and this allows us to special-case some functionality for H264. Also remove the 16-bit-coeff with >8bpp versions (unused) and merge the duplicate 32-bit-coeff for >8bpp (identical). 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>
* mpegvideo: split ff_draw_horiz_band().Anton Khirnov2013-02-15
| | | | Split out dependency on MpegEncContext.