-
Notifications
You must be signed in to change notification settings - Fork 612
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testing/api: Add test for filter values and 'filter_list' query (#4140)
Add testsuite/filters that verifies that the filter shapes are correct and don't change if we make future changes to the filter code. Along the way, add a new global getattribute query 'filter_list', that returns a semicolon-separated list of all the 2D filters it knows about. --------- Signed-off-by: Larry Gritz <lg@larrygritz.com>
- Loading branch information
Showing
23 changed files
with
79 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Comparing "box.exr" and "ref/box.exr" | ||
PASS | ||
Comparing "triangle.exr" and "ref/triangle.exr" | ||
PASS | ||
Comparing "gaussian.exr" and "ref/gaussian.exr" | ||
PASS | ||
Comparing "sharp-gaussian.exr" and "ref/sharp-gaussian.exr" | ||
PASS | ||
Comparing "catmull-rom.exr" and "ref/catmull-rom.exr" | ||
PASS | ||
Comparing "blackman-harris.exr" and "ref/blackman-harris.exr" | ||
PASS | ||
Comparing "sinc.exr" and "ref/sinc.exr" | ||
PASS | ||
Comparing "lanczos3.exr" and "ref/lanczos3.exr" | ||
PASS | ||
Comparing "radial-lanczos3.exr" and "ref/radial-lanczos3.exr" | ||
PASS | ||
Comparing "nuke-lanczos6.exr" and "ref/nuke-lanczos6.exr" | ||
PASS | ||
Comparing "mitchell.exr" and "ref/mitchell.exr" | ||
PASS | ||
Comparing "bspline.exr" and "ref/bspline.exr" | ||
PASS | ||
Comparing "disk.exr" and "ref/disk.exr" | ||
PASS | ||
Comparing "cubic.exr" and "ref/cubic.exr" | ||
PASS | ||
Comparing "keys.exr" and "ref/keys.exr" | ||
PASS | ||
Comparing "simon.exr" and "ref/simon.exr" | ||
PASS | ||
Comparing "rifman.exr" and "ref/rifman.exr" | ||
PASS |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env python | ||
|
||
# Copyright Contributors to the OpenImageIO project. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# https://github.com/AcademySoftwareFoundation/OpenImageIO | ||
|
||
# Test the filters | ||
|
||
import OpenImageIO as oiio | ||
|
||
filters = oiio.get_string_attribute("filter_list").split(";") | ||
print ("all filters: ", filters) | ||
i = 0 | ||
outputs = [ ] | ||
|
||
delta = oiio.ImageBuf(oiio.ImageSpec(16, 16, 1, "float")) | ||
oiio.ImageBufAlgo.render_point(delta, 8, 8) | ||
|
||
for f in filters: | ||
buf = oiio.ImageBufAlgo.resize(delta, f, roi=oiio.ROI(0, 80, 0, 80, 0, 1)) | ||
# Make a marker different for each filter so they dont compare against | ||
# each other | ||
oiio.ImageBufAlgo.render_point(buf, i, 0) | ||
i += 1 | ||
buf.write("{}.exr".format(f), "half") | ||
outputs += [ "{}.exr".format(f) ] | ||
|
||
outputs += [ "out.txt" ] |