[FFmpeg-cvslog] avfilter/vf_alphamerge: warn if input not full range
Niklas Haas
git at videolan.org
Thu Nov 9 13:54:43 EET 2023
ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Fri Oct 27 16:59:40 2023 +0200| [ea9557043e9e23a0b7e9709fbb2b2668d00522ef] | committer: Niklas Haas
avfilter/vf_alphamerge: warn if input not full range
Alpha planes must always be full range, so complain loudly if fed
limited range grayscale input.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ea9557043e9e23a0b7e9709fbb2b2668d00522ef
---
libavfilter/vf_alphamerge.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libavfilter/vf_alphamerge.c b/libavfilter/vf_alphamerge.c
index 4bbc06da36..a5f5baf77e 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!\n",
+ av_color_range_name(alpha_buf->color_range));
+ }
+
if (s->is_packed_rgb) {
int x, y;
uint8_t *pin, *pout;
More information about the ffmpeg-cvslog
mailing list