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.
release/7.0
Niklas Haas 1 year ago
parent b7284f2410
commit ea9557043e
  1. 6
      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;

Loading…
Cancel
Save