FFmpeg
Data Structures | Macros | Functions | Variables
vf_entropy.c File Reference
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "drawutils.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  EntropyContext
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (entropy)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption entropy_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_vf_entropy
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 45 of file vf_entropy.c.

◆ FLAGS

Definition at line 46 of file vf_entropy.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( entropy  )

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 56 of file vf_entropy.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 82 of file vf_entropy.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 110 of file vf_entropy.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 171 of file vf_entropy.c.

Variable Documentation

◆ entropy_options

const AVOption entropy_options[]
static
Initial value:
= {
{ "mode", "set kind of histogram entropy measurement", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, FLAGS, "mode" },
{ "normal", NULL, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, "mode" },
{ "diff", NULL, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, "mode" },
{ NULL }
}

Definition at line 47 of file vf_entropy.c.

◆ inputs

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

Definition at line 178 of file vf_entropy.c.

◆ outputs

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

Definition at line 188 of file vf_entropy.c.

◆ ff_vf_entropy

AVFilter ff_vf_entropy
Initial value:
= {
.name = "entropy",
.description = NULL_IF_CONFIG_SMALL("Measure video frames entropy."),
.priv_size = sizeof(EntropyContext),
.priv_class = &entropy_class,
}

Definition at line 196 of file vf_entropy.c.

inputs
static const AVFilterPad inputs[]
Definition: vf_entropy.c:178
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_entropy.c:82
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_entropy.c:56
outputs
static const AVFilterPad outputs[]
Definition: vf_entropy.c:188
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_entropy.c:110
OFFSET
#define OFFSET(x)
Definition: vf_entropy.c:45
NULL
#define NULL
Definition: coverity.c:32
FLAGS
#define FLAGS
Definition: vf_entropy.c:46
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_entropy.c:171
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
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:125
EntropyContext
Definition: vf_entropy.c:30
mode
mode
Definition: ebur128.h:83
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:232