diff --git a/PVRTCEncoder/include/PVRTCCompressor.h b/PVRTCEncoder/include/PVRTCCompressor.h index 657c71a..c0d9255 100644 --- a/PVRTCEncoder/include/PVRTCCompressor.h +++ b/PVRTCEncoder/include/PVRTCCompressor.h @@ -80,6 +80,8 @@ namespace PVRTCC { bool bTwoBitMode = false, const EWrapMode wrapMode = eWrapMode_Wrap); + static const uint32 kBlockSize = sizeof(uint64); + } // namespace PVRTCC #endif // PVRTCENCODER_INCLUDE_PVRTCCOMPRESSOR_H_ diff --git a/PVRTCEncoder/src/Decompressor.cpp b/PVRTCEncoder/src/Decompressor.cpp index 3e906ec..48d2ecb 100644 --- a/PVRTCEncoder/src/Decompressor.cpp +++ b/PVRTCEncoder/src/Decompressor.cpp @@ -308,7 +308,6 @@ namespace PVRTCC { const uint32 blocksW = bTwoBitMode? (w / 8) : (w / 4); const uint32 blocksH = h / 4; - const uint32 blockSz = 8; for(uint32 j = 0; j < blocksH; j++) { for(uint32 i = 0; i < blocksW; i++) { @@ -317,7 +316,7 @@ namespace PVRTCC { // linearize them... uint32 idx = Interleave(j, i); - uint32 offset = idx * blockSz; + uint32 offset = idx * kBlockSize; blocks.push_back( Block(dcj.inBuf + offset) ); } }