Commit Graph

9255 Commits

Author SHA1 Message Date
Anton Khirnov 85ba17f36d Bump major versions of all libraries.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-27 11:48:05 -03:00
James Almer 90262f3fb4 avfilter/buffersrc: postpone removal of sws_param
It was depreacted less than two years ago

Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 11:48:04 -03:00
James Almer 0bf3a7361d avutil: remove deprecated AVClass.child_class_next
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 11:48:04 -03:00
Andreas Rheinhardt 420cedd497 libavresample: Remove deprecated library
Deprecated in c29038f304.
The resample filter based upon this library has been removed as well.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:13 -03:00
Andreas Rheinhardt ef6a9e5e31 avutil/buffer: Switch AVBuffer API to size_t
Announced in 14040a1d91.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:13 -03:00
Andreas Rheinhardt 985c0dac67 avutil/pixdesc: Remove deprecated AV_PIX_FMT_FLAG_PSEUDOPAL
Deprecated in d6fc031caf.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:13 -03:00
Andreas Rheinhardt 3b56fa85e8 avutil/frame: Remove deprecated AVFrame.error
Deprecated in 1aa24df74c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:12 -03:00
Andreas Rheinhardt b8accd1175 avutil/frame: Remove AVFrame QP table API
Originally deprecated in 1296b1f6c0631ab79464e22d48a6a1548450b943;
scheduled again for removal in a991526832.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:12 -03:00
Andreas Rheinhardt 0c820b1525 avfilter/Makefile: Don't compile transform.c unconditionally
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:11 -03:00
Andreas Rheinhardt 7c4287b276 avfilter/transform: Stop exporting internal functions
avfilter_transform, avfilter_(add|sub|mult)_matrix are not part of the
public API (transform.h is not a public header), yet they are currently
exported because of their name. This commit changes this:
avfilter_transform is renamed to ff_affine_transform; the other
functions are just removed as they have never been used at all.

Found-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:11 -03:00
Andreas Rheinhardt 930391e598 avfilter/formats: Remove avfilter_make_format64_list()
The API it is part of has been made private long ago (see commit
b74a1da49d).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:11 -03:00
Andreas Rheinhardt 4de2b035a7 avfilter/avfilter: Remove deprecated avfilter_link_set_closed()
Deprecated in 39a09e995d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:11 -03:00
Andreas Rheinhardt ec82ff89b6 avfilter: Remove avfilter_next/avfilter_register API
Deprecated in 8f1382f80e.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:11 -03:00
Andreas Rheinhardt 3a370868dc avfilter: Remove deprecated avfilter_link_get_channels
Deprecated in b2c42fc6dc.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:11 -03:00
Andreas Rheinhardt 339af976b6 avfilter: Remove deprecated resample_lavr_opts
Deprecated in 3796fb2692.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:11 -03:00
Andreas Rheinhardt 1ec87f50f4 avfilter/avfilter: Remove compatibility code for old filter options
Added in ad7d972e08dddb1788ac6a434d1be314febcb09d; the old syntax has
been deprecated in b439c992c2.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:10 -03:00
Andreas Rheinhardt 56450a0ee4 avformat: Constify the API wrt AV(In|Out)putFormat
Also constify AVProbeData.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:08 -03:00
Shubhanshu Saxena 4b79416dc4 lavfi/dnn/queue.h: Add Documentation to Queue
Documentation for Queue

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-04-27 10:01:56 +08:00
Shubhanshu Saxena 5b8e828dee lavfi/dnn/safe_queue.h: Add Documentation to SafeQueue
Documentation for SafeQueue

Signed-off-by: Shubhanshu Saxena <shubhanshu.e01@gmail.com>
2021-04-27 10:01:20 +08:00
James Almer bc27269694 avfilter/af_adelay: make per channel delay argument an int64_t
Should fix ticket #9196

Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-25 09:22:09 -03:00
shubhanshu02 d98884be41 lavfi/dnn_backend_openvino.c: Spelling Correction in OpenVino Backend
Correct Spelling of the word `descibe` to `describe`
in init_model_ov

Signed-off-by: shubhanshu02 <shubhanshu.e01@gmail.com>
2021-04-25 09:02:54 +08:00
Andreas Rheinhardt f3c197b129 Include attributes.h directly
Some files currently rely on libavutil/cpu.h to include it for them;
yet said file won't use include it any more after the currently
deprecated functions are removed, so include attributes.h directly.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-19 14:34:10 +02:00
Marton Balint 46f3ae8f67 avfilter/af_mcompand: check allocation results
Fixes the only remaining part of ticket #8931.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-04-18 17:25:51 +02:00
Guo, Yejun aa9ffdaa1e lavfi: add filter dnn_detect for object detection
Below are the example steps to do object detection:

1. download and install l_openvino_toolkit_p_2021.1.110.tgz from
https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit/download.html
  or, we can get source code (tag 2021.1), build and install.
2. export LD_LIBRARY_PATH with openvino settings, for example:
.../deployment_tools/inference_engine/lib/intel64/:.../deployment_tools/inference_engine/external/tbb/lib/
3. rebuild ffmpeg from source code with configure option:
--enable-libopenvino
--extra-cflags='-I.../deployment_tools/inference_engine/include/'
--extra-ldflags='-L.../deployment_tools/inference_engine/lib/intel64'
4. download model files and test image
wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/face-detection-adas-0001.bin
wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/face-detection-adas-0001.xml
wget
https://github.com/guoyejun/ffmpeg_dnn/raw/main/models/openvino/2021.1/face-detection-adas-0001.label
wget https://github.com/guoyejun/ffmpeg_dnn/raw/main/images/cici.jpg
5. run ffmpeg with:
./ffmpeg -i cici.jpg -vf dnn_detect=dnn_backend=openvino:model=face-detection-adas-0001.xml:input=data:output=detection_out:confidence=0.6:labels=face-detection-adas-0001.label,showinfo -f null -

We'll see the detect result as below:
[Parsed_showinfo_1 @ 0x560c21ecbe40]   side data - detection bounding boxes:
[Parsed_showinfo_1 @ 0x560c21ecbe40] source: face-detection-adas-0001.xml
[Parsed_showinfo_1 @ 0x560c21ecbe40] index: 0,  region: (1005, 813) -> (1086, 905), label: face, confidence: 10000/10000.
[Parsed_showinfo_1 @ 0x560c21ecbe40] index: 1,  region: (888, 839) -> (967, 926), label: face, confidence: 6917/10000.

There are two faces detected with confidence 100% and 69.17%.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-04-17 17:27:02 +08:00
Guo, Yejun e942b4bbaa lavfi: show side data of detection bounding boxes 2021-04-17 17:27:02 +08:00
Fei Wang 89ffcd1bbe lavfi/qsvvpp: support async depth
Async depth will allow qsv filter cache few frames, and avoid force
switch and end filter task frame by frame. This change will improve
performance for some multi-task case, for example 1:N transcode(
decode + vpp + encode) with all QSV plugins.

Performance data test on my Coffee Lake Desktop(i7-8700K) by using
the following 1:8 transcode test case improvement:
1. Fps improved from 55 to 130.
2. Render/Video usage improved from ~61%/~38% to ~100%/~70%.(Data get
from intel_gpu_top)

test CMD:
ffmpeg -v verbose -init_hw_device qsv=hw:/dev/dri/renderD128 -filter_hw_device                 \
 hw -hwaccel qsv -hwaccel_output_format qsv -c:v h264_qsv -i 1920x1080.264                     \
-vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \
-vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \
-vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \
-vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \
-vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \
-vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null - \
-vf 'vpp_qsv=w=1280:h=720:async_depth=4' -c:v h264_qsv -r:v 30 -preset 7 -g 33 -refs 2 -bf 3 -q 24 -f null -

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
Reviewed-by: Linjie Fu <linjie.justin.fu@gmail.com>
Signed-off-by: Zhong Li <zhongli_dev@126.com>
2021-04-11 23:18:20 +08:00
Timo Rothenpieler ef16dcc6a9 avfilter/overlay_cuda: check av_buffer_ref result 2021-04-11 10:22:01 +02:00
Paul B Mahol e917cd9828 avfilter/vf_v360: unbreak fov_from_dfov() for (d)fisheye when width != height
Based on patch by Daniel Playfair Cal.
2021-04-11 10:12:11 +02:00
Timo Rothenpieler 5d52c4cbba avfilter/overlay_cuda: hold explicit reference to hw_device_ctx 2021-04-11 09:21:21 +02:00
Paul B Mahol 1050f94c22 avfilter/vf_v360: allow user to control fov for equirectagular format
It may be useful to use different values from typical 360/180 deg.
2021-04-11 00:56:44 +02:00
Guo, Yejun 13bf797ced lavfi/dnn: add post process for detection 2021-04-08 09:23:02 +08:00
Guo, Yejun 59021d79a2 lavfi/dnn: refine code for frame pre/proc processing 2021-04-08 09:23:02 +08:00
Guo, Yejun d2ccbc966b lavfi/dnn_backend_openvino.c: only allow DFT_PROCESS_FRAME to get output dim 2021-04-08 09:23:02 +08:00
Andreas Rheinhardt 0617e578a3 avfilter/vf_find_rect: Use correct format specifier
Fixes the following GCC warning:
warning: format ‘%lld’ expects argument of type ‘long long int’,
but argument 4 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-04-04 12:02:45 +02:00
Gyan Doshi 18dcbb0d6c avfilter/find_rect: write score to metadata 2021-04-04 10:47:13 +05:30
Gyan Doshi abdafca9ad avfilter/find_rect: add option to discard non-matching frames
Default is disabled.
2021-04-04 10:47:09 +05:30
Gyan Doshi aff23c3474 avfilter/find_rect: improve logging
Log now indicates timestamps of frames where a match is made.
Loglevel is changed to INFO since the user specifically wants this info.
2021-04-04 10:46:57 +05:30
Andreas Rheinhardt 3c151e7999 avfilter/vf_codecview: Fix undefined left shifts of negative numbers
Affected the filter-codecview-mvs FATE-test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-04-01 14:49:41 +02:00
Andreas Rheinhardt 9eadd616b7 avfilter/af_hdcd: Fix undefined shifts
Affected the filter-hdcd-* FATE tests.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-04-01 14:06:02 +02:00
Michael Niedermayer 1cf96ce269 avfilter/vf_scale: Fix adding 0 to NULL (which is UB) in scale_slice()
Found-by: Jeremy Leconte <jleconte@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-03-31 23:09:35 +02:00
Andreas Rheinhardt c81b8e04aa Avoid intermediate bitcount for number of bytes in PutBitContext
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-30 12:36:32 +02:00
Andreas Rheinhardt 797c2ecc8f avfilter/vf_paletteuse: Fix left shift outside of range of int
by keeping the variable uint32_t which in this situation is the natural
type anyway. This affected the FATE-test filter-paletteuse-sierra2_4a.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-28 18:47:15 +02:00
Andreas Rheinhardt 55b46902c1 avfilter/asrc_sine: Fix invalid left shift of negative number
by using a multiplication instead. The multiplication can never overflow
an int because the sin-factor is only an int16_t.

Affected the FATE-tests filter-concat and filter-concat-vfr.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-28 18:45:20 +02:00
Ting Fu 637bdefdeb lavfi/dnn_backend_tensorflow.c: fix mem leak in execute_model_tf
Signed-off-by: Ting Fu <ting.fu@intel.com>
2021-03-25 13:10:32 +08:00
Ting Fu b08b5f07b6 lavfi/dnn_backend_tensorflow.c: fix mem leak in load_native_model
Signed-off-by: Ting Fu <ting.fu@intel.com>
2021-03-25 13:10:32 +08:00
Ting Fu 3499ec84cc lavfi/dnn_backend_tensorflow.c: fix mem leak in load_tf_model
Signed-off-by: Ting Fu <ting.fu@intel.com>
2021-03-25 13:10:32 +08:00
nyanmisaka a4e518c321 avfilter/overlay_cuda: fix framesync with embedded PGS subtitle
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2021-03-25 04:31:42 +01:00
nyanmisaka 0c5098d1a2 avfilter/hwupload_cuda: add YUVA420P format support
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2021-03-25 04:30:50 +01:00
Wenlong Ding b460595dd7 lavfi/dnn/dnn_backend_native_layer_mathunary: add exp support
Signed-off-by: Wenlong Ding <wenlong.ding@intel.com>
2021-03-24 13:53:50 +08:00
Michael Niedermayer c361fa9e21 Bump minor versions after release branch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-03-20 01:02:11 +01:00
Michael Niedermayer c67d2a2875 Bump Versions before release/4.4 branch
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2021-03-20 01:01:12 +01:00
Dominic Mayers 626e0dd060 avfilter/vf_ocr: add white space to whitelist
Fixes #9151. The current version of libavfilter/vf_ocr.c does not have white
space in the default whitelist. But it is recommanded to include white
space. See https://github.com/tesseract-ocr/tesseract/issues/2923

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-03-19 23:00:04 +01:00
Guo, Yejun da12d600ea lavfi/dnn_backend_openvino.c: fix mem leak for TaskItem upon error 2021-03-18 09:30:09 +08:00
Guo, Yejun df59ae8bb2 lavfi/dnn_backend_openvino.c: fix mem leak for RequestItem upon error 2021-03-18 09:30:09 +08:00
Guo, Yejun 41f4af16fc lavfi/dnn_backend_openvino.c: fix typo upon error 2021-03-18 09:30:09 +08:00
Guo, Yejun bd3ca0859e lavfi/dnn_backend_openvino.c: fix mem leak for input_blob and output_blob upon error 2021-03-18 09:30:09 +08:00
Guo, Yejun 3ce2ee7f54 lavfi/dnn_backend_openvino.c: fix mem leak for AVFrame upon error 2021-03-18 09:30:09 +08:00
James Almer b76ff693f6 avfilter/vf_uspp: use av_packet_alloc() to allocate packets
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:36 -03:00
James Almer 79c6e040f8 avfilter/vf_mcdeint: use av_packet_alloc() to allocate packets
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-17 15:19:36 -03:00
Paul B Mahol 2aece147d5 avfilter/vf_xfade: drop unused frames from inactive inputs 2021-03-14 13:15:21 +01:00
Andreas Rheinhardt 6e2db67801 avfilter/vf_uspp: Fix leak of packet side data
The uspp filter uses a special option ("no_bitstream") of
the Snow encoder to suppress it from generating output.
The filter therefore did not unref the packet after usage,
believing it to be blank. But this is wrong, as the Snow encoder
attaches quality stats side data to the packet.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-12 19:05:37 +01:00
Andreas Rheinhardt 0858853241 avfilter/vf_uspp: Fix leak of qp-table on error
Fixes Coverity issue #1473500.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-12 19:05:11 +01:00
Andreas Rheinhardt 2f056def65 dnn/dnn_backend_native_layer_mathbinary: Fix leak upon error
Fixes Coverity issue #1473568.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 13:21:48 +01:00
Andreas Rheinhardt 723ebf029a dnn/dnn_backend_native_layer_conv2d: Don't pretend convolution can fail
It can't; these are just remnants of commit
3c7cad69f2 which let the worker threads
do the reallocation.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 13:20:00 +01:00
Andreas Rheinhardt 9da96d8b69 dnn/dnn_backend_native_layer_conv2d: Check thread creation for errors
Fixes Coverity issue #1473533.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 13:13:00 +01:00
Andreas Rheinhardt c2fef8f16c dnn/dnn_backend_native_layer_conv2d: Check allocation
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 13:10:46 +01:00
Andreas Rheinhardt d14ae74064 dnn/dnn_backend_native_layer_conv2d: Avoid separate, unchecked allocations
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 13:09:48 +01:00
Andreas Rheinhardt 508d7005a0 dnn/dnn_backend_native_layer_conv2d: Fix memleak on error
If an error happens when preparing the output data buffer, an already
allocated array would leak. Fix this by postponing its allocation.

Fixes Coverity issue #1473531.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 13:06:32 +01:00
Andreas Rheinhardt 16e36d5c0c dnn/dnn_backend_native_layer_conv2d: Avoid allocation when single-threaded
Also fixes a memleak in single-threaded mode when an error happens
in preparing the output data buffer; and also removes an unchecked
allocation.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 12:47:11 +01:00
Andreas Rheinhardt 639b3bbbc7 dnn/dnn_backend_native_layer_conv2d: Join two arrays, avoid allocation
Fixes Coverity issue #1473507.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 12:45:45 +01:00
Andreas Rheinhardt d915c1dd7a dnn/dnn_backend_native_layer_conv2d: Fix memleak on realloc failure
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 12:44:09 +01:00
Andreas Rheinhardt f51f13902b dnn/dnn_backend_native: Fix typo in log message
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 12:43:08 +01:00
Andreas Rheinhardt 1e47ef600d dnn/dnn_backend_native: Don't use asserts for checks
asserts should not be used instead of ordinary input checks.
Yet the native DNN backend did it: get_input_native() asserted that
the first dimension was one, despite this value coming directly from
the input file without having been sanitized.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 12:39:01 +01:00
Andreas Rheinhardt 0e078c6cfa dnn/dnn_backend_native: Fix leak in case parsing options fails
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 12:34:17 +01:00
Andreas Rheinhardt 2e2ed39dac dnn/dnn_backend_native: Avoid allocation for checking file magic
Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-11 12:32:25 +01:00
James Almer 5d9af1670e avfilter: use the buffer_size_t typedef where required
Signed-off-by: James Almer <jamrial@gmail.com>
2021-03-10 20:26:36 -03:00
Paul B Mahol 3e3c408e3f avfilter/af_dynaudnorm: make better check for available samples
Also report more correct EOF timestamp.
2021-03-10 23:52:07 +01:00
Andreas Rheinhardt 2ae73b74bb avfilter/vf_nnedi: Fix use of uninitialized value
Fixes Coverity issue #1473546.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-10 21:00:21 +01:00
Andreas Rheinhardt 59c0301be9 avfilter/buffersink: Postpone removal of av_[a]buffersink_params_alloc
They have been deprecated in 61097535cd,
yet this was less than two years ago. Removing them will therefore have
to wait.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-07 15:19:10 +01:00
Andreas Rheinhardt fec3c730e6 avfilter/avfilter: Remove avfilter_link_set_closed() on bump
Deprecated in 39a09e995d.

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-07 15:18:35 +01:00
Paul B Mahol 17127f81c5 avfilter: add msad video filter 2021-03-06 12:42:16 +01:00
Paul B Mahol 4a69cd4e4e avfilter: add identity video filter 2021-03-06 12:41:30 +01:00
Andreas Rheinhardt 0e645b98c6 Remove double ';'
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-03-01 06:10:44 +01:00
Marton Balint 84094f017e avfilter/avf_showcqt: use av_gettime_relative() instead of av_gettime()
av_gettime_relative() is using the monotonic clock therefore more suitable for
relative time calculations.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-02-27 21:30:41 +01:00
Andreas Rheinhardt 2869d71493 avfilter/lavfutils.h: Don't include avformat.h
Only lavfutils.c needs avformat.h, not lavfutils.h.

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-25 22:03:32 +01:00
Paul B Mahol 95af3b6625 avfilter/vf_vif: add support for more formats 2021-02-25 16:38:27 +01:00
Paul B Mahol 550b7a9929 avfilter/vf_vif: simplify case comparing same inputs 2021-02-25 16:38:27 +01:00
Guo, Yejun ae4f6379d6 avfilter/vf_vif.c: fix build warning for [-Wmain]
src/libavfilter/vf_vif.c: In function ‘process_frame’:
src/libavfilter/vf_vif.c:542:20: warning: ‘main’ is usually a function [-Wmain]
     AVFrame *out, *main = NULL, *ref = NULL;
                    ^~~~

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-02-25 11:43:56 +01:00
Guo, Yejun ac6dd87cd1 avfilter/vf_ssim.c: fix build warning for [-Wmain]
The build warning message:
src/libavfilter/vf_ssim.c: In function ‘ssim_plane_16bit’:
src/libavfilter/vf_ssim.c:246:24: warning: ‘main’ is usually a function [-Wmain]
         const uint8_t *main = td->main_data[c];
                        ^~~~
