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_shear.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_shear.c')
-rw-r--r-- | libavfilter/vf_shear.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |