Commit Graph

9075 Commits

Author SHA1 Message Date
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