14523 Commits

Author SHA1 Message Date
Michael Niedermayer
1979a9b4f2 h264: change MAX_DELAYED_PIC_COUNT check to av_assert0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b955ab2f492e3b8c4cbf614f68f8d5bf79e1d1e1)
2011-09-21 17:56:14 +02:00
Laurent Aimar
d805b8f454 rv34: Check for invalid slice offsets
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 4cc7732386eb36661ed22d1200339b38a5fa60bc)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 14:40:36 +02:00
Laurent Aimar
a01387bb35 rv34: Fix potential overreads
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit b4ed3d78cb6c41c9d3ee5918c326ab925edd6a89)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 14:40:36 +02:00
Laurent Aimar
11b72c073c rv34: Avoid NULL dereference on corrupted bitstream
rv34_decode_slice() can return without allocating any pictures.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit d0f6ab0298f2309c6104626787ed73416298b019)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 14:40:36 +02:00
Laurent Aimar
bb6702f206 rv10: Reject slices that does not have the same type as the first one
This prevents crashes with some corrupted bitstreams.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 4a29b471869353c3077fb4b25b6518eb1047afb7)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 14:40:34 +02:00
Laurent Aimar
6ddb12b688 Fixed size given to init_get_bits().
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
(cherry picked from commit b59efc94347ccf0cbc2ff14a5a9e99819c5bdc4d)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 14:28:31 +02:00
Michael Niedermayer
c34968c6d4 smacker: fix a few off by 1 errors
stereo & 16bit is untested due to lack of samples

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 5166376f24545207607f61ed8ff4e1b0572ff320)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 14:28:20 +02:00
Laurent Aimar
a5107aab98 Check for invalid VLC value in smacker decoder.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 6489455495fc5bfbebcfe3f57e5d4fdd6a781091)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 14:28:14 +02:00
Laurent Aimar
bc2dd37e4f Check and propagate errors when VLC trees cannot be built in smacker decoder.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 9676ffba8346791f494451e68d2a3b37a2918a9b)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-21 14:28:10 +02:00
Alex Converse
dc6ee18363 xan: Add some buffer checks
(cherry picked from commit 0872bb23b4bd2d94a8ba91070f706d1bc1c3ced8)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-13 17:25:35 +02:00
Laurent Aimar
bb0c352ec5 Fixed size given to init_get_bits() in xan decoder.
(cherry picked from commit 393d5031c6aaaf8c2dda4eb5d676974c349fae85)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-13 17:25:29 +02:00
Laurent Aimar
c11d360ebc Fixed segfault with wavpack decoder on corrupted decorrelation terms sub-blocks.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 8bfea4ab4e2cb32bc7bf6f697ee30a238c65d296)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Alex Converse
dd6334a1e4 cljr: init_get_bits size in bits instead of bytes
(cherry picked from commit 0c1f5b93d9b97c4cc3684ba91a040e90bfc760d2)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Alex Converse
6b1af6a328 indeo2: fail if input buffer too small
(cherry picked from commit b7ce4f1d1c3add86ece7ca595ea6c4a10b471055)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Alex Converse
1656dd7a4e indeo2: init_get_bits size in bits instead of bytes
(cherry picked from commit 68ca330cbd479111db9cb7649d7530ad59f04cc8)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Laurent Aimar
144c80042b ffv1: Fixed size given to init_get_bits() in decoder.
init_get_bits() takes a number of bits and not a number of bytes as
its size argument.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
(cherry picked from commit 46b004959bb7870a361a57272cd5fa7eea34250b)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Alex Converse
a460d9e1f7 wavpack: Check error codes rather than working around error conditions.
(cherry picked from commit dba2b63a98bdcac7bda1a8a2c48950518c075e17)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Laurent Aimar
94af9cf46b Fixed invalid access in wavpack decoder on corrupted bitstream.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 55354b7de21e7bb4bbeb1c12ff55ea17f807c70c)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Laurent Aimar
46d9dd6980 Fixed invalid writes in wavpack decoder on corrupted bitstreams.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 0aedab03405849962b469277afe047aa2c61a87f)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Laurent Aimar
a652bb2857 Fixed invalid access in wavpack decoder on corrupted extra bits sub-blocks.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit beefafda639dd53fc59c21d8a7cf8334da9a1062)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Anton Khirnov
7850a9b384 lavc: fix type for thread_type option
It should be flags, not int.
(cherry picked from commit fb47997edb9d8ff16fc380d005a08c0545624aa6)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Alberto Delmás
526f24e3fd VC1: Fix first/last row checks with slices
In some places 0/mb_height were used in place of start_mb_y/end_mb_y.

Fixes SA00049, SA00058, SA10091, SA10097, SA10131, SA20021, SA30030

Improves PSNR in SA00054, SA00059, SA00060, SA10096, SA10098, SA20022,
SA30031, SA30032, SA40012, SA40013

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 1cf82cab0840d669198ea76ab0363aa661950647)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:04:32 +02:00
Ronald S. Bultje
a8edc1cbc7 vc1: properly zero coded_block[] edges on new slice entry.
Previously, we would leave the left edge uninitialized, which led to
CBP prediction errors on slice edges, e.g. in SA10098.vc1.
(cherry picked from commit d4b9974465baf893e90527a366e7a7411ded1ef8)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:04:20 +02:00
Anton Khirnov
f45cfb4751 lavc: remove vbv_delay option
It's broken and serves no purpose as it's a read-only field.
(cherry picked from commit 8ee18b4bee24f99e733cf1425894e82c25d02426)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:03:38 +02:00
Jeff Downs
566d26923e h264: fix PCM intra-coded blocks in monochrome case
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 6581e161c5f46733a5619208483de29416eb9a51)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:03:01 +02:00
Jeff Downs
767efcb46e h264: correct implicit weight table computation for long ref pics
Correct computation of implicit weight tables when referencing pictures
that are marked for long reference.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 87cf70eb237e7586cc7399627dafa1b980ec0b7d)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:02:55 +02:00
Jeff Downs
cb9ccc89c5 h264: correct the check for invalid long term frame index in MMCO decode
The current check on MMCO parameters prohibits a "max long term frame index
plus 1" of 16 (frame idx of 15) for the "set max long term frame index" MMCO.
Fix this off-by-one error to allow the full range of legal values.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 29a09eae9a827f4dbc9c4517180d8fe2ecef321a)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:02:49 +02:00
Alex Converse
5925e25218 aac: Only output configure if audio was found.
Audio found is not triggered on a CCE because a CCE alone has no output.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit d8425ed4af6d8fce62ff363cc590f85e57bac06b)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:02:23 +02:00
Kostya Shishkov
303e48e6a2 rv10/20: tell decoder to use edge emulation
This removes out-of-edge motion compensation artifacts (easily spotted green
blocks in avplay, gray blocks in transcoding), for example here:
http://samples.libav.org/samples/real/tv_watching_t1.rm

Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 331971116d7d36743601bd2dc5384c5211d3bb48)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:01:32 +02:00
Reimar Döffinger
210d8f4ca2 VC-1: fix reading of custom PAR.
Custom PAR num/denum are in 1-256 range.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 0e8696551414d4ea0aab2559f9475d1fe49d08f3)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:00:21 +02:00
Dustin Brody
cc4718196a h264: notice memory allocation failure
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit bac3ab13ea6a9dd8853e79ef3eacf51d234c8774)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:59:09 +02:00
Justin Ruggles
f629fcd308 Remove incorrect info in documentation of AVCodecContext.bits_per_raw_sample.
bits_per_raw_sample is used in video as well, where sample_fmt is not used.
(cherry picked from commit d271d5b2152cafe540f3ab71d3be6ce8636d2fd6)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:58:39 +02:00
Baptiste Coudurier
b8fa424ce2 libx264: do not set pic quality if no frame is output
Avoids uninitialized reads.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 5caa2de19ece830e32c95731bc92a423d55cff0c)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:58:04 +02:00
Edgar Hucek
3af3a871af Fix VA-API decoding artefacts.
Fixes ticket #457.
(cherry picked from commit 3fec40b601827e75aae9f0baa47671af15de181a)
2011-09-11 12:56:54 +02:00
Alex Converse
82d7ad3344 aac: Remove some suspicious illegal memcpy()s from LTP.
(cherry picked from commit a6c49f18abacb9bf52d4d808a2a56561a5b5445c)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:53:16 +02:00
Ronald S. Bultje
8abaa83d2c vp3/theora: flush after seek.
(cherry picked from commit 8dcf5184307f072d55fb29373be05ef8b0fd02df)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:51:55 +02:00
Diego Biurrun
8e0a53bd34 rv30: return AVERROR(EINVAL) instead of EINVAL
On some platforms EINVAL could be positive, ensure we return negative values.
(cherry picked from commit e5985185d2eda942333ebbb72bd7d043ffe40be7)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:50:17 +02:00
Mans Rullgard
ba19cb6885 Fix incorrect max_lowres values
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e23a05ab0605693aa715b95120bc0132079ded06)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:48:27 +02:00
Rafaël Carré
3b80fb50d8 Do not decode RV30 files if the extradata is too small
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 289c60001fb0a9a1d7a97c876d8a42b84c6874ac)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:46:55 +02:00
Mans Rullgard
fe7deb7cc4 aacps: skip some memcpy() if src and dst would be equal
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit e5902d60ce8f7cf10b6e87a57eec536b316261a3)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:46:11 +02:00
Mans Rullgard
266ec41f77 ARM: workaround for bug in GNU assembler
Some versions of the GNU assembler do not handle 64-bit
immediate operands containing arithmetic.  Writing the
value out in full works correctly.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit fce1e43410bdc032c4cf2b1c66166a9ed99cc8f1)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:24:32 +02:00
John Stebbins
0ab69793fc dca: set AVCodecContext frame_size for DTS audio
Set the frame size when decoding DTS audio.

