31198 Commits

Author SHA1 Message Date
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
Anton Khirnov
de33e8675c AVOptions: fix av_set_string3() doxy to match reality.
Fixes bug 28.
(cherry picked from commit e955a682e125d44143415ff2b96a99a4dac78da2)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Sean McGovern
fe9dae6df8 cpu detection: avoid a signed overflow
1<<31 overflows because 1 is signed, so force it to unsigned.

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:09:35 +02:00
Michael Niedermayer
a7d35b2f99 vf_scale: don't leak SWS context.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 52982dbe474663709033e1ad259f8ff7a5a2eefa)

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
Luca Barbato
e30e0a16af flvenc: use int64_t to store offsets
Metadata currently is written only at the start of the file in normal
cases, when transcoding from a rtmp source metadata could be
written later and the offset recorded can exceed 32bit.

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 13:00:45 +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
Alex Converse
c5388d680e mxfdec: Include FF_INPUT_BUFFER_PADDING_SIZE when allocating extradata.
This prevents out of bounds reads when extradata is being decoded.
(cherry picked from commit 1f6f58d5855288492fc2640a9f1035c01c75d356)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:52:48 +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
Anton Khirnov
44b3f05309 lavf: fix segfault in av_open_input_stream()
ic is NULL in case of error.
(cherry picked from commit 13551ad1e336573e3732fdeaf25607c47244bb80)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:34:05 +02:00
Oskar Arvidsson
dc3ab8ca43 pix_fmt: Fix number of bits per component in yuv444p9be
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit e59d6b4d7255d6d3dc89580f534e18af1433fe25)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:33:25 +02:00
Jindrich Makovicka
e308a91c9c mpegts: fix Continuity Counter error detection
According to MPEG-TS specs, the continuity_counter shall not be
incremented when the adaptation_field_control of the packet
equals '00' or '10'.

Signed-off-by: Jindrich Makovicka <jindrich.makovicka@nangu.tv>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 8923cfa328e8eb565aebcfe8672b276fd1c19bf7)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:32:56 +02:00
Justin Ruggles
207db36a4f alsa: limit buffer_size to 32768 frames.
In testing, the file output plugin gave a max buffer size of about 20 million
frames, which is way more than what is really needed and causes a memory
allocation error on my system.
(cherry picked from commit e35c674d13a7f180412cfe058530a2e7f1d49a90)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:31:40 +02:00
Justin Ruggles
9bf76932e5 alsa: fallback to buffer_size/4 for period_size.
buffer_size/4 is the value used by aplay. This fixes output to null
devices, e.g. writing ALSA output to a file.
(cherry picked from commit 8bfd7f6a475225a0595bf657f8b99a8fffb461e4)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:31:36 +02:00
Tomas Härdin
91f9c7917c gxf: Fix 25 fps DV material in GXF being misdetected as 50 fps
Set DV packet durations using fields_per_frame.
This requires turning gxf_stream_info into the demuxer's context for access to the value in gxf_packet().
Since MPEG-2 seems to work fine this done only for DV.

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

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:30:04 +02:00
Anton Khirnov
fa75093381 Revert "ffmpeg: get rid of useless AVInputStream.nb_streams."
This reverts commit 2cf8355f98681bdd726b739008acd5483f82f8d7.
AVInputStream.nb_streams tracks number of streams found at the
beginning, new streams may appear that ffmpeg doesn't know about. Fixes
crash in this case.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:29:09 +02:00
Alex Converse
baec70e16f adts: Fix PCE copying.
Parse the extension flag bit when reading the MPEG4 AudioSpecificConfig.

This has nothing to do with SBR/PS contradictory to what was noted when it was removed.
(cherry picked from commit 7f01a4192cdf4565eadee457f76e6b5196e35e0b)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:26:10 +02:00
Ronald S. Bultje
2649439bbd eval: fix memleak.
(cherry picked from commit fe277b16f0861a327e1f6c00c0dbb8b00806d60d)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:24:55 +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
Clément Bœsch
694279bfd2 mxfenc: fix ignored drop flag in binary timecode representation.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 4d5e7ab5c48451404038706ef3113c9925a83087)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:23:05 +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
Ronald S. Bultje
acf2d3293c swscale: don't use planar output functions to write to NV12/21.
This prevents a crash when converting to NV12/21 without the bitexact
flags enabled.
(cherry picked from commit 0d994b2f45c08794899057ee7ca54f48218c0a53)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-09-11 12:12:18 +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