Fix #110635: VSE: strip color multiplication affecting alpha channel

Factor of Color>Multiply should not have an effect on the alpha channel.
Alpha values can be adjusted separately by the factor associated to blend mode.
Factors below 1.0 reducing alpha would reduce color twice, while factors
above 1.0 would be clamped to 1.0.

- Removed ops on alpha channel in multiBuf()
- Removed adjustement of ibuf-planes since alpha channel is no longer
  modified

Pull Request: https://projects.blender.org/blender/blender/pulls/110984
This commit is contained in:
Hannes Loeschke
2023-08-18 12:36:03 +02:00
committed by Richard Antalik
parent 591c778b33
commit eda58d6419

View File

@@ -588,7 +588,6 @@ static void multibuf(ImBuf *ibuf, const float fmul)
rt[0] = min_ii((imul * rt[0]) >> 8, 255);
rt[1] = min_ii((imul * rt[1]) >> 8, 255);
rt[2] = min_ii((imul * rt[2]) >> 8, 255);
rt[3] = min_ii((imul * rt[3]) >> 8, 255);
rt += 4;
}
@@ -599,15 +598,10 @@ static void multibuf(ImBuf *ibuf, const float fmul)
rt_float[0] *= fmul;
rt_float[1] *= fmul;
rt_float[2] *= fmul;
rt_float[3] *= fmul;
rt_float += 4;
}
}
if (ELEM(ibuf->planes, R_IMF_PLANES_BW, R_IMF_PLANES_RGB) && fmul < 1.0f) {
ibuf->planes = R_IMF_PLANES_RGBA;
}
}
static ImBuf *input_preprocess(const SeqRenderData *context,