FFmpeg
Loading...
Searching...
No Matches
vf_qp.c File Reference
#include <math.h>
#include "libavutil/eval.h"
#include "libavutil/opt.h"
#include "libavutil/video_enc_params.h"
#include "avfilter.h"
#include "filters.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  QPContext
 

Macros

#define OFFSET(x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define BLOCK_QP_DELTA(block_idx)
 

Functions

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

Variables

static const char *const var_names [] = { "known", "qp", "x", "y", "w", "h", NULL }
 
static const AVOption qp_options []
 
static const AVFilterPad qp_inputs []
 
const FFFilter ff_vf_qp
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 40 of file vf_qp.c.

◆ FLAGS

Definition at line 41 of file vf_qp.c.

◆ BLOCK_QP_DELTA

#define BLOCK_QP_DELTA ( block_idx)
Value:
(par_in ? av_video_enc_params_block(par_in, block_idx)->delta_qp : 0)
int32_t delta_qp
Difference between this block's final quantization parameter and the corresponding per-frame value.
static av_always_inline AVVideoBlockParams * av_video_enc_params_block(AVVideoEncParams *par, unsigned int idx)
Get the block at the specified idx.

Referenced by filter_frame().

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( qp )

◆ config_input()

static int config_input ( AVFilterLink * inlink)
static

Definition at line 50 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

◆ var_names

const char* const var_names[] = { "known", "qp", "x", "y", "w", "h", NULL }
static

Definition at line 38 of file vf_qp.c.

◆ 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 }
}
#define FLAGS
Definition cmdutils.c:598
#define NULL
Definition coverity.c:32
#define OFFSET(x)
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
Definition opt.h:275

Definition at line 43 of file vf_qp.c.

◆ qp_inputs

const AVFilterPad qp_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
},
}
static int config_input(AVFilterLink *inlink)
static int filter_frame(DBEDecodeContext *s, AVFrame *frame)
Definition dolby_e.c:1067
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200

Definition at line 175 of file vf_qp.c.

◆ ff_vf_qp

const FFFilter ff_vf_qp
Initial value:
= {
.p.name = "qp",
.p.description = NULL_IF_CONFIG_SMALL("Change video quantization parameters."),
.p.priv_class = &qp_class,
.priv_size = sizeof(QPContext),
}
#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:204
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
Definition avfilter.h:182
#define FILTER_INPUTS(array)
Definition filters.h:264
#define FILTER_OUTPUTS(array)
Definition filters.h:265
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
static const AVFilterPad qp_inputs[]
Definition vf_qp.c:175
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
Definition video.c:37

Definition at line 184 of file vf_qp.c.