src/libavfilter/vf_ssim.c: In function ‘ssim_plane’:
src/libavfilter/vf_ssim.c:289:24: warning: ‘main’ is usually a function [-Wmain]
         const uint8_t *main = td->main_data[c];
                        ^~~~

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-02-25 11:43:56 +01:00
Paul B Mahol a2f9270f1c avfilter/af_afade: remove uneeded '.' from durations in options 2021-02-21 13:42:40 +01:00
Paul B Mahol c2ca1eb2a7 avfilter/vf_ssim: add slice threading 2021-02-19 21:15:08 +01:00
Paul B Mahol 680ba23bc2 avfilter/vf_psnr: add support for slice threading 2021-02-19 21:15:08 +01:00
Andreas Rheinhardt 14dc28e969 avfilter/vf_vif: Remove superfluous ';'
Inside a function a superfluous ';' is just a null-statement; yet
outside it is invalid, even though compilers happen to accept them.
They (at least GCC and Clang) only warn about this when on -pedantic.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-19 08:34:57 +01:00
Ting Fu b0d75a8de9 dnn_backend_openvino.c: allow out_frame as NULL for analytic case 2021-02-18 09:59:37 +08:00
Guo, Yejun 2da3a5c10f dnn: add color conversion for analytic case
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-02-18 09:59:37 +08:00
Guo, Yejun 0884063f88 dnn_interface.h: add enum DNNColorOrder
the data type and order together decide the color format, we could
not use AVPixelFormat directly because not all the possible formats
are covered by it.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-02-18 09:59:37 +08:00
Guo, Yejun 76fc6879e2 dnn: add function type for model
So the backend knows the usage of model is for frame processing,
detect, classify, etc. Each function type has different behavior
in backend when handling the input/output data of the model.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-02-18 09:59:37 +08:00
Guo, Yejun bdce636100 dnn: extract common functions used by different filters
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-02-18 09:59:37 +08:00
Guo, Yejun 995c33a046 dnn_backend_openvino.c: fix multi-thread issue for async execution
once we mark done for the task in function infer_completion_callback,
the task is possible to be release in function ff_dnn_get_async_result_ov
in another thread just after it, so we need to record request queue
first, instead of using task->ov_model->request_queue later.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-02-18 09:59:37 +08:00
Guo, Yejun 51c105a62d dnn_backend_openvino.c: fix mismatch between ffmpeg(NHWC) and openvino(NCHW)
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
2021-02-18 09:59:37 +08:00
Mark Thompson 5a9aebac91 avfilter/vf_pseudocolor: Add missing braces
The array inside a structure needs two levels of braces.
2021-02-17 23:09:40 +00:00
James Almer 1628409b18 x86/vf_gblur: fix reg name in UNIX64 prologue
Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-17 15:51:28 -03:00
James Almer 3c77584be8 avfilter/vf_gblur: add missing arch check
Removed by mistake in 2b4da1cb8c where it
should have been replaced instead.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-17 15:45:40 -03:00
James Almer 2b4da1cb8c x86/vf_gblur: fix postscale_slice prologue
x86_32 ABI does not pass float arguments directly on xmm regs, and the Win64
ABI uses only the first four regs for this purpose.

Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-17 13:33:20 -03:00
Nicolas George 670051b524 lavfi/drawtext: ignore final LF of textfile.
A standard text file ends with a final LF.
Without this change, it is interpreted as an empty final line,
and visible with the box option.
The current behavior can be achieved by actually having
an empty line at the end of the file.

