FFmpeg
Data Structures | Macros | Functions | Variables
vf_bbox.c File Reference
#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)   av_dict_set_int(metadata, key, value, 0);
 

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

◆ OFFSET

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

Definition at line 38 of file vf_bbox.c.

◆ FLAGS

Definition at line 39 of file vf_bbox.c.

◆ SET_META

#define SET_META (   key,
  value 
)    av_dict_set_int(metadata, key, value, 0);

Definition at line 65 of file vf_bbox.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( bbox  )

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 48 of file vf_bbox.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 68 of file vf_bbox.c.

Variable Documentation

◆ bbox_options

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.

◆ bbox_inputs

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

Definition at line 108 of file vf_bbox.c.

◆ bbox_outputs

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

Definition at line 117 of file vf_bbox.c.

◆ ff_vf_bbox

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.

filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition: vf_bbox.c:68
BBoxContext
Definition: vf_bbox.c:33
FLAGS
#define FLAGS
Definition: vf_bbox.c:39
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
OFFSET
#define OFFSET(x)
Definition: vf_bbox.c:38
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_bbox.c:48
NULL
#define NULL
Definition: coverity.c:32
inputs
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
Definition: filter_design.txt:243
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:188
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
#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
bbox_outputs
static const AVFilterPad bbox_outputs[]
Definition: vf_bbox.c:117
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565
bbox_inputs
static const AVFilterPad bbox_inputs[]
Definition: vf_bbox.c:108