Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-27Revert "avfilter/yadif: simplify the code for better readability"Limin Wang
This reverts commit 2a9b934675b9e2d3850b46f8a618c19b03f02551.
2020-08-27avfilter/af_headphone: Fix leak of channel layouts list on errorAndreas Rheinhardt
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>
2020-08-27avfilter/af_headphone: Fix segfault upon allocation failureAndreas Rheinhardt
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>
2020-08-27avfilter/vf_signature: Avoid cast from function pointer to void*Andreas Rheinhardt
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>
2020-08-27avfilter/vf_signature: Fix leak of string upon errorAndreas Rheinhardt
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>
2020-08-27avfilter/vf_signature: Fix leak of inpads' namesAndreas Rheinhardt
Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-27avfilter/af_afir: Avoid allocating AVFilterPad namesAndreas Rheinhardt
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>
2020-08-27avfilter/af_aiir: Fix segfault and leak upon allocation failureAndreas Rheinhardt
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>
2020-08-27avfilter/avf_aphasemeter: Don't allocate outpad namesAndreas Rheinhardt
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>
2020-08-27avfilter/vf_bm3d: Don't allocate inpad namesAndreas Rheinhardt
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>
2020-08-27avfilter/f_ebur128: Don't allocate outpad namesAndreas Rheinhardt
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>
2020-08-27avfilter/vf_decimate: Don't allocate inpad namesAndreas Rheinhardt
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>
2020-08-27avfilter/vf_fieldmatch: Don't allocate inpad namesAndreas Rheinhardt
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>
2020-08-27avfilter/vf_premultiply: Fix leak of names of inpadsAndreas Rheinhardt
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>
2020-08-27avfilter/af_anequalizer: Don't allocate outpad namesAndreas Rheinhardt
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>
2020-08-27avfilter/af_anequalizer: Fix memleak when inserting pad failsAndreas Rheinhardt
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>
2020-08-27avcodec/x86/cfhddsp: try to fix build on x32Paul B Mahol
2020-08-27avfilter/vf_xfade: add fadegrays transitionPaul B Mahol
2020-08-26avcodec/cfhd: add x86 SIMDPaul B Mahol
Overall speed changes for 1920x1080, yuv422p10le, 60fps from: 0.19x to 0.343x
2020-08-26avcodec/tiff: Check jpeg context against jpeg frame parametersMichael Niedermayer
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>
2020-08-26avcodec/tiff: Restrict tag order based on specificationMichael Niedermayer
"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>
2020-08-26avcodec/tiff: Avoid abort with DNG RAW TIFF with YA8Michael Niedermayer
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>
2020-08-26avcodec/tiff: Check the linearization table sizeMichael Niedermayer
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>
2020-08-26avcodec/libdav1d: Call ff_set_sar in addition to setting the frame SARDerek Buitenhuis
Similar to what we do in libaomdec.c. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2020-08-26avfilter/yadif: simplify the code for better readabilityLimin Wang
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-08-26avformat/mpegtsenc: reindent the codeLimin Wang
Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-08-26avformat/mpegtsenc: add registration descriptor for AC-3 and EAC3Limin Wang
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>
2020-08-26avfilter/af_amerge: Fix segfault upon allocation failureAndreas Rheinhardt
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>
2020-08-26avfilter/avfilter: Fix indentationAndreas Rheinhardt
Forgotten after fdd93eabfb2644f541f7aac9943abce26776ea73. Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-08-26avcodec/cbs_av1: fix setting FrameWidth in frame_size_with_refs()James Almer
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>
2020-08-25avcodec/av1_parser: fix parsing show_existing_frame headersJames Almer
Regression since c8716b5029 Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-25avcodec/cbs_av1: use a more appropiate AV1ReferenceFrameState pointer ↵James Almer
variable name frame is more commonly used for AV1RawFrameHeader and AV1RawFrame. Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-25avcodec/cbs_av1: fix handling reference frames on show_existing_frame framesJames Almer
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>
2020-08-25avcodec/cbs_av1: infer frame_type in show_existing_frame frames earlierJames Almer
This follows the spec and will come in handy in the next commit. Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-25avcodec/cbs_av1: add OrderHint to CodedBitstreamAV1ContextJames Almer
This follows the spec and will come in handy in a following commit. Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-25lavf/rtpdec_jpeg: Fix JFIF version.Carl Eugen Hoyos
See also b1931321
2020-08-25doc/examples: Always open files as "binary", not "text".Carl Eugen Hoyos
Fixes ticket #8638.
2020-08-25dnn/native: add log error messageTing Fu
Signed-off-by: Ting Fu <ting.fu@intel.com>
2020-08-25dnn/native: unify error return to DNN_ERRORTing Fu
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>
2020-08-25dnn: move output name from DNNModel.set_input_output to DNNModule.execute_modelGuo, Yejun
currently, output is set both at DNNModel.set_input_output and DNNModule.execute_model, it makes sense that the output name is provided at model inference time so all the output info is set at a single place. and so DNNModel.set_input_output is renamed to DNNModel.set_input Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2020-08-25lavfi/hflip: Support Bayer pixel formats.Carl Eugen Hoyos
Fixes part of ticket #8819.
2020-08-25lavf/mxfdec: Limit score for files with run-in.Carl Eugen Hoyos
Only return AVPROBE_SCORE_MAX if the header partition pack key is at the start of the file. Fixes ticket #8846. Reviewed-by: Tomas Härdin
2020-08-25avcodec/aacdec_template: add more checks to make sure only 22.2 gets to 22.2Jan Ekström
Validates the set channel layout as well as verifies that the received layout to the function matches the reference layout, so that it matches the implemented re-ordering logic. Fixes #8845
2020-08-25avcodec/aacdec_template: keep tabs on layout in sniff_channel_orderJan Ekström
This way the layout set at various points can be checked instead of only having the layout at the end.
2020-08-24Set AVSTREAM_PARSE_HEADERS flag for AV1 MP4 streamsVikas Agrawal
It help initialize chroma format and other info properly Chroma format wasn't correct if I use below code: avformat_find_stream_info(fmtc, NULL); iVideoStream = av_find_best_stream(fmtc, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0); eChromaFormat = (AVPixelFormat)fmtc->streams[iVideoStream]->codecpar->format; Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-24fate: remove "-v 0" from ffprobe tests.Nicolas George
2020-08-24dnn_backend_native_layer_mathbinary: add floormod supportMingyu Yin
Signed-off-by: Mingyu Yin <mingyu.yin@intel.com>
2020-08-24dnn_backend_native_layer_mathbinary: change to function pointerMingyu Yin
Signed-off-by: Mingyu Yin <mingyu.yin@intel.com>
2020-08-24avcodec/av1_parser: read frame properties directly from AV1RawFrameHeaderJames Almer
Simplifies code Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-24avcodec/cbs_av1: infer frame_type when parsing a show_existing_frame frameJames Almer
Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: James Almer <jamrial@gmail.com>