Commit Graph

9473 Commits

Author SHA1 Message Date
Andreas Rheinhardt
1ea3650823 Replace all occurences of av_mallocz_array() by av_calloc()
They do the same.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-20 01:03:52 +02:00
Andreas Rheinhardt
3b6c25c925 avfilter/vf_subtitles, fftools/ffmpeg: Don't set sub_text_format
Unnecessary since 1f63665ca5, because
the value the option is set to coincides with the default value.

Found-by: Soft Works <softworkz@hotmail.com>
Reviewed-by: Soft Works <softworkz@hotmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-20 00:27:47 +02:00
Paul B Mahol
0b150e4f61 avfilter/avf_avectorscope: fix zoom 0 mode with nonlinear scale 2021-09-19 13:49:55 +02:00
Paul B Mahol
7747ab7ded avfilter/avf_avectorscope: add support for commands 2021-09-19 13:49:55 +02:00
Paul B Mahol
99d71c28d4 avfilter/avf_avectorscope: add slice threading for fade function 2021-09-19 13:14:11 +02:00
Paul B Mahol
4f7f046683 avfilter/avf_avectorscope: add ultra fast path when slow fading is disabled 2021-09-19 12:34:45 +02:00
Andreas Rheinhardt
d8ca8bec26 avfilter/vf_hflip: Don't call av_pix_fmt_desc_get() twice
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 05:18:51 +02:00
Andreas Rheinhardt
73a59ed1cb avfilter/vf_zscale: Use init instead of init_dict
The AVDictionary was unused.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:48:58 +02:00
Andreas Rheinhardt
e424d1f557 avfilter/vf_spp: Add dummy element to array to avoid shift
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:47:17 +02:00
Andreas Rheinhardt
a85d2de45f avfilter/vf_spp: Use preinit instead of init_dict
By using preinit, the AVDCT already exists directly after
allocating the filter, so that the filter's AVClass's child_next
becomes usable for setting options with the AV_OPT_SEARCH_CHILDREN
search flag. This means that it is no longer necessary to use
the init_dict callback for this filter.

Furthermore, the earlier code did not abide by the documentation
of the init_dict callback at all: Instead of only returning the
options that have not been recognized it always returned all options
on any av_opt_set() error and errored out in this case, even if it
is just an unrecognized option. This behaviour has been inherited by
avfilter_init_dict(), contradicting its documentation. This is also
fixed in this commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:45:34 +02:00
Andreas Rheinhardt
0c34cf899d avfilter/af_aresample: Use preinit instead of init_dict
By using preinit, the SwrContext already exists directly after
allocating the filter, so that the filter's AVClass's child_next
becomes usable for setting options with the AV_OPT_SEARCH_CHILDREN
search flag. This means that it is no longer necessary to use
the init_dict callback for this filter.

Furthermore, the earlier code did not abide by the documentation
of the init_dict callback at all: Instead of only returning the
options that have not been recognized it always returned all options
on any av_opt_set() error and errored out in this case; yet if
the error was just caused by an unrecognized option, it should not
error out at all and instead return said option.

This behaviour has been inherited by avfilter_init_dict(),
contradicting its documentation. This is also fixed by this commit.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:44:27 +02:00
Andreas Rheinhardt
f748ca801e avfilter/vf_readeia608: Use av_dict_set_int()
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:39:25 +02:00
Andreas Rheinhardt
403d8c0188 avfilter/vf_scale: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:38:02 +02:00
Andreas Rheinhardt
4906a45ada avfilter/vsrc_testsrc: Deduplicate AVClasses
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:37:22 +02:00
Andreas Rheinhardt
f8047180a8 avfilter/vf_weave: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:36:03 +02:00
Andreas Rheinhardt
57bc79e76a avfilter/vf_stack: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:34:53 +02:00
Andreas Rheinhardt
56d3e840f6 avfilter/vf_premultiply: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:32:58 +02:00
Andreas Rheinhardt
443706d937 avfilter/vf_neighbor: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:32:05 +02:00
Andreas Rheinhardt
31adb960b7 avfilter/vf_maskedminmax: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:31:13 +02:00
Andreas Rheinhardt
412d645ba1 avfilter/vf_lut: Remove empty init function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:31:03 +02:00
Andreas Rheinhardt
b5be13255f avfilter/vf_lut: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:30:38 +02:00
Andreas Rheinhardt
57f6c23f29 avfilter/vf_format: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:28:03 +02:00
Andreas Rheinhardt
bb1ef872a3 avfilter/vf_blend: Don't redefine options name
Use AVFILTER_DEFINE_CLASS_EXT instead.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:27:56 +02:00
Andreas Rheinhardt
39589d25e3 avfilter/src_movie: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:26:16 +02:00
Andreas Rheinhardt
a9f1b3db60 avfilter/split: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:26:07 +02:00
Andreas Rheinhardt
c8180c1310 avfilter/f_zmq: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:26:00 +02:00
Andreas Rheinhardt
a10a300606 avfilter/f_streamselect: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:24:55 +02:00
Andreas Rheinhardt
cf724beade avfilter/f_sendcmd: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:24:07 +02:00
Andreas Rheinhardt
fcea114b18 avfilter/f_realtime: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:24:00 +02:00
Andreas Rheinhardt
8435cf2307 avfilter/f_perms: Deduplicate AVClasses
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:09:06 +02:00
Andreas Rheinhardt
0eb1f45dd3 avfilter/f_graphmonitor: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:08:18 +02:00
Andreas Rheinhardt
9ceec2869a avfilter/f_drawgraph: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:08:10 +02:00
Andreas Rheinhardt
601e3da1d5 avfilter/f_cue: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:07:48 +02:00
Andreas Rheinhardt
974e8262c9 avfilter/af_sidechaincompress: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:05:55 +02:00
Andreas Rheinhardt
4ab80ac17e avfilter/af_biquads: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:04:12 +02:00
Andreas Rheinhardt
3000ac48d5 avfilter/af_asupercut: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:04:00 +02:00
Andreas Rheinhardt
8c4a7a4c09 avfilter/vf_convolution: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:01:37 +02:00
Andreas Rheinhardt
3208911055 avfilter/vf_convolution: Fix standalone build of kirsch, scharr filters
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 04:00:05 +02:00
Andreas Rheinhardt
bc86e1b602 avfilter/af_agate: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-19 03:58:00 +02:00
Andreas Rheinhardt
6556146aa0 avfilter/vf_zscale: Don't make assumptions about zimg's range enums
zimg's color range enum values are off-by-one compared to ours;
therefore the code just adds one when converting from theirs to ours.
Yet this is not how one should deal with enums; use a switch instead.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-18 23:16:44 +02:00
Wu Jianhua
7bbad32d5a libavfilter/x86/vf_gblur: correct the order of loop step
The problem was caused by if the width of the processed block
minus 1 is a multiple of the aligned number the instruction
jle .bscale_scalar would skip the Optimized Loop Step, which
will lead to an incorrect sampling when specifying steps more
than 1. Move the Optimized Loop Step after .bscale_scalar to
ensure the loop step is enabled.

Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-09-18 12:38:01 +02:00
Wu Jianhua
fcf10c925d libavfilter/x86/vf_gblur: fixed the fate-test failed on MacOS
Signed-off-by: Wu Jianhua <jianhua.wu@intel.com>
2021-09-18 12:37:56 +02:00
Pavel Koshevoy
4fc0b75973 avfilter/vf_zscale: fix output color_range discrepancy
This filter chain was supposed to convert from narrow range
to full range yuv444p, but didn't:

buffer=width=1280:height=720:pix_fmt=yuv444p:frame_rate=25/1:\
time_base=1/25:sar=1/1,zscale=min=709:rin=limited:pin=709:\
tin=709:t=linear,format=gbrpf32le,zscale=tin=linear:p=709:m=709:\
r=full:t=709,format=pix_fmts=yuv444p,buffersink
2021-09-17 13:35:59 -06:00
Andreas Rheinhardt
f58abfbedc avfilter/vf_coreimage: Simplify query_formats
Using ff_set_common_formats_from_list() avoids using different functions
depending upon how many inputs the filter has.

Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-17 16:29:08 +02:00
Andreas Rheinhardt
10ad3cd798 avfilter/avfilter: Actually error out on init error
Currently an error from init could be overwritten by successfully
setting the enable expression.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-17 16:17:26 +02:00
Wenbin Chen
a822e70bec libavfilter/vf_vpp_qsv: fix uninitialized variable problem
This two variables may be used below with uninitialized value.
Now fix them.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Soft Works <softworkz@hotmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-09-15 09:24:08 -03:00
Timo Rothenpieler
06de593303 avfilter/frei0r: use win32dlfcn wrapper 2021-09-15 12:37:02 +02:00
Andreas Rheinhardt
441b292592 avfilter/internal: Add AVFILTER_DEFINE_CLASS_EXT
This macro will allow to share options between AVClasses without
having to redefine the option name (as is currently done) and will
also allow to share the AVClasses itself (which is possible now
that AVClass.child_class_next is gone).

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-13 16:08:29 +02:00
Andreas Rheinhardt
142f41a060 avfilter/vf_maskedminmax: Simplify init
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-13 16:08:12 +02:00
Andreas Rheinhardt
dc2279a4f2 avfilter/avfilter: Remove unused count
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-09-13 16:05:15 +02:00