|
|
@ -63,18 +63,22 @@ typedef struct StackContext { |
|
|
|
FFFrameSync fs; |
|
|
|
FFFrameSync fs; |
|
|
|
} StackContext; |
|
|
|
} StackContext; |
|
|
|
|
|
|
|
|
|
|
|
static int query_formats(AVFilterContext *ctx) |
|
|
|
static int query_formats(const AVFilterContext *ctx, |
|
|
|
|
|
|
|
AVFilterFormatsConfig **cfg_in, |
|
|
|
|
|
|
|
AVFilterFormatsConfig **cfg_out) |
|
|
|
{ |
|
|
|
{ |
|
|
|
StackContext *s = ctx->priv; |
|
|
|
const StackContext *s = ctx->priv; |
|
|
|
int reject_flags = AV_PIX_FMT_FLAG_BITSTREAM | |
|
|
|
int reject_flags = AV_PIX_FMT_FLAG_BITSTREAM | |
|
|
|
AV_PIX_FMT_FLAG_HWACCEL | |
|
|
|
AV_PIX_FMT_FLAG_HWACCEL | |
|
|
|
AV_PIX_FMT_FLAG_PAL; |
|
|
|
AV_PIX_FMT_FLAG_PAL; |
|
|
|
|
|
|
|
|
|
|
|
if (s->fillcolor_enable) { |
|
|
|
if (s->fillcolor_enable) { |
|
|
|
return ff_set_common_formats(ctx, ff_draw_supported_pixel_formats(0)); |
|
|
|
return ff_set_common_formats2(ctx, cfg_in, cfg_out, |
|
|
|
|
|
|
|
ff_draw_supported_pixel_formats(0)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ff_set_common_formats(ctx, ff_formats_pixdesc_filter(0, reject_flags)); |
|
|
|
return ff_set_common_formats2(ctx, cfg_in, cfg_out, |
|
|
|
|
|
|
|
ff_formats_pixdesc_filter(0, reject_flags)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static av_cold int init(AVFilterContext *ctx) |
|
|
|
static av_cold int init(AVFilterContext *ctx) |
|
|
@ -462,7 +466,7 @@ const AVFilter ff_vf_hstack = { |
|
|
|
.priv_class = &stack_class, |
|
|
|
.priv_class = &stack_class, |
|
|
|
.priv_size = sizeof(StackContext), |
|
|
|
.priv_size = sizeof(StackContext), |
|
|
|
FILTER_OUTPUTS(outputs), |
|
|
|
FILTER_OUTPUTS(outputs), |
|
|
|
FILTER_QUERY_FUNC(query_formats), |
|
|
|
FILTER_QUERY_FUNC2(query_formats), |
|
|
|
.init = init, |
|
|
|
.init = init, |
|
|
|
.uninit = uninit, |
|
|
|
.uninit = uninit, |
|
|
|
.activate = activate, |
|
|
|
.activate = activate, |
|
|
@ -479,7 +483,7 @@ const AVFilter ff_vf_vstack = { |
|
|
|
.priv_class = &stack_class, |
|
|
|
.priv_class = &stack_class, |
|
|
|
.priv_size = sizeof(StackContext), |
|
|
|
.priv_size = sizeof(StackContext), |
|
|
|
FILTER_OUTPUTS(outputs), |
|
|
|
FILTER_OUTPUTS(outputs), |
|
|
|
FILTER_QUERY_FUNC(query_formats), |
|
|
|
FILTER_QUERY_FUNC2(query_formats), |
|
|
|
.init = init, |
|
|
|
.init = init, |
|
|
|
.uninit = uninit, |
|
|
|
.uninit = uninit, |
|
|
|
.activate = activate, |
|
|
|
.activate = activate, |
|
|
@ -507,7 +511,7 @@ const AVFilter ff_vf_xstack = { |
|
|
|
.priv_size = sizeof(StackContext), |
|
|
|
.priv_size = sizeof(StackContext), |
|
|
|
.priv_class = &xstack_class, |
|
|
|
.priv_class = &xstack_class, |
|
|
|
FILTER_OUTPUTS(outputs), |
|
|
|
FILTER_OUTPUTS(outputs), |
|
|
|
FILTER_QUERY_FUNC(query_formats), |
|
|
|
FILTER_QUERY_FUNC2(query_formats), |
|
|
|
.init = init, |
|
|
|
.init = init, |
|
|
|
.uninit = uninit, |
|
|
|
.uninit = uninit, |
|
|
|
.activate = activate, |
|
|
|
.activate = activate, |
|
|
|