Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/libOpenImageIO/imagebufalgo_yee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class GaussianPyramid {
if (lev >= PYRAMID_MAX_LEVELS)
return 0.0f;
else
return level[lev].getchannel(x, y, 0, 1);
return level[lev].getchannel(x, y, 0, 0);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was this all along? Weird. Why did this ever work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"It 'worked' in the sense that it didn't crash - getchannel() likely returns 0 for out-of-bounds channels. Since both pyramids returned the same incorrect value (0), the computed differences were always 0, making images appear identical. This explains why perceptual comparison was passing for clearly different images in #4948."

}

#if 0 /* unused */
Expand All @@ -65,7 +65,7 @@ class GaussianPyramid {
float operator()(int x, int y, int lev) const
{
OIIO_DASSERT(lev < PYRAMID_MAX_LEVELS);
return level[lev].getchannel(x, y, 0, 1);
return level[lev].getchannel(x, y, 0, 0);
}
#endif

Expand Down
6 changes: 3 additions & 3 deletions testsuite/diff/ref/out-fmt6.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Computing diff of "img1.exr" vs "img2.exr"
121 pixels (2.95%) over 1e-06
FAILURE
Computing perceptual diff of "img1.exr" vs "img2.exr"
Max error = 1.0 @ (5, 17, R) values are 0.1, 0.1, 0.1 vs 0.1, 0.6, 0.1
Max error = 10.0 @ (5, 17, R) values are 0.1, 0.1, 0.1 vs 0.1, 0.6, 0.1
121 pixels (2.95%) failed the perceptual test
FAILURE
Computing perceptual diff of "img1.exr" vs "img1.exr"
Expand All @@ -26,7 +26,7 @@ Comparing "img1.exr" and "img2.exr"
Mean error = 0
RMS error = 0
Peak SNR = 0
Max error = 1 @ (5, 17, R) values are 0.1, 0.1, 0.1 vs 0.1, 0.6, 0.1
Max error = 10 @ (5, 17, R) values are 0.1, 0.1, 0.1 vs 0.1, 0.6, 0.1
0 pixels (0%) over 0.008
121 pixels (2.95%) over 0.004
121 pixels (2.9541%) failed the perceptual test
Expand All @@ -38,7 +38,7 @@ Comparing "img1.exr" and "img2.exr"
Mean error = 0
RMS error = 0
Peak SNR = 0
Max error = 1 @ (5, 17, R) values are 0.1, 0.1, 0.1 vs 0.1, 0.6, 0.1
Max error = 10 @ (5, 17, R) values are 0.1, 0.1, 0.1 vs 0.1, 0.6, 0.1
0 pixels (0%) over 0.008
121 pixels (2.95%) over 1.0
121 pixels (2.9541%) failed the perceptual test
Expand Down
6 changes: 3 additions & 3 deletions testsuite/diff/ref/out.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Computing diff of "img1.exr" vs "img2.exr"
121 pixels (2.95%) over 1e-06
FAILURE
Computing perceptual diff of "img1.exr" vs "img2.exr"
Max error = 1 @ (5, 17, R) values are 0.1, 0.1, 0.1 vs 0.1, 0.6, 0.1
Max error = 10 @ (5, 17, R) values are 0.1, 0.1, 0.1 vs 0.1, 0.6, 0.1
121 pixels (2.95%) failed the perceptual test
FAILURE
Computing perceptual diff of "img1.exr" vs "img1.exr"
Expand All @@ -26,7 +26,7 @@ Comparing "img1.exr" and "img2.exr"
Mean error = 0
RMS error = 0
Peak SNR = 0
Max error = 1 @ (5, 17, R) values are 0.1, 0.1, 0.1 vs 0.1, 0.6, 0.1
Max error = 10 @ (5, 17, R) values are 0.1, 0.1, 0.1 vs 0.1, 0.6, 0.1
0 pixels (0%) over 0.008
121 pixels (2.95%) over 0.004
121 pixels (2.9541%) failed the perceptual test
Expand All @@ -38,7 +38,7 @@ Comparing "img1.exr" and "img2.exr"
Mean error = 0
RMS error = 0
Peak SNR = 0
Max error = 1 @ (5, 17, R) values are 0.1, 0.1, 0.1 vs 0.1, 0.6, 0.1
Max error = 10 @ (5, 17, R) values are 0.1, 0.1, 0.1 vs 0.1, 0.6, 0.1
0 pixels (0%) over 0.008
121 pixels (2.95%) over 1
121 pixels (2.9541%) failed the perceptual test
Expand Down
Loading