Commit Graph

17626 Commits

Author SHA1 Message Date
Anton Khirnov
e962bd08ee h264: add a parameter to the CHROMA422 macro.
This way it does not look like a constant.
2013-03-21 10:20:58 +01:00
Anton Khirnov
6d2b6f21eb h264: add a parameter to the CABAC macro.
This way it does not look like a constant.
2013-03-21 10:20:52 +01:00
Anton Khirnov
a6931d8ece h264: add a parameter to the FIELD_OR_MBAFF_PICTURE macro.
This way it does not look like a constant.
2013-03-21 10:20:48 +01:00
Anton Khirnov
7fa00653a5 h264: add a parameter to the FIELD_PICTURE macro.
This way it does not look like a constant.
2013-03-21 10:20:44 +01:00
Anton Khirnov
7bece9b22f h264: add a parameter to the FRAME_MBAFF macro.
This way it does not look like a constant.
2013-03-21 10:20:39 +01:00
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
Anton Khirnov
845017105f lavc: remove disabled FF_API_DSP_MASK cruft 2013-03-09 08:36:40 +01:00
Anton Khirnov
d03a94e2b7 lavc: remove disabled FF_API_SUB_ID cruft 2013-03-09 08:36:40 +01:00
Anton Khirnov
2a11369523 lavc: remove disabled FF_API_INTER_THRESHOLD cruft 2013-03-09 08:36:40 +01:00
Anton Khirnov
9d6cf81f02 lavc: remove disabled FF_API_COLOR_TABLE_ID cruft 2013-03-09 08:36:40 +01:00
Anton Khirnov
3b0f586f07 lavc: remove disabled FF_API_MPV_GLOBAL_OPTS cruft 2013-03-09 08:36:40 +01:00
Anton Khirnov
0f24a3ca99 lavc: remove disabled FF_API_OLD_ENCODE_VIDEO cruft 2013-03-09 08:36:40 +01:00
Anton Khirnov
f073b1500e lavc: remove disabled FF_API_OLD_ENCODE_AUDIO cruft 2013-03-09 08:36:40 +01:00
Anton Khirnov
5d606863c3 lavc: remove disabled FF_API_OLD_DECODE_AUDIO cruft 2013-03-09 08:36:40 +01:00
Justin Ruggles
486f0b0cfc png: use av_mallocz_array() for the zlib zalloc function
Fixes valgrind uninitialized memory errors when decoding png.

CC:libav-stable@libav.org
2013-03-08 14:52:21 -05:00
Justin Ruggles
e984f47873 libmp3lame: use the correct remaining buffer size when flushing
CC:libav-stable@libav.org
2013-03-08 14:52:05 -05:00
Anton Khirnov
7c45087b84 lavc: update the fallback versions of ff_thread_*
Fixes build without threads after
759001c534.
2013-03-08 10:22:10 +01:00
Yusuke Nakamura
19dd4017ab libopencore-amr: Add the missing 3rd argument of ff_get_buffer()
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-08 11:09:31 +02:00
Anton Khirnov
f86d66bcfa vmdaudio: fix invalid reads when packet size is not a multiple of chunk size
CC:libav-stable@libav.org
2013-03-08 08:12:41 +01:00
Anton Khirnov
4c0080b7e7 wmaprodec: return an error, not 0, when the input is too small.
Returning 0 may result in an infinite loop in valid calling programs. A
decoder should never return 0 without producing any output.

CC:libav-stable@libav.org
2013-03-08 08:12:26 +01:00
Anton Khirnov
cacad1c058 wmaprodec: require block_align to be set.
Avoids an infinite loop in the calling programs with decoder not
consuming any input and not returning output.

CC:libav-stable@libav.org
2013-03-08 08:12:16 +01:00
Anton Khirnov
ea1136baaf wmadec: require block_align to be set.
Avoids an infinite loop in the calling programs with decoder not
consuming any input and not returning output.

