MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / test_refinement_limit

Method test_refinement_limit

Test/astc_test_functional.py:1157–1176  ·  view source on GitHub ↗

Test refinement limit.

(self)

Source from the content-addressed store, hash-verified

1155 self.assertGreater(rmse_test, rmse_ref)
1156
1157 def test_refinement_limit(self) -> None:
1158 '''
1159 Test refinement limit.
1160 '''
1161 input_path = Path('./Test/Images/Small/LDR-RGBA/ldr-rgba-00.png')
1162 image_dec = self.get_tmp_image_path('LDR', 'decomp')
1163
1164 cmd = [
1165 self.binary, '-tl',
1166 input_path, image_dec, '4x4', '-medium']
1167
1168 self.exec(cmd)
1169 rmse_ref = sum(self.get_channel_rmse(input_path, image_dec))
1170
1171 cmd += ['-refinementlimit', '1']
1172 self.exec(cmd)
1173 rmse_test = sum(self.get_channel_rmse(input_path, image_dec))
1174
1175 # RMSE should get worse (higher) if we reduce search space
1176 self.assertGreater(rmse_test, rmse_ref)
1177
1178 def test_candidate_limit(self) -> None:
1179 '''

Callers

nothing calls this directly

Calls 3

execMethod · 0.95
get_channel_rmseMethod · 0.95
get_tmp_image_pathMethod · 0.80

Tested by

no test coverage detected