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

Method test_db_cutoff_limit

Test/astc_test_functional.py:1199–1219  ·  view source on GitHub ↗

Test db cutoff limit.

(self)

Source from the content-addressed store, hash-verified

1197 self.assertGreater(rmse_test, rmse_ref)
1198
1199 def test_db_cutoff_limit(self) -> None:
1200 '''
1201 Test db cutoff limit.
1202 '''
1203 input_path = Path('./Test/Images/Small/LDR-RGBA/ldr-rgba-00.png')
1204 image_dec = self.get_tmp_image_path('LDR', 'decomp')
1205
1206 # Compute the basic image without any channel weights
1207 cmd = [
1208 self.binary, '-tl',
1209 input_path, image_dec, '4x4', '-medium']
1210
1211 self.exec(cmd)
1212 rmse_ref = sum(self.get_channel_rmse(input_path, image_dec))
1213
1214 cmd += ['-dblimit', '10']
1215 self.exec(cmd)
1216 rmse_test = sum(self.get_channel_rmse(input_path, image_dec))
1217
1218 # RMSE should get worse (higher) if we reduce cutoff quality
1219 self.assertGreater(rmse_test, rmse_ref)
1220
1221 def test_2partition_early_limit(self) -> None:
1222 '''

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