summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* fftools/ffmpeg: add special syntax for loading filter options from fileslavfi_opt_filesAnton Khirnov2023-01-19
| | | | TODO: elaborate
* lavfi: add a new filtergraph parsing APIAnton Khirnov2023-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Callers currently have two ways of adding filters to a graph - they can either - create, initialize, and link them manually - use one of the avfilter_graph_parse*() functions, which take a (typically end-user-written) string, split it into individual filter definitions+options, then create filters, apply options, initialize filters, and finally link them - all based on information from this string. A major problem with the second approach is that it performs many actions as a single atomic unit, leaving the caller no space to intervene in between. Such intervention would be useful e.g. to - modify filter options; - supply hardware device contexts; both of which typically must be done before the filter is initialized. Callers who need such intervention are then forced to invent their own filtergraph parsing, which is clearly suboptimal. This commit aims to address this problem by adding a new modular filtergraph parsing API. It adds a new avfilter_graph_segment_parse() function to parse a string filtergraph description into an intermediate tree-like representation (AVFilterGraphSegment and its children). This intermediate form may then be applied step by step using further new avfilter_graph_segment*() functions, with user intervention possible between each step.
* lavfi/avfilter: track whether a filter has been initializedAnton Khirnov2023-01-18
| | | | Refuse to link uninitialized filters or initialize a filter twice.
* lavfi/avfilter: export process_options()Anton Khirnov2023-01-18
| | | | | | | Also, replace an AVFilterContext argument with a logging context+private class, as those are the only things needed in this function. Will be useful in future commits.
* lavc/tests/bitstream: test bits_*_signed_nz and bits_peek_signed*Anton Khirnov2023-01-18
|
* lavc/bitstream: avoid UB in bits_{read,peek}_signed(0)Anton Khirnov2023-01-18
| | | | | | | | | | bits_*_signed(0) will currently invoke an undefined shift by 8 * sizeof(int). Add bits_*_signed_nz() that only works for n>0, analogous to bits_read_nz(). Add an explicit check for n=0 in bits_*_signed(). Found-by: James Almer
* avfilter/vf_histogram: call av_frame_copy_props()Paul B Mahol2023-01-17
|
* lavc/libvpx: increase thread limit to 64OvchinnikovDmitrii2023-01-17
| | | | | | | | | | | | | | | | | | | | | | This change improves the performance and multicore scalability of the vp9 codec for streaming single-pass encoded videos by taking advantage of up to 64 cores in the system. The current thread limit for ffmpeg codecs is 16 (MAX_AUTO_THREADS in pthread_internal.h) due to a limitation in H.264 codec that prevents more than 16 threads being used. Experiments show that increasing the thread limit to 64 for vp9 improves the performance for encoding 4K raw videos for streaming by up to 47% compared to 16 threads, and from 20-30% for 32 threads, with the same quality as measured by the VMAF score. Rationale for this change: Vp9 uses tiling to split the video frame into multiple columns; tiles must be at least 256 pixels wide, so there is a limit to how many tiles can be used. The tiles can be processed in parallel, and more tiles mean more CPU threads can be used. 4K videos can make use of 16 threads, and 8K videos can use 32. Row-mt can double the number of threads so 64 threads can be used. Signed-off-by: James Zern <jzern@google.com>
* avfilter/vf_lagfun: call av_frame_copy_props()Paul B Mahol2023-01-17
|
* avfilter/vf_elbg: call av_frame_copy_props()Paul B Mahol2023-01-17
|
* avfilter/avf_showvolume: set output video frame durationPaul B Mahol2023-01-17
|
* avfilter/vsrc_gradients: set output video frame durationPaul B Mahol2023-01-17
|
* avfilter/avf_abitscope: set output time_base and output frame durationPaul B Mahol2023-01-17
|
* avfilter/af_virtualbass: call av_frame_copy_props()Paul B Mahol2023-01-17
|
* avfilter/vf_scdet: change threshold checkingPaul B Mahol2023-01-17
| | | | Also allow score to match threshold thus allowing ==0.0 scores.
* avfilter/af_arnndn: unbreak filteringPaul B Mahol2023-01-17
|
* avfilter/af_arnndn: call av_frame_copy_props()Paul B Mahol2023-01-17
|
* avfilter/af_afftfilt: call av_frame_copy_props()Paul B Mahol2023-01-17
|
* avfilter/af_afftdn: call av_frame_copy_props()Paul B Mahol2023-01-17
|
* avfilter/vsrc_cellauto: set video frame durationPaul B Mahol2023-01-17
|
* avfilter/vsrc_life: set video frame durationPaul B Mahol2023-01-17
|
* avfilter/vsrc_mandelbrot: set video frame durationPaul B Mahol2023-01-17
|
* avfilter/vsrc_mptestsrc: set video frame durationPaul B Mahol2023-01-17
|
* avfilter/vsrc_testsrc: set video frame durationPaul B Mahol2023-01-17
|
* avfilter/vsrc_sierpinski: set video frame durationPaul B Mahol2023-01-17
|
* avfilter/vf_ciescope: fix black-point positionPaul B Mahol2023-01-17
|
* avfilter/vf_ciescope: switch to anti-aliased linesPaul B Mahol2023-01-17
|
* avfilter/avf_a3dscope,avf_showcwt: set video frame durationPaul B Mahol2023-01-17
|
* avfilter/af_dialoguenhance: call av_frame_copy_props()Paul B Mahol2023-01-17
|
* avfilter/af_surround: call av_frame_copy_props()Paul B Mahol2023-01-17
|
* avfilter/af_afir: call av_frame_copy_props()Paul B Mahol2023-01-17
|
* avcodec/scpr3: Check bxMichael Niedermayer2023-01-17
| | | | | | | | Fixes: Out of array access Fixes: 55102/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-4877396618903552 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/012v: Order operations for odd size handlingMichael Niedermayer2023-01-17
| | | | | | | | | | Fixes: out of array access Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ZERO12V_fuzzer-6714182078955520.fuzz Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ZERO12V_fuzzer-6698145212137472.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavfi/overlay_vaapi: remove unnecessary codeHaihao Xiang2023-01-17
| | | | | | VA-API filter is not required. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavfi/vaapi: remove duplicated codeHaihao Xiang2023-01-17
| | | | | | | Add a ff_ function to handle mulitple pipeline parameters. No functional changes. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avcodec/vaapi_encode_h26x: passthrough A53 CC data as H264/HEVC SEIAman Karmani2023-01-17
| | | | Signed-off-by: Aman Karmani <aman@tmm1.net>
* lavfi/qsv: use QSVVPPContext as base context in vf_vpp_qsv/vf_overlay_qsvHaihao Xiang2023-01-17
| | | | | | | | | | | | | | The same members between QSVVPPContext and VPPContext are removed from VPPContext, and async_depth is moved from QSVVPPParam to QSVVPPContext so that all QSV filters using QSVVPPContext may support async depth. In addition, we may use QSVVPPContext as base context in other QSV filters in the future so that we may re-use functions defined in qsvvpp.c for other QSV filters. This commit shouldn't change the functionality of vpp_qsv / overlay_qsv. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavfi/qsvvpp: set output frame durationsHaihao Xiang2023-01-17
| | | | Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavfi/vf_vpp_qsv: check output format string against NULL pointerHaihao Xiang2023-01-17
| | | | | | | This is in preparation for reusing the code for other QSV filters. E.g. deinterlacing_qsv may have an option array without format option Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavfi/vf_vpp_qsv: add has_passthrough flag in VPPContextHaihao Xiang2023-01-17
| | | | | | | | | | QSV filters may set this flag in preinit callback to turn on / off pass through mode This is in preparation for reusing the code for other QSV filters. E.g. scale_qsv filter doesn't support pass through mode. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavfi/vf_vpp_qsv: add vpp_preinit callbackHaihao Xiang2023-01-17
| | | | | | | | | | Set the expected default value for options in this callback, hence we have the right values even if these options are not included in the option arrray. This is in preparation for reusing the code for other QSV filters. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavfi/vf_vpp_qsv: allow special values for the output video dimensionsHaihao Xiang2023-01-17
| | | | | | | | | | Special values are: 0 = original width/height -1 = keep original aspect This is in preparation for reusing the code for other QSV filters. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavfi/vf_vpp_qsv: handle NULL pointer when evaluating an expressionHaihao Xiang2023-01-17
| | | | | | | | This patch provides default value if the expression is NULL. This is in preparation for reusing the code for other QSV filters. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavfi/vf_vpp_qsv: add "a", "dar" and "sar" variablesHaihao Xiang2023-01-17
| | | | | | | | Also fix the naming style in enum var_name. This is in preparation for reusing the code for other QSV filters. Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* lavc/qsvenc_jpeg: accept YUYV422 and BGRA in system memoryHaihao Xiang2023-01-17
| | | | Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
* avformat/segment: calculate segment durations correctly.Gyan Doshi2023-01-16
| | | | | | | | | segment_time and segment_times are defined as duration specifications, not timestamps, so calculation of segment duration must account for initial timestamp. Fixed. FATE ref for segment-mp4-to-ts changed on account of avoiding premature segment cut at the end of the first segment.
* avformat/dtshddec: also read trailing padding in samplesPaul B Mahol2023-01-16
|
* avfilter: add fractional delay IR source filterPaul B Mahol2023-01-16
|
* avcodec/wbmpdec: use remaining size not whole sizeMichael Niedermayer2023-01-15
| | | | | | | | | | | | Fixes: out of array access Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WBMP_fuzzer-6652634692190208 Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WBMP_fuzzer-6653703453278208 Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WBMP_fuzzer-6668020758216704 Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WBMP_fuzzer-6684749875249152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/eatgq: : Check index increments in tgq_decode_block()Michael Niedermayer2023-01-15
| | | | | | | | Fixes: out of array access Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EATGQ_fuzzer-6743211456724992 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>