diff options
author | Paul Kocialkowski <paul.kocialkowski@bootlin.com> | 2019-01-10 09:29:45 +0100 |
---|---|---|
committer | Paul Kocialkowski <paul.kocialkowski@bootlin.com> | 2019-02-26 09:45:54 +0100 |
commit | c7f27710a63541b73fe72b579afc7250f87fdd89 (patch) | |
tree | f12e8e735e383ad7f2a008556645cdf1720272f0 /lib/igt_frame.h | |
parent | cc28478682e35ced5cf45e9ef2ea8edd1d7cccb9 (diff) |
lib/igt_frame: Add a checkerboard frame comparison method
This introduces a new frame comparison method that was designed for
patterns that follow a checkerboard style. These patterns are made of
consecutive rectangular shapes with alternating solid colors. They are
currently used for some Chamelium-based tests.
The method is particularly adapted for cases where the edges of the
shapes might be blurred (e.g. due to scaling), which makes it impossible
to use pixel-perfect or CRC-based comparisons to decide whether the
captured frame matches the reference.
Overall, this test will first detect the edges of the pattern and later
exclude them from comparison. Colors are compared between the reference
and capture with a low threshold for error. A percentage of the faulty
pixels is calculated and the captured frame is considered invalid if
more than one percent of the pixels are erroneous.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
Diffstat (limited to 'lib/igt_frame.h')
-rw-r--r-- | lib/igt_frame.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/igt_frame.h b/lib/igt_frame.h index 11f96cbe..f44f57d7 100644 --- a/lib/igt_frame.h +++ b/lib/igt_frame.h @@ -38,5 +38,7 @@ void igt_write_compared_frames_to_png(cairo_surface_t *reference, const char *capture_suffix); bool igt_check_analog_frame_match(cairo_surface_t *reference, cairo_surface_t *capture); +bool igt_check_checkerboard_frame_match(cairo_surface_t *reference, + cairo_surface_t *capture); #endif |