mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
videomixer: I420 blending : Fix main algorithm.
When blending a source layer with an alpha of 'a' on top of another destination layer we take the sum of: * 'a' percent of the source layer * (100 - 'a') percent of the destination layer (the remainder)
This commit is contained in:
parent
ace4cb2295
commit
3c88249d48
1 changed files with 1 additions and 1 deletions
|
@ -192,7 +192,7 @@ gst_i420_do_blend (guint8 * src, guint8 * dest,
|
|||
int i, j;
|
||||
for (i = 0; i < src_height; i++) {
|
||||
for (j = 0; j < src_width; j++) {
|
||||
*dest = src_alpha * (*dest) + (1. - src_alpha) * (*src);
|
||||
*dest = src_alpha * (*src) + (1. - src_alpha) * (*dest);
|
||||
dest++;
|
||||
src++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue