From db6e76f1b3ee93dc00446cf5a84b79f549070a1c Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Mon, 27 Aug 2012 18:42:09 -0400 Subject: [PATCH] Change the encoders to assume block stream order --- BPTCEncoder/src/BC7Compressor.cpp | 10 +++++----- BPTCEncoder/src/BC7CompressorSIMD.cpp | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/BPTCEncoder/src/BC7Compressor.cpp b/BPTCEncoder/src/BC7Compressor.cpp index 098fc25..cfd7c8b 100755 --- a/BPTCEncoder/src/BC7Compressor.cpp +++ b/BPTCEncoder/src/BC7Compressor.cpp @@ -1402,12 +1402,12 @@ namespace BC7C { for(int i = 0; i < width; i += 4) { - ExtractBlock(inBuf + i * 4, width, block); - CompressBC7Block(block, outBuf); + // ExtractBlock(inBuf + i * 4, width, block); + CompressBC7Block((const uint32 *)inBuf, outBuf); + BC7CompressionMode::NumUses[gBestMode]++; - BC7CompressionMode::NumUses[gBestMode]++; - - outBuf += 16; + outBuf += 16; + inBuf += 64; } } } diff --git a/BPTCEncoder/src/BC7CompressorSIMD.cpp b/BPTCEncoder/src/BC7CompressorSIMD.cpp index ba543d6..f357900 100755 --- a/BPTCEncoder/src/BC7CompressorSIMD.cpp +++ b/BPTCEncoder/src/BC7CompressorSIMD.cpp @@ -991,9 +991,10 @@ namespace BC7C { for(int i = 0; i < width; i += 4) { - ExtractBlock(inBuf + i * 4, width, block); - CompressBC7Block(block, outBuf); - outBuf += 16; + CompressBC7Block((const uint32 *)inBuf, outBuf); + + outBuf += 16; + inBuf += 64; } } }