summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* checkasm: add _fixed suffix to fixed_dsp testsJames Almer2017-06-011-5/+5
| | | | Should prevents future conflicts with the similarly named floatdsp tests
* avcodec/cuvid: make capability check optionalTimo Rothenpieler2017-06-011-0/+15
|
* compat/cuda: make cuvidGetDecoderCaps optionalTimo Rothenpieler2017-06-011-1/+10
|
* avcodec/nvenc: print minimum driver version on errorTimo Rothenpieler2017-06-011-1/+14
|
* configure: libnpp does not need to link libcudaTimo Rothenpieler2017-06-011-1/+1
|
* avcodec/nvenc: Add default value for AVCodecContext::refsSrinath K R2017-06-012-0/+2
| | | | | | | | | | | | | AVCodecContext::refs is used to control the DPB size to be used by the encoder. The default value for AVCodecContext::refs as set in libavcodec/options_table.h is 1. This patch sets AVCodecContext::refs to 0 for h264_nvenc and hevc_nvenc in order to let the driver take the decision of the correct DPB size to use in all cases. Signed-off-by: Srinath K R <skr@nvidia.com> Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avutil/pixfmt: remove superfluous defineJames Almer2017-06-011-2/+0
| | | | | | It's an AVColorSpace value since 82ad9cbd32c873bced9adf4a2bb67dcda7294c61. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/wavpack: Fix runtime error: signed integer overflow: 2013265955 - ↵Michael Niedermayer2017-05-311-1/+1
| | | | | | | | | -134217694 cannot be represented in type 'int' Fixes: 1922/clusterfuzz-testcase-minimized-5561194112876544 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 input packet size before frame reallocationMichael Niedermayer2017-05-311-3/+3
| | | | | | | Reduces time spend decoding 1917/clusterfuzz-testcase-minimized-5023221273329664 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: signed integer overflow: 2147483628 + ↵Michael Niedermayer2017-05-311-1/+1
| | | | | | | | | 256 cannot be represented in type 'int' Fixes: 1909/clusterfuzz-testcase-minimized-6732072662073344 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ra144: Fixes runtime error: signed integer overflow: 7160 * 327138 ↵Michael Niedermayer2017-05-311-1/+1
| | | | | | | | | cannot be represented in type 'int' Fixes: 1908/clusterfuzz-testcase-minimized-5392712477966336 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pnm: Use ff_set_dimensions()Michael Niedermayer2017-05-311-4/+8
| | | | | | | | Fixes: OOM Fixes: 1906/clusterfuzz-testcase-minimized-4599315114754048 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: Fix runtime error: signed integer overflow: 59 + 2147483600 ↵Michael Niedermayer2017-05-311-1/+1
| | | | | | | | | cannot be represented in type 'int' Fixes: 1903/clusterfuzz-testcase-minimized-5359318167715840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* examples/encode_video: slightly improve error reportingStefano Sabatini2017-05-311-3/+4
|
* examples/encode_video: add logStefano Sabatini2017-05-311-1/+4
| | | | This helps to visualize how the send/receive API works.
* configure: Fix the msvcrt version check for mingw32Martin Storsjö2017-05-311-1/+1
| | | | | | | | | This was actually broken when committed in 46e3936fb04; the test never succeeded, and thus, _aligned_malloc wasn't actually used on legacy mingw. Signed-off-by: Martin Storsjö <martin@martin.st> (cherry picked from commit 427f7a1f9ec1977bcb57cb4d6e6f7228dc1e858b)
* avformat/tls_schannel: log unknown error codeswm42017-05-311-1/+1
|
OpenPOWER on IntegriCloud