FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
ffmpeg_filter.c File Reference
#include <stdint.h>
#include "ffmpeg.h"
#include "libavfilter/avfilter.h"
#include "libavfilter/buffersink.h"
#include "libavfilter/buffersrc.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
#include "libavutil/channel_layout.h"
#include "libavutil/display.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/pixfmt.h"
#include "libavutil/imgutils.h"
#include "libavutil/samplefmt.h"
#include "libavutil/time.h"
#include "libavutil/timestamp.h"
#include "libavcodec/mathops.h"

Go to the source code of this file.

Data Structures

struct  FilterGraphPriv
 
struct  FilterGraphThread
 
struct  InputFilterPriv
 
struct  FPSConvContext
 
struct  OutputFilterPriv
 
struct  FilterCommand
 

Macros

#define DEF_CHOOSE_FORMAT(name, type, var, supported_list, none, printf_format, get_name)
 
#define AUTO_INSERT_FILTER(opt_name, filter_name, arg)
 

Enumerations

enum  ReinitReason { VIDEO_CHANGED = (1 << 0), AUDIO_CHANGED = (1 << 1), MATRIX_CHANGED = (1 << 2), HWACCEL_CHANGED = (1 << 3) }
 

Functions

static FilterGraphPrivfgp_from_fg (FilterGraph *fg)
 
static const FilterGraphPrivcfgp_from_cfg (const FilterGraph *fg)
 
static InputFilterPrivifp_from_ifilter (InputFilter *ifilter)
 
static OutputFilterPrivofp_from_ofilter (OutputFilter *ofilter)
 
static void filter_command_free (void *opaque, uint8_t *data)
 
static int sub2video_get_blank_frame (InputFilterPriv *ifp)
 
static void sub2video_copy_rect (uint8_t *dst, int dst_linesize, int w, int h, AVSubtitleRect *r)
 
static void sub2video_push_ref (InputFilterPriv *ifp, int64_t pts)
 
static void sub2video_update (InputFilterPriv *ifp, int64_t heartbeat_pts, const AVSubtitle *sub)
 
static int choose_pix_fmts (OutputFilter *ofilter, AVBPrint *bprint, const char **dst)
 
 DEF_CHOOSE_FORMAT (sample_fmts, enum AVSampleFormat, format, formats, AV_SAMPLE_FMT_NONE, "%s", av_get_sample_fmt_name) DEF_CHOOSE_FORMAT(sample_rates
 
static void choose_channel_layouts (OutputFilterPriv *ofp, AVBPrint *bprint)
 
static int read_binary (const char *path, uint8_t **data, int *len)
 
static int filter_opt_apply (AVFilterContext *f, const char *key, const char *val)
 
static int graph_opts_apply (AVFilterGraphSegment *seg)
 
static int graph_parse (AVFilterGraph *graph, const char *desc, AVFilterInOut **inputs, AVFilterInOut **outputs, AVBufferRef *hw_device)
 
static int ifilter_has_all_input_formats (FilterGraph *fg)
 
static void * filter_thread (void *arg)
 
static char * describe_filter_link (FilterGraph *fg, AVFilterInOut *inout, int in)
 
static OutputFilterofilter_alloc (FilterGraph *fg)
 
static int ifilter_bind_ist (InputFilter *ifilter, InputStream *ist)
 
static int set_channel_layout (OutputFilterPriv *f, OutputStream *ost)
 
int ofilter_bind_ost (OutputFilter *ofilter, OutputStream *ost, unsigned sched_idx_enc)
 
static InputFilterifilter_alloc (FilterGraph *fg)
 
void fg_free (FilterGraph **pfg)
 
static const char * fg_item_name (void *obj)
 
int fg_create (FilterGraph **pfg, char *graph_desc, Scheduler *sch)
 Create a new filtergraph in the global filtergraph list. More...
 
int init_simple_filtergraph (InputStream *ist, OutputStream *ost, char *graph_desc, Scheduler *sch, unsigned sched_idx_enc)
 
static int init_input_filter (FilterGraph *fg, InputFilter *ifilter)
 
int init_complex_filtergraph (FilterGraph *fg)
 
static int insert_trim (int64_t start_time, int64_t duration, AVFilterContext **last_filter, int *pad_idx, const char *filter_name)
 
static int insert_filter (AVFilterContext **last_filter, int *pad_idx, const char *filter_name, const char *args)
 
static int configure_output_video_filter (FilterGraph *fg, AVFilterGraph *graph, OutputFilter *ofilter, AVFilterInOut *out)
 
static int configure_output_audio_filter (FilterGraph *fg, AVFilterGraph *graph, OutputFilter *ofilter, AVFilterInOut *out)
 
static int configure_output_filter (FilterGraph *fg, AVFilterGraph *graph, OutputFilter *ofilter, AVFilterInOut *out)
 
int check_filter_outputs (void)
 
static void sub2video_prepare (InputFilterPriv *ifp)
 
static int configure_input_video_filter (FilterGraph *fg, AVFilterGraph *graph, InputFilter *ifilter, AVFilterInOut *in)
 
static int configure_input_audio_filter (FilterGraph *fg, AVFilterGraph *graph, InputFilter *ifilter, AVFilterInOut *in)
 
static int configure_input_filter (FilterGraph *fg, AVFilterGraph *graph, InputFilter *ifilter, AVFilterInOut *in)
 
static void cleanup_filtergraph (FilterGraph *fg, FilterGraphThread *fgt)
 
static int filter_is_buffersrc (const AVFilterContext *f)
 
static int graph_is_meta (AVFilterGraph *graph)
 
static int sub2video_frame (InputFilter *ifilter, AVFrame *frame, int buffer)
 
static int configure_filtergraph (FilterGraph *fg, FilterGraphThread *fgt)
 
int ifilter_parameters_from_dec (InputFilter *ifilter, const AVCodecContext *dec)
 Set up fallback filtering parameters from a decoder context. More...
 
static int ifilter_parameters_from_frame (InputFilter *ifilter, const AVFrame *frame)
 
int filtergraph_is_simple (const FilterGraph *fg)
 
static void send_command (FilterGraph *fg, AVFilterGraph *graph, double time, const char *target, const char *command, const char *arg, int all_filters)
 
static int choose_input (const FilterGraph *fg, const FilterGraphThread *fgt)
 
static int choose_out_timebase (OutputFilterPriv *ofp, AVFrame *frame)
 
static double adjust_frame_pts_to_encoder_tb (AVFrame *frame, AVRational tb_dst, int64_t start_time)
 
static void video_sync_process (OutputFilterPriv *ofp, AVFrame *frame, int64_t *nb_frames, int64_t *nb_frames_prev)
 
static int close_output (OutputFilterPriv *ofp, FilterGraphThread *fgt)
 
static int fg_output_frame (OutputFilterPriv *ofp, FilterGraphThread *fgt, AVFrame *frame)
 
static int fg_output_step (OutputFilterPriv *ofp, FilterGraphThread *fgt, AVFrame *frame)
 
static int read_frames (FilterGraph *fg, FilterGraphThread *fgt, AVFrame *frame)
 
static void sub2video_heartbeat (InputFilter *ifilter, int64_t pts, AVRational tb)
 
static int send_eof (FilterGraphThread *fgt, InputFilter *ifilter, int64_t pts, AVRational tb)
 
static const char * unknown_if_null (const char *str)
 
static int send_frame (FilterGraph *fg, FilterGraphThread *fgt, InputFilter *ifilter, AVFrame *frame)
 
static void fg_thread_set_name (const FilterGraph *fg)
 
static void fg_thread_uninit (FilterGraphThread *fgt)
 
static int fg_thread_init (FilterGraphThread *fgt, const FilterGraph *fg)
 
void fg_send_command (FilterGraph *fg, double time, const char *target, const char *command, const char *arg, int all_filters)
 

Variables

 int
 
 sample_rate
 
 sample_rates
 
 d
 
static const AVClass fg_class
 

Macro Definition Documentation

◆ DEF_CHOOSE_FORMAT

#define DEF_CHOOSE_FORMAT (   name,
  type,
  var,
  supported_list,
  none,
  printf_format,
  get_name 
)
Value:
static void choose_ ## name (OutputFilterPriv *ofp, AVBPrint *bprint) \
{ \
if (ofp->var == none && !ofp->supported_list) \
return; \
av_bprintf(bprint, #name "="); \
if (ofp->var != none) { \
av_bprintf(bprint, printf_format, get_name(ofp->var)); \
} else { \
const type *p; \
for (p = ofp->supported_list; *p != none; p++) { \
av_bprintf(bprint, printf_format "|", get_name(*p)); \
} \
if (bprint->len > 0) \
bprint->str[--bprint->len] = '\0'; \
} \
av_bprint_chars(bprint, ':', 1); \
}

Definition at line 398 of file ffmpeg_filter.c.

◆ AUTO_INSERT_FILTER

#define AUTO_INSERT_FILTER (   opt_name,
  filter_name,
  arg 
)
Value:
do { \
AVFilterContext *filt_ctx; \
av_log(fg, AV_LOG_INFO, opt_name " is forwarded to lavfi " \
"similarly to -af " filter_name "=%s.\n", arg); \
\
ret = avfilter_graph_create_filter(&filt_ctx, \
avfilter_get_by_name(filter_name), \
filter_name, arg, NULL, graph); \
if (ret < 0) \
goto fail; \
\
ret = avfilter_link(last_filter, pad_idx, filt_ctx, 0); \
if (ret < 0) \
goto fail; \
\
last_filter = filt_ctx; \
pad_idx = 0; \
} while (0)

Enumeration Type Documentation

◆ ReinitReason

Enumerator
VIDEO_CHANGED 
AUDIO_CHANGED 
MATRIX_CHANGED 
HWACCEL_CHANGED 

Definition at line 2553 of file ffmpeg_filter.c.

Function Documentation

◆ fgp_from_fg()

static FilterGraphPriv* fgp_from_fg ( FilterGraph fg)
static

◆ cfgp_from_cfg()

static const FilterGraphPriv* cfgp_from_cfg ( const FilterGraph fg)
static

Definition at line 77 of file ffmpeg_filter.c.

Referenced by filtergraph_is_simple().

◆ ifp_from_ifilter()

static InputFilterPriv* ifp_from_ifilter ( InputFilter ifilter)
static

◆ ofp_from_ofilter()

static OutputFilterPriv* ofp_from_ofilter ( OutputFilter ofilter)
static

◆ filter_command_free()

static void filter_command_free ( void *  opaque,
uint8_t *  data 
)
static

Definition at line 248 of file ffmpeg_filter.c.

Referenced by fg_send_command().

◆ sub2video_get_blank_frame()

static int sub2video_get_blank_frame ( InputFilterPriv ifp)
static

Definition at line 259 of file ffmpeg_filter.c.

Referenced by sub2video_update().

◆ sub2video_copy_rect()

static void sub2video_copy_rect ( uint8_t *  dst,
int  dst_linesize,
int  w,
int  h,
AVSubtitleRect r 
)
static

Definition at line 281 of file ffmpeg_filter.c.

Referenced by sub2video_update().

◆ sub2video_push_ref()

static void sub2video_push_ref ( InputFilterPriv ifp,
int64_t  pts 
)
static

Definition at line 312 of file ffmpeg_filter.c.

Referenced by sub2video_heartbeat(), and sub2video_update().

◆ sub2video_update()

static void sub2video_update ( InputFilterPriv ifp,
int64_t  heartbeat_pts,
const AVSubtitle sub 
)
static

Definition at line 327 of file ffmpeg_filter.c.

Referenced by sub2video_frame(), and sub2video_heartbeat().

◆ choose_pix_fmts()

static int choose_pix_fmts ( OutputFilter ofilter,
AVBPrint *  bprint,
const char **  dst 
)
static

Definition at line 369 of file ffmpeg_filter.c.

Referenced by configure_output_video_filter().

◆ DEF_CHOOSE_FORMAT()

DEF_CHOOSE_FORMAT ( sample_fmts  ,
enum  AVSampleFormat,
format  ,
formats  ,
AV_SAMPLE_FMT_NONE  ,
"%s"  ,
av_get_sample_fmt_name   
)

◆ choose_channel_layouts()

static void choose_channel_layouts ( OutputFilterPriv ofp,
AVBPrint *  bprint 
)
static

Definition at line 427 of file ffmpeg_filter.c.

Referenced by configure_output_audio_filter().

◆ read_binary()

static int read_binary ( const char *  path,
uint8_t **  data,
int len 
)
static

Definition at line 447 of file ffmpeg_filter.c.

Referenced by filter_opt_apply().

◆ filter_opt_apply()

static int filter_opt_apply ( AVFilterContext f,
const char *  key,
const char *  val 
)
static

Definition at line 495 of file ffmpeg_filter.c.

Referenced by graph_opts_apply().

◆ graph_opts_apply()

static int graph_opts_apply ( AVFilterGraphSegment seg)
static

Definition at line 550 of file ffmpeg_filter.c.

Referenced by graph_parse().

◆ graph_parse()

static int graph_parse ( AVFilterGraph graph,
const char *  desc,
AVFilterInOut **  inputs,
AVFilterInOut **  outputs,
AVBufferRef hw_device 
)
static

Definition at line 574 of file ffmpeg_filter.c.

Referenced by configure_filtergraph(), and fg_create().

◆ ifilter_has_all_input_formats()

static int ifilter_has_all_input_formats ( FilterGraph fg)
static

Definition at line 618 of file ffmpeg_filter.c.

Referenced by filter_thread(), send_eof(), and send_frame().

◆ filter_thread()

static void * filter_thread ( void *  arg)
static

Definition at line 2752 of file ffmpeg_filter.c.

Referenced by fg_create().

◆ describe_filter_link()

static char* describe_filter_link ( FilterGraph fg,
AVFilterInOut inout,
int  in 
)
static

Definition at line 630 of file ffmpeg_filter.c.

Referenced by fg_create().

◆ ofilter_alloc()

static OutputFilter* ofilter_alloc ( FilterGraph fg)
static

Definition at line 642 of file ffmpeg_filter.c.

Referenced by fg_create().

◆ ifilter_bind_ist()

static int ifilter_bind_ist ( InputFilter ifilter,
InputStream ist 
)
static

Definition at line 659 of file ffmpeg_filter.c.

Referenced by init_input_filter(), and init_simple_filtergraph().

◆ set_channel_layout()

static int set_channel_layout ( OutputFilterPriv f,
OutputStream ost 
)
static

Definition at line 706 of file ffmpeg_filter.c.

Referenced by ofilter_bind_ost().

◆ ofilter_bind_ost()

int ofilter_bind_ost ( OutputFilter ofilter,
OutputStream ost,
unsigned  sched_idx_enc 
)

Definition at line 746 of file ffmpeg_filter.c.

Referenced by init_simple_filtergraph(), and ost_add().

◆ ifilter_alloc()

static InputFilter* ifilter_alloc ( FilterGraph fg)
static

Definition at line 845 of file ffmpeg_filter.c.

Referenced by fg_create().

◆ fg_free()

void fg_free ( FilterGraph **  pfg)

Definition at line 874 of file ffmpeg_filter.c.

Referenced by ffmpeg_cleanup().

◆ fg_item_name()

static const char* fg_item_name ( void *  obj)
static

Definition at line 926 of file ffmpeg_filter.c.

◆ fg_create()

int fg_create ( FilterGraph **  pfg,
char *  graph_desc,
Scheduler sch 
)

Create a new filtergraph in the global filtergraph list.

Parameters
graph_descGraph description; an av_malloc()ed string, filtergraph takes ownership of it.

Definition at line 940 of file ffmpeg_filter.c.

Referenced by init_simple_filtergraph(), opt_filter_complex(), and opt_filter_complex_script().

◆ init_simple_filtergraph()

int init_simple_filtergraph ( InputStream ist,
OutputStream ost,
char *  graph_desc,
Scheduler sch,
unsigned  sched_idx_enc 
)

Definition at line 1055 of file ffmpeg_filter.c.

Referenced by ost_add().

◆ init_input_filter()

static int init_input_filter ( FilterGraph fg,
InputFilter ifilter 
)
static

Definition at line 1096 of file ffmpeg_filter.c.

Referenced by init_complex_filtergraph().

◆ init_complex_filtergraph()

int init_complex_filtergraph ( FilterGraph fg)

Definition at line 1162 of file ffmpeg_filter.c.

Referenced by init_complex_filters().

◆ insert_trim()

static int insert_trim ( int64_t  start_time,
int64_t  duration,
AVFilterContext **  last_filter,
int pad_idx,
const char *  filter_name 
)
static

◆ insert_filter()

static int insert_filter ( AVFilterContext **  last_filter,
int pad_idx,
const char *  filter_name,
const char *  args 
)
static

Definition at line 1224 of file ffmpeg_filter.c.

Referenced by configure_input_video_filter().

◆ configure_output_video_filter()

static int configure_output_video_filter ( FilterGraph fg,
AVFilterGraph graph,
OutputFilter ofilter,
AVFilterInOut out 
)
static

Definition at line 1246 of file ffmpeg_filter.c.

Referenced by configure_output_filter().

◆ configure_output_audio_filter()

static int configure_output_audio_filter ( FilterGraph fg,
AVFilterGraph graph,
OutputFilter ofilter,
AVFilterInOut out 
)
static

Definition at line 1326 of file ffmpeg_filter.c.

Referenced by configure_output_filter().

◆ configure_output_filter()

static int configure_output_filter ( FilterGraph fg,
AVFilterGraph graph,
OutputFilter ofilter,
AVFilterInOut out 
)
static

Definition at line 1421 of file ffmpeg_filter.c.

Referenced by configure_filtergraph().

◆ check_filter_outputs()

int check_filter_outputs ( void  )

Definition at line 1436 of file ffmpeg_filter.c.

◆ sub2video_prepare()

static void sub2video_prepare ( InputFilterPriv ifp)
static

Definition at line 1453 of file ffmpeg_filter.c.

Referenced by configure_input_video_filter().

◆ configure_input_video_filter()

static int configure_input_video_filter ( FilterGraph fg,
AVFilterGraph graph,
InputFilter ifilter,
AVFilterInOut in 
)
static

Definition at line 1464 of file ffmpeg_filter.c.

