summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* cljr: fix buf_size sanity checkPaul B. Mahol2011-12-18
| | | | Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* cljr: Check if width and height are positive integersShitiz Garg2011-12-18
| | | | | | | | Width and height might get passed as 0 and would cause floating point exceptions in decode_frame. Fixes bugzilla #149 Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* avcodec: deprecate AVFrame.ageMans Rullgard2011-12-18
| | | | | | | | This was intended as an optimisation for skipped blocks in MPEG2 P-frames and never used elsewhere. Removing this "optimisation" speeds up MPEG2 decoding by 1-2% (ARM Cortex-A9). Signed-off-by: Mans Rullgard <mans@mansr.com>
* 4xm: remove unneeded check for remaining unused data.Justin Ruggles2011-12-18
| | | | | This is unnecessary complication that only prints a message and does not affect decoding.
* tmv decoder: set correct pix_fmtUoti Urpala2011-12-18
| | | | | | | | Previously the decoder only worked if the user had set avctx->pix_fmt manually. For some reason the libavformat tmv demuxer sets this, so the problem was not visible in avplay etc. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* dct-test: remove unused variable cropTblMans Rullgard2011-12-17
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* get_bits: remove LAST_SKIP_CACHE macroMans Rullgard2011-12-17
| | | | | | This macro is empty since the removal of the A32 bitstream reader. Signed-off-by: Mans Rullgard <mans@mansr.com>
* get_bits: remove strange/obsolete commentsMans Rullgard2011-12-17
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* get_bits: whitespace (mostly) cosmeticsMans Rullgard2011-12-17
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* get_bits: remove unnecessary #includesMans Rullgard2011-12-17
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* mp3dec: hack: fix decoding with safe bitstream readerMans Rullgard2011-12-17
| | | | | | | | | The buffer splicing relies on the bitstream reader over-reading the end of the buffer as declared in init_get_bits(), although more data is actually present. Manually moving the bitstream boundary after init_get_bits() allows this to work as expected. Signed-off-by: Mans Rullgard <mans@mansr.com>
* adpcm: Check for channels to be a non-zero integerShitiz Garg2011-12-17
| | | | | | | channels would be 0 sometimes and would cause floating point exception Fixes bugzilla #124 Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* get_bits: introduce safe bitreading to prevent overreads.Ronald S. Bultje2011-12-17
| | | | | | | | | | | | | | | When turned on, H264/CAVLC gets ~15% (CVPCMNL1_SVA_C.264) slower for ultra-high-bitrate files, or ~2.5% (CVFI1_SVA_C.264) for lower-bitrate files. Other codecs are affected to a lesser extent because they are less optimized; e.g., VC-1 slows down by less than 1% (all on x86). The patch generated 3 extra instructions (cmp, cmovae and mov) per call to get_bits(). The performance penalty on ARM is within the error margin for most files, up to 4% in extreme cases such as CVPCMNL1_SVA_C.264. Based on work (for GCI) by Aneesh Dogra <lionaneesh@gmail.com>, and inspired by patch in Chromium by Chris Evans <cevans@chromium.org>.
* get_bits: remove A32 variantMans Rullgard2011-12-16
| | | | | | | | | | | | | | | | | The A32 bitstream reader variant is only used on ARMv5 and for Prores due to the larger bit cache this decoder requires. In benchmarks on ARMv5 (Marvell Sheeva) with gcc 4.6, the only statistically significant difference between ALT and A32 is a 4% advantage for ALT in FLAC decoding. There is thus no (longer) any reason to keep the A32 reader from this point of view. This patch adds an option to the ALT reader increasing the bit cache to 32 bits as required by the Prores decoder. Benchmarking shows no significant change in speed on Intel i7. Again, the A32 reader fails to justify its existence. Signed-off-by: Mans Rullgard <mans@mansr.com>
* wavpack: Fix 32-bit clippingDerek Buitenhuis2011-12-16
| | | | | | | | In the case that (frame_flags & 0x03) == 3, hybrid_maxclip may have had a signed integer overflow. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* wavpack: Clip samples after shiftingDerek Buitenhuis2011-12-16
| | | | | | | | It doesn't make much sense to clip pre-shift, nor is it correct for proper decoding. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* h264: don't drop B-frames after next keyframe on POC reset.Ronald S. Bultje2011-12-16
| | | | | | | The keyframe after a POC reset may not be the first to be returned to the user. Therefore, don't reset the expected next POC once we return a keyframe to the user, but once we know that the next frame in the return-queue is a keyframe.
* get_bits: remove useless pointer castsMans Rullgard2011-12-16
| | | | | | These pointers are already of the correct type. Signed-off-by: Mans Rullgard <mans@mansr.com>
* rv40: NEON optimised weak loop filterMans Rullgard2011-12-16
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* v410enc: fix output buffer size checkMans Rullgard2011-12-15
| | | | | | The encoder clearly needs width * height * 4 bytes. Signed-off-by: Mans Rullgard <mans@mansr.com>
* v410enc: include correct headersMans Rullgard2011-12-15
| | | | | | | This file does not use anything from put_bits.h but needs intreadwrite.h. Signed-off-by: Mans Rullgard <mans@mansr.com>
* ARM: fix external symbol refs in rv40 asmMans Rullgard2011-12-15
| | | | | | | External symbol references need prefixes on some systems. This should fix build errors on Darwin. Signed-off-by: Mans Rullgard <mans@mansr.com>
* libgsm: Reset the MS mode of GSM in the flush functionMartin Storsjö2011-12-15
| | | | | | | | | | The mode is set in libgsm_decode_init, but the decoder object is simply destroyed and recreated in the flush function - therefore the mode has to be set again. This fixes playback using the libgsm_ms decoder in avplay. Signed-off-by: Martin Storsjö <martin@martin.st>
* libgsm: Set options on the right objectMartin Storsjö2011-12-15
| | | | | | | This fixes regressions in decoding using the libgsm_ms decoder, broken since 0eea21294354. Signed-off-by: Martin Storsjö <martin@martin.st>
* ARM: dca: disable optimised decode_blockcodes() for old gccMans Rullgard2011-12-15
| | | | | | | Old gcc versions have trouble compiling this function, and no simple, targeted test is possible. Signed-off-by: Mans Rullgard <mans@mansr.com>
* mpegvideo: remove abort() in ff_find_unused_picture()Andrey Utkin2011-12-14
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rv40: NEON optimised loop filter strength selectionMans Rullgard2011-12-14
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* rv40: rearrange loop filter functionsMans Rullgard2011-12-14
| | | | | | | This splits the loop filter functions into smaller, more SIMD-friendly functions. Signed-off-by: Mans Rullgard <mans@mansr.com>
* build: conditionally compile x86 H.264 chroma optimizationsDiego Biurrun2011-12-14
|
* v410 encoder and decoderDerek Buitenhuis2011-12-13
| | | | | | | | v410 is a packed 10-bit 4:4:4 YCbCr format used in QuickTime. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Diego Biurrun <diego@biurrun.de>
* ulti: Fix invalid readsGaurav Narula2011-12-13
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* vc1: mark with ER_MB_ERROR bits overconsumptionLuca Barbato2011-12-13
| | | | | | | | | This patch is a generalization of what Michael Niedermayer fixed in a single case. The wmv8-drm fate test had been updated accordingly. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* lavc: introduce ER_MB_END and ER_MB_ERRORLuca Barbato2011-12-13
| | | | | | Simplify a little error resilience calls Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* error_resilience: use the ER_ namespaceLuca Barbato2011-12-13
| | | | | | Add the namespace to {AC_,DC_,MV_}{END,ERROR} macros Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* build: move inclusion of subdir.mak to main subdir loopMans Rullgard2011-12-13
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* rv34: NEON optimised 4x4 dequantMans Rullgard2011-12-13
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* rv34: move 4x4 dequant to RV34DSPContextMans Rullgard2011-12-13
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* aacdec: Use intfloat.h rather than local punning union.Alex Converse2011-12-12
|
* doxygen: misc consistency, spelling and wording fixesDiego Biurrun2011-12-12
|
* vcr1: drop unnecessary emms_c() calls without MMX codePaul B Mahol2011-12-12
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* lavc: convert error_recognition to err_recognition.Dustin Brody2011-12-12
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* x86: Require 7 registers for the cabac asmMartin Storsjö2011-12-12
| | | | | | | The change in 599b4c6ef didn't turn out to work properly on i386 on OS X, where it broke building with PIC enabled. Signed-off-by: Martin Storsjö <martin@martin.st>
* h264: remove useless castMans Rullgard2011-12-12
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* proresdec: fix decode_slice() prototypeMans Rullgard2011-12-12
| | | | | | | | Make the function prototype match the argument of AVCodecCntext.execute() and remove the cast hiding this mismatch. Signed-off-by: Mans Rullgard <mans@mansr.com>
* x86: cabac: replace explicit memory references with "m" operandsMans Rullgard2011-12-11
| | | | | | | | This replaces the explicit offset(reg) memory references with "m" operands for the same locations. As a result, one fewer register operand is needed for these inline asm statements. Signed-off-by: Mans Rullgard <mans@mansr.com>
* wmapro: use av_float2int()Mans Rullgard2011-12-11
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* lavc: avoid invalid memcpy() in avcodec_default_release_buffer()Mans Rullgard2011-12-11
| | | | | | | | | | When the buf and last pointers are equal, the FFSWAP() results in an invalid call to memcpy() with same source and destination on some targets. Although assigning a struct to itself is valid C99, gcc does not check for this before calling memcpy(). See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32667 Signed-off-by: Mans Rullgard <mans@mansr.com>
* lavu: replace int/float punning functionsMans Rullgard2011-12-11
| | | | | | | | | | | | | | | | | | The existing functions defined in intfloat_readwrite.[ch] are both slow and incorrect (infinities are not handled). This introduces a new header with fast, inline conversion functions using direct union punning assuming an IEEE-754 system, an assumption already made throughout the code. The one use of Intel/Motorola extended 80-bit format is replaced by simpler code sufficient under the present constraints (positive normal values). The old functions are marked deprecated and retained for compatibility. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Remove extraneous semicolonsMans Rullgard2011-12-11
| | | | | | These semicolons cause invalid empty top-level declarations. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Fix a bunch of common typos.Diego Biurrun2011-12-11
|