Commit Graph

15102 Commits

Author SHA1 Message Date
Mashiat Sarker Shakkhar d51d6ae9c4 vc1dec.c: Don't use uninitialized values of dmv_[x, y]
MVDATA may or may not be transmitted. If it is not, both
dmv_x and dmv_y is to be assumed zero.

This may not trigger wrong picture in all systems, but
it's a bug nevertheless. Fixes SA10116.vc1 on my 64-bit
Windows 7.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-27 09:24:13 +08:00
Alex Converse b57d262412 mjpegbdec: Fix overflow in SOS.
Based in part by a fix from Michael Niedermayer <michaelni@gmx.at>

Fixes CVE-2011-3947

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-01-26 15:47:36 -08:00
Paul B Mahol 324e818093 8bps: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-01-26 22:44:37 +01:00
Alex Converse 9adf25c1cf smacker: Sanity check huffman tables found in the headers.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

CC: libav-stable@libav.org
2012-01-26 10:18:00 -08:00
Alex Converse 90c0c83e14 smacker: remove dead store 2012-01-26 10:17:04 -08:00
Alex Converse dac56d9ce0 qdm2: Check data block size for bytes to bits overflow.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

CC: libav-stable@libav.org
2012-01-26 10:17:04 -08:00
Hendrik Leppkes feaa40020b vc1: always read the bfraction element for interlaced fields
Previously, it would not be read if refdist_flag was not set, however
according to the spec and the reference decoder, it should always be read.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-01-26 15:19:27 +01:00
Alex Converse d78bb1a4b2 wma: Clip WMA1 and WMA2 frame length to 11 bits.
The MDCT buffers in the decoder are only sized for up to 11 bits. The
reverse engineered documentation for WMA1/2 headers say that that for
all samplerates above 32kHz 11 bits are used. 12 and 13 bit support
were added for WMAPro. I was unable to make any Microsoft tools generate
a test file at a samplerate above 48kHz.

Discovered by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

CC: libav-stable@libav.org
2012-01-25 12:31:37 -08:00
Janne Grunau c3e10ae412 rv20: prevent calling ff_h263_decode_mba() with unset height/width
Prevents a crash of VLC during playback of a invalid matroska file,
found by John Villamil <johnv@matasano.com>.

