Commit Graph

15361 Commits

Author SHA1 Message Date
Justin Ruggles f44005b610 aacenc: only use the number of input samples provided by the user.
Fixes handling of CODEC_CAP_SMALL_LAST_FRAME.
2012-01-30 14:20:24 -05:00
Alex Converse 48f1e5212c wmadec: Verify bitstream size makes sense before calling init_get_bits.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-01-30 10:54:24 -08:00
Alex Converse ae35210a5d kmvc: Log into a context at a log level constant. 2012-01-30 10:54:24 -08:00
Alex Converse dfa37fe8a3 mpeg12: Pad framerate tab to 16 entries.
There are many places where we read an unchecked 4-bit index into it.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-01-30 10:19:01 -08:00
Michael Niedermayer a02e8df973 kgv1dec: Increase offsets array size so it is large enough.
Fixes CVE-2011-3945

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 807a045ab7)

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-30 10:16:23 -08:00
Alex Converse 386741f887 kmvc: Check palsize.
Fixes: CVE-2011-3952

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Based on fix by Michael Niedermayer
2012-01-30 10:16:17 -08:00
Christophe Gisquet 6b03900382 x86 dsputil: provide SSE2/SSSE3 versions of bswap_buf
While pshufb allows emulating bswap on XMM registers for SSSE3, more
shuffling is needed for SSE2. Alignment is critical, so specific codepaths
are provided for this case.

For the huffyuv sequence "angels_480-huffyuvcompress.avi":
C (using bswap instruction): ~ 55k cycles
SSE2:                        ~ 40k cycles
SSSE3 using unaligned loads: ~ 35k cycles
SSSE3 using aligned loads:   ~ 30k cycles

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-01-30 10:19:55 +01:00
Ronald S. Bultje af79a0c48a png: add support for bpp>4 to paeth x86 SIMD code.
This fixes playback of e.g. RGB48 (bpp=6) content on x86 CPUs. Fixes
bug 214.
2012-01-29 21:22:50 -08:00
Ronald S. Bultje f91c4b7824 png: add SSE2 version for add_bytes_l2. 2012-01-29 18:52:17 -08:00
Ronald S. Bultje 59f474b49d png: convert DSP functions to yasm. 2012-01-29 18:47:50 -08:00
Mans Rullgard 3715d841a6 Fix non-C89 declarations in for loops
Some compilers still do not support this syntax.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-01-29 23:26:04 +00:00
Ronald S. Bultje 20a7d3178f png: add missing #if HAVE_SSSE3 around function pointer assignment. 2012-01-29 12:31:59 -08:00
Ronald S. Bultje 331e7c4cb3 imdct36: mark SSE functions as using all 16 XMM registers.
On x86-64, it indeed uses all 16 registers (and on x86-32, this gets
clipped to 8). Not marking it properly causes callers of this function
to fail randomly because of XMM register clobbering.
2012-01-29 08:14:05 -08:00
Ronald S. Bultje e92003514d png: move DSP functions to their own DSP context. 2012-01-29 08:11:18 -08:00
Aneesh Dogra f9708e9a0e sunrast: Add a sample request for TIFF, IFF, and Experimental Rastfile formats.
Signed-off-by: Aneesh Dogra <lionaneesh@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-29 08:11:18 -08:00
Aneesh Dogra 415f358a1f sunrast: Cosmetics
Signed-off-by: Aneesh Dogra <lionaneesh@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-29 08:11:18 -08:00
Aneesh Dogra 4ffb8e2c14 sunrast: Remove if (unsigned int < 0) check.
Note: This fixes the following GCC warning :-
libavcodec/sunrast.c:94: warning: comparison of unsigned expression < 0 is always false.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-29 08:11:18 -08:00
Aneesh Dogra fef3771778 sunrast: Replace magic number by a macro.
Signed-off-by: Aneesh Dogra <lionaneesh@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-29 08:11:06 -08:00
Nathan Caldwell 2e626dd513 aacenc: Fix LONG_START windowing.
Forgot to add the equivalent amount to the incoming sample pointer as the output pointer.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-28 22:07:30 +01:00
Nathan Caldwell dc7e7d4dd9 aacenc: Fix a bug where deinterleaved samples were stored in the wrong place.
10l: Forgot to adjust deinterleave for new location of incoming samples in 7946a5a.

This produced incorrect, but surprisingly listenable results.

Thanks to Justin Ruggles for the report.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-28 22:07:21 +01:00
Anton Khirnov 9bfe218299 lavc: extend doxy for avcodec_alloc_context3(). 2012-01-28 19:45:33 +01:00
Anton Khirnov 2d9535ad31 avcodec_align_dimensions2: set only 4 linesizes, not AV_NUM_DATA_POINTERS.
This function is video-only, so there's no point in setting more
linesizes.

Fixes stack corruption in avplay.
2012-01-28 19:44:55 +01:00
Mans Rullgard be822d77b6 aacsbr: ARM NEON optimised sbrdsp functions
Overall speedup of HE-AAC decoding 2.3x on Cortex-A8, 1.2x on A9.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-01-28 14:56:18 +00:00
Mans Rullgard 8996ed2b73 aacsbr: align some arrays
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-01-28 14:56:18 +00:00
Mans Rullgard aac46e088d aacsbr: move some simdable loops to function pointers
This prepares for assembly optimisations by moving the most
time-consuming loops to functions called through pointers
in a new context.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-01-28 14:56:18 +00:00
Alex Converse 7181c4edee cosmetics: Remove extra newlines at EOF 2012-01-27 17:19:09 -08:00
Martin Storsjö 9a7dc618c5 libavcodec: Don't crash in avcodec_encode_audio if time_base isn't set
Earlier, calling avcodec_encode_audio worked fine even if time_base
wasn't set. Now it crashes due to trying to scale the output pts to
the codec context time base. This affects e.g. VLC.

If no time_base is set for audio codecs, set it to the sample
rate.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-27 20:52:32 +02:00
Aneesh Dogra bca77a1a64 sunrast: Document the different Sun Raster file format types.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-01-27 13:21:46 -05:00
Aneesh Dogra 1bbb173652 sunrast: Add a check for experimental type.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-01-27 11:35:39 -05:00
Justin Ruggles 2c577155a7 libspeexenc: use AVSampleFormat instead of deprecated/removed SampleFormat
Fixes build with --enable-libspeex
2012-01-27 11:28:21 -05:00
Anton Khirnov 3b4aaa6190 lavc: remove disabled FF_API_AVFRAME_AGE cruft. 2012-01-27 10:38:35 +01:00
Anton Khirnov d803775e81 lavc: remove disabled FF_API_DATA_POINTERS cruft. 2012-01-27 10:38:35 +01:00
Anton Khirnov 10e1ae5eff lavc: remove disabled FF_API_TIFFENC_COMPLEVEL cruft. 2012-01-27 10:38:35 +01:00
Anton Khirnov 370e923e0b lavc: remove disabled FF_API_INTERNAL_CONTEXT cruft. 2012-01-27 10:38:35 +01:00
Anton Khirnov ac84395d6a lavc: remove disabled FF_API_PARSE_FRAME cruft. 2012-01-27 10:38:34 +01:00
Anton Khirnov 8b9b6041d7 lavc: remove disabled FF_API_GET_ALPHA_INFO cruft. 2012-01-27 10:38:34 +01:00
Anton Khirnov 99ace37e68 lavc: remove disabled FF_API_MJPEG_GLOBAL_OPTS cruft. 2012-01-27 10:38:34 +01:00
Anton Khirnov 96e9b96fcd lavc: remove disabled FF_API_SNOW_GLOBAL_OPTS cruft. 2012-01-27 10:38:34 +01:00
Anton Khirnov b9de160c3e lavc: remove disabled FF_API_LAME_GLOBAL_OPTS cruft. 2012-01-27 10:38:34 +01:00
Anton Khirnov 3211932c51 lavc: remove disabled FF_API_AVCODEC_INIT cruft. 2012-01-27 10:38:34 +01:00
Anton Khirnov 491f443e1f lavc: remove disabled FF_API_ER cruft. 2012-01-27 10:38:34 +01:00
Anton Khirnov f326501a65 lavc: remove disabled FF_API_DRC_SCALE cruft. 2012-01-27 10:38:34 +01:00
Anton Khirnov d2d931500b lavc: remove disabled FF_API_AVCODEC_OPEN cruft. 2012-01-27 10:38:34 +01:00
Anton Khirnov ec104eef51 lavc: remove disabled FF_API_ALLOC_CONTEXT cruft. 2012-01-27 10:38:34 +01:00
Anton Khirnov 8e5746d461 lavc: remove disabled FF_API_GET_PIX_FMT_NAME cruft. 2012-01-27 10:38:34 +01:00
Anton Khirnov 0dc6bab092 lavc: remove disabled FF_API_FLAC_GLOBAL_OPTS cruft. 2012-01-27 10:38:34 +01:00
Anton Khirnov fbca04e6f6 lavc: remove disabled FF_API_OLD_FF_PICT_TYPES cruft. 2012-01-27 10:38:34 +01:00
Anton Khirnov 9a79bb552a lavc: remove disabled FF_API_THREAD_INIT cruft. 2012-01-27 10:38:34 +01:00
Anton Khirnov 7831a7e4ec lavc: remove disabled FF_API_ANTIALIAS_ALGO cruft. 2012-01-27 10:38:33 +01:00
Anton Khirnov 62dfea6535 lavc: remove disabled FF_API_OLD_AUDIOCONVERT cruft. 2012-01-27 10:38:33 +01:00
Anton Khirnov 284e65d64e lavc: remove disabled FF_API_OLD_SAMPLE_FMT cruft. 2012-01-27 10:38:33 +01:00
Anton Khirnov 6c8dab98b8 lavc: remove disabled FF_API_PALETTE_CONTROL cruft. 2012-01-27 10:38:33 +01:00
Anton Khirnov 9ce2a91b84 lavc: remove disabled FF_API_MPEGVIDEO_GLOBAL_OPTS cruft. 2012-01-27 10:38:33 +01:00
Anton Khirnov 7232bfbd93 lavc: remove disabled FF_API_X264_GLOBAL_OPTS cruft. 2012-01-27 10:38:33 +01:00
Anton Khirnov 7460398b89 lavc: remove the deprecated opt.h header. 2012-01-27 10:38:33 +01:00
Anton Khirnov 041cd5a0c5 lavc: remove the deprecated "ab" option. 2012-01-27 10:38:33 +01:00
Anton Khirnov 7063b6eaee lavc: increase major version to 54.
The lavf-ffm test results change because ffmenc writes
AVCodecContext.flags/flags2 and the defaults for those change.
2012-01-27 10:38:30 +01:00
Ronald S. Bultje 3b15a6d742 config.asm: change %ifdef directives to %if directives.
This allows combining multiple conditionals in a single statement.
2012-01-27 10:19:57 +08:00
Paul B Mahol 5eda82aac9 frwu: check if allocation was successful
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-27 09:31:06 +08:00
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
Christophe GISQUET d78062386e rv34: Intra 16x16 handling
Extract processing of intra 16x16 blocks from intra macroblock
processing.
Also implement a function performing inverse transform and block
reconstruction for DC-only blocks in 1 pass instead of 2.
2012-01-16 00:41:51 +01:00
Christophe GISQUET 3eeb755763 rv34: Inter/intra MB code split
Split inter/intra macroblock handling code. This will allow further
optimizations such as performing inverse transform and block reconstruction
in a single pass as well as specialize code.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-01-16 00:41:51 +01:00
Reinhard Tartler e2ff436ef6 lavc: Relax API strictness in avcodec_decode_audio3 with a custom get_buffer()
Do not fail audio decoding with avcodec_decode_audio3 if user has set a
custom get_buffer. Strictly speaking, this was never allowed by the API,
but it seems that some software packages did so anyways. In order to
unbreak applications (cf. http://bugs.debian.org/655890), this change
clarifies the API and overrides the custom get_buffer() with the defaults.

This change is inspired by a similar
commit (c3846e3eba) in FFmpeg.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-01-15 21:40:59 +01:00
Kostya Shishkov e6e7bfc11e wavpack: fix clipping for 32-bit lossy mode
Reference decoder clips data before shifting it to final range and also
forces 32-bit lossy mode to be actually 24-bit lossy mode in order to be
able to perform proper clipping.
2012-01-15 15:27:55 +01:00
Laurentiu Ion 4fccc7c46c vb: Use bytestream2 functions
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-01-14 22:12:53 -05:00
Aneesh Dogra 4cd0bdae9a sgidec: Use bytestream2 functions to prevent buffer overreads.
The patch also adds several bytestream macros to deal with native endian.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-01-14 12:35:53 -05:00
Diego Biurrun e44c11e9fa cosmetics: Move static and inline attributes to more standard places.
Fixes several "‘static’ is not at beginning of declaration" warnings.
2012-01-14 17:32:36 +01:00
Martin Storsjö 57facb73ab libx264: Don't leave max_b_frames as -1 if the user didn't set it
max_b_frames is initialized to -1 for libx264, to allow
distinguishing between an explicit user set 0 and a default not
touched 0 (see bb73cda2).

If max_b_frames is left as -1, this affects dts generation (where
expressions like max_b_frames != 0 are used), so make sure it is
left at the default 0 after the libx264 init function returns.

This avoids unnecessarily producing dts != pts when using
profile=baseline.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-14 02:08:42 +02:00
Justin Ruggles faaebcdf6b targa: add support for rgb555 palette 2012-01-13 17:11:41 -05:00
Mans Rullgard 71b3a63e9c ARM: fix Thumb-mode simple_idct_arm
The alignment directive must obviously precede the label.
This was never noticed in ARM mode since the location is
already aligned there.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-01-13 19:09:59 +00:00
Mans Rullgard 5c5e1ea3cd ARM: 4-byte align start of all asm functions
Due to apprent bugs in the GNU assembler and/or linker, relocations
can be incorrectly processed if the alignment of a Thumb instruction
is changed in the output file compared to the input object.

This fixes crashes in h264 decoding with Thumb enabled. No effect in
ARM mode since everything is 4-byte aligned there.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-01-13 19:09:59 +00:00
Diego Biurrun 55b9ef18e4 cabac: split cabac.h into declarations and function definitions
This fixes standalone compilation of some decoders with --disable-optimizations.
cabac.h defines some inline functions that use symbols from cabac.c.  Without
optimizations these inline functions are not eliminated and linking fails with
references to non-existing symbols.

Splitting the inline functions off into their own header and only #including
it in the places where the inline functions are used allows #including cabac.h
from anywhere without ill effects.
2012-01-12 23:08:23 +01:00
Diego Biurrun 0a60780c7f cabac: Mark ff_h264_mps_state array as static, it is only used within cabac.c. 2012-01-12 22:57:42 +01:00
Diego Biurrun 64d779f2f7 cabac: Remove ff_h264_lps_state array.
It was only ever used in the cabac test program, but never initialized.
2012-01-12 22:54:24 +01:00
Alex Converse 4df30f7114 utils: Check for extradata size overflows. 2012-01-12 13:26:13 -08:00
Mans Rullgard 81dc6a2a3c ARM: rv34: fix asm syntax in dc transform functions
Signed-off-by: Mans Rullgard <mans@mansr.com>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-01-12 22:11:13 +01:00
Janne Grunau 3547f8e8f8 rv34: fix and optimise frame dependency checking
The sporadic threading errors during fate-rv30 were caused by calling
ff_thread_await_progress with mb row -1 as argument. That returns
immediately since progress is initialized to -1. Not yet computed
motion vectors from the reference could be used for the first
macroblocks.
2012-01-12 18:38:08 +01:00
Janne Grunau e1e369049e rv34: NEON optimised dc only inverse transform
30-50% faster than the C implementation, 0.5% overall speedup on
bourne.rmvb.
2012-01-12 18:33:55 +01:00
Anton Khirnov f3d02a8b28 lavc: replace some remaining FF_I_TYPE with AV_PICTURE_TYPE_I 2012-01-12 18:18:23 +01:00
Anton Khirnov a29c25a9b2 lavc: ifdef out parse_only AVOption 2012-01-12 18:18:23 +01:00
Anton Khirnov d54f1e6407 nellymoserdec: SAMPLE_FMT -> AV_SAMPLE_FMT 2012-01-12 18:18:23 +01:00
Anton Khirnov 0c71cc6526 mpegvideo_enc: ifdef out/replace references to deprecated codec flags. 2012-01-12 18:18:22 +01:00
Kostya Shishkov 08bab32cf1 indeo4: add some missing static and const qualifiers
From the patch by Reimar Döffinger.
2012-01-12 13:54:41 +01:00
Christophe GISQUET 3faa303a47 rv34: DC-only inverse transform
When decoding coefficients, detect whether the block is DC-only, and take
advantage of this knowledge to perform DC-only inverse transform.

This is achieved by:
- first, changing the 108x4 element modulo_three_table into a 108 element
  table (kind of base4), and accessing each value using mask and shifts.
- then, checking low bits for 0 (as they represent the presence of higher
  frequency coefficients)

Also provide x86 SIMD code for the DC-only inverse transform.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-01-12 09:52:33 +01:00
Alex Converse b5fc571e4f latmdec: Check AudioSpecificConfig length before decoding extradata.
This is different than a normal get_bits() over read because
decode_audio_specific_config() creates its own GetBitContext.

Fixes Bug 170.
2012-01-11 14:40:47 -08:00
Henrik Gramner e7d02b04dc fft: init functions with INIT_XMM/YMM.
This is required to handle clobbering of XMM registers on Win64
correctly. Fixes FFT and all tests depending on FFT on Win64.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-01-11 20:12:26 +01:00
Justin Ruggles 56f22b7e16 pcmenc: set frame_size to 0.
This indicates that the actual frame size is based on the buf_size passed to
avcodec_encode_audio().
2012-01-11 09:09:56 -05:00
Justin Ruggles 82390f57d1 avcodec: add GSM parser
The WAVE demuxer returns packets with many blocks per frame, which needs to be
parsed into single blocks. This has a side-effect of fixing the timestamps.
2012-01-11 08:56:24 -05:00
Diego Biurrun 5ea20630b4 Fix a bunch of platform name and other typos. 2012-01-11 13:48:30 +01:00
Janne Grunau f6a152db11 threads: add CODEC_CAP_AUTO_THREADS for libvpx and xavs 2012-01-11 00:23:07 +01:00
Janne Grunau 9472d37d8e rv34: frame-level multi-threading
Statistics for bourne.rmvb -an -f null

1 thread:  37.12s user 0.03s system  99% cpu 37.174 total
2 threads: 47.63s user 0.24s system 185% cpu 25.807 total
4 threads: 41.21s user 0.30s system 327% cpu 12.674 total
2012-01-10 22:51:56 +01:00
Janne Grunau 3ab7700018 mpegvideo: claim ownership of referenced pictures
Under certain conditions pictures could be released before they were
returned with frame-threading. Broken mv computation in the upcoming
rv34 frame-threading patch was caused by this.

To prevent contexts from running out of available pictures the loop
releasing "unused" pictures has to be run for B frames too.
2012-01-10 22:51:56 +01:00
Alex Converse 17ce52912f aacsbr: prevent out of bounds memcpy().
Fixes Libav Bug 195.

This doesn't make the code handle sample rate or upsample/downsample
change properly but this is still a good sanity check.

Based on change by Michael Niedermayer.

Signed-off-by: Alex Converse <alex.converse@gmail.com>
2012-01-10 13:13:34 -08:00
Aneesh Dogra 29112db8c0 bethsoftvideo: Use bytestream2 functions to prevent buffer overreads.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-10 10:34:16 -08:00
Paul B Mahol 84e5159e25 bmpenc: support for PIX_FMT_RGB444
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-10 09:29:22 -08:00
Janne Grunau e652cc9606 rv34: use get_bits_left()
It is not necessary to store the bit stream length in a RV34DecContext
field.
2012-01-10 16:58:53 +01:00
Paul B Mahol 353a2d2164 bmpdec: support for rgb444 with bitfields compression
Do not display garbage for invalid/unsupported bitfields values.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-10 05:58:19 -08:00
Laurentiu Ion da2e774fd6 kmvc: Use bytestream2 functions to prevent buffer overreads.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-09 17:26:33 -08:00
Alex Converse 9de3cbc182 aacps: Add missing newline in error message. 2012-01-09 11:06:14 -08:00
Alex Converse 4acd43a295 aacdec: Turn off PS for multichannel files that use PCE based configs.
Fixes al_sbr_cm_48_5.1.mp4.
2012-01-09 11:04:05 -08:00
Diego Biurrun 1ef8ff4534 cabac: remove put_cabac_u/ueg from cabac-test.
The functions are not used in any part of Libav, therefore testing them in the
cabac-test is unnecessary. Since this makes them unused, remove the functions.
2012-01-09 14:10:41 +01:00
Vitor Sessak 39df0c434c mpegaudiodec: optimized iMDCT transform
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-08 17:40:55 -08:00
Vitor Sessak 06677d0dd9 mpegaudiodec: change imdct window arrangment for better pointer alignment
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-08 17:37:23 -08:00
Vitor Sessak 6dfcf53092 mpegaudiodec: move imdct and windowing function to mpegaudiodsp
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-08 17:37:07 -08:00
Vitor Sessak 421c99a4a7 mpegaudiodec: interleave iMDCT buffer to simplify future SIMD implementations
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-08 17:37:03 -08:00
Daniel Huang 8549cf073b mjpegdec: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-01-08 23:33:00 +01:00
Aneesh Dogra ccc27e2139 bfi: Use bytestream2 functions to prevent buffer overreads.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-08 13:26:54 -08:00
Laurentiu Ion 529a25d6e5 dpcm: Fix invalid writes
Fixes bug: #152

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-08 13:13:11 -08:00
Aneesh Dogra 12e984aed7 utvideo: frame multithreading.
>> time ./avconv -i file.avi -f null -
Before : real	0m7.784s
After  : real   0m3.662s

Tested on a Intel Core i3 Processor (2 cores, 4 threads).

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-08 12:21:10 -08:00
Chris Evans afb2aa5379 vorbis: An additional defense in the Vorbis codec.
Fixes Bug: #190
Chromium Bug: #100543
Related to CVE-2011-3893

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-01-08 09:09:26 +01:00
Reinhard Tartler e6d527ff72 vorbisdec: Fix decoding bug with channel handling
Fixes Bug: #191
Chromium Bug: #101458
CVE-2011-3895

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-01-07 23:16:52 +01:00
Diego Biurrun badb195d13 cabac: Move code only used within the CABAC test program into the test program. 2012-01-07 22:13:14 +01:00
Diego Biurrun 1be4b8ccba vp56: Drop unnecessary cabac.h #include. 2012-01-07 22:13:12 +01:00
Diego Biurrun a7e3cb9d32 h264-test: Initialize AVCodecContext.av_class.
This fixes a segfault on startup.

Also remove a commented-out and completely unused variable.
2012-01-07 22:13:10 +01:00
Diego Biurrun 3dc99a18d4 cosmetics: drop some pointless parentheses 2012-01-07 22:13:07 +01:00
Justin Ruggles 3f6aa85ed4 avcodec: attempt to clarify the CODEC_CAP_DELAY documentation 2012-01-07 14:33:16 -05:00
Justin Ruggles 07837e4158 avcodec: fix avcodec_encode_audio() documentation.
the previous documentation indicated how many bytes are read from the input,
not how many samples are read.
2012-01-07 14:33:15 -05:00
Justin Ruggles cf1a259ad6 g722enc: validate AVCodecContext.trellis 2012-01-07 13:38:23 -05:00
Justin Ruggles 77c5b66cbe g722enc: set frame_size, and also handle an odd number of input samples
The fate reference is updated because the previous test skipped a sample in
each encode() call due each input frame having an odd number of samples.
2012-01-07 13:38:23 -05:00
Justin Ruggles 34093ba081 g722enc: split encoding into separate functions for trellis vs. no trellis 2012-01-07 13:38:23 -05:00
Vitor Sessak 96219141e2 mpegaudiodec: Use clearer pointer math
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-07 08:23:27 -08:00
Justin Ruggles 52e9854a83 tta: fix 24-bit decoding.
Decode to the correct output buffer.
2012-01-07 09:44:13 -05:00
Paul B Mahol 17aa02b9a1 interplayvideo: Handle changed video dimensions on the fly
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-07 15:25:38 +02:00
Martin Storsjö c5d907b6b0 libavcodec: Handle param change side data in avcodec_decode_video2, too
Also call avcodec_set_dimensions on dimension param change packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-07 15:25:35 +02:00
Martin Storsjö 867f923df4 libavcodec: Move apply_param_change up above avcodec_decode_video2
This is in preparation to calling it from avcodec_decode_video2.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-01-07 15:25:30 +02:00
Janne Grunau be540e0cb3 indeo3: check motion vectors for validity
Fixes null pointer dereferences in fuzzed files found by Oana Stratulat.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-01-07 09:41:11 +01:00
Michael Niedermayer b18a0cc781 indeo5: Fix null pointer dereference.
Bug found by: Oana Stratulat

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-01-07 00:18:42 +01:00
Laurentiu Ion b348c852aa flicvideo: fix invalid reads
Prevent invalid reads using bytestream2 functions.
Fixes bug #126.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-01-06 16:48:27 -05:00
Chris Evans 57cd6d7095 vorbis: Avoid some out-of-bounds reads
Fixes Bug: #190
Chromium Bug: #100543
Related to CVE-2011-3893

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-01-06 19:58:22 +01:00
Diego Biurrun 3aa3fc45fe cabac: remove unused function renorm_cabac_decoder 2012-01-06 13:37:55 +01:00
Diego Biurrun 301fb92131 h264: Only use symbols from the SVQ3 decoder under proper conditionals.
Fixes --disable-everything --enable-decoder=h264 --disable-optimizations.
2012-01-06 13:37:53 +01:00
Justin Ruggles 6e8bf6db48 add bytestream2_tell() and bytestream2_seek() functions 2012-01-05 23:36:36 -05:00
Janne Grunau f907615f08 parsers: initialize MpegEncContext.slice_context_count to 1
The mpeg4 video, H264 and VC-1 parser hold (directly or indirectly)
a MpegEncContext in their private context. Since they do not call the
common mpegvideo init function slice_context_count has explicitly set
to 1.
Prevents a null pointer dereference in the h264 parser and fixes
bug 193.
2012-01-06 01:47:45 +01:00
Janne Grunau 696ace50ea truemotion2: check size before GetBitContext initialisation
Prevents null ptr derefence for negative sizes.
2012-01-05 23:19:13 +01:00
Janne Grunau bb5b3940b0 adpcm: ADPCM Electronic Arts has always two channels 2012-01-05 22:29:18 +01:00
Aneesh Dogra 9b55b4bb3a 4xm: Prevent buffer overreads.
4xm decoder while decoding i2 frames can overread the buffer if proper checks
are not made.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-05 09:37:16 -08:00
Janne Grunau e268a352af mjpegdec: parse RSTn to prevent skipping other data in mjpeg_decode_scan
Check explicitly if enough bits are left to prevent an infinite loop
when the bitstream buffer is not followed by zero-padding.

Based on patches by Michael Niedermayer <michaelni@gmx.at>.
2012-01-05 18:20:35 +01:00
Janne Grunau 9b4767e478 vp3: fix streams with non-zero last coefficient
Fixes a regression introduced in 8b94df0f20.
2012-01-05 18:18:08 +01:00
Oana Stratulat 7f09791d28 Report an error if pitch_lag is zero in AMR-NB decoder.
This fixes an infinite loop in the decoder on specially
crafted files, and fixes bug 151.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-04 21:33:14 -08:00
Ronald S. Bultje 3fa646e859 Revert "4xm: Prevent buffer overreads."
This reverts commit 295a7c0238. The
patch breaks decoding of regular files (e.g. fate-4xm-2).
2012-01-04 21:27:31 -08:00
Aneesh Dogra 295a7c0238 4xm: Prevent buffer overreads.
4xm decoder while decoding i2 frames can overread the buffer if proper checks
are not made.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-04 21:15:50 -08:00
Aneesh Dogra 4b84f68223 4xm: pass the correct remaining buffer size to decode_i2_frame().
frame_size is the number of bytes left in the packet, so if we are passing
buf-4 we can safely read frame_size+4 bytes.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-04 21:10:11 -08:00
Aneesh Dogra 893f137679 4xm: fix calculation of the next output line position in decode_i2_frame().
The current code doesn't work unless width is an exact multiple of 16.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-01-04 21:09:22 -08:00
Ronald S. Bultje 89d26797f5 ulti: convert to new bytestream API. 2012-01-04 10:57:37 -08:00
Diego Biurrun 00a1cdd264 Place some START_TIMER invocations in separate blocks.
This fixes compilation failures related to START_TIMER/STOP_TIMER macros and
-Werror=declaration-after-statement.  START_TIMER declares variables and thus
may not be placed after statements outside of a new block.
2012-01-04 15:05:49 +01:00
John Brooks d209c27b09 vc1dec: fix invalid memory access for small video dimensions
For small video dimensions, these calculations of the upper bound
for pixel access may have a negative result. Using an unsigned
comparison to bound a potentially negative value only works if
the greater operand is non-negative. Fixed by doing edge emulation
when the upper bound is probably negative, everywhere that this
pattern appears.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-01-04 10:35:26 +01:00
John Brooks aacf6b3a2f rv34: fix invalid memory access for small video dimensions
For small video dimensions calculations of the upper bound for pixel
access may result in negative value. Using an unsigned comparison
works only if the greater operand is non-negative. This is fixed by
doing edge emulation explicitly for such conditions.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-01-04 10:32:23 +01:00
Christophe GISQUET 98f24ecd6c rv34: joint coefficient decoding and dequantization
Perform dequantization while decoding coefficients instead of performing it
on the entire coefficients buffer.

Since quantized coefficients are very sparse, this usually causes a small
speedup. Speedup of around 1% on Panda board compared to the removed here
neon code. Global speedup is probably around 3%.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-01-04 10:30:01 +01:00
Ronald S. Bultje 400ba1d735 h264: return index in buffer on end-of-sequence.
Fixes hangs if the last packet contains an end-of-sequence NAL unit,
bug 158.
2012-01-03 19:50:22 -08:00
Diego Biurrun 54e68fb3b8 Merge some declarations and initializations.
This fixes compilation failures related to START_TIMER/STOP_TIMER macros and
-Werror=declaration-after-statement.  START_TIMER declares variables and thus
may not be placed after statements outside of a new block.
2012-01-04 01:28:28 +01:00
Diego Biurrun 9dec55748c cabac: drop unused and disabled get_cabac_u() / get_cabac_ueg() functions 2012-01-04 01:09:54 +01:00
Diego Biurrun e451c26c5f cabac: drop unused STRICT_LIMITS code branch 2012-01-04 01:09:53 +01:00
Justin Ruggles 9785082c15 libspeexenc: fix pts calculations for more than 1 frame per packet 2012-01-03 18:56:41 -05:00
Justin Ruggles 730280f90d adxdec: clear eof flag and channel states when seeking 2012-01-03 18:47:42 -05:00
Justin Ruggles 754ebd1a5b adxenc: check output buffer size before writing 2012-01-03 18:47:42 -05:00
Justin Ruggles 1fb47728cd adxenc: use bytestream functions for header writing.
also add more documentation about the header structure
2012-01-03 18:47:42 -05:00
Justin Ruggles 656e606cae adxenc: use BLOCK_SIZE and BLOCK_SAMPLES macros 2012-01-03 18:47:42 -05:00
Justin Ruggles f1be41c63d adxenc: use a loop to encode each channel 2012-01-03 18:47:42 -05:00
Justin Ruggles 6c117bd8e0 adxenc: remove unneeded loops
avctx->frame_size is 32, so that is how many samples we process per call.
2012-01-03 18:47:42 -05:00
Justin Ruggles 613668210b adxenc: avoid stereo deinterleaving 2012-01-03 18:47:41 -05:00
Justin Ruggles 6b77f07074 adxenc: remove unnecessary setting of coded_frame->key_frame.
It is already set by avcodec_alloc_frame().
2012-01-03 18:47:41 -05:00
Justin Ruggles cc40c056d0 adxenc: log an error message and return AVERROR(EINVAL) for invalid channels 2012-01-03 18:47:41 -05:00
Justin Ruggles a85ab8ad45 adxenc: cosmetics: pretty-printing 2012-01-03 18:47:41 -05:00
Justin Ruggles 25edfc88e3 adxenc: change some data types 2012-01-03 18:47:41 -05:00
Justin Ruggles c98c6e18d8 adxenc: remove unneeded log message 2012-01-03 18:47:41 -05:00
Justin Ruggles e3d4f59f95 adxenc: remove unneeded comments 2012-01-03 18:47:41 -05:00
Michael Niedermayer b024209b1f adx_parser: rewrite.
The previous code ended in multiple different infinite
loops. See stl_ten_1_big.sfd as example with and without zzuf

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-01-03 16:28:17 -05:00
Justin Ruggles 6fd075f180 adxdec: Validate channel count to fix a division by zero. 2012-01-03 16:28:17 -05:00
Michael Niedermayer 4f1a787744 adxdec: Do not require extradata.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-01-03 16:28:17 -05:00
Justin Ruggles e49d21306a alacdec: implement the 2-pass prediction type.
The reference encoder does not generate any streams using this, but the
reference decoder can handle it, so we should as well.
2012-01-03 13:15:24 -05:00
Justin Ruggles bb63475aec alacenc: implement the 2-pass prediction type.
This isn't used by the reference encoder, but it is supported by the decoder.
2012-01-03 13:15:23 -05:00
Justin Ruggles 149e1b0468 alacenc: do not generate invalid multi-channel ALAC files 2012-01-03 13:15:23 -05:00
Justin Ruggles e76c7b856f alacdec: fill in missing or guessed info about the extradata format.
Now that there is official documentation from Apple about this, we don't have
to guess anymore.
2012-01-03 13:15:23 -05:00
Kostya Shishkov 490dcda6b6 utvideo: proper median prediction for interlaced videos 2012-01-03 17:08:49 +01:00
Shitiz Garg f37b4efe03 dca: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-01-03 15:25:54 +01:00
Aneesh Dogra 2e70b2de58 dct: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-01-03 15:25:51 +01:00
Daniel Verkamp 02e8f4272c win32: detect number of CPUs using affinity
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-01-03 14:25:57 +01:00
Diego Biurrun 418f066f8c snow: Restore three mistakenly removed casts. 2012-01-03 10:27:45 +01:00
Janne Grunau 881a5e047d mpegenc: use avctx->slices as number of slices
Adds a new member to MpegEncContext to hold the number of used slice
contexts. Fixes segfaults with '-threads 17 -thread_type slice' and
fate-vsynth{1,2}-mpeg{2,4}thread{,_ilace} with --disable-pthreads.
2012-01-02 19:20:23 +01:00
Janne Grunau 264808219d v410enc: fix undefined signed left shift caused by integer promotion 2012-01-02 19:20:23 +01:00
Diego Biurrun 8fd35b1aac Fix a bunch of typos. 2012-01-02 16:41:25 +01:00
Diego Biurrun 44b0edda3f Drop some pointless void* return value casts from av_malloc() invocations. 2012-01-02 16:41:24 +01:00
Justin Ruggles 3a1867deac wavpack: fix typos in previous cosmetic clean-up commit 2012-01-02 08:54:30 -05:00
Justin Ruggles 513c238fa9 wavpack: cosmetics: K&R pretty-printing 2012-01-02 08:52:59 -05:00
Hendrik Leppkes 14165fe125 wavpack: determine sample_fmt before requesting a buffer
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-01-01 23:24:15 -05:00
Justin Ruggles 8893fbdf7a bmv audio: implement new audio decoding API 2012-01-01 22:56:04 -05:00
Justin Ruggles 03fafdec82 mpegaudiodec: skip all channels when skipping granules
Also fix calculation of new position when switching buffers.
This fixes "overread" error messages when seeking.
2012-01-01 22:37:50 -05:00
Aneesh Dogra f7e30cc13b bfi: K&R cosmetics
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-01 22:27:04 +01:00
Aneesh Dogra 87d9874864 bgmc: K&R cleanup
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-01 22:27:04 +01:00
Stefano Sabatini 28b4af8e38 rawdec: propagate pict_type information to the output frame
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-01 22:27:04 +01:00
Piotr Bandurski d3a5c26986 rawdec: Support more QT 1bpp rawvideo files.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-01-01 22:27:04 +01:00
Janne Grunau b12d217339 threads: limit the number of automatic threads to MAX_AUTO_THREADS
The extra thread added in {frame_}*thread_init was not taken into
account. Explicitly sets thread_count to 1 if only one CPU core was
detected. Also fixes two typos in comments.
2012-01-01 21:11:43 +01:00
Janne Grunau b6064d9a59 threads: set thread_count to 1 when thread support is disabled 2012-01-01 14:37:38 +01:00
Janne Grunau b4d44a45f9 threads: introduce CODEC_CAP_AUTO_THREADS and add it to libx264
Some external codecs have their own code to determine the best number
of threads. This number is not necessary the number of cpu cores.
Thread_count will be only 0 if the codec has CODEC_CAP_AUTO_THREADS.
2012-01-01 14:37:37 +01:00
Ronald S. Bultje 464f26889c mpegaudiodec: fix seeking.
The safe bitstream reader does not allow using skip_bits_long() to seek to a
point before the start of the buffer, which was needed by the mp3 decoder.
This change instead calculates the start point of the first valid granule and
skips to that position.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2011-12-31 14:19:09 -05:00
Justin Ruggles 481a7ff5bd mpegaudiodec: fix compilation when testing the unchecked bitstream reader 2011-12-31 14:19:09 -05:00
Janne Grunau bcc7396065 threads: add sysconf based number of CPUs detection
Can act as fallback and should work on a couple of Unix systems.
2011-12-31 17:40:12 +01:00
Janne Grunau 937ff3a18a threads: always include necessary headers for number of CPUs detection
Since the conditions for the actual usage are more specific a less
preferred method can be used. This would cause compilation errors
because necessary headers are not included.
2011-12-31 17:40:12 +01:00
Janne Grunau e4e30256f8 threads: default to automatic thread count detection 2011-12-31 17:40:12 +01:00
Shitiz Garg c3513477bb cook: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2011-12-31 01:04:09 +01:00
Diego Biurrun d4b63054d9 cosmetics: Drop unnecessary parentheses around return values. 2011-12-30 22:18:07 +01:00