summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* avutil/mem: Correct av_calloc() documentationAndreas Rheinhardt2021-08-12
| | | | | | Incorrect since 4959f18a8e11ad7d3529b1c4fc429f1b6b76ad7c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avutil/mem: Reinline av_size_mult() internallyAndreas Rheinhardt2021-08-12
| | | | | | | | | | | | | Since 580e168a945b65100ec2c25433f33bfacfe9f7be, av_size_mult() is no longer inlined; on systems where interposing is a thing, this also inhibits the compiler from inlining said function into the internal callers of said function, although inlining such a small function is typically beneficial: With GCC 10.3 on Ubuntu x64 and -O3 this decreases the size of av_realloc_array from 91B to 23B, from 129B to 81B for av_realloc_f and from 77B to 23B for each of av_malloc_array, av_mallocz_array and av_calloc. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat/oggdec: Use av_realloc_array()Andreas Rheinhardt2021-08-12
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_scale: Avoid unnecessary indirectionAndreas Rheinhardt2021-08-12
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* libavformat/file.c: 'file_delete()' and 'file_move()' require ↵Michael Witten2021-08-12
| | | | | | | | 'CONFIG_FILE_PROTOCOL' This quashes 2 warnings when the 'file' protocol is not enabled. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* doc/examples/qsvdec: simplify this example via hw_device_ctx interfaceHaihao Xiang2021-08-11
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* qsvdec: add support for HW_DEVICE_CTX methodHaihao Xiang2021-08-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows user set hw_device_ctx instead of hw_frames_ctx for QSV decoders, hence we may remove the ad-hoc libmfx setup code from FFmpeg. "-hwaccel_output_format format" is applied to QSV decoders after removing the ad-hoc libmfx code. In order to keep compatibility with old commandlines, the default format is set to AV_PIX_FMT_QSV, but this behavior will be removed in the future. Please set "-hwaccel_output_format qsv" explicitly if AV_PIX_FMT_QSV is expected. The normal device stuff works for QSV decoders now, user may use "-init_hw_device args" to initialise device and "-hwaccel_device devicename" to select a device for QSV decoders. "-qsv_device device" which was added for workarounding device selection in the ad-hoc libmfx code still works For example: $> ffmpeg -init_hw_device qsv=qsv:hw_any,child_device=/dev/dri/card0 -hwaccel qsv -c:v h264_qsv -i input.h264 -f null - /dev/dri/renderD128 is actually open for h264_qsv decoder in the above command without this patch. After applying this patch, /dev/dri/card0 is used. $> ffmpeg -init_hw_device vaapi=va:/dev/dri/card0 -init_hw_device qsv=hw@va -hwaccel_device hw -hwaccel qsv -c:v h264_qsv -i input.h264 -f null - device hw of type qsv is not usable in the above command without this patch. After applying this patch, this command works as expected. Reviewed-by: Soft Works <softworkz@hotmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/avfilter: Use av_memdup where appropriateAndreas Rheinhardt2021-08-11
| | | | | Reviewed-by: Nicolas George <george@nsup.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/cmdutils: Use av_strstart() instead of strncmp()Andreas Rheinhardt2021-08-11
| | | | | | This also avoids hardcoding lengths. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* libavcodec/qsvence: Use QSV encoder defaults as ffmpeg defaultsSoft Works2021-08-11
| | | | Signed-off-by: softworkz <softworkz@hotmail.com>
* avfilter/af_join: fix eof timestamps and blocking in many scenariosPaul B Mahol2021-08-10
|
* avcodec/h264_slice: use ff_h264_replace_picture when syncing thread contextsJames Almer2021-08-10
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264_picture: add ff_h264_replace_picture()James Almer2021-08-10
| | | | | | | Will remove unnecessary allocations when both src and dst picture contain references to the same buffers. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264_picture: split copying H264Picture some fields into a separate ↵James Almer2021-08-10
| | | | | | function Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/h264_slice: clear old slice POC values on parsing failureJames Almer2021-08-10
| | | | | | | | If a slice header fails to parse, and the next one uses different Sequence and Picture parameter sets, certain values may not be read if they are not coded, resulting in the previous slice values being used. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/faxcompr: Check for end of input in cmode == 1 in ↵Michael Niedermayer2021-08-10
| | | | | | | | | | decode_group3_2d_line() Fixes: Infinite loop Fixes: 35591/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4503764022198272 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/vc1dec: Disable error concealment for *IMAGEMichael Niedermayer2021-08-10
| | | | | | | | | | | | | | The existing error concealment makes no sense for the image formats, they use transformed source images which is different from keyframe + MC+difference for which the error concealment is designed. Of course feel free to re-enable this if you have a case where it works and improves vissual results Fixes: Timeout Fixes: 36234/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-6300306743885824 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 negation overflow in sbr_neg_odd_64_c()Michael Niedermayer2021-08-10
| | | | | | | | Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself Fixes: 35593/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXED_fuzzer-5182217725804544 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/argo: Check for even dimensionsMichael Niedermayer2021-08-10
| | | | | | | | Fixes: reading over the end Fixes: 36346/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARGO_fuzzer-5366943107383296 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavfi/dnn: DNNAsyncExecModule Execution Failure HandlingShubhanshu Saxena2021-08-10
| | | | | | | | | This commit adds the case handling if the asynchronous execution of a request fails by checking the exit status of the thread when joining before starting another execution. On failure, it does the cleanup as well. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_tf: Error Handling for tf_create_inference_requestShubhanshu Saxena2021-08-10
| | | | | | | This commit includes the check for the case when the newly created TFInferRequest is NULL. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn: Extract Common Parts from get_output functionsShubhanshu Saxena2021-08-10
| | | | | | | | The frame allocation and filling the TaskItem with execution parameters is common in the three backends. This commit shifts this logic to dnn_backend_common. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_tf: Add TF_Status to TFRequestItemShubhanshu Saxena2021-08-10
| | | | | | | | | Since requests are running in parallel, there is inconsistency in the status of the execution. To resolve it, we avoid using mutex as it would result in single TF_Session running at a time. So add TF_Status to the TFRequestItem Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_tf: Error Handling for execute_model_tfShubhanshu Saxena2021-08-10
| | | | | | | | This patch adds error handling for cases where the execute_model_tf fails, clears the used memory in the TFRequestItem and finally pushes it back to the request queue. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn: Async Support for TensorFlow BackendShubhanshu Saxena2021-08-10
| | | | | | | | | | | | | | | | | | | This commit enables async execution in the TensorFlow backend and adds function to flush extra frames. The async execution mechanism executes the TFInferRequests on a separate thread which is joined before the next execution of same TFRequestItem/while freeing the model. The following is the comparison of this mechanism with the existing sync mechanism on TensorFlow C API 2.5 CPU variant. Async Mode: 4m32.846s Sync Mode: 5m17.582s The above was performed on super resolution filter using SRCNN model. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn_backend_tf: TFInferRequest Execution and DocumentationShubhanshu Saxena2021-08-10
| | | | | | | This commit adds a function for execution of TFInferRequest and documentation for functions related to TFInferRequest. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn: Common Function to Get Async Result in DNN BackendsShubhanshu Saxena2021-08-10
| | | | | | | This commits refactors the get async result function for common use in all three backends. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* lavfi/dnn: Add Async Execution Mechanism and DocumentationShubhanshu Saxena2021-08-10
| | | | | | | | | This commit adds an async execution mechanism for common use in the TensorFlow and Native backends. This commit also adds the documentation of typedefs and functions in the async module for common use in DNN backends. Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
* configure: [loongson] adjust MMI check in configureJin Bo2021-08-10
| | | | | | | | | | | After standardizing the use of 'pxor' in commit 'ebedd26', FFmpeg build failed with upstream compiler, for 'pxor' is not supported in time. This patch helps to workaround the build failure by checking whether 'pxor' is supported during configuration, if not, MMI will be disabled. Reviewed-by: yinshiyou-hf@loongson.cn Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* movenc: Don't try to fix the fragment end duration if none will be writtenMartin Storsjö2021-08-10
| | | | | | | | | If autoflushing on a new packet (e.g. due to the frag_every_frame flag being set), there's no samples to be written in the new fragment, so we can't overwrite the track duration in order to make it line up with the next packet to be written. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavfi/qsvvpp: do not mix up FFmpeg and SDK error codeHaihao Xiang2021-08-09
| | | | | | | | The function ff_qsvvpp_filter_frame should return a FFmpeg error code if there is an error. However it might return a SDK error code without this patch. Reviewed-by: Soft Works <softworkz@hotmail.com>
* avformat/paf: read frame rate from header @0x88Gregory Montoir2021-08-10
| | | | Signed-off-by: Gregory Montoir <cyx@users.sourceforge.net>
* avcodec/nvenc: always set qp cr/cb offsetsTimo Rothenpieler2021-08-09
|
* aarch64: h264dsp: Fix indentation of some functions to match the restMartin Storsjö2021-08-08
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* aarch64: h264dsp: Remove unnecessary sign extensionsMartin Storsjö2021-08-08
| | | | | | | | | | These became unnecessary when the stride arguments were changed from int to ptrdiff_t in bc26fe89275c267d169b468356c82ee59874407d (0576ef466d8a631326d1d0a5ec2e4c4c81d25353) and d5d699ab6e6f8a8290748d107416fd5c19757a1b (aa844dc46f93182a63ec0b53267d19e7342c79b9). Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/mpeg12dec: report error when picture type is unknown and err_detect ↵Marton Balint2021-08-08
| | | | | | | | is EXPLODE Also split error message to error and warning. Signed-off-by: Marton Balint <cus@passwd.hu>
* avformat/mxfdec: make MXFMetadataSet part of all metadata setsMarton Balint2021-08-08
| | | | | | | The code expects every kind of metadata set to start with the generic metadata set attributes. Signed-off-by: Marton Balint <cus@passwd.hu>
* FATE: add a test for sliced scalingAnton Khirnov2021-08-08
|
* tools/venc_data_dump: factor out demux/decode codeAnton Khirnov2021-08-08
| | | | It can be shared with other simple demux/decode tools.
* fftools/cmdutils: Remove unused cpu_countAndreas Rheinhardt2021-08-08
| | | | | | Added in cf12a478b206cd107343827426a05aedb83816bc, but not used. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/qsv: Remove unused ff_qsv_level_to_mfx()Andreas Rheinhardt2021-08-08
| | | | | | Unused since 00d0a4aa9eda8553113e51556123c46648a5f31b. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/asrc_flite: Don't define an object by accidentAndreas Rheinhardt2021-08-08
| | | | | | | | The flite filter apparently only wanted to declare a struct, but mistakenly also defined an unused and zero-initialized element with external linkage. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264dsp, h264idct: Fix lengths of array parametersAndreas Rheinhardt2021-08-08
| | | | | | Fixes many -Warray-parameter warnings from GCC 11. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/aacps: Fix length of array in function definitionAndreas Rheinhardt2021-08-08
| | | | | | | | | | hybrid2_re() has a parameter declared as "const INTFLOAT filter[8]", although the actual argument for said parameter only has seven elements; the code itself only uses seven elements, so change the parameter. Fixes a -Wstringop-overread warning with GCC 11. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_vif: Make ff_compute_vif2 staticAndreas Rheinhardt2021-08-08
| | | | | | Only used here; the vif.h header can then be removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/vf_vif: Fix mismatch in number of array elementsAndreas Rheinhardt2021-08-08
| | | | | | | | | | | The function definition used float *data_buf[14], although there are only 13 elements (and only 13 are used); the declaration used 13. Given that the type will be converted to float **data_buf anyway, this is not in violation of the C specs, but nevertheless a bug. GCC 11 has a new warning for this -Warray-parameter. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avfilter/avf_showspectrum: fix another case of frames queuing upPaul B Mahol2021-08-08
|
* avcodec/nvenc: make aware of SDK 11.1 driver requirementsTimo Rothenpieler2021-08-08
|
* avcodec/nvenc: add chroma qp offset supportRicardo Monteiro2021-08-08
| | | | Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
* avcodec/ass_split: Rename ff_ass_split_dialog2->ff_ass_split_dialogAndreas Rheinhardt2021-08-08
| | | | | Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>