FFmpeg
Data Structures | Macros | 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/timestamp.h"
#include "libavcodec/mathops.h"

Go to the source code of this file.

Data Structures

struct  FilterGraphPriv
 
struct  InputFilterPriv
 
struct  FPSConvContext
 
struct  OutputFilterPriv
 

Macros

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

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 int configure_filtergraph (FilterGraph *fg)
 
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 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)
 
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)
 Create a new filtergraph in the global filtergraph list. More...
 
int init_simple_filtergraph (InputStream *ist, OutputStream *ost, char *graph_desc)
 
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, OutputFilter *ofilter, AVFilterInOut *out)
 
static int configure_output_audio_filter (FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
 
static int configure_output_filter (FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
 
int check_filter_outputs (void)
 
static void sub2video_prepare (InputFilterPriv *ifp)
 
static int configure_input_video_filter (FilterGraph *fg, InputFilter *ifilter, AVFilterInOut *in)
 
static int configure_input_audio_filter (FilterGraph *fg, InputFilter *ifilter, AVFilterInOut *in)
 
static int configure_input_filter (FilterGraph *fg, InputFilter *ifilter, AVFilterInOut *in)
 
static void cleanup_filtergraph (FilterGraph *fg)
 
static int filter_is_buffersrc (const AVFilterContext *f)
 
static int graph_is_meta (AVFilterGraph *graph)
 
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)
 
void fg_send_command (FilterGraph *fg, double time, const char *target, const char *command, const char *arg, int all_filters)
 
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 fg_output_frame (OutputFilterPriv *ofp, AVFrame *frame)
 
static int fg_output_step (OutputFilterPriv *ofp, int flush)
 
int reap_filters (FilterGraph *fg, int flush)
 Get and encode new output from specified filtergraph, without causing activity. More...
 
void ifilter_sub2video_heartbeat (InputFilter *ifilter, int64_t pts, AVRational tb)
 
int ifilter_sub2video (InputFilter *ifilter, const AVFrame *frame)
 
int ifilter_send_eof (InputFilter *ifilter, int64_t pts, AVRational tb)
 
int ifilter_send_frame (InputFilter *ifilter, AVFrame *frame, int keep_reference)
 
int fg_transcode_step (FilterGraph *graph, InputStream **best_ist)
 Perform a step of transcoding for the specified filter graph. More...
 

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 342 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, fg->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)

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 69 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

◆ configure_filtergraph()

static int configure_filtergraph ( FilterGraph fg)
static

Definition at line 1611 of file ffmpeg_filter.c.

Referenced by ifilter_send_eof(), ifilter_send_frame(), and ofilter_bind_ost().

◆ sub2video_get_blank_frame()

static int sub2video_get_blank_frame ( InputFilterPriv ifp)
static

Definition at line 205 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 225 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 256 of file ffmpeg_filter.c.

Referenced by ifilter_sub2video_heartbeat(), and sub2video_update().

◆ sub2video_update()

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

◆ choose_pix_fmts()

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

Definition at line 313 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 371 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 391 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 439 of file ffmpeg_filter.c.

Referenced by graph_opts_apply().

◆ graph_opts_apply()

static int graph_opts_apply ( AVFilterGraphSegment seg)
static

Definition at line 494 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 518 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 562 of file ffmpeg_filter.c.

Referenced by ifilter_send_eof(), ifilter_send_frame(), and ofilter_bind_ost().

◆ describe_filter_link()

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

Definition at line 573 of file ffmpeg_filter.c.

Referenced by fg_create().

◆ ofilter_alloc()

static OutputFilter* ofilter_alloc ( FilterGraph fg)
static

Definition at line 585 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 602 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 625 of file ffmpeg_filter.c.

Referenced by ofilter_bind_ost().

◆ ofilter_bind_ost()

int ofilter_bind_ost ( OutputFilter ofilter,
OutputStream ost 
)

Definition at line 665 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 774 of file ffmpeg_filter.c.

Referenced by fg_create().

◆ fg_free()

void fg_free ( FilterGraph **  pfg)

Definition at line 800 of file ffmpeg_filter.c.

Referenced by ffmpeg_cleanup().

◆ fg_item_name()

static const char* fg_item_name ( void *  obj)
static

Definition at line 852 of file ffmpeg_filter.c.

◆ fg_create()

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

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 866 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 
)

Definition at line 957 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 997 of file ffmpeg_filter.c.

Referenced by init_complex_filtergraph().

◆ init_complex_filtergraph()

int init_complex_filtergraph ( FilterGraph fg)

Definition at line 1063 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 1125 of file ffmpeg_filter.c.

Referenced by configure_input_video_filter().

◆ configure_output_video_filter()

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

Definition at line 1147 of file ffmpeg_filter.c.

Referenced by configure_output_filter().

◆ configure_output_audio_filter()

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

Definition at line 1226 of file ffmpeg_filter.c.

Referenced by configure_output_filter().

◆ configure_output_filter()

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

Definition at line 1334 of file ffmpeg_filter.c.

Referenced by configure_filtergraph().

◆ check_filter_outputs()

int check_filter_outputs ( void  )

Definition at line 1349 of file ffmpeg_filter.c.

◆ sub2video_prepare()

static void sub2video_prepare ( InputFilterPriv ifp)
static

Definition at line 1367 of file ffmpeg_filter.c.

Referenced by configure_input_video_filter().

◆ configure_input_video_filter()

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

Definition at line 1378 of file ffmpeg_filter.c.

Referenced by configure_input_filter().

◆ configure_input_audio_filter()

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

Definition at line 1508 of file ffmpeg_filter.c.

Referenced by configure_input_filter().

◆ configure_input_filter()

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

Definition at line 1567 of file ffmpeg_filter.c.

Referenced by configure_filtergraph().

◆ cleanup_filtergraph()

static void cleanup_filtergraph ( FilterGraph fg)
static

Definition at line 1577 of file ffmpeg_filter.c.

Referenced by configure_filtergraph().

◆ filter_is_buffersrc()

static int filter_is_buffersrc ( const AVFilterContext f)
static

Definition at line 1587 of file ffmpeg_filter.c.

Referenced by graph_is_meta().

◆ graph_is_meta()

static int graph_is_meta ( AVFilterGraph graph)
static

Definition at line 1594 of file ffmpeg_filter.c.

Referenced by configure_filtergraph().

◆ 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 1749 of file ffmpeg_filter.c.

Referenced by ist_filter_add().

◆ ifilter_parameters_from_frame()

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

Definition at line 1783 of file ffmpeg_filter.c.

Referenced by ifilter_send_frame().

◆ filtergraph_is_simple()

int filtergraph_is_simple ( const FilterGraph fg)

Definition at line 1812 of file ffmpeg_filter.c.

Referenced by configure_filtergraph(), ifilter_bind_ist(), and print_stream_maps().

◆ 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 1818 of file ffmpeg_filter.c.

Referenced by check_keyboard_interaction().

◆ choose_out_timebase()

static int choose_out_timebase ( OutputFilterPriv ofp,
AVFrame frame 
)
static

Definition at line 1842 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 1919 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 1961 of file ffmpeg_filter.c.

Referenced by fg_output_frame().

◆ fg_output_frame()

static int fg_output_frame ( OutputFilterPriv ofp,
AVFrame frame 
)
static

Definition at line 2077 of file ffmpeg_filter.c.

Referenced by fg_output_step().

◆ fg_output_step()

static int fg_output_step ( OutputFilterPriv ofp,
int  flush 
)
static

Definition at line 2149 of file ffmpeg_filter.c.

Referenced by reap_filters().

◆ reap_filters()

int reap_filters ( FilterGraph fg,
int  flush 
)

Get and encode new output from specified filtergraph, without causing activity.

Returns
0 for success, <0 for severe errors

Definition at line 2228 of file ffmpeg_filter.c.

Referenced by fg_transcode_step(), ifilter_send_frame(), and transcode_step().

◆ ifilter_sub2video_heartbeat()

void ifilter_sub2video_heartbeat ( InputFilter ifilter,
int64_t  pts,
AVRational  tb 
)

Definition at line 2248 of file ffmpeg_filter.c.

Referenced by sub2video_heartbeat().

