summaryrefslogtreecommitdiffstats
path: root/gst/videomixer
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2009-06-30 12:40:02 +0200
committerEdward Hervey <bilboed@bilboed.com>2009-07-10 14:37:10 +0200
commit3c88249d48870b826fd89d287ee6d46b284c4f45 (patch)
treeac73478af8417ae93ea0967805da1e7728d27d50 /gst/videomixer
parentace4cb229542ae2c4ca8331d840e6bb3acd03c22 (diff)
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)
Diffstat (limited to 'gst/videomixer')
-rw-r--r--gst/videomixer/blend_i420.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/videomixer/blend_i420.c b/gst/videomixer/blend_i420.c
index 8d7399bc..e24d0ad4 100644
--- a/gst/videomixer/blend_i420.c
+++ b/gst/videomixer/blend_i420.c
@@ -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++;
}