ref: 15a3a652413a8ec02fcce036765790e145fbb46b
parent: fc858fbb5ec7268a7f70a00de36eef4ed2f5fad5
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed Oct 16 23:13:52 EDT 2024
cmrecalc: diagonal >= 0 fits the "brightness only" criteria just as well
--- a/colormatrix.c
+++ b/colormatrix.c
@@ -49,7 +49,7 @@
for(i = 0; i < 4*4; i++)
cm[i] = CM(t[i]);
cmkind = (
- cm[4*0] >= CM(1) &&
+ cm[4*0] >= CM(0) &&
cm[4*0+0] == cm[4*1+1] &&
cm[4*1+1] == cm[4*2+2] &&
cm[4*0+1] == 0 && cm[4*0+2] == 0 && cm[4*0+3] == 0 &&
--- a/colormatrix.h
+++ b/colormatrix.h
@@ -1,6 +1,6 @@
/* cmkind values for optimized special-casing */
#define CmIdent 0 /* identity (== 1) */
-#define CmBright 1 /* only brightness is changed (> 1) */
+#define CmBright 1 /* only brightness is changed (>= 0) */
#define CM(v) ((v)*(1<<12))