Commit 1e6cef68 authored by Paul B Mahol's avatar Paul B Mahol

avfilter/vf_fade: fix color fading for planar rgb

parent 06db1bef
......@@ -221,8 +221,8 @@ static av_always_inline void filter_rgb_planar(FadeContext *s, const AVFrame *fr
uint8_t *pa = frame->data[3] + i * frame->linesize[3];
for (j = 0; j < frame->width; j++) {
#define INTERPP(c_name, c_idx) av_clip_uint8(((c[c_idx]<<16) + ((int)c_name - (int)c[c_idx]) * s->factor + (1<<15)) >> 16)
pr[j] = INTERPP(pr[j], 1);
pg[j] = INTERPP(pg[j], 0);
pr[j] = INTERPP(pr[j], 0);
pg[j] = INTERPP(pg[j], 1);
pb[j] = INTERPP(pb[j], 2);
if (do_alpha)
pa[j] = INTERPP(pa[j], 3);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment