FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
vf_threshold.c File Reference

threshold video filter More...

#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "framesync.h"
#include "internal.h"
#include "video.h"
#include "threshold.h"

Go to the source code of this file.

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (threshold)
 
static int query_formats (AVFilterContext *ctx)
 
static int process_frame (FFFrameSync *fs)
 
static void threshold8 (const uint8_t *in, const uint8_t *threshold, const uint8_t *min, const uint8_t *max, uint8_t *out, ptrdiff_t ilinesize, ptrdiff_t tlinesize, ptrdiff_t flinesize, ptrdiff_t slinesize, ptrdiff_t olinesize, int w, int h)
 
static void threshold16 (const uint8_t *iin, const uint8_t *tthreshold, const uint8_t *ffirst, const uint8_t *ssecond, uint8_t *oout, ptrdiff_t ilinesize, ptrdiff_t tlinesize, ptrdiff_t flinesize, ptrdiff_t slinesize, ptrdiff_t olinesize, int w, int h)
 
static int config_input (AVFilterLink *inlink)
 
void ff_threshold_init (ThresholdContext *s)
 
static int config_output (AVFilterLink *outlink)
 
static int activate (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption threshold_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_vf_threshold
 

Detailed Description

threshold video filter

Definition in file vf_threshold.c.

Macro Definition Documentation

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

Definition at line 36 of file vf_threshold.c.

Definition at line 37 of file vf_threshold.c.

Function Documentation

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

Definition at line 46 of file vf_threshold.c.

static int process_frame ( FFFrameSync fs)
static

Definition at line 71 of file vf_threshold.c.

Referenced by config_output().

static void threshold8 ( const uint8_t in,
const uint8_t threshold,
const uint8_t min,
const uint8_t max,
uint8_t out,
ptrdiff_t  ilinesize,
ptrdiff_t  tlinesize,
ptrdiff_t  flinesize,
ptrdiff_t  slinesize,
ptrdiff_t  olinesize,
int  w,
int  h 
)
static

Definition at line 120 of file vf_threshold.c.

Referenced by ff_threshold_init().

static void threshold16 ( const uint8_t iin,
const uint8_t tthreshold,
const uint8_t ffirst,
const uint8_t ssecond,
uint8_t oout,
ptrdiff_t  ilinesize,
ptrdiff_t  tlinesize,
ptrdiff_t  flinesize,
ptrdiff_t  slinesize,
ptrdiff_t  olinesize,
int  w,
int  h 
)
static

Definition at line 143 of file vf_threshold.c.

Referenced by ff_threshold_init().

static int config_input ( AVFilterLink inlink)
static

Definition at line 171 of file vf_threshold.c.

void ff_threshold_init ( ThresholdContext s)

Definition at line 193 of file vf_threshold.c.

Referenced by check_threshold(), and config_input().

static int config_output ( AVFilterLink outlink)
static

Definition at line 207 of file vf_threshold.c.

static int activate ( AVFilterContext ctx)
static

Definition at line 274 of file vf_threshold.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 280 of file vf_threshold.c.

Variable Documentation

const AVOption threshold_options[]
static
Initial value:
= {
{ "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=15}, 0, 15, FLAGS},
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: vf_threshold.c:36
#define FLAGS
Definition: vf_threshold.c:37
static const struct @272 planes[]

Definition at line 39 of file vf_threshold.c.

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

Definition at line 287 of file vf_threshold.c.

const AVFilterPad outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_output(AVFilterLink *outlink)
Definition: vf_threshold.c:207

Definition at line 308 of file vf_threshold.c.

AVFilter ff_vf_threshold
Initial value:
= {
.name = "threshold",
.description = NULL_IF_CONFIG_SMALL("Threshold first video stream using other video streams."),
.priv_size = sizeof(ThresholdContext),
.priv_class = &threshold_class,
}
static int activate(AVFilterContext *ctx)
Definition: vf_threshold.c:274
static int query_formats(AVFilterContext *ctx)
Definition: vf_threshold.c:46
static int flags
Definition: log.c:55
#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[]
Definition: vf_threshold.c:287
static const AVFilterPad outputs[]
Definition: vf_threshold.c:308
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
Definition: avfilter.h:133
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_threshold.c:280

Definition at line 317 of file vf_threshold.c.