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

Go to the source code of this file.

Data Structures

struct  HysteresisContext
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (hysteresis)
 
static int query_formats (AVFilterContext *ctx)
 
static int process_frame (FFFrameSync *fs)
 
static int passed (HysteresisContext *s, int x, int y, int w)
 
static void push (HysteresisContext *s, int x, int y, int w)
 
static void pop (HysteresisContext *s, int *x, int *y)
 
static int is_empty (HysteresisContext *s)
 
static void hysteresis8 (HysteresisContext *s, const uint8_t *bsrc, const uint8_t *asrc, uint8_t *dst, ptrdiff_t blinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h)
 
static void hysteresis16 (HysteresisContext *s, const uint8_t *bbsrc, const uint8_t *aasrc, uint8_t *ddst, ptrdiff_t blinesize, ptrdiff_t alinesize, ptrdiff_t dlinesize, int w, int h)
 
static int config_input (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *buf)
 
static int request_frame (AVFilterLink *outlink)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption hysteresis_options []
 
static const AVFilterPad hysteresis_inputs []
 
static const AVFilterPad hysteresis_outputs []
 
AVFilter ff_vf_hysteresis
 

Macro Definition Documentation

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

Definition at line 31 of file vf_hysteresis.c.

Definition at line 32 of file vf_hysteresis.c.

Function Documentation

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

Definition at line 63 of file vf_hysteresis.c.

static int process_frame ( FFFrameSync fs)
static

Definition at line 89 of file vf_hysteresis.c.

Referenced by config_output().

static int passed ( HysteresisContext s,
int  x,
int  y,
int  w 
)
static

Definition at line 142 of file vf_hysteresis.c.

Referenced by hysteresis16(), and hysteresis8().

static void push ( HysteresisContext s,
int  x,
int  y,
int  w 
)
static

Definition at line 147 of file vf_hysteresis.c.

Referenced by hysteresis16(), and hysteresis8().

static void pop ( HysteresisContext s,
int x,
int y 
)
static

Definition at line 153 of file vf_hysteresis.c.

Referenced by hysteresis16(), and hysteresis8().

static int is_empty ( HysteresisContext s)
static

Definition at line 161 of file vf_hysteresis.c.

Referenced by hysteresis16(), and hysteresis8().

static void hysteresis8 ( HysteresisContext s,
const uint8_t bsrc,
const uint8_t asrc,
uint8_t dst,
ptrdiff_t  blinesize,
ptrdiff_t  alinesize,
ptrdiff_t  dlinesize,
int  w,
int  h 
)
static

Definition at line 166 of file vf_hysteresis.c.

Referenced by config_input().

static void hysteresis16 ( HysteresisContext s,
const uint8_t bbsrc,
const uint8_t aasrc,
uint8_t ddst,
ptrdiff_t  blinesize,
ptrdiff_t  alinesize,
ptrdiff_t  dlinesize,
int  w,
int  h 
)
static

Definition at line 208 of file vf_hysteresis.c.

Referenced by config_input().

static int config_input ( AVFilterLink inlink)
static

Definition at line 257 of file vf_hysteresis.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 291 of file vf_hysteresis.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame buf 
)
static

Definition at line 345 of file vf_hysteresis.c.

static int request_frame ( AVFilterLink outlink)
static

Definition at line 351 of file vf_hysteresis.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 357 of file vf_hysteresis.c.

Variable Documentation

const AVOption hysteresis_options[]
static
Initial value:
= {
{ "planes", "set planes", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=0xF}, 0, 0xF, FLAGS },
{ "threshold", "set threshold", OFFSET(threshold), AV_OPT_TYPE_INT, {.i64=0}, 0, UINT16_MAX, FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: vf_hysteresis.c:31
#define FLAGS
Definition: vf_hysteresis.c:32

Definition at line 55 of file vf_hysteresis.c.

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

Definition at line 366 of file vf_hysteresis.c.

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

Definition at line 381 of file vf_hysteresis.c.

AVFilter ff_vf_hysteresis
Initial value:
= {
.name = "hysteresis",
.description = NULL_IF_CONFIG_SMALL("Grow first stream into second stream by connecting components."),
.priv_size = sizeof(HysteresisContext),
.priv_class = &hysteresis_class,
}
static int flags
Definition: log.c:57
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static int query_formats(AVFilterContext *ctx)
Definition: vf_hysteresis.c:63
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
#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)
static const AVFilterPad hysteresis_outputs[]
static const AVFilterPad hysteresis_inputs[]

Definition at line 391 of file vf_hysteresis.c.