Commit Graph

15911 Commits

Author SHA1 Message Date
Kostya Shishkov b8560637d9 RealAudio Lossless decoder 2012-03-19 18:46:34 +01:00
Kostya Shishkov bb39bd195a zmbv: check decompress result
Changing flush type from Z_FINISH is needed since encoder compresses fixed
amount of data and doesn't care about writing end of stream marker.
2012-03-19 09:21:05 +01:00
Kostya Shishkov afc2263bcc zmbv: correct indentation 2012-03-19 09:20:39 +01:00
Ronald S. Bultje 1744ab9e46 adpcm: convert adpcm_thp to bytestream2. 2012-03-18 15:33:19 -07:00
Ronald S. Bultje 72eda7786d adpcm: convert adpcm_yamaha to bytestream2. 2012-03-18 15:33:19 -07:00
Ronald S. Bultje f184735a27 adpcm: convert adpcm_swf to bytestream2. 2012-03-18 15:33:19 -07:00
Ronald S. Bultje 8afe2f9002 adpcm: convert adpcm_sbpro to bytestream2. 2012-03-18 15:33:19 -07:00
Ronald S. Bultje 834c81f4c5 adpcm: convert adpcm_ct to bytestream2. 2012-03-18 15:33:19 -07:00
Ronald S. Bultje b3084e29e6 adpcm: convert adpcm_ima_amv/smjpeg to bytestream2. 2012-03-18 15:33:16 -07:00
Ronald S. Bultje 22c48d399d adpcm: convert adpcm_ea_xas to bytestream2. 2012-03-18 15:33:16 -07:00
Ronald S. Bultje edd9555537 adpcm: convert adpcm_ea_r1/2/3 to bytestream2. 2012-03-18 15:33:16 -07:00
Ronald S. Bultje e60d09918c adpcm: convert ea_maxis_xa to bytestream2. 2012-03-18 15:33:15 -07:00
Ronald S. Bultje 4a876eba8d adpcm: convert adpcm_ea to bytestream2. 2012-03-18 15:33:15 -07:00
Ronald S. Bultje 524af484ed adpcm convert adpcm_ima_ea_sead to bytestream2. 2012-03-18 15:33:15 -07:00
Ronald S. Bultje 8f2ed09289 adpcm: convert adpcm_ima_ea_eacs to bytestream2. 2012-03-18 15:33:15 -07:00
Ronald S. Bultje 159831cc09 adpcm: convert adpcm_xa to bytestream2. 2012-03-18 15:33:15 -07:00
Ronald S. Bultje 16b7a5e241 adpcm: convert ima_ws to bytestream2. 2012-03-18 15:33:11 -07:00
Ronald S. Bultje 74d7ac95fb adpcm: convert adpcm_ima_apc to bytestream2. 2012-03-18 15:25:26 -07:00
Ronald S. Bultje 9721901440 adpcm: convert adpcm_ima_iss to bytestream2. 2012-03-18 15:25:26 -07:00
Ronald S. Bultje 1da9587026 adpcm: convert adpcm_dk3 to bytestream2. 2012-03-18 15:25:26 -07:00
Ronald S. Bultje d570a96808 adpcm: convert adpcm_dk4 to bytestream2. 2012-03-18 15:25:26 -07:00
Ronald S. Bultje 5353ee3c30 adpcm: convert adpcm_ms to bytestream2. 2012-03-18 15:25:26 -07:00
Ronald S. Bultje 89f3aa8ce2 adpcm: use av_clip() in adpcm_ima_expand_nibble(). 2012-03-18 15:25:25 -07:00
Ronald S. Bultje 689be85a9a adpcm: convert adpcm_4xm to bytestream2. 2012-03-18 15:25:25 -07:00
Ronald S. Bultje 39505f4240 adpcm: convert adpcm_ima_wav to bytestream2. 2012-03-18 15:25:25 -07:00
Ronald S. Bultje 9604307dd8 adpcm: convert adpcm_ima_qt to bytestream2. 2012-03-18 15:25:25 -07:00
Ronald S. Bultje c346f6304c adpcm: fix nb_samples rounding for adpcm_ima_dk3, and update reference. 2012-03-18 15:25:25 -07:00
Diego Biurrun f36d5c1422 Update Janne's email address. 2012-03-18 16:07:33 +01:00
Diego Biurrun f03183d9a8 bytestream: Eliminate one level of pointless macro indirection. 2012-03-18 16:07:32 +01:00
Ronald S. Bultje abe3c697a3 xwd: convert to bytestream2. 2012-03-18 07:45:41 -07:00
Paul B Mahol 5a3a906ba2 vqavideo: port to bytestream2 API
Protects against overreads.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-18 07:45:40 -07:00
Kostya Shishkov 6acac061ab prores: allow user to set fixed quantiser 2012-03-18 08:04:15 +01:00
Paul B Mahol 0afd8f12e9 avcodec: add XBM encoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-17 15:45:04 -04:00
Justin Ruggles 6ca3b248e2 resample: allocate a large enough output buffer
Fixes invalid writes and crashes when doing conversions such as stereo to 5.1
channels or sample rate conversion on 5.1 channels.
2012-03-17 13:37:44 -04:00
Justin Ruggles c3da9f5060 wmaenc: remove bit-exact hack
It may have improved cross-platform stability, but wasn't the only place in
the encoder with bitexact issues. It is no longer needed because we have FATE
tests for float encoders using fuzzy comparison.
2012-03-17 11:46:15 -04:00
Aneesh Dogra de64d8cf17 qtrle: Use bytestream2 functions to prevent buffer overreads.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-16 17:50:39 -07:00
Paul B Mahol 341404f753 vqavideo: check malloc return values
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-16 16:57:12 -07:00
Uoti Urpala 05b9a89ed7 threads: fix old frames returned after avcodec_flush_buffers()
Calling avcodec_flush_buffers() and then avcodec_decode_video2() with
a 0-sized packet (to get remaining buffered frames) could incorrectly
return an old frame from before the avcodec_flush_buffers() call. Add
a loop in ff_thread_flush() to zero the got_frame field of each thread
to ensure the old frames will not be returned.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-16 15:38:18 -07:00
Janne Grunau 7b60799aa8 MPV: always mark dummy frames as reference
If the dummy frame are not created from a reference frame they could
be deleted untimely resulting in multithreaded decoder waiting on
the current frame to finish.
Noticed by Ronald S. Bultje in the RV34 decoder with a broken file.
2012-03-16 23:35:32 +01:00
Ronald S. Bultje 1e26a48fa2 h264: fix deadlocks on incomplete reference frame decoding.
If decoding a second complementary field, and the first was
decoded in our thread, mark decoding of that field as complete.
If decoding fails, mark the decoded field/frame as complete.
Do not allow switching between field modes or field/frame mode
between slices within the same field/frame. Ensure that two
subsequent fields cover top/bottom (rather than top/frame,
bottom/frame or such nonsense situations).

Fixes various deadlocks when decoding samples with errors in
reference frames.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-16 15:31:00 -07:00
Ronald S. Bultje c6ccb96bc9 mpeg4: report frame decoding completion at ff_MPV_frame_end().
Prevents hangs on corrupt input.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-16 15:30:53 -07:00
Ronald S. Bultje 80387f0e25 mimic: don't use self as reference, and report completion at end of decode().
Fixes hangs on corrupt samples that reference self-frames.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-16 15:30:52 -07:00
Diego Biurrun e5d403720e h264: K&R formatting cosmetics
Also remove some disabled code and fix a few comment typos.
2012-03-16 20:35:37 +01:00
Diego Biurrun ad4cec6b80 s3tc.h: Add missing #include to fix standalone header compilation. 2012-03-16 18:51:57 +01:00
Paul B Mahol 702985b8b7 dxa: remove useless code
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-03-15 14:01:23 +01:00
Ronald S. Bultje e0febda22d h264: stricter reference limit enforcement.
Progressive images can have only 16 references, error out if there are
more, since the data is almost certainly corrupt, and the invalid value
will lead to random crashes or invalid writes later on.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-14 13:24:49 -07:00
Ronald S. Bultje 48cbe4b092 h264: increase reference poc list from 16 to 32.
Interlaced images can have 32 references (16 per field), so limiting the
array size to 16 leads to invalid writes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-14 13:24:45 -07:00
Ronald S. Bultje 86020073db xa_adpcm: limit filter to prevent xa_adpcm_table[] array bounds overruns.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-14 13:24:40 -07:00
Michael Niedermayer 1f8ff2b13c snow: check reference frame indices.
Fixes NULL ptr dereference

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-14 13:24:35 -07:00
Michael Niedermayer c9837954e7 snow: reject unsupported chroma shifts.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-14 13:24:31 -07:00
Paul B Mahol 5b4d026a03 anm: convert to bytestream2 API
Protects from overreads.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-14 13:23:07 -07:00
Paul B Mahol f1ce053cd0 bytestream: add more unchecked variants for bytestream2 API
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-14 13:23:07 -07:00
Paul B Mahol a1c036e961 jvdec: unbreak video decoding
The safe bitstream reader broke it since the buffer size was specified
in bytes instead of bits.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
CC: libav-stable@libav.org
2012-03-14 15:34:50 +01:00
Michael Niedermayer 758ec11153 h264: Fix invalid interlaced/progressive MB combinations for direct mode prediction.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-13 10:04:23 -07:00
Anton Khirnov d533e395e1 libx264: add 'stats' private option for setting 2pass stats filename.
x264 always opens the file itself with fopen, so we cannot use the
standard lavc stats mechanism.

CC: libav-stable@libav.org
2012-03-13 12:20:50 +01:00
Anton Khirnov 9d5c131ece libx264: fix help text for slice-max-size option.
CC: libav-stable@libav.org
2012-03-13 12:20:34 +01:00
Hendrik Leppkes 7103c8350a dxva2_vc1: pass the overlap flag to the decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-03-13 08:14:23 +01:00
Hendrik Leppkes b2b0aa70ea dxva2_vc1: fix decoding of BI frames
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-03-13 08:14:22 +01:00
Paul B Mahol 29b0d94b43 dfa: convert to bytestream2 API
Protects from overreads.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-12 21:47:40 -07:00
Peter Ross 015da6e394 anm decoder: move buffer allocation from decode_init() to decode_frame()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-12 16:44:39 -07:00
Michael Niedermayer 3aa661ec56 h264: improve parsing of broken AVC SPS
Parsing the entire NAL as SPS fixes decoding of some AVC bitstreams
with broken escaping. Since the size of the NAL unit is known and
checked against the buffer end we can parse it entirely without buffer
overreads.

Fixes playback of
http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-03-13 00:31:52 +01:00
Paul B Mahol bd3e07c82a pcm-mpeg: convert to bytestream2 API
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-03-12 23:03:57 +01:00
Janne Grunau 8a6037c390 Revert "h264: clear trailing bits in partially parsed NAL units"
This reverts commit 729ebb2f18.

There was an off-by-one error in the bit mask calculation clearing
actually the last valid bit and causing
http://bugzilla.libav.org/show_bug.cgi?id=227

The broken sample (Mr_MrsSmith-h264_aac.mp4) the commit was fixing
does not work after correcting the off-by-one error.

