FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_bbox.c File Reference

bounding box detection filter More...

#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/timestamp.h"
#include "avfilter.h"
#include "bbox.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  BBoxContext
 

Macros

#define OFFSET(x)   offsetof(BBoxContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define SET_META(key, value)
 

Functions

 AVFILTER_DEFINE_CLASS (bbox)
 
static int query_formats (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *frame)
 

Variables

static const AVOption bbox_options []
 
static const AVFilterPad bbox_inputs []
 
static const AVFilterPad bbox_outputs []
 
AVFilter ff_vf_bbox
 

Detailed Description

bounding box detection filter

Definition in file vf_bbox.c.

Macro Definition Documentation

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

Definition at line 38 of file vf_bbox.c.

Definition at line 39 of file vf_bbox.c.

#define SET_META (   key,
  value 
)
Value:
snprintf(buf, sizeof(buf), "%d", value); \
av_dict_set(metadata, key, buf, 0);

Definition at line 63 of file vf_bbox.c.

Referenced by filter_frame().

Function Documentation

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

Definition at line 48 of file vf_bbox.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 67 of file vf_bbox.c.

Variable Documentation

const AVOption bbox_options[]
static
Initial value:
= {
{ "min_val", "set minimum luminance value for bounding box", OFFSET(min_val), AV_OPT_TYPE_INT, { .i64 = 16 }, 0, 254, FLAGS },
{ NULL }
}

Definition at line 41 of file vf_bbox.c.

const AVFilterPad bbox_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}

Definition at line 108 of file vf_bbox.c.

const AVFilterPad bbox_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}

Definition at line 117 of file vf_bbox.c.

AVFilter ff_vf_bbox
Initial value:
= {
.name = "bbox",
.description = NULL_IF_CONFIG_SMALL("Compute bounding box for each frame."),
.priv_size = sizeof(BBoxContext),
.priv_class = &bbox_class,
}

Definition at line 125 of file vf_bbox.c.