Commit Graph

7517 Commits

Author SHA1 Message Date
Mark Thompson
5fb9eb9ed2 vf_misc_vaapi: Add missing return value checks
Parameter buffer creation can fail.
2019-06-02 17:30:41 +01:00
Mark Thompson
6ed34a4379 lavfi/vaapi: Factorise out common code for parameter buffer setup
Also enables cropping on all VAAPI filters, inherited from the existing
support in scale_vaapi.
2019-06-02 17:30:41 +01:00
Mark Thompson
f1b359aaf5 vf_crop: Add support for cropping hardware frames
Set the cropping fields in the AVFrame.
2019-06-02 17:30:41 +01:00
Paul B Mahol
fcfe85220d avfilter/af_anlmdn: avoid creating frames with zero samples 2019-06-02 13:00:35 +02:00
Paul B Mahol
1a266a1ef9 avfilter/af_anlmdn: try to recover when cache becomes negative 2019-06-02 12:59:57 +02:00
Paul B Mahol
b535577465 avfilter/af_anlmdn: add smooth factor option 2019-06-02 11:58:49 +02:00
Paul B Mahol
cbaa60329a avfilter/vf_xmedian: remove limitation of only odd number of inputs 2019-06-02 11:07:46 +02:00
Carl Eugen Hoyos
d1b4ea2f61 lavfi/showspatial: Remove two write-only variables.
Fixes two warnings:
libavfilter/avf_showspatial.c:157:26: warning: variable ‘w’ set but not used
libavfilter/avf_showspatial.c:157:23: warning: variable ‘h’ set but not used
2019-05-31 22:30:46 +02:00
Paul B Mahol
b19550367f avfilter: add showspatial multimedia filter 2019-05-31 12:53:20 +02:00
Linjie Fu
6895b350c3 lavf/qsvvpp: avoid the double-free when working in sys memory mode
Currently, picref will be freed by calling av_frame_free(&picref) in
submit_frame() in qsvvpp.c when working in system memory mode,and normally it
is freed in filter_frame() in vf_vpp_qsv.c when working in other modes.

Double free happens when working in system memory mode, remove to
fix the memory issue.

Reproduce:
ffmpeg -init_hw_device qsv=foo -filter_hw_device foo -f rawvideo -pix_fmt nv12 -s:v 852x480 \
-i 852x480.nv12 -vf 'vpp_qsv=w=500:h=400' -f rawvideo -pix_fmt nv12 qsv.nv12

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
2019-05-30 09:33:21 +08:00
Paul B Mahol
819ed1df94 avfilter/avf_aphasemeter: make use of av_rescale 2019-05-28 11:10:51 +02:00
Paul B Mahol
62c8707e2a avfilter/avf_showwaves: make use of av_rescale_q 2019-05-28 11:07:47 +02:00
Paul B Mahol
cd75396897 avfilter/avf_ahistogram: make use of av_rescale 2019-05-28 10:51:57 +02:00
Paul B Mahol
d2e76a1f96 avfilter/avf_showvolume: make use of av_rescale 2019-05-28 10:49:09 +02:00
Paul B Mahol
618f8bb0a4 avfilter/avf_abitscope: make use of av_rescale 2019-05-28 10:46:38 +02:00
Paul B Mahol
b16806b09d avfilter/avf_avectorscope: make use of av_rescale 2019-05-28 10:43:25 +02:00
Jun Zhao
9b069eb14e lavfi/sr: Change the backend type from flags to int
native and tensorflow is exclusive, so change the type from
flags to int.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-05-28 09:13:36 +08:00
Jun Zhao
b983e71bde lavfi/sr: Remove slice thread flag
sr didn't enable the slice threading, so remove the flag

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-05-28 09:13:36 +08:00
Paul B Mahol
5ddaedcaec avfilter/avf_showvolume: switch to activate 2019-05-27 18:44:19 +02:00
Paul B Mahol
293489d835 avfilter/af_superequalizer: switch to activate 2019-05-27 17:36:30 +02:00
Paul B Mahol
fc0de1c04b avfilter/avf_showfreqs: switch to activate 2019-05-26 17:11:17 +02:00
Marton Balint
1eb54323c8 avfilter/f_loop: warn about unset loop sizes
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-05-24 21:39:07 +02:00
Marton Balint
87e0247a6c avfilter/f_loop: fix video loop issues with 0 size or when size is bigger than input
Fixes infinte loop with -vf loop=loop=1 and also fixes looping when the input
is less frames than the specified loop size.

Possible regressions since ef1aadffc7.

Signed-off-by: Marton Balint <cus@passwd.hu>
2019-05-24 21:39:07 +02:00
Josh Allmann
4cfc34d9a8 avfilter/vf_scale_cuda: reset frame size after acquiring from hwframe
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2019-05-24 19:03:34 +02:00
Paul B Mahol
5073adcc42 avfilter/vf_xmedian: set sar to outlink 2019-05-24 18:37:41 +02:00
Paul B Mahol
a1992637ac avfilter/vf_mix: set sar to outlink 2019-05-24 18:37:41 +02:00
Paul B Mahol
a9b5af0d19 avfilter/vf_mix: use time_base from framesync 2019-05-24 18:33:16 +02:00
Ruiling Song
1d74150a7d lavfi/opencl: add nlmeans_opencl filter
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-05-24 15:09:22 +08:00
Xuewei Meng
023ea5e360 libavfilter/dnn_native: Add support of dilated convolution in dnn_native.
Add dilation parameter in dnn native to support dilated convolution.