This has the side effect of fixing the computation of timestamps for DTS-HD in compute_pkt_fields.  Since frame_size is
not currently set, the duration of a frame is being guessed based on the streams bitrate.  But for DTS-HD, the bitrate
currently used is the rate of the DTS core which is much different than the whole DTS-HD stream and leads to a wildly
inaccurate frame duration estimate.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 49c7006c7e815d4330247624a9e6ba30e288cd02)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:22:51 +02:00
Jason Garrett-Glaser
fa38ed8ac0 H.264: fix overreads of qscale_table
filter_mb_fast assumed that qscale_table was padded like many of the other tables.
(cherry picked from commit 5029a406334ad0eaf92130e23d596e405a8a5aa0)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:22:22 +02:00
Alex Converse
48ba48fb13 wavpack: Check error codes rather than working around error conditions.
(cherry picked from commit dba2b63a98bdcac7bda1a8a2c48950518c075e17)
2011-09-10 05:38:02 +02:00
Laurent Aimar
e1baba3ddb Fixed invalid access in wavpack decoder on corrupted bitstream.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 55354b7de21e7bb4bbeb1c12ff55ea17f807c70c)
2011-09-08 23:48:42 +02:00
Laurent Aimar
399f7e0e75 Fixed invalid writes in wavpack decoder on corrupted bitstreams.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 0aedab03405849962b469277afe047aa2c61a87f)
2011-09-08 23:48:42 +02:00
Laurent Aimar
90edd5df3d Fixed invalid access in wavpack decoder on corrupted extra bits sub-blocks.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit beefafda639dd53fc59c21d8a7cf8334da9a1062)
2011-09-08 23:48:42 +02:00
Chris Rankin
b2c9e9be87 mp3dec: Dont spam the user on multiple mp3 frames.
(cherry picked from commit 54e1eaef6787104083cbc9c9834ea4d13612df9f)
2011-09-08 21:14:10 +02:00
Michael Niedermayer
b6187e48db cavsdec: avoid possible crash with crafted input
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9f06c1c61e876e930753da200bfe835817e30a53)
2011-09-07 14:59:29 +02:00
Michael Niedermayer
eb975b1c8b mjpegdec; even better RSTn skiping
Fixes Ticket426

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit be7eed72c89368de70dbf8749eca1dac7443e51a)
2011-09-07 00:31:14 +02:00