From 47406a3406b0048e976edb9d92d69592112ec014 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 3 Apr 2014 23:02:43 +0200 Subject: [PATCH] - I don't think it's a good idea to put a 64 MB lookup table into the static data segment, if it's for a piece of code most people will never use... --- src/gl/hqnx/common.h | 2 +- src/gl/hqnx/init.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gl/hqnx/common.h b/src/gl/hqnx/common.h index 930604e64..c3e700571 100644 --- a/src/gl/hqnx/common.h +++ b/src/gl/hqnx/common.h @@ -38,7 +38,7 @@ #define trV 0x00000006 /* RGB to YUV lookup table */ -extern uint32_t RGBtoYUV[16777216]; +extern uint32_t *RGBtoYUV; static inline uint32_t rgb_to_yuv(uint32_t c) { diff --git a/src/gl/hqnx/init.cpp b/src/gl/hqnx/init.cpp index 217358165..a3d97ba88 100644 --- a/src/gl/hqnx/init.cpp +++ b/src/gl/hqnx/init.cpp @@ -19,13 +19,14 @@ #include #include "hqx.h" -uint32_t RGBtoYUV[16777216]; +uint32_t *RGBtoYUV; uint32_t YUV1, YUV2; HQX_API void HQX_CALLCONV hqxInit(void) { /* Initalize RGB to YUV lookup table */ uint32_t c, r, g, b, y, u, v; + RGBtoYUV = new uint32_t[16777216]; for (c = 0; c < 16777215; c++) { r = (c & 0xFF0000) >> 16; g = (c & 0x00FF00) >> 8;