summaryrefslogtreecommitdiffstats
path: root/libavfilter
Commit message (Collapse)AuthorAgeFilesLines
* avfilter/Makefile: add missing framesync dependency to bm3d & mix filtersLou Logan2019-11-081-2/+2
| | | | Signed-off-by: Lou Logan <lou@lrcd.com>
* avfilter/vf_dnn_processing: correct duplicate statementleozhang2019-11-081-2/+2
| | | | | Signed-off-by: leozhang <leozhang@qiyi.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_dnn_processing: fix fate-sourceGuo, Yejun2019-11-081-1/+1
| | | | | Signed-off-by: Guo, Yejun <yejun.guo@intel.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/f_metadata: remove unneeded codeLimin Wang2019-11-081-4/+0
| | | | | Reviewed-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_dnn_processing: add a generic filter for image proccessing with ↵Guo, Yejun2019-11-073-0/+333
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* avfilter/vf_lut3d: simplify codeLimin Wang2019-11-011-48/+6
| | | | | | | 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>
* avfilter/vf_median: add radiusV optionPaul B Mahol2019-10-313-11/+15
|
* avfilter/af_afade: start crossfading only when first stream reached endPaul B Mahol2019-10-311-1/+1
|
* avfilter/af_afade: check for eof after crossfade laterPaul B Mahol2019-10-301-6/+6
| | | | Fixes memleaks and #8346
* avfilter/f_sidedata: fix Wtautological-constant-out-of-range-compareZhao Zhili2019-10-301-1/+1
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_sr: correct flags since the filter changes frame w/hGuo, Yejun2019-10-301-1/+0
| | | | | | | | 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>
* avfilter/dnn: add a new interface to query dnn model's input infoGuo, Yejun2019-10-303-1/+58
| | | | | | | | | | | | 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>
* avfilter/dnn: get the data type of network output from dnn execution resultGuo, Yejun2019-10-308-13/+13
| | | | | | | | | | | 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>
* dnn: add tf.nn.conv2d support for native modelGuo, Yejun2019-10-303-11/+29
| | | | | | | | | | | | | 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>
* avfilter/asrc_anoisesrc: change color variable to intLimin Wang2019-10-291-1/+1
| | | | | | | | | | | | 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>
* avfilter/vf_vfrdet: also report average deltaPaul B Mahol2019-10-291-1/+3
|
* avfilter/vf_vfrdet: fix reporting max deltaPaul B Mahol2019-10-291-0/+2
| | | | If only first delta was big it was previously discarded.
* avfilter: add median filterPaul B Mahol2019-10-296-1/+487
|
* avfilter/avf_showfreqs: free input frame after using itJames Almer2019-10-261-0/+1
| | | | | | | Fixes ticket #8336. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vsrc_testsrc: increase max level of haldclutsrcPaul B Mahol2019-10-261-1/+1
| | | | So it matches lut3d and haldclut filter.
* avfilter/vf_lut3d: increase max level to upper limit defined by cube format ↵Paul B Mahol2019-10-261-1/+1
| | | | specification
* avfilter/vf_lut3d: allocate 3d lut dynamicallyPaul B Mahol2019-10-261-59/+111
|
* avfilter/vf_psnr,vf_ssim: add warning if different timebases are encounteredPaul B Mahol2019-10-252-0/+16
|
* avfilter: add maskedmin/maskedmax filtersPaul B Mahol2019-10-244-1/+364
|
* avfilter/vf_maskedclamp: add x86 SIMDPaul B Mahol2019-10-235-7/+190
|
* avfilter/settb: switch to activatePaul B Mahol2019-10-231-7/+44
| | | | Now correctly updates EOF timestamp.
* avfilter/vf_floodfill: better fix for crashPaul B Mahol2019-10-231-11/+16
|
* avfilter/vf_floodfill: add more gray formatsPaul B Mahol2019-10-231-22/+7
|
* avfilter/vf_deband: add more gray formatsPaul B Mahol2019-10-231-1/+2
|
* lavfi/bilateral: Clean the option description and unused codeJun Zhao2019-10-231-6/+1
| | | | | | | Clean the option description and unused code. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* avfilter/vf_lut2: fix typo, correctly support gray14Paul B Mahol2019-10-231-1/+1
|
* avfilter/vf_bm3d: add gray14 formatPaul B Mahol2019-10-231-3/+2
|
* avfilter/vf_vaguedenoiser: add more gray formatsPaul B Mahol2019-10-231-2/+2
|
* avfilter/transpose: add missing headersPaul B Mahol2019-10-221-0/+3
|
* x86/vf_transpose: make ff_transpose_8x8_16_sse2 work on x86_32James Almer2019-10-222-7/+6
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_maskedclamp: rewrite using macroPaul B Mahol2019-10-221-89/+58
|
* avfilter/vf_premultiply: fix signed integer overflowPaul B Mahol2019-10-221-2/+2
| | | | Fixes #8324
* avfilter/vsrc_mptestsrc: simplify the code and change the type of frameLimin Wang2019-10-211-13/+14
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vsrc_mptestsrc: add options to set the maximum number of framesLimin Wang2019-10-211-12/+17
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avfilter/vf_unsharp: rename config_props -> config_input, link -> inlinkLimin Wang2019-10-211-8/+8
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* x86/vf_transpose: fix cpuflags checkJames Almer2019-10-211-2/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avfilter/vf_transpose: add x86 SIMDPaul B Mahol2019-10-215-8/+157
|
* avfilter/x86/vf_atadenoise: fix commentPaul B Mahol2019-10-211-1/+1
|
* avfilter/af_join: fix possible memory leaksPaul B Mahol2019-10-211-1/+4
| | | | | Allocation of input frames is independent from allocation of new input pads.
* avfilter/af_silencedetect: change mono default to integer literalLimin Wang2019-10-211-2/+2
| | | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com> Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
* avfilter/af_silencedetect: use AV_OPT_TYPE_DURATIONLimin Wang2019-10-211-4/+6
| | | | | Reviewed-by: Moritz Barsnick <barsnick@gmx.net> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter: add bilateral filterPaul B Mahol2019-10-214-1/+378
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avfilter/vf_nlmeans: round values toward nearest integerPaul B Mahol2019-10-211-1/+1
| | | | | Instead of rounding toward zero and thus producing darker output.
* avfilter/af_silencedetect: document metadataLimin Wang2019-10-211-1/+0
| | | | | Reviewed-by: Moritz Barsnick <barsnick@gmx.net> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* avfilter/vf_tile: fix memory leakPaul B Mahol2019-10-201-0/+1
| | | | Fixes #8313
OpenPOWER on IntegriCloud