projects
/
platform
/
upstream
/
gst-plugins-good.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ace4cb2
)
videomixer: I420 blending : Fix main algorithm.
author
Edward Hervey
<bilboed@bilboed.com>
Tue, 30 Jun 2009 10:40:02 +0000
(12:40 +0200)
committer
Edward Hervey
<bilboed@bilboed.com>
Fri, 10 Jul 2009 12:37:10 +0000
(14:37 +0200)
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)
gst/videomixer/blend_i420.c
patch
|
blob
|
history
diff --git
a/gst/videomixer/blend_i420.c
b/gst/videomixer/blend_i420.c
index
8d7399b
..
e24d0ad
100644
(file)
--- 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++;
}