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

Method get_psnr_pattern

Test/testlib/encoder.py:170–185  ·  view source on GitHub ↗

Get the regex pattern to match the image quality metric. Note that, although this function is called PSNR, for some images we may choose to match another metric (e.g. mPSNR for HDR images). Args: image: The test image that was compressed. Retur

(self, image: TestImage)

Source from the content-addressed store, hash-verified

168 return (psnr, total_time, coding_time, coding_rate)
169
170 def get_psnr_pattern(self, image: TestImage) -> re.Pattern:
171 '''
172 Get the regex pattern to match the image quality metric.
173
174 Note that, although this function is called PSNR, for some images we
175 may choose to match another metric (e.g. mPSNR for HDR images).
176
177 Args:
178 image: The test image that was compressed.
179
180 Return:
181 The regex pattern.
182 '''
183 # pylint: disable=unused-argument,redundant-returns-doc
184 assert False, 'Missing subclass implementation'
185 return re.compile('^(?!x)x$')
186
187 def get_total_time_pattern(self) -> re.Pattern:
188 '''

Callers 1

parse_outputMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected