Commit Graph

16697 Commits

Author SHA1 Message Date
Justin Ruggles
c1a9cfd1fe mace: use planar sample format 2012-10-09 09:03:51 -04:00
Justin Ruggles
23d53c5473 atrac1: use planar sample format 2012-10-09 09:03:51 -04:00
Diego Biurrun
ac56ff9cc9 build: non-x86: Only compile mpegvideo optimizations when necessary 2012-10-09 14:45:59 +02:00
Janne Grunau
3fbda309e5 avcodec: free extended_data instead address of it
Fixes CID732173.
2012-10-09 14:04:46 +02:00
Diego Biurrun
f75f4194d1 Restructure av_log_missing_feature message
Some invocations include a verb in the log message, others do not.  Yet
av_log_missing_feature expects callers to provide a verb.  Change the
function to include a verb instead and update the callers accordingly.
The result is a more natural function API and correct English in the
function invocations.
2012-10-09 11:39:26 +02:00
Mans Rullgard
f79364b2c3 ppc: fix Altivec build with old compilers
The vec_splat() intrinsic requires a constant argument for the
element number, and the code relies on the compiler unrolling
the loop to provide this.  Manually unrolling the loop avoids
this reliance and works with all compilers.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-08 23:14:51 +01:00
Janne Grunau
7e522859fc x86: vc1: call ff_vc1dsp_init_x86() under if (ARCH_X86) 2012-10-08 11:54:05 +02:00
Janne Grunau
cb36febcbc x86: cavs: call ff_cavsdsp_init_x86() under if (ARCH_X86) 2012-10-08 11:54:05 +02:00
Janne Grunau
f101eab1be x86: call most of the x86 dsp init functions under if (ARCH_X86)
Rename the called dsp init functions to *_init_x86.
2012-10-08 11:54:05 +02:00
Anton Khirnov
716d413c13 Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat 2012-10-08 07:13:26 +02:00
Justin Ruggles
37f701f1c3 avcodec: allow either planar or interleaved sample format when encoding mono
When there is only 1 channel, the planar and interleaved formats of the same
data type should be treated as identical.
2012-10-07 16:45:50 -04:00
Justin Ruggles
5364327186 adpcmenc: ensure calls to adpcm_ima_compress_sample() are in the right order
Should fix fate-acodec-adpcm-ima_wav with several compilers.
2012-10-07 16:45:50 -04:00
Justin Ruggles
31b2262dca wmaenc: use float planar sample format 2012-10-06 13:23:13 -04:00
Justin Ruggles
b1540fc884 (e)ac3enc: use planar sample format 2012-10-06 13:23:13 -04:00
Justin Ruggles
f3e2d68df6 aacenc: use planar sample format 2012-10-06 13:23:13 -04:00
Justin Ruggles
095be4fbf6 adpcmenc: use planar sample format for adpcm_ima_wav and adpcm_ima_qt 2012-10-06 12:25:33 -04:00
Justin Ruggles
d9a13c2f56 adpcmenc: move 'ch' variable to higher scope
It is used for multiple codecs.
2012-10-06 12:25:33 -04:00
Justin Ruggles
9606f19b4e adpcmenc: fix 3 instances of variable shadowing 2012-10-06 12:25:33 -04:00
Justin Ruggles
1e35574bad adpcm_ima_wav: simplify encoding 2012-10-06 12:25:33 -04:00
Justin Ruggles
cfc0a80a1d libvorbis: use planar sample format 2012-10-06 12:25:32 -04:00
Justin Ruggles
473b297f26 libmp3lame: use planar sample formats 2012-10-06 12:25:32 -04:00
Justin Ruggles
233783e2c1 vorbisenc: use float planar sample format 2012-10-06 12:25:32 -04:00
Diego Biurrun
e4cbf7529b Give all anonymously typedeffed structs in headers a name
Anonymous structs cannot be forward declared and have no benefit.
2012-10-06 09:27:11 +02:00
Mans Rullgard
642b4efaf7 ppc: fmtconvert: kill VLA in float_to_int16_interleave_altivec()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-05 22:33:32 +01:00
Mans Rullgard
bcf07a15a0 x86: dsputil: kill VLA in gmc_mmx()
Instead of using an evil VLA, fall back to C version when edge
emulation is needed.  MPEG4 GMC is a rarely used fringe feature
so the speed loss is an acceptable cost for safer code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-05 22:33:32 +01:00
Dmitry Samonenko
f1c6a740fc libspeexenc: Updated commentary to reflect recent changes
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-05 23:29:24 +03:00
Dmitry Samonenko
978d5bd2a7 libspeexenc: Add an option for enabling DTX
Discontinuous transmission is an addition to VAD/VBR operation, that
allows to greatly reduce bitrate for silent chunks or stationary
noises.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-05 23:29:24 +03:00
Anton Khirnov
30223b3bf2 lavc: deprecate the audio resampling API.
It has been superseded by lavr.
2012-10-05 13:47:56 +02:00
Ronald S. Bultje
f6f7d15041 h264: don't touch H264Context->ref_count[] during MB decoding
The variable is copied to subsequent threads at the same time, so this
may cause wrong ref_count[] values to be copied to subsequent threads.

