FFmpeg  4.0
Data Structures | Macros | Functions | Variables
vf_neighbor.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"

Go to the source code of this file.

Data Structures

struct  NContext
 

Macros

#define OFFSET(x)   offsetof(NContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define DEFINE_NEIGHBOR_FILTER(name_, description_)
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static void line_copy8 (uint8_t *line, const uint8_t *srcp, int width, int mergin)
 
static void erosion (uint8_t *dst, const uint8_t *p1, int width, int threshold, const uint8_t *coordinates[], int coord)
 
static void dilation (uint8_t *dst, const uint8_t *p1, int width, int threshold, const uint8_t *coordinates[], int coord)
 
static void deflate (uint8_t *dst, const uint8_t *p1, int width, int threshold, const uint8_t *coordinates[], int coord)
 
static void inflate (uint8_t *dst, const uint8_t *p1, int width, int threshold, const uint8_t *coordinates[], int coord)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 

Variables

static const AVFilterPad neighbor_inputs []
 
static const AVFilterPad neighbor_outputs []
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 249 of file vf_neighbor.c.

◆ FLAGS

Definition at line 250 of file vf_neighbor.c.

◆ DEFINE_NEIGHBOR_FILTER

#define DEFINE_NEIGHBOR_FILTER (   name_,
  description_ 
)
Value:
\
AVFilter ff_vf_##name_ = { \
.name = #name_, \
.description = NULL_IF_CONFIG_SMALL(description_), \
.priv_size = sizeof(NContext), \
.priv_class = &name_##_class, \
.uninit = uninit, \
}
#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 flags
Definition: log.c:55
static const AVFilterPad neighbor_outputs[]
Definition: vf_neighbor.c:241
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_neighbor.c:55
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static int query_formats(AVFilterContext *ctx)
Definition: vf_neighbor.c:43
static const AVFilterPad neighbor_inputs[]
Definition: vf_neighbor.c:231
#define AVFILTER_DEFINE_CLASS(fname)
Definition: internal.h:334

Definition at line 252 of file vf_neighbor.c.

Function Documentation

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 43 of file vf_neighbor.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 55 of file vf_neighbor.c.

◆ line_copy8()

static void line_copy8 ( uint8_t line,
const uint8_t srcp,
int  width,
int  mergin 
)
inlinestatic

Definition at line 62 of file vf_neighbor.c.

Referenced by filter_frame().

◆ erosion()

static void erosion ( uint8_t dst,
const uint8_t p1,
int  width,
int  threshold,
const uint8_t coordinates[],
int  coord 
)
static

Definition at line 74 of file vf_neighbor.c.

Referenced by config_input().

◆ dilation()

static void dilation ( uint8_t dst,
const uint8_t p1,
int  width,
int  threshold,
const uint8_t coordinates[],
int  coord 
)
static

Definition at line 94 of file vf_neighbor.c.

Referenced by config_input().

◆ deflate()

static void deflate ( uint8_t dst,
const uint8_t p1,
int  width,
int  threshold,
const uint8_t coordinates[],
int  coord 
)
static

◆ inflate()

static void inflate ( uint8_t dst,
const uint8_t p1,
int  width,
int  threshold,
const uint8_t coordinates[],
int  coord 
)
static

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 144 of file vf_neighbor.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 174 of file vf_neighbor.c.

Variable Documentation

◆ neighbor_inputs

const AVFilterPad neighbor_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)
Definition: vf_neighbor.c:174
static int config_input(AVFilterLink *inlink)
Definition: vf_neighbor.c:144

Definition at line 231 of file vf_neighbor.c.

◆ neighbor_outputs

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

Definition at line 241 of file vf_neighbor.c.