CC: libav-stable@libav.org
2012-03-12 22:46:56 +01:00
Janne Grunau 363bd1c62c remove iwmmxt optimizations
The were broken since August of 2010 without anyone noticing until
three weeks ago. Nobody cares about it anymore and hopefully Marvell
will support NEON like in the PXA978 from now on.
2012-03-12 22:46:56 +01:00
Paul B Mahol 33c5c3ad07 mimic: do not continue if swap_buf_size is 0
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-12 11:47:48 -07:00
Paul B Mahol dba425ad7a mimic: convert to bytestream2 API
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-12 11:46:34 -07:00
Paul B Mahol 05d089a80b frwu: use MKTAG to check marker instead of AV_RL32
Using intreadwrite.h for this is overkill.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-12 11:41:02 -07:00
Paul B Mahol 919f355438 txd: port to bytestream2 API
Protects against overreads.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-12 11:37:47 -07:00
Paul B Mahol 85aded741e c93: convert to bytestream2 API
Protects against overreads.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-12 17:13:42 +02:00
Ronald S. Bultje c95fefa042 dsicinvideo: validate buffer offset before copying pixels.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-11 07:28:54 -07:00
Ronald S. Bultje 97e48b2f54 cook: error out on quant_index values outside [-63, 63] range.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-10 17:51:28 -08:00
Ronald S. Bultje d7eabd5042 mpc: pad mpc_CC/SCF[] tables to allow for negative indices.
MPC8 allows indices of mpc_CC up to -1, and mpc_SCF up to -6, thus pad
the tables by that much on the left end.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-10 14:28:08 -08:00
Ronald S. Bultje 442c3a8cb1 cook: expand dither_tab[], and make sure indexes into it don't overflow.
Fixes overflows in accessing dither_tab[].

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-10 12:03:53 -08:00
Ronald S. Bultje 71af42bd96 xxan: reindent xan_unpack_luma().
It used 3-space indent instead of 4-space indent.
2012-03-10 11:57:56 -08:00
Ronald S. Bultje f77bfa8376 xxan: protect against chroma LUT overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-10 11:57:17 -08:00
Ronald S. Bultje 5518827816 xxan: convert to bytestream2 API.
Protects against overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-10 11:48:57 -08:00
Ronald S. Bultje f1279e286b xxan: don't read before start of buffer in av_memcpy_backptr().
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-10 11:48:39 -08:00
Ronald S. Bultje a928ed3751 vp8: convert mbedge loopfilter x86 assembly to use named arguments. 2012-03-10 11:36:33 -08:00
Ronald S. Bultje bee330e300 vp8: convert inner loopfilter x86 assembly to use named arguments. 2012-03-10 11:36:33 -08:00
Diego Biurrun ffae713a5b Fix a bunch of common typos. 2012-03-09 22:02:49 +01:00
Diego Biurrun eab6968f24 build: Skip compiling xvmc.h under the correct condition. 2012-03-09 20:56:15 +01:00
Michael Niedermayer 744dd1d356 aacdec: Fix SCE parity check.
An unpaired SCE preceding a CPE only makes sense for front SCEs
preceding the first CPE.

Split from FFmpeg commit a8d67efa53

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-03-09 09:47:57 -08:00
Michael Niedermayer d53fe096e4 aacdec: Fix out of array writes (stack).
Set the element to channel vector (e2c_vec) size to be the maximum
number of aac channel elements. This makes it slightly larger than it
needs to be because CCEs are never mapped to output channel locations.

Also add a check that all input tags (legal or not) will fit.

Split from FFmpeg commit a8d67efa53

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-03-09 09:47:57 -08:00
Paul B Mahol ea1d64ab10 ttadec: unbreak playback of matroska files
Matroska demuxer needs to recreate tta header, so just display
crc error without aborting.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-08 11:56:45 -08:00
Aaron Colwell 12623a8026 vorbisdec: avoid invalid memory access
This fixes some invalid memory access caused later in the function
by res_chan[] not being set for all channels. This happens when a
channel doesn't appear a submap. This change simply returns a
decoder error when this situation is detected.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-08 11:52:33 -08:00
Ronald S. Bultje 4ffe5e2aa5 huffyuv: add padding to classic (v1) huffman tables.
We slightly overread the input buffer, so we require
padding at the end of the buffer, as is documented in the
get_bits API. Without padding, we'll read uninitialized
data or beyond the end of the .rodata, which may crash.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-08 11:20:49 -08:00
Ronald S. Bultje 4c25269ced png: convert to bytestream2 API.
Protects against overreads in the input buffer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-08 11:17:25 -08:00
Kostya Shishkov 681e726865 dca: include libavutil/mathematics.h for possibly missing M_SQRT1_2 2012-03-08 07:16:01 +01:00
Ronald S. Bultje 83f15a1228 avs: fix infinite loop on end-of-stream.
The codec would keep returning the last decoded frame if the stream
contains B-frames, since it wouldn't clear that frame from the list of
frames to be returned to the user.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-07 16:33:35 -08:00
Alex Converse fd0be63049 tiffdec: Prevent illegal memory access caused by recycled pointers.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-07 15:40:42 -08:00
Ronald S. Bultje b4bccf3e4e wma: fix off-by-one in array bounds check.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-07 14:42:39 -08:00
Reimar Döffinger 6eda85e15b sbrdsp.asm: convert all instructions to float/SSE ones.
Since the values are floats, using the float operations
makes sense, improves performance on some CPUs and
makes the code SSE compatible instead of needing SSE2.

Based on suggestion by Jason.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-07 13:50:13 -08:00
Ronald S. Bultje 3416d0805e dv: cosmetics. 2012-03-07 13:49:41 -08:00
Ronald S. Bultje e97efecec8 dv: check buffer size before reading profile.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-07 13:48:41 -08:00
Ronald S. Bultje 6e2821160b Revert "AAC SBR: group some writes."
This reverts commit ba36f14e5d. It
broke decoding on x86-32 on some systems.
2012-03-07 12:16:36 -08:00
Ronald S. Bultje 37cc8600d0 cook: extend channel uncoupling tables so the full bit range is covered.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-07 11:40:46 -08:00
Ronald S. Bultje 84a020efc3 roqvideo: cosmetics. 2012-03-07 11:37:25 -08:00
Ronald S. Bultje cdf1577162 roqvideo: convert to bytestream2 API.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-07 11:37:20 -08:00
Ronald S. Bultje 93b53ffb1a dca: don't use av_clip_uintp2().
The argument is not a literal, thus causing the ARM v6 or later
builds to break.
2012-03-07 11:31:42 -08:00
Ronald S. Bultje 626964a4c4 wmall: fix build with -DDEBUG enabled. 2012-03-07 10:40:15 -08:00
Ronald S. Bultje 8febcb9fc1 smc: port to bytestream2 API.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-07 10:34:06 -08:00
Christophe Gisquet ba36f14e5d AAC SBR: group some writes.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-07 10:29:52 -08:00
Christophe GISQUET 7e1ce6a6ac dsputil: remove shift parameter from scalarproduct_int16
There is only one caller, which does not need the shifting. Other use cases
are situations where different roundings would be needed.

The x86 and neon versions are modified accordingly.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-07 10:29:52 -08:00
Christophe GISQUET dabf8dd34a SBR DSP: unroll sum_square
The length is even, so some unrolling can be performed. Timings are for x86:
- 32bits: 102c -> 82c
- 64bits:  82c -> 69c

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-07 10:29:52 -08:00
Christophe GISQUET 294c05ce8a rv34: remove dead code in intra availability check
This was an incorrect copy-and-paste to a code not needing the original code.
Spotted by Jason in a previous review but forgotten in the commit.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-07 10:29:52 -08:00
Christophe GISQUET 7104c23bd1 rv34: clean a bit availability checks.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-07 10:29:52 -08:00
Ronald S. Bultje 1255eed533 tgq: convert to bytestream2 API.
This protects against input buffer overreads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-07 09:53:57 -08:00
Paul B Mahol aed9da20af parser: remove forward declaration of MpegEncContext
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-07 09:48:29 -08:00
Ronald S. Bultje e6ffd997cb dca: prevent accessing static arrays with invalid indexes.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-07 09:37:29 -08:00
Ronald S. Bultje cc5dd632ce raw: move buffer size check up.
This way, it protects against overreads for 4bpp/2bpp content also.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-07 09:36:32 -08:00
Ronald S. Bultje f1320dc3be lpcm: fix sample size calculation for 20bit LCPM.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-07 09:36:03 -08:00
Ronald S. Bultje a55d5bdc6e algmm: convert to bytestream2 API.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-07 09:34:52 -08:00
Diego Biurrun 8ca6e523a6 wma: Refactor common code to fix standalone compilation of WMA lossless decoder. 2012-03-07 09:36:05 +01:00
Diego Biurrun 3c715383ea vc1: Move init code shared between decoder and parser to common code file.
This fixes standalone compilation of the VC-1 parser.
2012-03-07 09:36:04 +01:00
Diego Biurrun 1e9d55e45e x86: Remove duplicated AVG_3DNOW_OP / AVG_MMX2_OP macros from h264_qpel_mmx.c. 2012-03-07 09:36:04 +01:00
Reimar Döffinger b5161908e0 SBR DSP: fix SSE code to not use SSE2 instructions.
movq from SSE register _to_ memory is an SSE2 instruction.
Use the SSE movlps function instead that does the same thing.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-06 13:40:35 -08:00
Ronald S. Bultje 6193ff6854 error_resilience: initialize s->block_index[].
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-06 11:08:56 -08:00
Ronald S. Bultje 11b940a1a8 svq3: protect against negative quantizers.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-06 10:47:42 -08:00
Ronald S. Bultje c23acbaed4 Don't use ff_cropTbl[] for IDCT.
Results of IDCT can by far outreach the range of ff_cropTbl[], leading
to overreads and potentially crashes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-06 10:47:42 -08:00
Martin Storsjö 338978a7c1 libx264: Allow overriding the sliced threads option
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-06 13:40:22 +02:00
Alex Converse 3574a85ce5 Replace computations of remaining bits with calls to get_bits_left(). 2012-03-05 11:22:11 -08:00
Alex Converse b70feb4053 amrnb/amrwb: Remove get_bits usage.
It is used to parse fixed sized fields out of a single octet. The code
is simpler without it.
2012-03-05 11:22:11 -08:00
Justin Ruggles 11ac796f7a dca_parser: parse the sample rate and frame durations 2012-03-05 13:08:17 -05:00
Justin Ruggles 85469f1c9e libspeexdec: do not set AVCodecContext.frame_size
It is not necessary
2012-03-05 13:08:17 -05:00
Justin Ruggles adbf61ff8a libopencore-amr: do not set AVCodecContext.frame_size
It is not necessary
2012-03-05 13:08:17 -05:00
Justin Ruggles 0efa4073bf alsdec: do not set AVCodecContext.frame_size
It is not necessary
2012-03-05 13:08:17 -05:00
Justin Ruggles 9524cf79df avcodec: add av_get_audio_frame_duration() function.
This is a utility function for the user to get the frame duration based on
the codec id, frame size in bytes, and various AVCodecContext parameters.
2012-03-05 13:08:15 -05:00
Justin Ruggles 6699d07480 avcodec: add av_get_exact_bits_per_sample() function
This only returns bits per sample when it is exactly correct. That is, the
codec contains only raw samples with no frame headers or padding. This applies
to basically all PCM codecs and a small subset of ADPCM codecs.
2012-03-05 13:08:15 -05:00
Fabian Greffrath c9dbac36ad Fix format string vulnerability detected by -Wformat-security.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-03-05 17:03:00 +01:00
Mans Rullgard 356ee8d7de x86: clean up ff_dsputil_init_mmx()
This splits ff_dsputil_init_mmx() into multiple functions, one for
each MMX/SSE level, somewhat simplifying the nested conditions.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-03-05 14:40:03 +01:00
Anton Khirnov 44fe77b350 lavc: make codec_is_decoder/encoder() public. 2012-03-04 21:08:52 +01:00
Anton Khirnov 02beb9826b lavc: deprecate AVCodecContext.sub_id.
In most places where it's used, it's as a pointless write-only field.

