• Paul Kocialkowski's avatar
    lib/igt_frame: Add a checkerboard frame comparison method · c7f27710
    Paul Kocialkowski authored
    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's avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
    Reviewed-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>
    Reviewed-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
igt_frame.h 1.7 KB