summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* h261dec: Fix order of initializationJohn Stebbins2014-08-14
| | | | | ff_MPV_common_init requires the frame dimensions which get parsed in h261_decode_picture_header.
* h263dec: Fix order of initializationJohn Stebbins2014-08-14
| | | | | ff_MPV_common_init requires the frame dimensions which get parsed in *_decode_picture_header.
* idct: remove call to ff_idctdsp_init from ff_MPV_common_initJohn Stebbins2014-08-14
| | | | | One step in untangling the mpegvideo code and fixing some problems in the order that initialization is being done in h263dec and h261dec.
* mpeg4video: Fix doxygen comment syntax to document correct struct memberNidhi Makhijani2014-08-14
| | | | | | Also fix some comment typos. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* vaapi: set the scaling list correctly.Edgar Hucek2014-08-14
| | | | | | | | Fixes VAAPI decoding artefacts. CC:libav-stable@libav.org Signed-off-by: Anton Khirnov <anton@khirnov.net>
* ffv1dec: check that global parameters do not change in version 0/1Michael Niedermayer2014-08-12
| | | | | | | | | Such changes are neither allowed nor supported Found-by: ami_stuff Bug-Id: CVE-2013-7020 CC: libav-stable@libav.org Signed-off-by: Anton Khirnov <anton@khirnov.net>
* hevc_mvs: avoid deriving tmvp in amvpChristophe Gisquet2014-08-12
| | | | | | | | Reduces the number of calls to tmvp derivation from 933685 to 586271 on a sequence. Reviewed-by: Mickaël Raulet <mraulet@insa-rennes.fr> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* hevc: wait proper position for tmvpChristophe Gisquet2014-08-12
| | | | | | | | | The position is either rounded or not checked, so delay the wait to check the proper value. Reviewed-by: Mickaël Raulet <mraulet@insa-rennes.fr> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* hevc: use intreadwriteChristophe Gisquet2014-08-12
| | | | | | When dealing with MVs, both components may be processed at a time. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* hevc: derive partial merge listChristophe Gisquet2014-08-12
| | | | | | The merge list only needs to be derived up to the merge index. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* hevc: derive partially amvp listChristophe Gisquet2014-08-12
| | | | | | When the candidate has been found, no need to derive others. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* hevc: simplify roundingChristophe Gisquet2014-08-12
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* hevc: reorder loopsChristophe Gisquet2014-08-12
| | | | | | iterate over memory in a more continuous order Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avcodec: Postpone FF_IDCT_XVIDMMX removal until the next version bumpDiego Biurrun2014-08-10
|
* lavc: drop the av_fast_{re,m}alloc compatibility wrappersAnton Khirnov2014-08-10
| | | | They were only needed until the bump.
* tiff: Improve grayscale supportDiego Elio Pettenò2014-08-10
| | | | | | | | | | Only use PAL8 if palette is present, else use GRAY8 for pixfmt. Instead of simulating a grayscale palette, use real grayscale pixels, if no palette is actually defined. Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* lavc: remove obsolete and disabled avpriv functionsAnton Khirnov2014-08-09
|
* Remove obsolete FF_API_AVFRAME_COLORSPACE cruft.Anton Khirnov2014-08-09
|
* Bump major versions of all libraries.Anton Khirnov2014-08-09
|
* Postpone API-incompatible changes until the next bump.Anton Khirnov2014-08-09
|
* hevc_filter: avoid excessive calls to ff_hevc_get_ref_list()Anton Khirnov2014-08-09
| | | | | | | | 1) each of the loops run within a single CTB, so the relevant reference list is constant 2) when that CTB is, or lies on the same slice as, the current one, we can use a simple access instead of a relatively expensive call to ff_hevc_get_ref_list()
* hevc_refs: drop the handling of negative coordinates in ff_hevc_get_ref_list()Anton Khirnov2014-08-09
| | | | | It makes no sense and cannot happen in any place from which this function is called.
* hevc_filter: move some conditions out of loopsAnton Khirnov2014-08-09
|
* hevc: deobfuscate slice/tile boundary handling for DBFAnton Khirnov2014-08-09
| | | | | Use named constants instead of magic numbers, avoid using variables with inverse meaning from what their name implies.
* hevc_filter: drop more redundant checksAnton Khirnov2014-08-09
| | | | The if() around those loops ensures this condition is always false.
* hevc_filter: drop redundant checksAnton Khirnov2014-08-09
| | | | | ff_hevc_deblocking_boundary_strengths() is never called if the deblocking filter is disabled for the slice.
* hevc: calculate the dbf strength in hls_pcm_sample() only if dbf is enabledAnton Khirnov2014-08-09
|
* avcodec: Rename xvidmmx IDCT to xvidDiego Biurrun2014-08-08
| | | | The Xvid IDCT is not MMX-specific.
* xvididct: Ensure that the scantable permutation is always set correctlyDiego Biurrun2014-08-08
| | | | | This fixes cases where the scantable permuation would get overwritten by the general idctdsp initialization.
* idct: cosmetics: Drop one unnecessary if-block levelDiego Biurrun2014-08-08
|
* avcodec: Undeprecate reordered_opaqueDiego Biurrun2014-08-07
| | | | | | | It allows attaching other external, opaque data to the frame and passing it through the reordering process, for cases when the caller wants other data than just the plain packet pts. There is no way to cleanly achieve this without the field.
* h264: fix interpretation of interleved stereo modesFelix Abecassis2014-08-07
| | | | | | Column and row frame packing arrangements were inverted. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* svq1: do not modify the input packetAnton Khirnov2014-08-06
| | | | | | | | | | | The input data must remain constant, make a copy instead. This is in theory a performance hit, but since I failed to find any samples using this feature, this should not matter in practice. Also, check the size of the header, avoiding invalid reads on truncated data. CC:libav-stable@libav.org
* cdgraphics: do not return 0 from the decode functionAnton Khirnov2014-08-06
| | | | | | | 0 means no data consumed, so it can trigger an infinite loop in the caller. CC:libav-stable@libav.org
* cdgraphics: switch to bytestream2Anton Khirnov2014-08-06
| | | | | | | Fixes possible invalid memory accesses on corrupted data. CC:libav-stable@libav.org Bug-ID: CVE-2013-3674
* jpeg2000: enable 4 component pixel formatsVittorio Giovara2014-08-06
| | | | | | Bug-Id: 721 CC: libav-stable@libav.org Sample-Id: 31230.mov
* huffyuvdec: check width size for yuv422pMichael Niedermayer2014-08-05
| | | | | | | | | Avoid out of array accesses. CC: libav-stable@libav.org Bug-Id: CVE-2013-0848 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mmvideo: check horizontal coordinate tooMichael Niedermayer2014-08-05
| | | | | | | | | Fixes out of array accesses. Bug-Id: CVE-2013-3672 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* wmalosslessdec: fix mclms_coeffs* array sizeMichael Niedermayer2014-08-05
| | | | | | | | | Fixes corruption of context Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org Bug-Id: CVE-2014-2098 Signed-off-by: Anton Khirnov <anton@khirnov.net>
* vc-1: Optimise parser (with special attention to ARM)Ben Avison2014-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation of the parser made four passes over each input buffer (reduced to two if the container format already guaranteed the input buffer corresponded to frames, such as with MKV). But these buffers are often 200K in size, certainly enough to flush the data out of L1 cache, and for many CPUs, all the way out to main memory. The passes were: 1) locate frame boundaries (not needed for MKV etc) 2) copy the data into a contiguous block (not needed for MKV etc) 3) locate the start codes within each frame 4) unescape the data between start codes After this, the unescaped data was parsed to extract certain header fields, but because the unescape operation was so large, this was usually also effectively operating on uncached memory. Most of the unescaped data was simply thrown away and never processed further. Only step 2 - because it used memcpy - was using prefetch, making things even worse. This patch reorganises these steps so that, aside from the copying, the operations are performed in parallel, maximising cache utilisation. No more than the worst-case number of bytes needed for header parsing is unescaped. Most of the data is, in practice, only read in order to search for a start code, for which optimised implementations already existed in the H264 codec (notably the ARM version uses prefetch, so we end up doing both remaining passes at maximum speed). For MKV files, we know when we've found the last start code of interest in a given frame, so we are able to avoid doing even that one remaining pass for most of the buffer. In some use-cases (such as the Raspberry Pi) video decode is handled by the GPU, but the entire elementary stream is still fed through the parser to pick out certain elements of the header which are necessary to manage the decode process. As you might expect, in these cases, the performance of the parser is significant. To measure parser performance, I used the same VC-1 elementary stream in either an MPEG-2 transport stream or a MKV file, and fed it through avconv with -c:v copy -c:a copy -f null. These are the gperftools counts for those streams, both filtered to only include vc1_parse() and its callees, and unfiltered (to include the whole binary). Lower numbers are better: Before After File Filtered Mean StdDev Mean StdDev Confidence Change M2TS No 861.7 8.2 650.5 8.1 100.0% +32.5% MKV No 868.9 7.4 731.7 9.0 100.0% +18.8% M2TS Yes 250.0 11.2 27.2 3.4 100.0% +817.9% MKV Yes 149.0 12.8 1.7 0.8 100.0% +8526.3% Yes, that last case shows vc1_parse() running 86 times faster! The M2TS case does show a larger absolute improvement though, since it was worse to begin with. This patch has been tested with the FATE suite (albeit on x86 for speed). Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* vc-1: Add platform-specific start code search routine to VC1DSPContext.Ben Avison2014-08-04
| | | | | | | Initialise VC1DSPContext for parser as well as for decoder. Note, the VC-1 code doesn't actually use the function pointer yet. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* h264: Move start code search functions into separate source files.Ben Avison2014-08-04
| | | | | | This permits re-use with parsers for codecs which use similar start codes. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avcodec: Suppress deprecation warnings from DTG code scheduled for removalDiego Biurrun2014-08-04
|
* tiff: support reading gray+alpha at 8 bitsCarl Eugen Hoyos2014-08-04
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* tiff: support reading gray+alpha at 16 bitsVittorio Giovara2014-08-04
|
* png: support reading gray+alpha at 16 bitsVittorio Giovara2014-08-04
|
* png: disable broken MMX/SIMD code for bpp <= 2Vittorio Giovara2014-08-04
| | | | | The decoder was producing different results when ASM was disabled. Based on a long debug session with Kostya.
* avutil: rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8Vittorio Giovara2014-08-04
| | | | | | | The rationale is that you have a packed format in form <greyscale sample> <alpha sample> <greyscale sample> <alpha sample> and shortening greyscale to 'G' might make one thing about Greenscale instead. An alias pixel format and color space name are provided for compatibility.
* avcodec: Deprecate dtg_active_format field in favor of avframe side-dataKieran Kunhya2014-08-03
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* huffyuv: Check and propagate function return valuesDiego Biurrun2014-08-03
| | | | | | | | | | Bug-Id: CVE-2013-0868 inspired by a patch from Michael Niedermayer <michaelni@gmx.at> Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Diego Biurrun <diego@biurrun.de> CC: libav-stable@libav.org