Fix trac ticket #7948.
2021-02-17 11:53:51 +01:00
Andreas Rheinhardt a34333f43b avfilter/vif: Include avfilter.h
Fixes checkheaders.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-16 22:26:56 +01:00
Paul B Mahol 44cf3a2b16 avfilter/x86/vf_gblur: add postscale SIMD 2021-02-16 21:12:11 +01:00
Paul B Mahol 058db59e16 avfilter/vf_gblur: factor out postscale function 2021-02-16 21:12:11 +01:00
James Almer 04dfdde09b avfilter/buffersrc: simplify av_buffersrc_add_frame_flags()
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-02-16 12:36:37 -03:00
Ashish Singh 38aea9b041 avfilter: add vif filter
This is Visual Information Fidelity (VIF) filter and one of the component
filters of VMAF. It outputs the average VIF score over all frames.

Signed-off-by: Ashish Singh <ashk43712@gmail.com>
2021-02-16 15:00:50 +01:00
Carl Eugen Hoyos 3490108f95 lavfi/vflip: Support Bayer vertical flip.
Fixes ticket #8819.
2021-02-15 00:12:38 +01:00
Paul B Mahol c6ce18be08 avfilter/vf_convolution: add 16-column operation for filter_column()
Based on patch by Xu Jun <xujunzz@sjtu.edu.cn>
2021-02-13 14:45:48 +01:00
Paul B Mahol bbf6183e11 avfilter/vf_datascope: pixscope: add commands support 2021-02-13 12:38:15 +01:00
Paul B Mahol 6c52c27d3d avfilter/vf_psnr: remove precision limits for metadata values 2021-02-12 23:22:32 +01:00
Paul B Mahol 3300d718f7 avfilter/vf_ssim: remove precision limits for metadata values 2021-02-12 23:22:32 +01:00
Paul B Mahol 95b854dd06 avfilter/af_amix: rename sum option to normalize
It makes more sense to still use provided weights.
2021-02-12 23:01:52 +01:00
Paul B Mahol 05a6d82d5c avfilter/vf_ssim: add timeline support 2021-02-12 21:21:25 +01:00
Paul B Mahol 735ec7666b avfilter/vf_psnr: add timeline support 2021-02-12 21:21:25 +01:00
Paul B Mahol 34922dffca avfilter/vf_gblur: add float format support 2021-02-12 21:09:51 +01:00
Paul B Mahol edc45d1bd5 avfilter: add monochrome video filter 2021-02-12 00:08:39 +01:00
Jan Ekström 58e59396f5 avfilter/vf_zscale: add support for setting scaling filter parameters
param_a/b are utilized for this.
2021-02-11 20:45:56 +02:00
Paul B Mahol 44facfb845 avfilter/vf_pseudocolor: do not leave alpha uninitialized 2021-02-11 14:37:14 +01:00
Paul B Mahol 0ef53cc72f avfilter/vf_pseudocolor: add two more presets 2021-02-11 14:37:14 +01:00
Paul B Mahol 2859c30cd9 avfilter/vf_pseudocolor: add opacity option 2021-02-11 14:37:14 +01:00
Paul B Mahol ba2cebb49c avfilter/af_adeclick: add more descriptive options names 2021-02-11 11:39:55 +01:00
Paul B Mahol 16c09b4659 avfilter/vf_lagfun: use macro 2021-02-11 00:45:08 +01:00
Paul B Mahol 05b394d537 avfilter/vf_lagfun: add timeline support 2021-02-11 00:45:08 +01:00
Paul B Mahol 27b5d0e1e4 avfilter/vf_lagfun: increase filter precision 2021-02-11 00:45:08 +01:00
Paul B Mahol 4390573c44 avfilter: add exposure video filter 2021-02-10 19:23:48 +01:00
Paul B Mahol 579e4e57a2 avfilter: add aexciter audio filter 2021-02-10 19:21:01 +01:00
Paul B Mahol 129978af6b avfilter/af_arnndn: skip array extra entries by looking for new line 2021-02-10 14:15:42 +01:00
Paul B Mahol aa8adc9206 avfilter/vf_datascope: add commands support 2021-02-10 11:28:47 +01:00
Paul B Mahol 199301a03a avfilter/af_arnndn: make model opening errors more verbose
Also return proper error code.
2021-02-09 23:56:11 +01:00
Paul B Mahol d7cb8c51f0 avfilter/vf_curves: add commands support 2021-02-09 18:20:15 +01:00
Paul B Mahol cfcc36240f avfilter/vf_framepack: add >8 format support 2021-02-09 12:29:04 +01:00
Paul B Mahol 73ff84c3d4 avfilter/vf_swaprect: add support for commands 2021-02-09 11:39:26 +01:00
Paul B Mahol ca042675ee avfilter/vf_maskfun: add support for commands 2021-02-09 11:24:31 +01:00
Paul B Mahol 8e027ca817 avfilter/vf_zscale: switch verbose log to trace
Not needed in verbose mode.
2021-02-09 10:37:42 +01:00
Paul B Mahol a00ff56321 avfilter/vf_lut: add support for commands
While here remove excessive log and uninit() call in negate_init().
2021-02-08 16:37:23 +01:00
Paul B Mahol dd01165f19 avfilter/vf_deband: add support for commands 2021-02-08 16:10:51 +01:00
Paul B Mahol 178a0d6f7d avfilter/vf_deband: avoid doubles 2021-02-08 16:10:51 +01:00
Paul B Mahol a773455c4f avfilter/vf_thumbnail: add support for rest of packed rgb formats 2021-02-08 13:01:28 +01:00
Paul B Mahol 3b65c848a6 avfilter/vf_thumbnail: add support for YUV and GBRP formats 2021-02-08 12:45:49 +01:00
Anton Khirnov cc4feff861 vf_pp: remove unnecessary free
ff_qp_table_extract() frees the table on failure.

Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-08 11:06:29 +01:00
Paul B Mahol 89f78dd0fe avfilter/vf_lut3d: lut3d, haldclut: add support for commands 2021-02-08 00:55:07 +01:00
Paul B Mahol 5f592136eb avfilter/vf_lut2: add support for commands 2021-02-07 22:41:49 +01:00
Paul B Mahol 629dd8efb5 avfilter/vf_extractplanes: add float formats support 2021-02-07 21:45:26 +01:00
Paul B Mahol bd5226704a avfilter: add colorize filter 2021-02-07 11:48:28 +01:00
Paul B Mahol 4b2968d305 avfilter/vf_deblock: add support for commands 2021-02-06 15:26:39 +01:00
Paul B Mahol d8181cbbc4 avfilter/vf_lut3d: lut1d: add support for commands 2021-02-06 12:47:21 +01:00
Paul B Mahol feea20e994 avfilter/vf_tile: remove extra whitespace in option description 2021-02-06 11:40:59 +01:00
Paul B Mahol 6317d40d08 avfilter/avfilter: move enable_str expression parsing into avfilter_init_dict()
This ensures that needed arrays are always allocated and properly initialized.

