FFmpeg
Macros | Functions | Variables
stack_internal.c File Reference

Go to the source code of this file.

Macros

#define OFFSET(x)   offsetof(StackHWContext, x)
 
#define FLAGS   (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM)
 
#define SET_OUTPUT_REGION(region, rx, ry, rw, rh)
 
#define STACK_COMMON_OPTS
 
#define DEFINE_HSTACK_OPTIONS(api)
 
#define DEFINE_VSTACK_OPTIONS(api)
 
#define DEFINE_XSTACK_OPTIONS(api)
 
#define DEFINE_STACK_FILTER(category, api, capi, filter_flags)
 

Functions

static int init_framesync (AVFilterContext *avctx)
 
static int config_comm_output (AVFilterLink *outlink)
 
static int stack_init (AVFilterContext *avctx)
 
static av_cold void stack_uninit (AVFilterContext *avctx)
 
static int stack_activate (AVFilterContext *avctx)
 

Variables

static const AVFilterPad stack_outputs []
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 19 of file stack_internal.c.

◆ FLAGS

Definition at line 20 of file stack_internal.c.

◆ SET_OUTPUT_REGION

#define SET_OUTPUT_REGION (   region,
  rx,
  ry,
  rw,
  rh 
)
Value:
do { \
region->x = rx; \
region->y = ry; \
region->width = rw; \
region->height = rh; \
} while (0)

Definition at line 22 of file stack_internal.c.

◆ STACK_COMMON_OPTS

#define STACK_COMMON_OPTS
Value:
{ "inputs", "Set number of inputs", OFFSET(base.nb_inputs), AV_OPT_TYPE_INT, { .i64 = 2 }, 2, UINT16_MAX, .flags = FLAGS }, \
{ "shortest", "Force termination when the shortest input terminates", OFFSET(base.shortest), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS },

Definition at line 308 of file stack_internal.c.

◆ DEFINE_HSTACK_OPTIONS

#define DEFINE_HSTACK_OPTIONS (   api)
Value:
static const AVOption hstack_##api##_options[] = { \
STACK_COMMON_OPTS \
{ "height", "Set output height (0 to use the height of input 0)", OFFSET(base.tile_height), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, UINT16_MAX, FLAGS }, \
{ NULL } \
}

Definition at line 312 of file stack_internal.c.

◆ DEFINE_VSTACK_OPTIONS

#define DEFINE_VSTACK_OPTIONS (   api)
Value:
static const AVOption vstack_##api##_options[] = { \
STACK_COMMON_OPTS \
{ "width", "Set output width (0 to use the width of input 0)", OFFSET(base.tile_width), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, UINT16_MAX, FLAGS }, \
{ NULL } \
}

Definition at line 319 of file stack_internal.c.

◆ DEFINE_XSTACK_OPTIONS

#define DEFINE_XSTACK_OPTIONS (   api)
Value:
static const AVOption xstack_##api##_options[] = { \
STACK_COMMON_OPTS \
{ "layout", "Set custom layout", OFFSET(base.layout), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, .flags = FLAGS }, \
{ "grid", "set fixed size grid layout", OFFSET(base.nb_grid_columns), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, .flags = FLAGS }, \
{ "grid_tile_size", "set tile size in grid layout", OFFSET(base.tile_width), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, 0, 0, .flags = FLAGS }, \
{ "fill", "Set the color for unused pixels", OFFSET(base.fillcolor_str), AV_OPT_TYPE_STRING, {.str = "none"}, .flags = FLAGS }, \
{ NULL } \
}

Definition at line 326 of file stack_internal.c.

◆ DEFINE_STACK_FILTER

#define DEFINE_STACK_FILTER (   category,
  api,
  capi,
  filter_flags 
)
Value:
static const AVClass category##_##api##_class = { \
.class_name = #category "_" #api, \
.item_name = av_default_item_name, \
.option = category##_##api##_options, \
.version = LIBAVUTIL_VERSION_INT, \
}; \
const AVFilter ff_vf_##category##_##api = { \
.name = #category "_" #api, \
.description = NULL_IF_CONFIG_SMALL(#capi " " #category), \
.priv_size = sizeof(StackHWContext), \
.priv_class = &category##_##api##_class, \
.init = api##_stack_init, \
.uninit = api##_stack_uninit, \
FILTER_QUERY_FUNC(api##_stack_query_formats), \
FILTER_OUTPUTS(stack_outputs), \
.flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, \
.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | filter_flags, \
}

Definition at line 336 of file stack_internal.c.

Function Documentation

◆ init_framesync()

static int init_framesync ( AVFilterContext avctx)
static

Definition at line 29 of file stack_internal.c.

Referenced by config_comm_output().

◆ config_comm_output()

static int config_comm_output ( AVFilterLink outlink)
static

Definition at line 53 of file stack_internal.c.

Referenced by config_output().

◆ stack_init()

static int stack_init ( AVFilterContext avctx)
static

Definition at line 223 of file stack_internal.c.

Referenced by qsv_stack_init(), and vaapi_stack_init().

◆ stack_uninit()

static av_cold void stack_uninit ( AVFilterContext avctx)
static

Definition at line 286 of file stack_internal.c.

Referenced by qsv_stack_uninit(), and vaapi_stack_uninit().

◆ stack_activate()

static int stack_activate ( AVFilterContext avctx)
static

Definition at line 294 of file stack_internal.c.

Variable Documentation

◆ stack_outputs

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

Definition at line 300 of file stack_internal.c.

FF_FILTER_FLAG_HWFRAME_AWARE
#define FF_FILTER_FLAG_HWFRAME_AWARE
The filter is aware of hardware frames, and any hardware frame context should not be automatically pr...
Definition: internal.h:343
AVOption
AVOption.
Definition: opt.h:294
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:159
base
uint8_t base
Definition: vp3data.h:128
category
category
Definition: openal-dec.c:248
OFFSET
#define OFFSET(x)
Definition: stack_internal.c:19
FLAGS
#define FLAGS
Definition: stack_internal.c:20
AVFILTER_FLAG_DYNAMIC_INPUTS
#define AVFILTER_FLAG_DYNAMIC_INPUTS
The number of the filter inputs is not determined just by AVFilter.inputs.
Definition: avfilter.h:106
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
NULL
#define NULL
Definition: coverity.c:32
activate
filter_frame For filters that do not use the activate() callback
AV_OPT_TYPE_IMAGE_SIZE
@ AV_OPT_TYPE_IMAGE_SIZE
offset must point to two consecutive integers
Definition: opt.h:235
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
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:106
config_output
static int config_output(AVFilterLink *outlink)
Definition: af_aap.c:190
stack_outputs
static const AVFilterPad stack_outputs[]
Definition: stack_internal.c:300
uninit
static void uninit(AVBSFContext *ctx)
Definition: pcm_rechunk.c:68
AVFilter
Filter definition.
Definition: avfilter.h:166
stack_activate
static int stack_activate(AVFilterContext *avctx)
Definition: stack_internal.c:294
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
_
#define _
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:244
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:229
StackHWContext
#define StackHWContext
Definition: vf_stack_qsv.c:49