Skip to content

Commit

Permalink
More accurate ICtCp matrices (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Nov 28, 2023
1 parent c7efc44 commit 7ec8c42
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/spaces/ictcp.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ const im2 = 32 / 2523;
// The matrix below includes the 4% crosstalk components
// and is from the Dolby "What is ICtCp" paper"
const XYZtoLMS_M = [
[ 0.3592, 0.6976, -0.0358],
[-0.1922, 1.1004, 0.0755],
[ 0.0070, 0.0749, 0.8434]
[ 0.3592832590121217, 0.6976051147779502, -0.0358915932320290 ],
[ -0.1920808463704993, 1.1004767970374321, 0.0753748658519118 ],
[ 0.0070797844607479, 0.0748396662186362, 0.8433265453898765 ]
];
// linear-light Rec.2020 to LMS, again with crosstalk
// rational terms from Jan Fröhlich,
Expand All @@ -40,9 +40,9 @@ const LMStoIPT_M = [

// inverted matrices, calculated from the above
const IPTtoLMS_M = [
[0.99998889656284013833, 0.00860505014728705821, 0.1110343715986164786 ],
[1.0000111034371598616, -0.00860505014728705821, -0.1110343715986164786 ],
[1.000032063391005412, 0.56004913547279000113, -0.32063391005412026469],
[ 0.9999999999999998, 0.0086090370379328, 0.1110296250030260],
[ 0.9999999999999998, -0.0086090370379328, -0.1110296250030259],
[ 0.9999999999999998, 0.5600313357106791, -0.3206271749873188]
];
/*
const LMStoRec2020_M = [
Expand All @@ -52,9 +52,9 @@ const LMStoRec2020_M = [
];
*/
const LMStoXYZ_M = [
[ 2.0701800566956135096, -1.3264568761030210255, 0.20661600684785517081 ],
[ 0.36498825003265747974, 0.68046736285223514102, -0.045421753075853231409],
[-0.049595542238932107896, -0.049421161186757487412, 1.1879959417328034394 ]
[ 2.0701522183894223, -1.3263473389671563, 0.2066510476294053 ],
[ 0.3647385209748072, 0.6805660249472273, -0.0453045459220347 ],
[ -0.0497472075358123, -0.0492609666966131, 1.1880659249923042 ]
];

// Only the PQ form of ICtCp is implemented here. There is also an HLG form.
Expand Down

0 comments on commit 7ec8c42

Please sign in to comment.