From 8cf32fe06c8f54bca11c485ccc1cc3899f9d81db Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Thu, 20 Jul 2017 18:13:36 +0300 Subject: lib/igt_frame: Add support for analog frame comparison testing This adds support for analog frame comparison check, as used in VGA. Since VGA uses a DAC-ADC chain, its data cannot be expected to be pixel perfect. Thus, it is impossible to uses a CRC check and full frames have to be analyzed instead. Such an analysis is implemented, based on both an absolute error threshold and a correlation with the expected error trend for a DAC-ADC chain. It was tested with a couple encoders and provides reliable error detection with few false positives. Signed-off-by: Paul Kocialkowski Reviewed-by: Lyude --- lib/igt_frame.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/igt_frame.h') diff --git a/lib/igt_frame.h b/lib/igt_frame.h index ec6a1643..1d9bbf6a 100644 --- a/lib/igt_frame.h +++ b/lib/igt_frame.h @@ -39,5 +39,7 @@ void igt_write_compared_frames_to_png(cairo_surface_t *reference, cairo_surface_t *capture, const char *reference_suffix, const char *capture_suffix); +bool igt_check_analog_frame_match(cairo_surface_t *reference, + cairo_surface_t *capture); #endif -- cgit v1.2.3