FFmpeg
Data Structures | Macros | Functions | Variables
vf_neighbor.c File Reference
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.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  ThreadData
 Used for passing data between threads. More...
 
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 void erosion (uint8_t *dst, const uint8_t *p1, int width, int threshold, const uint8_t *coordinates[], int coord, int maxc)
 
static void erosion16 (uint8_t *dstp, const uint8_t *p1, int width, int threshold, const uint8_t *coordinates[], int coord, int maxc)
 
static void dilation (uint8_t *dst, const uint8_t *p1, int width, int threshold, const uint8_t *coordinates[], int coord, int maxc)
 
static void dilation16 (uint8_t *dstp, const uint8_t *p1, int width, int threshold, const uint8_t *coordinates[], int coord, int maxc)
 
static void deflate (uint8_t *dst, const uint8_t *p1, int width, int threshold, const uint8_t *coordinates[], int coord, int maxc)
 
static void deflate16 (uint8_t *dstp, const uint8_t *p1, int width, int threshold, const uint8_t *coordinates[], int coord, int maxc)
 
static void inflate (uint8_t *dst, const uint8_t *p1, int width, int threshold, const uint8_t *coordinates[], int coord, int maxc)
 
static void inflate16 (uint8_t *dstp, const uint8_t *p1, int width, int threshold, const uint8_t *coordinates[], int coord, int maxc)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_slice (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 

Variables

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

Macro Definition Documentation

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

Definition at line 352 of file vf_neighbor.c.

Definition at line 353 of file vf_neighbor.c.

#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, \
}
#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 const AVFilterPad neighbor_outputs[]
Definition: vf_neighbor.c:344
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static int query_formats(AVFilterContext *ctx)
Definition: vf_neighbor.c:52
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 flags(name, subs,...)
Definition: cbs_av1.c:561
static const AVFilterPad neighbor_inputs[]
Definition: vf_neighbor.c:334
#define AVFILTER_DEFINE_CLASS(fname)
Definition: internal.h:334

Definition at line 355 of file vf_neighbor.c.

Function Documentation

static int query_formats ( AVFilterContext ctx)
static

Definition at line 52 of file vf_neighbor.c.

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

Definition at line 78 of file vf_neighbor.c.

Referenced by config_input().

static void erosion16 ( uint8_t dstp,
const uint8_t p1,
int  width,
int  threshold,
const uint8_t coordinates[],
int  coord,
int  maxc 
)
static

Definition at line 99 of file vf_neighbor.c.

Referenced by config_input().

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

Definition at line 121 of file vf_neighbor.c.

Referenced by config_input().

static void dilation16 ( uint8_t dstp,
const uint8_t p1,
int  width,
int  threshold,
const uint8_t coordinates[],
int  coord,
int  maxc 
)
static

Definition at line 142 of file vf_neighbor.c.

Referenced by config_input().

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

Definition at line 180 of file vf_neighbor.c.

Referenced by config_input().

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

Definition at line 213 of file vf_neighbor.c.

Referenced by config_input().

static int config_input ( AVFilterLink inlink)
static

Definition at line 230 of file vf_neighbor.c.

static int filter_slice ( AVFilterContext ctx,
void arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 259 of file vf_neighbor.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 311 of file vf_neighbor.c.

Variable Documentation

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:311
static int config_input(AVFilterLink *inlink)
Definition: vf_neighbor.c:230

Definition at line 334 of file vf_neighbor.c.

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

Definition at line 344 of file vf_neighbor.c.