Only rv10 decoder actually reads from it, but it stores some internal
version info in it. There is no reason for it to be in a public field.
2012-03-04 21:02:45 +01:00
Kostya Shishkov 4db4b53dc8 proresenc: give user a possibility to alter some encoding parameters
This allows user to select quantisation matrix from different profile,
stamp frames with custom vendor string and change target bitrate.
2012-03-04 07:35:00 +01:00
Justin Ruggles 1ba08c94f5 vorbisenc: add output buffer overwrite protection 2012-03-04 01:16:54 -05:00
Justin Ruggles fe78470a8b libopencore-amrnbenc: fix end-of-stream handling
Use CODEC_CAP_DELAY and CODEC_CAP_SMALL_LAST_FRAME to properly pad and flush
the encoder at the end of encoding. This is needed in order to have all input
samples decoded.
2012-03-04 01:14:53 -05:00
Justin Ruggles b0350c1c30 ra144enc: fix end-of-stream handling
Use CODEC_CAP_DELAY and CODEC_CAP_SMALL_LAST_FRAME to properly pad and flush
the encoder at the end of encoding. This is needed in order to have all input
samples decoded.
2012-03-04 01:14:53 -05:00
Justin Ruggles 29e2c85310 nellymoserenc: zero any leftover packet bytes
fixes writing of uninitialized packet data
2012-03-04 01:14:52 -05:00
Justin Ruggles 6c7a01621c nellymoserenc: use proper MDCT overlap delay 2012-03-04 01:14:52 -05:00
Aneesh Dogra 3e9cd8b4b0 qpeg: Use bytestream2 functions to prevent buffer overreads.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-03 20:40:00 -08:00
Ronald S. Bultje b4188f0d46 vp8: convert simple loopfilter x86 assembly to use named arguments. 2012-03-03 20:40:00 -08:00
Ronald S. Bultje 8476ca3b4e vp8: convert idct x86 assembly to use named arguments. 2012-03-03 20:40:00 -08:00
Ronald S. Bultje 21ffc78fd7 vp8: convert mc x86 assembly to use named arguments. 2012-03-03 20:40:00 -08:00
Ronald S. Bultje 28170f1a39 vp8: convert loopfilter x86 assembly to use cpuflags(). 2012-03-03 20:40:00 -08:00
Ronald S. Bultje e25be47154 vp8: convert idct/mc x86 assembly to use cpuflags(). 2012-03-03 20:39:59 -08:00
Justin Ruggles 51ddf35c90 wmaenc: fix m/s stereo encoding for the first frame
We need to set ms_stereo in encode_init() in order to avoid incorrectly
encoding the first frame as non-m/s while flagging it as m/s. Fixes an
uncomfortable pop in the left channel at the start of playback.

CC:libav-stable@libav.org
2012-03-03 18:20:10 -05:00
Justin Ruggles 8ed7488ea3 wmaenc: return s->block_align instead of recalculating it 2012-03-03 18:20:10 -05:00
Justin Ruggles 5d652e063b wmaenc: check final frame size against output packet size
Currently we have an assert() that prevents the frame from being too large,
but it is more user-friendly to give an error message instead of aborting on
assert(). This condition is quite unlikely due to the minimum bit rate check
in encode_init(), but it is still worth having.
2012-03-03 18:20:10 -05:00
Justin Ruggles dfc4fdedf8 wmaenc: require a large enough output buffer to prevent overwrites
The maximum theoretical frame size is around 17000 bytes. Although in
practice it will generally be much smaller, we require a larger buffer
just to be safe.

CC: libav-stable@libav.org
2012-03-03 18:20:10 -05:00
Justin Ruggles 1ec075cfec wmaenc: limit allowed sample rate to 48kHz
ff_wma_init() allows up to 50kHz, but this generates an exponent band
size table that requires 65 bands. The code assumes 25 bands in many
places, and using sample rates higher than 48kHz will lead to buffer
overwrites.

CC:libav-stable@libav.org
2012-03-03 18:20:10 -05:00
Justin Ruggles c2b8dea182 wmaenc: limit block_align to MAX_CODED_SUPERFRAME_SIZE
This is near the theoretical limit for wma frame size and is the most that
our decoder can handle. Allowing higher bit rates will just end up padding
each frame with empty bytes.

Fixes invalid writes for avconv when using very high bit rates.

