Test partition count limit.
(self)
| 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 | ''' |
nothing calls this directly
no test coverage detected