summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
* avcodec/hevc_ps: Check delta_pocs in ff_hevc_decode_short_term_rps()Michael Niedermayer2017-08-24
| | | | | | | | Fixes: integer overflow Fixes: 2893/clusterfuzz-testcase-minimized-5809330567774208 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/utils: Fix signed integer overflow in rc_initial_buffer_occupancy ↵Vitaly Buka2017-08-23
| | | | | | | | | | initialization Signed integer overflow is undefined behavior. Detected with clang and -fsanitize=signed-integer-overflow Signed-off-by: Vitaly Buka <vitalybuka@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/aacdec_template: Fix running cleanup in decode_ics_info()Michael Niedermayer2017-08-22
| | | | | | | | | | Fixes: out of array read Fixes: 2873/clusterfuzz-testcase-minimized-5924145713905664 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Previous version reviewed-by: Alex Converse <alex.converse@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pngdec: Fix () placementMichael Niedermayer2017-08-22
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* vp9: set color range to MPEG for intraonly profile 0James Zern2017-08-21
| | | | | | | | this is undocumented in the vp9 bitstream and decoding specification doc, but matches libvpx Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: James Zern <jzern@google.com>
* avcodec/me_cmp: Fix crashes on ARM due to misalignmentMichael Niedermayer2017-08-21
| | | | | | | | Adds a diff_pixels_unaligned() Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=872503 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/g726: Add a little-endian G.726 encoder.Carl Eugen Hoyos2017-08-21
| | | | Fixes ticket #6596.
* avcodec/pixlet: Fixes: undefined shift in av_mod_uintp2()Michael Niedermayer2017-08-20
| | | | | | | | Fixes: runtime error: shift exponent 4294967289 is too large for 32-bit type 'int' Fixes: 3030/clusterfuzz-testcase-minimized-4649809254285312 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_template: Fix integer overflow in vertical_compose53iL0()Michael Niedermayer2017-08-20
| | | | | | | | Fixes: runtime error: signed integer overflow: 2147483646 + 2 cannot be represented in type 'int' Fixes: 3013/clusterfuzz-testcase-minimized-4644084197097472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/vaapi_encode_h264: add "coder" option supportJun Zhao2017-08-20
| | | | | | | | | | Follow libx264 style to support "coder" option, and set it to cabac by default. Signed-off-by: Yi A Wang <yi.a.wang@intel.com> Signed-off-by: Jun Zhao <jun.zhao@intel.com> Reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
* vaapi_encode: Move quality option to common codeMark Thompson2017-08-20
| | | | | | | | | | | Use AVCodecContext.compression_level rather than a private option, replacing the H.264-specific quality option (which stays only for compatibility). This now works with the H.265 encoder in the i965 driver, as well as the existing cases with the H.264 encoder. (cherry picked from commit 19388a7200e5d99c703271f05dba1c806720e808)
* avcodec/cngdec: Check skip_samplesMichael Niedermayer2017-08-20
| | | | | | | | | | | Without this its possible to make the new decode API decode billions of samples out of a empty input and never return to the caller before all samples have been created and discarded. Fixes: Timeout Fixes: 2992/clusterfuzz-testcase-6649611793989632 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/fic: Fixes signed integer overflowMichael Niedermayer2017-08-20
| | | | | | | | Fixes: runtime error: signed integer overflow: 1037142357 + 1227025305 cannot be represented in type 'int' Fixes: 3024/clusterfuzz-testcase-minimized-5885660323905536 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/snowdec: Fix off by 1 errorMichael Niedermayer2017-08-20
| | | | | | | | Fixes: runtime error: index 4 out of bounds for type 'int8_t [4]' Fixes: 3023/clusterfuzz-testcase-minimized-6421736130084864 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* opus_pvq_search: Restore the proper use of conditional define and simplify ↵Ivan Kalvachev2017-08-19
| | | | | | | | | | | | | | the function name suffix handling. Using named define properly documents the code paths. It also avoids passing additional numbered arguments through multiple levels of macro templates. The suffix handling is done by concatenation, like in other asm functions and avoid having two separate "cglobal" defines. Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
* opus_pvq_search: split functions into exactness and only use the exact if ↵Rostislav Pehlivanov2017-08-18
| | | | | | | | | | | | its faster This splits the asm function into exact and non-exact version. The exact version is as fast or faster on newer CPUs (which EXTERNAL_AVX_FAST describes well) whilst the non-exact version is faster than the exact on older CPUs. Also fixes yasm compilation which doesn't accept !cpuflags(avx) syntax. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* opus_pvq_search: only use rsqrtps approximation on CPUs with avxRostislav Pehlivanov2017-08-18
| | | | | | Makes the search produce idential results with the C version. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* ops_pvq_search: remove dead macroRostislav Pehlivanov2017-08-18
| | | | | | There's no point in toggling it, even for debugging. Its just worse. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* SIMD opus pvq_search implementationIvan Kalvachev2017-08-18
| | | | | | | | | | | | Explanation on the workings and methods used by the Pyramid Vector Quantization Search function could be found in the following Work-In-Progress mail threads: http://ffmpeg.org/pipermail/ffmpeg-devel/2017-June/212146.html http://ffmpeg.org/pipermail/ffmpeg-devel/2017-June/212816.html http://ffmpeg.org/pipermail/ffmpeg-devel/2017-July/213030.html http://ffmpeg.org/pipermail/ffmpeg-devel/2017-July/213436.html Signed-off-by: Ivan Kalvachev <ikalvachev@gmail.com>
* avcodec/pixlet: fixes integer overflow in read_highpass()Michael Niedermayer2017-08-18
| | | | | | | | Fixes: runtime error: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int'); cast to an unsigned type to negate this value to itself Fixes: 2879/clusterfuzz-testcase-minimized-6317542639403008 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec: Check for bitstream end in decode_line()Michael Niedermayer2017-08-18
| | | | | | | | Fixes: timeout Fixes: 2971/clusterfuzz-testcase-6130678276030464 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/rangecoder: Do not increase the pointer beyond the bufferMichael Niedermayer2017-08-18
| | | | | | Fixes: undefined behavior Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/zmbv: Check decomp_sizeMichael Niedermayer2017-08-17
| | | | | | | | | Fixes: OOM Fixes: 2710/clusterfuzz-testcase-minimized-4750001420894208 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/dnxhdenc: call slice thread code only if slice threading is enabledPaul B Mahol2017-08-17
|
* avcodec/diracdec: Fixes integer overflowMichael Niedermayer2017-08-17
| | | | | | | | Fixes: runtime error: signed integer overflow: 340018243 * 27 cannot be represented in type 'int' Fixes: 2861/clusterfuzz-testcase-minimized-5361070510178304 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: Check perspective_exp and zrs_exp.Michael Niedermayer2017-08-17
| | | | | | | | | Fixes: undefined shift Fixes: runtime error: shift exponent 264 is too large for 32-bit type 'int' Fixes: 2860/clusterfuzz-testcase-minimized-4672811689836544 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cavsdec: Check P/B frame mb decode which return error codesMichael Niedermayer2017-08-15
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cavsdec: Check I frame mb decode for errorsMichael Niedermayer2017-08-15
| | | | | | | | Fixes: timeout Fixes: 2943/clusterfuzz-testcase-5430257156882432 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/lagarith: Detect end of input in lag_decode_line() loopMichael Niedermayer2017-08-11
| | | | | | | | Fixes: timeout Fixes: 2933/clusterfuzz-testcase-5124990208835584 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/gdv: Check available space before reading paletteMichael Niedermayer2017-08-11
| | | | | | | | Fixes: Timeout Fixes: 2926/clusterfuzz-testcase-498711001458278 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ffv1dec_template: Fix undefined shiftMichael Niedermayer2017-08-11
| | | | | | | | Fixes: runtime error: left shift of negative value -127 Fixes: 2834/clusterfuzz-testcase-minimized-5988039123795968 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mpeg4videodec: Clear mcsel before decoding an imageMichael Niedermayer2017-08-11
| | | | | | | | Fixes: runtime error: signed integer overflow: 2146467840 + 1032192 cannot be represented in type 'int' Fixes: 2826/clusterfuzz-testcase-minimized-5901511613743104 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tests/dct: Add Mean square error testMichael Niedermayer2017-08-11
| | | | | | based on quotes of IEEE 1180 / ISO/IEC 23002-1 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tests/dct: Add peak mean error checkMichael Niedermayer2017-08-11
| | | | | | based on quotes of IEEE 1180 / ISO/IEC 23002-1 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegenc: cosmetic changesDavinder Singh2017-08-11
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegenc: disable unused code with AMVDavinder Singh2017-08-11
| | | | | | disable unused amv_encode_picture() when AMV encoder is not configured. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* h264: Add support for alternative transfer characterics SEIVittorio Giovara2017-08-10
| | | | | | | | | | The use of this SEI is for backward compatibility in HLG HDR systems: older devices that cannot interpret the "arib-std-b67" transfer will get the compatible transfer (usually bt709 or bt2020) from the VUI, while newer devices that can interpret HDR will read the SEI and use its value instead. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* avcodec/aacdec: Fix PCE channel_layout verificationNicolas Sugino2017-08-09
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dvenc: Change quantizer dead zone default to 7Michael Niedermayer2017-08-08
| | | | | | This improves the quality and reduces the "blocking" in flat areas Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dvenc: Support adjusting the quantizer deadzoneMichael Niedermayer2017-08-08
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dirac_dwt: Fixes integer overflows in COMPOSE_DAUB97*Michael Niedermayer2017-08-08
| | | | | | | | Fix multiple: runtime error: signed integer overflow: 6497 * 3409630 cannot be represented in type 'int' Fixes: 2819/clusterfuzz-testcase-minimized-4743700301217792 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc, lavu: move frame cropping to a convenience functionwm42017-08-08
| | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net> Merged from Libav commit 47399ccdfd.
* libswscale: add gray9 supportPaul B Mahol2017-08-07
|
* avcodec/aacdec_fixed: fix invalid shift in predict()Michael Niedermayer2017-08-05
| | | | | | | | Fixes: runtime error: shift exponent -2 is negative Fixes: 2818/clusterfuzz-testcase-minimized-5062943676825600 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h264_slice: Fix overflow in slice offsetMichael Niedermayer2017-08-05
| | | | | | | | Fixes: runtime error: signed integer overflow: 1610612736 * 2 cannot be represented in type 'int' Fixes: 2817/clusterfuzz-testcase-minimized-5289691240726528 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/htmlsubtitles: fix format specifier in av_bprintf callsJames Almer2017-08-03
|
* speedhq: fix behavior of single-field decodingSteinar H. Gunderson2017-08-03
| | | | | | | | | | The height convention for decoding frames with only a single field made sense for compatibility with legacy decoders, but doesn't really match the convention used by NDI, which is the primary (only?) user. Thus, change it to simply assuming that if the two fields overlap, the frame is meant to be a single field and the frame height matches the field height. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/hevc_cabac: Check for ff_init_cabac_decoder() failure in cabac_reinit()Michael Niedermayer2017-08-03
| | | | | | | | Fixes: runtime error: left shift of negative value -967831544 Fixes: 2815/clusterfuzz-testcase-minimized-6062914471460864 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_idct_add()Michael Niedermayer2017-08-03
| | | | | | | Fixes: runtime error: signed integer overflow: 26215360 + 2121330944 cannot be represented in type 'int' Fixes: 2809/clusterfuzz-testcase-minimized-4785181833560064 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
* lavc/htmlsubtitles: reindent after previous commitsClément Bœsch2017-08-01
|