This bug was found using TSAN.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-10-05 02:49:45 +02:00
Diego Biurrun
1e164c0bcc build: Factor out mpegaudio dependencies to CONFIG_MPEGAUDIO
A new hidden config variable is added for the codecs that depend on the
mpegaudio parts.
2012-10-04 17:58:42 +02:00
Justin Ruggles
c9df48909e libspeexdec: handle NULL return value from speex_packet_to_header()
This will happen when the extradata is not a valid Speex header.
2012-10-03 18:26:25 -04:00
Janne Grunau
1481e19825 mpegvideo: set extended_data in ff_update_duplicate_context()
AVFrame.extended_data has to reset to the AVFrame.data of the current
thread context after copying the frame contents.
Fixes crashes with frame-threading after 2bc0de3858.
2012-10-03 22:08:49 +02:00
Justin Ruggles
45e5d0c3ac libspeexdec: properly handle DTX for multiple frames-per-packet 2012-10-03 16:03:32 -04:00
Justin Ruggles
908e22b93a libspeexdec: move the SpeexHeader from LibSpeexContext to where it is used 2012-10-03 16:03:32 -04:00
Justin Ruggles
892695c851 libspeexdec: simplify setting of frame_size 2012-10-03 16:03:32 -04:00
Justin Ruggles
27c3f9c03e libspeexdec: set channel_layout 2012-10-03 16:03:32 -04:00
Justin Ruggles
29abb04e73 libspeexdec: If the channel count is not valid, decode as stereo.
When initialized as stereo, libspeex can decode either mono or stereo packets
and will output stereo.
2012-10-03 16:03:32 -04:00
Justin Ruggles
3b061c5e10 libspeexdec: improve setting of Speex mode and sample rate
If there is no extradata and the sample rate given by the user is not valid,
decode as ultra-wideband.
2012-10-03 16:03:31 -04:00
Dmitry Samonenko
ad11681acd libspeex: Add a private option for enabling VAD
Speex detects non-speech periods and encodes them with just enough bits
to reproduce the background noise, aka ``comfort noise generation''.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-10-03 19:23:39 +03:00
Mans Rullgard
5e826fd65e ARM: set Tag_ABI_align_preserved in all asm files
All our ARM asm preserves alignment so setting this attribute
in a common location is simpler.  This removes numerous warnings
when linking with armcc.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-02 19:47:56 +01:00
Alex Converse
b92dfb56d4 tiffenc: Check av_malloc() results. 2012-10-01 17:46:44 -07:00
Alex Converse
9bc055e358 tiffenc: Simplify pixel format setup using AVPixFmtDescriptor. 2012-10-01 17:46:44 -07:00
Justin Ruggles
bfcd4b6a16 adpcmdec: set AVCodec.sample_fmts 2012-10-01 13:42:44 -04:00
Justin Ruggles
1478a3601e twinvq: use planar sample format 2012-10-01 13:42:44 -04:00
Justin Ruggles
a34be78546 ralf: use planar sample format 2012-10-01 13:42:44 -04:00
Justin Ruggles
1a3459033d mpc7/8: use planar sample format 2012-10-01 13:42:44 -04:00
Justin Ruggles
3fca0d7210 iac/imc: use planar sample format 2012-10-01 13:42:43 -04:00
Justin Ruggles
64c312aa29 dcadec: use float planar sample format 2012-10-01 13:42:43 -04:00
Justin Ruggles
cbf6ee7823 cook: use planar sample format 2012-10-01 13:42:43 -04:00
Justin Ruggles
9af4eaa8ea atrac3: use float planar sample format 2012-10-01 13:42:43 -04:00
Justin Ruggles
461ba7e97a apedec: output in planar sample format 2012-10-01 13:42:43 -04:00
Justin Ruggles
cf8c93ada4 8svx: use planar sample format 2012-10-01 13:42:43 -04:00
Nathan Caldwell
6cb8c85409 Opus encoder using libopus
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-10-01 14:42:40 +02:00
Diego Biurrun
d25fe4cc65 wmadec: Adjust debug printf argument length modifier 2012-10-01 12:46:41 +02:00
Diego Biurrun
1218777ffd avcodec: Convert some commented-out printf/av_log instances to av_dlog 2012-10-01 10:24:28 +02:00
Diego Biurrun
9c6cf7f2c9 avcodec: Drop silly and/or broken printf debug output 2012-10-01 10:24:28 +02:00
Diego Biurrun
6f6b0311a3 avcodec: Drop some silly commented-out av_log() invocations 2012-10-01 10:24:28 +02:00
Diego Biurrun
14d3e7ad11 Remove some silly disabled code. 2012-10-01 10:24:28 +02:00
Justin Ruggles
56b6a43056 ac3dec: ensure get_buffer() gets a buffer for the correct number of channels
If there is an error during frame parsing, but AVCodecContext.channels was
changed and AC3DecodeContext.out_channels was set previously, the two may not
match.

Fixes CVE-2012-2802
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

CC: libav-stable@libav.org
2012-10-01 00:10:59 -04:00
Jindřich Makovička
1a8c6917f6 h264: avoid stuck buffer pointer in decode_nal_units
When decode_nal_units() previously encountered a NAL_END_SEQUENCE,
and there are some junk bytes left in the input buffer, but no start codes,
buf_index gets stuck 3 bytes before the end of the buffer.

This can trigger an infinite loop in the caller code, eg. in
try_decode_trame(), as avcodec_decode_video() then keeps returning zeroes,
with 3 bytes of the input packet still available.

With this change, the remaining bytes are skipped so the whole packet gets
consumed.

CC:libav-stable@libav.org

Signed-off-by: Jindřich Makovička <makovick@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 19:31:17 +02:00
Anton Khirnov
0f583d20d5 mpeg12: fix the semantics of the int* parameter of decode()
It is got_output, not data_size.
2012-09-29 19:18:39 +02:00
Anton Khirnov
d9a2e87b1c mpeg12: move mpeg_decode_frame() lower
Avoids a forward declaration of decode_chunks().
2012-09-29 19:18:24 +02:00
Michael Niedermayer
85f477935c avsdec: Set dimensions instead of relying on the demuxer.
The decode function assumes that the video will have those dimensions.

Fixes CVE-2012-2801

CC:libav-stable@libav.org

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 19:18:07 +02:00
Michael Niedermayer
d65d834731 wmalosslessdec: Reset put bit buffer when num_saved_bits is reset.
Fixes CVE-2012-2799

CC:libav-stable@libav.org

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 19:17:38 +02:00
Anton Khirnov
d05f72c754 dfa: improve boundary checks in decode_dds1()
Fixes CVE-2012-2798

CC:libav-stable@libav.org
2012-09-29 19:17:07 +02:00
Anton Khirnov
6a99310fce wmalosslessdec: Fix reading too many bits in decode_channel_residues()
Fixes a part of CVE-2012-2795

CC:libav-stable@libav.org

Based on a patch by Michael Niedermayer <michaelni@gmx.at>

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-09-29 19:16:32 +02:00
Michael Niedermayer
f48fbf2eb5 wmalosslessdec: fix a get_bits(0) in decode_ac_filter
Fixes a part of CVE-2012-2795

CC:libav-stable@libav.org

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 19:15:27 +02:00
Michael Niedermayer
607f57152c wmalosslessdec: make MCLMS arrays big enough for what is written into them.
Fixes a part of CVE-2012-2795

CC:libav-stable@libav.org

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 19:14:25 +02:00
Anton Khirnov
ae3da0ae55 indeo4/5: check empty tile size in decode_mb_info().
This prevents writing into a too small array if some parameters changed
without the tile being reallocated.

Based on a patch by Michael Niedermayer <michaelni@gmx.at>

Fixes CVE-2012-2800

CC:libav-stable@libav.org

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-09-29 19:13:45 +02:00
Anton Khirnov
5d2170c53b ivi_common: make ff_ivi_process_empty_tile() static.
It's not used outside of ivi_common.c
2012-09-29 19:12:57 +02:00
Michael Niedermayer
2d09cdbaf2 indeo5: check tile size in decode_mb_info().
This prevents writing into a too small array if some parameters changed
without the tile being reallocated.

Fixes CVE-2012-2794

CC:libav-stable@libav.org

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 19:12:36 +02:00
Anton Khirnov
e4d4044339 indeo3: fix out of cell write.
Fixes CVE-2012-2776.

CC:libav-stable@libav.org

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-09-29 19:12:04 +02:00
Anton Khirnov
065b3a1cfa wmalosslessdec: increase channel_coeffs/residues size
Fixes CVE-2012-2792

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-09-29 10:29:53 +02:00
Anton Khirnov
4a969030e4 wmalosslessdec: increase WMALL_BLOCK_MAX_BITS to 14. 2012-09-29 10:29:52 +02:00
Michael Niedermayer
b631e4ed64 lagarith: check count before writing zeros.
Fixes CVE-2012-2793

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 09:28:32 +02:00
Michael Niedermayer
99f392a584 wmaprodec: check num_vec_coeffs for validity
Fixes CVE-2012-2789

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 09:28:15 +02:00
Michael Niedermayer
b146d74730 indeo4: update AVCodecContext width/height on size change
Fixes CVE-2012-2787

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 09:27:32 +02:00
Anton Khirnov
ee715f49a0 dfa: check that the caller set width/height properly.
Fixes CVE-2012-2786.
2012-09-29 09:27:08 +02:00
Michael Niedermayer
891918431d indeo5dec: Make sure we have had a valid gop header.
This prevents decoding happening on a half initialized context.

