We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f23f7e commit 493873dCopy full SHA for 493873d
conf.h
@@ -4,3 +4,5 @@
4
* Higher is more work for the CPU, lower is less accurate.
5
*/
6
#define SPINLOCK_NS 1E6
7
+
8
+#define GREY_DIFF 15
ttydisp.cpp
@@ -71,6 +71,12 @@ class Stream {
71
r = r >= pad ? r - pad : 0;
72
g = g >= pad ? g - pad : 0;
73
b = b >= pad ? b - pad : 0;
74
+ if(abs(r - g) <= GREY_DIFF && abs(r - b) <= GREY_DIFF && abs(b - g) <= GREY_DIFF) {
75
+ int t = r + g + b;
76
+ r = t/3;
77
+ g = r;
78
+ b = r;
79
+ }
80
return 16 + (36 * lround(r*5.0/255)) + (6 * lround(g*5.0/255)) + lround(b*5.0/255);
81
}
82
void resetFrame(unsigned height) {
0 commit comments