Signed-off-by: Xuewei Meng <xwmeng96@gmail.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2019-05-24 11:49:50 +08:00
Jun Zhao
98663a0bb8 lavfi/lensfun: Use ff_filter_get_nb_threads() get number of threads
ff_filter_get_nb_threads() respect AVFilterContext.nb_threads and
graph->nb_threads both, in most case, we perfer this API than using
ctx->graph->nb_threads directly.

Reviewed-by: Steven Liu <lq@onvideo.cn>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-05-22 17:34:18 +08:00
Xuewei Meng
ecc096513c libavfilter/dnn_native: Add multiple activation functions in dnn native
Add "Leaky_relu" and "None" option in activation function.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Xuewei Meng <xwmeng96@gmail.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2019-05-22 10:28:07 +08:00
Xuewei Meng
e45e6005ce libavfilter/dnn_native: Add multiple padding methods in dnn native
Add another two padding methods "VALID" and "SAME" as tensorflow,
and keep the existing "SAME_CLAMP_TO_EDGE" method suggested by sr filter.
As "SAME_CLAMP_TO_EDGE"can keep the output with the same size as original input,
and gives a slight better result as mentioned by sr filter.

Reviewed-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Xuewei Meng <xwmeng96@gmail.com>
Signed-off-by: Steven Liu <lq@onvideo.cn>
2019-05-21 12:53:58 +08:00
Paul B Mahol
96c79d4e1f avfilter/vf_ocr: also export confidence of result 2019-05-17 19:10:12 +02:00
Paul B Mahol
6276b4db97 avfilter/vf_separatefields: switch to activate
Fixes timestamp of last output frame.
2019-05-16 12:31:57 +02:00
Gyan Doshi
8cf947ca4c avfilter/drawtext: stop resource leak
Fixes Coverity CID 1445099
2019-05-16 10:30:28 +05:30
Philip Langdale
13168ecbdc avfilter/vf_scale_cuda: Simplify output plane addressing
I'm not sure why this was written the way it was originally. We
initialise the plane addresses correctly in hwcontext_cuda so
why try and play games to calculate the plane offsets directly
in this code?
2019-05-15 11:40:50 -07:00
Philip Langdale
bfbde996cf avfilter/vf_scale_cuda: Add support for YUV444P16
This format is interesting because it's what you get for decoded
10/12bit HEVC 4:4:4.
2019-05-15 11:40:50 -07:00
Philip Langdale
89bd7554b2 avfilter/vf_scale_cuda: Fix incorrect scaling of > 8bit content
When i converted the filter to use texture objects instead of
texture references, I incorrect dropped the `pixel_size` scaling
factor when setting `pitchInBytes`. `src_pitch` is in pixels and
so must be scaled up.
2019-05-15 11:40:50 -07:00
Paul B Mahol
f49cec2ba8 avfilter: add asr filter 2019-05-14 15:17:14 +02:00
Andreas Rheinhardt
670251de56 avfilter/vf_stack: Don't modify const strings
b3b7ba62 introduced undefined behaviour: A (non-modifiable) string
literal has been assigned to a modifiable string; said string was indeed
modified later via av_strtok.
This of course caused compiler warnings because of the discarded
qualifier; these are in particular fixed by this commit.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2019-05-14 14:47:51 +02:00
Paul B Mahol
8ef163ba9e avfilter: add xmedian filter 2019-05-14 14:43:56 +02:00
Paul B Mahol
f1c9d6fe70 avfilter/vf_chromahold: implement blend option 2019-05-13 12:15:32 +02:00
Gyan Doshi
87db1ca632 avfilter/drawtext: make command processing error-resilient
Prevents crash or interruption in text rendering
if new option string contains invalid values.
2019-05-13 10:34:32 +05:30
Paul B Mahol
bd6942b4c0 avfilter/af_astats: fix calculations involving last sample 2019-05-12 17:12:06 +02:00
Paul B Mahol
2a4a364f6a avfilter/af_astats: fix initial values of variables 2019-05-12 17:12:06 +02:00
Paul B Mahol
59fb8cae5e avfilter: add colorhold filter
Fixes #7671.
2019-05-11 20:16:45 +02:00
Jun Zhao
c967128952 lavf/cover_rect: Fix logic check issue
Fix logic check issue #6741

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-05-10 09:07:29 +08:00
Pavel Koshevoy
181031906e avfilter/af_atempo: Make ffplay display correct timestamps when seeking
NOTE: this is a refinement of the patch from Paul B Mahol
offset all output timestamps by same amount of first input timestamp
2019-05-08 23:38:10 -06:00
Guo, Yejun
c636dc9819 libavfilter/dnn: add more data type support for dnn model input
currently, only float is supported as model input, actually, there
are other data types, this patch adds uint8.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-05-08 12:33:00 -03:00
Guo, Yejun
25c1cd909f libavfilter/dnn: support multiple outputs for tensorflow model
some models such as ssd, yolo have more than one output.

the clean up code in this patch is a little complex, it is because
that set_input_output_tf could be called for many times together
with ff_dnn_execute_model_tf, we have to clean resources for the
case that the two interfaces are called interleaved.

Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-05-08 12:33:00 -03:00