CC:libav-stable@libav.org
2012-03-03 18:20:09 -05:00
Justin Ruggles 0b8b7db01b mpegaudio_parser: do not ignore information from the first parsed frame
Update some demuxing and seeking fate tests.
2012-03-03 17:03:26 -05:00
Michael Niedermayer 6776a8f189 mpegaudio_parser: be less picky about the start position
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-03-03 17:03:26 -05:00
Justin Ruggles 5602a464c9 avcodec: add a Vorbis parser to get packet duration
This also allows for removing some of the Vorbis-related hacks.
2012-03-03 16:43:11 -05:00
Justin Ruggles 737ca4482b vorbisdec: read the previous window flag for long windows
When reading sequentially, we are using the actual flag from the previous
frame, but when seeking we do not know what the previous window flag was, so
we need to read it from the bitstream.
2012-03-03 16:43:11 -05:00
Anton Khirnov 7fb6c9225c lavc: free the output packet when encoding failed or produced no output. 2012-03-03 06:31:41 +01:00
Anton Khirnov e42e9b0e4d lavc: preserve avpkt->destruct in ff_alloc_packet().
Also, don't bother with saving/restoring data, av_init_packet doesn't
touch it.
2012-03-03 06:31:41 +01:00
Anton Khirnov c179c9e19d lavc: clarify the meaning of AVCodecContext.frame_number. 2012-03-03 06:31:41 +01:00
Ronald S. Bultje 9d87374ec0 amrwb: remove duplicate arguments from extrapolate_isf().
Prevents warnings because the dst and src overlap (are the same) in the
memcpy() inside the function.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-02 12:50:00 -08:00
Ronald S. Bultje 154b8bb800 amrwb: error out early if mode is invalid.
Prevents using the invalid mode as an index in a static array, which
would generate invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-02 10:34:50 -08:00
Ronald S. Bultje 291c9b6285 h264: change underread for 10bit QPEL to overread.
This prevents us from reading before the start of the buffer, and thus
prevents crashes resulting from this behaviour. Fixes bug 237.
2012-03-02 10:33:05 -08:00
Ronald S. Bultje 45549339bc vp8: disable mmx functions with sse/sse2 counterparts on x86-64.
x86-64 is guaranteed to have at least SSE2, therefore the MMX/MMX2
functions will never be used in practice.
2012-03-02 10:32:05 -08:00
Ronald S. Bultje bd66f073fe vp8: change int stride to ptrdiff_t stride.
On 64bit platforms with 32bit int, this means we won't have to sign-
extend the integer anymore.
2012-03-02 10:31:50 -08:00
Ronald S. Bultje 349b7977e4 wma: fix invalid buffer size assumptions causing random overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-02 10:31:28 -08:00
Mashiat Sarker Shakkhar 9d25f1f619 Windows Media Audio Lossless decoder
Decodes 16-bit WMA Lossless encoded files. 24-bit is not supported yet.

Bitstream parser written by Andreas Öman with contributions from
Baptiste Coudurier and Ulion.

Includes a number of bug-fixes from Benjamin Larsson, Michael Niedermayer and
Konstantin Shishkov, shine and polish by Diego Biurrun.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-03-02 19:10:29 +01:00
Alex Converse 9243ec4a50 rv10/20: Fix slice overflow with checked bitstream reader. 2012-03-02 09:31:32 -08:00
Michael Niedermayer 71db86d53b h263dec: Disallow width/height changing with frame threads.
Fixes CVE-2011-3937

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-03-02 09:31:32 -08:00
Alex Converse 2f6528537f rv10/20: Fix a buffer overread caused by losing track of the remaining buffer size.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-02 09:31:32 -08:00
Martin Storsjö b087ce2bee g722: Fix the QMF scaling
This fixes clipping if the encoder input used the full 16 bit
input range (samples with a magnitude below 16383 worked fine).
The filtered subband samples should be 15 bit maximum, while
the code earlier produced them scaled to 16 bit.

This makes the decoder output have double the magnitude
compared to before.

The spec reference samples doesn't test the QMF at all, which
was why this part slipped past initially.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-02 18:58:19 +02:00
Derek Buitenhuis f604eab30a wavpack: Fix an integer overflow
Integer Overflow Checker detected an integer
overflow while FATE was running.

