FFmpeg
Loading...
Searching...
No Matches
filters.h File Reference
#include "avfilter.h"
#include "libavutil/pixfmt.h"

Go to the source code of this file.

Data Structures

struct  AVFilterPad
 A filter pad used for either input or output. More...
 
struct  FilterLink
 Link properties exposed to filter code, but not external callers. More...
 
struct  FFFilter
 

Macros

#define FFERROR_NOT_READY   FFERRTAG('N','R','D','Y')
 Filters implementation helper functions and internal structures.
 
#define FFERROR_BUFFERSRC_EMPTY   FFERRTAG('M','P','T','Y')
 
#define AVFILTERPAD_FLAG_NEEDS_WRITABLE   (1 << 0)
 The filter expects writable frames from its input link, duplicating data buffers if needed.
 
#define AVFILTERPAD_FLAG_FREE_NAME   (1 << 1)
 The pad's name is allocated and should be freed generically.
 
#define FF_FILTER_FLAG_HWFRAME_AWARE   (1 << 0)
 The filter is aware of hardware frames, and any hardware frame context should not be automatically propagated through it.
 
#define FF_INLINK_IDX(link)
 Find the index of a link.
 
#define FF_OUTLINK_IDX(link)
 
#define FILTER_QUERY_FUNC(func)
 
#define FILTER_QUERY_FUNC2(func)
 
#define FILTER_PIXFMTS_ARRAY(array)
 
#define FILTER_SAMPLEFMTS_ARRAY(array)
 
#define FILTER_PIXFMTS(...)
 
#define FILTER_SAMPLEFMTS(...)
 
#define FILTER_SINGLE_PIXFMT(pix_fmt_)
 
#define FILTER_SINGLE_SAMPLEFMT(sample_fmt_)
 
#define FILTER_INOUTPADS(inout, array)
 
#define FILTER_INPUTS(array)
 
#define FILTER_OUTPUTS(array)
 
#define AVFILTER_DEFINE_CLASS_EXT(name, desc, options)
 
#define AVFILTER_DEFINE_CLASS(fname)
 
#define D2TS(d)
 
#define TS2D(ts)
 
#define TS2T(ts, tb)
 
#define FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink)
 Forward the status on an output link to an input link.
 
#define FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, filter)
 Forward the status on an output link to all input links.
 
#define FF_FILTER_FORWARD_STATUS(inlink, outlink)
 Acknowledge the status on an input link and forward it to an output link.
 
#define FF_FILTER_FORWARD_STATUS_ALL(inlink, filter)
 Acknowledge the status on an input link and forward it to an output link.
 
#define FF_FILTER_FORWARD_WANTED(outlink, inlink)
 Forward the frame_wanted_out flag from an output link to an input link.
 
#define FF_FILTER_FORWARD_WANTED_ANY(filter, inlink)
 Forward the frame_wanted_out flag from any of the output links to an input link.
 

Enumerations

enum  FilterFormatsState {
  FF_FILTER_FORMATS_PASSTHROUGH = 0 , FF_FILTER_FORMATS_QUERY_FUNC , FF_FILTER_FORMATS_QUERY_FUNC2 , FF_FILTER_FORMATS_PIXFMT_LIST ,
  FF_FILTER_FORMATS_SAMPLEFMTS_LIST , FF_FILTER_FORMATS_SINGLE_PIXFMT , FF_FILTER_FORMATS_SINGLE_SAMPLEFMT
}
 

Functions

static FilterLinkff_filter_link (AVFilterLink *link)
 
static const FFFilterfffilter (const AVFilter *f)
 
void ff_filter_set_ready (AVFilterContext *filter, unsigned priority)
 Mark a filter ready and schedule it for activation.
 
size_t ff_inlink_queued_frames (AVFilterLink *link)
 Get the number of frames available on the link.
 
int ff_inlink_check_available_frame (AVFilterLink *link)
 Test if a frame is available on the link.
 
int ff_inlink_queued_samples (AVFilterLink *link)
 
int ff_inlink_check_available_samples (AVFilterLink *link, unsigned min)
 Test if enough samples are available on the link.
 
int ff_inlink_consume_frame (AVFilterLink *link, AVFrame **rframe)
 Take a frame from the link's FIFO and update the link's stats.
 
int ff_inlink_consume_samples (AVFilterLink *link, unsigned min, unsigned max, AVFrame **rframe)
 Take samples from the link's FIFO and update the link's stats.
 
AVFrameff_inlink_peek_frame (AVFilterLink *link, size_t idx)
 Access a frame in the link fifo without consuming it.
 
int ff_inlink_make_frame_writable (AVFilterLink *link, AVFrame **rframe)
 Make sure a frame is writable.
 
int ff_inlink_acknowledge_status (AVFilterLink *link, int *rstatus, int64_t *rpts)
 Test and acknowledge the change of status on the link.
 
void ff_inlink_request_frame (AVFilterLink *link)
 Mark that a frame is wanted on the link.
 
void ff_inlink_set_status (AVFilterLink *link, int status)
 Set the status on an input link.
 
int ff_outlink_frame_wanted (AVFilterLink *link)
 Test if a frame is wanted on an output link.
 
int ff_outlink_get_status (AVFilterLink *link)
 Get the status on an output link.
 
void ff_avfilter_link_set_in_status (AVFilterLink *link, int status, int64_t pts)
 Set the status field of a link from the source filter.
 
static void ff_outlink_set_status (AVFilterLink *link, int status, int64_t pts)
 Set the status field of a link from the source filter.
 
int ff_inoutlink_check_flow (AVFilterLink *inlink, AVFilterLink *outlink)
 Check for flow control between input and output.
 
int ff_filter_init_hw_frames (AVFilterContext *avctx, AVFilterLink *link, int default_pool_size)
 Perform any additional setup required for hardware frames.
 
