Commit Graph

15776 Commits

Author SHA1 Message Date
Justin Ruggles 59041fd053 g726enc: use AVCodec.encode2() 2012-03-20 18:47:23 -04:00
Justin Ruggles bb03b6f7b1 g722enc: use AVCodec.encode2()
FATE reference updated due timestamp rounding because of resampling from
44100 Hz to 16000 Hz in avconv.
2012-03-20 18:47:23 -04:00
Justin Ruggles 910bdb9a42 flacenc: use AVCodec.encode2() 2012-03-20 18:47:19 -04:00
Justin Ruggles 24e74f0a0f adpcmenc: update to AVCodec.encode2() 2012-03-20 18:46:57 -04:00
Justin Ruggles aa872af5e3 ac3enc: update to AVCodec.encode2()
Update FATE references due to encoder delay.
2012-03-20 18:46:56 -04:00
Justin Ruggles ad95307f92 aacenc: use AVCodec.encode2() 2012-03-20 18:46:49 -04:00
Justin Ruggles 4bf64961a9 avcodec: add code for a frame queue for use by audio encoders with delay
This simplifies matching of timestamps between input frames and output
packets.
2012-03-20 16:04:21 -04:00
Justin Ruggles f63412fc74 oggdec: output correct timestamps for Vorbis
Takes encoder delay into account by comparing first the coded page
duration with the calculated page duration. Handles last packet duration
if needed, also by comparing coded duration with calculated duration.
Also does better handling of timestamp generation for packets in the
first page for streamed ogg files where the start time is not
necessarily zero.
2012-03-20 14:39:57 -04:00
Justin Ruggles a1977e0103 lavc: shrink encoded audio packet size after encoding. 2012-03-20 14:12:54 -04:00
Kostya Shishkov 1d10afd581 bink: fix typo in FFALIGN() argument 2012-03-20 18:57:51 +01:00
Kostya Shishkov 8ae28ac0f3 bink: align plane width to 8 when calculating bundle sizes
This fixes decoding of Bink files with non-multiple-of-16 width.
2012-03-20 16:33:57 +01:00
Anton Khirnov 4fea8959d8 doc/avconv: remove entries for AVOptions.
Documentation for those will be generated automatically.
2012-03-20 07:09:54 +01:00
Anton Khirnov 5626697104 Move AVFormatContext/AVCodecContext option tables to separate files.
This will allow us to automatically generate manpages for them.
2012-03-20 07:09:18 +01:00
Aaron Colwell 30011bf201 vp8: avoid race condition on segment map.
This change avoids accessing the segment map of the previous frame if
segmentation is not enabled for the current frame. The caller of
decode_mb_mode() only calls ff_thread_await_progress() on the reference
segmentation index array if segmentation is enabled, so Chromium's TSAN
will report a race when accessing this data while segmentation is not
enabled.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-03-19 13:49:34 -07:00
Derek Buitenhuis 0e714f889e ZeroCodec Decoder
An obscure Japanese lossless video codec, originally intended
for use with a remote desktop application.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-03-19 19:02:23 +01:00
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