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

Go to the source code of this file.

Data Structures

struct  BPNContext
 

Macros

#define OFFSET(x)   offsetof(BPNContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define CHECK_BIT(x, a, b, c)
 

Functions

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

Variables

static const AVOption bitplanenoise_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_vf_bitplanenoise
 

Macro Definition Documentation

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

Definition at line 40 of file vf_bitplanenoise.c.

Definition at line 41 of file vf_bitplanenoise.c.

#define CHECK_BIT (   x,
  a,
  b,
  c 
)
Value:
{ \
bit = (((val[(x)] & mask) == (val[(x) + (a)] & mask)) + \
((val[(x)] & mask) == (val[(x) + (b)] & mask)) + \
((val[(x)] & mask) == (val[(x) + (c)] & mask))) > 1; \
if (dst) \
dst[(x)] = factor * bit; \
stats[plane] += bit; }
int plane
Definition: avisynth_c.h:422
const char const char void * val
Definition: avisynth_c.h:771
const char * b
Definition: vf_curves.c:116
static const uint16_t mask[17]
Definition: lzw.c:38
static void stats(AVPacket *const *in, int n_in, unsigned *_max, unsigned *_sum)
static const int factor[16]
Definition: vf_pp7.c:75
if(ret< 0)
Definition: vf_mcdeint.c:279
static double c[64]

Definition at line 94 of file vf_bitplanenoise.c.

Referenced by filter_frame().

Function Documentation

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

Definition at line 50 of file vf_bitplanenoise.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 76 of file vf_bitplanenoise.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 102 of file vf_bitplanenoise.c.

Variable Documentation

const AVOption bitplanenoise_options[]
static
Initial value:
= {
{ "bitplane", "set bit plane to use for measuring noise", OFFSET(bitplane), AV_OPT_TYPE_INT, {.i64=1}, 1, 16, FLAGS},
{ "filter", "show noisy pixels", OFFSET(filter), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static void filter(int16_t *output, ptrdiff_t out_stride, int16_t *low, ptrdiff_t low_stride, int16_t *high, ptrdiff_t high_stride, int len, int clip)
Definition: cfhd.c:153
#define FLAGS
#define OFFSET(x)

Definition at line 42 of file vf_bitplanenoise.c.

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

Definition at line 199 of file vf_bitplanenoise.c.

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

Definition at line 209 of file vf_bitplanenoise.c.

AVFilter ff_vf_bitplanenoise
Initial value:
= {
.name = "bitplanenoise",
.description = NULL_IF_CONFIG_SMALL("Measure bit plane noise."),
.priv_size = sizeof(BPNContext),
.priv_class = &bitplanenoise_class,
}
static const AVFilterPad outputs[]
#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
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVFilterPad inputs[]
static int query_formats(AVFilterContext *ctx)
#define flags(name, subs,...)
Definition: cbs_av1.c:596

Definition at line 217 of file vf_bitplanenoise.c.