aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* libavcodec/vp9: ipred_dl_32x32_16 avx2 implementationIlia Valiakhmetov2017-06-062-0/+65
| | | | | | | | | | | | | | | | | | | | | vp9_diag_downleft_32x32_8bpp_c: 580.2 vp9_diag_downleft_32x32_8bpp_sse2: 75.6 vp9_diag_downleft_32x32_8bpp_ssse3: 73.7 vp9_diag_downleft_32x32_8bpp_avx: 72.7 vp9_diag_downleft_32x32_10bpp_c: 1101.2 vp9_diag_downleft_32x32_10bpp_sse2: 145.4 vp9_diag_downleft_32x32_10bpp_ssse3: 137.5 vp9_diag_downleft_32x32_10bpp_avx: 134.8 vp9_diag_downleft_32x32_10bpp_avx2: 94.0 vp9_diag_downleft_32x32_12bpp_c: 1108.5 vp9_diag_downleft_32x32_12bpp_sse2: 145.5 vp9_diag_downleft_32x32_12bpp_ssse3: 137.3 vp9_diag_downleft_32x32_12bpp_avx: 135.2 vp9_diag_downleft_32x32_12bpp_avx2: 94.0 ~30% faster than avx implementation Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* lavc/mpegvideo_enc: allow low_delay for non MPEG2 codecs depending on ↵Stefano Sabatini2017-06-061-2/+4
| | | | | | strict_std_compliance Forcing low_delay can be useful, even if not officially supported.
* fate: add fate-adts-id3v1-demuxJames Almer2017-06-052-1/+13
| | | | | | | | | | | This test the demuxer discarding non ADTS frames at the beginning and end of the input. As a side effect, this commit also enables fate-adts-demux, which was accidentally disabled in 324f0fbff1245f9e9e1dda29ecb03138a2de287d. Tested-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/mjpegdec: Check that reference frame matches the current frameMichael Niedermayer2017-06-051-0/+9
| | | | | | | | Fixes: out of array read Fixes: 2097/clusterfuzz-testcase-minimized-5036861833609216 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tiff: Avoid loosing allocated geotag valuesMichael Niedermayer2017-06-051-0/+2
| | | | | | | | Fixes memleak Fixes: 2076/clusterfuzz-testcase-minimized-6542640243802112 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cavs: Fix runtime error: signed integer overflow: -12648062 * 256 ↵Michael Niedermayer2017-06-051-2/+1
| | | | | | | | | cannot be represented in type 'int' Fixes: 2067/clusterfuzz-testcase-minimized-5578430902960128 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffprobe: Use pixdesc API to provide color space namesVittorio Giovara2017-06-051-3/+4
| | | | | | | | This API is more up-to-date, provides names compatible with filters and external encoders, and is consistent with the other color property variables. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* vorbisenc: signal samples to skipRostislav Pehlivanov2017-06-051-0/+8
| | | | | | The encoder never actually signalled how many samples to skip. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* avcodec/vorbisenc: Use a bufqueue in encoding with smaller lengthsTyler Jones2017-06-051-14/+106
| | | | | | Switching the vorbis encoder to use a buffer queue for input frames allows saving lookahead samples more easily and safely for psychoacoustic systems, requiring less pointer arithmetic in the case of transient windows.
* avcodec/vorbisenc: Include bufqueue and afqueueTyler Jones2017-06-051-0/+10
|
* avcodec/vorbisenc: Use fdsp for applying windowsTyler Jones2017-06-051-7/+9
| | | | | | | Using fdsp improves readability and allows using architecture-specific optimizations. Signed-off-by: Tyler Jones <tdjones879@gmail.com>
* avcodec/vorbisenc: Include fdspTyler Jones2017-06-051-6/+25
| | | | Signed-off-by: Tyler Jones <tdjones879@gmail.com>
* avformat/hls: Check local file extensionsMichael Niedermayer2017-06-051-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces the attack surface of local file-system information leaking. It prevents the existing exploit leading to an information leak. As well as similar hypothetical attacks. Leaks of information from files and symlinks ending in common multimedia extensions are still possible. But files with sensitive information like private keys and passwords generally do not use common multimedia filename extensions. It does not stop leaks via remote addresses in the LAN. The existing exploit depends on a specific decoder as well. It does appear though that the exploit should be possible with any decoder. The problem is that as long as sensitive information gets into the decoder, the output of the decoder becomes sensitive as well. The only obvious solution is to prevent access to sensitive information. Or to disable hls or possibly some of its feature. More complex solutions like checking the path to limit access to only subdirectories of the hls path may work as an alternative. But such solutions are fragile and tricky to implement portably and would not stop every possible attack nor would they work with all valid hls files. Developers have expressed their dislike / objected to disabling hls by default as well as disabling hls with local files. There also where objections against restricting remote url file extensions. This here is a less robust but also lower inconvenience solution. It can be applied stand alone or together with other solutions. limiting the check to local files was suggested by nevcairiel This recommits the security fix without the author name joke which was originally requested by Nicolas. Found-by: Emil Lerner and Pavel Cheremushkin Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Revert "avformat/hls: Check local file extensions"Michael Niedermayer2017-06-051-17/+1
| | | | | Requested-by: Paul B Mahol <onemda@gmail.com> This reverts commit caf7d6178a4d5f24c915da48410a9790b21703aa.
* fate: add test for the Dirac low delay profileRostislav Pehlivanov2017-06-052-0/+10
| | | | Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* x86/aacpsdsp: optimize ff_ps_mul_pair_single_sseJames Almer2017-06-041-9/+12
| | | | ~2% faster.
* avformat/hls: Check local file extensionsSysiphus2017-06-051-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces the attack surface of local file-system information leaking. It prevents the existing exploit leading to an information leak. As well as similar hypothetical attacks. Leaks of information from files and symlinks ending in common multimedia extensions are still possible. But files with sensitive information like private keys and passwords generally do not use common multimedia filename extensions. It does not stop leaks via remote addresses in the LAN. The existing exploit depends on a specific decoder as well. It does appear though that the exploit should be possible with any decoder. The problem is that as long as sensitive information gets into the decoder, the output of the decoder becomes sensitive as well. The only obvious solution is to prevent access to sensitive information. Or to disable hls or possibly some of its feature. More complex solutions like checking the path to limit access to only subdirectories of the hls path may work as an alternative. But such solutions are fragile and tricky to implement portably and would not stop every possible attack nor would they work with all valid hls files. Developers have expressed their dislike / objected to disabling hls by default as well as disabling hls with local files. There also where objections against restricting remote url file extensions. This here is a less robust but also lower inconvenience solution. It can be applied stand alone or together with other solutions. limiting the check to local files was suggested by nevcairiel Found-by: Emil Lerner and Pavel Cheremushkin Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* FATE: Add test for libavfilter/scale2refKevin Mark2017-06-053-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This new FATE test for the scale2ref filter makes use of the recently added scale2ref-specific variables to maintain the aspect ratio of a test input. Filtergraph explanation: [main] has an AR of 4:3. [ref] has an AR of 16:9. 640 / 4 = 160. So the new width for [main] is 160. 160 / ((320 / 240) * (1 / 1)) = 160 / (4 / 3) = 120. So the new height for [main] is 120. 160 / 120 = 4 / 3 so [main]'s aspect ratio has been maintained while using [ref]'s width as a reference point. [ref] is nullsink'd since it is left unchanged by scale2ref (and so shouldn't need to be tested). If we were to use "iw/4:-1" in place of "iw/4:ow/mdar": 640 / 4 = 160. So the new width for [main] would be 160. 360 / 4 = 90. So the new height for [main] would be 90. 160 / 90 = 16 / 9 so [main] now has the same aspect ratio as [ref] which is probably what you do not want. This is currently the only test for scale2ref. Signed-off-by: Kevin Mark <kmark937@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/qdrw: Fix null pointer dereferenceMichael Niedermayer2017-06-041-1/+5
| | | | | | | | | | | The RGB555 PACKBITSRGN case tries to read a palette, if such palette is actually stored then it accesses a null pointer. All 16bit samples i could find use DIRECTBITSRGN. Fixes: 2065/clusterfuzz-testcase-minimized-6298930457346048 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/sbrdsp_fixed: Fix assertion failure in sbr_sum_square_c()Michael Niedermayer2017-06-041-18/+27
| | | | | | | | | | | This also increases the range of input values supported as well as decreasing the operation dependencies in the main loop, improving speed on modern CPUs. Fixes part of: 2045/clusterfuzz-testcase-minimized-6751255865065472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avutil/softfloat: Fix sign error in and improve documentation of av_int2sf()Michael Niedermayer2017-06-041-2/+4
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/af_afftfilt: fix memory leaksPaul B Mahol2017-06-041-0/+3
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avcodec/wavpack: Fix runtime error: signed integer overflow: 2081021665 - ↵Michael Niedermayer2017-06-041-1/+1
| | | | | | | | | -130689706 cannot be represented in type 'int' Fixes: 2038/clusterfuzz-testcase-minimized-4521466148159488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/hevc_ps: Fix runtime error: index 32 out of bounds for type 'uint8_t ↵Michael Niedermayer2017-06-041-0/+6
| | | | | | | | | [32]' Fixes: 2010/clusterfuzz-testcase-minimized-6209288450080768 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dxv: Check remaining bytes in dxv_decompress_raw()Michael Niedermayer2017-06-041-0/+3
| | | | | | | | Fixes: Timeout Fixes: 2006/clusterfuzz-testcase-minimized-5766515037044736 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/aacdec: add a custom read_packet functionJames Almer2017-06-041-2/+42
| | | | | | | | | | Atempt to read and propagate only full ADTS frames and not other data, like id3v1 or APETags at the end of the file. Fixes ticket #6437. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/af_surround: add support for some upmixing of 3.0, 2.1 and 5.1 ↵Paul B Mahol2017-06-042-63/+462
| | | | | | channel layout Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/utils: change bitrate to int64_t in av_find_best_streamMarton Balint2017-06-041-2/+4
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/utils: return impaired streams in av_find_best_stream if only those ↵Marton Balint2017-06-041-8/+9
| | | | | | | | | exist Fixes ticket #6397. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/pafvideo: Check packet size and frame code before ff_reget_buffer()Michael Niedermayer2017-06-041-4/+11
| | | | | | | | Fixes 1745/clusterfuzz-testcase-minimized-6160693365571584 Fixes: Timeout Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ac3dec_fixed: Fix runtime error: left shift of 419 by 23 places ↵Michael Niedermayer2017-06-041-1/+1
| | | | | | | | | cannot be represented in type 'int' Fixes: 1352/clusterfuzz-testcase-minimized-5757565017260032 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tiff: Clear deinvert_buf_size on deallocationMichael Niedermayer2017-06-041-0/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/tiff: Use av_fast_padded_malloc() in tiff_unpack_fax()Michael Niedermayer2017-06-031-3/+8
| | | | | | | | Fixes: Timeout Fixes: 1213/clusterfuzz-testcase-minimized-6022987469815808 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/mlpdec: Check quant_step_size against huff_lsbsMichael Niedermayer2017-06-031-9/+25
| | | | | | | | | This reorders the operations so as to avoid computations with the above arguments before they have been initialized. Fixes part of 1708/clusterfuzz-testcase-minimized-5035111957397504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/options: log filename on openMichael Niedermayer2017-06-032-1/+13
| | | | | | | | | | | The loglevel is choosen so that the main filename and any images of multi image sequences are shown only at debug level to avoid clutter. This makes exploits in playlists more visible. As they would show accesses to private/sensitive files Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* libavfilter/scale2ref: Fix out-of-bounds array accessKevin Mark2017-06-031-1/+1
| | | | | | | | | | | | | | | | | ff_scale_eval_dimensions blindly assumes that two inputs are always available as of 3385989b98be7940044e4f0a6b431a0a00abf2fa. This is notably not the case when the function is called for the scale filter. With the scale filter inputs[1] does not exist. ff_scale_eval_dimensions now has an updated scale2ref check that makes certain two inputs are actually available before attempting to access the second one. Thanks to James Almer for reporting this bug. This should fix the 820 Valgrind tests I single-handedly managed to break. Signed-off-by: Kevin Mark <kmark937@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* x86/aacpsdsp: optimize ff_ps_stereo_interpolate_sse3James Almer2017-06-031-5/+6
| | | | | | | Move the unpacking outside of the loop. 5% to 10% faster. Suggested-by: ubitux Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/matroskaenc: also write chapters when output is WebMJames Almer2017-06-021-13/+16
| | | | | | | | | | WebM supports a subset of elements from the Chapters master. See https://www.webmproject.org/docs/container/#chapters Addresses ticket #6425 Reviewed-by: James Zern <jzern@google.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/aacps: Fix runtime error: left shift of 1073741824 by 1 places ↵Michael Niedermayer2017-06-031-1/+1
| | | | | | | | | cannot be represented in type 'INTFLOAT' (aka 'int') Fixes: 2005/clusterfuzz-testcase-minimized-5744226438479872 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 runtime error: signed integer overflow: 1404 * 8388608 ↵Michael Niedermayer2017-06-031-2/+2
| | | | | | | | | cannot be represented in type 'int' Fixes: 2004/clusterfuzz-testcase-minimized-5533262866808832 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Disable MSA optimization for big endian archShivraj Patil2017-06-031-0/+4
| | | | | | | | The current upstreamed code has been written and tested for Little Endian systems. We do have plans to add the Big Endian support in near future, but till that time, need to disable all to avoid its usage and failures. Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/nvenc: fix hw accelerated transcode with bframesGanapathy Kasi2017-06-021-0/+75
| | | | | | | | | | | | | hw accelerated transcode (h264_cuvid -> h264_nvenc with -hwaccel cuvid) was broken after the filtergraph initialization was changed to intialize decoder first followed by encoder (commit af1761f7b5b1b72197dc40934953b775c2d951cc). During initialzing encoder with bframes, local buffers are allocated internally in encoder which fails since no cuda context is available. Now pushing the correct cuda context before encoder initialization fixes the issue. Also adding push/pop cuda ctx during create/destroy/map/unmap resources and destroy encoder session. Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* x86/aacps: add ff_ps_stereo_interpolate_ipdopd_sse3()James Almer2017-06-022-0/+55
| | | | | | About 2x faster than the c version. Signed-off-by: James Almer <jamrial@gmail.com>
* libavfilter/scale2ref: Add constants for the primary inputKevin Mark2017-06-012-5/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Variables pertaining to the main video are now available when using the scale2ref filter. This allows, as an example, scaling a video with another as a reference point while maintaining the original aspect ratio of the primary/non-reference video. Consider the following graph: scale2ref=iw/6:-1 [main][ref] This will scale [main] to 1/6 the width of [ref] while maintaining the aspect ratio. This works well when the AR of [ref] is equal to the AR of [main] only. What the above filter really does is maintain the AR of [ref] when scaling [main]. So in all non-same-AR situations [main] will appear stretched or compressed to conform to the same AR of the reference video. Without doing this calculation externally there is no way to scale in reference to another input while maintaining AR in libavfilter. To make this possible, we introduce eight new constants to be used in the w and h expressions only in the scale2ref filter: * main_w/main_h: width/height of the main input video * main_a: aspect ratio of the main input video * main_sar: sample aspect ratio of the main input video * main_dar: display aspect ratio of the main input video * main_hsub/main_vsub: horiz/vert chroma subsample vals of main * mdar: a shorthand alias of main_dar Of course, not all of these constants are needed for maintaining the AR, but adding additional constants in line of what is available for in/out allows for other scaling possibilities I have not imagined. So to now scale a video to 1/6 the size of another video using the width and maintaining its own aspect ratio you can do this: scale2ref=iw/6:ow/mdar [main][ref] This is ideal for picture-in-picture configurations where you could have a square or 4:3 video overlaid on a corner of a larger 16:9 feed all while keeping the scaled video in the corner at its correct aspect ratio and always the same size relative to the larger video. I've tried to re-use as much code as possible. I could not find a way to avoid duplication of the var_names array. It must now be kept in sync with the other (the normal one and the scale2ref one) for everything to work which does not seem ideal. For every new variable introduced/removed into/from the normal scale filter one must be added/removed to/from the scale2ref version. Suggestions on how to avoid var_names duplication are welcome. var_values has been increased to always be large enough for the additional scale2ref variables. I do not forsee this being a problem as the names variable will always be the correct size. From my understanding of av_expr_parse_and_eval it will stop processing variables when it runs out of names even though there may be additional (potentially uninitialized) entries in the values array. The ideal solution here would be using a variable-length array but that is unsupported in C90. This patch does not remove any functionality and is strictly a feature patch. There are no API changes. Behavior does not change for any previously valid inputs. The applicable documentation has also been updated. Signed-off-by: Kevin Mark <kmark937@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/asvdec: Use rounded up dimenensions in input size checkMichael Niedermayer2017-06-011-1/+1
| | | | | | | | Fixes: Timeout Fixes: 2001/clusterfuzz-testcase-minimized-6187599389523968 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wavpack: Fix runtime error: shift exponent 32 is too large for ↵Michael Niedermayer2017-06-011-1/+1
| | | | | | | | | 32-bit type 'int' Fixes: 1967/clusterfuzz-testcase-minimized-5757031199801344 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/cfhd: Fix runtime error: signed integer overflow: 65280 * 65288 ↵Michael Niedermayer2017-06-011-2/+3
| | | | | | | | | cannot be represented in type 'int' Fixes: 1925/clusterfuzz-testcase-minimized-5564569688735744 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter: add audio surround upmixerPaul B Mahol2017-06-016-1/+869
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* ffprobe: Print AVContentLightMetadata side data contentsVittorio Giovara2017-06-011-0/+8
|
* ffprobe: Print AVMasteringDisplayMetadata side data contentsVittorio Giovara2017-06-011-0/+39
|