summaryrefslogtreecommitdiff
path: root/libavcodec
Commit message (Collapse)AuthorAge
...
* 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
|
* lavc/htmlsubtitles: handle colors starting with many '#'Clément Bœsch2017-08-01
|
* lavc/htmlsubtitles: improve line breaks handlingClément Bœsch2017-08-01
|
* lavc/tests: add htmlsubtitlesClément Bœsch2017-08-01
|
* lavc/htmlsubtitles: improve handling broken garbageClément Bœsch2017-08-01
| | | | | | | | | | | | | | | | | | | | This commit switches off forced correct nesting of tags and only keeps it for font tags. See long explanations in the code for the rationale. This results in various FATE changes which I'll explain here: - various swapping in font attributes, this is mostly noise due to the old reverse stack way of printing them. The new one is more correct as the last attribute takes over the previous ones. - unrecognized tags disappears - invalid tags that were previously displayed aren't anymore (instead, we have a warning). This is better for the end user The main benefit of this commit is to be more tolerant to error, leading to a better handling of badly nested tags or random wrong formatting for the end user.
* avcodec/diracdsp: fix integer overflowMichael Niedermayer2017-08-01
| | | | | | | | Fixes: runtime error: signed integer overflow: 11 * 225726413 cannot be represented in type 'int' Fixes: 2764/clusterfuzz-testcase-minimized-5382561922547712 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 weight_log2denomMichael Niedermayer2017-08-01
| | | | | | | | | | Fixes: runtime error: shift exponent -1 is negative Fixes: 2742/clusterfuzz-testcase-minimized-5724322402402304 Fixes: 2744/clusterfuzz-testcase-minimized-4672435653705728 Fixes: 2749/clusterfuzz-testcase-minimized-5298741273690112 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_vlc: Fix invalid shiftMichael Niedermayer2017-08-01
| | | | | | | | Fixes: runtime error: shift exponent 65 is too large for 64-bit type 'residual' (aka 'unsigned long') Fixes: 2737/clusterfuzz-testcase-minimized-4968639147016192 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/atrac3p: use float_dsp in ff_atrac3p_power_compensationJames Almer2017-08-01
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* mdct15: add inverse transform postrotation SIMDRostislav Pehlivanov2017-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | 2.5ms frames: Before (c): 2638 decicycles in postrotate, 2097040 runs, 112 skips After (sse3): 1467 decicycles in postrotate, 2097083 runs, 69 skips After (avx2): 1244 decicycles in postrotate, 2097085 runs, 67 skips 5ms frames: Before (c): 4987 decicycles in postrotate, 1048371 runs, 205 skips After (sse3): 2644 decicycles in postrotate, 1048509 runs, 67 skips After (avx2): 2031 decicycles in postrotate, 1048523 runs, 53 skips 10ms frames: Before (c): 9153 decicycles in postrotate, 523575 runs, 713 skips After (sse3): 5110 decicycles in postrotate, 523726 runs, 562 skips After (avx2): 3738 decicycles in postrotate, 524223 runs, 65 skips 20ms frames: Before (c): 17857 decicycles in postrotate, 261866 runs, 278 skips After (sse3): 10041 decicycles in postrotate, 261746 runs, 398 skips After (avx2): 7050 decicycles in postrotate, 262116 runs, 28 skips Improves total decoding performance for real world content by 9% with avx2. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* lavc/makefile: Add missing file dependencies.Matt Oliver2017-07-30
| | | | | | | | | ac3dsp.c uses tables from ac3.c ac3.c uses tables from ac3tab.c hevc_ps uses tables from hevc_data.c intrax8.c uses tables from msmpeg4data.c Signed-off-by: Matt Oliver <protogonoi@gmail.com>
* avcodec/dirac_dwt: Fix multiple integer overflows in COMPOSE_DD97iH0()Michael Niedermayer2017-07-29
| | | | | | | | Fixes: runtime error: signed integer overflow: 9 * 335544320 cannot be represented in type 'int' Fixes: 2739/clusterfuzz-testcase-minimized-6737297955356672 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: Fix integer overflow in divide3()Michael Niedermayer2017-07-29
| | | | | | | | Fixes: runtime error: signed integer overflow: -1073746548 * 21845 cannot be represented in type 'int' Fixes: 2729/clusterfuzz-testcase-minimized-5902915464069120 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/takdec: Fix integer overflow in decode_subframe()Michael Niedermayer2017-07-29
| | | | | | | | Fixes: runtime error: signed integer overflow: -536870912 - 1972191120 cannot be represented in type 'int' Fixes: 2711/clusterfuzz-testcase-minimized-4975142398590976 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavcodec/mips: Improve avc dequant-idct luma dc msa functionKaustubh Raste2017-07-29
| | | | | | Signed-off-by: Kaustubh Raste <kaustubh.raste@imgtec.com> Reviewed-by: Manojkumar Bhosale <Manojkumar.Bhosale@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/diracdec: Fix integer overflow in signed multiplication in ↵Michael Niedermayer2017-07-28
| | | | | | | | | | UNPACK_ARITH() Fixes: runtime error: signed integer overflow: 1073741823 * 4 cannot be represented in type 'int' Fixes: 2729/clusterfuzz-testcase-minimized-5902915464069120 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>