Alpha planes must always be full range, so complain loudly if fed limited range grayscale input.
Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -60,6 +60,12 @@ static int do_alphamerge(FFFrameSync *fs) · 59 unmodified lines | |||
| 60 | if (!alpha_buf) | 60 | if (!alpha_buf) |
| 61 | return ff_filter_frame(ctx->outputs[0], main_buf); | 61 | return ff_filter_frame(ctx->outputs[0], main_buf); |
| 62 | 62 | ||
| 63 | if (alpha_buf->color_range == AVCOL_RANGE_MPEG) { | ||
| 64 | av_log(ctx, AV_LOG_WARNING, "alpha plane color range tagged as %s, " | ||
| 65 | "output will be wrong!\n", | ||
| 66 | av_color_range_name(alpha_buf->color_range)); | ||
| 67 | } | ||
| 68 | |||
| 63 | if (s->is_packed_rgb) { | 69 | if (s->is_packed_rgb) { |
| 64 | int x, y; | 70 | int x, y; |
| 65 | uint8_t *pin, *pout; | 71 | uint8_t *pin, *pout; |