Fixes CVE-2012-2779

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 09:26:30 +02:00
Michael Niedermayer
c20a696306 cavsdec: check for changing w/h.
Our decoder does not support changing w/h.

Fixes CVE-2012-2777 and CVE-2012-2784.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 09:26:04 +02:00
Anton Khirnov
12e1e83461 lavc: set channel count from channel layout in avcodec_open2().
Some decoders (e.g. nellymoser) only set channel_layout and do not set
channel count.
2012-09-29 09:25:40 +02:00
Michael Niedermayer
791b5954bc dsputil_mmx: fix reading prior of the src array in sub_hfyu_median_prediction()
This should fix the utvideoenc valgrind failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-28 12:25:07 -04:00
Luca Barbato
97cfa55eea mpegaudiodec: fix short_start calculation
The value should be always 3, as it follows from the specification.

Fix a stack buffer overflow in exponents_from_scale_factors as reported
by asan. Thanks to Dale Curtis for the sample vector.
2012-09-28 16:02:39 +02:00
Nathan Caldwell
d16860a237 libopus: Remap channels using libopus' internal remapping.
This way we can directly remap channels from Opus' channel order to
libav's internal channel order, instead of mapping channels from
Opus' order to Vorbis' order then to libav's order.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-09-28 11:03:32 +02:00
Nicolas George
44617d6ec9 Opus decoder using libopus
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-09-28 11:03:20 +02:00
Nathan Caldwell
e4aa3831b7 avcodec: document the use of AVCodecContext.delay for audio decoding
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-09-28 10:50:07 +02:00
Kostya Shishkov
4dc8c8386e vc1dec: add flush function for WMV9 and VC-1 decoders
CC: libav-stable@libav.org
2012-09-28 07:08:54 +02:00
Diego Biurrun
6c5b0517e0 h264_refs: Fix debug tprintf argument types 2012-09-27 19:10:10 +02:00
Diego Biurrun
80412997c8 golomb: const correctness for get_ue()/get_se() function arguments 2012-09-27 19:10:10 +02:00
Diego Biurrun
e00215040a get_bits: const correctness for get_bits_trace()/get_xbits_trace() arguments 2012-09-27 19:10:10 +02:00
Diego Biurrun
4e5b7f31f7 dwt: Drop unused functions spatial_compose{53|97}i() 2012-09-27 12:08:09 +02:00
Diego Biurrun
0ae3ba8daa avcodec: Drop long-deprecated imgconvert.h header 2012-09-27 12:02:33 +02:00
Andrew D'Addesio
2a3d82ab46 Add Opus codec id and codec description.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-09-27 10:48:35 +02:00
Diego Biurrun
2dc1310484 truemotion2: Request samples for old TM2 headers 2012-09-26 19:10:13 +02:00
Alexandre Colucci
92d2b909a0 xsub: feed init_get_bits the whole buffer
Do not use rlelen field for buffer size in init_get_bits, it is
only the size of the data for the first field.
Since it is not reliable, just use the size of the whole buffer.

Additional comments add removal of unused rlelen variable by
Reimar Döffinger.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-09-25 22:28:53 +02:00
Martin Storsjö
375bff7084 libfdk-aac: Allow setting VBR modes via a private option
This avoids using the global_quality field and QSCALE flag for
passing the VBR modes, since the value range of the global_quality
field doesn't really map cleanly to this codec's VBR modes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-25 20:51:47 +03:00
Martin Storsjö
a10190dcd8 libfdk-aac: Warn the user that the VBR modes are unsupported
These modes were not originally exposed by the library at all.
In practice, only a few of them work for each sample rate/profile
combination, and they don't work at all for the more uncommon
sample rates.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-25 20:51:46 +03:00
Derek Buitenhuis
b62d4c16c9 Revert "cbrt_tablegen: Include libm.h"
This code runs on the host and should not use libm.h, which is meant
for the target.

This reverts commit 2768b71798.
2012-09-25 12:54:26 -04:00
Anton Khirnov
7a1a9dd56c pthread: make sure AVFrame.extended_data is set properly.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-09-25 12:03:23 +02:00
Nathan Caldwell
c8ba8be27e libfdk-aac: reindent after last commit
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-25 08:08:05 +03:00