Skip to content

Commit 04076c1

Browse files
author
sekrit-twc
committed
colorspace: fix gamut processing
1 parent 8bd5053 commit 04076c1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/zimg/colorspace/operation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ std::unique_ptr<Operation> create_linear_to_gamma_operation(TransferCharacterist
4343

4444
std::unique_ptr<Operation> create_gamut_operation(ColorPrimaries primaries_in, ColorPrimaries primaries_out, CPUClass cpu)
4545
{
46-
return create_matrix_operation(gamut_rgb_to_xyz_matrix(primaries_in) * gamut_xyz_to_rgb_matrix(primaries_out), cpu);
46+
return create_matrix_operation(gamut_xyz_to_rgb_matrix(primaries_out) * gamut_rgb_to_xyz_matrix(primaries_in), cpu);
4747
}
4848

4949
} // namespace colorspace

test/colorspace/colorspace_test.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ TEST(ColorspaceConversionTest, test_matrix_transfer_primaries)
9393

9494
const char *expected_sha1[][3] = {
9595
{
96-
"801cd3a68eec5bdac4b14e40de6f76724a0a48af",
97-
"f40cf973dc5245610a6cf4cbd7640d0369a1ff97",
98-
"b8deaf80e09777de4c3260850b0347a47f611040"
96+
"4cd9db8fd2ded345aafffda2358cd6de9c763e00",
97+
"2dd41a82f55933f35988ca5f2d57c09f8157d43a",
98+
"2262468fb4840160c880dcaace12a44568e44246"
9999
},
100100
{
101-
"ffc1ff3c7be80355c40cf2b7b105ffce9d0a23a6",
102-
"7cb906b65f88d997c354bedfd80b37c1959d883d",
103-
"2a1330b248efa25fc1acfc25c1fba733910ebff9"
101+
"1e14ec2d359417837a6501c948ec110597535bb4",
102+
"c564d33ae070a54e5f10baa262f6da6c8450ed80",
103+
"e511d90a33b8e27ee96adfda987038cd4d540f8e"
104104
}
105105
};
106106

0 commit comments

Comments
 (0)