See: http://fate.libav.org/x86_64-linux-ioc/

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-03-02 08:26:36 +01:00
Diego Biurrun 1c4717be4f mjpegdec: use correct variable in av_log invocation
libavcodec/mjpegdec.c:1463: warning: format ‘%x’ expects type ‘unsigned int’, but argument 5 has type ‘const uint8_t *’
2012-03-01 23:11:15 +01:00
Diego Biurrun 324deaa268 Replace AVFrame pointer type punning by proper struct member assignments. 2012-03-01 23:11:13 +01:00
Diego Biurrun 47c0ac96aa Replace AVFrame pointer casts by proper struct member accesses. 2012-03-01 23:11:11 +01:00
Diego Biurrun 562b6c744a Remove unnecessary AVFrame pointer casts. 2012-03-01 23:11:10 +01:00
Diego Biurrun 2f4b476e04 msmpeg4: Split encoding backend code off from general backend code. 2012-03-01 23:11:09 +01:00
Anton Khirnov eb727387fd lavc: shrink encoded video packet size after encoding.
Based on a patch by Nicolas George <nicolas.george <at> normalesup.org>
2012-03-01 22:21:35 +01:00
Ronald S. Bultje 0ce4fe482c h264: error out on invalid bitdepth.
Fixes invalid reads while initializing the dequant tables, which uses
the bit depth to determine the QP table size.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-01 12:15:51 -08:00
Christophe Gisquet cc412b7104 aacsbr: use a swap index for the Y matrix rather than copy buffers.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-03-01 11:03:00 -08:00
Ronald S. Bultje 63c9de6469 huffyuv: do not abort on unknown pix_fmt; instead, return an error.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-01 10:23:36 -08:00
Ronald S. Bultje bd17a40a7e lcl: return negative error codes on decode_init() errors.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-01 07:12:29 -08:00
Martin Storsjö bdc1220eeb h263enc: Add an option for outputting info about MBs as side data
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-01 16:08:31 +02:00
Martin Storsjö 442c1320e7 avpacket: Add a function for shrinking already allocated side data
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-03-01 16:08:30 +02:00
Vitor Sessak 5cd1337f5d nellymoserdec: Saner and faster IMDCT windowing
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-29 15:38:35 -08:00
Vitor Sessak 882abda5a2 amrnbdec: check frame size before decoding.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-29 14:13:58 -08:00
Ronald S. Bultje 8a9faf33f2 cscd: use negative error values to indicate decode_init() failures.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-29 14:04:23 -08:00
Ronald S. Bultje d1604b3de9 h264: prevent overreads in intra PCM decoding.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-29 13:17:34 -08:00
Vitor Sessak 9b4cd58611 mpegaudiodec: use DSPUtil.butterflies_float().
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-29 12:12:50 -08:00
Ronald S. Bultje 07a180972f vmnc: return error on decode_init() failure.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-29 11:58:27 -08:00
Justin Ruggles a45a1ea521 libvorbis: add/update error messages
also use AVERROR codes for some return values instead of -1
2012-02-29 14:54:25 -05:00
Justin Ruggles 592c4dbc7e libvorbis: use AVFifoBuffer for output packet buffer
simplifies the code and does less memmove()
2012-02-29 14:54:24 -05:00
Justin Ruggles 1fe7c1be54 libvorbis: remove unneeded e_o_s check
vorbis_bitrate_flushpacket() does not return any packets that should not be
output in the bitstream.
2012-02-29 14:54:24 -05:00
Justin Ruggles 94025d8a99 libvorbis: check return values for functions that can return errors 2012-02-29 14:54:24 -05:00
Justin Ruggles c5063e0348 libvorbis: use float input instead of s16
libvorbis takes float input, so we can just deinterleave/reorder the input
as-is instead of also converting.
2012-02-29 14:54:24 -05:00
Justin Ruggles f15c4281dc libvorbis: do not flush libvorbis analysis if dsp state was not initialized
Fixes a segfault if init() fails before initializing the dsp state
2012-02-29 14:54:23 -05:00
Justin Ruggles 147ff24a0e libvorbis: use VBR by default, with default quality of 3 2012-02-29 14:54:20 -05:00
Justin Ruggles 182d4f1f38 libvorbis: fix use of minrate/maxrate AVOptions
- enable the options for audio encoding
- properly check for user-set maxrate
- use correct calling order in vorbis_encode_setup_managed()
2012-02-29 14:44:15 -05:00
Justin Ruggles eb35ef2932 libvorbis: cosmetics: renaming/pretty-printing/comments/unused code 2012-02-29 14:44:15 -05:00
Justin Ruggles 4e99501f62 (e)ac3enc: select a default bit rate based on the channel layout 2012-02-29 14:36:00 -05:00
Justin Ruggles 6aeea1dfb2 ac3enc: choose the closest bit rate to the one requested instead of failing 2012-02-29 14:36:00 -05:00
Ronald S. Bultje 78e9852a2e rpza: error out on buffer overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-29 11:21:01 -08:00
Ronald S. Bultje e54ae60e46 qtrle: return error on decode_init() failure.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-29 11:20:29 -08:00
Martin Storsjö 85b221e4d3 dpxenc: Don't include the libavcodec ident if bitexact mode is enabled
This avoids breaking fate every time the lavc version is bumped.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-29 20:08:09 +02:00
Kostya Shishkov 12b812d2e5 prores: store and retrieve extended colourspace information
Based on the patch by Phil Barrett.
2012-02-29 09:29:02 +01:00
Phil Barrett c7084182e8 proresenc: correct edge emulation
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-02-29 09:28:45 +01:00
Kostya Shishkov 235d693286 prores: handle 444 chroma in right order
ProRes codes chroma blocks in 444 mode in different order than luma blocks,
so make both decoder and encoder read/write chroma blocks in right order.

Reported by Phil Barrett
2012-02-29 09:28:34 +01:00
Anton Khirnov 23bfcc066d mpegvideo_enc: add quantizer_noise_shaping private option.
Deprecate corresponding AVCodecContext field.
2012-02-29 07:26:24 +01:00
Anton Khirnov 16b7557b79 lavc: deprecate AVCodecContext.inter_threshold.
It's unused.
2012-02-29 07:25:44 +01:00
Anton Khirnov 4f07f8196c lavc: deprecate AVCodecContext.color_table_id.
It's currently only used as temporary storage by the mov demuxer. Make
it use a local variable instead.
2012-02-29 07:25:00 +01:00
Anton Khirnov 63efd83ae1 mpegvideo_enc: add chroma/luma_elim_threshold private options.
Deprecate corresponding AVCodecContext fields.
2012-02-29 07:23:31 +01:00
Anton Khirnov af3d804f9f mpegvideo_enc: add cbp_rd flag to mpv_flags.
Deprecate CODEC_FLAG_CBP_RD.
2012-02-29 07:13:58 +01:00
Anton Khirnov ff71a383ac mpegvideo_enc: add qp_rd flag to mpv_flags.
Deprecate CODEC_FLAG_QP_RD.
2012-02-29 07:12:10 +01:00
Anton Khirnov a249f0cc23 mpegvideo_enc: add strict_gop flag to mpv_flags.
Deprecate CODEC_FLAG2_STRICT_GOP.
2012-02-29 07:11:02 +01:00
Anton Khirnov ed019b8e5b lavc: add -mpv_flags to mpegvideo_enc-based encoders.
Deprecate CODEC_FLAG2_SKIP_RD in favor of the corresponding mpv_flags
flag.
2012-02-29 07:09:29 +01:00
Michael Niedermayer 956fb91e03 aacdec: Support stereo streams that erroneously signal predefined channel configuration 1 (mono).
[alex.converse@mgail.com]
Move code to get_che()
Update for AAC new channel configuration interface
Only set chan_config if output_configure succeeds.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-02-28 21:38:16 -08:00
Alex Converse 2564f6e6d4 aacdec: Reshuffle functions so get_che() can call set_default_channel_config() and output_configure(). 2012-02-28 21:38:15 -08:00
Ronald S. Bultje 8bc396fc0e vp56: error out on invalid stream dimensions.
Prevents crashes when playing corrupt vp5/6 streams.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-28 16:41:58 -08:00
Alex Converse bbeb29133b adpcm: Clip step_index values read from the bitstream at the beginning of each frame.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-02-28 12:11:06 -08:00
Diego Biurrun cfac648e6a doxygen: Remove documentation for non-existing parameters; misc small fixes. 2012-02-28 20:48:43 +01:00
Ronald S. Bultje fc9bc08dca Indeo3: fix crashes on corrupt bitstreams.
Splits at borders of cells are invalid, since it leaves one of the
cells with a width/height of zero. Also, propagate errors on buffer
allocation failures, so we don't continue decoding (which crashes).

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-28 10:34:35 -08:00
Diego Biurrun bd7a647c0d msmpeg4: Replace forward declaration by proper #include. 2012-02-28 15:36:47 +01:00
Alex Converse 5e239c7f9e aacdec: Remove erroneous reference to global gain from the out of bounds scalefactor error message. 2012-02-27 17:59:47 -08:00
Diego Biurrun d10319d87f avcodec_default_reget_buffer(): fix compilation in DEBUG mode 2012-02-27 20:58:43 +01:00
Ronald S. Bultje b0c4f04338 h264: fix mmxext chroma deblock to use correct TC values. 2012-02-27 09:38:44 -08:00
Anton Khirnov b1edfce08a lavc: reorder AVCodecContext fields.
Put related fields together, move the important ones closer to the
beginning, try to eliminate holes.
2012-02-27 07:09:43 +01:00
Anton Khirnov 1d428004c6 lavc: reorder AVFrame fields.
Put related fields together, move the important ones closer to the
beginning, try to eliminate holes.
2012-02-27 07:07:25 +01:00
Reinhard Tartler 790a367d9e Fix parser not to clobber has_b_frames when extradata is set.
Because in contrast to the decoder, the parser does not setup low_delay.
The code in parse_nal_units would always end up setting has_b_frames
to "1", except when stream is explicitly marked as low delay.
Since the parser itself would create 'extradata', simply reopening
the parser would cause this.

