Commit Graph

17521 Commits

Author SHA1 Message Date
Anton Khirnov da6be8fcec h264: add a parameter to the MB_FIELD macro.
This way it does not look like a constant.
2013-03-21 10:20:35 +01:00
Anton Khirnov 82313eaa34 h264: add a parameter to the MB_MBAFF macro.
This way it does not look like a constant.
2013-03-21 10:20:30 +01:00
Anton Khirnov 48d0fd2d62 h264: merge common_init() into ff_h264_decode_init.
There is no point in keeping those separate.
2013-03-21 10:20:10 +01:00
Anton Khirnov 25408b2a06 h264: make ff_h264_frame_start static.
It is not called from outside h264.c
2013-03-21 10:19:54 +01:00
Janne Grunau a157c7f2b8 h264: fix bit depth changes with frame threading
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.
2013-03-20 13:12:10 +01:00
Hendrik Leppkes c3ebfcd6e1 mpegvideo: allocate hwaccel privdata after the frame buffer
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>
2013-03-19 11:20:22 +01:00
Hendrik Leppkes 9c9ede44f3 h264: allocate hwaccel privdata after the frame buffer
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>
2013-03-19 11:20:00 +01:00
Hendrik Leppkes c71c80f53b pthread: unref already decoded frames when flushing the decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-19 11:19:08 +01:00
Hendrik Leppkes 4e70d66ded mpegvideo: fix allocation of the hwaccel_picture_private data
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-19 11:18:42 +01:00
Anton Khirnov 1516bf7af1 lavc: update the doxy for avcodec_decode_{video,audio} wtih refcounting. 2013-03-19 11:12:17 +01:00
Anton Khirnov c977039e58 lavc, lavfi: fix counting number of planes in AVBufferRef wrappers
Number of planes is not always equal to the number of components even
for formats marked with PIX_FMT_PLANAR -- e.g. NV12 has three components
in two planes.
2013-03-19 11:12:17 +01:00
Anton Khirnov ce0124acac mpeg12: do not fail on zero dimensions in the sequence header.
The total frame size is a combination of the 12 bits in the sequence
header and 2 more bits in the the sequence extension. While the
specification explicitly forbids the dimensions from the sequence header
from being 0 (thus ruling out multiples of 4096), such videos
apparrently exist in the wild so we should attempt to decode them.

Based on a patch by Michael Niedermayer <michaelni@gmx.at>

Fixes Bug 416.
2013-03-18 15:36:10 +01:00
Anton Khirnov 6552808014 lavc,lavfi: fix calculating the plane size in the AVBufferRef wrappers
It is supposed to be height * linesize, not width * linesize.
Thanks to Hendrik Leppkes for pointing out the bug.
2013-03-17 09:10:04 +01:00
Xi Wang eba1ff3130 atrac3: avoid oversized shifting in decode_bytes()
When `off' is 0, `0x537F6103 << 32' in the following expression invokes
undefined behavior, the result of which is not necessarily 0.

    (0x537F6103 >> (off * 8)) | (0x537F6103 << (32 - (off * 8)))

Avoid oversized shifting.

