summaryrefslogtreecommitdiffstats
path: root/libavcodec
Commit message (Collapse)AuthorAgeFilesLines
* avcodec: set correct return value in ff_mpeg_ref_picturePan Bian2017-11-281-1/+3
| | | | | | | | | | In function ff_mpeg_ref_picture(), it returns 0 on the error path that the return value of av_buffer_ref() is NULL. 0 indicates success, which seems to deviate from the fact. Set ret to AVERROR(ENOMEM) to propagate the error status to the callers. Signed-off-by: Pan Bian <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* prores: Always assume limited rangeVittorio Giovara2017-11-281-0/+1
| | | | As defined by the specification.
* avcodec/videotoolbox: fix SEGV when hwaccel decoding h264 with ffmpeg.cAman Gupta2017-11-281-1/+7
| | | | Signed-off-by: Aman Gupta <[email protected]>
* avcodec/nvdec: More effort to make vp8 compile with gcc < 4.6Philip Langdale2017-11-261-11/+10
| | | | | | | | | | | I'm told my prefix work-around wasn't enough to make it compile, although I'm not sure why; I did some basic testing and that approach appeared to work, but I'm not in a position to do a full compile on CentOS 6 so I can't be sure of anything. I have had it confirmed that the additional change to not use named initialisers is enough to make it compile, so let's throw that into the mix too.
* avcodec/nvdec: Make vp8 initialisation more 'compatible'Philip Langdale2017-11-261-5/+14
| | | | | | | | | | | | | | | | | Ancient versions of gcc (pre 4.6) can't directly initialise members of anonymous inner unions/structs by name. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 Unfortunately, RHEL 6 shipped with one of these ancient versions and so we're stuck with it until approximately the heat death of the universe. Putting explicit braces into the initialisation is possibly a work-around but the behaviour there was never fully understood before direct initialisation was made to work. So, this may or may not work.
* avcodec/mlpdsp: Fix signed integer overflow, 2nd tryMichael Niedermayer2017-11-271-1/+1
| | | | | | | | | | The outputted bits should match what is used in the lossless check Fixes: runtime error: signed integer overflow: -538697856 * 256 cannot be represented in type 'int' Fixes: 4326/clusterfuzz-testcase-minimized-5689449645080576 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/h264idct_template: Fix integer overflow in ff_h264_idct8_addMichael Niedermayer2017-11-271-4/+4
| | | | | | | | Fixes: signed integer overflow: 452986184 - -2113885312 cannot be represented in type 'int' Fixes: 4196/clusterfuzz-testcase-minimized-5580648594014208 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/kgv1dec: Check that there is enough input for maximum RLE compressionMichael Niedermayer2017-11-271-0/+3
| | | | | | | | Fixes: Timeout Fixes: 4271/clusterfuzz-testcase-4676667768307712 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/vc1dec: fix preprocessor checks and hw_configs lists for the hwaccelsJames Almer2017-11-261-18/+18
| | | | Signed-off-by: James Almer <[email protected]>
* avcodec/mpeg4videodec: fix preprocessor check for the nvdec hwaccelJames Almer2017-11-261-1/+1
| | | | Signed-off-by: James Almer <[email protected]>
* avcodec/nvdec: Implement vp8 hwaccelPhilip Langdale2017-11-266-1/+107
|
* vaapi_decode: Ignore the profile when not usefulMark Thompson2017-11-261-1/+2
| | | | | Enables VP8 decoding - the decoder places the the bitstream version in the profile field, which we want to ignore.
* vaapi: Add VP8 decode hwaccelMark Thompson2017-11-264-0/+245
|
* vp8: Add hwaccel hooksMark Thompson2017-11-263-68/+172
| | | | | | | | | | Also adds some extra fields to the main context structure that may be needed by a hwaccel decoder. The current behaviour of the WebP decoder is maintained by adding an additional field to the VP8 decoder private context to indicate that it is actually being used as WebP (no hwaccel is supported for that case).
* vaapi: Make the decode profile matching more explicitMark Thompson2017-11-261-11/+9
| | | | | Also fixes a bug where it could attempt to decode with an unsupported codec if allow-profile-mismatch was set.
* lavc: Mark all AVHWAccel structures as constMark Thompson2017-11-2628-101/+101
|
* lavc: Delete all fake hwaccelsMark Thompson2017-11-266-122/+1
| | | | They are now unused.
* lavc: Remove register mechanism for hwaccelsMark Thompson2017-11-261-82/+0
| | | | | | | There is no longer any need for a list of them at runtime, because decoders now carry the pointers to their associated hwaccels internally. The file containing external declarations is now used to make the list of hwaccels for configure.
* lavc: Deprecate av_hwaccel_next() and av_register_hwaccel()Mark Thompson2017-11-263-13/+22
|
* lavc: Use hardware config information in ff_get_format()Mark Thompson2017-11-264-94/+211
| | | | | | | | | | | | | | | This removes the dependency that hardware pixel formats previously had on AVHWAccel instances, meaning only those which actually do something need exist after this patch. Also updates avcodec_default_get_format() to be able to choose hardware formats if either a matching device has been supplied or no additional external configuration is required, and avcodec_get_hw_frames_parameters() to use the hardware config rather than searching the old hwaccel list. The FF_CODEC_CAP_HWACCEL_REQUIRE_CLASS mechanism is deleted because it no longer does anything (the codec already contains the pointers to the matching hwaccels).
* lavc: Add hardware config metadata for decoders supporting hardware outputMark Thompson2017-11-2616-1/+372
| | | | | | | | | 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.
* lavc: Add codec metadata to indicate hardware supportMark Thompson2017-11-264-2/+106
|
* avcodec/dirac_dwt: Fix integer overflow in COMPOSE_FIDELITYi*Michael Niedermayer2017-11-261-2/+2
| | | | | | | | Fixes: runtime error: signed integer overflow: -2143827186 - 7404944 cannot be represented in type 'int' Fixes: 4354/clusterfuzz-testcase-minimized-4671122764201984 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* vorbisenc: Check the return value of av_frame_cloneDerek Buitenhuis2017-11-261-1/+5
| | | | | | Prevents a segfault when alloc fails. Signed-off-by: Derek Buitenhuis <[email protected]>
* nvenc: Include config.h before checking for D3D11 supportMark Thompson2017-11-261-2/+2
| | | | Reviewed-by: Timo Rothenpieler <[email protected]>
* h264_picture: Actually return error during alloc failureDerek Buitenhuis2017-11-261-3/+9
| | | | | | Fixes NULL dereference during alloc failure. Signed-off-by: Derek Buitenhuis <[email protected]>
* error_resilience: remove avpriv_atomic usageRostislav Pehlivanov2017-11-262-11/+12
| | | | Signed-off-by: Rostislav Pehlivanov <[email protected]>
* libavcodec/utils.c: simplify avcodec locking with atomicsRostislav Pehlivanov2017-11-262-7/+6
| | | | | | Also makes it more robust than using volatiles. Signed-off-by: Rostislav Pehlivanov <[email protected]>
* lavc/utils.c: use C11 atomics for entangled thread handlingRostislav Pehlivanov2017-11-261-4/+5
| | | | Signed-off-by: Rostislav Pehlivanov <[email protected]>
* avcodec/hapdec : use gray8 for HapAlphaOnly decoding instead of RGB0Martin Vignali2017-11-252-4/+7
|
* avcodec/texturedsp : add rgtc1u gray decodingMartin Vignali2017-11-252-12/+30
| | | | decode rgtc1 block in gray8 picture
* avcodec/fft: fix INTERL macro on 3dnowMikulas Patocka2017-11-251-1/+1
| | | | | | | | | | | | | The commit b7c16a3f2c4921f613319938b8ee0e3d6fa83e8d ("x86: fft: Port to cpuflags") breaks the opus decoder in ffmpeg when compiling for 3dnow. The output is audible, but there's a lot of noise. The reason for the breakage is that the commit unintentionally changed the INTERL macro so that it is empty when compiling for 3dnow. This patch fixes it. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: James Almer <[email protected]>
* Merge commit '136e7cf64ce9e78de7158d6720539d51cb96b743'Mark Thompson2017-11-251-1/+7
|\ | | | | | | | | | | | | * commit '136e7cf64ce9e78de7158d6720539d51cb96b743': qsv/hevcdec: Load hw plugin by default on non-windows os Merged-by: Mark Thompson <[email protected]>
| * qsv/hevcdec: Load hw plugin by default on non-windows osLi, Zhong2017-11-231-1/+7
| | | | | | | | | | | | | | | | | | Software plugin is not available on Linux, Only works on Windows. Similar changes have been applied to qsv hevc encoder by b05128f3c953bd66483e697d60a2e7e45ee9cfa0. Signed-off-by: Zhong Li <[email protected]> Signed-off-by: Maxym Dmytrychenko <[email protected]>
* | ffmpeg libopusdec: fix missing include file in libopusdec.cMikulas Patocka2017-11-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following error when compiling mplayer with libopus. libavcodec/libopusdec.c: In function 'libopus_decode_init': libavcodec/libopusdec.c:130:27: error: implicit declaration of function 'ff_exp10'; did you mean 'ff_exp2fi'? [-Werror=implicit-function-declaration] double gain_lin = ff_exp10(gain_db / (20.0 * 256)); ^~~~~~~~ ff_exp2fi Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec/sbrdsp_fixed: Fix integer overflowMichael Niedermayer2017-11-251-1/+1
| | | | | | | | | | | | | | | | Fixes: signed integer overflow: 2147483598 + 64 cannot be represented in type 'int' Fixes: 4337/clusterfuzz-testcase-minimized-6192658616680448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec/nvdec: Round up odd width/height valuesPhilip Langdale2017-11-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nvdec will not produce odd width/height output, and while this is basically never an issue with most codecs, due to internal alignment requirements, you can get odd sized jpegs. If an odd-sized jpeg is encountered, nvdec will actually round down internally and produce output that is slightly smaller. This isn't the end of the world, as long as you know the output size doesn't match the original image resolution. However, with an hwaccel, we don't know. The decoder controls the reported output size and the hwaccel cannot change it. I was able to trigger an error in mpv where it tries to copy the output surface as part of rendering and triggers a cuda error because cuda knows the output frame is smaller than expected. To fix this, we can round up the configured width/height passed to nvdec so that the frames are always at least as large as the decoder's reported size, and data can be copied out safely. In this particular jpeg case, you end up with a blank (green) line at the bottom due to nvdec refusing to decode the last line, but the behaviour matches cuviddec, so it's as good as you're going to get.
* | avcodec/vorbis: 1 << 31 > int32_t::max(), so use 1u << 31 instead.Dale Curtis2017-11-241-1/+1
| | | | | | | | | | Signed-off-by: Dale Curtis <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec/j2kenc: Only allocate cblk.data onceMichael Niedermayer2017-11-241-1/+2
| | | | | | | | | | | | | | Fixes: memleak Found-by: <jamrial> Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec/x86/exrdsp : use ymm constant for pb_80Martin Vignali2017-11-231-5/+1
| | | | | | | | speed seems to be similar, but simplify code
* | opus_pvq: fix crashing on analysis of monoRostislav Pehlivanov2017-11-231-1/+2
| | | | | | | | Signed-off-by: Rostislav Pehlivanov <[email protected]>
* | avcodec/jpeg2000: Dynamically allocate codeblock dataMichael Niedermayer2017-11-224-9/+37
| | | | | | | | | | | | | | | | | | | | | | Fixes: OOM Fixes: 3541/clusterfuzz-testcase-minimized-6469958596820992 Adds support for decoding codeblock data larger than 8kb Reduces decoder memory consumption Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* | avcodec/mpeg4videodec: Check also for negative versions in the validity checkMichael Niedermayer2017-11-211-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <[email protected]>
* | x86/utvideodsp: reuse shared constantsJames Almer2017-11-211-13/+4
| | | | | | | | | | | | | | Remove the broadcast instructions as well now that they are wide enough. Signed-off-by: James Almer <[email protected]>
* | x86/constants: make pb_80 32 byte wideJames Almer2017-11-212-2/+3
| | | | | | | | Signed-off-by: James Almer <[email protected]>
* | avcodec/hapdec : add support for hapqa decodingMartin Vignali2017-11-212-7/+49
| |
* | avcodec/hapdec : indent after previous commitMartin Vignali2017-11-211-33/+33
| |
* | avcodec/hapdec : reorganize code before adding multi-texture decodingMartin Vignali2017-11-212-9/+32
| |
* | avcodec/huffyuvdspenc : add diff_int16 AVX2 funcMartin Vignali2017-11-212-0/+10
| |
* | avcodec/huffyuvdspenc : reorganize diff_int16Martin Vignali2017-11-211-7/+17
| |