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

Method test_partition_count_limit

Test/astc_test_functional.py:1047–1067  ·  view source on GitHub ↗

Test partition count limit.

(self)

Source from the content-addressed store, hash-verified

1045 self.assertLess(rmse_test[ch_idx], rmse_base[ch_idx])
1046
1047 def test_partition_count_limit(self) -> None:
1048 '''
1049 Test partition count limit.
1050 '''
1051 input_path = Path('./Test/Images/Small/LDR-RGBA/ldr-rgba-00.png')
1052 image_dec = self.get_tmp_image_path('LDR', 'decomp')
1053
1054 # Compute the basic image without any channel weights
1055 cmd = [
1056 self.binary, '-tl',
1057 input_path, image_dec, '4x4', '-medium']
1058
1059 self.exec(cmd)
1060 rmse_ref = sum(self.get_channel_rmse(input_path, image_dec))
1061
1062 cmd += ['-partitioncountlimit', '1']
1063 self.exec(cmd)
1064 rmse_test = sum(self.get_channel_rmse(input_path, image_dec))
1065
1066 # RMSE should get worse (higher) if we reduce search space
1067 self.assertGreater(rmse_test, rmse_ref)
1068
1069 def test_2partition_index_limit(self) -> None:
1070 '''

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