1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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.
This commit is contained in:
Niklas Haas 2023-10-27 16:59:40 +02:00
parent b7284f2410
commit ea9557043e

View File

@ -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;