1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

11100 Commits

Author SHA1 Message Date
Andreas Rheinhardt
571d0359fa avfilter/vf_colorconstancy: Remove redundant CONFIG check
This file is only used by the greyedge filter and therefore
only compiled if said filter is enabled. This also allows
to remove a config_components.h inclusion, avoiding unnecessary
rebuilds.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-08-07 09:21:13 +02:00
Andreas Rheinhardt
2f62a433f2 avfilter: Deduplicate default video inputs/outputs
Lots of video filters use a very simple input or output:
An array with a single AVFilterPad whose name is "default"
and whose type is AVMEDIA_TYPE_VIDEO; everything else is unset.

Given that we never use pointer equality for inputs or outputs*,
we can simply use a single AVFilterPad instead of dozens; this
even saves .data.rel.ro (8312B here) as well as relocations.

*: In fact, several filters (like the filters in vf_lut.c)
already use the same outputs; furthermore, ff_filter_alloc()
duplicates the input and output pads so that we do not even
work with the pads directly.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-08-07 09:21:13 +02:00
Andreas Rheinhardt
6d15643173 avfilter/internal: Don't include video.h
internal.h does not depend on video.h (and should not depend on it)
and therefore should not include video.h at all; instead all users
of video.h should include it directly.

Doing so also avoids unnecessary video.h inclusions in files that
don't need it, like most audio filters.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-08-07 09:21:13 +02:00
Andreas Rheinhardt
50ea7389ec avfilter: Deduplicate default audio inputs/outputs
Lots of audio filters use very simple inputs or outputs:
An array with a single AVFilterPad whose name is "default"
and whose type is AVMEDIA_TYPE_AUDIO; everything else is unset.

Given that we never use pointer equality for inputs or outputs*,
we can simply use a single AVFilterPad instead of dozens; this
even saves .data.rel.ro (4784B here) as well as relocations.

*: In fact, several filters (like the filters in af_biquads.c)
already use the same inputs; furthermore, ff_filter_alloc()
duplicates the input and output pads so that we do not even
work with the pads directly.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-08-07 09:21:13 +02:00
Andreas Rheinhardt
1062a6d6c4 avfilter/avfilter: Make functions only used here static
Reviewed-by: Hendrik Leppkes <h.leppkes@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-08-04 11:49:26 +02:00
Andreas Rheinhardt
9732684ba2 avfilter/avfilter: Also deprecate variable name
Otherwise the var_names and the corresponding enum will be off
and e.g. the array holding the variable values will be too small.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-08-04 11:47:32 +02:00
Haihao Xiang
84fb7b9459 lavfi/vf_vpp_qsv: perform conversion from HDR to SDR
option tonemap is added to disable / enable tonemapping. By default
tonemapping is not performed.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-08-04 10:27:55 +08:00
Haihao Xiang
b66aecf1b4 lavfi/vf_vpp_qsv: set color properties for output
User may set color range / matrix coefficient set / primaries / transfer
characteristics for output.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-08-04 10:27:55 +08:00
Haihao Xiang
b42ea03f8b lavfi/vf_vpp_qsv: take input color properties into account
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-08-04 10:27:55 +08:00
Haihao Xiang
96b0b3f67a lavfi/qsvvpp: add set_frame_ext_params callback
This allows we add mfxExtBuffer per frame later.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-08-04 10:27:55 +08:00
Haihao Xiang
567e78b283 lavfi/vf_vpp_qsv: fix duration in pass-through mode
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-07-31 09:09:20 +08:00
Paul B Mahol
8bbaecb5de avfilter/avf_showcwt: improve range detection for morlet scales 2023-07-30 19:57:50 +02:00
Paul B Mahol
48cd5561e1 avfilter/avf_showcwt: rename option value 2023-07-30 18:14:16 +02:00
Paul B Mahol
bd23b1d0ac avfilter/avf_showcwt: add iscale option 2023-07-30 18:14:16 +02:00
Paul B Mahol
6f552b9c5e avfilter/avf_showcwt: improve caching of some arrays 2023-07-30 18:14:15 +02:00
Paul B Mahol
4f8b0beeba avfilter/avf_showcwt: reduce excessive operations 2023-07-30 18:14:15 +02:00
Paul B Mahol
37d3000e3e avfilter/avf_showcwt: fix truncation of low Hz kernels 2023-07-29 17:16:42 +02:00
James Almer
075dfc271b avfilter/qsvvpp: remove usage of deprecated fields
Added by mistake in 88b3841149.

Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-07-29 09:25:58 -03:00
Paul B Mahol
44813d66e2 avfilter/avf_showcwt: make kernels symmetrical 2023-07-29 11:30:16 +02:00
Paul B Mahol
6f6907fd20 avfilter/avf_showcwt: fix very low freqs leakage 2023-07-29 11:30:16 +02:00
Paul B Mahol
8c67e13473 avfilter/avf_showcwt: remove not needed fabsf() 2023-07-28 22:32:31 +02:00
Paul B Mahol
7d6dd90f3a avfilter/avf_showcwt: unbreak highest frequencies
The kernel was truncated too much.
2023-07-28 22:32:31 +02:00
Paul B Mahol
dca54600f0 avfilter/avf_showcwt: keep kernels precision as high as possible 2023-07-28 22:32:31 +02:00
Paul B Mahol
a7a46aff46 avfilter/avf_showcwt: remove excessive operations 2023-07-28 14:02:35 +02:00
Paul B Mahol
32a2268b6e avfilter/avf_showcwt: switch to overlap-save
And do both left and right zero-padding for forward FFT.
2023-07-28 14:02:34 +02:00
Paul B Mahol
830e522cde avfilter/avf_showcwt: reduce memory usage even more 2023-07-28 14:02:33 +02:00
Paul B Mahol
60244d0bec avfilter/af_afir: fix possible array read-overflow 2023-07-24 11:01:21 +02:00
Paul B Mahol
9fb2efe3b3 avfilter/avf_showcwt: make read only variable const 2023-07-24 11:01:21 +02:00
Wenbin Chen
13f49a7c62 libavfilter/vf_dnn_detect: bbox index may bigger than bbox number
Fix a bug that queried bbox index may bigger than bbox's total number.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-07-24 09:34:11 +08:00
Niklas Haas
e9e37ea2f1 avfilter/vf_libplacebo: fix skip_aa option range
Max incorrectly specified as 0, should be 1.
2023-07-23 17:50:41 +02:00
Zhao Zhili
89f5124d0a avfilter: add transpose_vt for videotoolbox pix_fmt
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-07-23 11:52:28 +08:00
Zhao Zhili
c2c96c4c24 avfilter: add scale_vt for videotoolbox pix_fmt
For example,

./ffmpeg -hwaccel videotoolbox \
	-hwaccel_output_format videotoolbox_vld \
	-i ios-265.mov \
	-c:v hevc_videotoolbox \
	-profile:v main \
	-b:v 3M \
	-vf scale_vt=w=iw/2:h=ih/2:color_matrix=bt709:color_primaries=bt709:color_transfer=bt709 \
	-c:a copy \
	-tag:v hvc1 \
	/tmp/test.mp4

Input: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, bt2020nc/bt2020/arib-std-b67), 3840x2160
Output: hevc (Main) (hvc1 / 0x31637668), yuv420p(tv, bt709, progressive), 1920x1080
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-07-23 11:51:57 +08:00
Paul B Mahol
b2ceed406b avfilter/avf_showcwt: reduce memory usage 2023-07-22 22:27:57 +02:00
Paul B Mahol
ffa3edbf51 avfilter/avf_showcwt: extend min frequency accepted range
Also always check that min frequency is lower than max frequency.
2023-07-22 18:05:38 +02:00
Paul B Mahol
c24c7bcc95 avfilter/avf_showcwt: no need for big forward FFT with small sample rates 2023-07-22 18:05:38 +02:00
Paul B Mahol
e6168e43a2 avfilter/avf_showcwt: improve analysis
Make inverse FFT step always power of 2 in size.
2023-07-22 18:05:38 +02:00
Paul B Mahol
74474a551b avfilter/avf_showcwt: fix index storing 2023-07-21 00:44:01 +02:00
Paul B Mahol
86a1904f41 avfilter/avf_showcwt: move variables out of loop 2023-07-21 00:43:47 +02:00
Paul B Mahol
3dc93acc56 avfilter/vf_pseudocolor: add four more presets 2023-07-21 00:43:46 +02:00
Tobias Rapp
6747cda5ca avfilter/vf_overlay: Add support for yuv444p10 pixel format 2023-07-20 16:49:05 +02:00
Paul B Mahol
72390c7d80 avfilter/vf_pseudocolor: add heat preset 2023-07-19 23:42:03 +02:00
Paul B Mahol
5d8879208c avfilter/vf_pseudocolor: add cool preset 2023-07-19 23:42:01 +02:00
Paul B Mahol
c183f840fa avfilter/af_axcorrelate: add another algorithm for calculation
Rewrite EOF logic while here.
2023-07-15 23:41:09 +02:00
Timo Rothenpieler
3c73200be2 avfilter/vsrc_ddagrab: calculate pointer position on rotated screens 2023-07-15 18:48:49 +02:00
Timo Rothenpieler
da94c6a00c avfilter/vsrc_ddagrab: account for mouse-only frames during probing 2023-07-15 17:06:58 +02:00
Niklas Haas
138d3ac15d lavfi/vf_libplacebo: test for renderable pixel formats
Requires a new upstream function to test not for *import* support on a
given output pixel format, but also whether we can render to it.

Fixes: https://github.com/haasn/libplacebo/issues/173
2023-07-15 13:37:54 +02:00
Paul B Mahol
ef3b5789ec avfilter/af_atempo: improve RE_MALLOC_OR_FAIL macro
Make use of third parameter of av_calloc() call.
2023-07-15 10:52:15 +02:00
Paul B Mahol
374184a4dc avfilter/split: fix EOF passing to inlink 2023-07-14 00:46:45 +02:00
Paul B Mahol
7430ee2b8b avfilter/avf_showcwt: add rotation option 2023-07-13 00:11:36 +02:00
Paul B Mahol
422bfdc4ae avfilter/avf_showcwt: add bar display support 2023-07-13 00:11:34 +02:00