FFmpeg
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

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 activate (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
 FRAMESYNC_DEFINE_CLASS (hysteresis, HysteresisContext, fs)
 

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

static int query_formats ( AVFilterContext ctx)
static

Definition at line 61 of file vf_hysteresis.c.

static int process_frame ( FFFrameSync fs)
static

Definition at line 87 of file vf_hysteresis.c.

Referenced by config_output().

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

Definition at line 140 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 145 of file vf_hysteresis.c.

Referenced by hysteresis16(), and hysteresis8().

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

Definition at line 151 of file vf_hysteresis.c.

Referenced by hysteresis16(), and hysteresis8().

static int is_empty ( HysteresisContext s)
static

Definition at line 159 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 164 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 206 of file vf_hysteresis.c.

Referenced by config_input().

static int config_input ( AVFilterLink inlink)
static

Definition at line 255 of file vf_hysteresis.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 289 of file vf_hysteresis.c.

static int activate ( AVFilterContext ctx)
static

Definition at line 338 of file vf_hysteresis.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 344 of file vf_hysteresis.c.

FRAMESYNC_DEFINE_CLASS ( hysteresis  ,
HysteresisContext  ,
fs   
)

Referenced by uninit().

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
static const struct @317 planes[]

Definition at line 55 of file vf_hysteresis.c.

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

Definition at line 355 of file vf_hysteresis.c.

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

Definition at line 368 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."),
.preinit = hysteresis_framesync_preinit,
.priv_size = sizeof(HysteresisContext),
.priv_class = &hysteresis_class,
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int query_formats(AVFilterContext *ctx)
Definition: vf_hysteresis.c:61
static int activate(AVFilterContext *ctx)
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
#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)
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static const AVFilterPad hysteresis_outputs[]
static const AVFilterPad hysteresis_inputs[]

Definition at line 377 of file vf_hysteresis.c.