[cairo-commit] 2 commits - test/reference test/update-refs.sh
Bryce Harrington
bryce at kemper.freedesktop.org
Fri Oct 10 11:19:45 PDT 2014
test/reference/pixman-downscale-best-95.image.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.image16.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.pdf.ref.png |binary
test/reference/pixman-downscale-best-95.ps2.ref.png |binary
test/reference/pixman-downscale-best-95.ps3.ref.png |binary
test/reference/pixman-downscale-best-95.recording.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.ref.png |binary
test/reference/pixman-downscale-best-95.script.ref.png |binary
test/reference/pixman-downscale-best-95.svg11.ref.png |binary
test/reference/pixman-downscale-best-95.svg12.ref.png |binary
test/reference/pixman-downscale-best-95.test-base.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.test-fallback.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.test-mask.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.test-paginated.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.test-spans.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.test-traps.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.xcb-fallback.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.xcb-render-0_0.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.xcb-window&.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.xcb-window.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.xcb.ref.png |binary
test/reference/pixman-downscale-best-95.xlib-fallback.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.xlib-render-0_0.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.xlib-window.rgb24.ref.png |binary
test/reference/pixman-downscale-best-95.xlib.ref.png |binary
test/reference/pixman-downscale-bilinear-95.image16.rgb24.ref.png |binary
test/reference/pixman-downscale-bilinear-95.pdf.ref.png |binary
test/reference/pixman-downscale-bilinear-95.ps2.ref.png |binary
test/reference/pixman-downscale-bilinear-95.ps3.ref.png |binary
test/reference/pixman-downscale-bilinear-95.ref.png |binary
test/reference/pixman-downscale-bilinear-95.script.ref.png |binary
test/reference/pixman-downscale-fast-95.image16.rgb24.ref.png |binary
test/reference/pixman-downscale-fast-95.pdf.ref.png |binary
test/reference/pixman-downscale-fast-95.ps2.ref.png |binary
test/reference/pixman-downscale-fast-95.ps3.ref.png |binary
test/reference/pixman-downscale-fast-95.svg11.ref.png |binary
test/reference/pixman-downscale-fast-95.svg12.ref.png |binary
test/reference/pixman-downscale-good-95.image16.rgb24.ref.png |binary
test/reference/pixman-downscale-good-95.pdf.ref.png |binary
test/reference/pixman-downscale-good-95.ps2.ref.png |binary
test/reference/pixman-downscale-good-95.ps3.ref.png |binary
test/reference/pixman-downscale-good-95.ref.png |binary
test/reference/pixman-downscale-good-95.script.ref.png |binary
test/reference/pixman-downscale-nearest-95.image16.rgb24.ref.png |binary
test/reference/pixman-downscale-nearest-95.pdf.ref.png |binary
test/reference/pixman-downscale-nearest-95.ps2.ref.png |binary
test/reference/pixman-downscale-nearest-95.ps3.ref.png |binary
test/reference/pixman-downscale-nearest-95.svg11.ref.png |binary
test/reference/pixman-downscale-nearest-95.svg12.ref.png |binary
test/update-refs.sh | 84 ++++++++++
50 files changed, 84 insertions(+)
New commits:
commit 82cd66f8330da0521c29c003ef0a4bb773d6dbc6
Author: Bryce Harrington <bryce at osg.samsung.com>
Date: Thu Oct 9 17:55:09 2014 -0700
test: Update pixman downscaling 95 reference images
The pixman downscaling "95" tests attempt to rescale a 96x96 pixmap to
95x95. Ideally the borders between color areas should be sharp, but for
this use case we allow for 1 pixel of blur between the areas as
acceptable. The choice of what color to use for this blurred region is
not important, and in fact varies from backend to backend.
The old reference images were generated by Krzysztof KosiÅski's
downscaling algorithm. These new images are against the algorithms
written by Bill Spitzak.
Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
diff --git a/test/reference/pixman-downscale-best-95.image.rgb24.ref.png b/test/reference/pixman-downscale-best-95.image.rgb24.ref.png
new file mode 100644
index 0000000..5885c4b
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.image.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.image16.rgb24.ref.png b/test/reference/pixman-downscale-best-95.image16.rgb24.ref.png
new file mode 100644
index 0000000..3778399
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.image16.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.pdf.ref.png b/test/reference/pixman-downscale-best-95.pdf.ref.png
new file mode 100644
index 0000000..71b518e
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.pdf.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.ps2.ref.png b/test/reference/pixman-downscale-best-95.ps2.ref.png
new file mode 100644
index 0000000..08983dc
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.ps2.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.ps3.ref.png b/test/reference/pixman-downscale-best-95.ps3.ref.png
new file mode 100644
index 0000000..08983dc
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.ps3.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.recording.rgb24.ref.png b/test/reference/pixman-downscale-best-95.recording.rgb24.ref.png
new file mode 100644
index 0000000..5885c4b
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.recording.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.ref.png b/test/reference/pixman-downscale-best-95.ref.png
index 49011d5..1b98e8f 100644
Binary files a/test/reference/pixman-downscale-best-95.ref.png and b/test/reference/pixman-downscale-best-95.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.script.ref.png b/test/reference/pixman-downscale-best-95.script.ref.png
new file mode 100644
index 0000000..f3bd7ff
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.script.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.svg11.ref.png b/test/reference/pixman-downscale-best-95.svg11.ref.png
new file mode 100644
index 0000000..777f448
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.svg11.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.svg12.ref.png b/test/reference/pixman-downscale-best-95.svg12.ref.png
new file mode 100644
index 0000000..777f448
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.svg12.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.test-base.rgb24.ref.png b/test/reference/pixman-downscale-best-95.test-base.rgb24.ref.png
new file mode 100644
index 0000000..5885c4b
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.test-base.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.test-fallback.rgb24.ref.png b/test/reference/pixman-downscale-best-95.test-fallback.rgb24.ref.png
new file mode 100644
index 0000000..5885c4b
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.test-fallback.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.test-mask.rgb24.ref.png b/test/reference/pixman-downscale-best-95.test-mask.rgb24.ref.png
new file mode 100644
index 0000000..5885c4b
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.test-mask.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.test-paginated.rgb24.ref.png b/test/reference/pixman-downscale-best-95.test-paginated.rgb24.ref.png
new file mode 100644
index 0000000..5885c4b
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.test-paginated.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.test-spans.rgb24.ref.png b/test/reference/pixman-downscale-best-95.test-spans.rgb24.ref.png
new file mode 100644
index 0000000..5885c4b
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.test-spans.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.test-traps.rgb24.ref.png b/test/reference/pixman-downscale-best-95.test-traps.rgb24.ref.png
new file mode 100644
index 0000000..5885c4b
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.test-traps.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.xcb-fallback.rgb24.ref.png b/test/reference/pixman-downscale-best-95.xcb-fallback.rgb24.ref.png
new file mode 100644
index 0000000..5885c4b
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.xcb-fallback.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.xcb-render-0_0.rgb24.ref.png b/test/reference/pixman-downscale-best-95.xcb-render-0_0.rgb24.ref.png
new file mode 100644
index 0000000..5885c4b
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.xcb-render-0_0.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.xcb-window&.rgb24.ref.png b/test/reference/pixman-downscale-best-95.xcb-window&.rgb24.ref.png
new file mode 100644
index 0000000..777f448
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.xcb-window&.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.xcb-window.rgb24.ref.png b/test/reference/pixman-downscale-best-95.xcb-window.rgb24.ref.png
new file mode 100644
index 0000000..777f448
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.xcb-window.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.xcb.ref.png b/test/reference/pixman-downscale-best-95.xcb.ref.png
new file mode 100644
index 0000000..777f448
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.xcb.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.xlib-fallback.rgb24.ref.png b/test/reference/pixman-downscale-best-95.xlib-fallback.rgb24.ref.png
new file mode 100644
index 0000000..5885c4b
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.xlib-fallback.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.xlib-render-0_0.rgb24.ref.png b/test/reference/pixman-downscale-best-95.xlib-render-0_0.rgb24.ref.png
new file mode 100644
index 0000000..5885c4b
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.xlib-render-0_0.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.xlib-window.rgb24.ref.png b/test/reference/pixman-downscale-best-95.xlib-window.rgb24.ref.png
new file mode 100644
index 0000000..777f448
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.xlib-window.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-best-95.xlib.ref.png b/test/reference/pixman-downscale-best-95.xlib.ref.png
new file mode 100644
index 0000000..777f448
Binary files /dev/null and b/test/reference/pixman-downscale-best-95.xlib.ref.png differ
diff --git a/test/reference/pixman-downscale-bilinear-95.image16.rgb24.ref.png b/test/reference/pixman-downscale-bilinear-95.image16.rgb24.ref.png
new file mode 100644
index 0000000..9d67251
Binary files /dev/null and b/test/reference/pixman-downscale-bilinear-95.image16.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-bilinear-95.pdf.ref.png b/test/reference/pixman-downscale-bilinear-95.pdf.ref.png
new file mode 100644
index 0000000..71b518e
Binary files /dev/null and b/test/reference/pixman-downscale-bilinear-95.pdf.ref.png differ
diff --git a/test/reference/pixman-downscale-bilinear-95.ps2.ref.png b/test/reference/pixman-downscale-bilinear-95.ps2.ref.png
new file mode 100644
index 0000000..08983dc
Binary files /dev/null and b/test/reference/pixman-downscale-bilinear-95.ps2.ref.png differ
diff --git a/test/reference/pixman-downscale-bilinear-95.ps3.ref.png b/test/reference/pixman-downscale-bilinear-95.ps3.ref.png
new file mode 100644
index 0000000..08983dc
Binary files /dev/null and b/test/reference/pixman-downscale-bilinear-95.ps3.ref.png differ
diff --git a/test/reference/pixman-downscale-bilinear-95.ref.png b/test/reference/pixman-downscale-bilinear-95.ref.png
index 49011d5..777f448 100644
Binary files a/test/reference/pixman-downscale-bilinear-95.ref.png and b/test/reference/pixman-downscale-bilinear-95.ref.png differ
diff --git a/test/reference/pixman-downscale-bilinear-95.script.ref.png b/test/reference/pixman-downscale-bilinear-95.script.ref.png
new file mode 100644
index 0000000..fa4c04c
Binary files /dev/null and b/test/reference/pixman-downscale-bilinear-95.script.ref.png differ
diff --git a/test/reference/pixman-downscale-fast-95.image16.rgb24.ref.png b/test/reference/pixman-downscale-fast-95.image16.rgb24.ref.png
new file mode 100644
index 0000000..a2b6715
Binary files /dev/null and b/test/reference/pixman-downscale-fast-95.image16.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-fast-95.pdf.ref.png b/test/reference/pixman-downscale-fast-95.pdf.ref.png
new file mode 100644
index 0000000..71b518e
Binary files /dev/null and b/test/reference/pixman-downscale-fast-95.pdf.ref.png differ
diff --git a/test/reference/pixman-downscale-fast-95.ps2.ref.png b/test/reference/pixman-downscale-fast-95.ps2.ref.png
new file mode 100644
index 0000000..af93ae7
Binary files /dev/null and b/test/reference/pixman-downscale-fast-95.ps2.ref.png differ
diff --git a/test/reference/pixman-downscale-fast-95.ps3.ref.png b/test/reference/pixman-downscale-fast-95.ps3.ref.png
new file mode 100644
index 0000000..af93ae7
Binary files /dev/null and b/test/reference/pixman-downscale-fast-95.ps3.ref.png differ
diff --git a/test/reference/pixman-downscale-fast-95.svg11.ref.png b/test/reference/pixman-downscale-fast-95.svg11.ref.png
new file mode 100644
index 0000000..777f448
Binary files /dev/null and b/test/reference/pixman-downscale-fast-95.svg11.ref.png differ
diff --git a/test/reference/pixman-downscale-fast-95.svg12.ref.png b/test/reference/pixman-downscale-fast-95.svg12.ref.png
new file mode 100644
index 0000000..777f448
Binary files /dev/null and b/test/reference/pixman-downscale-fast-95.svg12.ref.png differ
diff --git a/test/reference/pixman-downscale-good-95.image16.rgb24.ref.png b/test/reference/pixman-downscale-good-95.image16.rgb24.ref.png
new file mode 100644
index 0000000..9d67251
Binary files /dev/null and b/test/reference/pixman-downscale-good-95.image16.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-good-95.pdf.ref.png b/test/reference/pixman-downscale-good-95.pdf.ref.png
new file mode 100644
index 0000000..71b518e
Binary files /dev/null and b/test/reference/pixman-downscale-good-95.pdf.ref.png differ
diff --git a/test/reference/pixman-downscale-good-95.ps2.ref.png b/test/reference/pixman-downscale-good-95.ps2.ref.png
new file mode 100644
index 0000000..08983dc
Binary files /dev/null and b/test/reference/pixman-downscale-good-95.ps2.ref.png differ
diff --git a/test/reference/pixman-downscale-good-95.ps3.ref.png b/test/reference/pixman-downscale-good-95.ps3.ref.png
new file mode 100644
index 0000000..08983dc
Binary files /dev/null and b/test/reference/pixman-downscale-good-95.ps3.ref.png differ
diff --git a/test/reference/pixman-downscale-good-95.ref.png b/test/reference/pixman-downscale-good-95.ref.png
index 49011d5..777f448 100644
Binary files a/test/reference/pixman-downscale-good-95.ref.png and b/test/reference/pixman-downscale-good-95.ref.png differ
diff --git a/test/reference/pixman-downscale-good-95.script.ref.png b/test/reference/pixman-downscale-good-95.script.ref.png
new file mode 100644
index 0000000..fa4c04c
Binary files /dev/null and b/test/reference/pixman-downscale-good-95.script.ref.png differ
diff --git a/test/reference/pixman-downscale-nearest-95.image16.rgb24.ref.png b/test/reference/pixman-downscale-nearest-95.image16.rgb24.ref.png
new file mode 100644
index 0000000..a2b6715
Binary files /dev/null and b/test/reference/pixman-downscale-nearest-95.image16.rgb24.ref.png differ
diff --git a/test/reference/pixman-downscale-nearest-95.pdf.ref.png b/test/reference/pixman-downscale-nearest-95.pdf.ref.png
new file mode 100644
index 0000000..71b518e
Binary files /dev/null and b/test/reference/pixman-downscale-nearest-95.pdf.ref.png differ
diff --git a/test/reference/pixman-downscale-nearest-95.ps2.ref.png b/test/reference/pixman-downscale-nearest-95.ps2.ref.png
new file mode 100644
index 0000000..af93ae7
Binary files /dev/null and b/test/reference/pixman-downscale-nearest-95.ps2.ref.png differ
diff --git a/test/reference/pixman-downscale-nearest-95.ps3.ref.png b/test/reference/pixman-downscale-nearest-95.ps3.ref.png
new file mode 100644
index 0000000..af93ae7
Binary files /dev/null and b/test/reference/pixman-downscale-nearest-95.ps3.ref.png differ
diff --git a/test/reference/pixman-downscale-nearest-95.svg11.ref.png b/test/reference/pixman-downscale-nearest-95.svg11.ref.png
new file mode 100644
index 0000000..777f448
Binary files /dev/null and b/test/reference/pixman-downscale-nearest-95.svg11.ref.png differ
diff --git a/test/reference/pixman-downscale-nearest-95.svg12.ref.png b/test/reference/pixman-downscale-nearest-95.svg12.ref.png
new file mode 100644
index 0000000..777f448
Binary files /dev/null and b/test/reference/pixman-downscale-nearest-95.svg12.ref.png differ
commit 79b5a35f8387845a2fe46215776082a8abc3caba
Author: Bryce Harrington <bryce at osg.samsung.com>
Date: Thu Oct 9 17:47:10 2014 -0700
test: Add an update-refs.sh script to update reference images
There are cases where the rendered output of a test can vary from
backend to backend in ways which are visually acceptable. This is why
we have reference images in the first place. In these cases, changes to
the rendering logic can result in slight differences in the output that
is also within acceptable visual limits.
We see this in the pixman downscaling tests. This script is introduced
as a way to more easily update the reference images after a renderer
change.
This script is intended to be expanded to handle updating of references
for other tests as we identify similar issues. The intent is that this
script then serves as a way to document these exceptional cases.
Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
diff --git a/test/update-refs.sh b/test/update-refs.sh
new file mode 100755
index 0000000..104eeb8
--- /dev/null
+++ b/test/update-refs.sh
@@ -0,0 +1,84 @@
+#!/bin/bash
+
+# This script can be used to update the reference images using certain
+# test results as a baseline.
+#
+# Our test suite expects nearly pixel-perfection, but in some cases we
+# give the renderer some flexibility and so these cases will show up as
+# test failures. So, this script can be used to do a visual check and
+# if they "look" ok, to go ahead and update the reference image by
+# copying the test output.
+#
+# NOTE: When adding to this file, make sure to thoroughly document the
+# rationale when and why the existing reference images can be updated
+# from regular test output, such that people other than you can
+# intelligently keep the test reference images updated.
+
+if [ ! -d output ] || [ ! -d reference ]; then
+ echo "This script must be run in cairo's test directory after the full testsuite has been run."
+ exit
+fi
+
+PDIFF="./pdiff/perceptualdiff"
+
+# Returns 1 if images are different, 0 if they're essentially identical
+images_differ() {
+ # Check if bytewise identical
+ if cmp --silent "${1}" "${2}"; then
+ # Images are identical
+ return 0
+ fi
+
+ # Run perceptualdiff with minimum threshold
+ pdiff_output=$($PDIFF "${1}" "${2}" -threshold 1)
+ result=${pdiff_output%:*}
+ notes=$(echo "${pdiff_output#*: }" | tail -n 1)
+ if [ "$result" = "PASS" ] && [ "$notes" = "Images are binary identical" ]; then
+ return 0
+ fi
+
+ return 1
+}
+
+# ----------------------------------------------------------------------
+# pixman-downscale images
+#
+# The *-95 tests check rendering at a difficult to downsize dimension.
+# The border pixels between different colored areas can be blurred in
+# different ways resulting in some color variation that is acceptable
+# but throws off the testsuite. So a visual check is sufficient to
+# verify the results aren't crazily off.
+
+# Use the ARGB32 format of the image file as the main reference
+for file in $(ls ./output/pixman-downscale-*-95.image.argb32.out.png); do
+ dest=$(basename ${file/.image.argb32.out./.ref.})
+ echo "$file -> ./reference/${dest}"
+ cp $file ./reference/${dest}
+done
+echo
+
+# If the ARGB32 format of a given backend's file differs from the main reference,
+# then use it as the backend reference
+for file in $(ls ./output/pixman-downscale-*-95.*.argb32.out.png); do
+ ref=$(basename ${file/-95.*.argb32.out.png/-95.ref.png})
+ if ! images_differ "./reference/${ref}" "${file}"; then
+ dest=$(basename ${file/.argb32.out.png/.ref.png})
+ echo "${file} -> ./reference/${dest}"
+ cp ${file} ./reference/${dest}
+ fi
+done
+echo
+
+# If the RGB24 format differs from existing ref image, then use it as a ref.
+for file in $(ls ./output/pixman-downscale-*-95.*.rgb24.out.png); do
+ ref=$(basename ${file/.rgb24.out.png/.ref.png})
+ if [ ! -e "./reference/${ref}" ]; then
+ ref=$(basename ${file/-95.*.rgb24.out.png/-95.ref.png})
+ fi
+
+ if ! images_differ "./reference/${ref}" "${file}"; then
+ dest=$(basename ${file/.rgb24.out.png/.rgb24.ref.png})
+ echo "${file} -> ./reference/${dest}"
+ cp ${file} ./reference/${dest}
+ fi
+done
More information about the cairo-commit
mailing list