CC: libav-stable@libav.org

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-15 12:51:10 +01:00
Kostya Shishkov c42e262513 add support for Monkey's Audio versions from 3.93 2013-03-15 09:50:42 +01:00
Kostya Shishkov 9652d4fcfc ape: provide two additional bytes in buffer for old MAC versions
Range coder in 3.90-3.95 overread two bytes in the final normalize.
2013-03-15 09:50:42 +01:00
Kostya Shishkov b164d66e35 ape: make version-dependent decoding functions called via pointers
This will help in supporting old versions, e.g. version 3.93 uses the same
range coder but different predictor and version 3.82 uses different range
coder and predictor. Also this should not make decoding newer versions slower
by introducing additional checks on versions.
2013-03-15 09:50:42 +01:00
Janne Grunau b066d90211 vaapi: fix argument for ff_vaapi_common_end_frame call 2013-03-14 15:16:08 +01:00
Diego Biurrun 12e25ed284 avcodec: av_log_missing_feature(1) ---> avpriv_request_sample() 2013-03-13 21:20:12 +01:00
Diego Biurrun 6d97484d72 avcodec: av_log_ask_for_sample() ---> avpriv_request_sample() 2013-03-13 21:20:12 +01:00
Diego Biurrun 63d744e2be av_log_missing_feature() ---> avpriv_report_missing_feature() 2013-03-13 20:42:21 +01:00
Diego Biurrun f099d3d1d5 Add av_log_{ask_for_sample|missing_feature} replacements to libavutil
This allows reporting missing features and requesting samples from
all libraries in a standard way; with a simplified API.
2013-03-13 20:42:06 +01:00
Janne Grunau 91d4823f70 avpacket: copy side data type and size in av_dup_packet 2013-03-13 11:34:47 +01:00
Michael Niedermayer 0fe4b48540 cabac: remove unused argument of ff_init_cabac_states()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-13 09:14:05 +01:00
Nicolas George be40d6cc2b rawdec: fix a typo -- || instead of |
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-13 09:13:54 +01:00
Luca Barbato a8b6015823 dsputil: convert remaining functions to use ptrdiff_t strides
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-12 18:26:42 +01:00
Diego Biurrun a4472ac01e Add informative messages to av_log_ask_for_sample calls lacking them 2013-03-12 11:09:45 +01:00
Luca Barbato 202c2acc40 vda: remove async decoder leftovers
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-12 01:05:48 +01:00
Janne Grunau a2816230c5 avframe: call release_buffer only if it is set
AVCodecContext release_buffer() shall be NULL for audio codecs using
get_buffer. The backward compatibility code hence have to check before
calling it.
2013-03-11 18:58:47 +01:00
Anton Khirnov fce68c9355 pthread: unref the decoded but not returned frames on close.
Fixes memleaks when frame mt is used and the decoder is not flushed at
the end.
2013-03-11 18:30:35 +01:00
Anton Khirnov 555000c7d5 h264: check that DPB is allocated before accessing it in flush_dpb() 2013-03-11 18:30:31 +01:00
Anton Khirnov c2597c5a0a h264_refs: cosmetics, reformat 2013-03-11 18:24:56 +01:00
Anton Khirnov f08fefc4d0 h264: remove a useless svq3 condition
The svq3 decoder does not call ff_h264_frame_start() anymore.
2013-03-11 18:24:36 +01:00
Anton Khirnov 07054015cf mpegvideo: remove FMT_H264 2013-03-11 18:24:25 +01:00
Anton Khirnov ee8704916d mpegvideo: reindent 2013-03-11 18:24:16 +01:00
Anton Khirnov 19cac8e301 mpegvideo: remove useless references to h264 and svq3
The h264 decoder does not use mpegvideo anymore. The svq3 decoder only
uses ff_draw_horiz_band().
2013-03-11 18:24:06 +01:00
Anton Khirnov d6ed604cf4 lavc: remove disabled FF_API_IDCT cruft 2013-03-11 18:22:37 +01:00
Anton Khirnov 3bcdf8dcb9 lavc: remove disabled FF_API_SNOW cruft 2013-03-11 18:22:26 +01:00
Anton Khirnov fcb07e8b33 lavc: remove disabled FF_API_MMI cruft 2013-03-11 18:22:18 +01:00
Anton Khirnov de27d2b92f lavc: remove disabled FF_API_LIBMPEG2 cruft 2013-03-11 18:21:54 +01:00
Anton Khirnov 0517c9e098 lavc: remove disabled FF_API_AVCODEC_RESAMPLE cruft 2013-03-11 18:21:32 +01:00
Janne Grunau 684e3d2e1c ra144: check buffer size before requesting a buffer
Return an error on incomplete frames.
2013-03-10 22:34:43 +01:00
Janne Grunau 08149b2b39 wmapro: unref skipped frames 2013-03-10 22:34:43 +01:00
Janne Grunau e3232f3431 svq1: use av_frame_free to free refcounted frame
Fixes a memleak due to avcodec_free_frame not freeing the frame data.
2013-03-10 22:28:18 +01:00
Anton Khirnov 669cc0f364 lavc: fix get_buffer() compatibility layer for audio.
planes - FF_ARRAY_ELEMS would be evaluated as unsigned and underflow
instead of being negative as was intended.
2013-03-10 22:19:52 +01:00
Anton Khirnov 98cec5c84f ratecontrol: remove an unused variable 2013-03-10 22:19:52 +01:00
Anton Khirnov e2c2974120 vorbisdec: do not leak the first frame. 2013-03-10 22:16:26 +01:00
Anton Khirnov adfa53d67c lavc: remove disabled FF_API_VDA_ASYNC cruft 2013-03-09 08:37:11 +01:00
Anton Khirnov bdd1567c35 lavc: remove disabled FF_API_CODEC_ID cruft 2013-03-09 08:37:08 +01:00
Anton Khirnov 7d42fd6bb9 lavc: remove disabled FF_API_FIND_BEST_PIX_FMT cruft 2013-03-09 08:36:40 +01:00