FFmpeg
Data Structures | Macros | Functions | Variables
vf_feedback.c File Reference
#include "libavutil/fifo.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/internal.h"
#include "avfilter.h"
#include "filters.h"
#include "formats.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  FeedbackContext
 

Macros

#define OFFSET(x)   offsetof(FeedbackContext, x)
 
#define FLAGS   (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM)
 
#define TFLAGS   (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_RUNTIME_PARAM)
 

Functions

static void adjust_pos (AVFilterContext *ctx, FeedbackContext *s)
 
static void adjust_parameters (AVFilterContext *ctx, FeedbackContext *s)
 
static int config_input (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 
static int query_formats (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
 
static int activate (AVFilterContext *ctx)
 
static av_cold int init (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (feedback)
 

Variables

static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
static const AVOption feedback_options []
 
const AVFilter ff_vf_feedback
 

Detailed Description

feedback video filter

Definition in file vf_feedback.c.

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(FeedbackContext, x)

Definition at line 314 of file vf_feedback.c.

◆ FLAGS

Definition at line 315 of file vf_feedback.c.

◆ TFLAGS

Definition at line 316 of file vf_feedback.c.

Function Documentation

◆ adjust_pos()

static void adjust_pos ( AVFilterContext ctx,
FeedbackContext s 
)
static

Definition at line 47 of file vf_feedback.c.

Referenced by activate(), and adjust_parameters().

◆ adjust_parameters()

static void adjust_parameters ( AVFilterContext ctx,
FeedbackContext s 
)
static

Definition at line 55 of file vf_feedback.c.

Referenced by config_input(), and config_output().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 75 of file vf_feedback.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 94 of file vf_feedback.c.

◆ query_formats()

static int query_formats ( const AVFilterContext ctx,
AVFilterFormatsConfig **  cfg_in,
AVFilterFormatsConfig **  cfg_out 
)
static

Definition at line 109 of file vf_feedback.c.

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 119 of file vf_feedback.c.

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 259 of file vf_feedback.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 270 of file vf_feedback.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( feedback  )

Variable Documentation

◆ inputs

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_input,
},
{
.name = "feedin",
.config_props = config_input,
},
}

Definition at line 288 of file vf_feedback.c.

◆ outputs

const AVFilterPad outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
{
.name = "feedout",
.config_props = config_output,
},
}

Definition at line 301 of file vf_feedback.c.

◆ feedback_options

const AVOption feedback_options[]
static
Initial value:
= {
{ "x", "set top left crop position", OFFSET(x), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, TFLAGS },
{ "y", "set top left crop position", OFFSET(y), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, TFLAGS },
{ "w", "set crop size", OFFSET(w), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS },
{ "h", "set crop size", OFFSET(h), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS },
{ NULL }
}

Definition at line 318 of file vf_feedback.c.

◆ ff_vf_feedback

const AVFilter ff_vf_feedback
Initial value:
= {
.name = "feedback",
.description = NULL_IF_CONFIG_SMALL("Apply feedback video filter."),
.priv_class = &feedback_class,
.priv_size = sizeof(FeedbackContext),
.init = init,
.process_command = ff_filter_process_command,
}

Definition at line 328 of file vf_feedback.c.

config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_feedback.c:75
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
w
uint8_t w
Definition: llviddspenc.c:38
activate
static int activate(AVFilterContext *ctx)
Definition: vf_feedback.c:119
TFLAGS
#define TFLAGS
Definition: vf_feedback.c:316
query_formats
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition: vf_feedback.c:109
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
NULL
#define NULL
Definition: coverity.c:32
config_output
static int config_output(AVFilterLink *outlink)
Definition: vf_feedback.c:94
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:94
ff_filter_process_command
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.
Definition: avfilter.c:901
FeedbackContext
Definition: vf_feedback.c:33
OFFSET
#define OFFSET(x)
Definition: vf_feedback.c:314
inputs
static const AVFilterPad inputs[]
Definition: vf_feedback.c:288
FILTER_QUERY_FUNC2
#define FILTER_QUERY_FUNC2(func)
Definition: filters.h:239
FLAGS
#define FLAGS
Definition: vf_feedback.c:315
init
static av_cold int init(AVFilterContext *ctx)
Definition: vf_feedback.c:259
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
Definition: avfilter.h:190
h
h
Definition: vp9dsp_template.c:2070
outputs
static const AVFilterPad outputs[]
Definition: vf_feedback.c:301
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_feedback.c:270