vf_cropdetect.c File Reference

border detection filter Ported from MPlayer libmpcodecs/vf_cropdetect.c. More...

#include "libavutil/imgutils.h"
#include "avfilter.h"

Go to the source code of this file.

Data Structures

struct  CropDetectContext
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static int checkline (void *ctx, const unsigned char *src, int stride, int len, int bpp)
 
static av_cold int init (AVFilterContext *ctx, const char *args, void *opaque)
 
static int config_input (AVFilterLink *inlink)
 
static void end_frame (AVFilterLink *inlink)
 

Variables

AVFilter avfilter_vf_cropdetect
 

Detailed Description

border detection filter Ported from MPlayer libmpcodecs/vf_cropdetect.c.

Definition in file vf_cropdetect.c.

Function Documentation

static int checkline ( void ctx,
const unsigned char *  src,
int  stride,
int  len,
int  bpp 
)
static

Definition at line 53 of file vf_cropdetect.c.

Referenced by end_frame().

static int config_input ( AVFilterLink inlink)
static

Definition at line 98 of file vf_cropdetect.c.

static void end_frame ( AVFilterLink inlink)
static

Definition at line 114 of file vf_cropdetect.c.

static av_cold int init ( AVFilterContext ctx,
const char *  args,
void opaque 
)
static

Definition at line 80 of file vf_cropdetect.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 38 of file vf_cropdetect.c.

Variable Documentation

AVFilter avfilter_vf_cropdetect
Initial value:
= {
.name = "cropdetect",
.description = NULL_IF_CONFIG_SMALL("Auto-detect crop size."),
.priv_size = sizeof(CropDetectContext),
.init = init,
.inputs = (AVFilterPad[]) {{ .name = "default",
.config_props = config_input,
.get_video_buffer = avfilter_null_get_video_buffer,
.start_frame = avfilter_null_start_frame,
.end_frame = end_frame, },
{ .name = NULL}},
.outputs = (AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO },
{ .name = NULL}},
}
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
Definition: vf_cropdetect.c:80
A filter pad used for either input or output.
Definition: avfilter.h:312
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:191
static int query_formats(AVFilterContext *ctx)
Definition: vf_cropdetect.c:38
NULL
Definition: eval.c:50
void avfilter_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref)
start_frame() handler for filters which simply pass video along
Definition: defaults.c:268
AVFilterBufferRef * avfilter_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
get_video_buffer() handler for filters which simply pass video along
Definition: defaults.c:288
static void end_frame(AVFilterLink *inlink)
static int config_input(AVFilterLink *inlink)
Definition: vf_cropdetect.c:98

Definition at line 194 of file vf_cropdetect.c.