This happens for instance in estimate_timings_from_pts(), which causes the
parser to be reopened on the same stream.

This fixes Libav #22 and FFmpeg (trac) #360

CC: libav-stable@libav.org

Based on a patch by Reimar Döffinger <Reimar.Doeffinger@gmx.de>
(commit 31ac0ac29b)

Comments and description adapted by Reinhard Tartler.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-02-26 15:50:59 +01:00
Paul B Mahol 42459c6abb cdxl: bit line plane arrangement support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-26 00:04:32 -05:00
Paul B Mahol cf6914e27f cdxl: remove early check for bpp
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-26 00:04:32 -05:00
Paul B Mahol 126daeb550 cdxl: set pix_fmt PAL8 only if palette is available
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-26 00:04:32 -05:00
Tim Walker 0a9efe4c6e mlp_parser: fix the channel mask value used for the top surround channel
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-25 17:24:43 -05:00
Justin Ruggles be8d812c96 vorbisenc: check all allocations for failure 2012-02-25 11:49:43 -05:00
Justin Ruggles f7a2e12f2a roqaudioenc: return AVERROR codes instead of -1 2012-02-25 11:49:43 -05:00
Justin Ruggles 3fa9a999c1 roqaudioenc: set correct bit rate 2012-02-25 11:49:43 -05:00
Justin Ruggles cf57c78b77 roqaudioenc: use AVCodecContext.frame_size correctly.
It is not allowed to change mid-stream like it does currently. Instead we need
to buffer the first 8 frames before returning them as a single packet, then
only return single frame packets after that.
2012-02-25 11:49:43 -05:00
Justin Ruggles 56279f1d61 roqaudioenc: remove unneeded sample_fmt check 2012-02-25 11:49:43 -05:00
Justin Ruggles 4b7f8838e8 ra144enc: use int16_t* for input samples rather than void* 2012-02-25 11:49:43 -05:00
Justin Ruggles 03359ebcf9 ra144enc: set AVCodecContext.coded_frame 2012-02-25 11:49:43 -05:00
Justin Ruggles a65f7c96fc ra144enc: remove unneeded sample_fmt check 2012-02-25 11:49:42 -05:00
Justin Ruggles 928672f1f1 nellymoserenc: set AVCodecContext.coded_frame 2012-02-25 11:49:42 -05:00
Justin Ruggles 370b44cda2 nellymoserenc: improve error checking in encode_init() 2012-02-25 11:49:42 -05:00
Justin Ruggles 333506c33f nellymoserenc: return AVERROR codes instead of -1 2012-02-25 11:49:42 -05:00
Justin Ruggles 6f600ab354 libvorbis: improve error checking in oggvorbis_encode_init() 2012-02-25 11:49:42 -05:00
Justin Ruggles be60eec668 mpegaudioenc: return AVERROR codes instead of -1 2012-02-25 11:49:42 -05:00
Justin Ruggles 7a8cbb39f6 libfaac: improve error checking and handling in Faac_encode_init() 2012-02-25 11:49:42 -05:00
Justin Ruggles a8bdf2405c check for coded_frame allocation failure in several audio encoders 2012-02-25 11:49:41 -05:00
Justin Ruggles 255ad8881d audio encoders: do not set coded_frame->key_frame.
it is already set in avcodec_alloc_frame()
2012-02-25 11:49:41 -05:00
Justin Ruggles 8e2555d3b1 g722enc: check for trellis data allocation error 2012-02-25 11:49:41 -05:00
Justin Ruggles ca300d938b libspeexenc: export encoder delay through AVCodecContext.delay 2012-02-25 11:49:41 -05:00
Justin Ruggles 7600e5c5aa avcodec: document the use of AVCodecContext.delay for audio encoders 2012-02-25 11:49:41 -05:00
Ronald S. Bultje 6c4c27adb6 kgv1: release reference picture on size change.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-25 07:53:44 -08:00
Anton Khirnov 03ca0a5b30 lavc: merge two if()s with the same condition. 2012-02-25 07:48:52 +01:00