Paul B Mahol
a3e67c2d2f
avfilter/vf_stack: add fill option for xstack
2020-01-22 19:13:51 +01:00
Paul B Mahol
a00fa73f47
avfilter/vf_v360: improve fisheye input format
2020-01-22 12:59:35 +01:00
Paul B Mahol
103a29b89d
avfilter/vf_v360: add support for fisheye input format
2020-01-21 20:12:54 +01:00
Paul B Mahol
fc2523c792
avfilter/vf_v360: add support for input fov to input sg format
2020-01-21 12:02:27 +01:00
Paul B Mahol
19f75e7787
avfilter/vf_v360: add support for cylindrical input format
2020-01-21 00:21:56 +01:00
Paul B Mahol
e57b9aa8b1
avfilter/vf_v360: add support for flat input format
2020-01-20 21:10:37 +01:00
Paul B Mahol
091695f8e8
avfilter/vf_v360: rewrite fov_from_dfov()
2020-01-20 21:10:37 +01:00
Paul B Mahol
15133c6ab2
avfilter/vf_v360: replace rest of roundf() with lrintf()
2020-01-19 19:54:29 +01:00
Paul B Mahol
3bf28d40e5
avfilter/vf_v360: change remaps to int16_t type
2020-01-19 19:54:29 +01:00
Paul B Mahol
ff5e241bca
avfilter/vf_v360: move map variable up
2020-01-19 19:54:29 +01:00
Paul B Mahol
fdc61267b4
avfilter/vf_v360: make more stuff const
2020-01-19 19:54:29 +01:00
Gyan Doshi
4de2106fbf
avfilter/pad: improve error check for w and h
...
Target dimensions have to cover entire input.
2020-01-19 11:17:53 +05:30
Paul B Mahol
feeef2f80c
avfilter/vf_normalize: add support for >8 depth
2020-01-18 17:28:23 +01:00
Paul B Mahol
ac51173024
avfilter/vf_normalize: add support for planar rgb
2020-01-18 17:28:23 +01:00
Paul B Mahol
4545699625
avfilter/vf_normalize: factor code dealing with AVFrame pixels out
2020-01-18 17:28:23 +01:00
Paul B Mahol
1908818e7b
avfilter/vf_normalize: move luts into private context
2020-01-18 17:28:23 +01:00
Paul B Mahol
273886fa60
avfilter/asrc_anoisesrc: add velvet noise
2020-01-18 17:27:10 +01:00
Paul B Mahol
fdddc0d678
avfilter/vf_v360: add perspective output projection
2020-01-18 17:25:48 +01:00
Paul B Mahol
62a0d22621
avfilter/vf_v360: add gaussian interpolation
2020-01-18 13:43:33 +01:00
Paul B Mahol
3972ec28e7
avfilter/vf_v360: fix some small nits
2020-01-18 11:34:10 +01:00
Paul B Mahol
aa42a1e6d7
avfilter/vf_v360: add spline16 interpolation
2020-01-18 10:27:11 +01:00
Gyan Doshi
c95dfe5cce
avfilter/f_metadata: correct check for existing metadata
...
When adding metadata, existing dictionary need not be present.
2020-01-17 17:35:31 +05:30
Paul B Mahol
7fc28465df
avfilter/vf_v360: add cylindrical output projection
2020-01-17 10:46:31 +01:00
Paul B Mahol
330b157c9e
avfilter/vf_v360: add pannini output projection
2020-01-16 20:06:28 +01:00
Paul B Mahol
6e082f9f04
avfilter/vf_v360: add fisheye output projection
2020-01-16 18:22:28 +01:00
Gyan Doshi
0777b197c5
avfilter/swaprect: correct assignment of VAR_POS
...
Revert regression introduced in 6af050d7d0
2020-01-15 14:27:51 +05:30
Gyan Doshi
0dc0837960
avfilter/scale: add animation support
...
Width and height expressions in scale and scale2ref filters can now
reference frame index, timestamp and packet position.
2020-01-15 12:03:47 +05:30
Gyan Doshi
ce2cfa67aa
avfilter/scale: add function to check expressions
...
Allows finer identification and logging of invalid expressions and use
of a single list for symbols and their index for both scale and
scale2ref.
2020-01-15 11:26:49 +05:30
Gyan Doshi
6310fbd543
avfilter/scale: separate exprs parse and eval
...
Retains parsed expressions which allows for better
error-checking and adding animation support.
2020-01-15 11:26:46 +05:30
Gyan Doshi
cc9a7cae76
avfilter/scale2ref: update links and re-eval expr upon ref frame change
...
Needed when filtergraph reinit is disabled for the ref input.
2020-01-15 11:26:38 +05:30
Gyan Doshi
c21462d42e
avfilter/scale: store frame change eval
...
Better readability and allows reuse
2020-01-15 11:26:32 +05:30
Limin Wang
72a08af8ba
avfilter/vf_eq: cosmetics
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-14 19:19:30 +01:00
Paul B Mahol
7e4b0d377f
avfilter/avf_showspectrum: check if frame clone is set
2020-01-14 16:52:08 +01:00
Paul B Mahol
cc752233fb
avfilter/f_ebur128: check if frame clone is set
2020-01-14 16:52:08 +01:00
Paul B Mahol
c43f8baa41
avfilter/avf_aphasemeter: check if clone frame is set
2020-01-14 16:52:07 +01:00
Paul B Mahol
d580c7a797
avfilter/avf_ahistogram: check if frame clone is set
2020-01-14 16:52:07 +01:00
Paul B Mahol
928020b9d0
avfilter/asr_anullsrc: remove pointless frame cloning
2020-01-14 16:52:07 +01:00
Paul B Mahol
f6f6857c2a
avfilter/af_anequalizer: check if frame clone is set
2020-01-14 16:52:07 +01:00
Paul B Mahol
80c4c336f9
avfilter/af_aiir: check if frame clone is set
2020-01-14 16:52:07 +01:00
Paul B Mahol
2a9a52b913
avfilter/af_afir: check if frame clone is set
2020-01-14 16:52:07 +01:00
Paul B Mahol
f9897eda43
avfilter/avf_avectorscope: check if clone frame is set
2020-01-14 16:52:07 +01:00
Guo, Yejun
4e1ae43b17
lavfi/dnn_processing: refine code to use function av_image_copy_plane for data copy
...
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2020-01-14 11:29:43 -03:00
Paul B Mahol
d9a52b0bbf
avfilter/f_drawgraph: add rate/r option
2020-01-14 09:54:53 +01:00
Jun Zhao
722547996c
lavfi/volume: enable runtime change flag
...
enable runtime change flag.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-13 09:25:18 +08:00
Jun Zhao
b5cea39190
lavfi/zscale: enable runtime change flag
...
enable runtime change flag
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-13 09:25:18 +08:00
Jun Zhao
a2619a473e
lavfi/firequalizer: enable runtime change flag
...
enable runtime change flag
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-13 09:25:18 +08:00
Jun Zhao
b7bf55550c
lavfi/eq: enable runtime change flag
...
enable runtime change flag
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-13 09:25:18 +08:00
Jun Zhao
419e47788a
lavfi/rotate: enable runtime change flag
...
enable runtime change flag
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-13 09:25:18 +08:00
Jun Zhao
f2a095ac2a
lavfi/streamselect: enable runtime change flag
...
enable runtime change flag.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-13 09:25:18 +08:00
Jun Zhao
d9e78a723a
lavfi/scale: enable runtime change flag
...
enable runtime change flag.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-13 09:25:18 +08:00
Jun Zhao
8cebc8e479
lavfi/hue: enable runtime change flag
...
enable runtime change flag.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-13 09:25:18 +08:00
Jun Zhao
31b24588c5
lavfi/crop: enable runtime change flag
...
enable runtime change flag.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-13 09:25:18 +08:00
Jun Zhao
94004a8b65
lavfi/spp: enable runtime change flag
...
enable runtime change flag.
Reviewe-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-13 09:25:18 +08:00
Jun Zhao
692f0519bb
lavfi/spp: add "quality" option in runtime change path
...
it's stranage to use option "level" in runtime change path but used
"quality" in option, add "quality" in runtime change path, it's more
intuitive and keep the "level" for compatibility.
Reviewe-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-13 09:25:18 +08:00
Paul B Mahol
1a7f4a122e
avfilter: add freezeframes video filter
2020-01-11 19:05:17 +01:00
Paul B Mahol
b650046860
avfilter/af_dynaudnorm: use better limits for maximal amplification
...
Fixes regression in smoothness of amplification.
2020-01-11 14:08:52 +01:00
Limin Wang
dd39dbf983
avfilter/af_amix: change the max range of the number of inputs
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-01-11 11:35:51 +01:00
Limin Wang
a144cd6a51
avfilter/vf_mix: change the max range of the number of inputs
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2020-01-11 11:35:39 +01:00
Limin Wang
9519c8dbb7
avfilter/vf_showinfo: fix the integer handling issues
...
Fixes CID 1457606 and 1457607
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-10 17:52:14 +01:00
Gyan Doshi
22a06a539d
avfilter/f_metadata: allow direct flushing when printing to file
...
Useful for monitoring sparse data in realtime
2020-01-10 21:44:26 +05:30
Paul B Mahol
52bf43eb49
avfilter/af_afir: add support for switching impulse response streams at runtime
...
Currently, switching is not free of artifacts, to be resolved later.
2020-01-10 13:14:54 +01:00
Paul B Mahol
03a7240a73
avfilter/af_afir: add support for even smaller partition sizes
2020-01-10 13:05:21 +01:00
Paul B Mahol
e364fe4cca
avfilter/af_afir: split input frames from impulse response frames
2020-01-10 12:43:18 +01:00
Gyan Doshi
5bd001043d
avfilter/aformat: add shorthand names for options
2020-01-08 11:15:13 +05:30
Guo, Yejun
37d24a6c8f
vf_dnn_processing: add support for more formats gray8 and grayf32
...
The following is a python script to halve the value of the gray
image. It demos how to setup and execute dnn model with python+tensorflow.
It also generates .pb file which will be used by ffmpeg.
import tensorflow as tf
import numpy as np
from skimage import color
from skimage import io
in_img = io.imread('input.jpg')
in_img = color.rgb2gray(in_img)
io.imsave('ori_gray.jpg', np.squeeze(in_img))
in_data = np.expand_dims(in_img, axis=0)
in_data = np.expand_dims(in_data, axis=3)
filter_data = np.array([0.5]).reshape(1,1,1,1).astype(np.float32)
filter = tf.Variable(filter_data)
x = tf.placeholder(tf.float32, shape=[1, None, None, 1], name='dnn_in')
y = tf.nn.conv2d(x, filter, strides=[1, 1, 1, 1], padding='VALID', name='dnn_out')
sess=tf.Session()
sess.run(tf.global_variables_initializer())
graph_def = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, ['dnn_out'])
tf.train.write_graph(graph_def, '.', 'halve_gray_float.pb', as_text=False)
print("halve_gray_float.pb generated, please use \
path_to_ffmpeg/tools/python/convert.py to generate halve_gray_float.model\n")
output = sess.run(y, feed_dict={x: in_data})
output = output * 255.0
output = output.astype(np.uint8)
io.imsave("out.jpg", np.squeeze(output))
To do the same thing with ffmpeg:
- generate halve_gray_float.pb with the above script
- generate halve_gray_float.model with tools/python/convert.py
- try with following commands
./ffmpeg -i input.jpg -vf format=grayf32,dnn_processing=model=halve_gray_float.model:input=dnn_in:output=dnn_out:dnn_backend=native out.native.png
./ffmpeg -i input.jpg -vf format=grayf32,dnn_processing=model=halve_gray_float.pb:input=dnn_in:output=dnn_out:dnn_backend=tensorflow out.tf.png
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2020-01-07 10:51:38 -03:00
Guo, Yejun
04e6f8a143
vf_dnn_processing: remove parameter 'fmt'
...
do not request AVFrame's format in vf_ddn_processing with 'fmt',
but to add another filter for the format.
command examples:
./ffmpeg -i input.jpg -vf format=bgr24,dnn_processing=model=halve_first_channel.model:input=dnn_in:output=dnn_out:dnn_backend=native -y out.native.png
./ffmpeg -i input.jpg -vf format=rgb24,dnn_processing=model=halve_first_channel.model:input=dnn_in:output=dnn_out:dnn_backend=native -y out.native.png
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2020-01-07 10:35:59 -03:00
Limin Wang
d31a1266a7
avfilter/vf_showinfo: Fix erroneous results for mean and stdev with pixel bits >8
...
Have tested with be and le pixel format on be and le system for >8bit.
System:
lmwang@ubuntu:~/ffmpeg.git.mips$ grep HAVE_BIGENDIAN config.h
ffmpeg.git git:(showinfo) ✗ grep HAVE_BIGENDIAN config.h
Test result:
1, yuv420p
./ffmpeg -f lavfi -i color=black:duration=1:r=1:size=1280x720,format=yuv420p,showinfo
Master:
mean:[16 128 128] stdev:[0.0 0.0 0.0]
After applied the patch:
mean:[16 128 128] stdev:[0.0 0.0 0.0]
2, yuv420p10le
./ffmpeg -f lavfi -i color=black:duration=1:r=1:size=1280x720,format=yuv420p10le,showinfo
Master:
mean:[32 1 1] stdev:[32.0 1.0 1.0]
After applied the patch:
mean:[64 512 512] stdev:[0.0 0.0 0.0]
3, yuv420p10be
./ffmpeg -f lavfi -i color=black:duration=1:r=1:size=1280x720,format=yuv420p10be,showinfo
Master:
mean:[32 1 1] stdev:[32.0 1.0 1.0]
After applied the patch:
mean:[64 512 512] stdev:[0.0 0.0 0.0]
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-07 02:49:44 +01:00
Mark Thompson
f907eea863
vf_tonemap_vaapi: Fix memory leak in error case
...
Fixes CID 1457236.
2020-01-07 00:04:50 +00:00
Carl Eugen Hoyos
96fab29e96
Silence "string-plus-int" warning shown by clang.
...
libswscale/utils.c:89:42: warning: adding 'unsigned long' to a string does not append to the string [-Wstring-plus-int]
2020-01-06 22:38:56 +01:00
Paul B Mahol
e21ba176c9
avfilter/af_sidechaincompress: add support for commands
2020-01-06 19:40:07 +01:00
Paul B Mahol
27ec72db06
avfilter/af_dynaudnorm: add support for commands
2020-01-06 14:23:53 +01:00
Paul B Mahol
e26d66daaa
avfilter/af_dynaudnorm: use already available pointer
...
Instead of dereferencing same thing again.
2020-01-05 10:22:57 +01:00
Paul B Mahol
1187dbb7e9
avfilter/af_dynaudnorm: move channels variable setup first
2020-01-05 10:20:27 +01:00
Jun Zhao
304eaa63a9
lavfi/buffersrc: Remove redundant free after ff_filter_frame() failure
...
ff_filter_frame() always frees the frame in case of error, so we don't
need to free the frame after ff_filter_frame() fails.
Fix CID 1457230.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-04 19:37:39 +01:00
Paul B Mahol
389865352d
avfilter/af_dynaudnorm: fix another clipping with custom peak value
...
This always happened at start with alternative boundary mode disabled.
The clipping only occurred if starting samples where high enough.
2020-01-04 19:34:50 +01:00
Paul B Mahol
c8253cb332
avfilter/af_dynaudnorm: implement threshold option
2020-01-04 18:17:32 +01:00
Paul B Mahol
6a1305e8b7
avfilter/af_dynaudnorm: do not clip audio
...
Clipping can happen when smoothed gain is higher than maximum
allowed gain factor for current frame and peak value option is
set to enough low value.
2020-01-04 10:27:46 +01:00
Jun Zhao
c8e72a6494
lavfi/coreimage: fix memory leak after av_dict_parse_string fail
...
In case of failure, all the successfully set entries are stored in
*pm. We need to manually free the created dictionary to avoid
memory leak.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2020-01-04 09:05:09 +08:00
Paul B Mahol
81172b5e3a
avfilter/af_dynaudnorm: fix previous commit
...
We still need to analyze frame for amplification at EOF.
2020-01-02 17:24:01 +01:00
Paul B Mahol
ed02563ce0
avfilter/af_dynaudnorm: do not enqueue flush buffers
2020-01-02 16:28:38 +01:00
Paul B Mahol
d4d6280ab2
avfilter/af_dynaudnorm: do not hang forever if only EOF is received
2020-01-01 13:44:22 +01:00
Paul B Mahol
7bb09e57e0
avfilter/af_dynaudnorm: do not error out if even filter size was given
...
Instead issue a warning and make filter size odd number.
2020-01-01 13:44:22 +01:00
Paul B Mahol
f651b18c19
avfilter/vf_histogram: add envelope to thistogram filter
2019-12-30 17:21:35 +01:00
Zhao Zhili
b2491566a6
avfilter/buffersrc: deprecate sws_param option
2019-12-30 10:41:07 +01:00
Paul B Mahol
e20c6d95b2
avfilter/af_crystalizer: add support for commands
2019-12-29 15:33:55 +01:00
Paul B Mahol
22d3552f44
avfilter/af_crystalizer: add timeline support
2019-12-29 15:33:55 +01:00
Paul B Mahol
26eba8ca61
avfilter/vf_waveform: add support for 12bit yuva formats
2019-12-29 15:33:55 +01:00
Paul B Mahol
11f6657e92
avfilter/vf_vectorscope: add support for 12bit yuva formats
2019-12-29 15:33:55 +01:00
Paul B Mahol
612b5791b8
avfilter/vf_histogram: add support for 12bit yuva formats
2019-12-29 15:33:55 +01:00
Paul B Mahol
d3d6f5a76e
avfilter/vf_histogram: reindent after previous commit
2019-12-29 15:33:55 +01:00
Paul B Mahol
cc43c2f29a
avfilter: add thistogram video filter
2019-12-29 15:33:55 +01:00
James Almer
eb17a7906b
avfilter/vf_vectorscope: use av_clip_uint8()
...
Fixes fate-source
Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-28 22:38:58 -03:00
Paul B Mahol
6399eed48a
avfilter/vf_waveform: implement tint options
2019-12-28 21:51:40 +01:00
Paul B Mahol
b3216f13ce
avfilter/vf_vectorscope: improve tint output for gbrp formats
2019-12-28 21:51:40 +01:00
Paul B Mahol
2736dc0564
avfilter/vf_vectorscope: rename gray mode to tint mode
2019-12-28 14:01:15 +01:00
Paul B Mahol
29b765d657
avfilter/vf_vectorscope: add invert graticule
2019-12-28 12:32:43 +01:00
Paul B Mahol
1669c970b1
avfilter/vf_vectorscope: use enum for graticule items
2019-12-28 12:32:43 +01:00
Michael Niedermayer
5c0d1f7896
avfilter/vf_geq: Add support for reading sample sums and means of rectangles
...
This allows integrating box blur style filters in geq.
Without this computing the mean of an area in geq would have been excessivly slow
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-28 11:20:48 +01:00
Michael Niedermayer
47fd73ace2
avfilter/vf_geq: Add NB_PLANES
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-28 11:20:48 +01:00
Michael Niedermayer
d5e7f01090
avfilter/vf_geq: Relicense to LGPL
...
All authors who have code in this under GPL agreed.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-28 11:20:48 +01:00
Paul B Mahol
6c883e214a
avfilter/vf_vibrance: add support for commands
2019-12-27 21:31:04 +01:00
Paul B Mahol
50cfe9662d
avfilter/vf_il: add support for commands
2019-12-27 21:17:00 +01:00
Paul B Mahol
5fb37598ad
avfilter/af_stereowiden: add support for commands
2019-12-27 21:03:29 +01:00
Paul B Mahol
954637805d
avfilter/af_extrastereo: add support for commands
2019-12-27 20:57:06 +01:00
Paul B Mahol
fad62eebee
avfilter/vf_neighbor: add support for commands
2019-12-27 20:21:20 +01:00
Paul B Mahol
b5f0cea16c
avfilter/vf_histogram: use the name 's' for the pointer to the private context
...
This is consistent across filters.
2019-12-26 20:45:20 +01:00
Andreas Rheinhardt
398a5f5d8f
avfilter/buffersrc: Remove unused variables
...
Unused since f09ae730
.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-26 16:06:25 +01:00
Limin Wang
3dd6c4478b
avfilter/vf_yadif: cosmetics in the pix_fmts[] array
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-25 18:00:40 +01:00
Gyan Doshi
287620f59c
avfilter/drawtext: log why input pad failed to be configured
2019-12-24 11:04:52 +05:30
Paul B Mahol
547b0c61af
avfilter/vf_fade: reindent after previous commit
2019-12-23 20:24:36 +01:00
Paul B Mahol
6c9a9dd25a
avfilter/vf_fade: add support for gbrp/gbrap formats
2019-12-23 20:16:27 +01:00
Paul B Mahol
94ad5d0128
avfilter/vf_readeia608: factor some constants out
2019-12-23 20:09:20 +01:00
Paul B Mahol
94682555c6
avfilter/vf_readeia608: check if gaps between clock bits are big enough
...
Should help finding less false positives.
2019-12-23 19:56:05 +01:00
Paul B Mahol
16968b619d
avfilter/vf_readeia608: use special struct to hold line items
2019-12-23 18:02:38 +01:00
Zhao Zhili
0115dbd043
avfilter/avfilter: update documentation of avfilter_graph_create_filter
2019-12-23 17:02:55 +01:00
Zhao Zhili
61097535cd
avfilter/buffersink: deprecate AVBufferSinkParams and AVABufferSinkParams
2019-12-23 17:02:55 +01:00
Zhao Zhili
07ffdedf78
avfilter/buffersink: replace init_opaque by init
...
The argument 'opaque' is always NULL since 0acf7e2
(2013),
and avfilter_init_filter() was removed in 52067b3c0e
(2016).
2019-12-23 17:02:55 +01:00
Zhao Zhili
807e90d232
avfilter/buffersink: remove unused macros
2019-12-23 17:02:55 +01:00
Zhao Zhili
bf08264daa
avfilter/buffersrc: remove redundant flag
...
!(c->pix_fmt != AV_PIX_FMT_NONE || c->got_format_from_params)
equals
(c->pix_fmt == AV_PIX_FMT_NONE) && !c->got_format_from_params
1. When (c->pix_fmt == AV_PIX_FMT_NONE) is true, got_format_from_params is
always false, the flag doesn't contribute to the result.
2. When the first part is false, the second part doesn't matter, the flag
doesn't contribute to the result.
The result only depends on c->pix_fmt.
2019-12-23 17:02:55 +01:00
Nicolas George
f09ae7309d
lavfi/buffersrc: push frame directly.
...
This allows to remove the queued frame entirely.
2019-12-23 13:03:38 +01:00
Nicolas George
02daafb45c
lavfi: remove AVFilterPad.poll_frame().
...
This design is no longer used and was replaced a long time ago.
2019-12-23 13:03:38 +01:00
Nicolas George
f3a6ef69bf
lavfi/buffersrc: remove poll_frame.
2019-12-23 13:03:38 +01:00
Nicolas George
65e6850c56
lavfi: remove ff_poll_frame().
...
It is never used.
2019-12-23 13:03:38 +01:00
Nicolas George
9ea7e68907
lavfi/buffersrc: remove fifo.
...
The frame is immediately pushed, the fifo has never more than one.
2019-12-23 13:03:38 +01:00
Limin Wang
03eb96f9b7
avfilter/vf_readeia608: fix check for failed av_calloc
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2019-12-23 10:26:36 +01:00
Paul B Mahol
e890ce62ef
avfilter/af_adeclick: implement timeline support
2019-12-21 20:02:04 +01:00
Paul B Mahol
26f4ee37f7
avfilter/vf_readeia608: if parity bit check fails, set correct value
...
As described in U.S. Federal Register, Volume 56, Number 114, June 13, 1991, pages 27204-27205.
2019-12-21 12:11:38 +01:00
Paul B Mahol
786a2daa3d
avfilter/vf_readeia608: rewrite processing, make extracting more robust
...
Lots of options are now obsolete.
2019-12-20 18:08:46 +01:00
Paul B Mahol
3530fdc78e
avfilter/vf_stack: set framerate to VFR when inputs frame rates differs
2019-12-17 13:30:16 +01:00
Xinpeng Sun
2e2dfe6673
avfilter: Add tonemap vaapi filter for H2S
...
It performs HDR(High Dynamic Range) to SDR(Standard Dynamic Range) conversion
with tone-mapping. It only supports HDR10 as input temporarily.
An example command to use this filter with vaapi codecs:
FFMPEG -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi \
-i INPUT -vf 'tonemap_vaapi=format=p010' -c:v hevc_vaapi -profile 2 OUTPUT
Signed-off-by: Xinpeng Sun <xinpeng.sun@intel.com>
Signed-off-by: Zachary Zhou <zachary.zhou@intel.com>
Signed-off-by: Ruiling Song <ruiling.song@intel.com>
2019-12-17 07:49:49 +08:00
Marton Balint
1f8e43938b
avfilter/x86/vf_interlace: always use unaligned movs
...
Fixes crashes in command lines such as:
ffmpeg -f lavfi -i testsrc2=704x576:r=50,interlace,pad=720:576:8 -f null none
Related to ticket #6491 .
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-12-15 00:23:03 +01:00
Marton Balint
4cd2cee7ed
avfilter/vf_interlace: do not interlace already interlaced frames
...
The filter used to work this way before it was merged into tinterlace.
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-12-15 00:23:03 +01:00
Marton Balint
6498522bef
avfilter/vf_tinterlace: add support for bypassing already interlaced frames
...
The old interlace filter worked this way before it was merged with tinterlace.
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-12-15 00:23:01 +01:00
Marton Balint
28b5dc6199
avfilter/vf_interlace: restore lowpass mode constants
...
The documentation still mentions numerical constants in addition to textual
ones. It is also wrong to use distinct modes as flags and it disallows us to
actually use the flags field for real flags in the future.
Signed-off-by: Marton Balint <cus@passwd.hu>
2019-12-14 22:53:56 +01:00
Guo, Yejun
ed9fc2e3c5
avfilter/vf_dnn_processing: refine code for better naming
...
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-12-13 11:41:10 -03:00
Paul B Mahol
824324db41
avfilter/vf_datascope: add decimal output
2019-12-13 12:51:47 +01:00
Michael Niedermayer
9d1f7870a9
avfilter: Fix type in av_log for random_seed in cellauto and life
...
Fixes CID 1456556 / 1456555
Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-12 21:40:53 +01:00
Gyan Doshi
78676ee8f8
avfilter/scale_eval: remove redundant mathematical constants
...
Even though removed from vf_scale in 3b316f9f22
, they were reintroduced
when scale.c, now scale_eval.c, was split off in 037bb4021c
2019-12-11 16:08:53 +05:30
Michael Niedermayer
a0ae4b7df9
Remove redundant ;
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-10 16:09:14 +01:00
Gyan Doshi
e73688eff4
avfilter: rename scale.c,h to scale_eval
...
scale.c is too generic; scale_eval is more representative
2019-12-10 12:55:48 +05:30
Gyan Doshi
1b4f473d18
avfilter/scale.c: factorize ff_scale_eval_dimensions
...
Adjustment of evaluated values shifted to ff_adjust_scale_dimensions
Shifted code for force_original_aspect_ratio and force_divisble_by from
vf_scale so it is now available for scale_cuda, scale_npp and
scale_vaapi as well.
2019-12-08 16:12:31 +05:30
Jun Zhao
46d2a67f80
lavfi/avf_showspectrum: Fix the memory leak in error handle path
...
Fix the memory leak in error handle path.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-12-07 14:08:08 +08:00
Limin Wang
5ee4c12ec2
avfilter/vsrc_life: Fix for random_seed type
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-06 11:25:29 +01:00
Limin Wang
1d757b111a
avfilter/vsrc_cellauto: Fix for random_seed type
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-06 11:25:29 +01:00
leozhang
0c7f9f714d
avfilter/vf_yaepblur: add yaepblur filter
...
Signed-off-by: leozhang <leozhang@qiyi.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-06 11:25:29 +01:00
Gyan Doshi
b66a800877
avfilter/crop: avoid premature eval error
...
Width and height expressions can refer to each other. Width is
evaluated twice to allow for reference to output height. So we
should not error out upon failure of first evaluation of width.
2019-12-06 10:19:47 +05:30
Limin Wang
0485033ae1
avfilter/vf_elbg: Fix for the seed type
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-04 20:17:00 +01:00
Andreas Rheinhardt
710ab13693
avfilter/vf_unsharp: Don't dereference NULL
...
The unsharp filter uses an array of arrays of uint32_t, each of which is
separately allocated. These arrays also need to freed separately; but
before doing so, one needs to check whether the array of arrays has
actually been allocated, otherwise one would dereference a NULL pointer.
This fixes #8408 .
Furthermore, the array of arrays needs to be zero-initialized so that
no uninitialized pointer will be freed in case an allocation of one of
the individual arrays fails.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-12-03 09:50:00 +01:00
Zhao Zhili
f9d4366912
avfilter/buffersrc: remove write-only variable
2019-12-02 17:28:16 +01:00
Paul B Mahol
8c2f81a17a
avfilter/vf_hqdn3d: add support for commands
2019-11-29 17:28:59 +01:00
Paul B Mahol
3a61297a67
avfilter/vf_hqdn3d: add support for 12bit and 14bit yuv formats
2019-11-29 17:28:59 +01:00
Limin Wang
c1ed00fd18
avfilter/vf_yadif: rename config_props -> config_output, link -> outlink
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-29 00:03:28 +01:00
Limin Wang
8aa143eaa8
avfilter/vf_libvmaf: Check for av_frame_alloc failure
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-28 18:44:01 +01:00
Limin Wang
3a6ec10d90
avfilter/vf_colorconstancy: av_frame_free(&in) in case of error or direct flag is false
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-28 18:44:01 +01:00
Paul B Mahol
93414ce831
avfilter: add axcorrelate filter
2019-11-23 11:54:20 +01:00
Paul B Mahol
aaac48fb50
avfilter/vf_normalize: add support for commands
2019-11-23 11:07:02 +01:00
Paul B Mahol
89aa1342b1
avfilter/af_aiir: normalize biquads only if divisor is big enough
2019-11-22 21:10:43 +01:00
Paul B Mahol
f46b04c4c3
avfilter/af_biquads: add new normalize/n option
2019-11-22 21:10:43 +01:00
Paul B Mahol
f2a01b4c8b
avfilter/af_aiir: fix biquads normalization
2019-11-22 20:24:29 +01:00
Paul B Mahol
eecc45cea5
avfilter/af_aiir: add missing normalization of biquads gains
2019-11-22 17:42:04 +01:00
Paul B Mahol
2f5fb9e60f
avfilter/af_aiir: make a/b coefficients array
2019-11-22 16:13:06 +01:00
Paul B Mahol
e169d3756e
avfilter/af_aiir: factor out response calculation
2019-11-22 16:07:03 +01:00
Paul B Mahol
c36e72ed27
avfilter/af_aiir: check for stability
2019-11-22 16:07:02 +01:00
Paul B Mahol
9cd56bb94c
avfilter/af_aiir: fix array length when selecting conjugate poles
2019-11-21 23:27:34 +01:00
Zhao Zhili
bbb68be0cc
avfilter/graphdump: fix use of uninitialized variables
...
In case of av_bprint_finalize failed.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-21 21:26:12 +01:00
leozhang
4a3aa77d74
avfilter/avfilter: fix indentation
...
Signed-off-by: leozhang <leozhang@qiyi.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-21 21:26:12 +01:00
Paul B Mahol
55ca21d54e
avfilter/vf_amplify: add timeline support
2019-11-21 18:34:07 +01:00
Paul B Mahol
103effebc1
avfilter/vf_datascope: add support for commands in oscilloscope
2019-11-21 18:08:48 +01:00
Paul B Mahol
c98d8b2bf5
avfilter/vsrc_sierpinski: change seed option type
2019-11-21 17:38:48 +01:00
Paul B Mahol
d83304d539
avfilter/vsrc_sierpinski: fix another typos
2019-11-21 17:35:35 +01:00
Paul B Mahol
09fd1b18f0
avfilter/vsrc_testsrc: simplify color filter commands parsing
2019-11-21 17:32:04 +01:00
Paul B Mahol
94c0b27397
avfilter/vf_chromakey: add support for commands
2019-11-21 17:19:40 +01:00
Paul B Mahol
ae6c4168e6
avfilter/vf_lumakey: add support for commands
2019-11-21 16:59:39 +01:00
Paul B Mahol
6b9862f614
avfilter/vf_lumakey: change options to doubles, so that values are automatically scaled
2019-11-21 16:52:48 +01:00
Paul B Mahol
08f7968fc4
avfilter/vf_lumakey: add support for 12bit yuva formats
2019-11-21 16:40:17 +01:00
Paul B Mahol
f89ebf88a1
avfilter/vf_scroll: add support for slice threading
2019-11-21 12:59:08 +01:00
Paul B Mahol
9bd4df1654
avfilter/vf_chromashift: add support for commands
2019-11-21 12:24:02 +01:00
Paul B Mahol
fbcb141c06
avfilter/vf_fillborders: add support for commands
2019-11-21 12:07:58 +01:00
Paul B Mahol
84e9a55d8e
avfilter/af_afftdn: simplify changing commands
2019-11-21 11:49:23 +01:00
Paul B Mahol
8e2a832a55
avfilter/vf_median: clip radius instead of erroring out
2019-11-21 11:21:31 +01:00
Paul B Mahol
7ead0daa24
avfilter/vf_median: add support for commands
2019-11-20 22:41:19 +01:00
Paul B Mahol
176ac987aa
avfilter/f_graphmonitor: output frames in pts gaps
2019-11-20 17:44:18 +01:00
Paul B Mahol
a16de215c9
avfilter/af_rubberband: fix sample overqueueing
...
Fixes #8389
2019-11-20 13:05:50 +01:00
Paul B Mahol
e21d4a7ca4
avfilter/vf_chromakey: add >8 bit support
2019-11-20 11:15:27 +01:00
Paul B Mahol
804fce8bc2
avfilter/vf_midequalizer: add 16bit formats
2019-11-19 13:08:07 +01:00
Paul B Mahol
258f66998f
avfilter/vf_deblock: add 12bit yuva formats
2019-11-19 12:43:26 +01:00
Paul B Mahol
18d25ecede
avfilter/vf_weave: pal and hwaccel formats are not supported
2019-11-19 12:35:55 +01:00
Paul B Mahol
5ed6b735ab
avfilter/vf_blend: cosmetics: reindent
2019-11-19 12:14:36 +01:00
Paul B Mahol
c8f269f24f
avfilter/vf_chromashift: remove unused header
...
Reverts ef479ee660
.
2019-11-19 10:37:12 +01:00
Gyan Doshi
0cfda90b34
avfilter/Makefile: add missing dependency for lut3d
...
lut3d requires framesync
2019-11-19 14:11:20 +05:30
Gyan Doshi
ef479ee660
avfilter/Makefile: add missing dependency for chromashift
...
chromashift requires framesync
2019-11-19 14:10:42 +05:30
Gyan Doshi
2ff444bd3a
avfilter/Makefile: add missing dependency for scale_cuda
...
scale_cuda includes scale.h
2019-11-19 12:07:03 +05:30
Paul B Mahol
6c2f866309
avfilter/vf_bm3d: improve threshold scaling with different block_size and depth
2019-11-19 00:12:47 +01:00
Paul B Mahol
eae292919b
avfilter/vf_dedot: add 12bit yuva formats
2019-11-18 18:35:32 +01:00
Paul B Mahol
fa00f80086
avfilter/vf_deflicker: add support for alpha formats
2019-11-18 18:35:32 +01:00
Paul B Mahol
9c85e1a091
avfilter/vf_amplify: add support for alpha formats
2019-11-18 18:35:32 +01:00
Paul B Mahol
2f7da8ca36
avfilter/vf_limiter: add 12bit yuva formats
2019-11-18 18:35:32 +01:00
Paul B Mahol
4670f8126a
avfilter/vf_fillborders: add 12bit yuva formats
2019-11-18 18:35:32 +01:00
Paul B Mahol
9277510766
avfilter/vf_premultiply: add support for 12bit yuva format
2019-11-18 18:35:32 +01:00
Paul B Mahol
a960d33112
avfilter/vf_chromashift: add 12bit yuva formats
2019-11-18 18:35:32 +01:00
Paul B Mahol
39a4d69d05
avfilter/vf_midequalizer: add 12bit yuva formats
2019-11-18 18:08:13 +01:00
Paul B Mahol
ee8fe9c94d
avfilter/vf_convolution: add 12bit yuva formats
2019-11-18 18:01:12 +01:00
Paul B Mahol
4b554382a0
avfilter/vf_neighbor: add 12bit yuva formats
2019-11-18 18:00:25 +01:00
Paul B Mahol
37bf725296
avfilter/vf_maskedminmax: add 12bit yuva formats
2019-11-18 17:56:34 +01:00
Paul B Mahol
be8487798a
avfilter/vf_maskedmerge: add 12bit yuva formats
2019-11-18 17:55:21 +01:00
Paul B Mahol
b565d63894
avfilter/vf_maskedclamp: add 12bit yuva formats
2019-11-18 17:53:45 +01:00
Paul B Mahol
69f5a77dec
avfilter/vf_scroll: add support for 12bit yuva formats
2019-11-18 17:50:05 +01:00
Paul B Mahol
c7abb07331
avfilter/vf_blend: add 12bit yuva formats
2019-11-18 17:47:35 +01:00
Paul B Mahol
619f530812
avfilter/vf_vaguedenoiser: add support for alpha formats
2019-11-18 17:44:10 +01:00
Paul B Mahol
76ef2ec471
avfilter/vf_bm3d: use boolean for ref option
2019-11-18 17:39:45 +01:00
Paul B Mahol
cb844376c3
avfilter/vf_fftdnoiz: add support for alpha formats
2019-11-18 17:36:56 +01:00
Paul B Mahol
3e524a11d9
avfilter/vf_bm3d: add support for alpha formats
2019-11-18 17:33:19 +01:00
Paul B Mahol
86f636348c
avfilter/vf_w3fdif: add support for more >8 bit alpha formats
2019-11-18 17:30:44 +01:00
Paul B Mahol
6a38538a09
avfilter/vf_avgblur: add support for 12bit yuva formats
2019-11-18 17:27:42 +01:00
Paul B Mahol
1b26f27026
avfilter/vf_gblur: add support for 12bit yuva formats
2019-11-18 17:26:59 +01:00
Paul B Mahol
97cf49b7fe
avfilter/vf_median: add support for 12bit yuva formats
2019-11-18 17:24:52 +01:00
Paul B Mahol
f490c71553
avfilter/vf_remap: add support for 12bit yuva format
2019-11-18 17:21:09 +01:00
Paul B Mahol
410f81f822
avfilter/vf_lut2: add 12bit depth alpha formats
2019-11-18 17:15:29 +01:00
Paul B Mahol
a50bd3a50e
avfilter/vf_atadenoise: support alpha formats
2019-11-18 17:06:59 +01:00
Paul B Mahol
73b730e3e6
avfilter/vf_xmedian: add support for alpha formats
2019-11-18 17:06:05 +01:00
Paul B Mahol
315a4496ea
avfilter/f_loop: switch aloop to activate
2019-11-17 16:20:58 +01:00
Paul B Mahol
2e7ccd493a
avfilter/f_loop: fix pts handling when timebase and 1/samplerate differ
2019-11-17 16:19:07 +01:00
Paul B Mahol
f7ad9a6c16
avfilter/af_sidechaincompress: fix pts handling when timebase and 1/samplerate differ
2019-11-17 12:30:10 +01:00
Paul B Mahol
b66acf4a34
avfilter/af_anlmdn: fix pts handling when timebase and 1/samplerate differ
2019-11-17 12:25:54 +01:00
Paul B Mahol
0a17a30150
avfilter/af_agate: fix pts handling when timebase and 1/samplerate differ
2019-11-17 12:23:48 +01:00
Paul B Mahol
115537f487
avfilter/af_afftdn: fix pts handling when timebase and 1/samplerate differ
2019-11-17 12:21:10 +01:00
Paul B Mahol
c588a0f528
avfilter/af_afftfilt: fix pts handling when timebase and 1/samplerate differ
2019-11-17 12:19:39 +01:00
Paul B Mahol
7db61bf0e3
avfilter/af_adeclick: fix pts handling when timebase and 1/samplerate differ
2019-11-17 12:17:51 +01:00
Paul B Mahol
90622f9e8f
avfilter/af_aecho: switch to activate
2019-11-17 11:57:52 +01:00
Paul B Mahol
9498ce0c23
avfilter/vf_framepack: really fix ef466a8b29
2019-11-17 00:23:03 +01:00
Paul B Mahol
9db24ee26d
avfilter/vf_framepack: switch to activate
2019-11-17 00:23:03 +01:00
Paul B Mahol
ef466a8b29
avfilter/vf_framepack: fix timestamps for frameseq format
2019-11-16 23:33:02 +01:00
Paul B Mahol
d52342a563
avfilter/vf_framepack: add missing filtering flag
2019-11-16 23:33:02 +01:00
Paul B Mahol
45f03cdd20
avfilter/vf_colorbalance: add support for commands
2019-11-13 13:07:42 +01:00
Paul B Mahol
bffd0f7b69
avfilter/vf_colorbalance: switch to floats
2019-11-13 13:07:42 +01:00
Paul B Mahol
d19fdc83b3
avfilter/vf_colorbalance: add option to preserve lightness
2019-11-13 13:07:42 +01:00
Paul B Mahol
08c46e40fb
avfilter/vF_colorbalance: rewrite, fixes filtering
2019-11-13 00:22:13 +01:00
Lou Logan
007e03348d
avfilter/Makefile: add missing framesync dependency to bm3d & mix filters
...
Signed-off-by: Lou Logan <lou@lrcd.com>
2019-11-08 09:37:31 -09:00
leozhang
c79307b7de
avfilter/vf_dnn_processing: correct duplicate statement
...
Signed-off-by: leozhang <leozhang@qiyi.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-08 14:57:01 +01:00
Guo, Yejun
f6e942251c
avfilter/vf_dnn_processing: fix fate-source
...
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-08 14:56:38 +01:00
Limin Wang
81271b3cce
avfilter/f_metadata: remove unneeded code
...
Reviewed-by: Steven Liu <lq@onvideo.cn>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2019-11-08 22:25:10 +09:00
Guo, Yejun
4d980a8ceb
avfilter/vf_dnn_processing: add a generic filter for image proccessing with dnn networks
...
This filter accepts all the dnn networks which do image processing.
Currently, frame with formats rgb24 and bgr24 are supported. Other
formats such as gray and YUV will be supported next. The dnn network
can accept data in float32 or uint8 format. And the dnn network can
change frame size.
The following is a python script to halve the value of the first
channel of the pixel. It demos how to setup and execute dnn model
with python+tensorflow. It also generates .pb file which will be
used by ffmpeg.
import tensorflow as tf
import numpy as np
import imageio
in_img = imageio.imread('in.bmp')
in_img = in_img.astype(np.float32)/255.0
in_data = in_img[np.newaxis, :]
filter_data = np.array([0.5, 0, 0, 0, 1., 0, 0, 0, 1.]).reshape(1,1,3,3).astype(np.float32)
filter = tf.Variable(filter_data)
x = tf.placeholder(tf.float32, shape=[1, None, None, 3], name='dnn_in')
y = tf.nn.conv2d(x, filter, strides=[1, 1, 1, 1], padding='VALID', name='dnn_out')
sess=tf.Session()
sess.run(tf.global_variables_initializer())
output = sess.run(y, feed_dict={x: in_data})
graph_def = tf.graph_util.convert_variables_to_constants(sess, sess.graph_def, ['dnn_out'])
tf.train.write_graph(graph_def, '.', 'halve_first_channel.pb', as_text=False)
output = output * 255.0
output = output.astype(np.uint8)
imageio.imsave("out.bmp", np.squeeze(output))
To do the same thing with ffmpeg:
- generate halve_first_channel.pb with the above script
- generate halve_first_channel.model with tools/python/convert.py
- try with following commands
./ffmpeg -i input.jpg -vf dnn_processing=model=halve_first_channel.model:input=dnn_in:output=dnn_out:fmt=rgb24:dnn_backend=native -y out.native.png
./ffmpeg -i input.jpg -vf dnn_processing=model=halve_first_channel.pb:input=dnn_in:output=dnn_out:fmt=rgb24:dnn_backend=tensorflow -y out.tf.png
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-11-07 15:46:00 -03:00
Limin Wang
99fc5059fb
avfilter/vf_lut3d: simplify code
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-11-01 14:43:16 +01:00
Paul B Mahol
b414cff630
avfilter/vf_median: add radiusV option
2019-10-31 10:32:43 +01:00
Paul B Mahol
86a42e954e
avfilter/af_afade: start crossfading only when first stream reached end
2019-10-31 10:23:59 +01:00
Paul B Mahol
89389b7ed4
avfilter/af_afade: check for eof after crossfade later
...
Fixes memleaks and #8346
2019-10-30 19:07:19 +01:00
Zhao Zhili
af70c94c63
avfilter/f_sidedata: fix Wtautological-constant-out-of-range-compare
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-30 18:09:00 +01:00
Guo, Yejun
912ab246f1
avfilter/vf_sr: correct flags since the filter changes frame w/h
...
If filter changes frame w/h, AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
cannot be supported.
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-10-30 12:01:52 -03:00
Guo, Yejun
f4b3c0e55c
avfilter/dnn: add a new interface to query dnn model's input info
...
to support dnn networks more general, we need to know the input info
of the dnn model.
background:
The data type of dnn model's input could be float32, uint8 or fp16, etc.
And the w/h of input image could be fixed or variable.
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-10-30 11:07:06 -03:00
Guo, Yejun
e1b45b8596
avfilter/dnn: get the data type of network output from dnn execution result
...
so, we can make a filter more general to accept different network
models, by adding a data type convertion after getting data from network.
After we add dt field into struct DNNData, it becomes the same as
DNNInputData, so merge them with one struct: DNNData.
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-10-30 11:00:41 -03:00
Guo, Yejun
dff39ea9f0
dnn: add tf.nn.conv2d support for native model
...
Unlike other tf.*.conv2d layers, tf.nn.conv2d does not create many
nodes (within a scope) in the graph, it just acts like other layers.
tf.nn.conv2d only creates one node in the graph, and no internal
nodes such as 'kernel' are created.
The format of native model file is also changed, a flag named
has_bias is added, so change the version number.
Signed-off-by: Guo, Yejun <yejun.guo@intel.com>
Signed-off-by: Pedro Arthur <bygrandao@gmail.com>
2019-10-30 10:31:55 -03:00
Limin Wang
e1c4ce4761
avfilter/asrc_anoisesrc: change color variable to int
...
Or it'll cause invalid color and s->filter is NULL.
Please reproduce it with below command on big endian system:
$ ./ffmpeg -f lavfi -i "anoisesrc=d=60:c=1:r=48000" -f s16le -c:a pcm_s16le -f
null -
Segmentation fault (core dumped)
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-29 16:20:33 +01:00
Paul B Mahol
3420e56d9a
avfilter/vf_vfrdet: also report average delta
2019-10-29 13:07:08 +01:00
Paul B Mahol
4ce263a7fd
avfilter/vf_vfrdet: fix reporting max delta
...
If only first delta was big it was previously discarded.
2019-10-29 12:57:58 +01:00
Paul B Mahol
1c3b70e2e0
avfilter: add median filter
2019-10-29 10:56:04 +01:00
James Almer
1aa4fc1ec2
avfilter/avf_showfreqs: free input frame after using it
...
Fixes ticket #8336 .
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-26 10:16:02 -03:00
Paul B Mahol
4447aeaac2
avfilter/vsrc_testsrc: increase max level of haldclutsrc
...
So it matches lut3d and haldclut filter.
2019-10-26 10:32:20 +02:00
Paul B Mahol
a2210f10d3
avfilter/vf_lut3d: increase max level to upper limit defined by cube format specification
2019-10-26 10:32:20 +02:00
Paul B Mahol
9130028d87
avfilter/vf_lut3d: allocate 3d lut dynamically
2019-10-26 10:32:20 +02:00
Paul B Mahol
9e283aa24e
avfilter/vf_psnr,vf_ssim: add warning if different timebases are encountered
2019-10-25 22:02:41 +02:00
Paul B Mahol
f166951d6e
avfilter: add maskedmin/maskedmax filters
2019-10-24 20:54:33 +02:00
Paul B Mahol
ac0f5f4c17
avfilter/vf_maskedclamp: add x86 SIMD
2019-10-23 16:20:21 +02:00
Paul B Mahol
7df808ea84
avfilter/settb: switch to activate
...
Now correctly updates EOF timestamp.
2019-10-23 12:37:46 +02:00
Paul B Mahol
8732eb124e
avfilter/vf_floodfill: better fix for crash
2019-10-23 10:20:57 +02:00
Paul B Mahol
1cdc805228
avfilter/vf_floodfill: add more gray formats
2019-10-23 10:04:15 +02:00
Paul B Mahol
ba7d55d3fc
avfilter/vf_deband: add more gray formats
2019-10-23 09:54:36 +02:00
Jun Zhao
0e3d5bdc08
lavfi/bilateral: Clean the option description and unused code
...
Clean the option description and unused code.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2019-10-23 15:47:27 +08:00
Paul B Mahol
7832e05c35
avfilter/vf_lut2: fix typo, correctly support gray14
2019-10-23 09:44:08 +02:00
Paul B Mahol
1f327f5d27
avfilter/vf_bm3d: add gray14 format
2019-10-23 09:37:18 +02:00
Paul B Mahol
dd239bdb65
avfilter/vf_vaguedenoiser: add more gray formats
2019-10-23 09:31:09 +02:00
Paul B Mahol
ec5d385722
avfilter/transpose: add missing headers
2019-10-22 19:53:50 +02:00
James Almer
738bc3e742
x86/vf_transpose: make ff_transpose_8x8_16_sse2 work on x86_32
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-22 13:51:13 -03:00
Paul B Mahol
2a75006ddc
avfilter/vf_maskedclamp: rewrite using macro
2019-10-22 18:10:03 +02:00
Paul B Mahol
5561a1de90
avfilter/vf_premultiply: fix signed integer overflow
...
Fixes #8324
2019-10-22 10:38:16 +02:00
Limin Wang
887db36821
avfilter/vsrc_mptestsrc: simplify the code and change the type of frame
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-21 22:57:10 +02:00
Limin Wang
6079bd5c63
avfilter/vsrc_mptestsrc: add options to set the maximum number of frames
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-21 22:57:10 +02:00
Limin Wang
7a477c4b63
avfilter/vf_unsharp: rename config_props -> config_input, link -> inlink
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2019-10-21 22:57:10 +02:00
James Almer
27bae5aaca
x86/vf_transpose: fix cpuflags check
...
Signed-off-by: James Almer <jamrial@gmail.com>
2019-10-21 17:01:39 -03:00
Paul B Mahol
ccd9bca15a
avfilter/vf_transpose: add x86 SIMD
2019-10-21 20:37:51 +02:00
Paul B Mahol
f7f4691f9f
avfilter/x86/vf_atadenoise: fix comment
2019-10-21 17:56:45 +02:00
Paul B Mahol
aa26f83bdd
avfilter/af_join: fix possible memory leaks
...
Allocation of input frames is independent from
allocation of new input pads.
2019-10-21 16:04:48 +02:00
Limin Wang
9c3178808d
avfilter/af_silencedetect: change mono default to integer literal
...
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
2019-10-21 15:42:04 +05:30
Limin Wang
190f52ba3b
avfilter/af_silencedetect: use AV_OPT_TYPE_DURATION
...
Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2019-10-21 15:42:04 +05:30
Paul B Mahol
c6e01ebe41
avfilter: add bilateral filter
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2019-10-21 11:48:24 +02:00
Paul B Mahol
a174e5f8da
avfilter/vf_nlmeans: round values toward nearest integer
...
Instead of rounding toward zero and thus producing
darker output.
2019-10-21 09:26:41 +02:00
Limin Wang
0afc1fe147
avfilter/af_silencedetect: document metadata
...
Reviewed-by: Moritz Barsnick <barsnick@gmx.net>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2019-10-21 10:22:38 +05:30
Paul B Mahol
673fce6d40
avfilter/vf_tile: fix memory leak
...
Fixes #8313
2019-10-20 18:06:26 +02:00
Paul B Mahol
357f11eca2
avfilter/vf_atadenoise: add support for commands
2019-10-20 12:10:16 +02:00
Paul B Mahol
824b026d91
avfilter/vf_shuffleframes: improve error message
2019-10-20 11:39:24 +02:00
Paul B Mahol
58bb9d3a3a
avfilter/af_tremolo: fix heap-buffer overflow
...
Fixes #8317
2019-10-19 19:34:47 +02:00
Paul B Mahol
26876fdb5e
avfilter/vf_fftdnoiz: round toward nearest integer
...
Instead of rounding toward zero and thus producing
darker output.
2019-10-19 19:07:28 +02:00
Paul B Mahol
a60232ab2d
avfilter/vf_bm3d: round values toward nearest integer
...
Instead of rounding toward zero and thus producing
darker output.
2019-10-19 18:53:48 +02:00
Paul B Mahol
7080bbfef4
avfilter/vf_bm3d: forward status back
2019-10-19 18:46:14 +02:00
Paul B Mahol
7056ddc0e0
avfilter/vf_fieldhint: add support for duplicating fields
...
Fixes #7066
2019-10-19 13:08:37 +02:00
Paul B Mahol
ce5274c138
avfilter/vf_fieldmatch: fix heap-buffer overflow
...
Also fix use of uninitialized values.
Fixes #8239
2019-10-19 11:58:34 +02:00
Paul B Mahol
c8f3915f8d
avfilter/vf_decimate: fix memory leaks
...
Fixes #8311
2019-10-19 10:18:35 +02:00
Paul B Mahol
723d69f99c
avfilter/vf_lagfun: fix heap-buffer overflow
...
Fixes #8310
2019-10-19 09:56:53 +02:00
Paul B Mahol
d4d6b7b035
avfilter/vf_datascope: fix heap buffer overflow
...
Fixes #8309
2019-10-19 09:50:53 +02:00
Paul B Mahol
0528adbd85
avfilter/vf_shuffleplanes: add mising query_formats()
...
Fixes #8298
2019-10-18 23:24:06 +02:00
Paul B Mahol
3b580f9dfe
avfilter/vf_maskfun: fix memleak
...
Fixes #8305
2019-10-18 21:57:20 +02:00