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

Go to the source code of this file.

Data Structures

struct  ThreadData
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (removegrain)
 
static int query_formats (AVFilterContext *ctx)
 
static int mode01 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int cmp_int (const void *p1, const void *p2)
 
static int mode02 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode03 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode04 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode05 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode06 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode07 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode08 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode09 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode10 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode1112 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode1314 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode1516 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode17 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode18 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode19 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode20 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode21 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode22 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode23 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int mode24 (int c, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_slice (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 

Variables

static const AVOption removegrain_options []
 
static const AVFilterPad removegrain_inputs []
 
static const AVFilterPad removegrain_outputs []
 
AVFilter ff_vf_removegrain
 

Macro Definition Documentation

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

Definition at line 34 of file vf_removegrain.c.

Definition at line 35 of file vf_removegrain.c.

#define REMOVE_GRAIN_SORT_AXIS
Value:
const int ma1 = FFMAX(a1, a8); \
const int mi1 = FFMIN(a1, a8); \
const int ma2 = FFMAX(a2, a7); \
const int mi2 = FFMIN(a2, a7); \
const int ma3 = FFMAX(a3, a6); \
const int mi3 = FFMIN(a3, a6); \
const int ma4 = FFMAX(a4, a5); \
const int mi4 = FFMIN(a4, a5);
#define a1
Definition: regdef.h:47
#define a3
Definition: regdef.h:49
#define FFMAX(a, b)
Definition: common.h:94
#define FFMIN(a, b)
Definition: common.h:96
#define a2
Definition: regdef.h:48
#define a5
Definition: regdef.h:51
#define a4
Definition: regdef.h:50

Definition at line 66 of file vf_removegrain.c.

Referenced by mode05(), mode06(), mode07(), mode08(), mode09(), mode17(), mode23(), and mode24().

Function Documentation

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

Definition at line 47 of file vf_removegrain.c.

static int mode01 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 76 of file vf_removegrain.c.

Referenced by config_input().

static int cmp_int ( const void p1,
const void p2 
)
static

Definition at line 84 of file vf_removegrain.c.

Referenced by mode02(), mode03(), and mode04().

static int mode02 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 91 of file vf_removegrain.c.

Referenced by config_input().

static int mode03 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 100 of file vf_removegrain.c.

Referenced by config_input().

static int mode04 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 109 of file vf_removegrain.c.

Referenced by config_input().

static int mode05 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 118 of file vf_removegrain.c.

Referenced by config_input().

static int mode06 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 141 of file vf_removegrain.c.

Referenced by config_input().

static int mode07 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 173 of file vf_removegrain.c.

Referenced by config_input().

static int mode08 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 205 of file vf_removegrain.c.

Referenced by config_input().

static int mode09 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 237 of file vf_removegrain.c.

Referenced by config_input().

static int mode10 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 259 of file vf_removegrain.c.

Referenced by config_input().

static int mode1112 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 284 of file vf_removegrain.c.

Referenced by config_input().

static int mode1314 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 292 of file vf_removegrain.c.

Referenced by config_input().

static int mode1516 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 310 of file vf_removegrain.c.

Referenced by config_input().

static int mode17 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 329 of file vf_removegrain.c.

Referenced by config_input().

static int mode18 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 339 of file vf_removegrain.c.

Referenced by config_input().

static int mode19 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 361 of file vf_removegrain.c.

Referenced by config_input().

static int mode20 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 369 of file vf_removegrain.c.

Referenced by config_input().

static int mode21 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 377 of file vf_removegrain.c.

Referenced by config_input().

static int mode22 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 395 of file vf_removegrain.c.

Referenced by config_input().

static int mode23 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 408 of file vf_removegrain.c.

Referenced by config_input().

static int mode24 ( int  c,
int  a1,
int  a2,
int  a3,
int  a4,
int  a5,
int  a6,
int  a7,
int  a8 
)
static

Definition at line 432 of file vf_removegrain.c.

Referenced by config_input().

static int config_input ( AVFilterLink inlink)
static

Definition at line 466 of file vf_removegrain.c.

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

Definition at line 523 of file vf_removegrain.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 591 of file vf_removegrain.c.

Variable Documentation

const AVOption removegrain_options[]
static
Initial value:
= {
{ "m0", "set mode for 1st plane", OFFSET(mode[0]), AV_OPT_TYPE_INT, {.i64=0}, 0, 24, FLAGS },
{ "m1", "set mode for 2nd plane", OFFSET(mode[1]), AV_OPT_TYPE_INT, {.i64=0}, 0, 24, FLAGS },
{ "m2", "set mode for 3rd plane", OFFSET(mode[2]), AV_OPT_TYPE_INT, {.i64=0}, 0, 24, FLAGS },
{ "m3", "set mode for 4th plane", OFFSET(mode[3]), AV_OPT_TYPE_INT, {.i64=0}, 0, 24, FLAGS },
{NULL}
}
#define NULL
Definition: coverity.c:32
#define FLAGS
mode
Definition: f_perms.c:27
#define OFFSET(x)

Definition at line 37 of file vf_removegrain.c.

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

Definition at line 633 of file vf_removegrain.c.

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

Definition at line 643 of file vf_removegrain.c.

AVFilter ff_vf_removegrain
Initial value:
= {
.name = "removegrain",
.description = NULL_IF_CONFIG_SMALL("Remove grain."),
.priv_size = sizeof(RemoveGrainContext),
.priv_class = &removegrain_class,
}
#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 query_formats(AVFilterContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
#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 removegrain_inputs[]
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
static const AVFilterPad removegrain_outputs[]
static int flags
Definition: cpu.c:47

Definition at line 651 of file vf_removegrain.c.