Skip to content

Commit b0f655e

Browse files
committed
fix(compare_Yee): Access correct channel in GaussianPyramid
The GaussianPyramid::value() function was accessing channel 1 instead of channel 0 when reading luminance values. Since the luminance image (aLum/bLum) is a single-channel image extracted from the Y component of XYZ, we need to access channel 0. This bug caused compare_Yee to always read zeros from the pyramid, making it unable to detect any differences between images, including when images have different dimensions. Fixes #4948 Signed-off-by: pmady <[email protected]>
1 parent fd5ac81 commit b0f655e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libOpenImageIO/imagebufalgo_yee.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class GaussianPyramid {
5252
if (lev >= PYRAMID_MAX_LEVELS)
5353
return 0.0f;
5454
else
55-
return level[lev].getchannel(x, y, 0, 1);
55+
return level[lev].getchannel(x, y, 0, 0);
5656
}
5757

5858
#if 0 /* unused */
@@ -65,7 +65,7 @@ class GaussianPyramid {
6565
float operator()(int x, int y, int lev) const
6666
{
6767
OIIO_DASSERT(lev < PYRAMID_MAX_LEVELS);
68-
return level[lev].getchannel(x, y, 0, 1);
68+
return level[lev].getchannel(x, y, 0, 0);
6969
}
7070
#endif
7171

0 commit comments

Comments
 (0)