CC: libav-stable@libav.org
2012-01-25 16:18:54 +01:00
Diego Biurrun 07a873a277 build: Automatically include architecture-specific library Makefile snippets. 2012-01-25 15:04:28 +01:00
Janne Grunau 366ac22ea5 indeo5: prevent null pointer dereference on broken files
Found by John Villamil <johnv@matasano.com>
2012-01-25 14:31:57 +01:00
Diego Biurrun 33ad8c3cab cosmetics: Remove some unnecessary block braces. 2012-01-25 13:14:49 +01:00
Ronald S. Bultje c3af52fa8b dsputil: use vertical component for drawing bottom edge.
Current code only writes 8 pixels of vertical edge for YUV422, which
causes MC artifacts when subsequent frames use data from that edge.
2012-01-25 18:06:36 +08:00
Alex Converse efe68076da aacenc: Fix identification padding when the bitstream is already aligned. 2012-01-24 12:55:21 -08:00
Michael Niedermayer cdfe94c5ab aacenc: Write correct length for long identification strings.
When the length is the escape value (15), the new length is calculated by
15 + get_bits(8) - 1.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-24 12:54:59 -08:00
Justin Ruggles 02e7dbf5ad adpcm_ima_ws: fix stereo decoding
Stereo ADPCM IMA WS is planar for VQA version 3 and 2-sample interleaved for
VQA version 2.
2012-01-24 14:13:46 -05:00
Justin Ruggles 220506d23f avcodec: add a new codec_id for CRYO APC IMA ADPCM.
The stereo layout and extradata is significantly different from that in
Westwood IMA ADPCM, so a separate codec_id is warranted.
2012-01-24 14:13:41 -05:00
Anton Khirnov 1381e9bc92 lavc: postpone the removal of AVCodecContext.request_channels.
Although it has been deprecated for a long time, its intended
replacement (request_channel_layout) is not actually used anywhere, so
request_channels is currently the only way to access that functionality.
2012-01-24 18:04:19 +01:00
Anton Khirnov af0292f33a lavc: postpone removing old audio encoding and decoding API
It has been deprecated only recently.
2012-01-24 18:04:19 +01:00
Janne Grunau 1d3a9e63e0 rv10: verify slice offsets against buffer size
Found by John Villamil <johnv@matasano.com> in fuzzed rv20 in mkv files.
2012-01-24 02:16:02 +01:00
Nathan Caldwell 9292fe4a1d aacenc: Simplify windowing
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:46 -08:00
Nathan Caldwell 7946a5acfb aacenc: Move saved overlap samples to the beginning of the same buffer as incoming samples.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:46 -08:00
Nathan Caldwell 9b8e2a8709 aacenc: Deinterleave input samples before processing.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:46 -08:00
Nathan Caldwell 04af2efaae aacenc: Store channel count in AACEncContext.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:46 -08:00
Nathan Caldwell 80d44277e6 aacenc: Move Q^3/4 calculation to it's own table
This should be moved to tablegen at some point.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:46 -08:00
Nathan Caldwell 025ccf1f8b aacenc: Request normalized float samples instead of converting s16 samples to float.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:46 -08:00
Nathan Caldwell 6381f913d1 aacpsy: Replace an if with FFMAX in LAME windowing.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:45 -08:00
Nathan Caldwell 207bf44d16 aacenc: cosmetics, replace 'rd' with 'bits' in codebook_trellis_rate to make it more clear what is being calculated.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:45 -08:00
Nathan Caldwell 843cd4a3ed aacpsy: cosmetics, change a FIXME to a NOTE about subshort comparisons
Also fix a typo.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:45 -08:00
Nathan Caldwell 5310704190 aacenc: cosmetics: move init() and end() to the bottom of the file.
Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:45 -08:00
Nathan Caldwell 17ae608127 aacenc: aac_encode_init() cleanup
Macroify sanity checks and check return values of allocs and other functions.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-23 11:40:45 -08:00
Paul B Mahol 27ed027bcd XWD encoder and decoder
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-01-23 19:04:35 +01:00
Hendrik Leppkes 7662a532fb vc1: don't read the interpfrm and bfraction elements for interlaced frames
This matches the spec as well as the reference decoder, and fixes a bug
with interlaced frame decoding.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-01-23 19:04:14 +01:00
Carl Eugen Hoyos 66b9d7065a pam: Fix a typo that broke writing and reading PAM files.
Reported and reviewed by Derek Buitenhuis.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-01-22 16:38:20 +01:00
Janne Grunau 2473a45c85 threads: change the default for threads back to 1
Using threaded decoding by default breaks backward compatibility if
AVHWAccel is used or if an appliction sets threadunsafe callbacks.
Avconv and avplay still use -threads auto if not specified.
2012-01-21 13:26:44 +01:00
Janne Grunau afb8b207d6 threads: update slice_count and slice_offset from user context
They are used to signal the number of slices and offsets of each slice
out of band to the decoder.
2012-01-21 13:26:44 +01:00
Dustin Brody d2a0041c20 mpegaudiodec: switch error detection check to AV_EF_BUFFER
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-21 08:38:12 +01:00
Dustin Brody f88949214c lavc: rename err_filter option to err_detect and document it
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-21 08:28:18 +01:00
John Brooks 9b6aafba6c mpegvideo: fix invalid memory access for small video dimensions
When either video dimension is only one macroblock, subtractions
based on v_edge_pos and the macroblock size may be negative. In
that situation, an unsigned comparison isn't sufficent to test for
MV overruns, because a limit of (unsigned)-1 will let any other
value pass.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-21 08:28:08 +01:00
Felipe Contreras c3d5e290ca ARM: fix build with FFT enabled and MDCT disabled
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-01-20 16:14:01 +00:00
Jindřich Makovička a85ce653fb mpeg12: check for available bits to avoid an infinite loop
Signed-off-by: Jindrich Makovicka <makovick@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-01-19 14:14:21 +01:00
Donald Ovcharov ac84f2edd4 error_resilience: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-01-18 18:10:01 +01:00
Justin Ruggles 01ed1c390d tta: cast output data pointer to the correct type
fixes "warning: assignment from incompatible pointer type"
2012-01-17 09:41:13 -05:00
Janne Grunau 9e12002f11 rv34: add NEON rv34_idct_add
Overall almost 4% faster, idct_add down from 350 to 85 cycles, idct_dc_add
down from 83 to 30 cycles.

squash: rv34 idct rearrange partial register loads
2012-01-16 19:26:41 +01:00
Christophe GISQUET 9ba9c34024 rv34: 1-pass inter MB reconstruction
Implement 1-pass inverse transform and reconstruction for inter blocks.
2012-01-16 19:26:41 +01:00
Laurentiu Ion d859191322 pictordec: Use bytestream2 functions
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-01-15 22:44:00 -05:00
Justin Ruggles 05f95443ca pcmenc: use AVCodec.encode2() 2012-01-15 21:24:18 -05:00
Justin Ruggles a6ccae3f4c avcodec: bump minor version and add APIChanges for the new audio encoding API 2012-01-15 21:24:17 -05:00
Justin Ruggles b2c75b6e63 avcodec: Add avcodec_encode_audio2() as replacement for avcodec_encode_audio()
This allows audio encoders to optionally take an AVFrame as input and write
encoded output to an AVPacket.

This also adds AVCodec.encode2() which will also be usable by video and
subtitle encoders once support is implemented in the public functions.
2012-01-15 21:24:17 -05:00
Justin Ruggles 5ee5fa021f avcodec: add a public function, avcodec_fill_audio_frame().
This is a convenience function for the user to fill audio AVFrame information.
2012-01-15 21:24:17 -05:00