FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_deband.c File Reference
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  DebandContext
 
struct  ThreadData
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (deband)
 
static int query_formats (AVFilterContext *ctx)
 
static float frand (int x, int y)
 
static int get_avg (int ref0, int ref1, int ref2, int ref3)
 
static int deband_8_c (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int deband_8_coupling_c (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int deband_16_coupling_c (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int deband_16_c (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
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 deband_options []
 
static const AVFilterPad avfilter_vf_deband_inputs []
 
static const AVFilterPad avfilter_vf_deband_outputs []
 
AVFilter ff_vf_deband
 

Macro Definition Documentation

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

Definition at line 51 of file vf_deband.c.

Definition at line 52 of file vf_deband.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( deband  )
static int query_formats ( AVFilterContext ctx)
static

Definition at line 72 of file vf_deband.c.

static float frand ( int  x,
int  y 
)
static

Definition at line 117 of file vf_deband.c.

Referenced by config_input().

static int get_avg ( int  ref0,
int  ref1,
int  ref2,
int  ref3 
)
inlinestatic

Definition at line 124 of file vf_deband.c.

Referenced by deband_16_c(), deband_16_coupling_c(), deband_8_c(), and deband_8_coupling_c().

static int deband_8_c ( AVFilterContext ctx,
void arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 133 of file vf_deband.c.

Referenced by config_input().

static int deband_8_coupling_c ( AVFilterContext ctx,
void arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 182 of file vf_deband.c.

Referenced by config_input().

static int deband_16_coupling_c ( AVFilterContext ctx,
void arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 247 of file vf_deband.c.

Referenced by config_input().

static int deband_16_c ( AVFilterContext ctx,
void arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 314 of file vf_deband.c.

Referenced by config_input().

static int config_input ( AVFilterLink inlink)
static

Definition at line 363 of file vf_deband.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 410 of file vf_deband.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 434 of file vf_deband.c.

Variable Documentation

const AVOption deband_options[]
static
Initial value:
= {
{ "1thr", "set 1st plane threshold", OFFSET(threshold[0]), AV_OPT_TYPE_FLOAT, {.dbl=0.02}, 0.00003, 0.5, FLAGS },
{ "2thr", "set 2nd plane threshold", OFFSET(threshold[1]), AV_OPT_TYPE_FLOAT, {.dbl=0.02}, 0.00003, 0.5, FLAGS },
{ "3thr", "set 3rd plane threshold", OFFSET(threshold[2]), AV_OPT_TYPE_FLOAT, {.dbl=0.02}, 0.00003, 0.5, FLAGS },
{ "4thr", "set 4th plane threshold", OFFSET(threshold[3]), AV_OPT_TYPE_FLOAT, {.dbl=0.02}, 0.00003, 0.5, FLAGS },
{ "range", "set range", OFFSET(range), AV_OPT_TYPE_INT, {.i64=16}, INT_MIN, INT_MAX, FLAGS },
{ "r", "set range", OFFSET(range), AV_OPT_TYPE_INT, {.i64=16}, INT_MIN, INT_MAX, FLAGS },
{ "direction", "set direction", OFFSET(direction), AV_OPT_TYPE_FLOAT, {.dbl=2*M_PI},-2*M_PI, 2*M_PI, FLAGS },
{ "d", "set direction", OFFSET(direction), AV_OPT_TYPE_FLOAT, {.dbl=2*M_PI},-2*M_PI, 2*M_PI, FLAGS },
{ "blur", "set blur", OFFSET(blur), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, FLAGS },
{ "b", "set blur", OFFSET(blur), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, FLAGS },
{ "coupling", "set plane coupling", OFFSET(coupling), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS },
{ "c", "set plane coupling", OFFSET(coupling), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
static void blur(uint8_t *dst, int dst_step, const uint8_t *src, int src_step, int len, int radius, int pixsize)
Definition: vf_boxblur.c:255
#define OFFSET(x)
Definition: vf_deband.c:51
#define FLAGS
Definition: vf_deband.c:52
#define M_PI
Definition: mathematics.h:52

Definition at line 54 of file vf_deband.c.

const AVFilterPad avfilter_vf_deband_inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_input,
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_deband.c:410
static int config_input(AVFilterLink *inlink)
Definition: vf_deband.c:363

Definition at line 442 of file vf_deband.c.

const AVFilterPad avfilter_vf_deband_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 452 of file vf_deband.c.

AVFilter ff_vf_deband
Initial value:
= {
.name = "deband",
.description = NULL_IF_CONFIG_SMALL("Debands video."),
.priv_size = sizeof(DebandContext),
.priv_class = &deband_class,
}
static const AVFilterPad avfilter_vf_deband_outputs[]
Definition: vf_deband.c:452
static int query_formats(AVFilterContext *ctx)
Definition: vf_deband.c:72
#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
static int flags
Definition: log.c:57
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_deband.c:434
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
static const AVFilterPad avfilter_vf_deband_inputs[]
Definition: vf_deband.c:442

Definition at line 460 of file vf_deband.c.