* [FFmpeg-devel] [PATCH 1/2] avfilter: pass link YUV colorspace to ff_draw_init2
@ 2024-01-31 11:17 Niklas Haas
2024-01-31 11:17 ` [FFmpeg-devel] [PATCH 2/2] avfilter/vsrc_testsrc: switch to YUV colorspace negotiation API Niklas Haas
2024-01-31 11:47 ` [FFmpeg-devel] [PATCH 1/2] avfilter: pass link YUV colorspace to ff_draw_init2 Diederick C. Niehorster
0 siblings, 2 replies; 4+ messages in thread
From: Niklas Haas @ 2024-01-31 11:17 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Niklas Haas
From: Niklas Haas <git@haasn.dev>
This makes all ff_draw_* based filters aware of YUV colorspaces and
ranges. Needed for YUVJ removal. Also fixes a bug where e.g. vf_pad
would generate a limited range background even after conversion to
full-scale grayscale.
The FATE changes were a consequence of the aforementioned bugfix - the
gray scale files are output as full range (due to conversion by
libswscale, which hard-codes gray = full), and appropriately tagged as
such, but before this change the padded version incorrectly used
a limited range (16) black background for these formats.
---
libavfilter/qrencode.c | 8 +++++---
libavfilter/src_avsynctest.c | 2 +-
libavfilter/vf_datascope.c | 2 +-
libavfilter/vf_drawtext.c | 2 +-
libavfilter/vf_pad.c | 2 +-
libavfilter/vf_rotate.c | 2 +-
libavfilter/vf_shear.c | 2 +-
libavfilter/vf_stack.c | 3 ++-
libavfilter/vf_subtitles.c | 3 ++-
libavfilter/vf_tile.c | 2 +-
libavfilter/vf_tinterlace.c | 2 +-
libavfilter/vf_tpad.c | 2 +-
libavfilter/vsrc_testsrc.c | 9 ++++++---
tests/ref/fate/filter-pixfmts-pad | 16 ++++++++--------
14 files changed, 32 insertions(+), 25 deletions(-)
diff --git a/libavfilter/qrencode.c b/libavfilter/qrencode.c
index 09af8dfb4e..6b86e01f57 100644
--- a/libavfilter/qrencode.c
+++ b/libavfilter/qrencode.c
@@ -638,7 +638,7 @@ static int qrencodesrc_config_props(AVFilterLink *outlink)
ff_draw_color(&qr->draw, &qr->draw_foreground_color, (const uint8_t *)&qr->foreground_color);
ff_draw_color(&qr->draw, &qr->draw_background_color, (const uint8_t *)&qr->background_color);
- ff_draw_init(&qr->draw0, outlink->format, FF_DRAW_PROCESS_ALPHA);
+ ff_draw_init2(&qr->draw0, outlink->format, outlink->colorspace, outlink->color_range, FF_DRAW_PROCESS_ALPHA);
ff_draw_color(&qr->draw0, &qr->draw0_background_color, (const uint8_t *)&qr->background_color);
outlink->w = qr->rendered_padded_qrcode_width;
@@ -730,7 +730,8 @@ static int qrencode_config_input(AVFilterLink *inlink)
qr->is_source = 0;
- ff_draw_init(&qr->draw, inlink->format, FF_DRAW_PROCESS_ALPHA);
+ ff_draw_init2(&qr->draw, inlink->format, inlink->colorspace, inlink->color_range,
+ FF_DRAW_PROCESS_ALPHA);
V(W) = V(main_w) = inlink->w;
V(H) = V(main_h) = inlink->h;
@@ -759,7 +760,8 @@ static int qrencode_config_input(AVFilterLink *inlink)
PARSE_EXPR(rendered_qrcode_width);
PARSE_EXPR(rendered_padded_qrcode_width);
- ff_draw_init(&qr->draw, inlink->format, FF_DRAW_PROCESS_ALPHA);
+ ff_draw_init2(&qr->draw, inlink->format, inlink->colorspace, inlink->color_range,
+ FF_DRAW_PROCESS_ALPHA);
ff_draw_color(&qr->draw, &qr->draw_foreground_color, (const uint8_t *)&qr->foreground_color);
ff_draw_color(&qr->draw, &qr->draw_background_color, (const uint8_t *)&qr->background_color);
diff --git a/libavfilter/src_avsynctest.c b/libavfilter/src_avsynctest.c
index a0fef7a1cb..9fd0b590c1 100644
--- a/libavfilter/src_avsynctest.c
+++ b/libavfilter/src_avsynctest.c
@@ -160,7 +160,7 @@ static av_cold int config_props(AVFilterLink *outlink)
s->dir = 1;
s->prev_intpart = INT64_MIN;
- ff_draw_init(&s->draw, outlink->format, 0);
+ ff_draw_init2(&s->draw, outlink->format, outlink->colorspace, outlink->color_range, 0);
ff_draw_color(&s->draw, &s->fg, s->rgba[0]);
ff_draw_color(&s->draw, &s->bg, s->rgba[1]);
diff --git a/libavfilter/vf_datascope.c b/libavfilter/vf_datascope.c
index 89b59f2510..4845c9918d 100644
--- a/libavfilter/vf_datascope.c
+++ b/libavfilter/vf_datascope.c
@@ -383,7 +383,7 @@ static int config_input(AVFilterLink *inlink)
uint8_t alpha = s->opacity * 255;
s->nb_planes = av_pix_fmt_count_planes(inlink->format);
- ff_draw_init(&s->draw, inlink->format, 0);
+ ff_draw_init2(&s->draw, inlink->format, inlink->colorspace, inlink->color_range, 0);
ff_draw_color(&s->draw, &s->white, (uint8_t[]){ 255, 255, 255, 255} );
ff_draw_color(&s->draw, &s->black, (uint8_t[]){ 0, 0, 0, alpha} );
ff_draw_color(&s->draw, &s->yellow, (uint8_t[]){ 255, 255, 0, 255} );
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index fe7e6ace27..37110bc32f 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -1152,7 +1152,7 @@ static int config_input(AVFilterLink *inlink)
char *expr;
int ret;
- ff_draw_init(&s->dc, inlink->format, FF_DRAW_PROCESS_ALPHA);
+ ff_draw_init(&s->dc, inlink->format, inlink->colorspace, inlink->color_range, FF_DRAW_PROCESS_ALPHA);
ff_draw_color(&s->dc, &s->fontcolor, s->fontcolor.rgba);
ff_draw_color(&s->dc, &s->shadowcolor, s->shadowcolor.rgba);
ff_draw_color(&s->dc, &s->bordercolor, s->bordercolor.rgba);
diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c
index e52f7284d4..240b6b929d 100644
--- a/libavfilter/vf_pad.c
+++ b/libavfilter/vf_pad.c
@@ -111,7 +111,7 @@ static int config_input(AVFilterLink *inlink)
double var_values[VARS_NB], res;
char *expr;
- ff_draw_init(&s->draw, inlink->format, 0);
+ ff_draw_init2(&s->draw, inlink->format, inlink->colorspace, inlink->color_range, 0);
ff_draw_color(&s->draw, &s->color, s->rgba_color);
var_values[VAR_IN_W] = var_values[VAR_IW] = inlink->w;
diff --git a/libavfilter/vf_rotate.c b/libavfilter/vf_rotate.c
index 96c250a459..3adde22c09 100644
--- a/libavfilter/vf_rotate.c
+++ b/libavfilter/vf_rotate.c
@@ -288,7 +288,7 @@ static int config_props(AVFilterLink *outlink)
double res;
char *expr;
- ff_draw_init(&rot->draw, inlink->format, 0);
+ ff_draw_init2(&rot->draw, inlink->format, inlink->colorspace, inlink->color_range, 0);
ff_draw_color(&rot->draw, &rot->color, rot->fillcolor);
rot->hsub = pixdesc->log2_chroma_w;
diff --git a/libavfilter/vf_shear.c b/libavfilter/vf_shear.c
index 760caa5011..5d43809ccd 100644
--- a/libavfilter/vf_shear.c
+++ b/libavfilter/vf_shear.c
@@ -260,7 +260,7 @@ static int config_output(AVFilterLink *outlink)
s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(ctx->inputs[0]->h, desc->log2_chroma_h);
s->planeheight[0] = s->planeheight[3] = ctx->inputs[0]->h;
- ff_draw_init(&s->draw, outlink->format, 0);
+ ff_draw_init2(&s->draw, outlink->format, outlink->colorspace, outlink->color_range, 0);
ff_draw_color(&s->draw, &s->color, s->fillcolor);
s->filter_slice[0] = s->depth <= 8 ? filter_slice_nn8 : filter_slice_nn16;
diff --git a/libavfilter/vf_stack.c b/libavfilter/vf_stack.c
index 331dc7b3e3..2bb3d9b1d2 100644
--- a/libavfilter/vf_stack.c
+++ b/libavfilter/vf_stack.c
@@ -304,7 +304,8 @@ static int config_output(AVFilterLink *outlink)
int inw, inh, size;
if (s->fillcolor_enable) {
- ff_draw_init(&s->draw, ctx->inputs[0]->format, 0);
+ const AVFilterLink *inlink = ctx->inputs[0];
+ ff_draw_init2(&s->draw, inlink->format, inlink->colorspace, inlink->color_range, 0);
ff_draw_color(&s->draw, &s->color, s->fillcolor);
}
diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c
index ef5f9cd866..366c0bf39e 100644
--- a/libavfilter/vf_subtitles.c
+++ b/libavfilter/vf_subtitles.c
@@ -148,7 +148,8 @@ static int config_input(AVFilterLink *inlink)
{
AssContext *ass = inlink->dst->priv;
- ff_draw_init(&ass->draw, inlink->format, ass->alpha ? FF_DRAW_PROCESS_ALPHA : 0);
+ ff_draw_init2(&ass->draw, inlink->format, inlink->colorspace, inlink->color_range,
+ ass->alpha ? FF_DRAW_PROCESS_ALPHA : 0);
ass_set_frame_size (ass->renderer, inlink->w, inlink->h);
if (ass->original_w && ass->original_h) {
diff --git a/libavfilter/vf_tile.c b/libavfilter/vf_tile.c
index ca2397fb18..b45e739bb6 100644
--- a/libavfilter/vf_tile.c
+++ b/libavfilter/vf_tile.c
@@ -139,7 +139,7 @@ static int config_props(AVFilterLink *outlink)
outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
outlink->frame_rate = av_mul_q(inlink->frame_rate,
av_make_q(1, tile->nb_frames - tile->overlap));
- ff_draw_init(&tile->draw, inlink->format, 0);
+ ff_draw_init2(&tile->draw, inlink->format, inlink->colorspace, inlink->color_range, 0);
ff_draw_color(&tile->draw, &tile->blank, tile->rgba_color);
return 0;
diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c
index e221a6f941..8ff0aa8b4b 100644
--- a/libavfilter/vf_tinterlace.c
+++ b/libavfilter/vf_tinterlace.c
@@ -225,7 +225,7 @@ static int config_out_props(AVFilterLink *outlink)
if (tinterlace->mode == MODE_PAD) {
uint8_t black[4] = { 0, 0, 0, 16 };
- ff_draw_init(&tinterlace->draw, outlink->format, 0);
+ ff_draw_init2(&tinterlace->draw, outlink->format, outlink->colorspace, outlink->color_range, 0);
ff_draw_color(&tinterlace->draw, &tinterlace->color, black);
/* limited range */
if (!ff_fmt_is_in(outlink->format, full_scale_yuvj_pix_fmts)) {
diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c
index 1efe4ec479..9ef5956eac 100644
--- a/libavfilter/vf_tpad.c
+++ b/libavfilter/vf_tpad.c
@@ -203,7 +203,7 @@ static int config_input(AVFilterLink *inlink)
TPadContext *s = ctx->priv;
if (needs_drawing(s)) {
- ff_draw_init(&s->draw, inlink->format, 0);
+ ff_draw_init2(&s->draw, inlink->format, inlink->colorspace, inlink->color_range, 0);
ff_draw_color(&s->draw, &s->color, s->rgba_color);
}
diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index 3b5536badc..73a61bfa45 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -263,7 +263,8 @@ static int color_config_props(AVFilterLink *inlink)
TestSourceContext *test = ctx->priv;
int ret;
- ff_draw_init(&test->draw, inlink->format, 0);
+ ff_draw_init2(&test->draw, inlink->format, inlink->colorspace,
+ inlink->color_range, 0);
ff_draw_color(&test->draw, &test->color, test->color_rgba);
test->w = ff_draw_round_to_sub(&test->draw, 0, -1, test->w);
@@ -944,7 +945,8 @@ static int test2_config_props(AVFilterLink *inlink)
AVFilterContext *ctx = inlink->src;
TestSourceContext *s = ctx->priv;
- av_assert0(ff_draw_init(&s->draw, inlink->format, 0) >= 0);
+ av_assert0(ff_draw_init2(&s->draw, inlink->format, inlink->colorspace,
+ inlink->color_range, 0) >= 0);
s->w = ff_draw_round_to_sub(&s->draw, 0, -1, s->w);
s->h = ff_draw_round_to_sub(&s->draw, 1, -1, s->h);
if (av_image_check_size(s->w, s->h, 0, ctx) < 0)
@@ -1964,7 +1966,8 @@ static int colorchart_config_props(AVFilterLink *inlink)
AVFilterContext *ctx = inlink->src;
TestSourceContext *s = ctx->priv;
- av_assert0(ff_draw_init(&s->draw, inlink->format, 0) >= 0);
+ av_assert0(ff_draw_init2(&s->draw, inlink->format, inlink->colorspace,
+ inlink->color_range, 0) >= 0);
if (av_image_check_size(s->w, s->h, 0, ctx) < 0)
return AVERROR(EINVAL);
return config_props(inlink);
diff --git a/tests/ref/fate/filter-pixfmts-pad b/tests/ref/fate/filter-pixfmts-pad
index b4d236d408..73ae9d0f96 100644
--- a/tests/ref/fate/filter-pixfmts-pad
+++ b/tests/ref/fate/filter-pixfmts-pad
@@ -17,12 +17,12 @@ gbrp12le 91fdad0d1edf7bfa2805e2041e8da3cd
gbrp14le deb2c3af6b48faa52f6a1f6590a0cdf7
gbrp16le a6156d1a37e05ee621b2a343fb158bd6
gbrp9le 9e827f438e081d334a6cae7e282698b0
-gray ddc663a0491df3959d9c5795dceaa72e
-gray10le e6559c1c8c05ce89f44b465573db44e7
-gray12le b066dd276b1698ee77d0c7eb95ff78c5
-gray14le 6d6b293b5d50944c5aa422245987c78e
-gray16le 2734ce1793a2216c5be30816689cd2fe
-gray9le f8f3dfe31ca5fcba828285bceefdab9a
+gray 2b9652a8b136316fada371d03ee252bc
+gray10le 0efebad19b92c6d6d915971c17ab55c4
+gray12le f03613250550d9dc253d46778f6d4bd6
+gray14le dbac6524c3793469c64fc0ee98d017fd
+gray16le 7b6db54ec8b4d9a8344443a3b3f50377
+gray9le 2d2bc7bd35c48fa61860162cf18a4dcf
nv12 381574979cb04be10c9168540310afad
nv16 d3a50501d2ea8535489fd5ec49e7866d
nv21 0fdeb2cdd56cf5a7147dc273456fa217
@@ -43,8 +43,8 @@ rgb48le ed08db9b1aa50d69b8c3d73db93e390e
rgba b157c90191463d34fb3ce77b36c96386
vuya 44368c0a758ee68e24ce976e3b1b8535
vuyx bc7c4f693a22cd1ac95e33d473086474
-ya16le 8dbfcb586abf626da7d1aca887a581b9
-ya8 495daaca2dcb4f7aeba7652768b41ced
+ya16le dfc900a8130a7c5e64201557cbaef50a
+ya8 5d25e9a7975805d3f0dac516a6132b6e
yuv410p cb871dcc1e84a7ef1d21f9237b88cf6e
yuv411p aec2c1740de9a62db0d41f4dda9121b0
yuv420p 4398e408fc35436ce4b20468946f58b6
--
2.43.0
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
* [FFmpeg-devel] [PATCH 2/2] avfilter/vsrc_testsrc: switch to YUV colorspace negotiation API
2024-01-31 11:17 [FFmpeg-devel] [PATCH 1/2] avfilter: pass link YUV colorspace to ff_draw_init2 Niklas Haas
@ 2024-01-31 11:17 ` Niklas Haas
2024-01-31 11:47 ` [FFmpeg-devel] [PATCH 1/2] avfilter: pass link YUV colorspace to ff_draw_init2 Diederick C. Niehorster
1 sibling, 0 replies; 4+ messages in thread
From: Niklas Haas @ 2024-01-31 11:17 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Niklas Haas
From: Niklas Haas <git@haasn.dev>
Instead of overriding the frame properties in fill_picture(), advertise
the supported YUV colorspace and range at format negotiation time. (The
correct metadata will now be set automatically by ff_get_video_buffer)
---
libavfilter/vsrc_testsrc.c | 47 +++++++++++++++++++++++++-------------
1 file changed, 31 insertions(+), 16 deletions(-)
diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c
index 73a61bfa45..c51ba46c97 100644
--- a/libavfilter/vsrc_testsrc.c
+++ b/libavfilter/vsrc_testsrc.c
@@ -1418,6 +1418,24 @@ static const enum AVPixelFormat smptebars_pix_fmts[] = {
AV_PIX_FMT_NONE,
};
+static int smptebars_query_formats(AVFilterContext *ctx)
+{
+ enum AVColorSpace csp;
+ int ret;
+
+ if (!strcmp(ctx->name, "smptehdbars")) {
+ csp = AVCOL_SPC_BT709;
+ } else {
+ csp = AVCOL_SPC_BT470BG;
+ }
+
+ if ((ret = ff_set_common_color_spaces(ctx, ff_make_formats_list_singleton(csp))))
+ return ret;
+ if ((ret = ff_set_common_color_ranges(ctx, ff_make_formats_list_singleton(AVCOL_RANGE_MPEG))))
+ return ret;
+ return ff_set_common_formats_from_list(ctx, smptebars_pix_fmts);
+}
+
AVFILTER_DEFINE_CLASS_EXT(palbars, "pal(75|100)bars", options);
#if CONFIG_PAL75BARS_FILTER
@@ -1428,9 +1446,6 @@ static void pal75bars_fill_picture(AVFilterContext *ctx, AVFrame *picref)
int r_w, i, x = 0;
const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(picref->format);
- picref->color_range = AVCOL_RANGE_MPEG;
- picref->colorspace = AVCOL_SPC_BT470BG;
-
r_w = FFALIGN((test->w + 7) / 8, 1 << pixdesc->log2_chroma_w);
draw_bar(test, white, x, 0, r_w, test->h, picref);
@@ -1461,7 +1476,7 @@ const AVFilter ff_vsrc_pal75bars = {
.activate = activate,
.inputs = NULL,
FILTER_OUTPUTS(outputs),
- FILTER_PIXFMTS_ARRAY(smptebars_pix_fmts),
+ FILTER_QUERY_FUNC(smptebars_query_formats),
};
#endif /* CONFIG_PAL75BARS_FILTER */
@@ -1474,9 +1489,6 @@ static void pal100bars_fill_picture(AVFilterContext *ctx, AVFrame *picref)
int r_w, i, x = 0;
const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(picref->format);
- picref->color_range = AVCOL_RANGE_MPEG;
- picref->colorspace = AVCOL_SPC_BT470BG;
-
r_w = FFALIGN((test->w + 7) / 8, 1 << pixdesc->log2_chroma_w);
for (i = 0; i < 7; i++) {
@@ -1505,7 +1517,7 @@ const AVFilter ff_vsrc_pal100bars = {
.activate = activate,
.inputs = NULL,
FILTER_OUTPUTS(outputs),
- FILTER_PIXFMTS_ARRAY(smptebars_pix_fmts),
+ FILTER_QUERY_FUNC(smptebars_query_formats),
};
#endif /* CONFIG_PAL100BARS_FILTER */
@@ -1520,8 +1532,6 @@ static void smptebars_fill_picture(AVFilterContext *ctx, AVFrame *picref)
int r_w, r_h, w_h, p_w, p_h, i, tmp, x = 0;
const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(picref->format);
- picref->colorspace = AVCOL_SPC_BT470BG;
-
r_w = FFALIGN((test->w + 6) / 7, 1 << pixdesc->log2_chroma_w);
r_h = FFALIGN(test->h * 2 / 3, 1 << pixdesc->log2_chroma_h);
w_h = FFALIGN(test->h * 3 / 4 - r_h, 1 << pixdesc->log2_chroma_h);
@@ -1572,7 +1582,7 @@ const AVFilter ff_vsrc_smptebars = {
.activate = activate,
.inputs = NULL,
FILTER_OUTPUTS(outputs),
- FILTER_PIXFMTS_ARRAY(smptebars_pix_fmts),
+ FILTER_QUERY_FUNC(smptebars_query_formats),
};
#endif /* CONFIG_SMPTEBARS_FILTER */
@@ -1585,8 +1595,6 @@ static void smptehdbars_fill_picture(AVFilterContext *ctx, AVFrame *picref)
int d_w, r_w, r_h, l_w, i, tmp, x = 0, y = 0;
const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(picref->format);
- picref->colorspace = AVCOL_SPC_BT709;
-
d_w = FFALIGN(test->w / 8, 1 << pixdesc->log2_chroma_w);
r_h = FFALIGN(test->h * 7 / 12, 1 << pixdesc->log2_chroma_h);
draw_bar(test, gray40, x, 0, d_w, r_h, picref);
@@ -1675,7 +1683,7 @@ const AVFilter ff_vsrc_smptehdbars = {
.activate = activate,
.inputs = NULL,
FILTER_OUTPUTS(outputs),
- FILTER_PIXFMTS_ARRAY(smptebars_pix_fmts),
+ FILTER_QUERY_FUNC(smptebars_query_formats),
};
#endif /* CONFIG_SMPTEHDBARS_FILTER */
@@ -2138,7 +2146,6 @@ ZONEPLATE_SLICE(16, uint16_t)
static void zoneplate_fill_picture(AVFilterContext *ctx, AVFrame *frame)
{
TestSourceContext *test = ctx->priv;
- frame->color_range = AVCOL_RANGE_JPEG;
ff_filter_execute(ctx, test->fill_slice_fn, frame, NULL,
FFMIN(frame->height, ff_filter_get_nb_threads(ctx)));
}
@@ -2194,6 +2201,14 @@ static const enum AVPixelFormat zoneplate_pix_fmts[] = {
AV_PIX_FMT_NONE,
};
+static int zoneplate_query_formats(AVFilterContext *ctx)
+{
+ int ret;
+ if ((ret = ff_set_common_color_ranges(ctx, ff_make_formats_list_singleton(AVCOL_RANGE_JPEG))))
+ return ret;
+ return ff_set_common_formats_from_list(ctx, zoneplate_pix_fmts);
+}
+
static const AVFilterPad avfilter_vsrc_zoneplate_outputs[] = {
{
.name = "default",
@@ -2212,7 +2227,7 @@ const AVFilter ff_vsrc_zoneplate = {
.activate = activate,
.inputs = NULL,
FILTER_OUTPUTS(avfilter_vsrc_zoneplate_outputs),
- FILTER_PIXFMTS_ARRAY(zoneplate_pix_fmts),
+ FILTER_QUERY_FUNC(zoneplate_query_formats),
.flags = AVFILTER_FLAG_SLICE_THREADS,
.process_command = ff_filter_process_command,
};
--
2.43.0
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] avfilter: pass link YUV colorspace to ff_draw_init2
2024-01-31 11:17 [FFmpeg-devel] [PATCH 1/2] avfilter: pass link YUV colorspace to ff_draw_init2 Niklas Haas
2024-01-31 11:17 ` [FFmpeg-devel] [PATCH 2/2] avfilter/vsrc_testsrc: switch to YUV colorspace negotiation API Niklas Haas
@ 2024-01-31 11:47 ` Diederick C. Niehorster
2024-02-05 12:38 ` Niklas Haas
1 sibling, 1 reply; 4+ messages in thread
From: Diederick C. Niehorster @ 2024-01-31 11:47 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On Wed, Jan 31, 2024 at 12:17 PM Niklas Haas <ffmpeg@haasn.xyz> wrote:
>
> From: Niklas Haas <git@haasn.dev>
>
> diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
> index fe7e6ace27..37110bc32f 100644
> --- a/libavfilter/vf_drawtext.c
> +++ b/libavfilter/vf_drawtext.c
> @@ -1152,7 +1152,7 @@ static int config_input(AVFilterLink *inlink)
> char *expr;
> int ret;
>
> - ff_draw_init(&s->dc, inlink->format, FF_DRAW_PROCESS_ALPHA);
> + ff_draw_init(&s->dc, inlink->format, inlink->colorspace, inlink->color_range, FF_DRAW_PROCESS_ALPHA);
Should this be ff_draw_init2?
> ff_draw_color(&s->dc, &s->fontcolor, s->fontcolor.rgba);
> ff_draw_color(&s->dc, &s->shadowcolor, s->shadowcolor.rgba);
> ff_draw_color(&s->dc, &s->bordercolor, s->bordercolor.rgba);
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/2] avfilter: pass link YUV colorspace to ff_draw_init2
2024-01-31 11:47 ` [FFmpeg-devel] [PATCH 1/2] avfilter: pass link YUV colorspace to ff_draw_init2 Diederick C. Niehorster
@ 2024-02-05 12:38 ` Niklas Haas
0 siblings, 0 replies; 4+ messages in thread
From: Niklas Haas @ 2024-02-05 12:38 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On Wed, 31 Jan 2024 12:47:59 +0100 "Diederick C. Niehorster" <dcnieho@gmail.com> wrote:
> On Wed, Jan 31, 2024 at 12:17 PM Niklas Haas <ffmpeg@haasn.xyz> wrote:
> >
> > From: Niklas Haas <git@haasn.dev>
> >
> > diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
> > index fe7e6ace27..37110bc32f 100644
> > --- a/libavfilter/vf_drawtext.c
> > +++ b/libavfilter/vf_drawtext.c
> > @@ -1152,7 +1152,7 @@ static int config_input(AVFilterLink *inlink)
> > char *expr;
> > int ret;
> >
> > - ff_draw_init(&s->dc, inlink->format, FF_DRAW_PROCESS_ALPHA);
> > + ff_draw_init(&s->dc, inlink->format, inlink->colorspace, inlink->color_range, FF_DRAW_PROCESS_ALPHA);
>
> Should this be ff_draw_init2?
Yes, fixed.
Will merge in 24h without further feedback.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-05 12:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-31 11:17 [FFmpeg-devel] [PATCH 1/2] avfilter: pass link YUV colorspace to ff_draw_init2 Niklas Haas
2024-01-31 11:17 ` [FFmpeg-devel] [PATCH 2/2] avfilter/vsrc_testsrc: switch to YUV colorspace negotiation API Niklas Haas
2024-01-31 11:47 ` [FFmpeg-devel] [PATCH 1/2] avfilter: pass link YUV colorspace to ff_draw_init2 Diederick C. Niehorster
2024-02-05 12:38 ` Niklas Haas
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git