Previously if code would use only avfilter_init_dict() to set options for filters
it would not allocate arrays for timeline processing thus it would crash if
user supplied enable option for filter(s).
2021-02-06 11:40:59 +01:00
Paul B Mahol d0a24bfad1 avfilter/vf_mix: add support for commands 2021-02-06 11:34:28 +01:00
Paul B Mahol 3583d2a837 avfilter/vf_mix: add timeline support 2021-02-06 11:34:28 +01:00
Paul B Mahol d16293e76c avfilter/vf_lensfun: display list of possible values if user supplied none 2021-02-05 15:27:50 +01:00
Paul B Mahol 8b78eb312d avfilter/vf_lensfun: replace deprecated calls 2021-02-05 15:27:50 +01:00
Paul B Mahol 593817f51d avfilter/vf_frei0r: add timeline support 2021-02-05 13:18:21 +01:00
Gyan Doshi 5c8d4c4fac avfilter/drawbox: fix formatting after d64cbd4fda 2021-02-05 17:29:59 +05:30
Paul B Mahol fb9c56bbd5 avfilter/af_arnndn: add support for commands 2021-02-05 00:43:11 +01:00
Paul B Mahol 3d7ee5c91a avfilter/vf_blend: add support for commands 2021-02-04 21:44:31 +01:00
Paul B Mahol 5765149392 avfilter/af_amix: add sum option 2021-02-04 17:52:45 +01:00
Paul B Mahol b4ad669a42 avfilter/avfilter: mark enable as runtime option too 2021-02-03 15:51:40 +01:00
Paul B Mahol f6621a8e72 avfilter: add colorcorrect filter 2021-02-03 15:49:13 +01:00
Andreas Rheinhardt ba874ad904 avfilter/ebur128: Remove unused functions
Also make a function only used here static.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-02 23:53:30 +01:00
Paul B Mahol 68b5236eae avfilter/vf_colorlevels: call execute once per frame 2021-02-02 17:53:29 +01:00
Paul B Mahol 7ee3a5594b avfilter/vf_colorlevels: no need to use double for coeff 2021-02-02 17:53:29 +01:00
Paul B Mahol 62e24a5d80 avfilter/vf_colorlevels: beautify define 2021-02-02 17:53:29 +01:00
Paul B Mahol a7e826b9e1 avfilter/vf_colorlevels: typedef ThreadData struct 2021-02-02 17:53:29 +01:00
Paul B Mahol 090f31f813 avfilter: add colorcontrast filter 2021-02-02 14:27:06 +01:00
Paul B Mahol 459c6e8ab3 avfilter/vf_vibrance: add packed formats support 2021-01-31 20:55:23 +01:00
Paul B Mahol 98b0c0e44f avfilter/vf_colortemperature: add packed formats support 2021-01-31 20:55:23 +01:00
Paul B Mahol aa8cf8fdee avfilter/vf_colortemperature: use macro for identical code 2021-01-31 20:55:23 +01:00
Paul B Mahol 54de7dc372 avfilter/af_acrusher: add commands support 2021-01-30 23:53:38 +01:00
Paul B Mahol 633e344d96 avfilter/vf_lagfun: add support for commands 2021-01-30 17:28:26 +01:00
Paul B Mahol f0dd5c00cb avfilter/vf_weave: add slice threading support 2021-01-30 17:00:35 +01:00
Paul B Mahol 0959f95a8e avfilter/vf_blackdetect: add slice threading support 2021-01-30 16:08:26 +01:00
Paul B Mahol d43a27ab6f avfilter/vf_pseudocolor: allow more advanced presets 2021-01-29 23:42:24 +01:00
Paul B Mahol 50dd020f04 avfilter/vf_lut3d: add prism interpolation 2021-01-29 23:41:07 +01:00
Paul B Mahol 26a53519dc avfilter/vf_lut3d: add pyramid interpolation 2021-01-29 23:41:07 +01:00
Andreas Rheinhardt 124e2a79e2 avfilter/drawutils: Remove remnants of old API
ff_fill_line_with_color and ff_draw_rectangle are unused since
19c8f2271423281c9b876b984076a6467c455904; ff_copy_rectangle
is unused since 53b7a3fe08.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-29 15:20:53 +01:00
Paul B Mahol 27b793b0cf avfilter/vf_blackdetect: add support for >8 depth formats 2021-01-29 14:40:56 +01:00
Paul B Mahol 8248f7b902 avfilter/vf_blackdetect: fix bug when no final log would be displayed 2021-01-29 14:40:56 +01:00
Paul B Mahol 0bcba12a55 avfilter/vf_blackdetect: use the name 's' for the pointer to the private context
This is consistent across filters and also is less typing.
2021-01-29 14:40:56 +01:00
Paul B Mahol 61a0ff892e avfilter/vf_pseudocolor: add support for commands 2021-01-28 20:07:37 +01:00
Paul B Mahol 891da955af avfilter/vf_pseudocolor: use macro for code that repeats 2021-01-28 20:07:37 +01:00
Paul B Mahol d01aa49753 avfilter/vf_pseudocolor: add presets 2021-01-28 20:07:37 +01:00
Guo, Yejun eccc7971c2 dnn_backend_openvino.c: remove extra semicolon 2021-01-28 09:45:13 +08:00
Guo, Yejun 06c01f1763 dnn: remove type cast which is not necessary 2021-01-28 09:45:13 +08:00
Paul B Mahol 24892fa4a7 avfilter/vf_pseudocolor: add slice threading 2021-01-28 01:00:22 +01:00
Paul B Mahol a9d23d33a1 avfilter: add colortemperature filter 2021-01-27 11:48:00 +01:00
Paul B Mahol 35f8628047 avfilter: add kirsch video filter 2021-01-27 11:46:26 +01:00
Paul B Mahol 2ee2e4cd41 avfilter/vf_colorchannelmixer: extend pl option functionality 2021-01-27 00:57:26 +01:00
Paul B Mahol 199d9e705a avfilter/vf_lenscorrection: remove unused elements 2021-01-26 20:08:05 +01:00
Paul B Mahol 499c3193a5 avfilter/vf_lenscorrection: reduce overhead calling execute for every plane 2021-01-26 20:08:05 +01:00
Paul B Mahol 46f170e544 avfilter/vf_lenscorrection: add support for commands 2021-01-26 20:08:05 +01:00
Andreas Rheinhardt 3c700c82cb avfilter/vf_unsharp: Remove unnecessary ;
A macro that expands to a function definition might look like a
declaration, but it isn't and therefore an extra ';' at the end is
unnecessary and actually invalid (both GCC and Clang warn about this
when using -pedantic).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-26 17:44:41 +01:00
Paul B Mahol 37f76c81d6 avfilter: add shear video filter 2021-01-26 12:19:09 +01:00
Paul B Mahol a2a06029cf avfilter/vf_lenscorrection: allow to change colors of unmapped pixels 2021-01-25 12:34:57 +01:00
Paul B Mahol 3cc2e15b91 avfilter/vf_lenscorrection: add >8 depth support 2021-01-25 12:34:57 +01:00
Paul B Mahol 87598435aa avfilter/vf_lenscorrection: fix far edges with nearest interpolation 2021-01-25 12:34:57 +01:00