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

Method get_psnr_pattern

Test/testlib/encoder.py:335–345  ·  view source on GitHub ↗
(self, image: TestImage)

Source from the content-addressed store, hash-verified

333 return command
334
335 def get_psnr_pattern(self, image: TestImage) -> re.Pattern:
336 # HDR profile
337 if image.color_profile == 'hdr':
338 pattern_psnr = r'\s*mPSNR \(RGB\)(?: \[.*?\] )?:\s*([0-9.]*) dB.*'
339 # LDR profile color formats
340 elif image.color_format == 'rgba':
341 pattern_psnr = r'\s*PSNR \(LDR-RGBA\):\s*([0-9.]*) dB'
342 else:
343 pattern_psnr = r'\s*PSNR \(LDR-RGB\):\s*([0-9.]*) dB'
344
345 return re.compile(pattern_psnr)
346
347 def get_total_time_pattern(self) -> re.Pattern:
348 return re.compile(r'\s*Total time:\s*([0-9.]*) s')

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected