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 "internal.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 (AVFilterContext *ctx)
 
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 307 of file vf_feedback.c.

◆ FLAGS

Definition at line 308 of file vf_feedback.c.

◆ TFLAGS

Definition at line 309 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 ( AVFilterContext ctx)
static

Definition at line 109 of file vf_feedback.c.

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 116 of file vf_feedback.c.

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 252 of file vf_feedback.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 263 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 281 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 294 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 311 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 321 of file vf_feedback.c.

config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_feedback.c:75
w
uint8_t w
Definition: llviddspenc.c:38
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:167
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_feedback.c:109
activate
static int activate(AVFilterContext *ctx)
Definition: vf_feedback.c:116
TFLAGS
#define TFLAGS
Definition: vf_feedback.c:309
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:190
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:115
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:873
FeedbackContext
Definition: vf_feedback.c:33
OFFSET
#define OFFSET(x)
Definition: vf_feedback.c:307
inputs
static const AVFilterPad inputs[]
Definition: vf_feedback.c:281
FLAGS
#define FLAGS
Definition: vf_feedback.c:308
init
static av_cold int init(AVFilterContext *ctx)
Definition: vf_feedback.c:252
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:191
h
h
Definition: vp9dsp_template.c:2038
outputs
static const AVFilterPad outputs[]
Definition: vf_feedback.c:294
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_feedback.c:263