summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2020-09-08 23:24:39 -0700
committerVito Caputo <vcaputo@pengaru.com>2020-09-08 23:30:19 -0700
commit7cc99cedd3685f0e9090423d0c1a061b376aa936 (patch)
treecff2a50eb06852764c594c7e891e41752745831b
parent4d83ebd9613bcd488f8191ddb862ca9dcfca03c3 (diff)
yuv_utils: privatize matrices
These don't need to be globals anymore since I've gotten rid of the unnecessary macro insanity.
-rw-r--r--src/rmd_yuv_utils.c7
-rw-r--r--src/rmd_yuv_utils.h12
2 files changed, 4 insertions, 15 deletions
diff --git a/src/rmd_yuv_utils.c b/src/rmd_yuv_utils.c
index 1f163ae..609511a 100644
--- a/src/rmd_yuv_utils.c
+++ b/src/rmd_yuv_utils.c
@@ -30,10 +30,9 @@
#include "rmd_math.h"
-// Keep these global (for performance reasons I assume).
-unsigned char Yr[256], Yg[256], Yb[256],
- Ur[256], Ug[256], UbVr[256],
- Vg[256], Vb[256];
+static unsigned char Yr[256], Yg[256], Yb[256],
+ Ur[256], Ug[256], UbVr[256],
+ Vg[256], Vb[256];
// FIXME: These globals are modified in other source files! We keep
// thsee here for now. These are the cache blocks. They need to be
diff --git a/src/rmd_yuv_utils.h b/src/rmd_yuv_utils.h
index f92471a..e781aab 100644
--- a/src/rmd_yuv_utils.h
+++ b/src/rmd_yuv_utils.h
@@ -31,22 +31,12 @@
#include "rmd_types.h"
-// The macros work directly on this data (for performance reasons I
-// suppose) so we keep this global
-extern unsigned char Yr[256], Yg[256], Yb[256],
- Ur[256], Ug[256], UbVr[256],
- Vg[256], Vb[256];
-
-
// We keep these global for now. FIXME: Isolate them.
extern unsigned char *yblocks,
*ublocks,
*vblocks;
-
-/**
-* Fill Yr,Yg,Yb,Ur,Ug.Ub,Vr,Vg,Vb arrays(globals) with values.
-*/
+/* Fill Yr,Yg,Yb,Ur,Ug.Ub,Vr,Vg,Vb arrays with values. */
void rmdMakeMatrices(void);
/* update yuv from data and optionally data_back */
© All Rights Reserved