Referenced by configure_input_filter().

◆ configure_input_audio_filter()

static int configure_input_audio_filter ( FilterGraph fg,
AVFilterGraph graph,
InputFilter ifilter,
AVFilterInOut in 
)
static

Definition at line 1568 of file ffmpeg_filter.c.

Referenced by configure_input_filter().

◆ configure_input_filter()

static int configure_input_filter ( FilterGraph fg,
AVFilterGraph graph,
InputFilter ifilter,
AVFilterInOut in 
)
static

Definition at line 1611 of file ffmpeg_filter.c.

Referenced by configure_filtergraph().

◆ cleanup_filtergraph()

static void cleanup_filtergraph ( FilterGraph fg,
FilterGraphThread fgt 
)
static

Definition at line 1621 of file ffmpeg_filter.c.

Referenced by configure_filtergraph().

◆ filter_is_buffersrc()

static int filter_is_buffersrc ( const AVFilterContext f)
static

Definition at line 1630 of file ffmpeg_filter.c.

Referenced by graph_is_meta().

◆ graph_is_meta()

static int graph_is_meta ( AVFilterGraph graph)
static

Definition at line 1637 of file ffmpeg_filter.c.

Referenced by configure_filtergraph().

◆ sub2video_frame()

static int sub2video_frame ( InputFilter ifilter,
AVFrame frame,
int  buffer 
)
static

Definition at line 2452 of file ffmpeg_filter.c.

Referenced by configure_filtergraph(), and filter_thread().

◆ configure_filtergraph()

static int configure_filtergraph ( FilterGraph fg,
FilterGraphThread fgt 
)
static

Definition at line 1656 of file ffmpeg_filter.c.

Referenced by filter_thread(), send_eof(), and send_frame().

◆ ifilter_parameters_from_dec()

int ifilter_parameters_from_dec ( InputFilter ifilter,
const AVCodecContext dec 
)

Set up fallback filtering parameters from a decoder context.

They will only be used if no frames are ever sent on this input, otherwise the actual parameters are taken from the frame.

Definition at line 1803 of file ffmpeg_filter.c.

Referenced by dec_add_filter().

◆ ifilter_parameters_from_frame()

static int ifilter_parameters_from_frame ( InputFilter ifilter,
const AVFrame frame 
)
static

Definition at line 1828 of file ffmpeg_filter.c.

Referenced by send_frame().

◆ filtergraph_is_simple()

int filtergraph_is_simple ( const FilterGraph fg)

◆ send_command()

static void send_command ( FilterGraph fg,
AVFilterGraph graph,
double  time,
const char *  target,
const char *  command,
const char *  arg,
int  all_filters 
)
static

Definition at line 1865 of file ffmpeg_filter.c.

Referenced by filter_thread().

◆ choose_input()

static int choose_input ( const FilterGraph fg,
const FilterGraphThread fgt 
)
static

Definition at line 1890 of file ffmpeg_filter.c.

Referenced by read_frames().

◆ choose_out_timebase()

static int choose_out_timebase ( OutputFilterPriv ofp,
AVFrame frame 
)
static

Definition at line 1914 of file ffmpeg_filter.c.

Referenced by fg_output_step().

◆ adjust_frame_pts_to_encoder_tb()

static double adjust_frame_pts_to_encoder_tb ( AVFrame frame,
AVRational  tb_dst,
int64_t  start_time 
)
static

Definition at line 1991 of file ffmpeg_filter.c.

Referenced by video_sync_process().

◆ video_sync_process()

static void video_sync_process ( OutputFilterPriv ofp,
AVFrame frame,
int64_t *  nb_frames,
int64_t *  nb_frames_prev 
)
static

Definition at line 2033 of file ffmpeg_filter.c.

Referenced by fg_output_frame().

◆ close_output()

static int close_output ( OutputFilterPriv ofp,
FilterGraphThread fgt 
)
static

Definition at line 2156 of file ffmpeg_filter.c.

Referenced by fg_output_frame().

◆ fg_output_frame()

static int fg_output_frame ( OutputFilterPriv ofp,
FilterGraphThread fgt,
AVFrame frame 
)
static

Definition at line 2205 of file ffmpeg_filter.c.

Referenced by fg_output_step(), and filter_thread().

◆ fg_output_step()

static int fg_output_step ( OutputFilterPriv ofp,
FilterGraphThread fgt,
AVFrame frame 
)
static

Definition at line 2290 of file ffmpeg_filter.c.

Referenced by read_frames().

◆ read_frames()

static int read_frames ( FilterGraph fg,
FilterGraphThread fgt,
AVFrame frame 
)
static

Definition at line 2368 of file ffmpeg_filter.c.

Referenced by filter_thread(), and send_frame().

◆ sub2video_heartbeat()

static void sub2video_heartbeat ( InputFilter ifilter,
int64_t  pts,
AVRational  tb 
)
static

Definition at line 2430 of file ffmpeg_filter.c.

Referenced by sub2video_frame().

◆ send_eof()

static int send_eof ( FilterGraphThread fgt,
InputFilter ifilter,
int64_t  pts,
AVRational  tb 
)
static

Definition at line 2499 of file ffmpeg_filter.c.

Referenced by filter_thread().

◆ unknown_if_null()

static const char* unknown_if_null ( const char *  str)
static

Definition at line 2560 of file ffmpeg_filter.c.

Referenced by send_frame().

◆ send_frame()

static int send_frame ( FilterGraph fg,
FilterGraphThread fgt,
InputFilter ifilter,
AVFrame frame 
)
static

Definition at line 2565 of file ffmpeg_filter.c.

Referenced by filter_thread().

◆ fg_thread_set_name()

static void fg_thread_set_name ( const FilterGraph fg)
static

Definition at line 2692 of file ffmpeg_filter.c.

Referenced by filter_thread().

◆ fg_thread_uninit()

static void fg_thread_uninit ( FilterGraphThread fgt)
static

Definition at line 2707 of file ffmpeg_filter.c.

Referenced by fg_thread_init(), and filter_thread().

◆ fg_thread_init()

static int fg_thread_init ( FilterGraphThread fgt,
const FilterGraph fg 
)
static

