mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-22 22:13:46 +00:00
Add some extra PVRTC debugging
This commit is contained in:
parent
a7a389b41c
commit
267a959f75
1 changed files with 24 additions and 1 deletions
|
@ -465,9 +465,11 @@ namespace PVRTCC {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static void DilateImage(CompressionLabel *labels, uint32 w, uint32 h) {
|
static void DilateImage(CompressionLabel *labels, const uint8 *inBuf, uint32 w, uint32 h) {
|
||||||
for(uint32 j = 0; j < h; j++)
|
for(uint32 j = 0; j < h; j++)
|
||||||
for(uint32 i = 0; i < w; i++) {
|
for(uint32 i = 0; i < w; i++) {
|
||||||
|
ComputeLocalExtrema(labels, inBuf, i, j, w, h);
|
||||||
|
|
||||||
uint32 idx = j*w + i;
|
uint32 idx = j*w + i;
|
||||||
|
|
||||||
uint32 minLowDist = labels[idx].lowLabel.distance == 0? 5 : labels[idx].lowLabel.distance - 1;
|
uint32 minLowDist = labels[idx].lowLabel.distance == 0? 5 : labels[idx].lowLabel.distance - 1;
|
||||||
|
@ -963,6 +965,27 @@ namespace PVRTCC {
|
||||||
|
|
||||||
DebugOutputImage("HighImg", labels, width, height, HighPixel);
|
DebugOutputImage("HighImg", labels, width, height, HighPixel);
|
||||||
DebugOutputImage("LowImg", labels, width, height, LowPixel);
|
DebugOutputImage("LowImg", labels, width, height, LowPixel);
|
||||||
|
|
||||||
|
Image outputHigh(width, height);
|
||||||
|
Image outputLow(width, height);
|
||||||
|
for(uint32 j = 0; j < height; j++)
|
||||||
|
for(uint32 i = 0; i < width; i++) {
|
||||||
|
uint32 idx = j*width + i;
|
||||||
|
if(labels[idx].highLabel.distance == 1) {
|
||||||
|
outputHigh(i, j).Unpack(gDbgPixels[idx]);
|
||||||
|
} else {
|
||||||
|
outputHigh(i, j).Unpack(0xFF000000U);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(labels[idx].lowLabel.distance == 1) {
|
||||||
|
outputLow(i, j).Unpack(gDbgPixels[idx]);
|
||||||
|
} else {
|
||||||
|
outputLow(i, j).Unpack(0xFF000000U);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
outputHigh.DebugOutput("HighPixels");
|
||||||
|
outputLow.DebugOutput("LowPixels");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Then combine everything...
|
// Then combine everything...
|
||||||
|
|
Loading…
Reference in a new issue