summaryrefslogtreecommitdiff
path: root/lib/igt_frame.c
AgeCommit message (Collapse)Author
2019-02-26lib/igt_frame: Add a checkerboard frame comparison methodPaul Kocialkowski
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>
2017-09-08lib: clean up header includesDaniel Vetter
Just a bit of OCD, I like it when connections within library modules are a bit more obvious. igt.h is ok for tests, but let's use individual include lines for libraries consistently. Also order standard includes before igt ones. v2: Rebase. Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-08lib: prefix frame_dump_pathDaniel Vetter
Just a bit of ocd for anything non-static. Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-07-20lib/igt_frame: Add support for analog frame comparison testingPaul Kocialkowski
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 <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude <lyude@redhat.com>
2017-07-19Introduce common frame dumping configuration and helpersPaul Kocialkowski
This introduces a common FrameDumpPath configuration field, as well as helper functions in dedicated igt_frame for writing cairo surfaces to png files. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude <lyude@redhat.com>