Definition at line 2725 of file ffmpeg_filter.c.

Referenced by filter_thread().

◆ fg_send_command()

void fg_send_command ( FilterGraph fg,
double  time,
const char *  target,
const char *  command,
const char *  arg,
int  all_filters 
)

Definition at line 2869 of file ffmpeg_filter.c.

Referenced by check_keyboard_interaction().

Variable Documentation

◆ int

int
Examples
encode_audio.c, and mux.c.

Definition at line 424 of file ffmpeg_filter.c.

Referenced by adaptive_quantization(), add_bytes_c(), add_bytes_l2_c(), add_int16_c(), add_peak(), adpcm_decode_frame(), adpcm_ms_expand_nibble(), amf_encode_init_av1(), amf_encode_init_h264(), amf_encode_init_hevc(), amf_parse_object(), apply_dependent_coupling_fixed(), apply_independent_coupling_fixed(), asf_write_packet(), async_seek(), autocorr_calc(), av_clip_intp2_rvi(), av_lfg_init_from_data(), av_opt_query_ranges(), av_opt_set_image_size(), av_sincos_sf(), av_sqrt_sf(), av_vlog(), avf_read_packet(), avfilter_config_links(), calculate_visual_weight(), capture_screen(), cdtoons_render_sprite(), celt_gauge_psy_weight(), check_eq(), check_idct(), check_idct_multiple(), check_loop_filter(), check_loopfilter_16y(), check_loopfilter_8uv(), check_loopfilter_simple(), checkasm_check_h264pred(), chroma_mc_bi(), chs_parse_header(), color_distance(), compare_fields(), compute_default_clut(), config_input(), config_output(), config_props(), construct_vector(), cpu_flags_getauxval(), create_streams(), dct_quantize_trellis_c(), dct_unquantize_mpeg1_inter_c(), dct_unquantize_mpeg1_intra_c(), dct_unquantize_mpeg2_inter_c(), dct_unquantize_mpeg2_intra_bitexact(), dct_unquantize_mpeg2_intra_c(), decfloat(), decode_block(), decode_blocks(), decode_dlta(), decode_envelope(), decode_fixed_vector(), decode_inter_block(), decode_intra_block(), decode_ppc(), decode_spectrum_and_dequant(), decode_str(), decode_subband_slice_buffered(), decor_c(), decorrelate_stereo(), decorrelation(), derive_affine_mvc(), deshake_opencl_init(), diff_bytes_c(), diff_int16_c(), distortion_correction_filter_slice(), dng_decode_tiles(), dnn_detect_post_proc_ssd(), dnn_detect_post_proc_tf(), do_apply_filter(), do_chromakey_pixel(), do_chromakey_pixel16(), draw_cursor(), draw_mandelbrot(), draw_sierpinski(), draw_text(), dss_sp_shift_sq_sub(), dv_write_pack(), dvbsub_encode(), dxv_decode(), encode_block(), eval_expr(), ff_affine_transform(), ff_convert_matrix(), ff_dirac_golomb_read_16bit(), ff_dirac_golomb_read_32bit(), ff_eval_refl(), ff_evc_derive_poc(), ff_filter_frame_framed(), ff_h264_alloc_tables(), ff_h264_chroma422_dc_dequant_idct(), ff_h264_chroma_dc_dequant_idct(), ff_h264_init_poc(), ff_h264_luma_dc_dequant_idct(), ff_hscale_16_to_15_lasx(), ff_hscale_16_to_19_lasx(), ff_hscale_8_to_15_lasx(), ff_hscale_8_to_19_lasx(), ff_init_block_index(), ff_intra_pred_8_16x16_msa(), ff_intra_pred_8_32x32_msa(), ff_opus_parse_extradata(), ff_rate_estimate_qscale(), ff_rtp_send_mpegvideo(), ff_scale_eval_dimensions(), ff_socket(), ff_vc1_pred_dc(), ff_wma_init(), ffio_fdopen(), fic_idct(), filter16_3x3(), filter16_5x5(), filter16_7x7(), filter16_column(), filter16_row(), filter_3x3(), filter_5x5(), filter_7x7(), filter_column(), filter_frame(), filter_row(), finish_file(), fir_to_phase(), fixed_exp(), fixed_log(), fixed_sqrt(), flac_decorrelate_indep_c(), free_picture(), generate_eye_tape_map(), get_audio_frame(), get_conf(), get_dst_color_err(), get_high_utility_cell(), get_matching_parameters(), get_qminmax(), get_qtable(), get_radius_between_negative_and_positive_pi(), get_srice(), get_utc_date_time_insec(), get_vcd_padding_size(), get_video_config(), global_mv(), glslc_shader_compile(), guess_mv(), horizontal_compose_dd137i_TMPL(), horizontal_compose_dd97i_TMPL(), hq_decode_block(), hScale8To15_c(), hScale8To19_c(), hScale_real(), ict_int(), id3v2_encode_string(), idct248_ref(), idct2_1d(), idct_1d(), idct_col(), idct_col_3(), idct_col_4(), idct_col_8(), idct_row(), idctRowCondDC(), idctSparseCol(), init(), init_axis_color(), init_noise(), init_pass2(), interleave_TMPL(), interpolate(), INTERPOLATE_METHOD(), inverse4(), iterate_frame(), libopenjpeg_copy_packed12(), libopenjpeg_copy_packed16(), libopenjpeg_copy_packed8(), libopenjpeg_copy_unpacked16(), libopenjpeg_copy_unpacked8(), librsvg_decode_frame(), libx265_encode_frame(), LLVMFuzzerTestOneInput(), load_data(), lpc_prediction(), lpf(), lum(), luma_mc_bi(), lumRangeToJpeg16_c(), main(), make_bands(), make_filters_from_proto(), map_val_34_to_20(), mapres(), mediumthresh_c(), mf_enca_output_score(), mov_read_default(), mov_read_tkhd(), mov_read_udta_string(), MPA_encode_init(), multiple_resample(), multiply(), noise(), noise_scale(), nppscale_eval_dimensions(), nvenc_setup_rate_control(), of_open(), open_filter_param(), opt_size(), optimize_colors(), optimum_block_height(), optimum_block_width(), overlay_vaapi_config_input_overlay(), plot_gamuts(), plot_white_point(), postProcess_TMPL(), predictor_update_3930(), process(), process_c(), ps_hybrid_analysis_c(), ps_tableinit(), psy_3gpp_init(), psycho_acoustic_model(), put_float(), qdm2_decode(), quantize_bands(), read_diff_float_data(), ring2_test(), round_sample(), sbc_synthesize_eight(), sbc_synthesize_four(), sbr_hf_apply_noise(), sbr_hf_assemble(), sbr_hf_g_filt_c(), sbr_hf_gen_c(), sbr_hf_inverse_filter(), sbr_make_f_derived(), sbr_make_f_master(), sbr_qmf_deint_bfly_c(), sbr_qmf_deint_neg_c(), scale_eval_dimensions(), scc_write_packet(), scd_read_track(), segment_end(), set_ass_header(), set_roi_map(), set_volume(), setup_bumping(), sgi_rle_encode(), sign_extend(), softthresh_c(), spx_coordinates(), sr_1d53(), ssim360_end1(), ssim360_endn_16bit(), ssim360_endn_8bit(), ssim360_plane_8bit(), ssim360_tape(), ssim_end1(), ssim_plane(), stream_seek(), stream_skip(), stream_write(), subband_scale(), svq3_luma_dc_dequant_idct_c(), svq3_mc_dir_part(), sws_getGaussianVec(), sws_printVec2(), synchronize_audio(), tansig_approx(), tm2_low_chroma(), tm2_low_res_block(), truespeech_synth(), udp_port(), unquantize_dct_coeffs(), unsharp_opencl_make_filter_params(), update_output_color_information(), vaapi_encode_init_rate_control(), value_string(), vector_fmul_add_c(), vector_fmul_c(), vector_fmul_reverse_c(), vector_pow43(), vertical_compose53iL0_TMPL(), viv_read_packet(), vtenc_cm_to_avpacket(), wma_decode_block(), wmv2_idct_col(), wmv2_idct_row(), write_packet(), wv_unpack_mono(), wv_unpack_stereo(), xvid_correct_framerate(), yae_adjust_position(), yae_flush(), and zero_extend().

