diff --git a/Etc2Compress/Etc2Compress.cpp b/Etc2Compress/Etc2Compress.cpp index f8646f8..6db63a2 100644 --- a/Etc2Compress/Etc2Compress.cpp +++ b/Etc2Compress/Etc2Compress.cpp @@ -6994,11 +6994,13 @@ static __m128i PackTexture(uint8_t* dst_etc1, uint8_t* src_bgra, int src_w, int if ((mode == PackMode::CompressAlphaEnhanced) || (mode == PackMode::CompressColorEnhanced)) { - int n = (src_h * src_w) >> 4; + int pixels = src_h * src_w; int span = Max((int)std::chrono::duration_cast(finish - start).count(), 1); - printf(" Compressed %d blocks, elapsed %i ms, %i bps\n", n, span, (int)(n * 1000LL / span)); + int kpx_s = pixels / span; + + printf(" Compressed %d blocks, elapsed %i ms, throughput %d.%03d Mpx/s\n", pixels >> 4, span, kpx_s / 1000, kpx_s % 1000); } return _mm_unpacklo_epi64(_mm_cvtsi64_si128(mse), _mm_castpd_si128(_mm_load_sd(&ssim))); diff --git a/EtcCompress/EtcCompress.cpp b/EtcCompress/EtcCompress.cpp index c78b2db..45424c3 100644 --- a/EtcCompress/EtcCompress.cpp +++ b/EtcCompress/EtcCompress.cpp @@ -3915,11 +3915,13 @@ static __m128i PackTexture(uint8_t* dst_etc1, uint8_t* src_bgra, int src_w, int if ((mode == PackMode::CompressAlpha) || (mode == PackMode::CompressColor)) { - int n = (src_h * src_w) >> 4; + int pixels = src_h * src_w; int span = Max((int)std::chrono::duration_cast(finish - start).count(), 1); - printf("Compressed %d blocks, elapsed %i ms, %i bps\n", n, span, (int)(n * 1000LL / span)); + int kpx_s = pixels / span; + + printf("Compressed %d blocks, elapsed %i ms, throughput %d.%03d Mpx/s\n", pixels >> 4, span, kpx_s / 1000, kpx_s % 1000); } return _mm_unpacklo_epi64(_mm_cvtsi64_si128(mse), _mm_castpd_si128(_mm_load_sd(&ssim))); diff --git a/PvrtcCompress/PvrtcCompress.cpp b/PvrtcCompress/PvrtcCompress.cpp index 37a7424..5d0bc4f 100644 --- a/PvrtcCompress/PvrtcCompress.cpp +++ b/PvrtcCompress/PvrtcCompress.cpp @@ -4525,13 +4525,15 @@ static void PackTexture(const char* name, int Size, uint8_t* dst_bgra, const cha if (mse > 0) { - int n = (src_s * src_s) >> 4; + int pixels = src_s * src_s; - printf(" Texture %s = %f, elapsed %i ms, %i bps\n", + int kpx_s = pixels / span; + + printf(" Texture %s = %f, elapsed %i ms, throughput %d.%03d Mpx/s\n", psnr, 10.0 * log((255.0 * 255.0) * kColor * (src_s * src_s) / mse) / log(10.0), span, - (int)(n * 1000LL / span)); + kpx_s / 1000, kpx_s % 1000); } else {