Skip to content

Commit

Permalink
Update the examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Evstyukhin committed Jan 31, 2021
1 parent 0f3e115 commit 2536f59
Showing 1 changed file with 65 additions and 21 deletions.
86 changes: 65 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,38 +44,82 @@ The kDenoise and kDenoiseStep constants in Bc7Mode.h define RDO capabilities:

The constants kAlpha, kGreen, kRed, kBlue set weights for channels and depend on the nature of the data.

## Example
## Examples

Recompressing "BC7Ltest.png" (gained from https://code.google.com/archive/p/nvidia-texture-tools/downloads bc7_export.zip) on i7-6700 CPU:
Let's try the soup from https://cbloomrants.blogspot.com/2020/06/oodle-texture-sample-run.html on an i7-7800X CPU with AVX-512 enabled:

Bc7Compress.exe /nomask /noflip BC7Ltest.png output.ktx /debug output.png
Loaded BC7Ltest.png
A precise compression with kDenoise = 0, kDenoiseStep = 0

Bc7Compress.exe /nomask /noflip mysoup1024.png mysoup1024-precise.ktx /debug mysoup1024-precise.png
Image 1024x1024, Texture 1024x1024
Compressed 65536 blocks, elapsed 1396 ms, throughput 0.751 Mpx/s
Whole A
SubTexture RGB qMSE = 1.6, qPSNR = 46.144434, wSSIM_4x4 = 0.99468383

dssim-1.13.exe mysoup1024.png mysoup1024-precise.png
0.00011307 mysoup1024-precise.png

mysoup1024-precise.7z 973 652

Standard BC7 modes separated by error stepping kDenoise = 1, kDenoiseStep = 3 \* 3:

Bc7Compress.exe /nomask /noflip mysoup1024.png mysoup1024-stepping.ktx /debug mysoup1024-stepping.png
Image 1024x1024, Texture 1024x1024
Compressed 65536 blocks, elapsed 380 ms, throughput 2.759 Mpx/s
Whole A
SubTexture RGB qMSE = 1.6, qPSNR = 46.097026, wSSIM_4x4 = 0.99034363

dssim-1.13.exe mysoup1024.png mysoup1024-stepping.png
0.00023433 mysoup1024-stepping.png

mysoup1024-stepping.7z 840 465

Using additional RDO Mode6Index2 (Bc7Core.cpp, Mode6Index2::CompressBlockFast(input)):

Bc7Compress.exe /nomask /noflip mysoup1024.png mysoup1024-mode6index2.ktx /debug mysoup1024-mode6index2.png
Image 1024x1024, Texture 1024x1024
Compressed 65536 blocks, elapsed 386 ms, throughput 2.716 Mpx/s
Whole A
SubTexture RGB qMSE = 2.1, qPSNR = 44.949510, wSSIM_4x4 = 0.98476649

dssim-1.13.exe mysoup1024.png mysoup1024-mode6index2.png
0.00045838 mysoup1024-mode6index2.png

mysoup1024-mode6index2.7z 651 851

Then check all modes with BC7Ltest.png from https://code.google.com/archive/p/nvidia-texture-tools/downloads bc7_export.zip:

Bc7Compress.exe /nomask /noflip BC7Ltest.png BC7Ltest.ktx /debug output.png
Image 152x152, Texture 152x152
Compressed 1444 blocks, elapsed 11 ms, throughput 2.100 Mpx/s
SubTexture A qMSE = 0.0, qPSNR = 69.026097, SSIM_4x4 = 0.99997870
SubTexture RGB qMSE = 0.6, qPSNR = 50.685068, wSSIM_4x4 = 0.99964057
Saved output.ktx
Saved output.png
Compressed 1444 blocks, elapsed 24 ms, throughput 0.962 Mpx/s
SubTexture A qMSE = 0.0, qPSNR = 69.026097, SSIM_4x4 = 0.99997865
SubTexture RGB qMSE = 0.6, qPSNR = 50.687018, wSSIM_4x4 = 0.99964438

dssim-1.13.exe BC7Ltest.png output.png
0.00003303 output.png

Compressing "frymire.png" (gained from https://github.com/castano/nvidia-texture-tools/blob/master/data/testsuite/waterloo/frymire.png):
And finally compress an interesting image https://github.com/castano/image-datasets/blob/master/waterloo/frymire.png:

Bc7Compress.exe /nomask /noflip frymire.png frymire.ktx
Loaded frymire.png
Bc7Compress.exe /nomask /noflip frymire.png frymire.ktx /debug output.png
Image 1118x1105, Texture 1120x1108
Compressed 77560 blocks, elapsed 77 ms, throughput 16.116 Mpx/s
Compressed 77560 blocks, elapsed 73 ms, throughput 16.999 Mpx/s
Whole A
SubTexture RGB qMSE = 0.5, qPSNR = 50.950326, wSSIM_4x4 = 0.97143024
Saved frymire.ktx
SubTexture RGB qMSE = 0.6, qPSNR = 50.594453, wSSIM_4x4 = 0.97119160

frymire.7z 313 550

Compressing "8192.png" (gained from removed https://bitbucket.org/wolfpld/etcpak/downloads/8192.png) in development mode:
For non-production purposes we can apply a "draft" mode on earlily saved https://bitbucket.org/wolfpld/etcpak/downloads/8192.png:

Bc7Compress.exe /draft /nomask /noflip 8192.png 8192.ktx
Loaded 8192.png
Bc7Compress.exe /draft /nomask /noflip 8192.png 8192.ktx /debug output.png
Image 8192x8192, Texture 8192x8192
Compressed 4194304 blocks, elapsed 529 ms, throughput 126.859 Mpx/s
Compressed 4194304 blocks, elapsed 295 ms, throughput 227.487 Mpx/s
Whole A
SubTexture RGB qMSE = 0.1, qPSNR = 56.778563, wSSIM_4x4 = 0.99534311
Saved 8192.ktx
SubTexture RGB qMSE = 0.9, qPSNR = 48.734921, wSSIM_4x4 = 0.98443459

dssim-1.13.exe 8192.png output.png
0.00085877 output.png

8192.7z 31 309 975

## Copyright

Expand Down

0 comments on commit 2536f59

Please sign in to comment.