◆ sample_rate

sample_rate
Examples
mux.c, and resample_audio.c.

Definition at line 424 of file ffmpeg_filter.c.

Referenced by aiff_write_header(), alloc_audio_frame(), ath_init(), ath_init1(), audio_write_header(), audiogen(), avpriv_mpegaudio_decode_header(), caf_write_header(), cdata_read_header(), celt_header(), chctx_init(), compute_frame_duration(), config_input(), config_output(), config_props(), convert_dir2zdf(), convert_width2qfactor(), dca_parse(), dca_parse_params(), decode_init(), draw_response(), dump_paramchange(), dv_audio_frame_size(), dvdvideo_audio_stream_analyze(), epaf_read_header(), equalizer(), ff_add_param_change(), ff_adx_calculate_coeffs(), ff_alsa_open(), ff_mpa_decode_header(), ff_voc_get_packet(), ff_wma_get_frame_len_bits(), fill_samples(), filter_channels(), filter_prepare(), find_expected_header(), flac_probe(), flac_read_header(), flv_read_packet(), frame_size(), generate_intervals(), get_aiff_header(), get_lowpass(), get_rdelta(), get_vp9_level(), idcin_probe(), idcin_read_header(), init_encoder(), ircam_read_header(), laf_read_header(), load_data(), main(), mkv_write_track(), mlp_peak_bitrate(), mlp_read_header(), moflex_read_sync(), mxf_compute_sample_count(), output_mpd(), parse_audio_var(), parse_delays(), pp_bnk_probe(), put_wav_header(), pvf_read_header(), qoa_decode_frame(), query_formats(), read_sm_data(), rv10_write_header(), samples_per_packet(), set_margin_curve(), sga_probe(), smush_read_header(), sox_read_header(), spdif_header_dts(), spdif_header_dts4(), stream_component_open(), swap_samplerates_on_filter(), tak_get_nb_samples(), vmd_probe(), wavesynth_parse_extradata(), wavpack_decode_block(), wsaud_read_header(), and yae_reset().

◆ sample_rates

sample_rates

◆ d

d

Definition at line 424 of file ffmpeg_filter.c.

Referenced by activate(), add_filename_as_pkt_side_data(), adx_decode(), adx_encode(), append_path(), apply_bdof(), aptx_quantize_difference(), ARRAY_RENAME(), asf_get_packet(), au_compress(), au_decompress(), au_detector_init(), audio_frame_cksum(), av_add_stable(), av_basename(), av_d2q(), av_des_crypt(), av_des_crypt_mac(), av_des_init(), av_des_mac(), av_dirname(), av_expr_parse_and_eval(), av_iamf_param_definition_alloc(), av_input_audio_device_next(), av_input_video_device_next(), av_opt_is_set_to_default(), av_output_audio_device_next(), av_output_video_device_next(), av_parse_ratio(), av_strtod(), av_timecode_adjust_ntsc_framenum2(), av_timegm(), avi_sync(), avio_close_dyn_buf(), avio_get_dyn_buf(), avpriv_fits_header_parse_line(), avs_probe(), blend_slice_packed_rgb(), body(), build_color_map(), build_filter(), calculate_visual_weight(), cas_slice16(), cas_slice8(), cavs_filter_ch_c(), cavs_filter_cv_c(), cavs_filter_lh_c(), cavs_filter_lv_c(), celt_autocorr(), check_add_hfyu_left_pred_bgr32(), check_idct(), check_idct_dc4(), check_loopfilter_16y(), check_loopfilter_8uv(), check_loopfilter_simple(), check_luma_dc_wht(), check_mc(), check_pixfmt_descriptors(), clamp_add_subtract_half(), cluster_mvs(), clut_find_nearlest_alpha(), clut_pick_or_set(), cmp_direct_inline(), cmp_inline(), color_distance(), color_graticule(), color_graticule16(), compute_max_row(), compute_mb_distortion(), compute_min_row(), compute_unsafe_ssd_integral_image(), compute_weights_line_c(), config_input(), conjugate_quaternion(), copy_context_after_encode(), copy_context_before_encode(), count_colors(), cubic_interpolate_func(), decode_13(), decode_adaptive45(), decode_adaptive6(), decode_deep_tvdc32(), decode_delta_j(), decode_mb_i(), decode_rle(), decode_subframe_fixed(), decoder_abort(), decoder_decode_frame(), decoder_destroy(), decoder_init(), decoder_start(), decompose_transform(), deInterlaceMedian_TMPL(), delta_decode(), delta_mono(), delta_stereo(), demux_alloc(), demux_bsf_flush(), demux_done(), demux_final_stats(), demux_flush(), demux_send(), demux_send_for_stream(), demux_stream_alloc(), diff_pixels_mvi(), diff_planes(), dirac_decode_frame_internal(), distortion_correction_filter_slice(), do_a_deblock_C(), do_send(), doHorizDefFilter_C(), doVertDefFilter_altivec(), doVertDefFilter_TMPL(), dp_from_dec(), dpx_parse(), draw_response(), dss_read_metadata_date(), dv_calc_mb_coordinates(), dv_encode_video_segment(), dv_init_weight_tables(), dv_inject_audio(), dv_work_pool_size(), dyn_buf_seek(), dyn_buf_write(), ebur128_calc_gating_block(), encode_frame(), encode_init(), encode_residual_fixed(), encode_thread(), epzs_motion_search2(), epzs_motion_search_internal(), eq_interp(), estimate_coeff(), eval_expr(), exchange(), exec_func(), factor(), fade(), ff_aptx_generate_dither(), ff_big_div(), ff_dv_init_dynamic_tables(), ff_generate_wave_table(), ff_h264_chroma_dc_dequant_idct(), ff_h264_chroma_dc_dequant_idct_8_mmi(), ff_h264_execute_ref_pic_marking(), ff_is_intra_only(), ff_me_search_umh(), ff_mpeg12_find_best_frame_rate(), ff_mqc_encode(), ff_opus_dsp_init_riscv(), ff_printGUID(), ff_put_vp8_bilinear16_hv_mmi(), ff_put_vp8_bilinear16_v_mmi(), ff_put_vp8_bilinear4_hv_mmi(), ff_put_vp8_bilinear4_v_mmi(), ff_put_vp8_bilinear8_hv_mmi(), ff_put_vp8_bilinear8_v_mmi(), ff_spatial_idwt_init(), ff_spatial_idwt_init_x86(), ff_spatial_idwt_slice2(), ff_sws_alphablendaway(), ff_urldecode(), ff_vc1_h_overlap_mmi(), ff_vc1_h_s_overlap_mmi(), ff_vc1_mc_4mv_chroma4(), ff_vc1_v_overlap_mmi(), ff_vc1_v_s_overlap_mmi(), ff_vector_fmul_add_altivec(), ff_vector_fmul_add_vsx(), ff_vector_fmul_reverse_altivec(), ff_vector_fmul_reverse_vsx(), ff_vvc_inv_dct2_16(), ff_vvc_inv_dct2_32(), ff_vvc_inv_dct2_8(), ffio_close_null_buf(), ffio_free_dyn_buf(), ffio_reset_dyn_buf(), fill_gamma_table(), fill_lut(), filter_dbl(), filter_dblp(), filter_flt(), filter_fltp(), filter_frame(), find_form_factor(), flac_lpc_16_c(), format_duration(), fov_from_dfov(), frame_end(), free_vsframe_ref(), freq2bark(), ftp_passive_mode_epsv(), full_search(), funny_diamond_search(), gain_interpolate_func(), generate_density_map(), generate_round_keys(), get_coeff(), get_coeffs(), get_dc(), get_gtx_flag_inc(), get_mb_score(), get_nb_points(), get_shift(), get_slice_poc(), get_stream_idx(), getsigctxno(), getSplineCoeff(), getSSD(), getSSD0(), h263_h_loop_filter_c(), h263_v_loop_filter_c(), h264_loop_filter_chroma(), h264_loop_filter_chroma_intra(), h264_loop_filter_luma(), h264_loop_filter_luma_intra(), h_block_filter(), hable(), hex_search(), hexfloat(), horizX1Filter(), hpel_motion_search(), idct_1d(), iff_probe(), ifile_close(), ifile_open(), incr_cntdec(), init_context_defaults(), init_MP4DescrParseContext(), init_pass2(), init_segment(), initFilter(), input_file_item_name(), input_packet_process(), input_thread(), interleave_cols_to_any(), interp_cubic_hermite_half(), interp_prism(), interp_pyramid(), interp_tetrahedral(), interp_trilinear(), interpol(), interpolate(), intra_pred_dc_128(), intra_pred_down_left(), intra_pred_down_right(), intra_pred_horiz(), intra_pred_lp(), intra_pred_lp_left(), intra_pred_lp_top(), intra_pred_plane(), intra_pred_vert(), inverse4(), invert_step(), is_au_start(), is_fallback_mode(), is_mv_diff_gt_3(), ist_add(), ist_filter_add(), ist_use(), kux_probe(), l2s_dia_search(), lavfi_read_packet(), lbr_bank_c(), lex_double(), log_value(), logdb(), loop_filter_chroma_strong(), loop_filter_chroma_strong_one_side(), loop_filter_chroma_weak(), loop_filter_luma_large(), loop_filter_luma_strong(), loop_filter_luma_weak(), lowpass(), lpc_prediction(), LR128(), lz_unpack(), MAC64(), main(), mapres(), median4(), midequalizer16(), mip_upsampling_1d(), mix_core(), MLS64(), mode23(), mode24(), modify_qscale(), monoblack2Y_c(), monowhite2Y_c(), motion_search(), mp4_read_iods(), mp4_read_od(), mpadsp_init_tabs(), mpc_probe(), mpeg4_decode_sprite_trajectory(), normalize_double(), normalize_xy(), null_buf_write(), offset_fn(), open_filter_param(), opencl_device_create(), opencl_device_create_internal(), opus_packet(), palToA_c(), palToY_c(), pannini_to_xyz(), parse_dsd_prop(), parse_keyframes_index(), parse_mp4_descr(), parse_mp4_descr_arr(), parse_MP4DecConfigDescrTag(), parse_MP4ESDescrTag(), parse_MP4IODescrTag(), parse_MP4ODescrTag(), parse_MP4SLDescrTag(), parse_number(), parse_playlist(), parse_primary(), pchip_edge_case(), picmemset(), picmemset_8bpp(), png_get_interlaced_row(), png_put_interlaced_row(), precompute_c(), pred16x16_vertical(), predictor(), prelut_interp_1d_linear(), print_fps(), probe(), process_command(), process_frame(), psnr(), put_amf_double(), put_swf_matrix(), put_vector(), qpel_motion_search(), quant(), read_high_coeffs(), read_highpass(), readrate_sleep(), render_slice(), renew_table3(), report_new_stream(), resample_cubic(), resolve_divisor(), resync(), rgb12to15(), rgb12tobgr12(), rgb15to16_c(), rgb15to16_TMPL(), rgb15to24(), rgb15to32_c(), rgb15to32_TMPL(), rgb15tobgr24_c(), rgb15tobgr24_TMPL(), rgb15tobgr32(), rgb16to15_c(), rgb16to15_TMPL(), rgb16to24(), rgb16to32_c(), rgb16to32_TMPL(), rgb16tobgr24_c(), rgb16tobgr24_TMPL(), rgb16tobgr32(), rgb24to15_c(), rgb24to15_TMPL(), rgb24to16_c(), rgb24to16_TMPL(), rgb24tobgr15_c(), rgb24tobgr15_TMPL(), rgb24tobgr16_c(), rgb24tobgr16_TMPL(), rgb32to15_c(), rgb32to15_TMPL(), rgb32to16_c(), rgb32to16_TMPL(), rgb32tobgr15_c(), rgb32tobgr15_TMPL(), rgb32tobgr16_c(), rgb32tobgr16_TMPL(), rgtc2_block_internal(), ring2_test(), ripemd128_transform(), ripemd160_transform(), ripemd256_transform(), ripemd320_transform(), rle(), rtcp_update_jitter(), run_estimate_kernel(), run_postproc(), run_test(), sab_diamond_search(), sad_hpel_motion_search(), saturation_matrix(), sbc_encode_init(), scale_double(), sch_add_demux(), sch_add_demux_stream(), sch_demux_send(), sch_free(), sch_start(), sch_stop(), schedule_update_locked(), seek_to_start(), select_palette(), set_format_info(), set_frame(), set_meta(), set_param(), set_string_number(), set_tf1s(), sha1_transform(), sha256_transform(), sha512_transform(), shrink22(), shrink44(), shuffle_bytes_0321_c(), shuffle_bytes_2103_c(), sig_coeff_flag_decode(), silk_decode_excitation(), small_diamond_search(), solve(), spatial_compose_daub97i_dy_TMPL(), spatial_compose_dd137i_dy_TMPL(), spatial_compose_dd97i_dy_TMPL(), spatial_compose_dirac53i_dy_TMPL(), spatial_compose_fidelity_TMPL(), spatial_compose_haari_dy_TMPL(), spatial_idwt_init_TMPL(), srt_write_packet(), ssd_plane(), store_slice16_c(), store_slice2_c(), store_slice_c(), swri_noise_shaping_TMPL(), synth_filter_fixed(), synth_filter_fixed_64(), synth_filter_float(), synth_filter_float_64(), tempNoiseReducer_altivec(), tempNoiseReducer_TMPL(), thp_probe(), tm2_apply_deltas(), tm2_read_deltas(), tm2_update_block(), transform_step(), ts_discontinuity_detect(), ts_discontinuity_process(), ts_fixup(), umh_search(), unwrap(), update_double_stat(), update_float_stat(), update_minmax(), update_model2_to_6(), update_model3_to_7(), update_model5_to_6(), update_model6_to_7(), update_prob(), update_stat(), url_open_dyn_buf_internal(), v_block_filter(), var_diamond_search(), vc1_filter_line(), vc1_h_overlap_c(), vc1_h_s_overlap_c(), vc1_v_overlap_c(), vc1_v_s_overlap_c(), vertX1Filter_TMPL(), video_audio_display(), video_duration_estimate(), vivo_read_header(), vmultiply(), vorbis_packet(), vu9_to_vu12_c(), vu9_to_vu12_TMPL(), wdec16(), write_matrix(), write_number(), writer_print_time(), xa_decode(), xyz_to_ball(), xyz_to_pannini(), xyz_to_tetrahedron(), yvu9_to_yuy2_c(), yvu9_to_yuy2_TMPL(), zmbv_decode_xor_16(), zmbv_decode_xor_32(), and zmbv_decode_xor_8().

