FFmpeg
Data Structures | Macros | Functions | Variables
vf_qp.c File Reference
#include <math.h>
#include "libavutil/eval.h"
#include "libavutil/imgutils.h"
#include "libavutil/pixdesc.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  QPContext
 

Macros

#define OFFSET(x)   offsetof(QPContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (qp)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 

Variables

static const AVOption qp_options []
 
static const AVFilterPad qp_inputs []
 
static const AVFilterPad qp_outputs []
 
AVFilter ff_vf_qp
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 39 of file vf_qp.c.

◆ FLAGS

Definition at line 40 of file vf_qp.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( qp  )

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 49 of file vf_qp.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 87 of file vf_qp.c.

Variable Documentation

◆ qp_options

const AVOption qp_options[]
static
Initial value:
= {
{ "qp", "set qp expression", OFFSET(qp_expr_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
{ NULL }
}

Definition at line 42 of file vf_qp.c.

◆ qp_inputs

const AVFilterPad qp_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
},
{ NULL }
}

Definition at line 157 of file vf_qp.c.

◆ qp_outputs

const AVFilterPad qp_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}

Definition at line 167 of file vf_qp.c.

◆ ff_vf_qp

AVFilter ff_vf_qp
Initial value:
= {
.name = "qp",
.description = NULL_IF_CONFIG_SMALL("Change video quantization parameters."),
.priv_size = sizeof(QPContext),
.priv_class = &qp_class,
}

Definition at line 175 of file vf_qp.c.

QPContext
Definition: vf_qp.c:31
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_qp.c:87
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
NULL
#define NULL
Definition: coverity.c:32
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_qp.c:49
inputs
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
Definition: filter_design.txt:243
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:188
FLAGS
#define FLAGS
Definition: vf_qp.c:40
qp_outputs
static const AVFilterPad qp_outputs[]
Definition: vf_qp.c:167
OFFSET
#define OFFSET(x)
Definition: vf_qp.c:39
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
qp_inputs
static const AVFilterPad qp_inputs[]
Definition: vf_qp.c:157
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:133
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:227