diff options
author | Niklas Haas <git@haasn.dev> | 2023-10-27 16:59:40 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.dev> | 2023-11-09 12:53:35 +0100 |
commit | ea9557043e9e23a0b7e9709fbb2b2668d00522ef (patch) | |
tree | 616dca3efa6918912baa59ff547b2d72827f423a /libavfilter | |
parent | b7284f24105c5f37aa8e6262e3ccc7b4ed157095 (diff) | |
download | ffmpeg-ea9557043e9e23a0b7e9709fbb2b2668d00522ef.tar.gz |
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.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_alphamerge.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |