From 2d52f1eabbc2106605cb5b0840060e9dd0a43c09 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Thu, 15 May 2014 22:01:21 -0400 Subject: [PATCH] Actually advance the color values ptr --- ASTCEncoder/src/Decompressor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ASTCEncoder/src/Decompressor.cpp b/ASTCEncoder/src/Decompressor.cpp index eda8fc3..36913b2 100644 --- a/ASTCEncoder/src/Decompressor.cpp +++ b/ASTCEncoder/src/Decompressor.cpp @@ -650,8 +650,7 @@ namespace ASTCC { // Section C.2.14 void ComputeEndpoints(FasTC::Pixel &ep1, FasTC::Pixel &ep2, - const uint32* colorValuesPtr, uint32 colorEndpointMode) { - const uint32 *colorValues = colorValuesPtr; + const uint32* &colorValues, uint32 colorEndpointMode) { #define READ_UINT_VALUES(N) \ uint32 v[N]; \ for(uint32 i = 0; i < N; i++) { \ @@ -943,9 +942,10 @@ namespace ASTCC { weightParams.GetNumWeightValues()); FasTC::Pixel endpoints[4][2]; + const uint32 *colorValuesPtr = colorValues; for(uint32 i = 0; i < nPartitions; i++) { ComputeEndpoints(endpoints[i][0], endpoints[i][1], - colorValues, colorEndpointMode[i]); + colorValuesPtr, colorEndpointMode[i]); } // Blocks can be at most 12x12, so we can have as many as 144 weights