summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* libavformat/mxfenc: color_range should be inclusiveHarry Mallon2020-08-29
| | | | | | | | MXF CDCI color range was being set to (1<<sc->component_depth) - 1 for full range but it should be (1<<sc->component_depth) as 0 is a valid value. Signed-off-by: Harry Mallon <harry.mallon@codex.online>
* avformat/mxfdec: Read video range from CDCIEssenceDescriptorHarry Mallon2020-08-29
| | | | | | | * Capture black_ref, white_ref and color_range and recognise full and narrow range. Signed-off-by: Harry Mallon <harry.mallon@codex.online>
* x86/cfhddsp: zero extend int argumentsJames Almer2020-08-28
| | | | | | | | | | if taken from stack, they may have garbage in the upper bits otherwise. Also, there are only 8 arguments, so don't attempt to load 11. Fixes SIGSEV crashes in some targets. Reviewed-by: durandal_1707 Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/mov: See if mfra makes up the difference for an incomplete sidx.Dale Curtis2020-08-28
| | | | | | | | | | | | | A few popular sites have started generating MP4 files which have a sidx plus an mfra. The sidx accounts for all size except the mfra, so the old code did not mark the fragment index as complete. Instead we can just check if there's an mfra and if its size makes up the difference we can mark the index as complete. Bug: https://crbug.com/1107130 Signed-off-by: Dale Curtis <dalecurtis@chromium.org> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avcodec/flacdec: use designated initializers for AVClassPaul B Mahol2020-08-28
|
* avcodec/cfhd: Remove unused-but-set variableAndreas Rheinhardt2020-08-28
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/af_arnndn: use memcpy for copying in compute_rnn()Paul B Mahol2020-08-27
|
* avfilter/af_arnndn: use scalarproduct_float() in dct functionPaul B Mahol2020-08-27
|
* avfilter/af_compensationdelay: always initialize w_ptr with 0Paul B Mahol2020-08-27
| | | | | It will be changed later anyway, and in case inlink have 0 channels (should never happen) it will not pick some random value.
* avfilter/vf_xfade: do not use alpha for average rgb colorPaul B Mahol2020-08-27
|
* avfilter/vf_xfade: add corner wipe transformsPaul B Mahol2020-08-27
|
* Revert "avfilter/yadif: simplify the code for better readability"Limin Wang2020-08-27
| | | | This reverts commit 2a9b934675b9e2d3850b46f8a618c19b03f02551.
* avfilter/af_headphone: Fix leak of channel layouts list on errorAndreas Rheinhardt2020-08-26
| | | | | | | | | | In case the multichannel HRIR mode was enabled, an error could happen between allocating a channel layouts list and attaching it to its target destination. If an error happened, the list would leak. This is fixed by attaching the list to its target directly after its allocation. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/af_headphone: Fix segfault upon allocation failureAndreas Rheinhardt2020-08-26
| | | | | | | | | | | | | | The headphone filter uses a variable number of inpads and allocates them in its init function; if all goes well, the number of inpads coincides with a number stored in the filter's private context. Yet if allocating a subsequent inpad fails, the uninit function nevertheless uses the number stored in the private context to determine the number of inpads to free and not the AVFilterContext's nb_inputs. This will lead to an access beyond the end of the allocated AVFilterContext.input_pads array and an invalid free. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_signature: Avoid cast from function pointer to void*Andreas Rheinhardt2020-08-26
| | | | | | | | | | | | | | | | | | | | | | | | The signature filter uses qsort, but its compare function doesn't have the signature required of such a function; therefore it casts the function pointer to void. Yet this is wrong: C90 only guarantees that one can convert a pointer to any incomplete type or object type to void* and back with the result comparing equal to the original which makes pointers to void generic pointers to incomplete or object type. Yet C90 lacks a generic function pointer type. C99 additionally guarantees that a pointer to a function of one type may be converted to a pointer to a function of another type with the result and the original comparing equal when converting back. This makes any function pointer type a generic function pointer type. Yet even this does not make pointers to void generic function pointers. Both GCC and Clang emit warnings for this when in pedantic mode. This commit fixes this by modifying the compare function to comply with the expected signature. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_signature: Fix leak of string upon errorAndreas Rheinhardt2020-08-26
| | | | | | | | | If an error happens between allocating a string intended to be used as an inpad's name and attaching it to its input pad, the string leaks. Fix this by inserting the inpad directly after allocating its string. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_signature: Fix leak of inpads' namesAndreas Rheinhardt2020-08-26
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/af_afir: Avoid allocating AVFilterPad namesAndreas Rheinhardt2020-08-26
| | | | | | | | If the names are always the same, they need not be duplicated; doing so saves allocations, checks for the allocations as well as frees. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/af_aiir: Fix segfault and leak upon allocation failureAndreas Rheinhardt2020-08-26
| | | | | | | | | | | | | | | | | | | | | The aiir filter adds output pads in its init function. Each of these output pads had a name which was allocated and to be freed in the uninit function. Given that the aiir filter has between one and two outputs, one output pad's name was freed unconditionally and a second was freed conditionally. Yet if adding output pads fails, there are no output pads at all and trying to free a nonexistent pad's name will lead to a segfault. Furthermore, if the name could be successfully allocated, yet adding the new pad fails, the name would leak. This commit fixes this by not allocating the pads' names at all any more: They are constant anyway. This allows to remove the code to free them and hence fixes the aforementioned bugs. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/avf_aphasemeter: Don't allocate outpad namesAndreas Rheinhardt2020-08-26
| | | | | | | | These names are always the same, so not using duplicates saves allocations, checks for the allocations as well as frees. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_bm3d: Don't allocate inpad namesAndreas Rheinhardt2020-08-26
| | | | | | | | These names are always the same, so not using duplicates saves allocations, checks for the allocations as well as frees. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/f_ebur128: Don't allocate outpad namesAndreas Rheinhardt2020-08-26
| | | | | | | | These names are mostly the same, so not using duplicates saves allocations, checks for the allocations as well as frees. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_decimate: Don't allocate inpad namesAndreas Rheinhardt2020-08-26
| | | | | | | | These names are always the same, so not using duplicates saves allocations, checks for the allocations as well as frees. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_fieldmatch: Don't allocate inpad namesAndreas Rheinhardt2020-08-26
| | | | | | | | These names are always the same, so not using duplicates saves allocations, checks for the allocations as well as frees. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_premultiply: Fix leak of names of inpadsAndreas Rheinhardt2020-08-26
| | | | | | | | | These names leak because freeing them in the uninit function has been forgotten. Instead of adding the freeing code, this commit stops allocating these names. They are constants anyway. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/af_anequalizer: Don't allocate outpad namesAndreas Rheinhardt2020-08-26
| | | | | | | | These names are always the same, so not using duplicates saves allocations, checks for the allocations as well as frees. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/af_anequalizer: Fix memleak when inserting pad failsAndreas Rheinhardt2020-08-26
| | | | | | | | | | It has been forgotten to free the name of the second outpad if attaching the first one to the AVFilterContext fails. Fixing this is easy: Only prepare the second outpad after (and if) the first outpad has been successfully attached to the AVFilterContext. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/x86/cfhddsp: try to fix build on x32Paul B Mahol2020-08-26
|
* avfilter/vf_xfade: add fadegrays transitionPaul B Mahol2020-08-26
|
* avcodec/cfhd: add x86 SIMDPaul B Mahol2020-08-26
| | | | Overall speed changes for 1920x1080, yuv422p10le, 60fps from: 0.19x to 0.343x
* avcodec/tiff: Check jpeg context against jpeg frame parametersMichael Niedermayer2020-08-26
| | | | | | | | Fixes: out of array access Fixes: 24825/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-6326925027704832 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: Restrict tag order based on specificationMichael Niedermayer2020-08-26
| | | | | | | | | | | | | | | | | | | | "The entries in an IFD must be sorted in ascending order by Tag. Note that this is not the order in which the fields are described in this document." This way various dimensions, sample and bit sizes cannot be changed at arbitrary times which reduces the potential for bugs. The tag reading code also on various places assumes that numerically previous tags have already been parsed, so this needs to be enforced one way or another. If this commit causes problems with real world files which are not easy to fix then some other form of checks are needed to ensure the various dependencies in the tag reading are not violated. Fixes: out of array access Fixes: 24825/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-6326925027704832 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 abort with DNG RAW TIFF with YA8Michael Niedermayer2020-08-26
| | | | | | | | Fixes: Assertion failure Fixes: 24707/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5179910197608448 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: Check the linearization table sizeMichael Niedermayer2020-08-26
| | | | | | | | Fixes: out of array access Fixes: 24604/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4843529818603520 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/libdav1d: Call ff_set_sar in addition to setting the frame SARDerek Buitenhuis2020-08-26
| | | | | | Similar to what we do in libaomdec.c. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* avfilter/yadif: simplify the code for better readabilityLimin Wang2020-08-26
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/mpegtsenc: reindent the codeLimin Wang2020-08-26
| | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avformat/mpegtsenc: add registration descriptor for AC-3 and EAC3Limin Wang2020-08-26
| | | | | | | | | | Some DVB and ATSC captures are using the official MPEG2 registration descriptor in addition to using the correct stream type and the AC-3_audio_stream_descriptor/AC3_descriptor. So let's add it even if it is not strictly needed for DVB/ATSC. Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/af_amerge: Fix segfault upon allocation failureAndreas Rheinhardt2020-08-26
| | | | | | | | | | | | | | The amerge filter uses a variable number of inpads and allocates them in its init function; if all goes well, the number of inpads coincides with a number stored in the filter's private context. Yet if allocating a subsequent inpad fails, the uninit function nevertheless uses the number stored in the private context to determine the number of inpads to free and not the AVFilterContext's nb_inputs. This will lead to an access beyond the end of the allocated AVFilterContext.input_pads array and an invalid free. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/avfilter: Fix indentationAndreas Rheinhardt2020-08-26
| | | | | | | Forgotten after fdd93eabfb2644f541f7aac9943abce26776ea73. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/cbs_av1: fix setting FrameWidth in frame_size_with_refs()James Almer2020-08-25
| | | | | | | | | | | | | | | | Section 5.9.7 of the spec states UpscaledWidth = RefUpscaledWidth[ ref_frame_idx[ i ] ] FrameWidth = UpscaledWidth FrameHeight = RefFrameHeight[ ref_frame_idx[ i ] ] RenderWidth = RefRenderWidth[ ref_frame_idx[ i ] ] RenderHeight = RefRenderHeight[ ref_frame_idx[ i ] ] Meaning FrameWidth must not be set to RefFrameWidth[ ref_frame_idx[ i ] ] like we're currently doing. Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/av1_parser: fix parsing show_existing_frame headersJames Almer2020-08-25
| | | | | | Regression since c8716b5029 Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_av1: use a more appropiate AV1ReferenceFrameState pointer ↵James Almer2020-08-25
| | | | | | | | variable name frame is more commonly used for AV1RawFrameHeader and AV1RawFrame. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_av1: fix handling reference frames on show_existing_frame framesJames Almer2020-08-25
| | | | | | | | Implement Section 7.21 "Reference frame loading process" and Section 7.20 "Reference frame update process" for show_existing_frame frames, as required by the definition in Section 7.4 "Decode frame wrapup process". Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_av1: infer frame_type in show_existing_frame frames earlierJames Almer2020-08-25
| | | | | | This follows the spec and will come in handy in the next commit. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/cbs_av1: add OrderHint to CodedBitstreamAV1ContextJames Almer2020-08-25
| | | | | | This follows the spec and will come in handy in a following commit. Signed-off-by: James Almer <jamrial@gmail.com>
* lavf/rtpdec_jpeg: Fix JFIF version.Carl Eugen Hoyos2020-08-25
| | | | See also b1931321
* doc/examples: Always open files as "binary", not "text".Carl Eugen Hoyos2020-08-25
| | | | Fixes ticket #8638.
* dnn/native: add log error messageTing Fu2020-08-25
| | | | Signed-off-by: Ting Fu <ting.fu@intel.com>
* dnn/native: unify error return to DNN_ERRORTing Fu2020-08-25
| | | | | | | Unify all error return as DNN_ERROR, in order to cease model executing when return error in ff_dnn_execute_model_native layer_func.pf_exec Signed-off-by: Ting Fu <ting.fu@intel.com>