Commit Graph

11473 Commits

Author SHA1 Message Date
Michael Niedermayer 0ecc1f0e48
avfilter/vf_weave: Fix odd height handling
Fixes: out of array access
Fixes: tickets/10743/poc10ffmpeg

Found-by: Zeng Yunxiang and Li Zeyuan
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 01:28:11 +01:00
Michael Niedermayer c443658d26
avfilter/edge_template: Fix small inputs with gaussian_blur()
Fixes: out of array access
Fixes: Ticket10699
Fixes: poc5ffmpeg

Found-by: Zeng Yunxiang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 01:28:10 +01:00
Paul B Mahol e6459abfad
avfilter/af_stereotools: round-up max size of buffer
Fixes: out of array access
Fixes: tickets/10747/poc14ffmpeg

Found-by: Zeng Yunxiang and Song Jiaxuan
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 01:19:06 +01:00
Michael Niedermayer e4d2666bdc
avfilter/vf_gradfun: Do not overread last line
The code works in steps of 2 lines and lacks support for odd height
Implementing odd height support is better but for now this fixes the
out of array access

Fixes: out of array access
Fixes: tickets/10702/poc6ffmpe

Found-by: Zeng Yunxiang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 01:19:05 +01:00
Michael Niedermayer ab0fdaedd1
avfilter/avf_showspectrum: fix off by 1 error
Fixes: out of array access
Fixes: tickets/10749/poc15ffmpeg

Regression since: 81df787b53

Found-by: Zeng Yunxiang
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 01:19:04 +01:00
Michael Niedermayer aec67d3d7d
avfilter/af_stereowiden: Round length to nearest
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-12-29 01:19:03 +01:00
Zhao Zhili 56ca0f2918 avfilter/vf_showinfo: add udu_sei_as_ascii option
Some encoders (e.g., libx264) dump encoder configuration as user
data unregistered SEI message. This option try to print it as
ascii character when possible.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-12-28 21:22:54 +08:00
Andreas Rheinhardt 0c6203c97a all: Don't set AVClass.item_name to its default value
Unnecessary since acf63d5350adeae551d412db699f8ca03f7e76b9;
also avoids relocations.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-12-22 15:12:33 +01:00
Vittorio Giovara 05bfc03752 Add new vf_tiltandshift filter
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2023-12-21 17:16:16 -05:00
Wenbin Chen 9415c2c11f libavfilter/vf_dnn_detect: Add initialized value to function pointer
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-12-21 16:15:23 +08:00
Wenbin Chen 233c44f735 libavfilter/vf_dnn_detect: Fix a control flow issue
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-12-21 16:15:23 +08:00
Wenbin Chen 1fa3346c70 libavfilter/vf_dnn_detect: Add yolov4 support
The difference of yolov4 is that sigmoid function needed to be applied
on x, y coordinates. Also make it compatiple with NHWC output as the
yolov4 model from openvino model zoo has NHWC output layout.

Model refer to: https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/yolo-v4-tf

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
2023-12-16 21:51:52 +08:00
Wenbin Chen a882fc0294 libavfilter/vf_dnn_detect: Add yolov3 support
Add yolov3 support. The difference of yolov3 is that it has multiple
outputs in different scale to perform better on both large and small
object.

The model detail refer to: https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/yolo-v3-tf

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
2023-12-16 21:50:50 +08:00
Wenbin Chen da02836b9d libavfilter/vf_dnn_detect: Add input pad
Add input pad to get model input resolution. Detection models always
have fixed input size. And the output coordinators are based on the
input resolution, so we need to get input size to map coordinators to
our real output frames.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
2023-12-16 21:50:37 +08:00
Wenbin Chen 22652b576c libavfiter/dnn_backend_openvino: Add multiple output support
Add multiple output support to openvino backend. You can use '&' to
split different output when you set output name using command line.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
2023-12-16 21:50:16 +08:00
Wenbin Chen 22bebfa5e6 libavfilter/vf_dnn_detect: Set used pointer to NULL
Set used pointer to NULL in case it leaks the storage.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-12-15 20:04:54 +08:00
Wenbin Chen a1e8892a8a libavfilter/vf_dnn_detect: Fix uninitialized variables error
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-12-15 20:04:54 +08:00
Wenbin Chen 833722343a libavfilter/vf_dnn_detect: Add NULL pointer check
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-12-15 20:04:54 +08:00
Wenbin Chen e01afa1c6d libavfilter/vf_dnn_detect: Fix an incorrect expression
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-12-15 20:04:54 +08:00
Gyan Doshi b9fd3e7a88 avfilter/select: initialize prev_selected_n to NAN
As per the doc, prev_selected_n should be NAN at the start.
However, this was never set.
2023-12-10 09:29:50 +05:30
nilfm 5f4b7bf2b5 avfilter/vf_libvmaf: fix string comparison bug
The libvmaf filter was doing substring checks in place of string equality
comparisons. This led to a bug when the user specified the pooling method
"harmonic_mean", since "mean" was checked first and the substring comparison
returned true. This patch changes all substring comparisons for string equality
comparisons. This is both correct and more efficient than the existing method.

Signed-off-by: nilfm <nilf@netflix.com>
2023-12-08 10:32:46 -08:00
Cosmin Stejerean 737ede405b avfilter/bwdif: account for chroma sub-sampling in min size calculation
The current logic for detecting frames that are too small for the
algorithm does not account for chroma sub-sampling, and so a sample
where the luma plane is large enough, but the chroma planes are not
will not be rejected. In that event, a heap overflow will occur.

This change adjusts the logic to consider the chroma planes and makes
the change to all three bwdif implementations.

Fixes #10688

