Commit Graph

15046 Commits

Author SHA1 Message Date
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