summaryrefslogtreecommitdiffstats
path: root/libavcodec
Commit message (Collapse)AuthorAgeFilesLines
...
* avcodec/fic: Fixes signed integer overflowMichael Niedermayer2017-08-201-6/+6
| | | | | | | | 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-201-1/+1
| | | | | | | | 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-191-19/+18
| | | | | | | | | | | | | | 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-182-20/+28
| | | | | | | | | | | | 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-181-12/+6
| | | | | | 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-181-11/+0
| | | | | | 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-185-2/+449
| | | | | | | | | | | | 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-181-0/+3
| | | | | | | | 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-182-5/+27
| | | | | | | | 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-182-2/+7
| | | | | | Fixes: undefined behavior Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/zmbv: Check decomp_sizeMichael Niedermayer2017-08-171-0/+5
| | | | | | | | | 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-171-6/+10
|
* avcodec/diracdec: Fixes integer overflowMichael Niedermayer2017-08-171-1/+1
| | | | | | | | 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-171-0/+4
| | | | | | | | | 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-151-4/+8
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cavsdec: Check I frame mb decode for errorsMichael Niedermayer2017-08-151-3/+7
| | | | | | | | 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-113-2/+10
| | | | | | | | 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-111-0/+2
| | | | | | | | 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-111-1/+1
| | | | | | | | 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-111-0/+1
| | | | | | | | 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-111-3/+7
| | | | | | 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-111-0/+2
| | | | | | based on quotes of IEEE 1180 / ISO/IEC 23002-1 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegenc: cosmetic changesDavinder Singh2017-08-111-5/+3
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mjpegenc: disable unused code with AMVDavinder Singh2017-08-111-0/+2
| | | | | | 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-103-1/+25
| | | | | | | | | | 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-091-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dvenc: Change quantizer dead zone default to 7Michael Niedermayer2017-08-081-1/+1
| | | | | | 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-082-1/+26
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dirac_dwt: Fixes integer overflows in COMPOSE_DAUB97*Michael Niedermayer2017-08-081-4/+4
| | | | | | | | 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-081-87/+2
| | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net> Merged from Libav commit 47399ccdfd.
* libswscale: add gray9 supportPaul B Mahol2017-08-071-0/+2
|
* avcodec/aacdec_fixed: fix invalid shift in predict()Michael Niedermayer2017-08-051-2/+6
| | | | | | | | 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-051-7/+9
| | | | | | | | 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-031-2/+2
|
* speedhq: fix behavior of single-field decodingSteinar H. Gunderson2017-08-031-3/+6
| | | | | | | | | | 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-031-10/+12
| | | | | | | | 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-031-4/+4
| | | | | | | 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-011-40/+36
|
* lavc/htmlsubtitles: handle colors starting with many '#'Clément Bœsch2017-08-011-0/+4
|
* lavc/htmlsubtitles: improve line breaks handlingClément Bœsch2017-08-012-2/+5
|
* lavc/tests: add htmlsubtitlesClément Bœsch2017-08-013-0/+51
|
* lavc/htmlsubtitles: improve handling broken garbageClément Bœsch2017-08-011-67/+134
| | | | | | | | | | | | | | | | | | | | 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-011-1/+1
| | | | | | | | 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-011-0/+5
| | | | | | | | | | 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-011-0/+3
| | | | | | | | 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-013-25/+26
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* mdct15: add inverse transform postrotation SIMDRostislav Pehlivanov2017-07-304-20/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-301-5/+5
| | | | | | | | | 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-291-1/+1
| | | | | | | | 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-291-1/+1
| | | | | | | | 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>
OpenPOWER on IntegriCloud