◆ fg_class

const AVClass fg_class
static
Initial value:
= {
.class_name = "FilterGraph",
.item_name = fg_item_name,
}

Definition at line 933 of file ffmpeg_filter.c.

Referenced by fg_create().

name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
avfilter_graph_create_filter
int avfilter_graph_create_filter(AVFilterContext **filt_ctx, const AVFilter *filt, const char *name, const char *args, void *opaque, AVFilterGraph *graph_ctx)
Create and add a filter instance into an existing graph.
Definition: avfiltergraph.c:137
OutputFilterPriv
Definition: ffmpeg_filter.c:199
fail
#define fail()
Definition: checkasm.h:179
type
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
Definition: writing_filters.txt:86
fg_item_name
static const char * fg_item_name(void *obj)
Definition: ffmpeg_filter.c:926
arg
const char * arg
Definition: jacosubdec.c:67
avfilter_get_by_name
const AVFilter * avfilter_get_by_name(const char *name)
Get a filter definition matching the given name.
Definition: allfilters.c:629
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
AV_CLASS_CATEGORY_FILTER
@ AV_CLASS_CATEGORY_FILTER
Definition: log.h:36
for
for(k=2;k<=8;++k)
Definition: h264pred_template.c:425
avfilter_link
int avfilter_link(AVFilterContext *src, unsigned srcpad, AVFilterContext *dst, unsigned dstpad)
Link two filters together.
Definition: avfilter.c:148
AV_LOG_INFO
#define AV_LOG_INFO
Standard information.
Definition: log.h:191
ret
ret
Definition: filter_design.txt:187
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27