int ff_filter_process_command (AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
 Generic processing of user supplied commands that are set in the same way as the filter options.
 
int ff_filter_get_nb_threads (AVFilterContext *ctx) av_pure
 Get number of threads for current filter instance.
 
static int ff_slice_pos (int total, int jobnr, int nb_jobs)
 Compute the boundary index for a slice when work of size total is split into nb_jobs slices.
 
int ff_filter_frame (AVFilterLink *link, AVFrame *frame)
 Send a frame of data to the next filter.
 
int ff_request_frame (AVFilterLink *link)
 Request an input frame from the filter at the other end of the link.
 
int ff_append_inpad (AVFilterContext *f, AVFilterPad *p)
 Append a new input/output pad to the filter's list of such pads.
 
int ff_append_outpad (AVFilterContext *f, AVFilterPad *p)
 
int ff_append_inpad_free_name (AVFilterContext *f, AVFilterPad *p)
 
int ff_append_outpad_free_name (AVFilterContext *f, AVFilterPad *p)
 
int ff_pixfmt_is_in (enum AVPixelFormat fmt, const enum AVPixelFormat *fmts)
 Tell if a pixel format is contained in the provided AV_PIX_FMT_NONE-terminated list.
 
int ff_filter_execute (AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
 

Macro Definition Documentation

◆ FFERROR_NOT_READY

◆ FFERROR_BUFFERSRC_EMPTY

#define FFERROR_BUFFERSRC_EMPTY   FFERRTAG('M','P','T','Y')

Definition at line 35 of file filters.h.

Referenced by activate(), avfilter_graph_request_oldest(), get_frame_internal(), and push_frame().

◆ AVFILTERPAD_FLAG_NEEDS_WRITABLE

#define AVFILTERPAD_FLAG_NEEDS_WRITABLE   (1 << 0)

The filter expects writable frames from its input link, duplicating data buffers if needed.

input pads only.

Definition at line 59 of file filters.h.

Referenced by filter_frame_framed().

◆ AVFILTERPAD_FLAG_FREE_NAME

#define AVFILTERPAD_FLAG_FREE_NAME   (1 << 1)

The pad's name is allocated and should be freed generically.

Definition at line 64 of file filters.h.

Referenced by append_pad(), avfilter_free(), ff_append_inpad_free_name(), ff_append_outpad_free_name(), and init().

◆ FF_FILTER_FLAG_HWFRAME_AWARE

#define FF_FILTER_FLAG_HWFRAME_AWARE   (1 << 0)

The filter is aware of hardware frames, and any hardware frame context should not be automatically propagated through it.

Definition at line 208 of file filters.h.

Referenced by ff_filter_config_links().

◆ FF_INLINK_IDX

#define FF_INLINK_IDX ( link)
Value:
((int)((link)->dstpad - (link)->dst->input_pads))

Find the index of a link.

I.e. find i such that link == ctx->(in|out)puts[i]

Definition at line 215 of file filters.h.

Referenced by config_input(), config_main_input(), config_overlay_input(), ff_qsvvpp_filter_frame(), filter_frame(), filter_frame(), filter_frame(), get_audio_buffer(), get_video_buffer(), import_map(), and submit_frame().

◆ FF_OUTLINK_IDX

#define FF_OUTLINK_IDX ( link)
Value:
((int)((link)->srcpad - (link)->src->output_pads))

Definition at line 216 of file filters.h.

Referenced by config_output(), config_output(), extract_plane(), filter_frame(), and movie_config_output_props().

◆ FILTER_QUERY_FUNC

#define FILTER_QUERY_FUNC ( func)
Value:
.formats.query_func = func, \
int(* func)(AVBPrint *dst, const char *in, const char *arg)
Definition jacosubdec.c:66
@ FF_FILTER_FORMATS_QUERY_FUNC
formats.query active.
Definition filters.h:230

Definition at line 238 of file filters.h.

◆ FILTER_QUERY_FUNC2

#define FILTER_QUERY_FUNC2 ( func)
Value:
.formats.query_func2 = func, \
@ FF_FILTER_FORMATS_QUERY_FUNC2
formats.query_func2 active.
Definition filters.h:231

Definition at line 241 of file filters.h.

◆ FILTER_PIXFMTS_ARRAY

#define FILTER_PIXFMTS_ARRAY ( array)
Value:
.formats.pixels_list = array, \
@ FF_FILTER_FORMATS_PIXFMT_LIST
formats.pixels_list active.
Definition filters.h:232
static int array[MAX_W *MAX_W]

Definition at line 244 of file filters.h.

◆ FILTER_SAMPLEFMTS_ARRAY

#define FILTER_SAMPLEFMTS_ARRAY ( array)
Value:
.formats.samples_list = array, \
@ FF_FILTER_FORMATS_SAMPLEFMTS_LIST
formats.samples_list active.
Definition filters.h:233

Definition at line 247 of file filters.h.

◆ FILTER_PIXFMTS

#define FILTER_PIXFMTS ( ...)
Value:
FILTER_PIXFMTS_ARRAY(((const enum AVPixelFormat []) { __VA_ARGS__, AV_PIX_FMT_NONE }))
#define FILTER_PIXFMTS_ARRAY(array)
Definition filters.h:244
AVPixelFormat
Pixel format.
Definition pixfmt.h:71
@ AV_PIX_FMT_NONE
Definition pixfmt.h:72

Definition at line 250 of file filters.h.

◆ FILTER_SAMPLEFMTS

#define FILTER_SAMPLEFMTS ( ...)
Value:
FILTER_SAMPLEFMTS_ARRAY(((const enum AVSampleFormat[]) { __VA_ARGS__, AV_SAMPLE_FMT_NONE }))
AVSampleFormat
Audio sample formats.
Definition samplefmt.h:55
@ AV_SAMPLE_FMT_NONE
Definition samplefmt.h:56
#define FILTER_SAMPLEFMTS_ARRAY(array)
Definition filters.h:247

Definition at line 252 of file filters.h.

◆ FILTER_SINGLE_PIXFMT

#define FILTER_SINGLE_PIXFMT ( pix_fmt_)
Value:
.formats.pix_fmt = pix_fmt_, \
@ FF_FILTER_FORMATS_SINGLE_PIXFMT
formats.pix_fmt active
Definition filters.h:234

Definition at line 254 of file filters.h.

◆ FILTER_SINGLE_SAMPLEFMT

#define FILTER_SINGLE_SAMPLEFMT ( sample_fmt_)
Value:
.formats.sample_fmt = sample_fmt_, \
@ FF_FILTER_FORMATS_SINGLE_SAMPLEFMT
formats.sample_fmt active.
Definition filters.h:235

Definition at line 257 of file filters.h.

◆ FILTER_INOUTPADS

#define FILTER_INOUTPADS ( inout,
array )
Value:
.p.inout = array, \
.nb_ ## inout = FF_ARRAY_ELEMS(array)
#define FF_ARRAY_ELEMS(a)

Definition at line 261 of file filters.h.

◆ FILTER_INPUTS

#define FILTER_INPUTS ( array)
Value:
static const AVFilterPad inputs[]
Definition af_aap.c:299
#define FILTER_INOUTPADS(inout, array)
Definition filters.h:261

Definition at line 264 of file filters.h.

◆ FILTER_OUTPUTS

#define FILTER_OUTPUTS ( array)
Value:
static const AVFilterPad outputs[]
Definition af_aap.c:310

Definition at line 265 of file filters.h.

◆ AVFILTER_DEFINE_CLASS_EXT

#define AVFILTER_DEFINE_CLASS_EXT ( name,
desc,
options )
Value:
static const AVClass name##_class = { \
.class_name = desc, \
.item_name = av_default_item_name, \
.option = options, \
.version = LIBAVUTIL_VERSION_INT, \
.category = AV_CLASS_CATEGORY_FILTER, \
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85
const char * desc
Definition libsvtav1.c:83
@ AV_CLASS_CATEGORY_FILTER
Definition log.h:36
const char * name
Definition qsvenc.c:142
Describe the class of an AVClass context structure.
Definition log.h:76

Definition at line 470 of file filters.h.

◆ AVFILTER_DEFINE_CLASS

#define AVFILTER_DEFINE_CLASS ( fname)
Value:
AVFILTER_DEFINE_CLASS_EXT(fname, #fname, fname##_options)
#define AVFILTER_DEFINE_CLASS_EXT(name, desc, options)
Definition filters.h:470

Definition at line 478 of file filters.h.

◆ D2TS

#define D2TS ( d)
Value:
long long int64_t
Definition coverity.c:34
#define AV_NOPTS_VALUE
Undefined timestamp value.
Definition avutil.h:247
#define isnan(x)
Definition libm.h:342

Definition at line 481 of file filters.h.

Referenced by activate(), and filter_frame().

◆ TS2D

#define TS2D ( ts)
Value:
((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts))
#define NAN

Definition at line 482 of file filters.h.

Referenced by eval_pts(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), select_frame(), and update_context().

◆ TS2T

◆ FF_FILTER_FORWARD_STATUS_BACK

#define FF_FILTER_FORWARD_STATUS_BACK ( outlink,
inlink )
Value:
do { \
int ret = ff_outlink_get_status(outlink); \
if (ret) { \
ff_inlink_set_status(inlink, ret); \
return 0; \
} \
} while (0)
int ff_outlink_get_status(AVFilterLink *link)
Get the status on an output link.
Definition avfilter.c:1648

Forward the status on an output link to an input link.

If the status is set, it will discard all queued frames and this macro will return immediately.

Definition at line 639 of file filters.h.

Referenced by activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), dnn_classify_activate(), dnn_detect_activate(), and spatial_activate().

◆ FF_FILTER_FORWARD_STATUS_BACK_ALL

#define FF_FILTER_FORWARD_STATUS_BACK_ALL ( outlink,
filter )
Value:
do { \
int ret = ff_outlink_get_status(outlink); \
if (ret) { \
unsigned i; \
for (i = 0; i < filter->nb_inputs; i++) \
ff_inlink_set_status(filter->inputs[i], ret); \
return 0; \
} \
} while (0)
void ff_inlink_set_status(AVFilterLink *link, int status)
Set the status on an input link.
Definition avfilter.c:1632
#define i(width, name, range_min, range_max)
Definition cbs_h264.c:63
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)
Definition h263dsp.c:29

Forward the status on an output link to all input links.

If the status is set, it will discard all queued frames and this macro will return immediately.

Definition at line 652 of file filters.h.

Referenced by activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), ff_framesync_activate(), libplacebo_activate(), xfade_activate(), and xfade_opencl_activate().

◆ FF_FILTER_FORWARD_STATUS

#define FF_FILTER_FORWARD_STATUS ( inlink,
outlink )
Value:
do { \
int status; \
if (ff_inlink_acknowledge_status(inlink, &status, &pts)) { \
ff_outlink_set_status(outlink, status, pts); \
return 0; \
} \
} while (0)
int ff_inlink_acknowledge_status(AVFilterLink *link, int *rstatus, int64_t *rpts)
Test and acknowledge the change of status on the link.
Definition avfilter.c:1467
static int64_t pts

Acknowledge the status on an input link and forward it to an output link.

If the status is set, this macro will return immediately.

Definition at line 666 of file filters.h.

Referenced by activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), filter_frame(), and spatial_activate().

◆ FF_FILTER_FORWARD_STATUS_ALL

#define FF_FILTER_FORWARD_STATUS_ALL ( inlink,
filter )
Value:
do { \
int status; \
if (ff_inlink_acknowledge_status(inlink, &status, &pts)) { \
unsigned i; \
for (i = 0; i < filter->nb_outputs; i++) \
ff_outlink_set_status(filter->outputs[i], status, pts); \
return 0; \
} \
} while (0)
static void ff_outlink_set_status(AVFilterLink *link, int status, int64_t pts)
Set the status field of a link from the source filter.
Definition filters.h:629

Acknowledge the status on an input link and forward it to an output link.

If the status is set, this macro will return immediately.

Definition at line 679 of file filters.h.

Referenced by activate(), activate(), and activate().

◆ FF_FILTER_FORWARD_WANTED

#define FF_FILTER_FORWARD_WANTED ( outlink,
inlink )
Value:
do { \
if (ff_outlink_frame_wanted(outlink)) { \
ff_inlink_request_frame(inlink); \
return 0; \
} \
} while (0)
int ff_outlink_frame_wanted(AVFilterLink *link)
Test if a frame is wanted on an output link.
Definition avfilter.c:1690

Forward the frame_wanted_out flag from an output link to an input link.

If the flag is set, this macro will return immediately.

Definition at line 694 of file filters.h.

Referenced by activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), dnn_classify_activate(), dnn_detect_activate(), filter_frame(), and process_frame().

◆ FF_FILTER_FORWARD_WANTED_ANY

#define FF_FILTER_FORWARD_WANTED_ANY ( filter,
inlink )
Value:
do { \
for (unsigned i = 0; i < filter->nb_outputs; i++) { \
if (ff_outlink_frame_wanted(filter->outputs[i])) { \
ff_inlink_request_frame(inlink); \
return 0; \
} \
} \
} while (0)

Forward the frame_wanted_out flag from any of the output links to an input link.

If the flag is set on any of the outputs, this macro will return immediately.

Definition at line 705 of file filters.h.

Referenced by activate(), activate(), activate(), activate(), and activate().

Enumeration Type Documentation

◆ FilterFormatsState

Enumerator
FF_FILTER_FORMATS_PASSTHROUGH 

The default value meaning that this filter supports all formats and (for audio) sample rates and channel layouts/counts as long as these properties agree for all inputs and outputs.

This state is only allowed in case all inputs and outputs actually have the same type. The union is unused in this state.

This value must always be zero (for default static initialization).

FF_FILTER_FORMATS_QUERY_FUNC 

formats.query active.

FF_FILTER_FORMATS_QUERY_FUNC2 

formats.query_func2 active.

FF_FILTER_FORMATS_PIXFMT_LIST 

formats.pixels_list active.

FF_FILTER_FORMATS_SAMPLEFMTS_LIST 

formats.samples_list active.

FF_FILTER_FORMATS_SINGLE_PIXFMT 

formats.pix_fmt active

FF_FILTER_FORMATS_SINGLE_SAMPLEFMT 

formats.sample_fmt active.

Definition at line 218 of file filters.h.

Function Documentation

◆ ff_filter_link()

static FilterLink * ff_filter_link ( AVFilterLink * link)
inlinestatic

Definition at line 199 of file filters.h.

Referenced by activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), amf_capture_frame(), amf_config_props(), amf_frc_filter_avframe(), amf_frc_filter_config_output(), amf_init_filter_config(), amf_init_vsrc(), analyze_frame(), av_buffersink_get_frame_flags(), av_buffersink_get_frame_rate(), av_buffersink_get_hw_frames_ctx(), av_buffersink_set_frame_size(), avfilter_link_get_hw_frames_ctx(), blockdetect_filter_frame(), blurdetect_filter_frame(), bwdif_vulkan_config_input(), bwdif_vulkan_config_output(), calc_persp_luts(), config_comm_output(), config_input(), config_input(), config_input(), config_input(), config_input(), config_input(), config_input(), config_input(), config_input_audio(), config_input_ref(), config_out_props(), config_out_props(), config_out_props(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output_props(), config_output_video(), config_props(), config_props(), config_props(), config_props(), config_props(), config_props(), config_props(), config_props(), config_props(), config_props(), config_props(), config_props(), config_props(), config_props(), config_props(), config_props_output(), config_props_output(), config_props_output(), config_props_output(), config_props_output(), config_props_ref(), config_props_ref(), config_video(), config_video_output(), config_video_output(), cuda_bilateral_config_props(), cuda_pad_alloc_out_frames_ctx(), cuda_pad_config_props(), cuda_pad_filter_frame(), cuda_pad_pad(), cudachromakey_config_props(), cudacolorspace_config_props(), cudascale_config_props(), cudatranspose_config_props(), cudaupload_config_output(), current_segment_finished(), ddagrab_config_props(), deint_d3d12_config_output(), deint_vaapi_config_output(), deshake_opencl_init(), do_blend(), do_eval(), do_scale(), draw_items(), draw_text(), drawvg_filter_frame(), dump_s12m_timecode(), evaluate(), evaluate_timeline_at_frame(), ff_filter_config_links(), ff_filter_graph_remove_filter(), ff_filter_init_hw_frames(), ff_opencl_filter_config_input(), ff_opencl_filter_config_output(), ff_vaapi_vpp_config_input(), ff_vaapi_vpp_config_output(), ff_vk_filter_config_input(), ff_vk_filter_config_output(), ff_yadif_config_output_common(), fill_frameinfo_by_link(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame_framed(), filter_frame_ref(), filter_slice(), fsync_config_props(), geq_filter_frame(), get_mfx_version(), gfxcapture_config_props(), have_alpha_planar(), have_alpha_planar(), hwdownload_config_input(), hwmap_config_output(), hwmap_get_buffer(), hwupload_config_output(), init_hwframe_ctx(), init_processing_chain(), init_processing_chain(), init_processing_chain(), init_processing_chain(), init_processing_chain(), init_processing_chain(), init_vpp_session(), interlace_vulkan_filter_frame(), libplacebo_activate(), libplacebo_config_input(), libplacebo_config_output(), lut2_config_output(), mestimate_d3d12_config_props(), movie_config_output_props(), nppscale_filter_frame(), nppscale_filter_frame_ref(), nppscale_scale(), oscilloscope_filter_frame(), output_frame(), output_single_frame(), overlay_cuda_blend(), overlay_cuda_config_output(), plot_freq(), process_frame(), process_frame(), qrencodesrc_config_props(), query_frame(), request_frame(), request_frame(), request_frame(), scale_d3d11_config_props(), scale_d3d12_config_props(), scale_frame(), scale_vt_config_output(), select_frame(), source_config_props(), testsrc_vulkan_config_props(), transpose_opencl_config_output(), transpose_vaapi_vpp_config_output(), transpose_vt_config_output(), transpose_vt_recreate_hw_ctx(), try_push_frame(), update_context(), update_crops(), update_pts(), weave_slice(), and xfade_opencl_config_output().

◆ fffilter()

◆ ff_filter_set_ready()

void ff_filter_set_ready ( AVFilterContext * filter,
unsigned priority )

Mark a filter ready and schedule it for activation.

This is automatically done when something happens to the filter (queued frame, status change, request on output). Filters implementing the activate callback can call it directly to perform one more round of processing later. It is also useful for filters reacting to external or asynchronous events.

Definition at line 229 of file avfilter.c.

Referenced by activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), ff_avfilter_link_set_in_status(), ff_filter_frame(), ff_inlink_request_frame(), ff_request_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame_to_filter(), forward_status_change(), link_set_out_status(), process_frame(), spatial_activate(), xfade_activate(), and xfade_opencl_activate().

◆ ff_inlink_queued_frames()

size_t ff_inlink_queued_frames ( AVFilterLink * link)

Get the number of frames available on the link.

Returns
the number of frames available in the link fifo.

Definition at line 1483 of file avfilter.c.

Referenced by activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), create_frame(), filter_have_queued(), and xfade_opencl_activate().

◆ ff_inlink_check_available_frame()

int ff_inlink_check_available_frame ( AVFilterLink * link)

Test if a frame is available on the link.

Returns
>0 if a frame is available

Definition at line 1489 of file avfilter.c.

Referenced by activate(), activate(), ff_inlink_consume_frame(), ff_inoutlink_check_flow(), and xfade_activate().

◆ ff_inlink_queued_samples()

◆ ff_inlink_check_available_samples()

int ff_inlink_check_available_samples ( AVFilterLink * link,
unsigned min )

Test if enough samples are available on the link.

Returns
>0 if enough samples are available
Note
on EOF and error, min becomes 1

Definition at line 1501 of file avfilter.c.

Referenced by activate(), activate(), activate(), activate(), activate(), check_ir(), check_ir(), and ff_inlink_consume_samples().

◆ ff_inlink_consume_frame()

int ff_inlink_consume_frame ( AVFilterLink * link,
AVFrame ** rframe )

◆ ff_inlink_consume_samples()

int ff_inlink_consume_samples ( AVFilterLink * link,
unsigned min,
unsigned max,
AVFrame ** rframe )

Take samples from the link's FIFO and update the link's stats.

If ff_inlink_check_available_samples() was previously called, the preferred way of expressing it is "av_assert1(ret);" immediately after ff_inlink_consume_samples(). Negative error codes must still be checked.

Note
May trigger process_command() and/or update is_disabled.
Returns
>0 if a frame is available, 0 and set rframe to NULL if no frame available, or AVERROR code

Definition at line 1540 of file avfilter.c.

Referenced by activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), convert_coeffs(), convert_coeffs(), ff_inlink_consume_frame(), filter_frame_to_filter(), get_frame_internal(), and try_push_frame().

◆ ff_inlink_peek_frame()

AVFrame * ff_inlink_peek_frame ( AVFilterLink * link,
size_t idx )

Access a frame in the link fifo without consuming it.

The first frame is numbered 0; the designated frame must exist.

Returns
the frame at idx position in the link fifo.

Definition at line 1561 of file avfilter.c.

Referenced by activate(), activate(), activate(), activate(), xfade_activate(), and xfade_opencl_activate().

◆ ff_inlink_make_frame_writable()

int ff_inlink_make_frame_writable ( AVFilterLink * link,
AVFrame ** rframe )

◆ ff_inlink_acknowledge_status()

int ff_inlink_acknowledge_status ( AVFilterLink * link,
int * rstatus,
int64_t * rpts )

Test and acknowledge the change of status on the link.

Status means EOF or an error condition; a change from the normal (0) status to a non-zero status can be queued in a filter's input link, it becomes relevant after the frames queued in the link's FIFO are processed. This function tests if frames are still queued and if a queued status change has not yet been processed. In that case it performs basic treatment (updating the link's timestamp) and returns a positive value to let the filter do its own treatments (flushing...).

Filters implementing the activate callback should call this function when they think it might succeed (usually after checking unsuccessfully for a queued frame). Filters implementing the filter_frame and request_frame callbacks do not need to call that since the same treatment happens in ff_filter_frame().

Parameters
[out]rstatusnew or current status
[out]rptscurrent timestamp of the link in link time base
Returns
>0 if status changed, <0 if status already acked, 0 otherwise

Definition at line 1467 of file avfilter.c.

Referenced by activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), consume_from_fifos(), dnn_classify_activate(), dnn_detect_activate(), forward_frame(), forward_frame(), generate_output(), get_frame_internal(), handle_input(), xfade_activate(), and xfade_opencl_activate().

◆ ff_inlink_request_frame()

◆ ff_inlink_set_status()

void ff_inlink_set_status ( AVFilterLink * link,
int status )

Set the status on an input link.

Also discard all frames in the link's FIFO.

Definition at line 1632 of file avfilter.c.

Referenced by activate(), activate(), activate(), activate(), activate(), activate(), filter_activate_default(), and xfade_activate().

◆ ff_outlink_frame_wanted()

◆ ff_outlink_get_status()

◆ ff_avfilter_link_set_in_status()

void ff_avfilter_link_set_in_status ( AVFilterLink * link,
int status,
int64_t pts )

Set the status field of a link from the source filter.

The pts should reflect the timestamp of the status change, in link time base and relative to the frames timeline. In particular, for AVERROR_EOF, it should reflect the end time of the last frame.

Definition at line 250 of file avfilter.c.

Referenced by av_buffersrc_close(), ff_outlink_set_status(), and request_frame_to_filter().

◆ ff_outlink_set_status()

static void ff_outlink_set_status ( AVFilterLink * link,
int status,
int64_t pts )
inlinestatic

◆ ff_inoutlink_check_flow()

int ff_inoutlink_check_flow ( AVFilterLink * inlink,
AVFilterLink * outlink )

Check for flow control between input and output.

This is necessary for filters that may produce several output frames for a single input event, otherwise they may produce them all at once, causing excessive memory consumption.

Definition at line 1654 of file avfilter.c.

Referenced by activate(), and activate().

◆ ff_filter_init_hw_frames()

int ff_filter_init_hw_frames ( AVFilterContext * avctx,
AVFilterLink * link,
int default_pool_size )

Perform any additional setup required for hardware frames.

link->hw_frames_ctx must be set before calling this function. Inside link->hw_frames_ctx, the fields format, sw_format, width and height must be set. If dynamically allocated pools are not supported, then initial_pool_size must also be set, to the minimum hardware frame pool size necessary for the filter to work (taking into account any frames which need to stored for use in operations as appropriate). If default_pool_size is nonzero, then it will be used as the pool size if no other modification takes place (this can be used to preserve compatibility).

Definition at line 1668 of file avfilter.c.

Referenced by config_output(), config_output(), ff_vaapi_vpp_config_output(), scale_vt_config_output(), and transpose_vt_recreate_hw_ctx().

◆ ff_filter_process_command()

◆ ff_filter_get_nb_threads()

int ff_filter_get_nb_threads ( AVFilterContext * ctx)

Get number of threads for current filter instance.

This number is always same or less than graph->nb_threads.

Definition at line 846 of file avfilter.c.

Referenced by activate(), activate(), activate(), activate(), activate(), activate(), analyze_frame(), blend_frame(), blend_frames(), blur_frame(), config_input(), config_input(), config_input(), config_input(), config_input(), config_input(), config_input(), config_input(), config_input(), config_input(), config_input(), config_input_ref(), config_input_ref(), config_input_ref(), config_input_ref(), config_input_ref(), config_output(), config_output(), config_output(), config_output(), config_output(), config_output(), config_props(), config_props(), config_props(), convert_frame(), do_blend(), do_convolve(), do_morpho(), draw_sierpinski(), filter(), filter(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), fir_frame(), gaussianiir2d(), geq_filter_frame(), init(), init(), init(), nlmeans_plane(), open_stream(), output_frame(), param_init(), prepare_impulse(), prepare_secondary(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), run_transcription(), scroll(), and xfade_frame().

◆ ff_slice_pos()

static int ff_slice_pos ( int total,
int jobnr,
int nb_jobs )
inlinestatic

Compute the boundary index for a slice when work of size total is split into nb_jobs slices.

Returns the first index of slice jobnr, so the slice jobnr covers [ff_slice_pos(total, jobnr, nb_jobs), ff_slice_pos(total, jobnr + 1, nb_jobs)).

The multiplication is performed in 64bit to avoid signed overflow of the total * jobnr intermediate that would occur for large dimensions and many slice threads.

Definition at line 763 of file filters.h.

Referenced by acolor(), acolor16(), amplify_channels(), average_slice16(), average_slice8(), bilateralo_planes(), black_counter(), blackframe_slice(), blend_frame_partial(), blend_slice_packed_rgb(), blur_planes(), box_slice(), cas_slice16(), cas_slice8(), chroma(), chroma16(), clear_slice16(), clear_slice8(), color(), color16(), color_balance16(), color_balance16_p(), color_balance8(), color_balance8_p(), colorcontrast_slice16(), colorcontrast_slice16p(), colorcontrast_slice8(), colorcontrast_slice8p(), colorcorrect_slice16(), colorcorrect_slice8(), colorize_slice16(), colorize_slice8(), colorizey_slice16(), colorizey_slice8(), colormap_slice(), complex_divide(), complex_multiply(), complex_xcorrelate(), compute_images_identity(), compute_images_msad(), compute_images_mse(), compute_sat_hue_metrics16(), compute_sat_hue_metrics8(), convert_frame(), convert_frame_partial(), copy_horizontal(), copy_vertical(), correct_frame(), deband_16_c(), deband_16_coupling_c(), deband_8_c(), deband_8_coupling_c(), deinterlace_plane_slice(), deinterlace_slice(), denoise(), detect_alpha(), detect_range(), displace_packed(), displace_planar(), distortion_correction_filter_slice(), do_backgroundkey16_slice(), do_backgroundkey_slice(), do_chromahold16_slice(), do_chromahold_slice(), do_chromakey16_slice(), do_chromakey_slice(), do_despill_slice(), do_hsvhold16_slice(), do_hsvhold_slice(), do_hsvkey16_slice(), do_hsvkey_slice(), do_lumakey_slice16(), do_lumakey_slice8(), do_slice(), draw(), drc_channels(), epx2_slice(), epx3_slice(), exposure_slice(), fade(), fft_channels(), fft_horizontal(), fft_vertical(), filter16_brng(), filter16_tout(), filter16_vrep(), filter8_brng(), filter8_tout(), filter8_vrep(), filter_channel(), filter_channel(), filter_channel(), filter_channel(), filter_channel(), filter_channels(), filter_channels(), filter_channels(), filter_channels(), filter_channels(), filter_channels(), filter_channels(), filter_channels(), filter_channels(), filter_channels(), filter_channels(), filter_color(), filter_color2(), filter_horizontally(), filter_mono(), filter_postscale(), filter_slice(), filter_slice(), filter_slice(), filter_slice(), filter_slice(), filter_slice(), filter_slice(), filter_slice(), filter_slice(), filter_slice(), filter_slice(), filter_slice(), filter_slice(), filter_slice(), filter_slice(), filter_slice(), filter_slice(), filter_slice(), filter_slice_alpha(), filter_slice_alpha16(), filter_slice_chroma(), filter_slice_chroma16(), filter_slice_grey_edge(), filter_slice_luma(), filter_slice_luma16(), filter_slice_packed(), filter_slice_planar(), filter_slice_rgb(), filter_slice_rgba_packed(), filter_slice_rgba_planar(), filter_vertically(), fir_channels(), flat(), flat16(), hqx_filter(), ifft_channels(), ifft_horizontal(), ifft_vertical(), irdft_horizontal16(), irdft_horizontal8(), irdft_vertical(), job_start(), limitdiff_slice(), lowpass(), lowpass16(), maskedclamp_slice(), maskedminmax_slice(), minmax_slice16(), minmax_slice8(), monochrome_slice16(), monochrome_slice8(), morpho_slice(), morpho_sliceX(), multiply_data(), multiply_slice(), nlmeans_slice(), ocio_filter_slice(), pixelize_slice(), pre_calculate_col(), premultiply_slice(), process_slice_uyvy422(), process_slice_yuv420p(), process_slice_yuv422p(), process_slice_yuv444p(), psy_channels(), rdft_horizontal16(), rdft_horizontal8(), rdft_vertical(), rnnoise_channels(), run_channel_cwt(), run_channels_cwt_prepare(), scroll_slice(), slice_geq_filter(), slice_get_derivative(), ssim_plane(), ssim_plane_16bit(), super2xsai(), temperature_slice16(), temperature_slice16p(), temperature_slice32(), temperature_slice8(), temperature_slice8p(), threshold_slice(), tonemap_slice(), tx_channel(), update_gain_histories(), v360_slice(), vibrance_slice16(), vibrance_slice16p(), vibrance_slice8(), vibrance_slice8p(), vif_filter1d(), vignetting_filter_slice(), weave_slice(), xbr_filter(), and xfade_slice().

◆ ff_filter_frame()

int ff_filter_frame ( AVFilterLink * link,
AVFrame * frame )

Send a frame of data to the next filter.

Parameters
linkthe output link over which the data is being sent
framea reference to the buffer of data being sent. The receiving filter will free this reference when it no longer needs it or pass it on to the next filter.
Returns
>= 0 on success, a negative AVERROR on error. The receiving filter is responsible for unreferencing frame in case of error.

Definition at line 1068 of file avfilter.c.

Referenced by activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), activate(), addroi_filter_frame(), amf_capture_frame(), amf_filter_filter_frame(), amf_frc_filter_avframe(), apply_filter(), audio_frame(), av_buffersrc_add_frame_flags(), avgblur_opencl_filter_frame(), avgblur_vulkan_filter_frame(), blend_frame(), blend_frame_for_dualinput(), blockdetect_filter_frame(), blur_frame(), blurdetect_filter_frame(), channelmap_filter_frame(), chromaber_vulkan_filter_frame(), compand_delay(), compand_drain(), compand_nodelay(), convolution_opencl_filter_frame(), create_frame(), cuda_bilateral_filter_frame(), cuda_pad_filter_frame(), cudachromakey_filter_frame(), cudacolorspace_filter_frame(), cudascale_filter_frame(), cudatranspose_filter_frame(), cudaupload_filter_frame(), ddagrab_request_frame(), decode_packet(), default_filter_frame(), deint_d3d12_process_frame(), deint_vaapi_filter_frame(), dnn_classify_activate(), dnn_classify_flush_frame(), dnn_detect_activate(), dnn_detect_flush_frame(), do_alphamerge(), do_blend(), do_convolve(), do_corr(), do_identity(), do_morpho(), do_psnr(), do_scale(), do_ssim(), do_ssim360(), do_vmaf(), do_xpsnr(), draw_spatial(), drawbox_vaapi_filter_frame(), drawvg_filter_frame(), end_last_frame(), extract_plane(), ff_qsvvpp_init(), ff_yadif_filter_frame(), filter(), filter(), filter_callback(), filter_callback(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame_mode_0(), filter_frame_mode_1(), filter_frame_ref(), fir_frame(), flip_bayer(), flush_frame(), flush_frame(), forward_frame(), forward_frame(), gblur_vulkan_filter_frame(), generate_output(), geq_filter_frame(), get_frame(), headphone_frame(), hwdownload_filter_frame(), hwmap_filter_frame(), hwupload_filter_frame(), iccdetect_filter_frame(), iccgen_filter_frame(), interlace_vulkan_filter_frame(), load_apply_palette(), mestimate_d3d12_filter_frame(), misc_vaapi_filter_frame(), neighbor_opencl_filter_frame(), nlmeans_opencl_filter_frame(), nlmeans_vulkan_filter_frame(), nppscale_filter_frame(), nppscale_filter_frame_ref(), oscilloscope_filter_frame(), output_frame(), output_frame(), output_frame(), output_frame(), output_frame(), output_single_frame(), overlay_cuda_blend(), overlay_opencl_blend(), overlay_vaapi_blend(), overlay_vulkan_blend(), pad_vaapi_filter_frame(), pixscope_filter_frame(), plot_freqs(), plot_spectrum_column(), procamp_vaapi_filter_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame_if_exists(), program_opencl_run(), push_frame(), push_frame(), push_frame(), push_last_frame(), push_samples(), remap_opencl_process_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), return_frame(), scale_d3d11_filter_frame(), scale_d3d12_filter_frame(), scale_vaapi_filter_frame(), scale_vt_filter_frame(), scale_vulkan_filter_frame(), send_silence(), shuffleplanes_filter_frame(), sierpinski_request_frame(), source_request_frame(), testsrc_vulkan_activate(), tonemap_opencl_filter_frame(), tonemap_vaapi_filter_frame(), transpose_opencl_filter_frame(), transpose_vaapi_filter_frame(), transpose_vt_filter_frame(), try_push_frame(), try_push_frame(), try_push_frame(), try_push_frame(), unsharp_opencl_filter_frame(), v360_vulkan_filter_frame(), varblur_frame(), video_frame(), write_frame(), xfade_activate(), xfade_frame(), xfade_frame(), xfade_frame(), and xfade_opencl_activate().

