summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* libavcodec/hevc_filter: move AVDISCARD_NONREF switch-case into functionsfan52017-12-08
| | | | | | In preparation for implementation of skip_frame. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/nvdec: Fix capability check with old drivers.Jacob Trimble2017-12-08
| | | | | | | | Copied the check from cuviddec.c (*_cuvid decoders) to allow the capability check to be optional for older drivers. Signed-off-by: Jacob Trimble <modmaker@google.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* opus: fix hybrid folding indexing during band quantizationRostislav Pehlivanov2017-12-08
| | | | | | | Resulted in valgrind errors due to uninitialized memory. Also updates fate and makes it use the tron sample result. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* lavc/libx265: mark disposable framesJohn Stebbins2017-12-07
| | | | | | Used by movenc to fill sdtp box Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libx265 - Add named option to set profileGyan Doshi2017-12-06
| | | | | | | | | | | Adds call to x265_param_apply_profile after x265_param_parse. Added as private option since HEVC profiles other than Main, Main 10 and MSP in AVCodecContext are consolidated in a single constant. Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com> Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Reviewed-by: Lou Logan <lou@lrcd.com>
* avcodec/diracdsp: Fix integer overflow in PUT_SIGNED_RECT_CLAMPED()Michael Niedermayer2017-12-06
| | | | | | | | Fixes: runtime error: signed integer overflow: 2147483646 + 2048 cannot be represented in type 'int' Fixes: 4479/clusterfuzz-testcase-minimized-6529894147162112 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dirac_dwt: Fix integer overflows in COMPOSE_DAUB97*Michael Niedermayer2017-12-06
| | | | | | | | Fixes: 4478/clusterfuzz-testcase-minimized-4752113767809024 Fixes: runtime error: signed integer overflow: -2147483626 + -319489 cannot be represented in type 'int' Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/extract_extradata_bsf: Fix leak discovered via fuzzingNikolas Bowe2017-12-06
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* vaapi_h265: Add named options for setting profile and levelMark Thompson2017-12-04
| | | | Also fixes the default, which previously contained a nonsense value.
* vaapi_h264: Add named options for setting profile and levelMark Thompson2017-12-04
|
* rkmpp: Add hardware config informationMark Thompson2017-12-04
| | | | | This is not strictly required here because the rkmpp decoder does not call ff_get_format(), but it may be helpful metadata for users.
* libavcodec/hevc_filter: support for all skip_loop_filter levels.sfan52017-12-04
| | | | | | Continues where commit 52c75d486ed5f75cbb79e5dbd07b7aef24f3071f left off. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* opus_pvq: do not compile encoding/decoding code if the encoder/decoder is ↵Rostislav Pehlivanov2017-12-04
| | | | | | | | | | disabled This should save quite a bit of space if either has been disabled for size reasons. Could just check if the encoding flag is set during runtime on every single location, however the overhead of branch misses would somewhat decrease performance. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opus_celt: deduplicate band quantization/dequantization functionRostislav Pehlivanov2017-12-04
| | | | | | No point in having the same code twice to do exactly the same thing. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opus: add an option to toggle intensity stereo phase inversionRostislav Pehlivanov2017-12-04
| | | | | | | | | Due to a somewhat high volume of complains, phase inversion has been made optional with RFC8251. This allows for better bass frequency response when partially downmixing to play on systems with an LFE speaker. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opus: Add Special Hybrid Folding (per RFC8251)Andrew D'Addesio2017-12-04
| | | | | | | | | | | This decoder-side change, introduced in RFC 8251 (section 9), slightly improves the decoded quality of 16kbps speech in Hybrid Mode. Differences can be seen/heard in testvector05.bit, testvector06.bit, and testvector12.bit in the RFC 6716/8251 testvectors found here: https://people.xiph.org/~greg/opus_testvectors/ Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
* opus_celt: Fix arithmetic overflow (per RFC8251)Andrew D'Addesio2017-12-04
| | | | | | | | As per Sec.8 of RFC8251: Cap on Band Energy NaN due to large log-energy value. Affects celt_denormalize(). Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
* opus_silk: Fix arithmetic overflow (per RFC8251)Andrew D'Addesio2017-12-04
| | | | | | | | | As per Sec.6 of RFC8251: Integer Wrap-Around in Inverse Gain Computation 32-bit integer overflow in Levinson recursion. Affects silk_is_lpc_stable(). Signed-off-by: Andrew D'Addesio <modchipv12@gmail.com>
* avcodec/h264_parse: Treat escaped and unescaped decoding error equal in ↵Michael Niedermayer2017-12-03
| | | | | | | | | decode_extradata_ps_mp4() Fixes: lorex.mp4 Fixes: ticket6762 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf/movenc: add sdtp (sample dependency) boxJohn Stebbins2017-12-02
| | | | | | The sdtp is required by the AppleTV 4K in order to play 2160p60 video. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/x86/bswapdsp : use macro for 128 bits constants loading in xmm or ymmMartin Vignali2017-12-02
|
* avcodec/jpeg2000: Only allocate Jpeg2000Pass for the encoderMichael Niedermayer2017-12-01
| | | | | | | | | Reduces memory needed. Fixes: OOM Fixes: 4427/clusterfuzz-testcase-minimized-5106919271301120 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/j2kenc: Fix out of array access in encode_cblk()Michael Niedermayer2017-12-01
| | | | | | | Fixes: 4427/clusterfuzz-testcase-minimized-5106919271301120 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevcdsp_template: Fix undefined shift in put_hevc_epel_bi_w_h()Michael Niedermayer2017-12-01
| | | | | | | | Fixes: runtime error: left shift of negative value -127 Fixes: 4397/clusterfuzz-testcase-minimized-4779061080489984 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* mediacodecdec: fix build by including hwaccel.hJan Ekström2017-12-01
| | | | Enables the decoder to utilize the type AVCodecHWConfigInternal.
* avcodec/vorbis: Fix another 1 << 31 > int32_t::max() with 1u.Dale Curtis2017-12-01
| | | | | | | Didn't notice this one when 9648cc6d was landed. Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h264_slice: use H264_SEI_FpaType enum constantsJames Almer2017-12-01
| | | | | | Cosmetic change. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264_sei: remove redundant prefix to H264SEIFramePacking fieldsJames Almer2017-12-01
| | | | | | Cosmetic change. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/dnxhddec: Do not overwrite colorspace if the container has set it.Steven Robertson2017-11-30
| | | | | | | | | | | | | | | | | | | | | The existing logic overrides container metadata even in cases where the container metadata must be trusted (e.g. HDR). The original spec had no provision for specifying color volume, so many files rely on the assumption of Rec. 709. An update to the spec included a 'clv' field for explicitly signaling that the container should be trusted in an existing bitfield in the frame header, but the default of 0 from old encoders forces Rec. 709, which would break any HDR stream. Because there is no place in DNxHR for specifying a transfer function, DNxHR HDR files must include container-level color information. This patch maintains the existing behavior of choosing the 709 over the 601 matrix when container-level information is missing, and allows container-level information to win if present. Signed-off-by: Steven Robertson <steven@strobe.cc> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '99e9697e3a12ab4a6638a36b95edafd6a98f9eaa'James Almer2017-11-29
|\ | | | | | | | | | | | | * commit '99e9697e3a12ab4a6638a36b95edafd6a98f9eaa': stereo3d: Support view type for frame sequence type Merged-by: James Almer <jamrial@gmail.com>
| * stereo3d: Support view type for frame sequence typeVittorio Giovara2017-11-28
| | | | | | | | | | | | Implement detection in h264 and hevc and insertion in framepack filter. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
| * prores: Always assume limited rangeVittorio Giovara2017-11-28
| | | | | | | | As defined by the specification.
* | Merge commit 'b843b343d8a3210ae37a2342b1904a5bd1e5fc6e'James Almer2017-11-29
|\| | | | | | | | | | | | | * commit 'b843b343d8a3210ae37a2342b1904a5bd1e5fc6e': qsvenc: cavlc option is only available for h264 Merged-by: James Almer <jamrial@gmail.com>
| * qsvenc: cavlc option is only available for h264Li, Zhong2017-11-24
| | | | | | | | | | | | | | | | Moving option definition to h264 implementation and fixing command line defaults in order to properly respect cavlc input value Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
* | lavc/samidec: properly raise errors from sami_paragraph_to_ass()Clément Bœsch2017-11-29
| |
* | avcodec/samidec: check av_strdup() return valuePan Bian2017-11-29
| | | | | | | | | | | | | | | | In function sami_paragraph_to_ass(), the return value of av_strdup() is not checked. To avoid potential NULL dereference, the return value should be checked against NULL. Signed-off-by: Pan Bian <bianpan2016@163.com>
* | avcodec/amfenc: move config.h include where it's neededJames Almer2017-11-29
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | vp9_parser: don't split superframes into separate packetswm42017-11-29
| | | | | | | | | | We did this for the sake of the decoder. With the vp9 change, it's not necessary anymore.
* | vp9: use superframe split BSFwm42017-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | webm usually has invisible superframes merged with normal frames. (vpxenc muxes them in this form, which is evidence enough that this is the standard webm packet format. It's rather unclear whether ffmpeg is even allowed to remux them with split packets.) The vp9 decoder needs them to be in separate packets for multithreading to work. Add the BSF to the decoder, so the conversion happens automatically. This contains the important part of fa1749dd34c55fb9, which was apparently skipped in commit d417e95af76. This restores Libav API compatibility.
* | avcodec/nvenc: set correct error codePan Bian2017-11-29
| | | | | | | | | | | | | | | | | | In function process_output_surface(), the return value is 0 on the path that av_mallocz() returns a NULL pointer. 0 indicates success, which deviates from the fact. Return "AVERROR(ENOMEM)" instead of "0". Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* | libvpxenc,vp9: add corpus-complexity optionJames Zern2017-11-28
| | | | | | | | | | | | | | | | | | | | Corpus VBR mode is a variant of standard VBR where the complexity distribution midpoint is passed in rather than calculated for a specific clip or chunk. The valid range is [0, 10000]. 0 (default) uses standard VBR. Signed-off-by: James Zern <jzern@google.com>
* | Add HW H.264 and HEVC encoding for AMD GPUs based on AMF SDKMikhail Mironov2017-11-28
| | | | | | | | | | | | | | Requires AMF headers for at least version 1.4.4.1. Signed-off-by: Mikhail Mironov <mikhail.mironov@amd.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
* | avcodec: set correct return value in ff_mpeg_ref_picturePan Bian2017-11-28
| | | | | | | | | | | | | | | | | | | | 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 <bianpan2016@163.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | prores: Always assume limited rangeVittorio Giovara2017-11-28
| | | | | | | | As defined by the specification.
* | avcodec/videotoolbox: fix SEGV when hwaccel decoding h264 with ffmpeg.cAman Gupta2017-11-28
| | | | | | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* | avcodec/nvdec: More effort to make vp8 compile with gcc < 4.6Philip Langdale2017-11-26
| | | | | | | | | | | | | | | | | | | | | | 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-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-27
| | | | | | | | | | | | | | | | | | | | 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 <michael@niedermayer.cc>
* | avcodec/h264idct_template: Fix integer overflow in ff_h264_idct8_addMichael Niedermayer2017-11-27
| | | | | | | | | | | | | | | | 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 <michael@niedermayer.cc>
* | avcodec/kgv1dec: Check that there is enough input for maximum RLE compressionMichael Niedermayer2017-11-27
| | | | | | | | | | | | | | | | 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 <michael@niedermayer.cc>