Message ID | 20231027170446.63684-3-ffmpeg@haasn.xyz |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/8] swscale: fix sws_setColorspaceDetails after sws_init_context | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
On Fri, Oct 27, 2023 at 07:04:41PM +0200, Niklas Haas wrote: > From: Niklas Haas <git@haasn.dev> > > Alpha planes must always be full range, so complain loudly if fed > limited range grayscale input. > --- > libavfilter/vf_alphamerge.c | 6 ++++++ > 1 file changed, 6 insertions(+) should be ok [...] thx
diff --git a/libavfilter/vf_alphamerge.c b/libavfilter/vf_alphamerge.c index 4bbc06da36..b814aa64f0 100644 --- a/libavfilter/vf_alphamerge.c +++ b/libavfilter/vf_alphamerge.c @@ -60,6 +60,12 @@ static int do_alphamerge(FFFrameSync *fs) if (!alpha_buf) return ff_filter_frame(ctx->outputs[0], main_buf); + if (alpha_buf->color_range == AVCOL_RANGE_MPEG) { + av_log(ctx, AV_LOG_WARNING, "alpha plane color range tagged as %s, " + "output will be wrong!", + av_color_range_name(alpha_buf->color_range)); + } + if (s->is_packed_rgb) { int x, y; uint8_t *pin, *pout;
From: Niklas Haas <git@haasn.dev> Alpha planes must always be full range, so complain loudly if fed limited range grayscale input. --- libavfilter/vf_alphamerge.c | 6 ++++++ 1 file changed, 6 insertions(+)