From 7cc99cedd3685f0e9090423d0c1a061b376aa936 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 8 Sep 2020 23:24:39 -0700 Subject: yuv_utils: privatize matrices These don't need to be globals anymore since I've gotten rid of the unnecessary macro insanity. --- src/rmd_yuv_utils.c | 7 +++---- src/rmd_yuv_utils.h | 12 +----------- 2 files changed, 4 insertions(+), 15 deletions(-) (limited to 'src') 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 */ -- cgit v1.2.3