ref: 0cfccfb6710059f9131240d4a836e6aa8a62023b
parent: 1bb6244c718c49c0f7cab1c82e37748c9f1add4f
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Wed Jul 14 05:41:56 EDT 2021
use full swing conversion
--- a/hj264.c
+++ b/hj264.c
@@ -71,10 +71,10 @@
g = bgrx[1];
r = bgrx[2];
bgrx += 4;
-/* this is not the "full" swing, just sayin' */
-#define YY ((( 66*r + 129*g + 25*b + 128) >> 8) + 16)
-#define UU (((-38*r - 74*g + 112*b + 128) >> 8) + 128)
-#define VV (((112*r - 94*g - 18*b + 128) >> 8) + 128)
+
+#define YY ((( 77*r + 150*g + 29*b + 128) >> 8) + 0)
+#define UU (((-43*r - 84*g + 127*b + 128) >> 8) + 128)
+#define VV (((127*r - 106*g - 21*b + 128) >> 8) + 128)
py[x] = YY;
pu[x/2] = UU;
pv[x/2] = VV;