38 #define OFFSET(x) offsetof(BBoxContext, x)
39 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
65 #define SET_META(key, value) \
66 av_dict_set_int(metadata, key, value, 0);
79 w = box.
x2 - box.
x1 + 1;
80 h = box.
y2 - box.
y1 + 1;
97 " x1:%d x2:%d y1:%d y2:%d w:%d h:%d"
98 " crop=%d:%d:%d:%d drawbox=%d:%d:%d:%d",
99 box.
x1, box.
x2, box.
y1, box.
y2, w, h,
100 w, h, box.
x1, box.
y1,
101 box.
x1, box.
y1, w, h);
129 .priv_class = &bbox_class,
static const AVFilterPad bbox_inputs[]
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
This structure describes decoded (raw) audio or video data.
planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
Main libavfilter public API header.
int h
agreed upon image height
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
const char * name
Pad name.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
timestamp utils, mostly useful for debugging/logging purposes
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
AVDictionary * metadata
metadata.
#define SET_META(key, value)
A filter pad used for either input or output.
A link between two filters.
AVFILTER_DEFINE_CLASS(bbox)
#define av_ts2timestr(ts, tb)
Convenience macro, the return value should be used only directly in function arguments but never stan...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void * priv
private data for use by the filter
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
int w
agreed upon image width
static const AVOption bbox_options[]
static const AVFilterPad outputs[]
#define AV_LOG_INFO
Standard information.
static const AVFilterPad inputs[]
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
static int query_formats(AVFilterContext *ctx)
Describe the class of an AVClass context structure.
static const AVFilterPad bbox_outputs[]
const char * name
Filter name.
AVFilterLink ** outputs
array of pointers to output links
static enum AVPixelFormat pix_fmts[]
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
int ff_calculate_bounding_box(FFBoundingBox *bbox, const uint8_t *data, int linesize, int w, int h, int min_val)
Calculate the smallest rectangle that will encompass the region with values > min_val.
planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
#define av_ts2str(ts)
Convenience macro, the return value should be used only directly in function arguments but never stan...
AVFilterContext * dst
dest filter
planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
AVPixelFormat
Pixel format.