Signed-off-by: Cosmin Stejerean <cosmin@cosmin.at>
Reviewed-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: Philip Langdale <philipl@overt.org>
2023-12-07 10:00:12 +08:00
Paul B Mahol ebfd3912e9 avfilter/asrc_flite: use streaming function
Fix continuous accumulation of audio samples for big txt inputs.
2023-12-06 10:52:46 +01:00
Paul B Mahol d793af982e avfilter/asrc_flite: switch to activate
Allows to set EOF timestamp.
2023-12-06 10:52:45 +01:00
Anton Khirnov c6483f1c2a lavfi/buffersink: avoid leaking peeked_frame on uninit 2023-12-06 10:01:09 +01:00
Haihao Xiang 35a555e2b9 lavfi/vf_vpp_qsv: set the default value of async_depth to 4
Both qsv encoders and decoders use 4 as the default value of
async_depth, let's use 4 as the default value for vpp_qsv filter too.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2023-12-05 10:12:16 +08:00
Paul B Mahol 9e74c7ae87 avfilter/af_dialoguenhance: add double-floating point sample format support 2023-12-04 23:14:40 +01:00
Paul B Mahol 704ef556fe avfilter/af_surround: refactor some code 2023-12-04 23:14:39 +01:00
Kyle Swanson 9f1dbca820 avfilter/libvmaf: small cleanup for style, whitespace, unused LIBVMAFContext struct members
Signed-off-by: Kyle Swanson <kswanson@netflix.com>
2023-12-04 10:00:01 -08:00
Paul B Mahol d9e41ead82 avfilter/avfilter: fix OOM case for default activate
Fixes OOM when caller keeps adding frames into filtergraph
that reached EOF by other means, for example EOF is signalled
by other filter in filtergraph or by buffersink.
2023-12-03 23:26:43 +01:00
Paul B Mahol e3e3531d1e avfilter/vsrc_gradients: make rotation always continuous if speed changes 2023-12-03 18:43:26 +01:00
Paul B Mahol 8888574d10 avfilter/vsrc_gradients: add commands support 2023-12-03 18:30:06 +01:00
Paul B Mahol f84412d6f4 avfilter/vf_corr: for all zero returns zero score instead of 1 2023-12-03 03:10:05 +01:00
Paul B Mahol aad3223978 avfilter/vf_corr: add slice threading support 2023-12-03 03:10:03 +01:00
Paul B Mahol db7b838237 avfilter/vf_chromanr: compare correct variables for advanced mode 2023-12-01 21:31:38 +01:00
Paul B Mahol a30adf9f96 avfilter/framesync: fix OOM case
Fixes OOM when caller keeps adding frames into filtergraph
that reached EOF by other means, for example EOF is signalled
by other filter in filtergraph or by buffersink.
2023-11-30 11:08:34 +01:00
Paul B Mahol 47e214245b avfilter/arls_template: use defines for all constants 2023-11-28 16:09:12 +01:00
Paul B Mahol f66536cc58 avfilter: add Affine Projection adaptive audio filter 2023-11-28 15:40:34 +01:00
Paul B Mahol 67ce690bc6 avfilter/af_anlms: set output frame duration 2023-11-28 13:17:19 +01:00
Paul B Mahol 411c516453 avfilter/af_arls: set output frame duration 2023-11-28 13:17:13 +01:00
Paul B Mahol bafbb0697e avfilter/af_amix: set output frame duration 2023-11-28 13:17:13 +01:00
Paul B Mahol 358aced447 avfilter/af_amultiply: set output frame duration 2023-11-28 13:17:12 +01:00
Paul B Mahol 8b9c400f1d avfilter/af_amerge: use already provided outlink 2023-11-28 13:17:12 +01:00
Paul B Mahol c979ccdfd7 avfilter: no need to request more samples if internal frame is available 2023-11-28 13:16:18 +01:00
Paul B Mahol 3bca828d39 avfilter/af_arls: add double sample format support 2023-11-27 20:27:27 +01:00
Paul B Mahol 42e45ea8ff avfilter/af_anlms: add double sample format support 2023-11-27 20:27:25 +01:00
Paul B Mahol 5f87a68cf7 avfilter/vf_colorcorrect: fix memory leaks 2023-11-27 12:10:26 +01:00
Paul B Mahol f1f973313b avfilter/af_dialoguenhance: do output scaling once 2023-11-27 11:56:27 +01:00
Paul B Mahol b1942734c7 avfilter/af_afwtdn: fix crash with EOF handling 2023-11-27 11:56:26 +01:00
Paul B Mahol 4671fb7dfb avfilter/af_dialoguenhance: simplify channels copy 2023-11-27 11:56:23 +01:00
Wenbin Chen 47b2328076 libavfilter/vf_dnn_detect: Add yolo support
Add yolo support. Yolo model doesn't output final result. It outputs
candidate boxes, so we need post-process to remove overlap boxes to
get final results. Also, the box's coordinators relate to cell and
anchors, so we need these information to calculate boxes as well.

Model detail please refer to: https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/yolo-v2-tf

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
2023-11-26 20:38:36 +08:00
Wenbin Chen caa5d123a7 libavfilter/vf_dnn_detect: Add model_type option.
There are many kinds of detection DNN model and they have different
preprocess and postprocess methods. To support more models,
"model_type" option is added to help to choose preprocess and
postprocess function.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Guo Yejun <yejun.guo@intel.com>
2023-11-26 20:15:55 +08:00
Paul B Mahol e7111ba44a avfilter/vsrc_gradients: allow zero speed 2023-11-26 02:07:45 +01:00
Paul B Mahol f1acb0d843 avfilter/vsrc_gradients: add square type 2023-11-26 02:07:44 +01:00
Paul B Mahol 2d9ed64859 avfilter/af_dialoguenhance: fix overreads 2023-11-25 13:05:31 +01:00
Paul B Mahol 37c5bcc4e8 avfilter/af_channelmap: do not override set channel layout 2023-11-25 13:05:31 +01:00
Paul B Mahol 4adb93dff0 avfilter/asrc_afirsrc: fix by one smaller allocation of buffer 2023-11-23 15:01:55 +01:00
James Almer 0008e1c5d5 avfilter/asrc_anullsrc: fix allowed range for sample_rate
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2023-11-22 19:41:15 -03:00
Paul B Mahol 4af412be71 avfilter: use AV_OPT_TYPE_CHLAYOUT 2023-11-22 19:28:40 +01:00
Paul B Mahol d55d0bba48 avfilter/af_afir: remove flag that is not needed 2023-11-19 23:59:23 +01:00
Paul B Mahol 28a43cf7fe avfilter/af_afir: no need to dynamically add outpad 2023-11-19 23:55:54 +01:00
Paul B Mahol 6579d95df3 avfilter/af_afir: refactor crossfade code 2023-11-19 23:47:52 +01:00
Paul B Mahol bbdd604b9e avfilter/af_afir: add timeline support 2023-11-19 23:47:51 +01:00
Paul B Mahol a9205620b1 avfilter/af_afir: remove IR response video rendering support
And deprecate related options.
The same functionality can be done with specialized audio visualization filters.
2023-11-19 13:41:13 +01:00
Paul B Mahol 7c16bf0829 avfilter/avf_showvolume: improve step for vertical orientation 2023-11-18 23:50:39 +01:00
Paul B Mahol 3ed2225a9d avfilter/avf_showvolume: draw channel names directly into output frame 2023-11-18 23:50:38 +01:00
Jun Zhao 2d4aef8982 lavfi/Makefile: fix vf_cropdetect missed edge_common
vf_cropdetect depends on edge_common, it's missing in Makefile.

Fix trac issue:
http://trac.ffmpeg.org/ticket/10664

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2023-11-18 20:19:39 +01:00
Diederik de Haas via ffmpeg-devel c07ed10b0e apply spelling fixes
Fix spelling issue as reported by Debian's lintian tool:
accomodate -> accommodate
addtional -> additional
auxillary -> auxiliary
bellow -> below
betweeen -> between
Calulate -> Calculate
coefficents -> coefficients
Defalt -> Default
defaul -> default
higer -> higher
neccesary -> necessary
orignal -> original
ouput -> output
precison -> precision
processsing -> processing
substract -> subtract
Transfered -> Transferred
upto -> up to

Also add several of them to the 'common typos' check in patcheck.

Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
2023-11-18 19:55:42 +01:00
Paul B Mahol 5452cbdc15 avfilter/af_afir: add irnorm and irlink options
Deprecate gtype option.
2023-11-18 17:04:53 +01:00
Paul B Mahol 08e97dae20 avfilter/af_adynamicequalizer: add adaptive detection mode 2023-11-17 00:17:54 +01:00
Paul B Mahol 82be1e5c0d avfilter/af_adynamicequalizer: do gain calculations in log domain 2023-11-17 00:17:54 +01:00
sunyuechi afb967b81e af_afir: RISC-V V fcmul_add
Segmented loads are slow, so here we use unit-strided load and narrowing shifts.

c910:
fcmul_add_c: 2179
fcmul_add_rvv_f64: 1652

c908:
fcmul_add_c: 4891.2
fcmul_add_rvv_f64: 2399.5

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2023-11-16 20:53:18 +02:00
Paul B Mahol 7282137f48 lavfi/af_amix: make sure the output does not depend on input ordering
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-11-14 18:18:26 +01:00
Paul B Mahol 84e400ae37 avfilter/buffersrc: switch to activate
Fixes OOM when caller keeps adding frames into filtergraph
that reached EOF by other means, for example EOF is signalled
by other filter in filtergraph or by buffersink.
2023-11-12 23:48:10 +01:00
Paul B Mahol 3ff811a41f avfilter/vf_colortemperature: add gbr(a)pf support 2023-11-12 02:39:44 +01:00
Paul B Mahol 553b31da68 avfilter/avf_showcwt: fix invalid write for full bargraph 2023-11-11 23:29:45 +01:00
Paul B Mahol fa4c2884dd avfilter/avf_showcwt: do not return initial black frames with negative timestamps 2023-11-11 17:53:26 +01:00
Wenbin Chen fa81de4af0 libavfilter/dnn/openvino: Reduce redundant memory allocation
We can directly get data ptr from tensor, so that extral memory
allocation can be removed.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-11-11 09:32:31 +08:00
Paul B Mahol 49719d3cb5 avfilter/avf_showcwt: add fm frequency scaler 2023-11-11 01:19:44 +01:00
Niklas Haas cf60046cdc avfilter/vf_scale: tag output color space
When using vf_scale to force a specific output color space, also tag
this on the AVFrame. (Mirroring existing logic for output range)

Move the sanity fix for RGB after the new assignment, to avoid leaking
bogus YUV colorspace metadata for RGB spaces.
2023-11-09 12:53:35 +01:00
Niklas Haas 5d5bb77af1 avfilter/vf_scale: simplify color matrix parsing logic
No need to write a custom string parser when we can just use an integer
option with preset values. The various bits of fallback logic are wholly
redundant with equivalent logic already inside sws_getCoefficients.

Note: I disallowed setting 'out_color_matrix=auto', because this does
not do anything meaningful in the current code (just hard-codes
AVCOL_SPC_BT470BG fallback).
2023-11-09 12:53:35 +01:00
Niklas Haas ea9557043e avfilter/vf_alphamerge: warn if input not full range
Alpha planes must always be full range, so complain loudly if fed
limited range grayscale input.
2023-11-09 12:53:35 +01:00
Niklas Haas b7284f2410 avfilter/vf_extractplanes: tag alpha plane as full range
Alpha planes are explicitly full range, even for limited range YUVA
formats. Mark them as such.
2023-11-09 12:53:35 +01:00
Marvin Scholz 6667741029 avfilter/vf_tpad: fix check for drawing initialization
The check if drawing needs to be initialized and supported formats
should be drawable ones was flawed, as pad_stop/pad_start is only
populated from stop_duration/start_duration after these checks.

To fix that, check the _duration variants as well and for better
readability and maintainability break the check out into its own
helper.

Fixes a regression from 86b252ea9d
Fix #10621

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-11-09 11:11:00 +01:00
Lynne 99fcdee5e8
nlmeans_vulkan: fix offsets calculation and various stride issues
We calculated offsets as pairs, but addressed them in the shader
as single float values, while reading them as ivec2s.

Also removes unused code (was provisionally added if cooperative matrices
could be used, but that turned out to be impossible).
2023-11-09 09:14:18 +01:00
Paul B Mahol 44a0148fad avfilter/af_adynamicequalizer: do detection of threshold first
Makes better results in final output if multiple filters are cascaded at once.
2023-11-05 16:00:29 +01:00
Paul B Mahol 799fad1828 avfilter/af_adynamicequalizer: always start filtering from unit gain 2023-11-05 16:00:28 +01:00
Paul B Mahol fd1712b6fb avfilter/af_adynamicequalizer: merge direction option with mode option
More user-friendly and self-explanatory what certain mode does.
2023-11-04 15:39:24 +01:00
Paul B Mahol 43226efc21 avfilter/af_adynamicequalizer: add new structure to hold filtering state 2023-11-04 15:39:23 +01:00
Andreas Rheinhardt de4846dd18 avfilter/deshake: Merge header into its only user
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-11-04 01:26:25 +01:00
Andreas Rheinhardt 2fdaeec41b avfilter/vf_deshake: Remove unnecessary emms_c
Redundant since ea043cc53e
(which made 16x16 no longer use MMX).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-11-04 01:26:25 +01:00
Andreas Rheinhardt 392ab35db1 avfilter/vf_mpdecimate: Remove emms_c
Unnecessary now that the pixelutils API abides by the ABI.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-11-04 01:26:25 +01:00
Andreas Rheinhardt 8661b5e8f9 avfilter/vf_format: Deduplicate inputs
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-11-04 01:24:09 +01:00
Andreas Rheinhardt c32c1a18b9 avfilter/vsrc_testsrc: Deduplicate outputs
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-11-04 01:24:09 +01:00
Andreas Rheinhardt 748c168f8e avfilter/vf_xmedian: Deduplicate outputs
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-11-04 01:24:09 +01:00
Andreas Rheinhardt 93abb9b560 avfilter/vf_hsvkey: Deduplicate inputs and outputs
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-11-04 01:24:09 +01:00
Andreas Rheinhardt 50d3c5bd8c avfilter/vf_convolve: Deduplicate outputs
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-11-04 01:24:09 +01:00
Andreas Rheinhardt e557d89ac1 avfilter/vf_chromakey: Deduplicate inputs and outputs
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-11-04 01:24:09 +01:00
Andreas Rheinhardt 2e2c28119f avfilter/vf_blend: Deduplicate outputs
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-11-04 01:24:09 +01:00
Andreas Rheinhardt 1d33a310df avfilter/vf_aspect: Deduplicate inputs
Also avoid using the avfilter-prefix for static objects.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-11-04 01:24:09 +01:00
Andreas Rheinhardt a40f833bac avfilter/f_graphmonitor: Deduplicate outputs
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-11-04 01:24:09 +01:00
Andreas Rheinhardt a02670ded7 avfilter/f_drawgraph: Deduplicate outputs
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-11-04 01:24:09 +01:00
Michael Niedermayer c0a18e884c
avfilter/buffersink: fix order of operation with = and <0
Reviewed-by: Sean McGovern <gseanmcg@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-11-03 22:17:18 +01:00
Michael Niedermayer 9450a4a7fe
avfilter/framesync: fix order of operation with = and <0
Reviewed-by: Sean McGovern <gseanmcg@gmail.com>
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-11-03 22:16:33 +01:00
Lynne 0e8abf2698
bwdif_vulkan: fix artifacts on vulkan decode images
Due to making the decode frames context use the coded size, the
filter started to display those artifacts as it reused the input frame's size.

Change it to instead output the real image size for images, not the input.
2023-10-31 21:35:28 +01:00
Niklas Haas d312a33ed2 avfilter/drawutils: remove redundant xyz format check
The code above this does a whitelist on desc->flags, which now includes
the (disallowed) AV_PIX_FMT_FLAG_XYZ for XYZ formats. So there is no
more need for a separate check, here.
2023-10-31 15:46:38 +01:00
Niklas Haas 96dfc4481b avfilter/drawutils: ban XYZ formats
These are not supported by the drawing functions at all, and were
incorrectly advertised as supported in the past.

Note: This check is added only to separate the logic change from the API
change in the following commit, and will be removed again after it
becomes redundant.
2023-10-31 15:43:30 +01:00
Paul B Mahol 6323ca5902 avfilter/vf_feedback: add timeline support 2023-10-30 16:06:46 +01:00
Michael Niedermayer 47e784f881
Bump versions after 6.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-10-29 16:19:14 +01:00
Michael Niedermayer 9d3a7d30c4
Bump versions prior to 6.1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2023-10-29 15:34:05 +01:00
Kyle Swanson e5f774268a avfilter/libvmaf: fix broken cuda build
Signed-off-by: Kyle Swanson <kswanson@netflix.com>
2023-10-27 15:00:58 -07:00
Gyan Doshi 2b300eb533 avfilter/vidstab: add option for file format specification
The vidstab library added support in Nov 2020 for writing/reading
the transforms data in binary in addition to ASCII. The library default
was changed to binary format but no changes were made to the AVfilters
resulting in data file for writing or reading being always opened as text.
This effectively broke the filters.

Option added to vidstabdetect to specify file format and open files in
both filters with the correct attributes.
2023-10-26 15:46:18 +05:30
Martin Storsjö 93cda5a9c2 aarch64: Lowercase UXTW/SXTW and similar flags
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-10-21 23:25:23 +03:00
Martin Storsjö 184103b310 aarch64: Consistently use lowercase for vector element specifiers
Signed-off-by: Martin Storsjö <martin@martin.st>
2023-10-21 23:25:18 +03:00
Niklas Haas 2d1aeba8f2 avfilter/vf_scale: fix interlaced chroma for other formats
This logic only covers the case of yuv420p. Extend this logic to cover
*all* vertically subsampled YUV formats, which require the same
interlaced scaling logic.

Fortunately, we can get away with re-using the same code for both JPEG
and MPEG range YUV, because the only difference here is the horizontal
alignment. (Which I omit touching for now, to avoid introducing possibly
unintended changes in default behavior)
2023-10-20 15:20:09 +02:00
Niklas Haas 90d327d607 avfilter/vf_showinfo: also print chroma loc
Curiously absent.
2023-10-14 00:16:57 +02:00
Kyle Swanson 2e33f5ced0 avfilter/libvmaf: update pix_fmts
Signed-off-by: Kyle Swanson <kswanson@netflix.com>
2023-10-12 10:37:36 -07:00
Lynne f31d0f1141
nlmeans_vulkan: parallelize workgroup invocations 2023-10-11 16:53:06 +02:00
Lynne 658b01b5ee
nlmeans_vulkan: reduce dispatches by parallelizing the planes 2023-10-11 16:53:04 +02:00
Lynne 6bc8ff7d93
nlmeans_vulkan: fix width/height for chroma plane weights calculation 2023-10-11 16:53:00 +02:00
Kyle Swanson 6028728bb8 avfilter/libvmaf: remove deprecated options 2023-10-10 11:00:20 -07:00
Timo Rothenpieler 8b6ee74d50 avfilter/ddagrab: create secondary xor mouse texture 2023-10-09 20:17:50 +02:00
Timo Rothenpieler 0e7ae95cc2 avfilter/ddagrab: actually use provided texture pointer 2023-10-09 20:17:49 +02:00
Andreas Rheinhardt f62c441e7a avfilter/vulkan_filter: Remove unused label
Unused since 81cc0e1345.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-10-06 12:28:45 +02:00
Lynne 81cc0e1345
hwcontext_vulkan: properly support STORAGE usage for mutliplane images
Fixes multiplane support on Nvidia.

