diff options
author | Niklas Haas <git@haasn.dev> | 2024-01-31 11:47:30 +0100 |
---|---|---|
committer | Niklas Haas <git@haasn.dev> | 2024-02-06 11:30:10 +0100 |
commit | ce81237d638214dd3fd64579805f67028f5bf144 (patch) | |
tree | b1c295366c1290f7759358e30b54cb93c07b8c5c /libavfilter/vf_pad.c | |
parent | 8264f3612c2c6dfff05587175854b62650ac917c (diff) | |
download | ffmpeg-ce81237d638214dd3fd64579805f67028f5bf144.tar.gz |
avfilter: pass link YUV colorspace to ff_draw_init2
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.
Diffstat (limited to 'libavfilter/vf_pad.c')
-rw-r--r-- | libavfilter/vf_pad.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |