summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* aacdec: use float_dsp in apply_independent_couplingLynne2019-05-03
| | | | Could not be used in apply_dependent_coupling because of alignment issues.
* x86/v210dec: use named registersJames Almer2019-05-03
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* x86/v210dec: don't reserve more xmm regs than neededJames Almer2019-05-03
| | | | | | | Prevents pointless register saving on win64 for the sse3 and avx versions of the function. Signed-off-by: James Almer <jamrial@gmail.com>
* x86/v210dec: remove duplicate load instructionJames Almer2019-05-03
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/x86/v210: fix operands of vpblendd used in new avx2 codeJames Darnley2019-05-02
| | | | Assembly failed when using yasm rather than nasm.
* libavcodec Adding ff_v210_planar_unpack AVX2Michael Stoner2019-05-02
| | | | | Replaced VSHUFPS with VPBLENDD to relieve port 5 bottleneck AVX2 is 1.4x faster than AVX
* avcodec/v210dec: move DSP function setting into dedicated functionJames Darnley2019-05-02
| | | | Prepare for checkasm test.
* avcodec/wavpackenc: use ff_clz()Paul B Mahol2019-05-02
|
* avcodec/cinepak: Add missing constMichael Niedermayer2019-05-02
| | | | | Found-by: <mkver> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/agm: Check output size before allocationMichael Niedermayer2019-04-30
| | | | | | | | Fixes: OOM Fixes: 14198/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5723579234123776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/truemotion2: Fix 2 integer overflows in tm2_update_block()Michael Niedermayer2019-04-30
| | | | | | | | Fixes: signed integer overflow: -2147483648 + -1 cannot be represented in type 'int' Fixes: 14107/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEMOTION2_fuzzer-5694078680825856 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cinepak: Check slice_size before allocating imageMichael Niedermayer2019-04-30
| | | | | | | | | Fixes: Timeout (16sec -> 125msec) Fixes: 14283/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CINEPAK_fuzzer-5742851457024000 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cbs_h2645: use the fixed() macro for forbidden_zero_bitJames Almer2019-04-28
| | | | | | | | This follows the spec definition, and removes a field from the relevant structs. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_h2645: add macros to read and write fields with no custom range ↵James Almer2019-04-28
| | | | | | | of values Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_av1: add missing value range constrains to timecode Metadata OBUJames Almer2019-04-28
| | | | | | | Also infer the value time_offset_length as 0 when it's not present. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/scpr: avoid using uninitialized valuePaul B Mahol2019-04-28
| | | | Fixes #7872.
* avcodec/pnm_parser: Remember the length already scanned for ascii imagesMichael Niedermayer2019-04-27
| | | | | | | Fixes: speed regression with xmap_samsung_gear_2560x1280.pgm Found-by: Michael Koch Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pnm_parser: Remember the size of the image and do not reparse the headerMichael Niedermayer2019-04-27
| | | | | | | | | Fixes: Timeout (11sec -> 60ms) Fixes: 14270/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PAM_fuzzer-5734809634078720 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/scpr3: add missing check for decode_value3() return valueJames Almer2019-04-27
| | | | | | Fixes ticket #7866. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/nvenc: fix indentationTimo Rothenpieler2019-04-27
|
* avcodec/nvenc: only unregister input resources when absolutely neededTimo Rothenpieler2019-04-27
| | | | | | | | | | | | This reverts nvenc to old behaviour, which in some super rare edge cases performs better. The implication of this is that any potential API user who relies on nvenc cleaning up every frames device resources after it's done using them will have to change their usage pattern. That should not be a problem, since pretty much every normal usage pattern automatically implies that surfaces are reused from a common pool, since constant re-allocation is also very expensive.
* x86/opusdsp: replace loads with shufflesLynne2019-04-26
| | | | | | | | Has a slight speedup. Can't be carried over to aarch64, since it has no shufps-like instruction. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/gdv: Check input palette size before rescale()Michael Niedermayer2019-04-26
| | | | | | | | | Fixes: Timeout (22sec -> 11sec) Fixes: 13576/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_GDV_fuzzer-5681024577568768 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/jpeg2000dec: Fix return type of get_plt()Michael Niedermayer2019-04-25
| | | | | Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/jpeg2000dec: Check PLT data somewhatMichael Niedermayer2019-04-25
| | | | | | | | Fixes: Timeout (21sec -> 0.6sec) Fixes: 14134/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5768371078955008 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/jpeg2000dec: Replace the step_x/y assert by a check in the CPRL case ↵Michael Niedermayer2019-04-25
| | | | | | | | | | as with the PCRL case Fixes: assertion failure Fixes: 14246/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5758393601490944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/jpeg2000: Check stepsize before using itMichael Niedermayer2019-04-25
| | | | | | | | | Fixes: value 1.87633e+10 is outside the range of representable values of type 'int' Fixes: Undefined behavior Fixes: 14246/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5758393601490944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/qtrle: Check how much of the chunk is available before decodingMichael Niedermayer2019-04-25
| | | | | | | | Fixes: Timeout (10sec -> 2sec) Fixes: 13979/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_QTRLE_fuzzer-5635157718990848 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacdec_fixed: Fix undefined shift in noise_scale()Michael Niedermayer2019-04-25
| | | | | | | Fixes: 13655/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5120559430500352 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/bintext: Add error message when resolution is too small for font.Nikolas Bowe2019-04-25
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/zmbv: optimize motion compensation with memcpy()Michael Niedermayer2019-04-25
| | | | | | | | | Fixes: Timeout (16 sec - 7 sec) Fixes: 14237/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ZMBV_fuzzer-5693453897302016 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h264_ps: use get_se_golomb_long() to parse some sps fieldsJames Almer2019-04-24
| | | | | | All three may be up to 32 bits wide. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264_ps: fix storage size for offset_for_ref_frameJames Almer2019-04-24
| | | | | | | The spec defines the valid range of values to be INT32_MIN + 1 to INT32_MAX, inclusive. Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/arbc: Try to correct keyframe/frame typeMichael Niedermayer2019-04-24
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/arbc: Skip unchanged framesMichael Niedermayer2019-04-24
| | | | | | | | Fixes: Timeout (16sec -> 5sec) Fixes: 14128/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARBC_fuzzer-5767365721063424 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dxtory: Check slice_size against minimum in dxtory_decode_v2()Michael Niedermayer2019-04-24
| | | | | | | | Fixes: Timeout (33sec -> 16 milli sec) Fixes: 14181/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXTORY_fuzzer-5681840708386816 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dsicinvideo: check the amount decoded by cin_decode_huffman()Michael Niedermayer2019-04-24
| | | | | | | | | | | Fixes: Timeout (158sec -> 36sec) Fixes: 14214/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DSICINVIDEO_fuzzer-5633569034076160 This is untested with valid cin files as none of the files i found cover the changed codepath Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/agm: Check that there is available input in read_code()Michael Niedermayer2019-04-24
| | | | | | | | Fixes: Timeout (46sec -> 7ms) Fixes: 14030/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5721258760601600 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cuviddec: improve progressive frame detectionSergey Svechnikov2019-04-23
| | | | | | | | | | | | | There are 2 types of problems when using adaptive deinterlace with cuvid: 1. Sometimes, in the middle of transcoding, cuvid outputs frames with visible horizontal lines (as though weave deinterlace method was chosen); 2. Occasionally, on scene changes, cuvid outputs a wrong frame, which should have been shown several seconds before (as if the frame was assigned some wrong PTS value). The reason is that sometimes CUVIDPARSERDISPINFO has property progressive_frame equal to 1 with interlaced videos. In order to fix the problem we should check if the video is interlaced or progressive in the beginning of a video sequence (cuvid_handle_video_sequence). And then we just use this information instead of the property progressive_frame in CUVIDPARSERDISPINFO (which is unreliable). Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/agm: remove ;;Michael Niedermayer2019-04-21
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/agm: Check for too many too short codes in make_new_tree()Michael Niedermayer2019-04-21
| | | | | | | | | Fixes: SEGV on unknown address Fixes: 14198/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5723579234123776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/agm: Do not crash on invalid codesMichael Niedermayer2019-04-21
| | | | | | | | | | | | | I do not know if such vlc trees are allowed in agm, I have no specification So i do not know if these should be treated as error, or not. But the code does contain a check for idx < 0 already ... Fixes: Stack-buffer-overflow in get_tree_codes Fixes: 14189/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AGM_fuzzer-5745747003179008 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ccaption_dec: Add a blank like at the end to avoid rollup reading ↵Michael Niedermayer2019-04-21
| | | | | | | | | | | from outside Fixes: index 20 out of bounds for type 'const char *[4][128]' Fixes: 14367/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CCAPTION_fuzzer-5718819672162304 Reviewed-by: Paul B Mahol <onemda@gmail.com> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dvdec: add frame threadsPaul B Mahol2019-04-21
|
* avcodec: add AV_CODEC_FLAG_DROPCHANGED to flagsGyan Doshi2019-04-20
| | | | Discard decoded frames which differ from first decoded frame in stream.
* avcodec/pictordec: Only recalculate d when y changes in picmemset()Michael Niedermayer2019-04-19
| | | | | | | | Fixes: Timeout (21->18sec) Fixes: 14124/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PICTOR_fuzzer-5633887734071296 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pictordec: avoid pointers in picmemset()Michael Niedermayer2019-04-19
| | | | | | | Improves overall speed by about 3% Testcase: 14124/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PICTOR_fuzzer-5633887734071296 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wmv2dec: Check that the P frame secondary header fit in the inputMichael Niedermayer2019-04-19
| | | | | | | | Fixes: Timeout (64sec ->2 sec) Fixes: 14131/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV2_fuzzer-5719879556005888 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ivi: Move buffer/block end check to caller of ivi_dc_transform()Michael Niedermayer2019-04-19
| | | | | | | | Fixes: assertion failure Fixes: 14078/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO5_fuzzer-5760571284127744 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/diracdec: Use 64bit in intermediate of global motion vector field ↵Michael Niedermayer2019-04-19
| | | | | | | | | | | generation It seems the specification does not limit the value to 32bit Fixes: signed integer overflow: -109611143 * 24 cannot be represented in type 'int' Fixes: 13477/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5648337460527104 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>