Also, remove the ENCODE usage, even if the driver signals it as supported.
Currently, it's not used, and when it is used, it'll be gated behind
two extension checks.
2023-10-05 23:50:30 +02:00
Anton Khirnov 63bc6430a6 lavfi/yadif: update output frame durations 2023-10-03 16:57:02 +02:00
Andreas Rheinhardt f58038d498 avcodec/avcodec: Avoid codec_desc.h, codec_par.h inclusions
Instead, use forward declarations; and in order not to affect
any user include these headers for them, but not internally.
This has the advantage of removing implicit inclusions of these
headers from almost all files providing codecs.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-10-03 01:59:07 +02:00
Niklas Haas 443471356f avfilter/vf_iccdetect: use ff_icc_profile_sanitize 2023-10-03 00:28:50 +02:00
Paul B Mahol 41f5b73903 avfilter/f_ebur128: do not print summary log if nothing was processed 2023-09-29 18:40:54 +02:00
Paul B Mahol 7ce2e5f3ea avfilter/vf_pseudocolor: add support for more planar alpha formats 2023-09-28 23:09:31 +02:00
Paul B Mahol 0aa75a85e6 avfilter/vf_zscale: fix adding >8 bit alpha plane 2023-09-28 22:46:56 +02:00
Paul B Mahol 086c280901 avfilter/vf_zscale: add more planar formats with alpha 2023-09-28 22:46:55 +02:00
Paul B Mahol 35b6d9d80c avfilter/vf_negate: add support for more planar with alpha 2023-09-28 22:46:54 +02:00
Paul B Mahol 3a5171c9f4 avfilter/vf_extractplanes: add GBRAP14 support 2023-09-28 19:37:58 +02:00
杨亚磊 via ffmpeg-devel ee8d2ece7b lavfi/framequeue: remove redundant logic code
In this logical branch, fq->queued and fq->allocated must be equal.
Deleting this code will make it easier to understand the logic
(copy the data before tail to the newly requested space)

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2023-09-28 09:25:02 +02:00
Andreas Rheinhardt 97cd698ee4 avfilter/bwdifdsp: Avoid including ff_bwdif_filter_line3_c()
This function is used by the AARCH64 code to filter a few
remaining lines in case the dimensions are not suitably
aligned; it is furthermore also used by checkasm to actually
test the AARCH64 code against. But it is normally not used
and this patch therefore moves it in bwdifdsp.h as a static
inline function so that it can be avoided if possible
or inlined where necessary.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-28 00:17:47 +02:00
Andreas Rheinhardt fa06f48371 avfilter/bwdifdsp: Constify
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-28 00:17:47 +02:00
Andreas Rheinhardt 1db884c625 avfilter/vf_bwdif: Move DSP code to a new file
Otherwise checkasm/vf_bwdif.c pulls in vf_bwdif.c and
then all of libavfilter. Besides being bad size-wise
this also has the downside that it pulls in
avpriv_(cga|vga16)_font from libavutil which are marked
as being imported from another library when building
libavfilter as a DLL and this breaks checkasm because
it links both lavfi and lavu statically.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-28 00:17:47 +02:00
Andreas Rheinhardt 80afcc8539 avfilter/bwdif: Add proper BWDIFDSPContext
This already avoids unnecessary indirectly included headers
in the arch-specific vf_bwdif_init.c files; it is also in
preparation for splitting the actual functions out of vf_bwdif.c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-28 00:17:47 +02:00
Kyle Swanson 7f685d0f49 avfilter: add libvmaf_cuda
Signed-off-by: Kyle Swanson <kswanson@netflix.com>
2023-09-27 10:22:33 -07:00
Wenbin Chen 58b6c0c327 libavfilter/dnn: Initialze DNNData variables
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-09-27 12:58:55 +08:00
Wenbin Chen c8c925dc29 libavfilter/dnn: Add scale and mean preprocess to openvino backend
Dnn models has different data preprocess requirements. Scale and mean
parameters are added to preprocess input data.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-09-27 12:58:55 +08:00
Wenbin Chen 74ce1d2d11 libavfilter/dnn: add layout option to openvino backend
Dnn models have different input layout (NCHW or NHWC), so a
"layout" option is added
Use openvino's API to do layout conversion for input data. Use swscale
to do layout conversion for output data as openvino doesn't have
similiar C API for output.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-09-27 12:58:55 +08:00
Paul B Mahol fb05bc8eee avfilter/af_astats: extend and improve bit depth output 2023-09-25 19:07:11 +02:00
Chema Gonzalez c0f89dccc8 lavfi/vf_libvmaf: add warning when color ranges differ
The VMAF filter uses the pixel values without considering
the color ranges. This is incorrect. Patch adds a warning
so at least the user knows it.

Let's see an example.

(1) Let's get FR and LR versions of the same image.

```
$ ffmpeg -y -i /tmp/lena.490x490.ppm -vf scale="out_range=full" -pix_fmt yuv420p /tmp/lena.full.y4m
$ xxd /tmp/lena.full.y4m |head
00000000: 5955 5634 4d50 4547 3220 5734 3930 2048  YUV4MPEG2 W490 H
00000010: 3439 3020 4632 353a 3120 4970 2041 303a  490 F25:1 Ip A0:
00000020: 3020 4334 3230 6a70 6567 2058 5953 4353  0 C420jpeg XYSCS
00000030: 533d 3432 304a 5045 4720 5843 4f4c 4f52  S=420JPEG XCOLOR
00000040: 5241 4e47 453d 4655 4c4c 0a46 5241 4d45  RANGE=FULL.FRAME
00000050: 0a72 7271 7070 706f 6f6e 6d6d 6c6d 6d6d  .rrqpppoonmmlmmm
00000060: 6c6e 6e6d 6d6e 6e6e 6d6c 6d6d 6d6d 6d6d  lnnmmnnnmlmmmmmm
00000070: 6d6e 6d6b 6c6d 6e6e 6d6c 6d6d 6e6e 6f6f  mnmklmnnmlmmnnoo
00000080: 6f6f 6e6e 6e6e 6f70 7172 7375 7676 7370  oonnnnopqrsuvvsp
00000090: 6d69 6662 5e59 534d 4845 3d35 302e 2d2c  mifb^YSMHE=50.-,
```

```
$ ffmpeg -y -i /tmp/lena.490x490.ppm -vf scale="out_range=limited" -pix_fmt yuv420p /tmp/lena.limited.y4m
$ xxd /tmp/lena.limited.y4m | head
00000000: 5955 5634 4d50 4547 3220 5734 3930 2048  YUV4MPEG2 W490 H
00000010: 3439 3020 4632 353a 3120 4970 2041 303a  490 F25:1 Ip A0:
00000020: 3020 4334 3230 6a70 6567 2058 5953 4353  0 C420jpeg XYSCS
00000030: 533d 3432 304a 5045 4720 5843 4f4c 4f52  S=420JPEG XCOLOR
00000040: 5241 4e47 453d 4c49 4d49 5445 440a 4652  RANGE=LIMITED.FR
00000050: 414d 450a 7272 7170 7070 6f6f 6e6e 6e6d  AME.rrqpppoonnnm
00000060: 6e6e 6e6d 6f6e 6e6e 6e6e 6e6e 6d6e 6e6e  nnnmonnnnnnnmnnn
00000070: 6e6e 6e6e 6f6e 6c6d 6e6f 6e6e 6d6e 6e6f  nnnnonlmnonnmnno
00000080: 6f6f 6f6f 6f6f 6f6f 6f6f 7071 7273 7576  oooooooooopqrsuv
00000090: 7673 706e 6a68 6461 5c57 524e 4b44 3d39  vspnjhda\WRNKD=9
```

