2008-02-15 22:02:51 +00:00
|
|
|
/*
|
|
|
|
* filter registration
|
2010-11-28 10:22:58 +00:00
|
|
|
* Copyright (c) 2008 Vitor Sessak
|
2008-02-15 22:02:51 +00:00
|
|
|
*
|
|
|
|
* This file is part of FFmpeg.
|
|
|
|
*
|
|
|
|
* FFmpeg is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with FFmpeg; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
2017-03-07 08:54:44 +00:00
|
|
|
#include "libavutil/thread.h"
|
2008-02-15 22:02:51 +00:00
|
|
|
#include "avfilter.h"
|
2012-08-06 13:49:32 +00:00
|
|
|
#include "config.h"
|
2008-02-15 22:02:51 +00:00
|
|
|
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_abench;
|
|
|
|
extern AVFilter ff_af_acompressor;
|
|
|
|
extern AVFilter ff_af_acontrast;
|
|
|
|
extern AVFilter ff_af_acopy;
|
2018-06-28 22:03:04 +00:00
|
|
|
extern AVFilter ff_af_acue;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_acrossfade;
|
2018-05-31 15:24:23 +00:00
|
|
|
extern AVFilter ff_af_acrossover;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_acrusher;
|
2018-01-08 14:02:59 +00:00
|
|
|
extern AVFilter ff_af_adeclick;
|
|
|
|
extern AVFilter ff_af_adeclip;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_adelay;
|
2018-05-14 08:07:44 +00:00
|
|
|
extern AVFilter ff_af_aderivative;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_aecho;
|
|
|
|
extern AVFilter ff_af_aemphasis;
|
|
|
|
extern AVFilter ff_af_aeval;
|
|
|
|
extern AVFilter ff_af_afade;
|
2018-09-17 15:41:56 +00:00
|
|
|
extern AVFilter ff_af_afftdn;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_afftfilt;
|
|
|
|
extern AVFilter ff_af_afir;
|
|
|
|
extern AVFilter ff_af_aformat;
|
|
|
|
extern AVFilter ff_af_agate;
|
|
|
|
extern AVFilter ff_af_aiir;
|
2018-05-14 08:07:44 +00:00
|
|
|
extern AVFilter ff_af_aintegral;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_ainterleave;
|
|
|
|
extern AVFilter ff_af_alimiter;
|
|
|
|
extern AVFilter ff_af_allpass;
|
|
|
|
extern AVFilter ff_af_aloop;
|
|
|
|
extern AVFilter ff_af_amerge;
|
|
|
|
extern AVFilter ff_af_ametadata;
|
|
|
|
extern AVFilter ff_af_amix;
|
2018-09-12 09:12:21 +00:00
|
|
|
extern AVFilter ff_af_amultiply;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_anequalizer;
|
2018-05-19 20:06:27 +00:00
|
|
|
extern AVFilter ff_af_anlmdn;
|
2019-10-03 16:09:59 +00:00
|
|
|
extern AVFilter ff_af_anlms;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_anull;
|
|
|
|
extern AVFilter ff_af_apad;
|
|
|
|
extern AVFilter ff_af_aperms;
|
|
|
|
extern AVFilter ff_af_aphaser;
|
|
|
|
extern AVFilter ff_af_apulsator;
|
|
|
|
extern AVFilter ff_af_arealtime;
|
|
|
|
extern AVFilter ff_af_aresample;
|
|
|
|
extern AVFilter ff_af_areverse;
|
2019-07-26 08:38:31 +00:00
|
|
|
extern AVFilter ff_af_arnndn;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_aselect;
|
|
|
|
extern AVFilter ff_af_asendcmd;
|
|
|
|
extern AVFilter ff_af_asetnsamples;
|
|
|
|
extern AVFilter ff_af_asetpts;
|
|
|
|
extern AVFilter ff_af_asetrate;
|
|
|
|
extern AVFilter ff_af_asettb;
|
|
|
|
extern AVFilter ff_af_ashowinfo;
|
|
|
|
extern AVFilter ff_af_asidedata;
|
2019-04-16 17:55:27 +00:00
|
|
|
extern AVFilter ff_af_asoftclip;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_asplit;
|
2019-05-05 13:01:53 +00:00
|
|
|
extern AVFilter ff_af_asr;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_astats;
|
|
|
|
extern AVFilter ff_af_astreamselect;
|
|
|
|
extern AVFilter ff_af_atempo;
|
|
|
|
extern AVFilter ff_af_atrim;
|
2019-11-14 20:16:18 +00:00
|
|
|
extern AVFilter ff_af_axcorrelate;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_azmq;
|
|
|
|
extern AVFilter ff_af_bandpass;
|
|
|
|
extern AVFilter ff_af_bandreject;
|
|
|
|
extern AVFilter ff_af_bass;
|
|
|
|
extern AVFilter ff_af_biquad;
|
|
|
|
extern AVFilter ff_af_bs2b;
|
2019-10-27 14:48:16 +00:00
|
|
|
extern AVFilter ff_vf_chromaber_vulkan;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_channelmap;
|
|
|
|
extern AVFilter ff_af_channelsplit;
|
|
|
|
extern AVFilter ff_af_chorus;
|
|
|
|
extern AVFilter ff_af_compand;
|
|
|
|
extern AVFilter ff_af_compensationdelay;
|
|
|
|
extern AVFilter ff_af_crossfeed;
|
|
|
|
extern AVFilter ff_af_crystalizer;
|
|
|
|
extern AVFilter ff_af_dcshift;
|
2019-06-30 14:35:07 +00:00
|
|
|
extern AVFilter ff_af_deesser;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_drmeter;
|
|
|
|
extern AVFilter ff_af_dynaudnorm;
|
|
|
|
extern AVFilter ff_af_earwax;
|
|
|
|
extern AVFilter ff_af_ebur128;
|
|
|
|
extern AVFilter ff_af_equalizer;
|
|
|
|
extern AVFilter ff_af_extrastereo;
|
|
|
|
extern AVFilter ff_af_firequalizer;
|
|
|
|
extern AVFilter ff_af_flanger;
|
|
|
|
extern AVFilter ff_af_haas;
|
|
|
|
extern AVFilter ff_af_hdcd;
|
|
|
|
extern AVFilter ff_af_headphone;
|
|
|
|
extern AVFilter ff_af_highpass;
|
2018-04-17 09:31:34 +00:00
|
|
|
extern AVFilter ff_af_highshelf;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_join;
|
|
|
|
extern AVFilter ff_af_ladspa;
|
|
|
|
extern AVFilter ff_af_loudnorm;
|
|
|
|
extern AVFilter ff_af_lowpass;
|
2018-04-17 09:31:34 +00:00
|
|
|
extern AVFilter ff_af_lowshelf;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_af_lv2;
|
|
|
|
extern AVFilter ff_af_mcompand;
|
|
|
|
extern AVFilter ff_af_pan;
|
|
|
|
extern AVFilter ff_af_replaygain;
|
|
|
|
extern AVFilter ff_af_resample;
|
|
|
|
extern AVFilter ff_af_rubberband;
|
|
|
|
extern AVFilter ff_af_sidechaincompress;
|
|
|
|
extern AVFilter ff_af_sidechaingate;
|
|
|
|
extern AVFilter ff_af_silencedetect;
|
|
|
|
extern AVFilter ff_af_silenceremove;
|
|
|
|
extern AVFilter ff_af_sofalizer;
|
|
|
|
extern AVFilter ff_af_stereotools;
|
|
|
|
extern AVFilter ff_af_stereowiden;
|
|
|
|
extern AVFilter ff_af_superequalizer;
|
|
|
|
extern AVFilter ff_af_surround;
|
|
|
|
extern AVFilter ff_af_treble;
|
|
|
|
extern AVFilter ff_af_tremolo;
|
|
|
|
extern AVFilter ff_af_vibrato;
|
|
|
|
extern AVFilter ff_af_volume;
|
|
|
|
extern AVFilter ff_af_volumedetect;
|
2008-02-15 22:02:51 +00:00
|
|
|
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_asrc_aevalsrc;
|
2020-01-31 17:07:35 +00:00
|
|
|
extern AVFilter ff_asrc_afirsrc;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_asrc_anoisesrc;
|
|
|
|
extern AVFilter ff_asrc_anullsrc;
|
|
|
|
extern AVFilter ff_asrc_flite;
|
|
|
|
extern AVFilter ff_asrc_hilbert;
|
2017-12-19 10:15:11 +00:00
|
|
|
extern AVFilter ff_asrc_sinc;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_asrc_sine;
|
2008-02-15 22:02:51 +00:00
|
|
|
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_asink_anullsink;
|
|
|
|
|
2019-07-07 19:26:50 +00:00
|
|
|
extern AVFilter ff_vf_addroi;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_alphaextract;
|
|
|
|
extern AVFilter ff_vf_alphamerge;
|
2018-04-27 16:13:38 +00:00
|
|
|
extern AVFilter ff_vf_amplify;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_ass;
|
|
|
|
extern AVFilter ff_vf_atadenoise;
|
|
|
|
extern AVFilter ff_vf_avgblur;
|
|
|
|
extern AVFilter ff_vf_avgblur_opencl;
|
2019-10-27 14:47:18 +00:00
|
|
|
extern AVFilter ff_vf_avgblur_vulkan;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_bbox;
|
|
|
|
extern AVFilter ff_vf_bench;
|
2018-05-13 16:26:50 +00:00
|
|
|
extern AVFilter ff_vf_bilateral;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_bitplanenoise;
|
|
|
|
extern AVFilter ff_vf_blackdetect;
|
|
|
|
extern AVFilter ff_vf_blackframe;
|
|
|
|
extern AVFilter ff_vf_blend;
|
2018-05-09 10:58:23 +00:00
|
|
|
extern AVFilter ff_vf_bm3d;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_boxblur;
|
2018-06-20 01:33:02 +00:00
|
|
|
extern AVFilter ff_vf_boxblur_opencl;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_bwdif;
|
2020-02-10 17:10:55 +00:00
|
|
|
extern AVFilter ff_vf_cas;
|
2018-10-18 10:08:47 +00:00
|
|
|
extern AVFilter ff_vf_chromahold;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_chromakey;
|
2018-11-17 13:04:16 +00:00
|
|
|
extern AVFilter ff_vf_chromashift;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_ciescope;
|
|
|
|
extern AVFilter ff_vf_codecview;
|
|
|
|
extern AVFilter ff_vf_colorbalance;
|
|
|
|
extern AVFilter ff_vf_colorchannelmixer;
|
|
|
|
extern AVFilter ff_vf_colorkey;
|
2019-04-17 02:08:49 +00:00
|
|
|
extern AVFilter ff_vf_colorkey_opencl;
|
2019-01-13 18:02:52 +00:00
|
|
|
extern AVFilter ff_vf_colorhold;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_colorlevels;
|
|
|
|
extern AVFilter ff_vf_colormatrix;
|
|
|
|
extern AVFilter ff_vf_colorspace;
|
|
|
|
extern AVFilter ff_vf_convolution;
|
|
|
|
extern AVFilter ff_vf_convolution_opencl;
|
|
|
|
extern AVFilter ff_vf_convolve;
|
|
|
|
extern AVFilter ff_vf_copy;
|
|
|
|
extern AVFilter ff_vf_coreimage;
|
|
|
|
extern AVFilter ff_vf_cover_rect;
|
|
|
|
extern AVFilter ff_vf_crop;
|
|
|
|
extern AVFilter ff_vf_cropdetect;
|
2018-06-28 22:03:04 +00:00
|
|
|
extern AVFilter ff_vf_cue;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_curves;
|
|
|
|
extern AVFilter ff_vf_datascope;
|
|
|
|
extern AVFilter ff_vf_dctdnoiz;
|
|
|
|
extern AVFilter ff_vf_deband;
|
2018-04-17 15:33:00 +00:00
|
|
|
extern AVFilter ff_vf_deblock;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_decimate;
|
|
|
|
extern AVFilter ff_vf_deconvolve;
|
2018-11-13 13:13:10 +00:00
|
|
|
extern AVFilter ff_vf_dedot;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_deflate;
|
|
|
|
extern AVFilter ff_vf_deflicker;
|
|
|
|
extern AVFilter ff_vf_deinterlace_qsv;
|
|
|
|
extern AVFilter ff_vf_deinterlace_vaapi;
|
|
|
|
extern AVFilter ff_vf_dejudder;
|
|
|
|
extern AVFilter ff_vf_delogo;
|
|
|
|
extern AVFilter ff_vf_denoise_vaapi;
|
2019-05-30 12:35:17 +00:00
|
|
|
extern AVFilter ff_vf_derain;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_deshake;
|
2019-08-08 13:24:32 +00:00
|
|
|
extern AVFilter ff_vf_deshake_opencl;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_despill;
|
|
|
|
extern AVFilter ff_vf_detelecine;
|
|
|
|
extern AVFilter ff_vf_dilation;
|
2018-08-12 20:12:08 +00:00
|
|
|
extern AVFilter ff_vf_dilation_opencl;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_displace;
|
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-10-31 08:33:02 +00:00
|
|
|
extern AVFilter ff_vf_dnn_processing;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_doubleweave;
|
|
|
|
extern AVFilter ff_vf_drawbox;
|
|
|
|
extern AVFilter ff_vf_drawgraph;
|
|
|
|
extern AVFilter ff_vf_drawgrid;
|
|
|
|
extern AVFilter ff_vf_drawtext;
|
|
|
|
extern AVFilter ff_vf_edgedetect;
|
|
|
|
extern AVFilter ff_vf_elbg;
|
|
|
|
extern AVFilter ff_vf_entropy;
|
|
|
|
extern AVFilter ff_vf_eq;
|
|
|
|
extern AVFilter ff_vf_erosion;
|
2018-08-12 20:12:08 +00:00
|
|
|
extern AVFilter ff_vf_erosion_opencl;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_extractplanes;
|
|
|
|
extern AVFilter ff_vf_fade;
|
2018-05-06 09:50:52 +00:00
|
|
|
extern AVFilter ff_vf_fftdnoiz;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_fftfilt;
|
|
|
|
extern AVFilter ff_vf_field;
|
|
|
|
extern AVFilter ff_vf_fieldhint;
|
|
|
|
extern AVFilter ff_vf_fieldmatch;
|
|
|
|
extern AVFilter ff_vf_fieldorder;
|
|
|
|
extern AVFilter ff_vf_fillborders;
|
|
|
|
extern AVFilter ff_vf_find_rect;
|
|
|
|
extern AVFilter ff_vf_floodfill;
|
|
|
|
extern AVFilter ff_vf_format;
|
|
|
|
extern AVFilter ff_vf_fps;
|
|
|
|
extern AVFilter ff_vf_framepack;
|
|
|
|
extern AVFilter ff_vf_framerate;
|
|
|
|
extern AVFilter ff_vf_framestep;
|
2018-11-04 21:22:24 +00:00
|
|
|
extern AVFilter ff_vf_freezedetect;
|
2019-12-31 11:00:30 +00:00
|
|
|
extern AVFilter ff_vf_freezeframes;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_frei0r;
|
|
|
|
extern AVFilter ff_vf_fspp;
|
|
|
|
extern AVFilter ff_vf_gblur;
|
|
|
|
extern AVFilter ff_vf_geq;
|
|
|
|
extern AVFilter ff_vf_gradfun;
|
2018-10-27 17:17:08 +00:00
|
|
|
extern AVFilter ff_vf_graphmonitor;
|
2018-07-16 08:20:02 +00:00
|
|
|
extern AVFilter ff_vf_greyedge;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_haldclut;
|
|
|
|
extern AVFilter ff_vf_hflip;
|
|
|
|
extern AVFilter ff_vf_histeq;
|
|
|
|
extern AVFilter ff_vf_histogram;
|
|
|
|
extern AVFilter ff_vf_hqdn3d;
|
|
|
|
extern AVFilter ff_vf_hqx;
|
|
|
|
extern AVFilter ff_vf_hstack;
|
|
|
|
extern AVFilter ff_vf_hue;
|
|
|
|
extern AVFilter ff_vf_hwdownload;
|
|
|
|
extern AVFilter ff_vf_hwmap;
|
|
|
|
extern AVFilter ff_vf_hwupload;
|
|
|
|
extern AVFilter ff_vf_hwupload_cuda;
|
|
|
|
extern AVFilter ff_vf_hysteresis;
|
|
|
|
extern AVFilter ff_vf_idet;
|
|
|
|
extern AVFilter ff_vf_il;
|
|
|
|
extern AVFilter ff_vf_inflate;
|
|
|
|
extern AVFilter ff_vf_interlace;
|
|
|
|
extern AVFilter ff_vf_interleave;
|
|
|
|
extern AVFilter ff_vf_kerndeint;
|
2019-04-15 20:00:00 +00:00
|
|
|
extern AVFilter ff_vf_lagfun;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_lenscorrection;
|
2018-07-13 10:33:12 +00:00
|
|
|
extern AVFilter ff_vf_lensfun;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_libvmaf;
|
|
|
|
extern AVFilter ff_vf_limiter;
|
|
|
|
extern AVFilter ff_vf_loop;
|
|
|
|
extern AVFilter ff_vf_lumakey;
|
|
|
|
extern AVFilter ff_vf_lut;
|
2018-08-23 07:34:44 +00:00
|
|
|
extern AVFilter ff_vf_lut1d;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_lut2;
|
|
|
|
extern AVFilter ff_vf_lut3d;
|
|
|
|
extern AVFilter ff_vf_lutrgb;
|
|
|
|
extern AVFilter ff_vf_lutyuv;
|
|
|
|
extern AVFilter ff_vf_maskedclamp;
|
2019-10-20 18:16:18 +00:00
|
|
|
extern AVFilter ff_vf_maskedmax;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_maskedmerge;
|
2019-10-20 18:16:18 +00:00
|
|
|
extern AVFilter ff_vf_maskedmin;
|
2018-11-19 12:11:24 +00:00
|
|
|
extern AVFilter ff_vf_maskfun;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_mcdeint;
|
2019-01-15 10:32:49 +00:00
|
|
|
extern AVFilter ff_vf_median;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_mergeplanes;
|
|
|
|
extern AVFilter ff_vf_mestimate;
|
|
|
|
extern AVFilter ff_vf_metadata;
|
|
|
|
extern AVFilter ff_vf_midequalizer;
|
|
|
|
extern AVFilter ff_vf_minterpolate;
|
|
|
|
extern AVFilter ff_vf_mix;
|
|
|
|
extern AVFilter ff_vf_mpdecimate;
|
|
|
|
extern AVFilter ff_vf_negate;
|
|
|
|
extern AVFilter ff_vf_nlmeans;
|
2019-04-12 08:29:03 +00:00
|
|
|
extern AVFilter ff_vf_nlmeans_opencl;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_nnedi;
|
|
|
|
extern AVFilter ff_vf_noformat;
|
|
|
|
extern AVFilter ff_vf_noise;
|
|
|
|
extern AVFilter ff_vf_normalize;
|
|
|
|
extern AVFilter ff_vf_null;
|
|
|
|
extern AVFilter ff_vf_ocr;
|
|
|
|
extern AVFilter ff_vf_ocv;
|
|
|
|
extern AVFilter ff_vf_oscilloscope;
|
|
|
|
extern AVFilter ff_vf_overlay;
|
|
|
|
extern AVFilter ff_vf_overlay_opencl;
|
|
|
|
extern AVFilter ff_vf_overlay_qsv;
|
2019-10-27 14:46:16 +00:00
|
|
|
extern AVFilter ff_vf_overlay_vulkan;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_owdenoise;
|
|
|
|
extern AVFilter ff_vf_pad;
|
2020-02-06 16:41:08 +00:00
|
|
|
extern AVFilter ff_vf_pad_opencl;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_palettegen;
|
|
|
|
extern AVFilter ff_vf_paletteuse;
|
|
|
|
extern AVFilter ff_vf_perms;
|
|
|
|
extern AVFilter ff_vf_perspective;
|
|
|
|
extern AVFilter ff_vf_phase;
|
2019-03-08 06:47:42 +00:00
|
|
|
extern AVFilter ff_vf_photosensitivity;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_pixdesctest;
|
|
|
|
extern AVFilter ff_vf_pixscope;
|
|
|
|
extern AVFilter ff_vf_pp;
|
|
|
|
extern AVFilter ff_vf_pp7;
|
|
|
|
extern AVFilter ff_vf_premultiply;
|
|
|
|
extern AVFilter ff_vf_prewitt;
|
2018-06-30 00:46:24 +00:00
|
|
|
extern AVFilter ff_vf_prewitt_opencl;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_procamp_vaapi;
|
|
|
|
extern AVFilter ff_vf_program_opencl;
|
|
|
|
extern AVFilter ff_vf_pseudocolor;
|
|
|
|
extern AVFilter ff_vf_psnr;
|
|
|
|
extern AVFilter ff_vf_pullup;
|
|
|
|
extern AVFilter ff_vf_qp;
|
|
|
|
extern AVFilter ff_vf_random;
|
|
|
|
extern AVFilter ff_vf_readeia608;
|
|
|
|
extern AVFilter ff_vf_readvitc;
|
|
|
|
extern AVFilter ff_vf_realtime;
|
|
|
|
extern AVFilter ff_vf_remap;
|
|
|
|
extern AVFilter ff_vf_removegrain;
|
|
|
|
extern AVFilter ff_vf_removelogo;
|
|
|
|
extern AVFilter ff_vf_repeatfields;
|
|
|
|
extern AVFilter ff_vf_reverse;
|
2018-11-18 12:03:03 +00:00
|
|
|
extern AVFilter ff_vf_rgbashift;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_roberts;
|
2018-06-30 00:46:24 +00:00
|
|
|
extern AVFilter ff_vf_roberts_opencl;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_rotate;
|
|
|
|
extern AVFilter ff_vf_sab;
|
|
|
|
extern AVFilter ff_vf_scale;
|
|
|
|
extern AVFilter ff_vf_scale_cuda;
|
|
|
|
extern AVFilter ff_vf_scale_npp;
|
|
|
|
extern AVFilter ff_vf_scale_qsv;
|
|
|
|
extern AVFilter ff_vf_scale_vaapi;
|
2019-10-27 14:45:36 +00:00
|
|
|
extern AVFilter ff_vf_scale_vulkan;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_scale2ref;
|
2019-09-29 10:43:32 +00:00
|
|
|
extern AVFilter ff_vf_scroll;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_select;
|
|
|
|
extern AVFilter ff_vf_selectivecolor;
|
|
|
|
extern AVFilter ff_vf_sendcmd;
|
|
|
|
extern AVFilter ff_vf_separatefields;
|
|
|
|
extern AVFilter ff_vf_setdar;
|
|
|
|
extern AVFilter ff_vf_setfield;
|
2018-10-21 17:28:03 +00:00
|
|
|
extern AVFilter ff_vf_setparams;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_setpts;
|
|
|
|
extern AVFilter ff_vf_setrange;
|
|
|
|
extern AVFilter ff_vf_setsar;
|
|
|
|
extern AVFilter ff_vf_settb;
|
|
|
|
extern AVFilter ff_vf_sharpness_vaapi;
|
|
|
|
extern AVFilter ff_vf_showinfo;
|
|
|
|
extern AVFilter ff_vf_showpalette;
|
|
|
|
extern AVFilter ff_vf_shuffleframes;
|
|
|
|
extern AVFilter ff_vf_shuffleplanes;
|
|
|
|
extern AVFilter ff_vf_sidedata;
|
|
|
|
extern AVFilter ff_vf_signalstats;
|
|
|
|
extern AVFilter ff_vf_signature;
|
|
|
|
extern AVFilter ff_vf_smartblur;
|
|
|
|
extern AVFilter ff_vf_sobel;
|
2018-06-30 00:46:24 +00:00
|
|
|
extern AVFilter ff_vf_sobel_opencl;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_split;
|
|
|
|
extern AVFilter ff_vf_spp;
|
2018-06-13 21:37:12 +00:00
|
|
|
extern AVFilter ff_vf_sr;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_ssim;
|
|
|
|
extern AVFilter ff_vf_stereo3d;
|
|
|
|
extern AVFilter ff_vf_streamselect;
|
|
|
|
extern AVFilter ff_vf_subtitles;
|
|
|
|
extern AVFilter ff_vf_super2xsai;
|
|
|
|
extern AVFilter ff_vf_swaprect;
|
|
|
|
extern AVFilter ff_vf_swapuv;
|
|
|
|
extern AVFilter ff_vf_tblend;
|
|
|
|
extern AVFilter ff_vf_telecine;
|
2019-12-26 10:38:53 +00:00
|
|
|
extern AVFilter ff_vf_thistogram;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_threshold;
|
|
|
|
extern AVFilter ff_vf_thumbnail;
|
|
|
|
extern AVFilter ff_vf_thumbnail_cuda;
|
|
|
|
extern AVFilter ff_vf_tile;
|
|
|
|
extern AVFilter ff_vf_tinterlace;
|
|
|
|
extern AVFilter ff_vf_tlut2;
|
2018-04-24 11:45:13 +00:00
|
|
|
extern AVFilter ff_vf_tmix;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_tonemap;
|
2018-06-19 01:57:31 +00:00
|
|
|
extern AVFilter ff_vf_tonemap_opencl;
|
2019-12-02 07:17:29 +00:00
|
|
|
extern AVFilter ff_vf_tonemap_vaapi;
|
2018-10-30 08:33:12 +00:00
|
|
|
extern AVFilter ff_vf_tpad;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_transpose;
|
2018-08-29 09:53:02 +00:00
|
|
|
extern AVFilter ff_vf_transpose_npp;
|
2018-11-28 02:27:38 +00:00
|
|
|
extern AVFilter ff_vf_transpose_opencl;
|
2019-01-17 03:33:05 +00:00
|
|
|
extern AVFilter ff_vf_transpose_vaapi;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_trim;
|
|
|
|
extern AVFilter ff_vf_unpremultiply;
|
|
|
|
extern AVFilter ff_vf_unsharp;
|
|
|
|
extern AVFilter ff_vf_unsharp_opencl;
|
|
|
|
extern AVFilter ff_vf_uspp;
|
2019-08-15 00:56:11 +00:00
|
|
|
extern AVFilter ff_vf_v360;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_vaguedenoiser;
|
|
|
|
extern AVFilter ff_vf_vectorscope;
|
|
|
|
extern AVFilter ff_vf_vflip;
|
2017-12-20 13:15:02 +00:00
|
|
|
extern AVFilter ff_vf_vfrdet;
|
2018-10-19 18:10:48 +00:00
|
|
|
extern AVFilter ff_vf_vibrance;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_vidstabdetect;
|
|
|
|
extern AVFilter ff_vf_vidstabtransform;
|
|
|
|
extern AVFilter ff_vf_vignette;
|
|
|
|
extern AVFilter ff_vf_vmafmotion;
|
|
|
|
extern AVFilter ff_vf_vpp_qsv;
|
|
|
|
extern AVFilter ff_vf_vstack;
|
|
|
|
extern AVFilter ff_vf_w3fdif;
|
|
|
|
extern AVFilter ff_vf_waveform;
|
|
|
|
extern AVFilter ff_vf_weave;
|
|
|
|
extern AVFilter ff_vf_xbr;
|
2019-10-23 18:43:26 +00:00
|
|
|
extern AVFilter ff_vf_xfade;
|
2020-01-23 15:29:34 +00:00
|
|
|
extern AVFilter ff_vf_xfade_opencl;
|
2019-05-03 12:08:49 +00:00
|
|
|
extern AVFilter ff_vf_xmedian;
|
2018-10-24 09:00:58 +00:00
|
|
|
extern AVFilter ff_vf_xstack;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_yadif;
|
2018-10-21 20:49:16 +00:00
|
|
|
extern AVFilter ff_vf_yadif_cuda;
|
2019-11-25 09:53:05 +00:00
|
|
|
extern AVFilter ff_vf_yaepblur;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vf_zmq;
|
|
|
|
extern AVFilter ff_vf_zoompan;
|
|
|
|
extern AVFilter ff_vf_zscale;
|
|
|
|
|
|
|
|
extern AVFilter ff_vsrc_allrgb;
|
|
|
|
extern AVFilter ff_vsrc_allyuv;
|
|
|
|
extern AVFilter ff_vsrc_cellauto;
|
|
|
|
extern AVFilter ff_vsrc_color;
|
|
|
|
extern AVFilter ff_vsrc_coreimagesrc;
|
|
|
|
extern AVFilter ff_vsrc_frei0r_src;
|
|
|
|
extern AVFilter ff_vsrc_haldclutsrc;
|
|
|
|
extern AVFilter ff_vsrc_life;
|
|
|
|
extern AVFilter ff_vsrc_mandelbrot;
|
|
|
|
extern AVFilter ff_vsrc_mptestsrc;
|
|
|
|
extern AVFilter ff_vsrc_nullsrc;
|
|
|
|
extern AVFilter ff_vsrc_openclsrc;
|
2018-05-08 09:43:50 +00:00
|
|
|
extern AVFilter ff_vsrc_pal75bars;
|
|
|
|
extern AVFilter ff_vsrc_pal100bars;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vsrc_rgbtestsrc;
|
2019-08-12 07:20:08 +00:00
|
|
|
extern AVFilter ff_vsrc_sierpinski;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_vsrc_smptebars;
|
|
|
|
extern AVFilter ff_vsrc_smptehdbars;
|
|
|
|
extern AVFilter ff_vsrc_testsrc;
|
|
|
|
extern AVFilter ff_vsrc_testsrc2;
|
|
|
|
extern AVFilter ff_vsrc_yuvtestsrc;
|
|
|
|
|
|
|
|
extern AVFilter ff_vsink_nullsink;
|
|
|
|
|
|
|
|
/* multimedia filters */
|
|
|
|
extern AVFilter ff_avf_abitscope;
|
|
|
|
extern AVFilter ff_avf_adrawgraph;
|
2018-10-27 17:17:08 +00:00
|
|
|
extern AVFilter ff_avf_agraphmonitor;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_avf_ahistogram;
|
|
|
|
extern AVFilter ff_avf_aphasemeter;
|
|
|
|
extern AVFilter ff_avf_avectorscope;
|
|
|
|
extern AVFilter ff_avf_concat;
|
|
|
|
extern AVFilter ff_avf_showcqt;
|
|
|
|
extern AVFilter ff_avf_showfreqs;
|
2019-04-30 14:44:28 +00:00
|
|
|
extern AVFilter ff_avf_showspatial;
|
2018-02-18 17:20:26 +00:00
|
|
|
extern AVFilter ff_avf_showspectrum;
|
|
|
|
extern AVFilter ff_avf_showspectrumpic;
|
|
|
|
extern AVFilter ff_avf_showvolume;
|
|
|
|
extern AVFilter ff_avf_showwaves;
|
|
|
|
extern AVFilter ff_avf_showwavespic;
|
|
|
|
extern AVFilter ff_vaf_spectrumsynth;
|
2012-12-23 18:06:35 +00:00
|
|
|
|
2018-02-18 17:20:26 +00:00
|
|
|
/* multimedia sources */
|
|
|
|
extern AVFilter ff_avsrc_amovie;
|
|
|
|
extern AVFilter ff_avsrc_movie;
|
|
|
|
|
|
|
|
/* those filters are part of public or internal API,
|
|
|
|
* they are formatted to not be found by the grep
|
|
|
|
* as they are manually added again (due to their 'names'
|
|
|
|
* being the same while having different 'types'). */
|
|
|
|
extern AVFilter ff_asrc_abuffer;
|
|
|
|
extern AVFilter ff_vsrc_buffer;
|
|
|
|
extern AVFilter ff_asink_abuffer;
|
|
|
|
extern AVFilter ff_vsink_buffer;
|
|
|
|
extern AVFilter ff_af_afifo;
|
|
|
|
extern AVFilter ff_vf_fifo;
|
|
|
|
|
|
|
|
#include "libavfilter/filter_list.c"
|
|
|
|
|
|
|
|
|
|
|
|
const AVFilter *av_filter_iterate(void **opaque)
|
2008-02-15 22:02:51 +00:00
|
|
|
{
|
2018-02-18 17:20:26 +00:00
|
|
|
uintptr_t i = (uintptr_t)*opaque;
|
|
|
|
const AVFilter *f = filter_list[i];
|
|
|
|
|
|
|
|
if (f)
|
|
|
|
*opaque = (void*)(i + 1);
|
2010-08-20 23:16:51 +00:00
|
|
|
|
2018-02-18 17:20:26 +00:00
|
|
|
return f;
|
|
|
|
}
|
2010-09-25 01:56:58 +00:00
|
|
|
|
2018-02-18 17:20:26 +00:00
|
|
|
const AVFilter *avfilter_get_by_name(const char *name)
|
|
|
|
{
|
|
|
|
const AVFilter *f = NULL;
|
|
|
|
void *opaque = 0;
|
2010-09-25 01:57:01 +00:00
|
|
|
|
2018-02-18 17:20:26 +00:00
|
|
|
if (!name)
|
|
|
|
return NULL;
|
2010-01-16 10:43:53 +00:00
|
|
|
|
2018-02-18 17:20:26 +00:00
|
|
|
while ((f = av_filter_iterate(&opaque)))
|
|
|
|
if (!strcmp(f->name, name))
|
|
|
|
return (AVFilter *)f;
|
2010-01-16 11:05:36 +00:00
|
|
|
|
2018-02-18 17:20:26 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2011-12-21 19:47:52 +00:00
|
|
|
|
2011-12-25 16:37:53 +00:00
|
|
|
|
2018-02-18 17:20:26 +00:00
|
|
|
#if FF_API_NEXT
|
|
|
|
FF_DISABLE_DEPRECATION_WARNINGS
|
|
|
|
static AVOnce av_filter_next_init = AV_ONCE_INIT;
|
2012-07-23 21:21:33 +00:00
|
|
|
|
2018-02-18 17:20:26 +00:00
|
|
|
static void av_filter_init_next(void)
|
|
|
|
{
|
|
|
|
AVFilter *prev = NULL, *p;
|
|
|
|
void *i = 0;
|
|
|
|
while ((p = (AVFilter*)av_filter_iterate(&i))) {
|
|
|
|
if (prev)
|
|
|
|
prev->next = p;
|
|
|
|
prev = p;
|
|
|
|
}
|
2008-02-15 22:02:51 +00:00
|
|
|
}
|
2017-03-07 08:54:44 +00:00
|
|
|
|
|
|
|
void avfilter_register_all(void)
|
|
|
|
{
|
2018-02-18 17:20:26 +00:00
|
|
|
ff_thread_once(&av_filter_next_init, av_filter_init_next);
|
|
|
|
}
|
|
|
|
|
|
|
|
int avfilter_register(AVFilter *filter)
|
|
|
|
{
|
|
|
|
ff_thread_once(&av_filter_next_init, av_filter_init_next);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
const AVFilter *avfilter_next(const AVFilter *prev)
|
|
|
|
{
|
|
|
|
ff_thread_once(&av_filter_next_init, av_filter_init_next);
|
2017-03-07 08:54:44 +00:00
|
|
|
|
2018-02-18 17:20:26 +00:00
|
|
|
return prev ? prev->next : filter_list[0];
|
2017-03-07 08:54:44 +00:00
|
|
|
}
|
2018-02-18 17:20:26 +00:00
|
|
|
|
|
|
|
FF_ENABLE_DEPRECATION_WARNINGS
|
|
|
|
#endif
|