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

Go to the source code of this file.

Data Structures

struct  ChromaNRContext
 

Macros

#define FILTER_FUNC(name, type)
 
#define OFFSET(x)   offsetof(ChromaNRContext, x)
 
#define VF   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int config_input (AVFilterLink *inlink)
 
 AVFILTER_DEFINE_CLASS (chromanr)
 

Variables

static const AVOption chromanr_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
const AVFilter ff_vf_chromanr
 

Macro Definition Documentation

◆ FILTER_FUNC

#define FILTER_FUNC (   name,
  type 
)

Definition at line 82 of file vf_chromanr.c.

◆ OFFSET

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

Definition at line 230 of file vf_chromanr.c.

◆ VF

Definition at line 231 of file vf_chromanr.c.

Function Documentation

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 58 of file vf_chromanr.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 178 of file vf_chromanr.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 207 of file vf_chromanr.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( chromanr  )

Variable Documentation

◆ chromanr_options

const AVOption chromanr_options[]
static
Initial value:
= {
{ "thres", "set y+u+v threshold", OFFSET(threshold), AV_OPT_TYPE_FLOAT, {.dbl=30}, 1, 200, VF },
{ "sizew", "set horizontal size", OFFSET(sizew), AV_OPT_TYPE_INT, {.i64=5}, 1, 100, VF },
{ "sizeh", "set vertical size", OFFSET(sizeh), AV_OPT_TYPE_INT, {.i64=5}, 1, 100, VF },
{ "stepw", "set horizontal step", OFFSET(stepw), AV_OPT_TYPE_INT, {.i64=1}, 1, 50, VF },
{ "steph", "set vertical step", OFFSET(steph), AV_OPT_TYPE_INT, {.i64=1}, 1, 50, VF },
{ "threy", "set y threshold", OFFSET(threshold_y), AV_OPT_TYPE_FLOAT, {.dbl=200},1, 200, VF },
{ "threu", "set u threshold", OFFSET(threshold_u), AV_OPT_TYPE_FLOAT, {.dbl=200},1, 200, VF },
{ "threv", "set v threshold", OFFSET(threshold_v), AV_OPT_TYPE_FLOAT, {.dbl=200},1, 200, VF },
{ NULL }
}

Definition at line 233 of file vf_chromanr.c.

◆ inputs

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

Definition at line 245 of file vf_chromanr.c.

◆ outputs

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

Definition at line 255 of file vf_chromanr.c.

◆ ff_vf_chromanr

const AVFilter ff_vf_chromanr
Initial value:
= {
.name = "chromanr",
.description = NULL_IF_CONFIG_SMALL("Reduce chrominance noise."),
.priv_size = sizeof(ChromaNRContext),
.priv_class = &chromanr_class,
}

Definition at line 265 of file vf_chromanr.c.

filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_chromanr.c:178
VF
#define VF
Definition: vf_chromanr.c:231
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_chromanr.c:207
outputs
static const AVFilterPad outputs[]
Definition: vf_chromanr.c:255
NULL
#define NULL
Definition: coverity.c:32
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:117
inputs
static const AVFilterPad inputs[]
Definition: vf_chromanr.c:245
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_acrusher.c:336
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:842
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:126
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:228
ChromaNRContext
Definition: vf_chromanr.c:31
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_chromanr.c:58
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
OFFSET
#define OFFSET(x)
Definition: vf_chromanr.c:230
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561