◆ ff_request_frame()

int ff_request_frame ( AVFilterLink * link)

Request an input frame from the filter at the other end of the link.

This function must not be used by filters using the activate callback, use ff_link_set_frame_wanted() instead.

The input filter may pass the request on to its inputs, fulfill the request from an internal buffer or any other means specific to its function.

When the end of a stream is reached AVERROR_EOF is returned and no further frames are returned after that.

When a filter is unable to output a frame for example due to its sources being unable to do so or because it depends on external means pushing data into it then AVERROR(EAGAIN) is returned. It is important that a AVERROR(EAGAIN) return is returned all the way to the caller (generally eventually a user application) as this step may (but does not have to be) necessary to provide the input with the next frame.

If a request is successful then some progress has been made towards providing a frame on the link (through ff_filter_frame()). A filter that needs several frames to produce one is allowed to return success if one more frame has been processed but no output has been produced yet. A filter is also allowed to simply forward a success return value.

Parameters
linkthe input link
Returns
zero on success AVERROR_EOF on end of file AVERROR(EAGAIN) if the previous filter cannot output a frame currently and can neither guarantee that EOF has been reached.

Definition at line 483 of file avfilter.c.

Referenced by avfilter_graph_request_oldest(), deint_d3d12_request_frame(), deint_vaapi_request_frame(), ff_yadif_request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame(), request_frame_ref(), request_frame_ref(), and request_frame_to_filter().

◆ ff_append_inpad()

int ff_append_inpad ( AVFilterContext * f,
AVFilterPad * p )

Append a new input/output pad to the filter's list of such pads.

The *_free_name versions will set the AVFILTERPAD_FLAG_FREE_NAME flag ensuring that the name will be freed generically (even on insertion error).

Definition at line 127 of file avfilter.c.

Referenced by decimate_init(), ff_append_inpad_free_name(), fieldmatch_init(), init(), init(), init(), init(), init(), init(), and init().

◆ ff_append_outpad()

int ff_append_outpad ( AVFilterContext * f,
AVFilterPad * p )

Definition at line 138 of file avfilter.c.

Referenced by ff_append_outpad_free_name(), init(), init(), init(), init(), and init().

◆ ff_append_inpad_free_name()

int ff_append_inpad_free_name ( AVFilterContext * f,
AVFilterPad * p )

◆ ff_append_outpad_free_name()

int ff_append_outpad_free_name ( AVFilterContext * f,
AVFilterPad * p )

Definition at line 143 of file avfilter.c.

Referenced by init(), init(), init(), init(), init(), movie_common_init(), parse_definition(), and split_init().

◆ ff_pixfmt_is_in()

int ff_pixfmt_is_in ( enum AVPixelFormat fmt,
const enum AVPixelFormat * fmts )

Tell if a pixel format is contained in the provided AV_PIX_FMT_NONE-terminated list.

Parameters
fmtprovided format
fmtsAV_PIX_FMT_NONE-terminated list of pixel formats
Returns
1 if present, 0 if absent

Definition at line 471 of file formats.c.

Referenced by config_input(), config_input_main(), config_input_overlay(), config_out_props(), config_props(), filter_frame(), and filter_frame().

◆ ff_filter_execute()

int ff_filter_execute ( AVFilterContext * ctx,
avfilter_action_func * func,
void * arg,
int * ret,
int nb_jobs )

Definition at line 1696 of file avfilter.c.

Referenced by activate(), activate(), activate(), activate(), activate(), activate(), activate(), analyze_frame(), apply_unsharp(), blend_frame(), blend_frame(), blend_frames(), blur_frame(), chromatic_adaptation(), compute_vif2(), config_output(), convert_frame(), do_blend(), do_convolve(), do_corr(), do_identity(), do_morpho(), do_psnr(), do_ssim(), draw_sierpinski(), filter(), filter(), filter(), filter(), filter(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_frame(), filter_grey_edge(), fir_frame(), gaussianiir2d(), geq_filter_frame(), get_deriv(), get_frame(), headphone_frame(), nlmeans_plane(), output_frame(), output_frame(), plot_spectrum_column(), prepare_impulse(), prepare_secondary(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), process_frame(), scroll(), spatial_activate(), and xfade_frame().