Note that the 2x images are the same. Only difference is the range,
and the precision issues related to range conversion.

(2) Let's calculate the VMAF score:
```
$ ./ffmpeg -filter_threads 1 -filter_complex_threads 1 -i /tmp/lena.full.y4m -i /tmp/lena.limited.y4m -lavfi libvmaf="model=path=/usr/share/model/vmaf_v0.6.1neg.json" -report -f null -
...
[Parsed_libvmaf_0 @ 0x3cc9b40] VMAF score: 85.530109
```

As we are comparing an image with itself, we expect the score to
be close to 100. Issue here is that the VMAF filter just uses the
pixel values, ignoring the color ranges.

Proposed solution is to add a warning.
```
$ ./ffmpeg -filter_threads 1 -filter_complex_threads 1 -i /tmp/lena.full.y4m -i /tmp/lena.limited.y4m -lavfi libvmaf="model=path=/us
r/share/model/vmaf_v0.6.1neg.json" -report -f null -
...
[Parsed_libvmaf_0 @ 0x3cc9b40] distorted and reference frames use different color ranges (pc != tv)
...
[Parsed_libvmaf_0 @ 0x3cc9b40] VMAF score: 85.530109
```

Tested:

Ran fate.
```
$ make fate -j
...
TEST    seek-lavf-ppmpipe
TEST    seek-lavf-pgmpipe
TEST    seek-lavf-mxf_opatom
```
2023-09-23 15:55:50 +01:00
Chema Gonzalez a53545a374 lavfi/vf_ssim: add warning when color ranges differ
The SSIM filter uses the pixel values without considering
the color ranges. This is incorrect. Patch adds a warning
so at least the user knows it.

Let's see an example.

(1) Let's get FR and LR versions of the same image.

```
$ ffmpeg -y -i /tmp/lena.490x490.ppm -vf scale="out_range=full" -pix_fmt yuv420p /tmp/lena.full.y4m
$ xxd /tmp/lena.full.y4m |head
00000000: 5955 5634 4d50 4547 3220 5734 3930 2048  YUV4MPEG2 W490 H
00000010: 3439 3020 4632 353a 3120 4970 2041 303a  490 F25:1 Ip A0:
00000020: 3020 4334 3230 6a70 6567 2058 5953 4353  0 C420jpeg XYSCS
00000030: 533d 3432 304a 5045 4720 5843 4f4c 4f52  S=420JPEG XCOLOR
00000040: 5241 4e47 453d 4655 4c4c 0a46 5241 4d45  RANGE=FULL.FRAME
00000050: 0a72 7271 7070 706f 6f6e 6d6d 6c6d 6d6d  .rrqpppoonmmlmmm
00000060: 6c6e 6e6d 6d6e 6e6e 6d6c 6d6d 6d6d 6d6d  lnnmmnnnmlmmmmmm
00000070: 6d6e 6d6b 6c6d 6e6e 6d6c 6d6d 6e6e 6f6f  mnmklmnnmlmmnnoo
00000080: 6f6f 6e6e 6e6e 6f70 7172 7375 7676 7370  oonnnnopqrsuvvsp
00000090: 6d69 6662 5e59 534d 4845 3d35 302e 2d2c  mifb^YSMHE=50.-,
```

```
$ ffmpeg -y -i /tmp/lena.490x490.ppm -vf scale="out_range=limited" -pix_fmt yuv420p /tmp/lena.limited.y4m
$ xxd /tmp/lena.limited.y4m | head
00000000: 5955 5634 4d50 4547 3220 5734 3930 2048  YUV4MPEG2 W490 H
00000010: 3439 3020 4632 353a 3120 4970 2041 303a  490 F25:1 Ip A0:
00000020: 3020 4334 3230 6a70 6567 2058 5953 4353  0 C420jpeg XYSCS
00000030: 533d 3432 304a 5045 4720 5843 4f4c 4f52  S=420JPEG XCOLOR
00000040: 5241 4e47 453d 4c49 4d49 5445 440a 4652  RANGE=LIMITED.FR
00000050: 414d 450a 7272 7170 7070 6f6f 6e6e 6e6d  AME.rrqpppoonnnm
00000060: 6e6e 6e6d 6f6e 6e6e 6e6e 6e6e 6d6e 6e6e  nnnmonnnnnnnmnnn
00000070: 6e6e 6e6e 6f6e 6c6d 6e6f 6e6e 6d6e 6e6f  nnnnonlmnonnmnno
00000080: 6f6f 6f6f 6f6f 6f6f 6f6f 7071 7273 7576  oooooooooopqrsuv
00000090: 7673 706e 6a68 6461 5c57 524e 4b44 3d39  vspnjhda\WRNKD=9
```

Note that the 2x images are the same. Only difference is the range,
and the precision issues related to range conversion.

(2) Let's calculate the SSIM score:
```
$ ./ffmpeg -filter_threads 1 -filter_complex_threads 1 -i /tmp/lena.full.y4m -i /tmp/lena.limited.y4m -lavfi "ssim" -f null -
...
[Parsed_ssim_0 @ 0x360ab00] SSIM Y:0.942347 (12.391801) U:0.995808 (23.776062) V:0.996104 (24.093747) All:0.960217 (14.003012)
```

As we are comparing an image with itself, we expect "Y: 1" as the
luma SSIM. Issue here is that the SSIM filter just uses the pixel
values, ignoring the color ranges.

Proposed solution is to add a warning.
```
$ ./ffmpeg -filter_threads 1 -filter_complex_threads 1 -i /tmp/foo.full.y4m -i /tmp/foo.limited.y4m -lavfi "ssim" -f null -
...
[Parsed_ssim_0 @ 0x3766280] master and reference frames use different color ranges (pc != tv)
...
[Parsed_ssim_0 @ 0x3766280] SSIM Y:0.000000 (0.000000) U:0.000000 (0.000000) V:0.000000 (0.000000) All:0.000000 (0.000000)
```

Tested:

Ran fate.
```
$ make fate -j
...
TEST    seek-lavf-ppmpipe
TEST    seek-lavf-pgmpipe
TEST    seek-lavf-mxf_opatom
```
2023-09-23 15:55:47 +01:00
Chema Gonzalez 7311fcc869 lavfi/vf_psnr: add warning when color ranges differ
The PSNR filter uses the pixel values without considering
the color ranges. This is incorrect. Patch adds a warning
so at least the user knows it.

Let's see an example:

(1) Let's get a simple black pixel/white pixel image.
```
$ echo -n -e "\x00\x00\x00\xff\xff\xff" > /tmp/foo.rgb24
```

(2) From this image, let's distill full and limited range y4m
copies.

```
$ ffmpeg -y -f rawvideo -video_size 2x1 -pix_fmt rgb24 -i /tmp/foo.rgb24 -vf scale="out_range=full" -pix_fmt yuv420p /tmp/foo.full.y4m
$ xxd /tmp/foo.full.y4m
00000000: 5955 5634 4d50 4547 3220 5732 2048 3120  YUV4MPEG2 W2 H1
00000010: 4632 353a 3120 4970 2041 303a 3020 4334  F25:1 Ip A0:0 C4
00000020: 3230 6a70 6567 2058 5953 4353 533d 3432  20jpeg XYSCSS=42
00000030: 304a 5045 4720 5843 4f4c 4f52 5241 4e47  0JPEG XCOLORRANG
00000040: 453d 4655 4c4c 0a46 5241 4d45 0a00 ff80  E=FULL.FRAME....
00000050: 80                                       .
```

and

```
$ ffmpeg -y -f rawvideo -video_size 2x1 -pix_fmt rgb24 -i /tmp/foo.rgb24 -vf scale="out_range=limited" -pix_fmt yuv420p /tmp/foo.limited.y4m
$ xxd /tmp/foo.limited.y4m
00000000: 5955 5634 4d50 4547 3220 5732 2048 3120  YUV4MPEG2 W2 H1
00000010: 4632 353a 3120 4970 2041 303a 3020 4334  F25:1 Ip A0:0 C4
00000020: 3230 6a70 6567 2058 5953 4353 533d 3432  20jpeg XYSCSS=42
00000030: 304a 5045 4720 5843 4f4c 4f52 5241 4e47  0JPEG XCOLORRANG
00000040: 453d 4c49 4d49 5445 440a 4652 414d 450a  E=LIMITED.FRAME.
00000050: 10eb 8080                                ....
```

Note that the 2x images are the same (both have 1x pixel at the
darkest black, and one at the brightest white). Only difference
is the range.

(3) Let's calculate the PSNR score:
```
$ ./ffmpeg -filter_threads 1 -filter_complex_threads 1 -i /tmp/foo.full.y4m -i /tmp/foo.limited.y4m -lavfi "psnr" -f null -
...
[Parsed_psnr_0 @ 0x2f5dac0] PSNR y:22.972065 u:inf v:inf average:25.982365 min:25.982365 max:25.982365
```

As we are comparing an image with itself, we expect "y:inf" as the
luma PSNR. Issue here is that the PSNR filter just uses the pixel
values, ignoring the color ranges.

A possible solution would be to have the filter do the conversion.

Proposed solution is to add a warning.

```
$ ./ffmpeg -filter_threads 1 -filter_complex_threads 1 -i /tmp/foo.full.y4m -i /tmp/foo.limited.y4m -lavfi "psnr" -f null -
...
[Parsed_psnr_0 @ 0x2f5dac0] master and reference frames use different color ranges (pc != tv)
...
[Parsed_psnr_0 @ 0x2f5dac0] PSNR y:22.972065 u:inf v:inf average:25.982365 min:25.982365 max:25.982365
```

Tested:

Ran fate.
```
$ make fate -j
...
TEST    seek-lavf-ppmpipe
TEST    seek-lavf-pgmpipe
TEST    seek-lavf-mxf_opatom
```
2023-09-23 15:55:44 +01:00
Paul B Mahol 1242d172e2 avfilter: use ptrdiff_t instead of int for linesize
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2023-09-22 22:56:57 +02:00
Zhao Zhili 3951c1899e avfilter/vf_smartblur: pass old context to sws_getCachedContext
Otherwise it make no sense to use sws_getCachedContext.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-09-20 23:24:55 +08:00
Paul B Mahol c5effe7d3d avfilter/x86/af_afir: add FMA3 SIMD 2023-09-17 11:11:24 +02:00
Zhao Zhili 4f4dc0a1a2 avfilter/dnn_backend_openvino: fix wild pointer on error path
When ov_model_const_input_by_name/ov_model_const_output_by_name
failed, input_port/output_port can be wild pointer.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-09-15 13:02:15 +08:00
Zhao Zhili 791b88fcb4 avfilter/dnn_backend_openvino: fix input_port/output_port leaks 2023-09-15 13:02:15 +08:00
Zhao Zhili 37123100d2 avfilter/dnn_backend_openvino: fix leak of ov_shape_t 2023-09-15 13:02:15 +08:00
Zhao Zhili d2c5c3b7ef avfilter/dnn_backend_openvino: fix leak or ov_core_t on error path 2023-09-15 13:02:15 +08:00
Zhao Zhili e0880ef8cb avfilter/dnn_backend_openvino: fix use uninitialized values
Error handling was broken since neither `ret` nor `task` has being
initialized on error path.
2023-09-15 13:02:15 +08:00
Zhao Zhili 7cb6329296 avfilter/dnn_backend_openvino: reduce indentation in free_model_ov
No functional changes except ensures model isn't null.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-09-15 13:02:15 +08:00
Zhao Zhili 5369548f2e avfilter/dnn_backend_openvino: fix multiple memleaks
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-09-15 13:02:15 +08:00
Zhao Zhili 3e24a27765 avfilter/dnn_filter_common: fix memleak
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-09-15 13:02:15 +08:00
Andreas Rheinhardt d0b03b4182 avfilter/avfilter: Don't report deprecated pkt_pos
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-14 12:32:01 +02:00
yethie aeff5bcba0 avfilter/vf_drawtext: fix text width measurement 2023-09-12 19:33:09 +02:00
Andreas Rheinhardt da784b81a6 avfilter/vf_framepack: Use dedicated pointer for access
Improves readability.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-12 09:42:43 +02:00
Andreas Rheinhardt 423b6a7e49 avutil/imgutils: Add wrapper for av_image_copy() to avoid casts
av_image_copy() accepts const uint8_t* const * as source;
lots of user have uint8_t* const * and therefore either
cast (the majority) or copy the array of pointers.

