MCPcopy Create free account
hub / github.com/GPUOpen-Tools/compressonator / ShowResults1

Function ShowResults1

examples/core_example1/coreexample.cpp:60–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58char shape_2s[16] = {-120, -18, 14, -120, 14, 14, -120, 14, 14, 14, -18, -18, 115, 14, 14, -120};
59
60void ShowResults1(char* testcodec, unsigned char src_1[16], unsigned char decomp_1[])
61{
62 std::printf("\n[%s]\n", testcodec);
63 // show the first row of pixels
64 std::printf("original : (%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d)\n",
65 src_1[0],
66 src_1[1],
67 src_1[2],
68 src_1[3],
69 src_1[4],
70 src_1[5],
71 src_1[6],
72 src_1[7],
73 src_1[8],
74 src_1[9],
75 src_1[10],
76 src_1[11],
77 src_1[12],
78 src_1[13],
79 src_1[14],
80 src_1[15]);
81
82 std::printf("decompress : (%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d,%3d)\n",
83 decomp_1[0],
84 decomp_1[1],
85 decomp_1[2],
86 decomp_1[3],
87 decomp_1[4],
88 decomp_1[5],
89 decomp_1[6],
90 decomp_1[7],
91 decomp_1[8],
92 decomp_1[9],
93 decomp_1[10],
94 decomp_1[11],
95 decomp_1[12],
96 decomp_1[13],
97 decomp_1[14],
98 decomp_1[15]);
99
100 // Calculate a sum of image diffs:to see how well the codec compressed
101 int diffSum = 0;
102 for (int i = 0; i < 16; i++)
103 {
104 diffSum += abs(src_1[i] - decomp_1[i]);
105 }
106 std::printf("Data Diff Sum = %d\n", diffSum);
107}
108
109void ShowResults1s(char* testcodec, char src_1[], char decomp_1[])
110{

Callers 1

mainFunction · 0.85

Calls 1

absFunction · 0.85

Tested by

no test coverage detected