[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15307] trunk/blender/extern/libredcode/ debayer.c: == Redcode ==
Peter Schlaile
peter at schlaile.de
Sun Jun 22 17:48:57 CEST 2008
Revision: 15307
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15307
Author: schlaile
Date: 2008-06-22 17:48:12 +0200 (Sun, 22 Jun 2008)
Log Message:
-----------
== Redcode ==
Doing image comparison revealed, that Kb = Kr = 0.0 for redcode :)
Modified Paths:
--------------
trunk/blender/extern/libredcode/debayer.c
Modified: trunk/blender/extern/libredcode/debayer.c
===================================================================
--- trunk/blender/extern/libredcode/debayer.c 2008-06-22 14:23:57 UTC (rev 15306)
+++ trunk/blender/extern/libredcode/debayer.c 2008-06-22 15:48:12 UTC (rev 15307)
@@ -9,8 +9,6 @@
int x,y;
int pix_max = 4096;
int mask = pix_max - 1;
- float Kb = 0.0722;
- float Kr = 0.2126;
float *o;
for (y = 0; y < height; y++) {
@@ -25,9 +23,9 @@
float y2 = (planes[3][i] & mask);
float y2p = (planes[3][i_p] & mask);
- float b_ = cb * (1.0 - Kb)/(pix_max/2);
- float r_ = cr * (1.0 - Kr)/(pix_max/2);
- float g_ = (- Kr * r_ - Kb * b_)/(1.0 - Kr - Kb);
+ float b_ = cb /(pix_max/2);
+ float r_ = cr /(pix_max/2);
+ float g_ = 0.0;
float y_[4] = {y1 / pix_max,
(y2 + y2p)/2 / pix_max,
@@ -68,8 +66,6 @@
int x,y;
int pix_max = 4096;
int mask = pix_max - 1;
- float Kb = 0.0722;
- float Kr = 0.2126;
for (y = 0; y < height; y++) {
float *o = out + width * (height - y - 1);
@@ -80,9 +76,9 @@
float cr = (planes[2][i] & mask) - pix_max/2;
float y2 = (planes[3][i] & mask);
- float b_ = cb * (1.0 - Kb)/(pix_max/2);
- float r_ = cr * (1.0 - Kr)/(pix_max/2);
- float g_ = (- Kr * r_ - Kb * b_)/(1.0 - Kr - Kb);
+ float b_ = cb /(pix_max/2);
+ float r_ = cr /(pix_max/2);
+ float g_ = 0.0;
float y = (y1 + y2)/2 / pix_max;
@@ -101,8 +97,6 @@
int x,y;
int pix_max = 4096;
int mask = pix_max - 1;
- float Kb = 0.0722;
- float Kr = 0.2126;
for (y = 0; y < height; y += 2) {
float *o = out + (width/2) * (height/2 - y/2 - 1);
@@ -113,9 +107,9 @@
float cr = (planes[2][i] & mask) - pix_max/2;
float y2 = planes[3][i] & mask;
- float b_ = cb * (1.0 - Kb)/(pix_max/2);
- float r_ = cr * (1.0 - Kr)/(pix_max/2);
- float g_ = (- Kr * r_ - Kb * b_)/(1.0 - Kr - Kb);
+ float b_ = cb /(pix_max/2);
+ float r_ = cr /(pix_max/2);
+ float g_ = 0.0;
float y = (y1 + y2)/2 / pix_max;
More information about the Bf-blender-cvs
mailing list