Make PVRTC block size a constant accessible from the global header

This commit is contained in:
Pavel Krajcevski 2013-09-24 19:30:31 -04:00
parent 340f4f3141
commit 3de9abc908
2 changed files with 3 additions and 2 deletions

View file

@ -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_

View file

@ -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) );
}
}