summaryrefslogtreecommitdiff
path: root/libavcodec/vc1dec.c
Commit message (Collapse)AuthorAge
* lavc: Rename hwaccel.h to hwconfig.hMark Thompson2020-04-26
| | | | | This already applied to decoders as well as hwaccels, and adding encoder support was going to make the name even more inaccurate.
* avcodec/vc1dec: Allocate only as much space as is unescapedMichael Niedermayer2020-01-18
| | | | | | | | | Fixes: OOM Fixes: 18137/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5723834900021248 Fixes: 20037/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5683758976204800 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/vc1: Remove bits variableMichael Niedermayer2020-01-11
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1dec: Check field_mode for spritesMichael Niedermayer2020-01-11
| | | | | | | | Fixes: Out of array read Fixes: 19263/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5389219325542400 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1dec: Limit bits by the actual bitstream sizeMichael Niedermayer2020-01-11
| | | | | | | | Fixes: Timeout (350 ->19sec) Fixes: 19249/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-6566896438870016 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1dec: Fix "return -1" casesMichael Niedermayer2019-12-28
| | | | | Reviewed-by: "mypopy@gmail.com" <mypopy@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1dec: Free sprite_output_frame on errorMichael Niedermayer2019-12-28
| | | | | | | | Fixes: memleaks Fixes: 19471/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5688035714269184 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1dec: remove the unneeded ()Limin Wang2019-12-26
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1dec: Require res_sprite for wmv3imagesMichael Niedermayer2019-08-31
| | | | | | | | | | | non res_sprite leads to decoder delay which leads to assertion failure Fixes: Assertion failure Fixes: 16402/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3IMAGE_fuzzer-5704510034411520 Fixes: left shift of 1073741824 by 1 places cannot be represented in type 'int' Fixes: 16425/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3IMAGE_fuzzer-5692858838810624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1: fix check for missing CBPTABJerome Borsboom2018-06-29
| | | | | | CBPTAB must be present in (non skipped) P and B pictures. Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
* avcodec/vc1: support multi-slice field interlaced pictures with hwaccelJerome Borsboom2018-06-17
| | | | | | | | | When using hardware accelerated decoding for multi-slice field interlaced pictures, only the first slice was decoded. This patch adds the neccesary looping over the remaining slices that may exist in field interlaced pictures. Additionally, we align the calculation of mby_start for the second field with the method given in VC-1 spec. Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
* avcodec/vc1: fix calculation of the last line of a sliceJerome Borsboom2018-05-20
| | | | | | | | Only for the last slice of the first field is the last line of the slice equal to the height of the field. Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1: store additional bitstream elements during MB decodingJerome Borsboom2018-04-25
| | | | | | | The new loop filter needs additional MB properties to make its filtering decisions. Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
* avcodec/vc1dec: fix preprocessor checks and hw_configs lists for the hwaccelsJames Almer2017-11-26
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* lavc: Add hardware config metadata for decoders supporting hardware outputMark Thompson2017-11-26
| | | | | | | | | This includes a pointer to the associated hwaccel for decoders using hwaccels - these will be used later to implement the hwaccel setup without needing a global list. Also added is a new file listing all hwaccels as external declarations - this will be used later to generate the hwaccel list at configure time.
* avcodec: Implement vc1 nvdec hwaccelPhilip Langdale2017-11-14
| | | | | This hwaccel is interesting because it also works for wmv3/9 content, which is not supported by the nvidia parser used by cuviddec.
* Merge commit 'dd343fd986459f467a2d1d70c26101dff1d47d68'James Almer2017-10-23
|\ | | | | | | | | | | | | * commit 'dd343fd986459f467a2d1d70c26101dff1d47d68': lavu: Drop deprecated VDPAU pixel formats Merged-by: James Almer <jamrial@gmail.com>
| * lavc: Remove deprecated XvMC support hacksDiego Biurrun2017-03-23
| | | | | | | | Deprecated in 11/2013.
* | Merge commit '7b917041184874e7d7cba4450813de7e0bb28a33'James Almer2017-10-21
|\| | | | | | | | | | | | | * commit '7b917041184874e7d7cba4450813de7e0bb28a33': lavc: Drop deprecated VDPAU codec capability Merged-by: James Almer <jamrial@gmail.com>
| * vc1: check that slices have a positive heightAnton Khirnov2016-08-18
| | | | | | | | | | | | | | Fixes possible invalid reads. CC: libav-stable@libav.org Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
* | dxva: add support for new dxva2 and d3d11 hwaccel APIswm42017-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also adds support to avconv (which is trivial due to the new hwaccel API being generic enough). The new decoder setup code in dxva2.c is significantly based on work by Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites. Merges Libav commit f9e7a2f95a7194a8736cc1416a03a1a0155a3e9f. Also adds untested VP9 support. The check for DXVA2 COBJs is removed. Just update your MinGW to something newer than a 5 year old release. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | vc1dec: support multiple slices in frame coded images with hwaccelHendrik Leppkes2016-11-26
| | | | | | | | Based on a patch by Jun Zhao <mypopydev@gmail.com>
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\| | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit 'ca8c7591735c0f80cc29e31e2e92cb10228e14c7'Derek Buitenhuis2016-05-07
|\| | | | | | | | | | | | | * commit 'ca8c7591735c0f80cc29e31e2e92cb10228e14c7': intrax8: Remove mpegvideo dependency Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Remove mpegvideo dependencyVittorio Giovara2016-03-29
| |
* | Merge commit '9fa888c02801fff2e8817c24068f5296bbe60000'Derek Buitenhuis2016-05-07
|\| | | | | | | | | | | | | * commit '9fa888c02801fff2e8817c24068f5296bbe60000': intrax8: Keep a reference to the decoder blocks Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Keep a reference to the decoder blocksVittorio Giovara2016-03-29
| |
* | Merge commit 'd0540fd02171a6233d2016b199d013299debf7e3'Derek Buitenhuis2016-05-07
|\| | | | | | | | | | | | | * commit 'd0540fd02171a6233d2016b199d013299debf7e3': intrax8: Pass macroblock size to ff_intrax8_common_init Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Pass macroblock size to ff_intrax8_common_initVittorio Giovara2016-03-29
| | | | | | | | Helps in decoupling this code from mpegvideo.
* | Merge commit '1eaae7abb8f208fefb4e8b9e983e61b2499206a3'Derek Buitenhuis2016-04-24
|\| | | | | | | | | | | | | * commit '1eaae7abb8f208fefb4e8b9e983e61b2499206a3': intrax8: Reference the current AVCodecContext Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Reference the current AVCodecContextVittorio Giovara2016-03-25
| | | | | | | | It will be needed to initialize BlockDSP in the next commit.
* | Merge commit '68127e1bf8037a6e0acd6401cc8c5da950e3fa0a'Derek Buitenhuis2016-04-24
|\| | | | | | | | | | | | | * commit '68127e1bf8037a6e0acd6401cc8c5da950e3fa0a': intrax8: Keep a reference to the context idctdsp Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * intrax8: Keep a reference to the context idctdspVittorio Giovara2016-03-25
| | | | | | | | | | Use it instead of the embedded mpegvideo one. Update init function signature to load it directly from the callers.
* | Merge commit 'd909f43b5c773a73c8d526638744547ba4aa8c59'Derek Buitenhuis2016-04-17
|\| | | | | | | | | | | | | * commit 'd909f43b5c773a73c8d526638744547ba4aa8c59': vc1dec: wmv2dec: Validate ff_intrax8_common_init return value Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * vc1dec: wmv2dec: Validate ff_intrax8_common_init return valueVittorio Giovara2016-03-22
| |
| * lavu: deprecate AV_PIX_FMT_VAAPI_*, replace with AV_PIX_FMT_VAAPIMark Thompson2016-03-19
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit 'e66fa35392cd45d0a80774cd057fb765d60def43'Derek Buitenhuis2016-04-11
|\| | | | | | | | | | | | | * commit 'e66fa35392cd45d0a80774cd057fb765d60def43': vc1dec: Check group allocations separatedly Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * vc1dec: Check group allocations separatedlyVittorio Giovara2016-02-25
| | | | | | | | This avoids accessing NULL pointers in case of error.
| * vc1dec: Fix leak on error for array allocationsVittorio Giovara2016-02-25
| | | | | | | | | | The deinit function in the 'error' section will correctly free everything.
* | Merge commit 'f91d94bdfc3f5f83ff0be4d19d10d0a35697386f'Derek Buitenhuis2016-04-11
|\| | | | | | | | | | | | | * commit 'f91d94bdfc3f5f83ff0be4d19d10d0a35697386f': vc1dec: Properly call deinit function on error Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * vc1dec: Properly call deinit function on errorVittorio Giovara2016-02-25
| |
* | Merge commit '35b1cd343cd703c1b0fc926dc43a92141a357380'Derek Buitenhuis2016-04-11
|\| | | | | | | | | | | | | * commit '35b1cd343cd703c1b0fc926dc43a92141a357380': vc1dec: Drop commented out cruft Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * vc1dec: Drop commented out cruftVittorio Giovara2016-02-25
| |
* | lavc: fix profile declarations for vdpau decodersHendrik Leppkes2016-01-01
| |
* | Merge commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6'Hendrik Leppkes2016-01-01
|\| | | | | | | | | | | | | * commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6': lavc: add profiles to AVCodecDescriptor Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: add profiles to AVCodecDescriptorAnton Khirnov2015-12-12
| | | | | | | | | | The profiles are a property of the codec, so it makes sense to export them through AVCodecDescriptors, not just the codec implementations.
* | avcodec/vc1dec: Re-order init to avoid initting hwaccel too earlyPhilip Langdale2015-08-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least for vdpau, the hwaccel init code tries to check the video profile and ensure that there is a matching vdpau profile available. If it can't find a match, it will fail to initialise. In the case of wmv3/vc1, I observed initialisation to fail all the time. It turns out that this is due to the hwaccel being initialised very early in the codec init, before the profile has been extracted and set. Conceptually, it's a simple fix to reorder the init code, but it gets messy really fast because ff_get_format(), which is what implicitly trigger hwaccel init, is called multiple times through various shared init calls from h263, etc. It's incredibly hard to prove to my own satisfaction that it's safe to move the vc1 specific init code ahead of this generic code, but all the vc1 fate tests pass, and I've visually inspected a couple of samples and things seem correct. Signed-off-by: Philip Langdale <philipl@overt.org>
* | vaapi: define a unique pixel format for VA-API (AV_PIX_FMT_VAAPI).Gwenole Beauchesne2015-08-19
| | | | | | | | | | | | | | | | | | | | Deprecate older VA pixel formats (MOCO, IDCT) as it is now very unlikely to ever be useful in the future. Only keep plain AV_PIX_FMT_VAAPI format that is aliased to the older VLD variant. This is an API change. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
* | lavc: move vdpau decoders under FF_API_VDPAU.wm42015-08-18
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>