CC:libav-stable@libav.org
2013-03-08 08:12:03 +01:00
Anton Khirnov
3ba40ebb6c ivi_common: do not call MC for intra frames when dc_transform is unset
CC:libav-stable@libav.org
2013-03-08 08:11:46 +01:00
Anton Khirnov
3e2f200237 roqvideodec: fix a potential infinite loop in roqvideo_decode_frame().
When there is just 1 byte remanining in the buffer, nothing will be read
and the loop will continue forever. Check that there are at least 8
bytes, which are always read at the beginning.

CC:libav-stable@libav.org
2013-03-08 08:11:35 +01:00
Anton Khirnov
8a49d2bcbe xxan: fix invalid memory access in xan_decode_frame_type0()
The loop a few lines below the xan_unpack() call accesses up to
dec_size * 2 bytes into y_buffer, so dec_size must be limited to
buffer_size / 2.

CC:libav-stable@libav.org
2013-03-08 08:11:22 +01:00
Anton Khirnov
d243896987 ffv1: fix calculating slice dimensions for version 2
It got broken in 0f13cd3187.

CC:libav-stable@libav.org
2013-03-08 08:10:02 +01:00
Anton Khirnov
7b89cd20d8 eamad: allocate a dummy reference frame when the real one is missing
CC:libav-stable@libav.org
2013-03-08 08:09:51 +01:00
Anton Khirnov
542b83fc90 Replace some forgotten instances of PIX_FMT_* with AV_PIX_FMT_*. 2013-03-08 07:42:09 +01:00
Anton Khirnov
d8b31be6ca Add the bumps and APIchanges entries for reference counted buffers changes. 2013-03-08 07:41:49 +01:00
Anton Khirnov
8df23e938b lavc: postpone the removal of request_channels API.
Its replacement is still not ready.
2013-03-08 07:41:42 +01:00
Anton Khirnov
ddcca4ba07 lavc: stop setting AVFrame.motion_subsample_log2
It is not used inside lavc anywhere and now it makes no sense to export
it.
2013-03-08 07:41:14 +01:00
Anton Khirnov
37045e4229 mpegvideo: drop vismv code
It has been broken for over a year without anyone complaining or
noticing, thus proving that nobody ever uses it.
2013-03-08 07:40:41 +01:00
Anton Khirnov
2eba9087f3 lavc: make up a fake frame channel layout when there is no real one.
This should ensure that a valid channel layout is always set on a frame,
until a better solution is implemented.
2013-03-08 07:40:06 +01:00
Anton Khirnov
192f1984b1 lavc: limit maximum number of channels to 63
This is the most that can be represented with the current channel layout
system. This limit should be raised/removed when a better system is
implemented.
2013-03-08 07:39:53 +01:00
Anton Khirnov
15ec0450b4 lavc: allow decoders to override frame parameters. 2013-03-08 07:39:44 +01:00
Anton Khirnov
3b199d29cd lavc decoders: properly initialize AVFrame. 2013-03-08 07:39:37 +01:00
Anton Khirnov
759001c534 lavc decoders: work with refcounted frames. 2013-03-08 07:38:30 +01:00
Anton Khirnov
6e7b50b427 mpegvideo_enc: drop support for reusing the input motion vectors.
This misfeature is most likely completely useless and conflicts with
removing the mpegvideo-specific fields from AVFrame. In the improbable
case it is actually useful, it should be reimplemented in a better way.
2013-03-08 07:37:45 +01:00
Anton Khirnov
7ecc2d403c Move AVFrame from lavc to lavu.
Add AVBuffer-based reference counting API to it.
2013-03-08 07:36:15 +01:00
Anton Khirnov
ad0c9f2d5d lavc: move AVFrame.hwaccel_picture_private to Picture.
This field is private and should not be present in a public struct. It
is only used in DXVA with mpegvideo-based decoders currently.
2013-03-08 07:36:01 +01:00
Anton Khirnov
1a5e913016 pthread: avoid copying input packets when possible. 2013-03-08 07:35:14 +01:00
Anton Khirnov
1afddbe59e avpacket: use AVBuffer to allow refcounting the packets.
This will allow us to avoid copying the packets in many cases.

This breaks ABI.
2013-03-08 07:33:45 +01:00
Alexander Kojevnikov
eae0879d96 mp3dec: Fix VBR bit rate parsing
When parsing the Xing/Info tag, don't set the bit rate if it's an Info tag.

When parsing the stream, don't override the bit rate if it's already set,
otherwise calculate the mean bit rate from parsed frames. This way, the bit
rate will be set correctly both for CBR and VBR streams.

CC:libav-stable@libav.org

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-03-08 07:32:11 +01:00
Diego Biurrun
dbd2a34ba5 build: cosmetics: Group hw accelerator Makefile entries together 2013-03-07 15:36:21 +01:00
Diego Biurrun
5f401b7b71 Add missing error_resilience includes to files that use ER 2013-03-07 15:04:49 +01:00
Martin Storsjö
d88738e403 mpegvideo: Conditionally build error_resilience bits
This breaks the dependency of mpegvideo on error_resilience allowing
compilation of components that depend on the former w/o the latter.
2013-03-07 15:04:49 +01:00
Reimar Döffinger
efa7f42020 Use the avstring.h locale-independent character type functions
Make sure the behavior does not change with the locale.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-07 15:16:36 +02:00
Ronald S. Bultje
54b298fe56 lavc: Deprecate the deinterlace functions in libavcodec
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-07 09:35:24 +02:00
Ronald S. Bultje
64e4386974 h264: Integrate draw_horiz_band into ff_h264_draw_horiz_band
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>
2013-03-07 09:31:44 +02:00
Stefano Sabatini
70762508ec lavc: Prettify printing of codec tags containing non alphanumeric characters
Make av_get_codec_tag_string() show codec tag string characters in a more
intelligible ways. For example the ascii char "@" is used as a number, so
should be displayed like "[64]" rather than as a printable character.

Apart alphanumeric chars, only the characters ' ' and '.' are used
literally in codec tags, all the other characters represent numbers.

This also avoids relying on locale-dependent character class functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-07 08:50:29 +02:00
Martin Storsjö
d65522e826 h264: Rename the jpeg_420 pixfmt list to match the common naming structure
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-03-07 08:40:04 +02:00
Ronald S. Bultje
8d061989dd lavc: Split out ff_hwaccel_pixfmt_list_420[] over individual codecs
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>
2013-03-06 21:18:50 +02:00
Diego Biurrun
5a4e9fe855 avcodec/internal: Fix #if DECODE_AUDIO / ENCODE_AUDIO name mismatch 2013-03-06 16:48:03 +01:00
Luca Barbato
5cf7c72757 shorten: use the unsigned type where needed
get_uint returns an unsigned value, use an unsigned to store
blocksize to make sure the comparison logic is correct and report
correctly the error for the channel count not supported.
2013-03-06 01:04:02 +01:00
Luca Barbato
4c364eb2b8 shorten: report meaningful errors 2013-03-06 01:04:02 +01:00
Luca Barbato
a2ad554def shorten: K&R formatting cosmetics 2013-03-06 01:04:02 +01:00
Michael Niedermayer
c10da30d84 shorten: set invalid channels count to 0
Prevent the loop shorten_decode_close from writing and freeing out of
the array boundary.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-03-06 01:04:01 +01:00
Luca Barbato
02055b6d40 vorbisdec: check memory allocations 2013-03-06 01:04:01 +01:00
Luca Barbato
4987faee78 h264: check for luma and chroma bit dept being equal
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
2013-03-05 22:18:02 +01:00
Diego Biurrun
c57a593670 hwaccel: consistent name prefixes for start_frame/end_frame/decode_slice
Some hwaccels use name prefixes, some do not, others only use them for
some codecs.  Add prefixes everywhere for consistency.
2013-03-05 11:22:45 +01:00
Anton Khirnov
437211ae73 h264: set ref_count to 0 for intra slices.
CC:libav-stable@libav.org
2013-03-02 10:27:13 +01:00
Anton Khirnov
668e16a0dd h264: on reference overflow, reset the reference count to 0, not 1.
Since decode_slice_header() returns before the reference lists are
constructed, there are zero valid references.

CC:libav-stable@libav.org
2013-03-02 10:27:03 +01:00
Anton Khirnov
e671d3ad6c h264: do not copy ref count/ref2frm when updating per-frame context
They are filled in decode_slice_header() anyway.
2013-03-02 10:26:50 +01:00
Diego Biurrun
e8c52271c4 Revert "Move H264/QPEL specific asm from dsputil.asm to h264_qpel_*.asm."
This reverts commit f90ff772e7.

The code should be put back in h264_qpel_8bit.asm, but unfortunately
it is unconditionally used from dsputil_mmx.c since 71155d7.
2013-02-28 21:50:02 +01:00
Luca Barbato
9d4da474f5 lls: move to the private namespace
The functions are private.
2013-02-28 17:39:24 +01:00
Martin Storsjö
86611ff123 pnm: Use av_pix_fmt_desc_get instead of accessing the array directly
This fixes boken fate tests with MSVC with DLLs, broken since
b5f536d24.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-28 18:29:03 +02:00
Diego Biurrun
ebc701993f x86: dsputil: Drop some unused function #defines 2013-02-26 23:36:24 +01:00
Diego Biurrun
845cfc92f9 x86: dsputil: Drop aliasing of ff_put_pixels8_mmx to ff_put_pixels8_mmxext
The external assembly function uses mmxext instructions and should not be
masqueraded as an mmx-only function. Instead, use the mmx-only inline
assembly function.
2013-02-26 23:36:24 +01:00
Diego Biurrun
096cc11ec1 x86: vc1dsp: Move ff_avg_vc1_mspel_mc00_mmxext out of dsputil_mmx.c 2013-02-26 23:36:24 +01:00
Martin Storsjö
31a23a0dc6 x86: dsputil_mmx: Remove leftover inline assembly fragments
These became unused in 71155d7b.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-27 00:17:05 +02:00
Diego Biurrun
c242bbd8b6 Remove unnecessary dsputil.h #includes 2013-02-26 00:51:34 +01:00
Diego Biurrun
76b19a3984 Fix a number of incorrect intmath.h #includes. 2013-02-26 00:51:34 +01:00
Justin Ruggles
699d02b839 libschroedinger: cosmetics: rename variable avccontext to avctx
This is consistent with the rest of libavcodec.
2013-02-25 15:15:21 -05:00
Justin Ruggles
09031b4639 vorbisenc: cosmetics: rename variable avccontext to avctx
This is consistent with the rest of libavcodec.
2013-02-25 15:15:21 -05:00
Justin Ruggles
e951b6d94c vorbisdec: cosmetics: rename variable avccontext to avctx
This is consistent with the rest of libavcodec.
2013-02-25 15:15:21 -05:00
Luca Barbato
23bd9ef4b2 vorbisdec: Accept 0 amplitude_bits
The specification does not prevent an encoder to write the amplitude 0
as 0 amplitude_bits.

Our get_bits() implementation might not support a zero sized read
properly, thus the additional branch.
2013-02-25 07:34:00 +01:00
Luca Barbato
5b47c19bfd vorbisdec: Add missing checks
Rate and order must not be 0 even if the specification does not say that
explicitly.
2013-02-25 07:34:00 +01:00
Luca Barbato
fc386f2eea vorbisdec: cosmetics
Use the commonly used "if (!var)" instead of "if (var == 0)".
2013-02-25 07:34:00 +01:00
Michael Niedermayer
11dcecfcca vorbisdec: Error on bark_map_size equal to 0.
The value is used to calculate output LSP curve and a division by zero
and out of array accesses would occur.

CVE-2013-0894

CC: libav-stable@libav.org

Reported-by: Dale Curtis <dalecurtis@chromium.org>
Found-by: inferno@chromium.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-02-25 07:33:59 +01:00
Diego Biurrun
3d035d5a6a dsputil_alpha.h: Add missing stddef.h header to fix standalone compilation 2013-02-24 18:51:40 +01:00
Justin Ruggles
d7c450436f ac3dec: validate channel output mode against channel count
Damaged frames can lead to a mismatch, which can cause a segfault
due to using an incorrect channel mapping.

CC:libav-stable@libav.org
2013-02-23 16:59:39 -05:00
Diego Biurrun
94ee7da08d Remove pointless av_cold attributes in header files
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.
2013-02-23 20:13:47 +01:00
Kostya Shishkov
b5f536d24b pnm: add high-bitdepth PGMYUV support for both encoder and decoder 2013-02-23 16:49:22 +01:00
John Van Sickle
2f325a6fd4 libx264: change i_qfactor to use x264cli's default
This also allows libx264 to modify its i_qfactor value
when using the "-tune" setting. Previously it had a static
value of 1.25

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-02-23 13:34:52 +01:00
Anton Khirnov
d8a74d1d95 qtrle: use AV_LOG_ERROR in an error message. 2013-02-23 13:06:12 +01:00
Anton Khirnov
7b4f91155b qtrle: cosmetics, reformat CHECK_PIXEL_PTR() macro 2013-02-23 13:06:08 +01:00
Anton Khirnov
e106592447 qtrle: add more checks against pixel_ptr being negative.
CC:libav-stable@libav.org
2013-02-23 13:05:54 +01:00
Anton Khirnov
4f3b058c84 cavs: initialize various context tables to 0
Avoids crashes with corrupted files.

CC:libav-stable@libav.org
2013-02-23 13:05:43 +01:00
Anton Khirnov
0dff40bfb9 mlpdec: do not try to allocate a zero-sized output buffer.
CC:libav-stable@libav.org
2013-02-23 13:05:31 +01:00
Anton Khirnov
ddfe1246d9 flicvideo: avoid an infinite loop in byte run compression
When byte_run is 0, pixel_countdown is not touched and the loop will run
forever.

CC:libav-stable@libav.org
2013-02-23 09:22:30 +01:00
Anton Khirnov
067432c1c9 loco: check that there is data left after decoding a plane.
CC:libav-stable@libav.org
2013-02-23 09:20:42 +01:00
Anton Khirnov
de6dfa2bb8 lagarith: avoid infinite loop in lag_rac_refill()
range == 0 happens with corrupted files

CC:libav-stable@libav.org
2013-02-23 09:16:32 +01:00
Anton Khirnov
8097fc9a2d 4xm: check the return value of read_huffman_tables().
CC:libav-stable@libav.org
2013-02-23 09:13:08 +01:00
Matt Wolenetz
311443f6c7 x86: h264: Don't use redzone in AVX h264_deblock on Win64
This fixes crashes in chromium on win64 on machines with AVX
(crashes that apparently aren't triggered by fate).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-21 15:02:16 +02:00
Diego Biurrun
a0a1ac0f09 dxva2: Add missing #define to make header compile standalone 2013-02-20 14:24:07 +01:00
Diego Biurrun
3e85b46ecf arm: vp8: Add missing #includes for header to compile standalone 2013-02-20 14:24:07 +01:00
Martin Storsjö
26ee5ca03d h264: Get rid of unnecessary casts
This gets rid of a number of warnings about casts discarding
qualifiers from the pointer target, present since 7ebfb466a.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-20 00:25:29 +02:00
Ronald S. Bultje
fae6fd5b87 h264/svq3: Stop using draw_edges
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>
2013-02-19 22:34:33 +02:00
Ronald S. Bultje
7ebfb466ae h264: Don't store intra pcm samples in h->mb
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>
2013-02-19 22:34:14 +02:00
Ronald S. Bultje
9918f57dcf get_bits: Return pointer to buffer that is the result of the alignment
This allows more transparent mixing of get_bits and whole-byte access
without having to touch get_bits internals.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-02-19 22:33:52 +02:00
Ronald S. Bultje
2ed008204d h264: Add add_pixels4/8() to h264dsp, and remove add_pixels4 from dsputil
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>
2013-02-19 22:33:29 +02:00