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|AV_OPT_FLAG_RUNTIME_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)
 
static int config_output (AVFilterLink *outlink)
 

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 39 of file vf_bbox.c.

◆ FLAGS

Definition at line 40 of file vf_bbox.c.

◆ SET_META

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

Definition at line 81 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 49 of file vf_bbox.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 84 of file vf_bbox.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 124 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, UINT16_MAX, FLAGS },
{ NULL }
}

Definition at line 42 of file vf_bbox.c.

◆ bbox_inputs

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

Definition at line 138 of file vf_bbox.c.

◆ bbox_outputs

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

Definition at line 147 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 156 of file vf_bbox.c.

filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition: vf_bbox.c:84
BBoxContext
Definition: vf_bbox.c:33
FLAGS
#define FLAGS
Definition: vf_bbox.c:40
config_output
static int config_output(AVFilterLink *outlink)
Definition: vf_bbox.c:124
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
OFFSET
#define OFFSET(x)
Definition: vf_bbox.c:39
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_bbox.c:49
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:117
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_acrusher.c:336
ff_filter_process_command
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
Definition: avfilter.c:882
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:126
bbox_outputs
static const AVFilterPad bbox_outputs[]
Definition: vf_bbox.c:147
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
bbox_inputs
static const AVFilterPad bbox_inputs[]
Definition: vf_bbox.c:138