This commit changes this by adding a static inline wrapper
for av_image_copy() that casts between the two types
so that we do not need to add casts everywhere else.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-12 09:42:27 +02:00
Andreas Rheinhardt cfa47fd331 all: Use av_frame_replace() where appropriate
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-10 21:22:30 +02:00
Andreas Rheinhardt 67cc7aaa51 avfilter/buffersrc: Use av_frame_clone() where appropriate
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-10 11:19:20 +02:00
Andreas Rheinhardt 44dcc4d606 avfilter/blend_modes: Always preserve constness
These casts cast const away temporarily; they are safe, because
the pointers that are initialized point to const data. But this
is nevertheless not nice and leads to warnings when using
-Wcast-qual. blend_modes.c generates 546 (2*39*7) such warnings
which is the majority of such warnings for FFmpeg as a whole.
vf_blend.c and vf_blend_init.h also use this pattern;
they have also been changed.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 20:58:00 +02:00
Andreas Rheinhardt 29c6f4329a avfilter/vf_varblur: Don't use pointer-to-const for destination
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 20:58:00 +02:00
Andreas Rheinhardt 6378a6b3fe avfilter/vsrc_testsrc: Don't use const uint8_t* when pointee changes
The const makes no sense and is later cast away.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 20:58:00 +02:00
Andreas Rheinhardt bdccb27ba4 avfilter/vf_vif: Don't cast const away unnecessarily
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 20:58:00 +02:00
Andreas Rheinhardt fd9bafc85e avfilter/f_select: Also deprecate "pos" variable name
Forgotten in 27f8c9b27b.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 00:49:25 +02:00
Andreas Rheinhardt 41f1921f74 avfilter/af_volume: Also deprecate position enum value
Forgotten in 27f8c9b27b.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-07 00:49:25 +02:00
Andreas Rheinhardt f8503b4c33 avutil/internal: Don't auto-include emms.h
Instead include emms.h wherever it is needed.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt 30e8ab8bc4 avfilter/af_amultiply: Remove unnecessary emms_c()
The floating point dsp code does not use MMX registers
since 2718a3be1f.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt 78d4bd260f avfilter/af_headphone: Remove unnecessary emms_c()
The floating point dsp code does not use MMX registers
since 2718a3be1f.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt e2ec90cd0e avfilter/af_sofalizer: Remove unnecessary emms_c()
The floating point dsp code does not use MMX registers
since 2718a3be1f.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt 1ac7df4043 avfilter/af_volume: Remove unnecessary emms_c()
The floating point dsp code does not use MMX registers
since 2718a3be1f.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt af1bf96138 avfilter/afir_template: Remove unnecessary emms_c()
The floating point dsp code does not use MMX registers
since 2718a3be1f.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt 63bd0f4ce8 avfilter/vf_bwdif: Remove obsolete emms_c()
Obsolete since ed42a51930.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt 03a60b2b30 avfilter/vf_colorspace: Remove redundant emms_c()
It is not even clear what these emms_c() are supposed to achieve:
create_filtergraph() (where it may be called) does not call
ASM functions itself; it merely sets some function pointers.
Furthermore, there are no colorspacedsp functions using MMX
(checked by checkasm which does not use declare_new_emms()).
Finally, checking whether to issue emms_c() is overblown anyway.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt d84ee80c04 avfilter/vf_gblur: Remove unnecessary emms_c()
There is no MMX ASM code for gblur.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Andreas Rheinhardt c59b082e20 avfilter: Remove unnecessary emms_c for ff_scene_sad_get_fn
ff_scene_sad_get_fn() does not return functions that use
MMX at all.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-09-04 11:04:45 +02:00
Niklas Haas bef151d1ce vf_libplacebo: warn on extra_opts + too old libplacebo
Instead of silently ignoring this option as before.
2023-09-03 13:40:27 +02:00
Paul B Mahol a469186b8a avfilter/asrc_sinc: check return code of tx_init() 2023-09-03 09:33:26 +02:00
Lynne 5f8feddd6a
lavfi/testsrc_vulkan: fix memory leaks 2023-08-28 22:29:36 +02:00
Lynne 3ef1e50c92
lavfi/transpose_vulkan: fix memory leaks 2023-08-28 22:29:36 +02:00
Lynne d0ab2e2f98
lavfi/scale_vulkan: fix memory leaks 2023-08-28 22:29:35 +02:00
Lynne 0f2ae1ba69
lavfi/nlmeans_vulkan: fix memory leaks 2023-08-28 22:29:35 +02:00
Lynne 9944e96c61
lavfi/chromaber_vulkan: fix memory leaks 2023-08-28 22:29:34 +02:00
Lynne a4673c9dff
lavfi/bwdif_vulkan: fix memory leaks 2023-08-28 22:29:34 +02:00
Lynne b6cc53092a
lavfi/avgblur_vulkan: fix memory leaks 2023-08-28 22:29:34 +02:00
Niklas Haas 3c9dc009b6 lavfi/vf_libplacebo: add extra_opts AVDictionary
Can be used to configure libplacebo's underlying raw options, which
sometimes includes new or advanced / in-depth settings not (yet) exposed
by vf_libplacebo.
2023-08-27 13:37:03 +02:00
Niklas Haas 816983d951 lavfi/vf_libplacebo: switch to new pl_options struct
This new upstream struct simplifies params struct management by allowing
them to all be contained in a single dynamically allocated struct. This
commit switches to the new API in a backwards-compatible way.

The only nontrivial change that was required was to handle
`sigmoid_params` in a way consistent with the rest of the params
structs, instead of setting it directly to the upstream default.
2023-08-27 13:37:03 +02:00
Zhao Zhili 2387328fa2 avfilter/vf_transpose_vt: fix declaration-after-statement
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-08-26 16:31:43 +08:00
Zhao Zhili 7cca9c07ca avfilter/vf_transpose_vt: fix output frame dimension
Create a new hardware frame context when necessary.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-08-26 16:31:43 +08:00
Zhao Zhili 9b543881ef avfilter/vf_scale_vt: fix output frame dimension
The output frame dimension is incorrect because it shares hardware
frame context with input.

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
2023-08-26 16:31:43 +08:00
Wenbin Chen e79bd1f1b1 lavfi/dnn: Add OpenVINO API 2.0 support
OpenVINO API 2.0 was released in March 2022, which introduced new
features.
This commit implements current OpenVINO features with new 2.0 APIs. And
will add other features in API 2.0.
Please add installation path, which include openvino.pc, to
PKG_CONFIG_PATH mannually for new OpenVINO libs config.

Signed-off-by: Ting Fu <ting.fu@intel.com>
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-08-26 14:12:10 +08:00
Marvin Scholz 15a89a9422 lavfi/vf_xfade_vulkan: add wipes
Add the wipetl, wipetr, wipebl, wipebr effects.
2023-08-24 22:50:57 +02:00
Marvin Scholz 85c7c79a62 lavfi/vf_xfade_vulkan: add pixelize 2023-08-24 22:50:57 +02:00
Marvin Scholz 98bd8a7f5c lavfi/vf_xfade_vulkan: add dissolve 2023-08-24 22:50:57 +02:00
Marvin Scholz 8d3fd489e2 lavfi/vf_xfade_vulkan: reindent after last commit 2023-08-24 22:50:57 +02:00
Marvin Scholz 95e366fb59 lavfi/vf_xfade_vulkan: add circleopen/circleclose 2023-08-24 22:50:57 +02:00