◆ ifilter_sub2video()

int ifilter_sub2video ( InputFilter ifilter,
const AVFrame frame 
)

Definition at line 2274 of file ffmpeg_filter.c.

Referenced by process_subtitle(), and sub2video_flush().

◆ ifilter_send_eof()

int ifilter_send_eof ( InputFilter ifilter,
int64_t  pts,
AVRational  tb 
)

Definition at line 2307 of file ffmpeg_filter.c.

Referenced by send_filter_eof().

◆ ifilter_send_frame()

int ifilter_send_frame ( InputFilter ifilter,
AVFrame frame,
int  keep_reference 
)

Definition at line 2355 of file ffmpeg_filter.c.

Referenced by send_frame_to_filters().

◆ fg_transcode_step()

int fg_transcode_step ( FilterGraph graph,
InputStream **  best_ist 
)

Perform a step of transcoding for the specified filter graph.

Parameters
[in]graphfilter graph to consider
[out]best_istinput stream where a frame would allow to continue
Returns
0 for success, <0 for error

Definition at line 2452 of file ffmpeg_filter.c.

Referenced by transcode_step().

Variable Documentation

◆ int

int
Examples
encode_audio.c, and mux.c.

Definition at line 368 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(), deshake_opencl_init(), diff_bytes_c(), diff_int16_c(), distortion_correction_filter_slice(), dng_decode_tiles(), dnn_detect_post_proc_ov(), dnn_detect_post_proc_tf(), do_apply_filter(), do_chromakey_pixel(), do_chromakey_pixel16(), do_decode(), 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_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(), 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(), 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 368 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(), 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(), mp3_header_decompress(), mxf_compute_sample_count(), output_mpd(), parse_audio_var(), parse_delays(), pp_bnk_probe(), put_wav_header(), pvf_read_header(), 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 368 of file ffmpeg_filter.c.

Referenced by activate(), add_filename_as_pkt_side_data(), adx_decode(), adx_encode(), append_path(), aptx_quantize_difference(), ARRAY_RENAME(), asf_get_packet(), au_compress(), au_decompress(), au_detector_init(), audio_frame_cksum(), audio_samplerate_update(), audio_ts_process(), 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_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_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(), dec_open(), dec_packet(), dec_thread_start(), dec_thread_stop(), 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(), decoder_thread(), decompose_transform(), decompress_texture_thread(), deInterlaceMedian_TMPL(), delta_decode(), delta_mono(), delta_stereo(), demux_alloc(), demux_final_stats(), demux_stream_alloc(), diff_pixels_mvi(), diff_planes(), dirac_decode_frame_internal(), distortion_correction_filter_slice(), do_a_deblock_C(), doHorizDefFilter_C(), doVertDefFilter_altivec(), doVertDefFilter_TMPL(), 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(), 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(), 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(), fix_sub_duration_heartbeat(), 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_format(), get_mb_score(), get_nb_points(), get_shift(), get_slice_poc(), get_stream_idx(), getsigctxno(), getSplineCoeff(), getSSD(), 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(), hevc_loop_filter_chroma(), hevc_loop_filter_luma(), hex_search(), hexfloat(), horizX1Filter(), hpel_motion_search(), idct_1d(), iff_probe(), ifile_close(), ifile_duration_update(), ifile_get_packet(), 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_mv_diff_gt_3(), ist_add(), kux_probe(), l2s_dia_search(), lavfi_read_packet(), lbr_bank_c(), lex_double(), log_value(), logdb(), lowpass(), lpc_prediction(), LR128(), lz_unpack(), MAC64(), main(), median4(), midequalizer16(), 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(), packet_decode(), 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(), process_subtitle(), 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(), seek_to_start(), select_palette(), send_filter_eof(), 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(), 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(), TEXTUREDSP_FUNC_NAME(), thp_probe(), thread_start(), thread_stop(), tm2_apply_deltas(), tm2_read_deltas(), tm2_update_block(), transcode_subtitles(), 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(), video_frame_process(), 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 859 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:138
OutputFilterPriv
Definition: ffmpeg_filter.c:162
fail
#define fail()
Definition: checkasm.h:138
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:852
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:625
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:149
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