feat: Canon rendering engine and Picture Styles

This commit is contained in:
zhoubinjia committed 2026-09-17 17:57:26 +08:00
1 parent bfbc2bf194
commit 395b2abe49
94 files changed
+8175 -21

No files matched your search

@@ -0,0 +1,32 @@
{
"schemaVersion": 1,
"cameraModel": "Canon EOS R5",
"modelId": "0x80000421",
"sourceFile": "Canon EOS R5 Adobe Standard.dcp",
"sourceSha256": "875bf77ae37841be20c3e6c3bc6ef141e3e5958eb80633ebd8e2658a58402600",
"purpose": "sensor_color_matrix_only",
"colorMatrix1": [
1.16,
-0.6048,
0.0405,
-0.3331,
1.0643,
0.3113,
-0.0007,
0.0513,
0.6109
],
"colorMatrix2": [
0.9766,
-0.2953,
-0.1254,
-0.4276,
1.2116,
0.2433,
-0.0437,
0.1336,
0.5131
],
"calibrationIlluminant1": 17,
"calibrationIlluminant2": 21
}
@@ -0,0 +1,800 @@
{
"dppCoreSha256": "534157b14d45168e203beaec2176e6d0867e679b47c42f4b325e1413691d3a6c",
"modelDllSha256": "00676cc933ad02ff4ce23d16d93d7ce5baf086a3a647d6d35e430a90a5dfd57e",
"compilerRva": "0x061de0",
"modelId": "0x80000421",
"styleId": "0x85",
"levelInitializerRva": "0x056be0",
"levels20302": "0000000000002c4000000000000000000000000080ffcf400000000000c0924000000000000000000000000080ffcf40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"sourceRecipes160": {
"y": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a0009000a00000096002c015802b0046009c01280253831ff3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003005000a5012d01dd0296035003eff3fff3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff0f0000ff0f00000000b0040000000000000000000000000000",
"c": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a0009000a00000096002c015802b0046009c0128025e02eff3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001005b009b011f01c202aa036403ec03f4041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff3f0000ff7f00000000b0040000000000000000000000000000",
"uv": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a0009000800000080000001800100028002b402fc03fc03fc030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000200020002e801b801a5012a01fc01fc01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fc030000fc030000000000000000000000000000000000000000"
},
"compilerRequests": [
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0050",
"bytes": 4,
"provided": false
},
{
"tag": "0x20302",
"bytes": 312,
"provided": true
},
{
"tag": "0x2e0f09",
"bytes": 112,
"provided": true
},
{
"tag": "0x2030b",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030c",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
}
],
"modelProvider": {
"properties": {
"0x10001": "21040080",
"0x20301": "85000000",
"0x10250": "00000000",
"0x10010": "00000000",
"0x10200": "01000000",
"0x10026": "64000000",
"0x20306": "00000000",
"0x20307": "00000000",
"0x20200": "00000000",
"0x20303": "0000000000000000",
"0x20304": "0000000000000000",
"0x20305": "0000000000000000",
"0x1000a": "64000000"
},
"requests": [
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51c",
"bytes": 58,
"provided": false
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff530",
"bytes": 1232,
"provided": false
},
{
"tag": "0x1ff51c",
"bytes": 58,
"provided": false
},
{
"tag": "0x1e0050",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff52e",
"bytes": 4,
"provided": false
}
]
},
"files": {
"parameters.bin": {
"bytes": 2304,
"sha256": "6e0032b4468a0a477a27d51c488a6e1eaf5d4eec073f6538ccd970503ceb8440"
},
"gamma_y.i32le": {
"bytes": 524288,
"sha256": "448c15c0f124871f15b35eac0958b8682ee968ba9a2ffd1341f37bf6228b63cb",
"entries": 131072,
"minimum": 0,
"maximum": 65535
},
"gamma_c.i32le": {
"bytes": 524288,
"sha256": "ab0b198fef67521bb52ebde7e1d429bb8e1d8c32346f2d11f795cab38be01e0d",
"entries": 131072,
"minimum": 0,
"maximum": 33409
},
"gamma_uv.i32le": {
"bytes": 262144,
"sha256": "bbc24febb623b4b52998546b923d788f757d2d094868a3bd28091e30c82588fe",
"entries": 65536,
"minimum": 297,
"maximum": 513
},
"kernel_words.i32le": {
"bytes": 1440,
"sha256": "0c59b27e6e704060c164dd4d3d8f775cef4720ee4e263f66a432bb92e5926141"
},
"chroma_weights.u16le": {
"bytes": 8192,
"sha256": "3de73b59dc2968a184d3d03992f7aae6901f6b719bc2c616a4cf512ace8952be"
}
}
}
@@ -0,0 +1,800 @@
{
"dppCoreSha256": "534157b14d45168e203beaec2176e6d0867e679b47c42f4b325e1413691d3a6c",
"modelDllSha256": "00676cc933ad02ff4ce23d16d93d7ce5baf086a3a647d6d35e430a90a5dfd57e",
"compilerRva": "0x061de0",
"modelId": "0x80000421",
"styleId": "0x83",
"levelInitializerRva": "0x056be0",
"levels20302": "0000000000002c4000000000000000000000000080ffcf400000000000c0924000000000000000000000000080ffcf40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"sourceRecipes160": {
"y": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a0009000a00000096002c015802b0046009c01280253831ff3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002005f0095012901e702cd037903eff3fff3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff0f0000ff0f00000000b0040000000000000000000000000000",
"c": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a0009000a00000096002c015802b0046009c0128025e02eff3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003005f0095012701ec02c503ba048504ba04d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff3f0000ff7f00000000b0040000000000000000000000000000",
"uv": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a000900090000008000000180010002800200036403fc03fc03000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f001f001f001d401a4017801500137011601fc01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fc030000fc030000000000000000000000000000000000000000"
},
"compilerRequests": [
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0050",
"bytes": 4,
"provided": false
},
{
"tag": "0x20302",
"bytes": 312,
"provided": true
},
{
"tag": "0x2e0f09",
"bytes": 112,
"provided": true
},
{
"tag": "0x2030b",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030c",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
}
],
"modelProvider": {
"properties": {
"0x10001": "21040080",
"0x20301": "83000000",
"0x10250": "00000000",
"0x10010": "00000000",
"0x10200": "01000000",
"0x10026": "64000000",
"0x20306": "00000000",
"0x20307": "00000000",
"0x20200": "00000000",
"0x20303": "0000000000000000",
"0x20304": "0000000000000000",
"0x20305": "0000000000000000",
"0x1000a": "64000000"
},
"requests": [
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51c",
"bytes": 58,
"provided": false
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff530",
"bytes": 1232,
"provided": false
},
{
"tag": "0x1ff51c",
"bytes": 58,
"provided": false
},
{
"tag": "0x1e0050",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff52e",
"bytes": 4,
"provided": false
}
]
},
"files": {
"parameters.bin": {
"bytes": 2304,
"sha256": "9f5a3d5a852d1f4de5c3181c36702192fb8909cf544c87824b24fc618f49227e"
},
"gamma_y.i32le": {
"bytes": 524288,
"sha256": "653bc2dc8c22b95f0fc7c0eeadd5ffac0d13bc2a2c47d3c07ee150bd17ed8492",
"entries": 131072,
"minimum": 0,
"maximum": 65535
},
"gamma_c.i32le": {
"bytes": 524288,
"sha256": "6adad405ae41211601aaa760378a6fe382ce191f8a91a41ee548b0aac015ed1f",
"entries": 131072,
"minimum": 0,
"maximum": 39745
},
"gamma_uv.i32le": {
"bytes": 262144,
"sha256": "d8e1f1da0c857c8602903d5454ecfccd50acfd9a4d27b0df369a8a6341186574",
"entries": 65536,
"minimum": 277,
"maximum": 498
},
"kernel_words.i32le": {
"bytes": 1440,
"sha256": "18aa00751ef9e74f5313d9c8dc9beda5b777dc5837baa16bb57df03a0dc239be"
},
"chroma_weights.u16le": {
"bytes": 8192,
"sha256": "f50983d7a0c742c32b63e3685b80629b4a9e00104ec223e41e4534407366f868"
}
}
}
@@ -0,0 +1,800 @@
{
"dppCoreSha256": "534157b14d45168e203beaec2176e6d0867e679b47c42f4b325e1413691d3a6c",
"modelDllSha256": "00676cc933ad02ff4ce23d16d93d7ce5baf086a3a647d6d35e430a90a5dfd57e",
"compilerRva": "0x061de0",
"modelId": "0x80000421",
"styleId": "0x86",
"levelInitializerRva": "0x056be0",
"levels20302": "0000000000002c4000000000000000000000000080ffcf400000000000c0924000000000000000000000000080ffcf40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"sourceRecipes160": {
"y": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a0009000a00000096002c015802b0046009c01280253831ff3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002005f0095012901e702cd037903eff3fff3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff0f0000ff0f00000000b0040000000000000000000000000000",
"c": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a0009000a00000096002c015802b0046009c0128025e02eff3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003005f0095012701ec02c503ba048504ba04d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff3f0000ff7f00000000b0040000000000000000000000000000",
"uv": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a0009000800000080000001800100028002d002fc03fc03fc030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003c023c023302eb01ad017d0171014701fc01fc01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fc030000fc030000000000000000000000000000000000000000"
},
"compilerRequests": [
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0050",
"bytes": 4,
"provided": false
},
{
"tag": "0x20302",
"bytes": 312,
"provided": true
},
{
"tag": "0x2e0f09",
"bytes": 112,
"provided": true
},
{
"tag": "0x2030b",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030c",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
}
],
"modelProvider": {
"properties": {
"0x10001": "21040080",
"0x20301": "86000000",
"0x10250": "00000000",
"0x10010": "00000000",
"0x10200": "01000000",
"0x10026": "64000000",
"0x20306": "00000000",
"0x20307": "00000000",
"0x20200": "00000000",
"0x20303": "0000000000000000",
"0x20304": "0000000000000000",
"0x20305": "0000000000000000",
"0x1000a": "64000000"
},
"requests": [
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51c",
"bytes": 58,
"provided": false
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff530",
"bytes": 1232,
"provided": false
},
{
"tag": "0x1ff51c",
"bytes": 58,
"provided": false
},
{
"tag": "0x1e0050",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff52e",
"bytes": 4,
"provided": false
}
]
},
"files": {
"parameters.bin": {
"bytes": 2304,
"sha256": "263312ae1df3fa229d2d8cbdafe90e44bad21368904f6184cc5322e8816563c5"
},
"gamma_y.i32le": {
"bytes": 524288,
"sha256": "653bc2dc8c22b95f0fc7c0eeadd5ffac0d13bc2a2c47d3c07ee150bd17ed8492",
"entries": 131072,
"minimum": 0,
"maximum": 65535
},
"gamma_c.i32le": {
"bytes": 524288,
"sha256": "6adad405ae41211601aaa760378a6fe382ce191f8a91a41ee548b0aac015ed1f",
"entries": 131072,
"minimum": 0,
"maximum": 39745
},
"gamma_uv.i32le": {
"bytes": 262144,
"sha256": "dbf0169f3d7b5fb49799c34d57f595886d45f7e5bbbeaaeffb1c9095e28d5547",
"entries": 65536,
"minimum": 327,
"maximum": 574
},
"kernel_words.i32le": {
"bytes": 1440,
"sha256": "dfcfb5d8196ebfc82fe2270f51bfcc04d7858fe92faae305eb4e6eedefc14fe8"
},
"chroma_weights.u16le": {
"bytes": 8192,
"sha256": "f50983d7a0c742c32b63e3685b80629b4a9e00104ec223e41e4534407366f868"
}
}
}
@@ -0,0 +1,800 @@
{
"dppCoreSha256": "534157b14d45168e203beaec2176e6d0867e679b47c42f4b325e1413691d3a6c",
"modelDllSha256": "00676cc933ad02ff4ce23d16d93d7ce5baf086a3a647d6d35e430a90a5dfd57e",
"compilerRva": "0x061de0",
"modelId": "0x80000421",
"styleId": "0x84",
"levelInitializerRva": "0x056be0",
"levels20302": "0000000000002c4000000000000000000000000080ffcf400000000000c0924000000000000000000000000080ffcf40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"sourceRecipes160": {
"y": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a0009000a00000096002c015802b0046009c01280253831ff3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003005000a5012d01dd0296035003eff3fff3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff0f0000ff0f00000000b0040000000000000000000000000000",
"c": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a0009000a00000096002c015802b0046009c0128025e02eff3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001005b009b011f01c202aa036403ec03f4041000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff3f0000ff7f00000000b0040000000000000000000000000000",
"uv": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a00090008000000800000018001000280029802fc03fc03fc030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006c026c026c023b020302cb01c1012501fc01fc01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fc030000fc030000000000000000000000000000000000000000"
},
"compilerRequests": [
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0050",
"bytes": 4,
"provided": false
},
{
"tag": "0x20302",
"bytes": 312,
"provided": true
},
{
"tag": "0x2e0f09",
"bytes": 112,
"provided": true
},
{
"tag": "0x2030b",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030c",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
}
],
"modelProvider": {
"properties": {
"0x10001": "21040080",
"0x20301": "84000000",
"0x10250": "00000000",
"0x10010": "00000000",
"0x10200": "01000000",
"0x10026": "64000000",
"0x20306": "00000000",
"0x20307": "00000000",
"0x20200": "00000000",
"0x20303": "0000000000000000",
"0x20304": "0000000000000000",
"0x20305": "0000000000000000",
"0x1000a": "64000000"
},
"requests": [
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51c",
"bytes": 58,
"provided": false
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff530",
"bytes": 1232,
"provided": false
},
{
"tag": "0x1ff51c",
"bytes": 58,
"provided": false
},
{
"tag": "0x1e0050",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff52e",
"bytes": 4,
"provided": false
}
]
},
"files": {
"parameters.bin": {
"bytes": 2304,
"sha256": "8e32d1caf332b05c5d1e00ba235c864f5170b26ba8deef85045cecb3dc326b86"
},
"gamma_y.i32le": {
"bytes": 524288,
"sha256": "448c15c0f124871f15b35eac0958b8682ee968ba9a2ffd1341f37bf6228b63cb",
"entries": 131072,
"minimum": 0,
"maximum": 65535
},
"gamma_c.i32le": {
"bytes": 524288,
"sha256": "ab0b198fef67521bb52ebde7e1d429bb8e1d8c32346f2d11f795cab38be01e0d",
"entries": 131072,
"minimum": 0,
"maximum": 33409
},
"gamma_uv.i32le": {
"bytes": 262144,
"sha256": "31e952df0daccc9a1dea11f434162c973e9f0218cce31fd7bed990572bb08d9e",
"entries": 65536,
"minimum": 292,
"maximum": 624
},
"kernel_words.i32le": {
"bytes": 1440,
"sha256": "c941392bd1e71292adda3825e05b47c02139a9ca184176f28f76378ace835165"
},
"chroma_weights.u16le": {
"bytes": 8192,
"sha256": "3de73b59dc2968a184d3d03992f7aae6901f6b719bc2c616a4cf512ace8952be"
}
}
}
@@ -0,0 +1,39 @@
{
"sourceSha256": "534157b14d45168e203beaec2176e6d0867e679b47c42f4b325e1413691d3a6c",
"kernelRva": "0x1f5b20",
"dispatch": "0x1e0410: 0x056e40(0x80000421)==1; HDRProcessMode=0",
"output": "Y unsigned16, U signed16, V signed16; not RGB",
"hostBoundary": "already WB; zero EV; camera white=16383; ISO100; HTP off; nonspatial",
"styles": [
{
"style": "standard",
"cases": 812,
"kernelSha256": "bc0b4163d01ab7a3f152606135b240140d91d29378eeb3aca8b181eedfe32b63"
},
{
"style": "portrait",
"cases": 812,
"kernelSha256": "125e2dd713d9d14cbe62819362d9666cd029e343d699a27e4a604cd5396ee7fc"
},
{
"style": "landscape",
"cases": 812,
"kernelSha256": "18aa00751ef9e74f5313d9c8dc9beda5b777dc5837baa16bb57df03a0dc239be"
},
{
"style": "neutral",
"cases": 812,
"kernelSha256": "c941392bd1e71292adda3825e05b47c02139a9ca184176f28f76378ace835165"
},
{
"style": "faithful",
"cases": 812,
"kernelSha256": "0c59b27e6e704060c164dd4d3d8f775cef4720ee4e263f66a432bb92e5926141"
},
{
"style": "monochrome",
"cases": 812,
"kernelSha256": "dfcfb5d8196ebfc82fe2270f51bfcc04d7858fe92faae305eb4e6eedefc14fe8"
}
]
}
@@ -0,0 +1,800 @@
{
"dppCoreSha256": "534157b14d45168e203beaec2176e6d0867e679b47c42f4b325e1413691d3a6c",
"modelDllSha256": "00676cc933ad02ff4ce23d16d93d7ce5baf086a3a647d6d35e430a90a5dfd57e",
"compilerRva": "0x061de0",
"modelId": "0x80000421",
"styleId": "0x82",
"levelInitializerRva": "0x056be0",
"levels20302": "0000000000002c4000000000000000000000000080ffcf400000000000c0924000000000000000000000000080ffcf40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"sourceRecipes160": {
"y": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a0009000a00000096002c015802b0046009c01280253831ff3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002005f0095012901e702cd037903eff3fff3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff0f0000ff0f00000000b0040000000000000000000000000000",
"c": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a0009000a00000096002c015802b0046009c0128025e02eff3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002006400b9012301ec02c503ba048504ba04d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff3f0000ff7f00000000b0040000000000000000000000000000",
"uv": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a000900090000008000000180010002800200036403fc03fc03000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f001f001f001d401a4017801500137011601fc01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fc030000fc030000000000000000000000000000000000000000"
},
"compilerRequests": [
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0050",
"bytes": 4,
"provided": false
},
{
"tag": "0x20302",
"bytes": 312,
"provided": true
},
{
"tag": "0x2e0f09",
"bytes": 112,
"provided": true
},
{
"tag": "0x2030b",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030c",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
}
],
"modelProvider": {
"properties": {
"0x10001": "21040080",
"0x20301": "82000000",
"0x10250": "00000000",
"0x10010": "00000000",
"0x10200": "01000000",
"0x10026": "64000000",
"0x20306": "00000000",
"0x20307": "00000000",
"0x20200": "00000000",
"0x20303": "0000000000000000",
"0x20304": "0000000000000000",
"0x20305": "0000000000000000",
"0x1000a": "64000000"
},
"requests": [
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51c",
"bytes": 58,
"provided": false
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff530",
"bytes": 1232,
"provided": false
},
{
"tag": "0x1ff51c",
"bytes": 58,
"provided": false
},
{
"tag": "0x1e0050",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff52e",
"bytes": 4,
"provided": false
}
]
},
"files": {
"parameters.bin": {
"bytes": 2304,
"sha256": "4afa6c42da2231e06956c91015810ce57a916efb74344e1a2b294a4459bc6eac"
},
"gamma_y.i32le": {
"bytes": 524288,
"sha256": "653bc2dc8c22b95f0fc7c0eeadd5ffac0d13bc2a2c47d3c07ee150bd17ed8492",
"entries": 131072,
"minimum": 0,
"maximum": 65535
},
"gamma_c.i32le": {
"bytes": 524288,
"sha256": "7f1e12b50cd603b418743d0d43f5ffbafb537ae6c77d7c88dbf1a120a8fd6c82",
"entries": 131072,
"minimum": 0,
"maximum": 39745
},
"gamma_uv.i32le": {
"bytes": 262144,
"sha256": "d8e1f1da0c857c8602903d5454ecfccd50acfd9a4d27b0df369a8a6341186574",
"entries": 65536,
"minimum": 277,
"maximum": 498
},
"kernel_words.i32le": {
"bytes": 1440,
"sha256": "125e2dd713d9d14cbe62819362d9666cd029e343d699a27e4a604cd5396ee7fc"
},
"chroma_weights.u16le": {
"bytes": 8192,
"sha256": "f50983d7a0c742c32b63e3685b80629b4a9e00104ec223e41e4534407366f868"
}
}
}
@@ -0,0 +1,80 @@
{
"generator": "DppCore 0x1538d0 \u2192 MLib MLIBcreateCustomMLDataEX",
"mlibSha256": "54a77e1f34c06db755a3b4061ab3f48438717ce028827aed0443a8d28369f08e",
"sourceSha256": "534157b14d45168e203beaec2176e6d0867e679b47c42f4b325e1413691d3a6c",
"input": "RawRecipe RGB normalized from uint16; ICC device RGB domain",
"output": "ICC Lab PCS; convert with output_srgb.icc B2A/matrix inverse, then decode sRGB to linear",
"profiles": [
{
"style": "standard",
"icc": "standard.icc",
"sha256": "c79c443512b2bf900ded0109ad0459405879969bc57d1bc6b79a62de370ded81",
"iccBytes": 217828,
"a2b0Sha256": "e5cbb0cc3a0492199325c02fef5db387e03d3886a82840b7a8210e650857234e",
"grid": 33,
"inputEntries": 16,
"outputEntries": 256,
"services": {
"HeapAlloc": 62,
"HeapFree": 60
}
},
{
"style": "portrait",
"icc": "portrait.icc",
"sha256": "6ee33c98f1d6451477967da5875f392c59d8d580d9e94850e1fdf8f9944e6aaa",
"iccBytes": 217828,
"a2b0Sha256": "40cff9a634d71d4d2654395108fea9cc508712bdfb8e029de1810e60f7913daa",
"grid": 33,
"inputEntries": 16,
"outputEntries": 256,
"services": {
"HeapAlloc": 62,
"HeapFree": 60
}
},
{
"style": "landscape",
"icc": "landscape.icc",
"sha256": "676bbdb9680b428693288f4432928f3aaa38a8017081797c54055c9a036bc18c",
"iccBytes": 217828,
"a2b0Sha256": "2196af0d84d0ef6ae3cfc63f33f81d99c78d6821c86d1577301d30dade768a15",
"grid": 33,
"inputEntries": 16,
"outputEntries": 256,
"services": {
"HeapAlloc": 62,
"HeapFree": 60
}
},
{
"style": "neutral",
"icc": "neutral.icc",
"sha256": "fc883027b2f681dc1cd7accbf88dedb474aae86b00fef3703a47e791f50d1457",
"iccBytes": 217828,
"a2b0Sha256": "7dc7cb934dbfdf8cfe49461a95dfb2156a60f2327493cf06ec96e6ad206e6ef0",
"grid": 33,
"inputEntries": 16,
"outputEntries": 256,
"services": {
"HeapAlloc": 62,
"HeapFree": 60
}
},
{
"style": "faithful",
"icc": "faithful.icc",
"sha256": "5243fffa700c20d96000170dcd2edc2fe49d08650bdfa7f0e04d740b66a1201f",
"iccBytes": 217828,
"a2b0Sha256": "b5df7948da8534435b18aa25cb9ef1696cbedf75fd6d2090144c69ac36e48d54",
"grid": 33,
"inputEntries": 16,
"outputEntries": 256,
"services": {
"HeapAlloc": 62,
"HeapFree": 60
}
}
],
"outputProfileSha256": "674784321fec65ae80128004b27b883f020442c96f0481e525713bbf4b1a70c6"
}
Binary file not shown.
@@ -0,0 +1,800 @@
{
"dppCoreSha256": "534157b14d45168e203beaec2176e6d0867e679b47c42f4b325e1413691d3a6c",
"modelDllSha256": "00676cc933ad02ff4ce23d16d93d7ce5baf086a3a647d6d35e430a90a5dfd57e",
"compilerRva": "0x061de0",
"modelId": "0x80000421",
"styleId": "0x81",
"levelInitializerRva": "0x056be0",
"levels20302": "0000000000002c4000000000000000000000000080ffcf400000000000c0924000000000000000000000000080ffcf40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"sourceRecipes160": {
"y": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a0009000a00000096002c015802b0046009c01280253831ff3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002005f0095012901e702cd037903eff3fff3f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff0f0000ff0f00000000b0040000000000000000000000000000",
"c": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a0009000a00000096002c015802b0046009c0128025e02eff3f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003005f0095012701ec02c503ba048504ba04d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ff3f0000ff7f00000000b0040000000000000000000000000000",
"uv": "00000000000000000000000000000000000000000000f03f0000000000000000000000000000f03f00000000000000000000000000000000b0042c014bc0b23f0a000900090000008000000180010002800200036403fc03fc030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006002600260022902da019c01760158012b01fc01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fc030000fc030000000000000000000000000000000000000000"
},
"compilerRequests": [
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0050",
"bytes": 4,
"provided": false
},
{
"tag": "0x20302",
"bytes": 312,
"provided": true
},
{
"tag": "0x2e0f09",
"bytes": 112,
"provided": true
},
{
"tag": "0x2030b",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030c",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
}
],
"modelProvider": {
"properties": {
"0x10001": "21040080",
"0x20301": "81000000",
"0x10250": "00000000",
"0x10010": "00000000",
"0x10200": "01000000",
"0x10026": "64000000",
"0x20306": "00000000",
"0x20307": "00000000",
"0x20200": "00000000",
"0x20303": "0000000000000000",
"0x20304": "0000000000000000",
"0x20305": "0000000000000000",
"0x1000a": "64000000"
},
"requests": [
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51c",
"bytes": 58,
"provided": false
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x10250",
"bytes": 4,
"provided": true
},
{
"tag": "0x10001",
"bytes": 4,
"provided": true
},
{
"tag": "0x1e0015",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x20301",
"bytes": 4,
"provided": true
},
{
"tag": "0x10200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20303",
"bytes": 8,
"provided": true
},
{
"tag": "0x20304",
"bytes": 8,
"provided": true
},
{
"tag": "0x20305",
"bytes": 8,
"provided": true
},
{
"tag": "0x20306",
"bytes": 4,
"provided": true
},
{
"tag": "0x20307",
"bytes": 4,
"provided": true
},
{
"tag": "0x1000a",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff50e",
"bytes": 4,
"provided": false
},
{
"tag": "0x10010",
"bytes": 4,
"provided": true
},
{
"tag": "0x1ff56b",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54e",
"bytes": 2,
"provided": false
},
{
"tag": "0x10f07",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff548",
"bytes": 8,
"provided": false
},
{
"tag": "0x1ff508",
"bytes": 4,
"provided": false
},
{
"tag": "0x1000b",
"bytes": 8,
"provided": false
},
{
"tag": "0x20600",
"bytes": 8,
"provided": false
},
{
"tag": "0x20200",
"bytes": 4,
"provided": true
},
{
"tag": "0x20308",
"bytes": 8,
"provided": false
},
{
"tag": "0x20309",
"bytes": 8,
"provided": false
},
{
"tag": "0x2030a",
"bytes": 8,
"provided": false
},
{
"tag": "0x1e0001",
"bytes": 4,
"provided": false
},
{
"tag": "0x2070b",
"bytes": 4,
"provided": false
},
{
"tag": "0x20706",
"bytes": 8,
"provided": false
},
{
"tag": "0x1000c",
"bytes": 8,
"provided": false
},
{
"tag": "0x10400",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff51d",
"bytes": 980,
"provided": false
},
{
"tag": "0x1ef500",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef501",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff591",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ef502",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff597",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff599",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff54d",
"bytes": 2,
"provided": false
},
{
"tag": "0x1ff50b",
"bytes": 4,
"provided": false
},
{
"tag": "0x2e0150",
"bytes": 4,
"provided": false
},
{
"tag": "0x10f08",
"bytes": 4,
"provided": false
},
{
"tag": "0x20620",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff622",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff530",
"bytes": 1232,
"provided": false
},
{
"tag": "0x1ff51c",
"bytes": 58,
"provided": false
},
{
"tag": "0x1e0050",
"bytes": 4,
"provided": false
},
{
"tag": "0x1e0030",
"bytes": 4,
"provided": false
},
{
"tag": "0x1ff52e",
"bytes": 4,
"provided": false
}
]
},
"files": {
"parameters.bin": {
"bytes": 2304,
"sha256": "ea09cc646eb6c2c94251de07e137d07f4a8a3b233419c95d0f4c47f2134e109f"
},
"gamma_y.i32le": {
"bytes": 524288,
"sha256": "653bc2dc8c22b95f0fc7c0eeadd5ffac0d13bc2a2c47d3c07ee150bd17ed8492",
"entries": 131072,
"minimum": 0,
"maximum": 65535
},
"gamma_c.i32le": {
"bytes": 524288,
"sha256": "6adad405ae41211601aaa760378a6fe382ce191f8a91a41ee548b0aac015ed1f",
"entries": 131072,
"minimum": 0,
"maximum": 39745
},
"gamma_uv.i32le": {
"bytes": 262144,
"sha256": "0b8a245be5366c12f730b9af57c1263355ffe698e74d33383438bc749f5b1c0a",
"entries": 65536,
"minimum": 298,
"maximum": 612
},
"kernel_words.i32le": {
"bytes": 1440,
"sha256": "bc0b4163d01ab7a3f152606135b240140d91d29378eeb3aca8b181eedfe32b63"
},
"chroma_weights.u16le": {
"bytes": 8192,
"sha256": "f50983d7a0c742c32b63e3685b80629b4a9e00104ec223e41e4534407366f868"
}
}
}
@@ -28,6 +28,7 @@ import com.hinnka.mycamera.raw.HncsFilmCurveMode
import com.hinnka.mycamera.raw.HncsRenderIntent
import com.hinnka.mycamera.raw.HncsProfileManager
import com.hinnka.mycamera.raw.LumixPhotoStyle
import com.hinnka.mycamera.raw.CanonPictureStyle
import com.hinnka.mycamera.raw.RawRenderingEngine
import com.hinnka.mycamera.raw.RawAdaptiveExposureMode
import com.hinnka.mycamera.raw.RawProcessingPreferences
@@ -373,6 +374,8 @@ class UserPreferencesRepository(private val context: Context) {
private val RAW_PROFILE_TONE_MAP_KEY = booleanPreferencesKey("raw_profile_tone_map")
private val RAW_OPPO_MASTER_TONE_MAP_KEY = booleanPreferencesKey("raw_oppo_master_tone_map")
private val RAW_LUMIX_PHOTO_STYLE_KEY = stringPreferencesKey("raw_lumix_photo_style")
private val RAW_CANON_PICTURE_STYLE_KEY = stringPreferencesKey("raw_canon_picture_style")
private val RAW_CANON_EXPOSURE_COMPENSATION_KEY = floatPreferencesKey("raw_canon_exposure_compensation_ev")
private val RAW_LUMIX_COLOR_MATCHING_KEY = booleanPreferencesKey("raw_lumix_color_matching_enabled")
private val RAW_HNCS_COLOR_MATCHING_KEY = booleanPreferencesKey("raw_hncs_color_matching_enabled")
private val RAW_PHOTON_HDR_KEY = booleanPreferencesKey("raw_photon_hdr")
@@ -651,6 +654,9 @@ class UserPreferencesRepository(private val context: Context) {
// Capture development has one supported adaptive-exposure path: HDRNet.
// Photo-level metadata may still disable it for an imported DNG.
lumixPhotoStyle = LumixPhotoStyle.fromPersistedValue(preferences[RAW_LUMIX_PHOTO_STYLE_KEY]),
canonPictureStyle = CanonPictureStyle.fromPersistedValue(preferences[RAW_CANON_PICTURE_STYLE_KEY]),
canonExposureCompensationEv = preferences[RAW_CANON_EXPOSURE_COMPENSATION_KEY]
?: RawToneMappingParameters.CANON_EXPOSURE_COMPENSATION_DEFAULT,
lumixColorMatchingEnabled = preferences[RAW_LUMIX_COLOR_MATCHING_KEY] ?: true,
hncsColorMatchingEnabled = preferences[RAW_HNCS_COLOR_MATCHING_KEY] ?: true,
usePhotonHdr = true
@@ -1259,6 +1265,8 @@ class UserPreferencesRepository(private val context: Context) {
preferences[RAW_PROFILE_TONE_MAP_KEY] = normalized.useProfileToneMap
preferences[RAW_OPPO_MASTER_TONE_MAP_KEY] = normalized.useOppoMasterToneMap
preferences[RAW_LUMIX_PHOTO_STYLE_KEY] = normalized.lumixPhotoStyle.assetName
preferences[RAW_CANON_PICTURE_STYLE_KEY] = normalized.canonPictureStyle.persistedValue
preferences[RAW_CANON_EXPOSURE_COMPENSATION_KEY] = normalized.canonExposureCompensationEv
preferences[RAW_LUMIX_COLOR_MATCHING_KEY] = normalized.lumixColorMatchingEnabled
preferences[RAW_HNCS_COLOR_MATCHING_KEY] = normalized.hncsColorMatchingEnabled
preferences[RAW_PHOTON_HDR_KEY] = normalized.usePhotonHdr
@@ -2510,6 +2518,8 @@ class UserPreferencesRepository(private val context: Context) {
preferences[LEGACY_PROFILE_TONE_MAP_KEY] = false
preferences[RAW_OPPO_MASTER_TONE_MAP_KEY] = normalized.useOppoMasterToneMap
preferences[RAW_LUMIX_PHOTO_STYLE_KEY] = normalized.lumixPhotoStyle.assetName
preferences[RAW_CANON_PICTURE_STYLE_KEY] = normalized.canonPictureStyle.persistedValue
preferences[RAW_CANON_EXPOSURE_COMPENSATION_KEY] = normalized.canonExposureCompensationEv
preferences[RAW_LUMIX_COLOR_MATCHING_KEY] = normalized.lumixColorMatchingEnabled
preferences[RAW_HNCS_COLOR_MATCHING_KEY] = normalized.hncsColorMatchingEnabled
preferences[RAW_PHOTON_HDR_KEY] = normalized.usePhotonHdr
@@ -18,6 +18,7 @@ import com.hinnka.mycamera.raw.HncsFilmCurveMode
import com.hinnka.mycamera.raw.HncsRenderIntent
import com.hinnka.mycamera.raw.HncsProfileManager
import com.hinnka.mycamera.raw.LumixPhotoStyle
import com.hinnka.mycamera.raw.CanonPictureStyle
import com.hinnka.mycamera.raw.RawRenderingEngine
import com.hinnka.mycamera.raw.RawToneMappingParameters
import com.hinnka.mycamera.raw.RawCaptureExposureCompensationMetadata
@@ -388,6 +389,11 @@ data class MediaMetadata(
true
},
lumixPhotoStyle = LumixPhotoStyle.fromPersistedValue(obj.optString("rawLumixPhotoStyle")),
canonPictureStyle = CanonPictureStyle.fromPersistedValue(obj.optString("rawCanonPictureStyle")),
canonExposureCompensationEv = obj.optDouble(
"rawCanonExposureCompensationEv",
RawToneMappingParameters.CANON_EXPOSURE_COMPENSATION_DEFAULT.toDouble()
).toFloat(),
lumixColorMatchingEnabled = obj.optBoolean("rawLumixColorMatchingEnabled", true),
hncsColorMatchingEnabled = obj.optBoolean("rawHncsColorMatchingEnabled", true),
useOppoMasterToneMap = obj.optBoolean("rawOppoMasterToneMap", false),
@@ -8,7 +8,7 @@ import com.hinnka.mycamera.raw.RawToneMappingParameters
@Database(
entities = [GalleryMediaEntity::class],
version = 43,
version = 45,
exportSchema = false
)
@androidx.room.TypeConverters(GalleryConverters::class)
@@ -792,6 +792,18 @@ abstract class GalleryDatabase : RoomDatabase() {
db.execSQL("CREATE INDEX IF NOT EXISTS `index_gallery_media_mediaType` ON `gallery_media` (`mediaType`)")
}
private val MIGRATION_43_44 = object : androidx.room.migration.Migration(43, 44) {
override fun migrate(db: androidx.sqlite.db.SupportSQLiteDatabase) {
db.execSQL("ALTER TABLE gallery_media ADD COLUMN rawCanonPictureStyle TEXT NOT NULL DEFAULT 'standard'")
}
}
private val MIGRATION_44_45 = object : androidx.room.migration.Migration(44, 45) {
override fun migrate(db: androidx.sqlite.db.SupportSQLiteDatabase) {
db.execSQL("ALTER TABLE gallery_media ADD COLUMN rawCanonExposureCompensationEv REAL NOT NULL DEFAULT -0.5")
}
}
fun getInstance(context: Context): GalleryDatabase {
return INSTANCE ?: synchronized(this) {
INSTANCE ?: Room.databaseBuilder(
@@ -841,7 +853,9 @@ abstract class GalleryDatabase : RoomDatabase() {
MIGRATION_39_40,
MIGRATION_40_41,
MIGRATION_41_42,
MIGRATION_42_43
MIGRATION_42_43,
MIGRATION_43_44,
MIGRATION_44_45
)
.fallbackToDestructiveMigrationOnDowngrade(false)
.fallbackToDestructiveMigration(false)
@@ -6,6 +6,7 @@ import androidx.room.Entity
import androidx.room.Index
import androidx.room.PrimaryKey
import com.hinnka.mycamera.model.ColorRecipeParams
import com.hinnka.mycamera.raw.RawToneMappingParameters
@Entity(
tableName = "gallery_media",
@@ -63,6 +64,10 @@ data class GalleryMediaEntity(
val rawColorEngine: String,
@ColumnInfo(defaultValue = "'standard'")
val rawLumixPhotoStyle: String = "standard",
@ColumnInfo(defaultValue = "'standard'")
val rawCanonPictureStyle: String = "standard",
@ColumnInfo(defaultValue = "-0.5")
val rawCanonExposureCompensationEv: Float = RawToneMappingParameters.CANON_EXPOSURE_COMPENSATION_DEFAULT,
@ColumnInfo(defaultValue = "1")
val rawLumixColorMatchingEnabled: Boolean = true,
@ColumnInfo(defaultValue = "1")
@@ -18,6 +18,7 @@ import com.hinnka.mycamera.raw.HncsFilmCurveMode
import com.hinnka.mycamera.raw.HncsRenderIntent
import com.hinnka.mycamera.raw.HncsProfileManager
import com.hinnka.mycamera.raw.LumixPhotoStyle
import com.hinnka.mycamera.raw.CanonPictureStyle
import com.hinnka.mycamera.raw.RawRenderingEngine
import com.hinnka.mycamera.raw.RawToneMappingParameters
import com.hinnka.mycamera.raw.RawAdaptiveExposureMode
@@ -252,6 +253,10 @@ object GalleryMediaStore {
rawProfileToneMap = metadata.rawToneMappingParameters.useProfileToneMap,
rawOppoMasterToneMap = metadata.rawToneMappingParameters.useOppoMasterToneMap,
rawLumixPhotoStyle = metadata.rawToneMappingParameters.lumixPhotoStyle.assetName,
rawCanonPictureStyle = metadata.rawToneMappingParameters.canonPictureStyle.persistedValue,
rawCanonExposureCompensationEv = RawToneMappingParameters.normalizeCanonExposureCompensation(
metadata.rawToneMappingParameters.canonExposureCompensationEv
),
rawLumixColorMatchingEnabled = metadata.rawToneMappingParameters.lumixColorMatchingEnabled,
rawHncsColorMatchingEnabled = metadata.rawToneMappingParameters.hncsColorMatchingEnabled,
rawPhotonHdr = metadata.rawToneMappingParameters.usePhotonHdr,
@@ -456,6 +461,8 @@ object GalleryMediaStore {
useProfileToneMap = rawProfileToneMap,
useOppoMasterToneMap = rawOppoMasterToneMap,
lumixPhotoStyle = LumixPhotoStyle.fromPersistedValue(rawLumixPhotoStyle),
canonPictureStyle = CanonPictureStyle.fromPersistedValue(rawCanonPictureStyle),
canonExposureCompensationEv = rawCanonExposureCompensationEv,
lumixColorMatchingEnabled = rawLumixColorMatchingEnabled,
hncsColorMatchingEnabled = rawHncsColorMatchingEnabled,
usePhotonHdr = rawPhotonHdr || legacyPhotonToneMap
@@ -7,9 +7,11 @@ import com.hinnka.mycamera.raw.HncsFilmCurveMode
import com.hinnka.mycamera.raw.HncsRenderIntent
import com.hinnka.mycamera.raw.HncsProfileManager
import com.hinnka.mycamera.raw.LumixPhotoStyle
import com.hinnka.mycamera.raw.CanonPictureStyle
import com.hinnka.mycamera.raw.RawRenderingEngine
import com.hinnka.mycamera.raw.RawDenoiseDefaults
import com.hinnka.mycamera.raw.RawSharpeningDefaults
import com.hinnka.mycamera.raw.RawToneMappingParameters
/**
* 拍摄预设。通用画面参数适用于全部拍摄模式,RAW 参数仅适用于专业模式。
@@ -41,6 +43,8 @@ data class CameraPreset(
val rawWhitePointCorrection: Float = 0f,
val rawOppoMasterToneMap: Boolean = false,
val rawLumixPhotoStyle: String = LumixPhotoStyle.Standard.assetName,
val rawCanonPictureStyle: String = CanonPictureStyle.Standard.persistedValue,
val rawCanonExposureCompensationEv: Float = RawToneMappingParameters.CANON_EXPOSURE_COMPENSATION_DEFAULT,
val rawLumixColorMatchingEnabled: Boolean = true,
val rawHncsColorMatchingEnabled: Boolean = true,
val rawSpectralFilmStock: String? = null,
@@ -148,6 +152,10 @@ data class CameraPreset(
rawWhitePointCorrection = rawWhitePointCorrection.coerceIn(-1f, 1f),
rawOppoMasterToneMap = rawOppoMasterToneMap,
rawLumixPhotoStyle = LumixPhotoStyle.fromPersistedValue(rawLumixPhotoStyle).assetName,
rawCanonPictureStyle = CanonPictureStyle.fromPersistedValue(rawCanonPictureStyle).persistedValue,
rawCanonExposureCompensationEv = RawToneMappingParameters.normalizeCanonExposureCompensation(
rawCanonExposureCompensationEv
),
)
}
@@ -8,10 +8,12 @@ import com.hinnka.mycamera.raw.HncsFilmCurveMode
import com.hinnka.mycamera.raw.HncsRenderIntent
import com.hinnka.mycamera.raw.HncsProfileManager
import com.hinnka.mycamera.raw.LumixPhotoStyle
import com.hinnka.mycamera.raw.CanonPictureStyle
import com.hinnka.mycamera.raw.RawRenderingEngine
import com.hinnka.mycamera.raw.RawDenoiseDefaults
import com.hinnka.mycamera.raw.RawSharpeningDefaults
import com.hinnka.mycamera.raw.RawProcessingPreferences
import com.hinnka.mycamera.raw.RawToneMappingParameters
/**
* Tolerant preset reader: only current CameraPreset fields are parsed.
@@ -85,6 +87,10 @@ internal object CameraPresetJsonCodec {
rawWhitePointCorrection = obj.float("rawWhitePointCorrection", 0f)
.coerceIn(-1f, 1f),
rawLumixPhotoStyle = LumixPhotoStyle.fromPersistedValue(obj.stringOrNull("rawLumixPhotoStyle")).assetName,
rawCanonPictureStyle = CanonPictureStyle.fromPersistedValue(obj.stringOrNull("rawCanonPictureStyle")).persistedValue,
rawCanonExposureCompensationEv = RawToneMappingParameters.normalizeCanonExposureCompensation(
obj.float("rawCanonExposureCompensationEv", RawToneMappingParameters.CANON_EXPOSURE_COMPENSATION_DEFAULT)
),
rawLumixColorMatchingEnabled = obj.boolean("rawLumixColorMatchingEnabled", true),
rawHncsColorMatchingEnabled = obj.boolean("rawHncsColorMatchingEnabled", true),
rawOppoMasterToneMap = obj.boolean("rawOppoMasterToneMap", false),
@@ -0,0 +1,71 @@
package com.hinnka.mycamera.raw
/**
* Integer reference for two audited DPP 4.21.30 helpers, not a Picture Style renderer.
*
* Evidence: research/canon_dpp/pipeline-decompiled/{1801d76c0,180027990}.c. These
* functions operate on DPP integer code values; they do not establish the conversion from
* the app's floating-point working space into that domain.
*/
internal object CanonColorMath {
/** A final 65,536-entry signed Int32 lookup table consumed by RGBRecipe. */
class DirectInt32Curve(entries: IntArray) {
init {
require(entries.size == 65_536) { "RGBRecipe direct curve requires 65536 Int32 entries" }
}
private val values = entries.copyOf()
internal operator fun get(index: Int): Int = values[index]
}
/**
* A final 1,024-entry signed Int32 lookup table consumed by RGBRecipe; output is shifted
* left by six bits. This is NOT one of the extracted 1,024-entry UInt16 recipe seed tables.
* The seed-table compiler must be recovered before those resources can produce this type.
*/
class CoarseInt32Curve(entries: IntArray) {
init {
require(entries.size == 1_024) { "RGBRecipe coarse curve requires 1024 Int32 entries" }
}
private val values = entries.copyOf()
internal operator fun get(index: Int): Int = values[index]
}
/**
* DppCore RVA 0x1d76c0. Accepts every signed Int32 input, clamping only the lookup address
* to 0..65535. A direct table takes precedence when both pointers are present. No table
* returns the clamped input. Table results are not clamped; [Int.shl] deliberately retains
* the original 32-bit wraparound behavior of the coarse-table path.
*/
fun rgbRecipeLookup(
input: Int,
direct: DirectInt32Curve? = null,
coarse: CoarseInt32Curve? = null,
): Int {
val code = input.coerceIn(0, 65_535)
if (direct != null) return direct[code]
if (coarse != null) {
val index = ((code + 1) shr 6).coerceAtMost(1_023)
return coarse[index] shl 6
}
return code
}
/**
* DppCore RVA 0x027990, used to prepare an auxiliary plane. The three arguments are the
* original ordered UInt16 channels, represented as Int in 0..65535. Their mapping to an
* app RGB space is not established, so this must not be substituted for app luminance.
* The coefficient sum is 4096; the unsigned 32-bit accumulation cannot overflow for
* valid inputs. The original helper truncates after shifting and clamps to UInt16.
*/
fun auxiliaryWeightedCode(first: Int, second: Int, third: Int): Int {
require(first in 0..65_535 && second in 0..65_535 && third in 0..65_535) {
"Canon auxiliary plane inputs must be UInt16 code values"
}
return ((first * 0x4c8 + second * 0x964 + third * 0x1d4) ushr 12)
.coerceAtMost(65_535)
}
}
@@ -0,0 +1,72 @@
package com.hinnka.mycamera.raw
import android.opengl.GLES30
import java.nio.ByteBuffer
import java.nio.ByteOrder
/** Owned and used on the rendering GL context. Three explicit units; no GL state is assumed. */
internal class CanonIccGlResources(private val profile: CanonIccProfile) {
private val textures = IntArray(3)
fun bind(program: Int, firstTextureUnit: Int) {
val limit = IntArray(1)
GLES30.glGetIntegerv(GLES30.GL_MAX_TEXTURE_IMAGE_UNITS, limit, 0)
require(firstTextureUnit >= 0 && firstTextureUnit + 3 <= limit[0])
if (textures[0] == 0) upload(firstTextureUnit)
val names = arrayOf("uCanonIccClut", "uCanonIccCurves", "uCanonIccTargetTrc")
for (index in textures.indices) {
GLES30.glActiveTexture(GLES30.GL_TEXTURE0 + firstTextureUnit + index)
GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, textures[index])
GLES30.glUniform1i(GLES30.glGetUniformLocation(program, names[index]), firstTextureUnit + index)
}
GLES30.glUniform1i(GLES30.glGetUniformLocation(program, "uCanonIccGrid"), profile.grid)
GLES30.glUniform2i(GLES30.glGetUniformLocation(program, "uCanonIccCurveSizes"), profile.inputCurves[0].size, profile.outputCurves[0].size)
GLES30.glUniform3i(GLES30.glGetUniformLocation(program, "uCanonIccTrcSizes"), profile.targetCurves[0].size, profile.targetCurves[1].size, profile.targetCurves[2].size)
GLES30.glUniformMatrix3fv(GLES30.glGetUniformLocation(program, "uCanonIccXyzToTarget"), 1, false, profile.xyzToTarget, 0)
GLES30.glUniform3fv(GLES30.glGetUniformLocation(program, "uCanonIccPcsWhite"), 1, profile.pcsWhite, 0)
}
private fun upload(firstTextureUnit: Int) {
val curveWidth = maxOf(profile.inputCurves[0].size, profile.outputCurves[0].size)
val trcWidth = profile.targetCurves.maxOf { it.size }
val limit = IntArray(1)
GLES30.glGetIntegerv(GLES30.GL_MAX_TEXTURE_SIZE, limit, 0)
require(maxOf(profile.grid * profile.grid, curveWidth, trcWidth) <= limit[0])
val cube = FloatArray(profile.grid * profile.grid * profile.grid * 4)
for (i in profile.clut.indices) cube[(i / 3) * 4 + i % 3] = profile.clut[i]
val curves = FloatArray(curveWidth * 2 * 4)
for ((row, channels) in arrayOf(profile.inputCurves, profile.outputCurves).withIndex()) {
for (channel in 0..2) for (i in channels[channel].indices)
curves[(row * curveWidth + i) * 4 + channel] = channels[channel][i]
}
val trcs = FloatArray(trcWidth * 4)
for (channel in 0..2) for (i in profile.targetCurves[channel].indices)
trcs[i * 4 + channel] = profile.targetCurves[channel][i]
GLES30.glGenTextures(3, textures, 0)
try {
fun texture(index: Int, width: Int, height: Int, values: FloatArray) {
GLES30.glActiveTexture(GLES30.GL_TEXTURE0 + firstTextureUnit + index)
GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, textures[index])
GLES30.glTexParameteri(GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_MIN_FILTER, GLES30.GL_NEAREST)
GLES30.glTexParameteri(GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_MAG_FILTER, GLES30.GL_NEAREST)
GLES30.glTexParameteri(GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_S, GLES30.GL_CLAMP_TO_EDGE)
GLES30.glTexParameteri(GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_T, GLES30.GL_CLAMP_TO_EDGE)
val data = ByteBuffer.allocateDirect(values.size * 4).order(ByteOrder.nativeOrder()).asFloatBuffer()
data.put(values).position(0)
GLES30.glTexImage2D(GLES30.GL_TEXTURE_2D, 0, GLES30.GL_RGBA32F, width, height, 0, GLES30.GL_RGBA, GLES30.GL_FLOAT, data)
check(GLES30.glGetError() == GLES30.GL_NO_ERROR) { "Canon ICC texture allocation failed" }
}
texture(0, profile.grid, profile.grid * profile.grid, cube)
texture(1, curveWidth, 2, curves)
texture(2, trcWidth, 1, trcs)
} catch (failure: Throwable) {
release()
throw failure
}
}
fun release() {
if (textures.any { it != 0 }) GLES30.glDeleteTextures(textures.size, textures, 0)
textures.fill(0)
}
}
@@ -0,0 +1,133 @@
package com.hinnka.mycamera.raw
import java.nio.ByteBuffer
import java.nio.ByteOrder
import kotlin.math.pow
/** Original R5 MLIB ICC → original DPP sRGB profile. No Adobe look or fitted LUT. */
internal class CanonIccProfile private constructor(
val grid: Int,
val clut: FloatArray,
val inputCurves: Array<FloatArray>,
val outputCurves: Array<FloatArray>,
val targetCurves: Array<FloatArray>,
/** Column-major inverse of the output profile's RGB→XYZ D50 matrix. */
val xyzToTarget: FloatArray,
val pcsWhite: FloatArray,
) {
/** ICC tetrahedral reference, independent of the GLES implementation; not an original UCS oracle. */
fun evaluate(rgb: FloatArray): FloatArray {
require(rgb.size == 3 && rgb.all { it.isFinite() })
val p = FloatArray(3) { sample(inputCurves[it], rgb[it]) * (grid - 1) }
val base = IntArray(3) { p[it].toInt().coerceAtMost(grid - 2) }
val fraction = FloatArray(3) { p[it] - base[it] }
val order = (0..2).sortedByDescending { fraction[it] }
fun corner(index: IntArray, channel: Int) = clut[((index[0] * grid + index[1]) * grid + index[2]) * 3 + channel]
val vertices = Array(4) { base.copyOf() }
for (i in 1..3) {
vertices[i] = vertices[i - 1].copyOf()
vertices[i][order[i - 1]]++
}
val f = order.map { fraction[it] }
val weights = floatArrayOf(1f - f[0], f[0] - f[1], f[1] - f[2], f[2])
val lab = FloatArray(3) { channel ->
sample(outputCurves[channel], (0..3).sumOf { (corner(vertices[it], channel) * weights[it]).toDouble() }.toFloat())
}
// ICC v2 lut16 PCS Lab: L*=100 is 0xff00; a*=b*=0 is 0x8000.
val fy = (lab[0] * (65535f / 65280f) * 100f + 16f) / 116f
val fx = fy + (lab[1] * (65535f / 256f) - 128f) / 500f
val fz = fy - (lab[2] * (65535f / 256f) - 128f) / 200f
fun labInverse(v: Float) = if (v > 6f / 29f) v * v * v else (v - 4f / 29f) * (108f / 841f)
val xyz = floatArrayOf(labInverse(fx) * pcsWhite[0], labInverse(fy) * pcsWhite[1], labInverse(fz) * pcsWhite[2])
return FloatArray(3) { channel ->
val linear = xyzToTarget[channel] * xyz[0] + xyzToTarget[3 + channel] * xyz[1] + xyzToTarget[6 + channel] * xyz[2]
val encoded = inverse(targetCurves[channel], linear)
if (encoded <= 0.04045f) encoded / 12.92f else ((encoded + 0.055f) / 1.055f).pow(2.4f)
}
}
companion object {
private fun sample(curve: FloatArray, value: Float): Float {
val p = value.coerceIn(0f, 1f) * (curve.size - 1)
val i = p.toInt().coerceAtMost(curve.lastIndex - 1)
return curve[i] + (curve[i + 1] - curve[i]) * (p - i)
}
private fun inverse(curve: FloatArray, value: Float): Float {
if (value <= curve.first()) return 0f
if (value >= curve.last()) return 1f
var lo = 0
var hi = curve.lastIndex
while (hi - lo > 1) {
val mid = (lo + hi) ushr 1
if (curve[mid] <= value) lo = mid else hi = mid
}
val span = curve[hi] - curve[lo]
return (lo + if (span > 0f) (value - curve[lo]) / span else 0f) / curve.lastIndex
}
private class Icc(val raw: ByteArray) {
val buffer: ByteBuffer = ByteBuffer.wrap(raw).order(ByteOrder.BIG_ENDIAN)
init {
require(raw.size >= 132 && buffer.getInt(0) == raw.size && text(36) == "acsp") { "Invalid Canon ICC header" }
require(text(16) == "RGB ") { "Expected RGB Canon ICC" }
}
fun text(offset: Int) = String(raw, offset, 4, Charsets.US_ASCII)
fun tag(name: String): IntRange {
val count = buffer.getInt(128)
require(count in 1..128 && 132L + count * 12L <= raw.size)
for (i in 0 until count) {
val offset = 132 + i * 12
if (text(offset) == name) {
val start = buffer.getInt(offset + 4)
val size = buffer.getInt(offset + 8)
require(start >= 128 && size >= 8 && start.toLong() + size <= raw.size)
return start until start + size
}
}
error("Canon ICC tag missing: $name")
}
fun fixed(offset: Int) = buffer.getInt(offset) / 65536f
fun u16(offset: Int) = (buffer.getShort(offset).toInt() and 65535) / 65535f
fun xyz(name: String): FloatArray {
val tag = tag(name)
require(text(tag.first) == "XYZ " && tag.count() >= 20)
return FloatArray(3) { fixed(tag.first + 8 + it * 4) }
}
fun curve(name: String): FloatArray {
val tag = tag(name)
require(text(tag.first) == "curv" && tag.count() >= 12)
val size = buffer.getInt(tag.first + 8)
require(size in 2..65536 && 12L + size * 2L <= tag.count()) { "Expected sampled Canon output TRC" }
return FloatArray(size) { u16(tag.first + 12 + it * 2) }.also { curve ->
require((1 until curve.size).all { curve[it - 1] <= curve[it] }) { "Non-monotonic Canon output TRC" }
}
}
}
fun parse(styleIcc: ByteArray, outputIcc: ByteArray): CanonIccProfile {
val source = Icc(styleIcc)
val target = Icc(outputIcc)
require(source.text(20) == "Lab " && (styleIcc[8].toInt() and 255) == 2) { "Expected Canon v2 Lab PCS" }
val range = source.tag("A2B0")
val start = range.first
require(source.text(start) == "mft2" && styleIcc[start + 8].toInt() == 3 && styleIcc[start + 9].toInt() == 3)
val grid = styleIcc[start + 10].toInt() and 255
require(grid in 2..65)
for (i in 0 until 9) require(source.fixed(start + 12 + i * 4) == if (i % 4 == 0) 1f else 0f) { "Non-identity Canon mft2 matrix" }
val n = source.buffer.getShort(start + 48).toInt() and 65535
val m = source.buffer.getShort(start + 50).toInt() and 65535
require(n >= 2 && m >= 2 && 52L + (3L * n + 3L * grid * grid * grid + 3L * m) * 2 <= range.count())
var cursor = start + 52
val input = Array(3) { FloatArray(n) { source.u16(cursor).also { cursor += 2 } } }
val clut = FloatArray(grid * grid * grid * 3) { source.u16(cursor).also { cursor += 2 } }
val output = Array(3) { FloatArray(m) { source.u16(cursor).also { cursor += 2 } } }
val columns = arrayOf(target.xyz("rXYZ"), target.xyz("gXYZ"), target.xyz("bXYZ"))
val a=columns[0][0]; val b=columns[1][0]; val c=columns[2][0]
val d=columns[0][1]; val e=columns[1][1]; val f=columns[2][1]
val g=columns[0][2]; val h=columns[1][2]; val i=columns[2][2]
val determinant = a*(e*i-f*h)-b*(d*i-f*g)+c*(d*h-e*g)
require(determinant.isFinite() && kotlin.math.abs(determinant) > 1e-8f)
val inverse = floatArrayOf(e*i-f*h, f*g-d*i, d*h-e*g, c*h-b*i, a*i-c*g, b*g-a*h, b*f-c*e, c*d-a*f, a*e-b*d)
for (index in inverse.indices) inverse[index] /= determinant
return CanonIccProfile(grid, clut, input, output, arrayOf(target.curve("rTRC"),target.curve("gTRC"),target.curve("bTRC")), inverse, FloatArray(3) { source.fixed(68 + it * 4) })
}
}
}
@@ -0,0 +1,87 @@
package com.hinnka.mycamera.raw
/** ICC-standard tetrahedral interpolation; numerical equality to Canon UCS is not asserted. */
internal object CanonIccShader {
val UNIFORMS = """
uniform highp sampler2D uCanonIccClut;
uniform highp sampler2D uCanonIccCurves;
uniform highp sampler2D uCanonIccTargetTrc;
uniform int uCanonIccGrid;
uniform ivec2 uCanonIccCurveSizes;
uniform ivec3 uCanonIccTrcSizes;
uniform mat3 uCanonIccXyzToTarget;
uniform vec3 uCanonIccPcsWhite;
""".trimIndent()
val FUNCTIONS = """
float canonIccCurve(float value, int channel, int row, int count) {
float p = clamp(value, 0.0, 1.0) * float(count - 1);
int i = min(int(p), count - 2);
float a = texelFetch(uCanonIccCurves, ivec2(i, row), 0)[channel];
float b = texelFetch(uCanonIccCurves, ivec2(i + 1, row), 0)[channel];
return mix(a, b, p - float(i));
}
vec3 canonIccCorner(ivec3 index) {
return texelFetch(uCanonIccClut, ivec2(index.b, index.r * uCanonIccGrid + index.g), 0).rgb;
}
vec3 canonIccTetrahedron(vec3 inputRgb) {
vec3 p = clamp(inputRgb, 0.0, 1.0) * float(uCanonIccGrid - 1);
ivec3 base = min(ivec3(p), ivec3(uCanonIccGrid - 2));
vec3 f = p - vec3(base);
ivec3 a; ivec3 b; vec3 weights;
if (f.r >= f.g) {
if (f.g >= f.b) { a=ivec3(1,0,0); b=ivec3(1,1,0); weights=f.rgb; }
else if (f.r >= f.b) { a=ivec3(1,0,0); b=ivec3(1,0,1); weights=f.rbg; }
else { a=ivec3(0,0,1); b=ivec3(1,0,1); weights=f.brg; }
} else {
if (f.r >= f.b) { a=ivec3(0,1,0); b=ivec3(1,1,0); weights=f.grb; }
else if (f.g >= f.b) { a=ivec3(0,1,0); b=ivec3(0,1,1); weights=f.gbr; }
else { a=ivec3(0,0,1); b=ivec3(0,1,1); weights=f.bgr; }
}
return canonIccCorner(base) * (1.0 - weights.x)
+ canonIccCorner(base+a) * (weights.x - weights.y)
+ canonIccCorner(base+b) * (weights.y - weights.z)
+ canonIccCorner(base+ivec3(1)) * weights.z;
}
float canonIccInverseTrc(float value, int channel, int count) {
float first = texelFetch(uCanonIccTargetTrc, ivec2(0), 0)[channel];
float last = texelFetch(uCanonIccTargetTrc, ivec2(count-1,0), 0)[channel];
if (value <= first) return 0.0;
if (value >= last) return 1.0;
int lo=0; int hi=count-1;
for (int step=0; step<16; ++step) {
if (hi-lo <= 1) break;
int middle=(lo+hi)/2;
float v=texelFetch(uCanonIccTargetTrc,ivec2(middle,0),0)[channel];
if (v <= value) lo=middle; else hi=middle;
}
float a=texelFetch(uCanonIccTargetTrc,ivec2(lo,0),0)[channel];
float b=texelFetch(uCanonIccTargetTrc,ivec2(hi,0),0)[channel];
float fraction=b>a ? (value-a)/(b-a) : 0.0;
return (float(lo)+fraction)/float(count-1);
}
float canonIccLabInverse(float v) {
return v > 6.0/29.0 ? v*v*v : (v-4.0/29.0)*(108.0/841.0);
}
float canonIccSrgbDecode(float v) {
return v <= 0.04045 ? v/12.92 : pow((v+0.055)/1.055,2.4);
}
vec3 canonIccToLinearSrgb(vec3 rawRecipeRgbNormalized) {
vec3 shaped;
for (int c=0; c<3; ++c)
shaped[c]=canonIccCurve(rawRecipeRgbNormalized[c],c,0,uCanonIccCurveSizes.x);
vec3 pcs=canonIccTetrahedron(shaped);
for (int c=0; c<3; ++c)
pcs[c]=canonIccCurve(pcs[c],c,1,uCanonIccCurveSizes.y);
float fy=(pcs.x*(65535.0/65280.0)*100.0+16.0)/116.0;
float fx=fy+(pcs.y*(65535.0/256.0)-128.0)/500.0;
float fz=fy-(pcs.z*(65535.0/256.0)-128.0)/200.0;
vec3 xyz=vec3(canonIccLabInverse(fx),canonIccLabInverse(fy),canonIccLabInverse(fz))*uCanonIccPcsWhite;
vec3 targetLinear=uCanonIccXyzToTarget*xyz;
vec3 outputRgb;
for (int c=0; c<3; ++c)
outputRgb[c]=canonIccSrgbDecode(canonIccInverseTrc(targetLinear[c],c,uCanonIccTrcSizes[c]));
return outputRgb;
}
""".trimIndent()
}
@@ -0,0 +1,19 @@
package com.hinnka.mycamera.raw
/** Built-in Canon color/tone styles; persisted IDs are independent of display labels. */
enum class CanonPictureStyle(val persistedValue: String, val dppStyleId: Int) {
Standard("standard", 0x81),
Portrait("portrait", 0x82),
Landscape("landscape", 0x83),
Neutral("neutral", 0x84),
Faithful("faithful", 0x85),
Monochrome("monochrome", 0x86);
companion object {
fun fromPersistedValue(value: String?): CanonPictureStyle =
entries.firstOrNull {
it.persistedValue.equals(value, ignoreCase = true) ||
it.name.equals(value, ignoreCase = true)
} ?: Standard
}
}
@@ -0,0 +1,94 @@
package com.hinnka.mycamera.raw
import android.content.Context
import com.google.gson.JsonParser
import java.nio.ByteBuffer
import java.nio.ByteOrder
import java.security.MessageDigest
/** Fixed EOS R5 color recipe, independent of the source sensor's ISO and HDR implementation. */
internal data class CanonRenderPlan(
val style: CanonPictureStyle,
val kernelWords: IntArray,
val lookupAtlas: FloatArray,
val icc: CanonIccProfile,
)
internal object CanonProfile {
const val ATLAS_WIDTH = 1024
const val ATLAS_HEIGHT = 324
private const val ROOT = "canon/eos_r5"
private val cache = mutableMapOf<CanonPictureStyle, CanonRenderPlan>()
@Synchronized
fun createRenderPlan(context: Context, style: CanonPictureStyle): CanonRenderPlan =
cache.getOrPut(style) {
load(style) { path -> context.assets.open(path).use { it.readBytes() } }
}
internal fun load(style: CanonPictureStyle, read: (String) -> ByteArray): CanonRenderPlan {
val pixelManifest = JsonParser.parseString(String(read("$ROOT/pixel-manifest.json"), Charsets.UTF_8)).asJsonObject
require(pixelManifest["kernelRva"].asString == "0x1f5b20") { "Canon EOS R5 requires the native YUV kernel" }
val directory = "$ROOT/${style.persistedValue}"
val manifest = JsonParser.parseString(String(read("$directory/gamma-manifest.json"), Charsets.UTF_8)).asJsonObject
require(manifest["modelId"].asString == "0x80000421")
require(manifest["styleId"].asString.removePrefix("0x").toInt(16) == style.dppStyleId)
// The native Model provider selects gamma_c from this legacy property. A missing
// value silently compiles a different curve while gamma_y remains valid. Keep the
// fixed R5 ISO100 reference consistent with the native seed compiler.
require(manifest.getAsJsonObject("modelProvider")
.getAsJsonObject("properties")["0x1000a"]?.asString == "64000000") {
"Canon EOS R5 requires the explicit reference recipe property 0x1000a=100"
}
fun verified(name: String, size: Int): ByteArray {
val bytes = read("$directory/$name")
require(bytes.size == size) { "Invalid Canon asset length: $name" }
val expected = manifest.getAsJsonObject("files").getAsJsonObject(name)["sha256"].asString
val hash = MessageDigest.getInstance("SHA-256").digest(bytes)
.joinToString("") { "%02x".format(it.toInt() and 255) }
require(hash == expected) { "Canon asset fingerprint mismatch: $name" }
return bytes
}
fun ints(bytes: ByteArray): IntArray {
val buffer = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN).asIntBuffer()
return IntArray(buffer.remaining()).also(buffer::get)
}
val words = ints(verified("kernel_words.i32le", 0x168 * 4))
CanonR5ChromaMath.validate(CanonRecipeColorMath.R5PixelParameters(words))
// Validate the original color block separately from the prepared scalar block.
CanonRecipeColorMath.R5RecombinationParameters.fromRawParameters(
verified("parameters.bin", 0x900),
)
val y = ints(verified("gamma_y.i32le", 0x20000 * 4))
val c = ints(verified("gamma_c.i32le", 0x20000 * 4))
val uv = ints(verified("gamma_uv.i32le", 0x10000 * 4))
val weightBytes = verified("chroma_weights.u16le", 4096 * 2)
val weights = ByteBuffer.wrap(weightBytes).order(ByteOrder.LITTLE_ENDIAN)
val atlas = FloatArray(ATLAS_WIDTH * ATLAS_HEIGHT)
var offset = 0
for (table in arrayOf(y, c, uv)) for (value in table) {
require(value in -16_777_216..16_777_216) { "Canon table exceeds exact Float integer range" }
atlas[offset++] = value.toFloat()
}
repeat(4096) { atlas[offset++] = (weights.short.toInt() and 65535).toFloat() }
check(offset == atlas.size)
// The shared program declares its ICC samplers in every style. Keep valid,
// nonaliasing bindings for Monochrome, which bypasses the ICC function entirely.
val iccStyle = if (style == CanonPictureStyle.Monochrome) CanonPictureStyle.Standard else style
val profiles = JsonParser.parseString(String(read("$ROOT/profiles/profile_manifest.json"), Charsets.UTF_8)).asJsonObject
val entry = profiles.getAsJsonArray("profiles").map { it.asJsonObject }
.single { it["style"].asString == iccStyle.persistedValue }
fun verifiedIcc(name: String, expected: String): ByteArray {
val bytes = read("$ROOT/profiles/$name")
val hash = MessageDigest.getInstance("SHA-256").digest(bytes)
.joinToString("") { "%02x".format(it.toInt() and 255) }
require(hash == expected) { "Canon ICC fingerprint mismatch: $name" }
return bytes
}
val icc = CanonIccProfile.parse(
verifiedIcc(entry["icc"].asString, entry["sha256"].asString),
verifiedIcc("output_srgb.icc", profiles["outputProfileSha256"].asString),
)
return CanonRenderPlan(style, words, atlas, icc)
}
}
@@ -0,0 +1,76 @@
package com.hinnka.mycamera.raw
/** Fixed R5 color block consumed by 0x22d5a0 after the Q8 UV curve and Q13 mixing.
* All six recovered recipes enable only region 0 and diagonal UV gains. Validate that
* contract before specializing the native three-region evaluator; no region is guessed.
*/
internal object CanonR5ChromaMath {
fun validate(p: CanonRecipeColorMath.R5PixelParameters) {
fun w(i: Int) = p[0x122 + i]
require((0..2).all { w(it) == 1 })
for (base in intArrayOf(45, 55)) {
require(w(base) == 1 && w(base + 1) == 0 && w(base + 2) == 1 && w(base + 3) == 1)
require((5..9).all { w(base + it) == 0 })
}
}
private fun sector(code: Int, first: Int, second: Int): Int {
val quadrant = (code shr 5) and 3
val u = if (quadrant < 2) first.inv() else first
val v = if (quadrant == 1 || quadrant == 2) second.inv() else second
val angle = code and 63
val a = if (angle > 31) 64 - angle else angle
val b = if (angle > 31) angle - 32 else 32 - angle
val value = a * u + b * v
val result = when ((code shr 8) and 7) {
0 -> (value * 3) shr 6
1 -> value shr 4
2 -> (value * 3) shr 5
3 -> value shr 3
4 -> (value * 3) shr 4
5 -> (((value * 3) shr 1) + value * 3) shr 4
6 -> value shr 1
else -> value
}
return result.coerceIn(0, 1023)
}
private fun radialScale(value: Int, code: Int): Int = minOf(1023, when ((code shr 11) and 7) {
0 -> (value * 3) shr 2
1 -> value
2 -> (value shr 2) + value
3 -> (value * 3) shr 1
4 -> value * 2
5 -> value * 3
6 -> ((value * 3) shr 1) + value * 3
else -> value * 8
})
private fun shift(value: Int, amount: Int): Int =
if (amount < 0) value shr (-amount and 31) else value shl (amount and 31)
fun apply(u: Int, v: Int, colorLuma: Int, p: CanonRecipeColorMath.R5PixelParameters): Pair<Int, Int> {
fun w(i: Int) = p[0x122 + i]
val lumaIndex = colorLuma shr 4
val delta = lumaIndex - w(8)
val threshold = if (w(4) == 0) w(3) and 2047 else minOf(2047,
if (delta < 0) ((w(5) * lumaIndex) shr 7) + (w(3) and 2047)
else ((w(6) * delta.coerceIn(0, 1023)) shr 7) + w(7))
val sectorA = sector(w(21), u shr 4, v shr 4)
val sectorB = sector(w(22), u shr 4, v shr 4)
val sectorWeight = if ((w(21) and 128) != 0) maxOf(sectorA, sectorB) else minOf(sectorA, sectorB)
val ru = shift(u, w(25) - 4).coerceIn(-1024, 1023).let { if (it < 0) it.inv() else it }
val rv = shift(v, w(25) - 4).coerceIn(-1024, 1023).let { if (it < 0) it.inv() else it }
val radius = maxOf(ru + rv * 2, rv + ru * 2)
val inner = radialScale((radius - threshold * 2).coerceIn(0, 2047), w(23))
val outer = radialScale(((w(24) and 2047) * 2 - radius).coerceIn(0, 2047), w(24))
val light = shift(colorLuma, w(28) - 4).coerceIn(0, 1023)
val lower = ((light * 2 - (w(26) and 2047)).coerceIn(0, 1023) shl ((w(26) shr 11) and 3)).coerceAtMost(1023)
val upper = (((w(27) and 2047) - light * 2).coerceIn(0, 1023) shl ((w(27) shr 11) and 3)).coerceAtMost(1023)
val weight = minOf(sectorWeight, inner, outer, lower, upper)
val gainU = (w(49) * weight) shr 7
val gainV = (w(59) * weight) shr 7
return (u + ((u * gainU) shr 10)).coerceIn(-16384, 16383) * 2 to
(v + ((v * gainV) shr 10)).coerceIn(-16384, 16383) * 2
}
}
@@ -0,0 +1,131 @@
package com.hinnka.mycamera.raw
import java.nio.ByteBuffer
import java.nio.ByteOrder
import java.security.MessageDigest
/**
* EOS R5 (DPP ModelID 0x80000421, internal index 0x67) branch of RVA 0x126b60.
* This compiles UInt16 recipe seeds, NOT final gamma curves or a complete render plan.
*
* Scope: six built-in styles, ordinary still-color selector mode, output color-space ID 1.
* DPP HDR/override arguments are fixed to their ordinary branch (0, 0, -1); this does not
* inspect or alter the host's usePhotonHdr, PGTM or HDR rendering.
*/
internal class CanonR5SeedCompiler private constructor(private val sources: Map<Int, IntArray>) {
/**
* These are original selector inputs, not user controls. parameter1000a comes from DPP
* native ISO property 0x1000a (possibly adjusted by 0x1ff597). The EXIF parser writes
* the same ISO into the public 0x10026 alias; see iso-property-audit.md.
* highlightTonePriority is the caller's `property(0x10010) > 1` result.
* flag1e0001 is the caller's property 0x1e0001; retain its identifier until decoded.
*/
data class Input(
val style: CanonPictureStyle,
val parameter1000a: Int,
val highlightTonePriority: Boolean,
val flag1e0001: Boolean,
)
/** Never interchangeable with CanonColorMath.CoarseInt32Curve. */
class SeedCurve internal constructor(val sourceRva: Int, private val words: IntArray) {
val size: Int get() = words.size
operator fun get(index: Int): Int = words[index]
fun copyWords(): IntArray = words.copyOf()
}
class Seeds internal constructor(private val slots: List<SeedCurve>) {
// DPP prepares object slots in the order 0, 1, 3, 2. Indices here are the selector
// argument, not inferred gamma_y/c/uv names or object memory offsets.
operator fun get(selectorSlot: Int): SeedCurve = slots[selectorSlot]
val scale: Int get() = 100
}
fun compile(input: Input): Seeds = Seeds(List(4) { slot ->
val rva = selectSource(slot, input)
val source = requireNotNull(sources[rva]) { "Missing audited Canon seed table" }
val words = source.copyOf()
if (input.flag1e0001 && slot != 3) {
val threshold = when (slot) { 0 -> 66.0; 1 -> 1023.0; else -> 445.0 }
val endpointScale = when (slot) { 0 -> 0.8; 1 -> 1.0; else -> 0.85 }
for (index in words.indices) {
val x = index.toDouble()
val address = if (x <= threshold) index else {
((((x - threshold) * (endpointScale - 1.0)) / (1024.0 - threshold) + 1.0) * x)
.toInt().coerceIn(0, 1023)
}
words[index] = source[address]
if (slot == 2 && input.parameter1000a == 102400 && x < 22.0) {
// Original constant at RVA 0x426ae0 and uint16 store/clip order.
words[index] = ((x * 34.54545454545455 + 256.0).toInt() and 0xffff)
.coerceAtMost(1016)
}
}
}
SeedCurve(rva, words)
})
private fun selectSource(slot: Int, input: Input): Int {
val neutralFamily = input.style == CanonPictureStyle.Neutral ||
input.style == CanonPictureStyle.Faithful
val priority = input.highlightTonePriority
val at50 = input.parameter1000a == 50
return when (slot) {
0 -> when {
priority -> 0x3ffad0
at50 -> 0x400ad0
neutralFamily -> 0x3fead0
else -> 0x3fe2d0
}
1 -> if (neutralFamily) 0x4042d0 else 0x3cfad0
2 -> when {
priority && neutralFamily -> 0x3e02d0
priority -> if (input.parameter1000a < 1600) 0x4032d0 else 0x403ad0
neutralFamily -> if (at50) 0x3d82d0 else 0x402ad0
at50 -> 0x4012d0
input.parameter1000a < 1600 -> 0x401ad0
else -> 0x4022d0
}
3 -> 0x3c62d0
else -> error("Invalid Canon seed selector slot")
}
}
companion object {
const val ASSET_PATH = "canon/eos_r5/recipe_seeds.bin"
private const val MODEL_ID = 0x80000421L
private const val ASSET_SHA256 = "42722abfd6e478e84ee567b90c8cde34abb861046119a67f117c1863b7f36f40"
private const val DLL_SHA256 = "534157b14d45168e203beaec2176e6d0867e679b47c42f4b325e1413691d3a6c"
private val SOURCE_RVAS = setOf(
0x3c62d0, 0x3cfad0, 0x3d82d0, 0x3e02d0, 0x3fe2d0, 0x3fead0,
0x3ffad0, 0x400ad0, 0x4012d0, 0x401ad0, 0x4022d0, 0x402ad0,
0x4032d0, 0x403ad0, 0x4042d0,
)
/** All bytes and identities are checked before any source table can be used. */
fun fromAsset(bytes: ByteArray): CanonR5SeedCompiler {
val data = bytes.copyOf()
require(hex(MessageDigest.getInstance("SHA-256").digest(data)) == ASSET_SHA256) {
"Canon R5 seed asset fingerprint mismatch"
}
val buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN)
require(buffer.int == 0x31535243 && buffer.int == 1) { "Invalid Canon seed format" }
require(buffer.int.toLong() and 0xffffffffL == MODEL_ID) { "Wrong Canon seed model" }
val count = buffer.int
require(count == SOURCE_RVAS.size && data.size == 48 + count * 2052) {
"Invalid Canon seed asset length"
}
val dllHash = ByteArray(32).also(buffer::get)
require(hex(dllHash) == DLL_SHA256) { "Wrong Canon seed source version" }
val tables = mutableMapOf<Int, IntArray>()
repeat(count) {
val rva = buffer.int
require(rva in SOURCE_RVAS && rva !in tables) { "Invalid Canon seed record" }
tables[rva] = IntArray(1024) { buffer.short.toInt() and 0xffff }
}
return CanonR5SeedCompiler(tables)
}
private fun hex(bytes: ByteArray): String = bytes.joinToString("") { "%02x".format(it) }
}
}
@@ -0,0 +1,214 @@
package com.hinnka.mycamera.raw
import java.nio.ByteBuffer
import java.nio.ByteOrder
import kotlin.math.abs
/**
* Audited ordinary R5 RawRecipe arithmetic, separate from RGBRecipe's different LUT contract.
* The complete pixel path is a CPU reference; input calibration and Profile processing belong
* outside it, so this is not itself the complete floating-point Picture Style renderer.
*/
internal object CanonRecipeColorMath {
/** The native R5 store contract: unsigned luminance and signed chroma, before RGB conversion. */
data class Yuv(val y: Int, val u: Int, val v: Int)
/** CDppRecipedYUV2RGBProc (0x206090), ordinary non-HDR, before ProfileProc. */
fun yuvToRgb(value: Yuv): IntArray {
val (y, u, v) = value
return intArrayOf(
(((v * 0xb37 + y * 0x800 - u) * 2 + 0x800) / 4096).coerceIn(0, 65535),
((y * 0x1002 - v * 0xb6d - u * 0x584 + 0x800) / 4096).coerceIn(0, 65535),
((y * 0xfff + u * 0x1c56 + 0x800) / 4096).coerceIn(0, 65535),
)
}
/** Final R5 gamma_uv table: 65,536 signed Int32 entries, consumed as Q8 radial gains. */
class R5UvGainTable(entries: IntArray) {
init {
require(entries.size == 65_536) { "R5 gamma_uv requires 65536 Int32 entries" }
}
private val values = entries.copyOf()
internal operator fun get(index: Int): Int = values[index]
}
/** Final direct table for RawRecipe Y or C, distinct from RGBRecipe's 65536-entry table. */
class RawGammaTable(entries: IntArray) {
init {
require(entries.size == 0x20000) { "RawRecipe Y/C requires 131072 Int32 entries" }
}
private val values = entries.copyOf()
internal operator fun get(index: Int): Int {
require(index in values.indices) { "RawRecipe input escaped its prepared LUT domain" }
return values[index]
}
}
class ChromaWeightTable(entries: IntArray) {
init {
require(entries.size == 1024 && entries.all { it in 0..65535 }) {
"RawRecipe chroma weights require 1024 UInt16 entries"
}
}
private val values = entries.copyOf()
internal operator fun get(index: Int): Int = values[index]
}
/**
* Scalar fields from the original prepared 0x1f5b20 argument block (Int32 word offsets).
* Native pointer fields are unused here: all tables are passed separately. Construct this
* only from a recovered recipe compiler; this class supplies no neutral guesses for fields.
* This entry accepts an already white-balanced input and excludes spatial processing.
*/
class R5PixelParameters(kernelWords: IntArray) {
init {
require(kernelWords.size == 0x168)
for (offset in intArrayOf(8, 9, 0xb, 0xc, 0xd, 0x31, 0x62, 0xdc, 0x105, 0x107)) {
require(kernelWords[offset] == 0) { "Unsupported R5 kernel flag at word $offset" }
}
require(kernelWords[0xe] == 1 && kernelWords[0x67] == 1)
require(kernelWords[0x30] == 1)
require(kernelWords[1] == 0x20000 && kernelWords[2] > 0 && kernelWords[3] > 0)
require(kernelWords[0xf] in 0..1)
require(kernelWords[0x120] == 1 && kernelWords[0x121] == 1)
}
private val words = kernelWords.copyOf()
internal operator fun get(index: Int): Int = words[index]
internal fun long(index: Int): Long = (words[index].toLong() and 0xffffffffL) or
(words[index + 1].toLong() shl 32)
}
/**
* Ordinary, nonspatial R5 pixel path from RVA 0x1f5b20. Input is the kernel's uint16 BGR
* planes plus its separately prepared auxiliary plane; output is unsigned Y, signed U/V.
* It retains separate luminance/chroma paths, including Monochrome's pre-C offsets.
* Source normalization, auxiliary-plane production and scalar/table compilation remain
* the caller's explicit responsibilities. No WB, exposure, ALO or HDR is added here.
*/
fun renderR5Pixel(
blue: Int,
green: Int,
red: Int,
auxiliaryCode: Int,
p: R5PixelParameters,
gammaY: RawGammaTable,
gammaC: RawGammaTable,
gammaUv: R5UvGainTable,
negativeDifferenceWeight: ChromaWeightTable,
luminanceWeight: ChromaWeightTable,
positiveDifferenceWeight: ChromaWeightTable,
secondDifferenceWeight: ChromaWeightTable,
recombination: R5RecombinationParameters,
): Yuv {
require(blue in 0..65535 && green in 0..65535 && red in 0..65535 && auxiliaryCode in 0..65535)
val range = p[1]
val scaleNumerator = p[2]
val scaleDenominator = p[3]
val preLimit = p.long(0x84).toInt()
var b = (blue * 2 * scaleNumerator / scaleDenominator).coerceAtMost(preLimit)
var g = (green * 2 * scaleNumerator / scaleDenominator).coerceAtMost(preLimit)
var r = (red * 2 * scaleNumerator / scaleDenominator).coerceAtMost(preLimit)
fun indexCode(value: Int, limit: Int): Int =
((value.toLong() * p.long(0x76) * 4 / 4096).toInt())
.coerceAtMost(limit)
val ri = indexCode(r, p.long(0x70).toInt())
val gi = indexCode(g, p.long(0x72).toInt())
val bi = indexCode(b, p.long(0x74).toInt())
val lumaIndex = ((gi + bi * 2 + ri) / 128).coerceIn(0, 1023)
val firstDifferenceIndex = (gi - ri) / 32
val secondDifferenceIndex = ((gi - bi) / 32).coerceIn(0, 1023)
b = b.coerceAtMost(p.long(0x6e).toInt())
g = g.coerceAtMost(p.long(0x6c).toInt())
r = r.coerceAtMost(p.long(0x6a).toInt())
val initialU = (blue * 0x800 - green * 0x54c - red * 0x2b3) / 4096
val initialV = (red * 0x800 - green * 0x6b2 - blue * 0x14d) / 4096
val reconstructedB = (auxiliaryCode * 0xfff + 0x800 + initialU * 0x1c56) / 4096 * 2
val reconstructedG = (auxiliaryCode * 0x1002 - initialV * 0xb6d - initialU * 0x584 + 0x800) / 4096 * 2
val reconstructedR = ((initialV * 0xb37 + auxiliaryCode * 0x800 - initialU) * 2 + 0x800) / 4096 * 2
fun yInput(value: Int): Int = (value * scaleNumerator / scaleDenominator)
.coerceAtMost(range - 1).coerceIn(0, p.long(0x68).toInt())
.let { if (it > range) range - 1 else it }
val y = ((
gammaY[yInput(reconstructedR)] * p[0x2a] +
gammaY[yInput(reconstructedG)] * p[0x2b] +
gammaY[yInput(reconstructedB)] * p[0x2c] + 0x800
) / 4096).coerceIn(0, 65535)
val firstDifference = ((p[0x12] * (b - g) + p[0x10] * (r - g)) / 1024)
.coerceIn(-range, range)
val secondDifference = ((p[0x1a] * (b - g) + p[0x18] * (r - g)) / 1024)
.coerceIn(-range, range)
val differenceWeight = if (firstDifferenceIndex >= 0) {
positiveDifferenceWeight[firstDifferenceIndex.coerceAtMost(1023)]
} else {
negativeDifferenceWeight[(-firstDifferenceIndex).coerceAtMost(1023)]
}
val weight = minOf(luminanceWeight[lumaIndex], differenceWeight, secondDifferenceWeight[secondDifferenceIndex])
val firstGain = p[if (firstDifference > 0) 0x25 else 0x26]
val secondGain = p[if (secondDifference > 0) 0x23 else 0x24]
val firstOffset = ((weight * firstDifference / 1024) * firstGain / 128)
.coerceAtMost(p.long(0x88).toInt())
val secondOffset = ((weight * secondDifference / 1024) * secondGain / 128)
.coerceAtMost(p.long(0x88).toInt())
val base = (p[0x1d] * g + p[0x1e] * b + p[0x1c] * r) / 1024
val colorFirst = base + firstOffset
val colorThird = base + secondOffset
val colorSecond = ((base * 9 - colorThird) * 0x600 - colorFirst * 0x1000) / 0x2000
fun cLookup(value: Int, monoOffset: Int): Int {
val input = value.coerceIn(1 - range, range - 1) + if (p[0xf] == 1) monoOffset else 0
return if (input < 0) {
gammaC[0] * 2 - gammaC[-input]
} else {
gammaC[input.coerceAtMost(p.long(0x86).toInt())]
}
}
val c1 = cLookup(colorFirst, p[0x2d])
val c2 = cLookup(colorSecond, p[0x2e])
val c3 = cLookup(colorThird, p[0x2f])
val d1 = ((c3 * 0x800 - c2 * 0x550 - c1 * 0x2b0) / 4096).coerceIn(-32768, 32767)
val d2 = ((c1 * 0x800 - c2 * 0x6b0 - c3 * 0x150) / 4096).coerceIn(-32768, 32767)
val gain = gammaUv[(if (abs(d1) < abs(d2)) d2 else d1) + 32768]
val u = gain * d1 / 256
val v = gain * d2 / 256
val mixedU = (u + (recombination.secondToFirst + if (v <= 0) recombination.nonpositiveSecondExtra else 0) * v / 8192)
.coerceIn(-32768, 32767)
val mixedV = (v + (recombination.firstToSecond + if (u <= 0) recombination.nonpositiveFirstExtra else 0) * u / 8192)
.coerceIn(-32768, 32767)
val weightedColor = p[0x163].toShort().toInt() * c1 + (p[0x163] shr 16) * c2 +
p[0x164].toShort().toInt() * c3
val colorLuma = (weightedColor + ((weightedColor shr 31) and 63)) shr 8
val corrected = CanonR5ChromaMath.apply(mixedU shr 1, mixedV shr 1, colorLuma, p)
return Yuv((y shr 2) * 4, corrected.first, corrected.second)
}
class R5RecombinationParameters private constructor(
internal val nonpositiveSecondExtra: Int,
internal val nonpositiveFirstExtra: Int,
internal val secondToFirst: Int,
internal val firstToSecond: Int,
) {
companion object {
/**
* Extracts the signed coefficients actually copied by RVA 0x1e0410 from property
* 0x2e0f00 into kernel fields 0x1f..0x22. Caller must supply the selected R5 recipe.
* Unsupported optional color branches are rejected, never silently disabled.
*/
fun fromRawParameters(property2e0f00: ByteArray): R5RecombinationParameters {
require(property2e0f00.size == 0x900) { "RawRecipe parameters require 0x900 bytes" }
val source = ByteBuffer.wrap(property2e0f00).order(ByteOrder.LITTLE_ENDIAN)
require(source.getInt(0x54) == 0 && source.getInt(0x58) == 0) {
"This R5 reference does not implement optional luminance/chroma correction flags"
}
return R5RecombinationParameters(
source.getShort(0x20).toInt(),
source.getShort(0x22).toInt(),
source.getShort(0x24).toInt(),
source.getShort(0x26).toInt(),
)
}
}
}
}
@@ -0,0 +1,249 @@
package com.hinnka.mycamera.raw
import android.opengl.GLES30
import java.nio.ByteBuffer
import java.nio.ByteOrder
internal object CanonToneShader {
val DEFINITION = RawEngineToneShaderDefinition(
engineUniforms = """
uniform highp sampler2D uCanonRecipeTables;
uniform ivec4 uCanonWords[90];
${CanonIccShader.UNIFORMS}
""".trimIndent(),
engineFunctions = """
${CanonIccShader.FUNCTIONS}
int canonWord(int index) { return uCanonWords[index / 4][index % 4]; }
int canonLookup(int index) {
return int(texelFetch(uCanonRecipeTables, ivec2(index % 1024, index / 1024), 0).r);
}
int canonChromaWord(int i) { return canonWord(0x122 + i); }
int canonChromaSector(int code, int first, int second) {
int quadrant = (code >> 5) & 3;
int u = quadrant < 2 ? ~first : first;
int v = quadrant == 1 || quadrant == 2 ? ~second : second;
int angle = code & 63;
int a = angle > 31 ? 64 - angle : angle;
int b = angle > 31 ? angle - 32 : 32 - angle;
int value = a * u + b * v;
int mode = (code >> 8) & 7;
int result = value;
if (mode == 0) result = (value * 3) >> 6;
else if (mode == 1) result = value >> 4;
else if (mode == 2) result = (value * 3) >> 5;
else if (mode == 3) result = value >> 3;
else if (mode == 4) result = (value * 3) >> 4;
else if (mode == 5) result = (((value * 3) >> 1) + value * 3) >> 4;
else if (mode == 6) result = value >> 1;
return clamp(result, 0, 1023);
}
int canonChromaRadialScale(int value, int code) {
int mode = (code >> 11) & 7;
int result = value * 8;
if (mode == 0) result = (value * 3) >> 2;
else if (mode == 1) result = value;
else if (mode == 2) result = (value >> 2) + value;
else if (mode == 3) result = (value * 3) >> 1;
else if (mode == 4) result = value * 2;
else if (mode == 5) result = value * 3;
else if (mode == 6) result = ((value * 3) >> 1) + value * 3;
return min(1023, result);
}
int canonChromaShift(int value, int amount) {
return amount < 0 ? value >> (-amount & 31) : value << (amount & 31);
}
ivec2 canonCorrectChroma(int u, int v, int colorLuma) {
// R5's six recipes enable only region 0 and diagonal gains;
// CanonR5ChromaMath.validate checks this before uploading the block.
int li = colorLuma >> 4;
int delta = li - canonChromaWord(8);
int threshold = canonChromaWord(3) & 2047;
if (canonChromaWord(4) != 0) {
threshold = min(2047, delta < 0 ?
((canonChromaWord(5) * li) >> 7) + threshold :
((canonChromaWord(6) * clamp(delta, 0, 1023)) >> 7) + canonChromaWord(7));
}
int sectorA = canonChromaSector(canonChromaWord(21), u >> 4, v >> 4);
int sectorB = canonChromaSector(canonChromaWord(22), u >> 4, v >> 4);
int sectorWeight = (canonChromaWord(21) & 128) != 0 ? max(sectorA, sectorB) : min(sectorA, sectorB);
int ru = clamp(canonChromaShift(u, canonChromaWord(25) - 4), -1024, 1023);
int rv = clamp(canonChromaShift(v, canonChromaWord(25) - 4), -1024, 1023);
ru = ru < 0 ? ~ru : ru;
rv = rv < 0 ? ~rv : rv;
int radius = max(ru + rv * 2, rv + ru * 2);
int innerWeight = canonChromaRadialScale(clamp(radius - threshold * 2, 0, 2047), canonChromaWord(23));
int outerWeight = canonChromaRadialScale(clamp((canonChromaWord(24) & 2047) * 2 - radius, 0, 2047), canonChromaWord(24));
int light = clamp(canonChromaShift(colorLuma, canonChromaWord(28) - 4), 0, 1023);
int lower = min(clamp(light * 2 - (canonChromaWord(26) & 2047), 0, 1023) << ((canonChromaWord(26) >> 11) & 3), 1023);
int upper = min(clamp((canonChromaWord(27) & 2047) - light * 2, 0, 1023) << ((canonChromaWord(27) >> 11) & 3), 1023);
int weight = min(min(sectorWeight, min(innerWeight, outerWeight)), min(lower, upper));
int gainU = (canonChromaWord(49) * weight) >> 7;
int gainV = (canonChromaWord(59) * weight) >> 7;
return clamp(ivec2(u + ((u * gainU) >> 10), v + ((v * gainV) >> 10)), ivec2(-16384), ivec2(16383)) * 2;
}
int canonY(int value) {
int inputCode = value * canonWord(2) / canonWord(3);
inputCode = clamp(min(inputCode, 131071), 0, canonWord(0x68));
return canonLookup(inputCode);
}
int canonC(int value, int monoOffset) {
int code = clamp(value, -131071, 131071);
if (canonWord(0xf) == 1) code += monoOffset;
if (code < 0) return 2 * canonLookup(131072) - canonLookup(131072 - code);
return canonLookup(131072 + min(code, canonWord(0x86)));
}
int canonWeightIndex(int value, int limit) {
return min(value * canonWord(0x76) * 4 / 4096, limit);
}
ivec3 canonRecipe(ivec3 rgb) {
int blue = rgb.b; int green = rgb.g; int red = rgb.r;
int scale = canonWord(2); int divisor = canonWord(3);
int preLimit = canonWord(0x84);
int b = min(blue * 2 * scale / divisor, preLimit);
int g = min(green * 2 * scale / divisor, preLimit);
int r = min(red * 2 * scale / divisor, preLimit);
int ri = canonWeightIndex(r, canonWord(0x70));
int gi = canonWeightIndex(g, canonWord(0x72));
int bi = canonWeightIndex(b, canonWord(0x74));
int li = clamp((gi + bi * 2 + ri) / 128, 0, 1023);
int di = (gi - ri) / 32;
int dj = clamp((gi - bi) / 32, 0, 1023);
b = min(b, canonWord(0x6e));
g = min(g, canonWord(0x6c));
r = min(r, canonWord(0x6a));
// Original 0x027990 supplies the fourth plane from this same input RGB.
int auxiliary = (red * 0x4c8 + green * 0x964 + blue * 0x1d4) / 4096;
int initialU = (blue * 0x800 - green * 0x54c - red * 0x2b3) / 4096;
int initialV = (red * 0x800 - green * 0x6b2 - blue * 0x14d) / 4096;
int reconstructedB = (auxiliary * 0xfff + 0x800 + initialU * 0x1c56) / 4096 * 2;
int reconstructedG = (auxiliary * 0x1002 - initialV * 0xb6d - initialU * 0x584 + 0x800) / 4096 * 2;
int reconstructedR = ((initialV * 0xb37 + auxiliary * 0x800 - initialU) * 2 + 0x800) / 4096 * 2;
int y = clamp((canonY(reconstructedR) * canonWord(0x2a) +
canonY(reconstructedG) * canonWord(0x2b) +
canonY(reconstructedB) * canonWord(0x2c) + 0x800) / 4096, 0, 65535);
int firstDifference = clamp((canonWord(0x12) * (b - g) + canonWord(0x10) * (r - g)) / 1024, -131072, 131072);
int secondDifference = clamp((canonWord(0x1a) * (b - g) + canonWord(0x18) * (r - g)) / 1024, -131072, 131072);
int differenceBase = di >= 0 ? 329728 : 327680;
int weight = min(canonLookup(328704 + li), canonLookup(differenceBase + min(abs(di), 1023)));
weight = min(weight, canonLookup(330752 + dj));
int firstGain = canonWord(firstDifference > 0 ? 0x25 : 0x26);
int secondGain = canonWord(secondDifference > 0 ? 0x23 : 0x24);
int firstOffset = min((weight * firstDifference / 1024) * firstGain / 128, canonWord(0x88));
int secondOffset = min((weight * secondDifference / 1024) * secondGain / 128, canonWord(0x88));
int base = (canonWord(0x1d) * g + canonWord(0x1e) * b + canonWord(0x1c) * r) / 1024;
int colorFirst = base + firstOffset;
int colorThird = base + secondOffset;
int colorSecond = ((base * 9 - colorThird) * 0x600 - colorFirst * 0x1000) / 0x2000;
int c1 = canonC(colorFirst, canonWord(0x2d));
int c2 = canonC(colorSecond, canonWord(0x2e));
int c3 = canonC(colorThird, canonWord(0x2f));
int d1 = clamp((c3 * 0x800 - c2 * 0x550 - c1 * 0x2b0) / 4096, -32768, 32767);
int d2 = clamp((c1 * 0x800 - c2 * 0x6b0 - c3 * 0x150) / 4096, -32768, 32767);
int dominant = abs(d1) < abs(d2) ? d2 : d1;
int gain = canonLookup(262144 + dominant + 32768);
int first = gain * d1 / 256;
int second = gain * d2 / 256;
int coeff1 = canonWord(0x21) + (second <= 0 ? canonWord(0x1f) : 0);
int coeff2 = canonWord(0x22) + (first <= 0 ? canonWord(0x20) : 0);
int mixedFirst = clamp(first + coeff1 * second / 8192, -32768, 32767);
int mixedSecond = clamp(second + coeff2 * first / 8192, -32768, 32767);
int colorWeighted = (canonWord(0x163) << 16 >> 16) * c1 +
(canonWord(0x163) >> 16) * c2 + (canonWord(0x164) << 16 >> 16) * c3;
int colorLuma = (colorWeighted + ((colorWeighted >> 31) & 63)) >> 8;
ivec2 uv = canonCorrectChroma(mixedFirst >> 1, mixedSecond >> 1, colorLuma);
return ivec3((y >> 2) * 4, uv);
}
ivec3 canonYuvToRgb(ivec3 yuv) {
// CDppRecipedYUV2RGBProc 0x206090, ordinary path.
int y = yuv.x; int u = yuv.y; int v = yuv.z;
return clamp(ivec3(
((v * 0xb37 + y * 0x800 - u) * 2 + 0x800) / 4096,
(y * 0x1002 - v * 0xb6d - u * 0x584 + 0x800) / 4096,
(y * 0xfff + u * 0x1c56 + 0x800) / 4096
), ivec3(0), ivec3(65535));
}
vec3 applyEngineTone(vec3 color) {
// Original default 0x20302 levels are 14-bit with white code 16383.
// WB, PGTM and exposure have already been applied by the shared pipeline.
ivec3 inputCode = ivec3(clamp(color * 16383.0, 0.0, 65535.0));
vec3 encoded = vec3(canonYuvToRgb(canonRecipe(inputCode))) / 65535.0;
if (canonWord(0xf) == 1) {
return mix(encoded / 12.92, pow((encoded + 0.055) / 1.055, vec3(2.4)),
step(vec3(0.04045), encoded));
}
return canonIccToLinearSrgb(encoded);
}
""".trimIndent(),
)
}
internal class CanonToneAlgorithm(quad: RawFullscreenQuad) :
RawRenderingEngineToneAlgorithm(quad, CanonToneShader.DEFINITION) {
private var tableTexture = 0
private var uploadedPlan: CanonRenderPlan? = null
private var iccResources: CanonIccGlResources? = null
override fun bindEngineResources(program: Int, input: RawEngineTonePass.Input) {
super.bindEngineResources(program, input)
val plan = requireNotNull(input.canonRenderPlan) { "Canon requires an EOS R5 render plan" }
if (uploadedPlan !== plan) upload(plan)
// 2 and 4 belong to public HDR; 7 belongs to PGTM in this same program.
requireNotNull(iccResources).bind(program, 8)
GLES30.glActiveTexture(GLES30.GL_TEXTURE0 + 11)
GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, tableTexture)
GLES30.glUniform1i(GLES30.glGetUniformLocation(program, "uCanonRecipeTables"), 11)
GLES30.glUniform4iv(GLES30.glGetUniformLocation(program, "uCanonWords[0]"), 90, plan.kernelWords, 0)
GLES30.glActiveTexture(GLES30.GL_TEXTURE0)
RawGlesProgram.logErrors("CanonToneAlgorithm.bindEngineResources")
}
private fun upload(plan: CanonRenderPlan) {
releaseEngineResources()
val limit = IntArray(1)
GLES30.glGetIntegerv(GLES30.GL_MAX_TEXTURE_IMAGE_UNITS, limit, 0)
check(limit[0] > 11) { "Canon rendering requires texture units 0 through 11" }
GLES30.glGetIntegerv(GLES30.GL_MAX_TEXTURE_SIZE, limit, 0)
check(maxOf(CanonProfile.ATLAS_WIDTH, CanonProfile.ATLAS_HEIGHT) <= limit[0]) {
"Canon recipe atlas exceeds the device texture size limit"
}
val previousAlignment = IntArray(1)
GLES30.glGetIntegerv(GLES30.GL_UNPACK_ALIGNMENT, previousAlignment, 0)
try {
val id = IntArray(1)
GLES30.glGenTextures(1, id, 0)
tableTexture = id[0]
check(tableTexture != 0) { "Unable to allocate Canon recipe texture" }
GLES30.glActiveTexture(GLES30.GL_TEXTURE0 + 11)
GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, tableTexture)
GLES30.glTexParameteri(GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_MIN_FILTER, GLES30.GL_NEAREST)
GLES30.glTexParameteri(GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_MAG_FILTER, GLES30.GL_NEAREST)
GLES30.glTexParameteri(GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_S, GLES30.GL_CLAMP_TO_EDGE)
GLES30.glTexParameteri(GLES30.GL_TEXTURE_2D, GLES30.GL_TEXTURE_WRAP_T, GLES30.GL_CLAMP_TO_EDGE)
GLES30.glPixelStorei(GLES30.GL_UNPACK_ALIGNMENT, 1)
val data = ByteBuffer.allocateDirect(plan.lookupAtlas.size * 4).order(ByteOrder.nativeOrder()).asFloatBuffer()
data.put(plan.lookupAtlas).position(0)
GLES30.glTexImage2D(GLES30.GL_TEXTURE_2D, 0, GLES30.GL_R32F,
CanonProfile.ATLAS_WIDTH, CanonProfile.ATLAS_HEIGHT, 0, GLES30.GL_RED, GLES30.GL_FLOAT, data)
check(GLES30.glGetError() == GLES30.GL_NO_ERROR) { "Canon recipe texture upload failed" }
iccResources = CanonIccGlResources(plan.icc)
uploadedPlan = plan
} catch (error: Throwable) {
releaseEngineResources()
throw error
} finally {
GLES30.glPixelStorei(GLES30.GL_UNPACK_ALIGNMENT, previousAlignment[0])
GLES30.glActiveTexture(GLES30.GL_TEXTURE0)
}
}
override fun releaseEngineResources() {
if (tableTexture != 0) GLES30.glDeleteTextures(1, intArrayOf(tableTexture), 0)
tableTexture = 0
iccResources?.release()
iccResources = null
uploadedPlan = null
}
}
@@ -17,15 +17,16 @@ internal class EquivalentCameraCalibration(private val target: EquivalentCameraT
"Unable to parse S9 calibration"
})
}
EquivalentCameraTarget.HasselbladX2DII100C -> {
EquivalentCameraTarget.HasselbladX2DII100C,
EquivalentCameraTarget.CanonEOSR5 -> {
val json = context.assets.open(target.assetPath).bufferedReader().use {
JSONObject(it.readText())
}
require(json.getInt("schemaVersion") == 1) { "Unsupported HNCS calibration format" }
require(json.getInt("schemaVersion") == 1) { "Unsupported target calibration format" }
fun matrix(name: String): FloatArray? {
if (json.isNull(name)) return null
val values = json.getJSONArray(name)
require(values.length() == 9) { "HNCS $name must contain nine values" }
require(values.length() == 9) { "Target $name must contain nine values" }
return FloatArray(9) { values.getDouble(it).toFloat() }
}
// Preserve original matrix slots and absent illuminants. A single
@@ -98,7 +99,8 @@ internal class EquivalentCameraCalibration(private val target: EquivalentCameraT
internal enum class EquivalentCameraTarget(val assetPath: String) {
LumixS9("dcp/Panasonic DC-S9 Adobe Standard.dcp"),
HasselbladX2DII100C("hncs/x2d_ii_100c_calibration.json");
HasselbladX2DII100C("hncs/x2d_ii_100c_calibration.json"),
CanonEOSR5("canon/eos_r5/calibration.json");
val calibration by lazy { EquivalentCameraCalibration(this) }
}
@@ -510,7 +510,7 @@ class RawDemosaicProcessor {
)
// Lens calibration is unavailable during synthetic startup warmup. Compile calibrated engines
// here; only actual photos with calibrated render plans execute its tone shader.
val engineToneReady = if (warmupColorEngine.isLumix || warmupColorEngine.isHncs) {
val engineToneReady = if (warmupColorEngine.usesCameraInputDomain) {
engineTonePass.prewarm(warmupColorEngine)
} else renderEngineTonePass(
inputTextureId = inputTextureId,
@@ -519,6 +519,7 @@ class RawDemosaicProcessor {
spectralFilmLut = null,
hncsRenderPlan = null,
lumixRenderPlan = null,
canonRenderPlan = null,
colorEngine = warmupColorEngine,
profileToEngineTransform = identityMatrix3x3(),
profileExposureUniforms = ProfileExposureUniforms.NEUTRAL,
@@ -534,7 +535,7 @@ class RawDemosaicProcessor {
viewportWidth = programSize.width,
viewportHeight = programSize.height,
)
val srgbInputTextureId = if (warmupColorEngine.isLumix) {
val srgbInputTextureId = if (warmupColorEngine.isLumix || warmupColorEngine.isCanon) {
inputTextureId
} else if (engineToneReady && warmupColorEngine.isHncs) {
setupAdjustmentFramebuffer(programSize.width, programSize.height)
@@ -1661,6 +1662,7 @@ class RawDemosaicProcessor {
val spectralFilmLut: SpectralFilmLut?,
val hncsRenderPlan: HncsRenderPlan?,
val lumixRenderPlan: LumixRenderPlan?,
val canonRenderPlan: CanonRenderPlan?,
val engineWorkingColorSpace: ColorSpace,
val profileToEngineTransform: FloatArray,
val shadowsHighlightsParams: ShadowsHighlightsParams,
@@ -2429,6 +2431,7 @@ class RawDemosaicProcessor {
val targetCamera = when {
requestedColorEngine.isLumix -> EquivalentCameraTarget.LumixS9
requestedColorEngine.isHncs -> EquivalentCameraTarget.HasselbladX2DII100C
requestedColorEngine.isCanon -> EquivalentCameraTarget.CanonEOSR5
else -> null
}
var embeddedDngRenderPlan: DcpRenderPlan? = sourceDngRenderPlan
@@ -2457,10 +2460,10 @@ class RawDemosaicProcessor {
profileWorkingColorSpace.xg, profileWorkingColorSpace.yg,
profileWorkingColorSpace.xb, profileWorkingColorSpace.yb,
profileWorkingColorSpace.xw, profileWorkingColorSpace.yw,
embeddedCalibrationOnly = requestedColorEngine.isLumix || requestedColorEngine.isHncs,
embeddedCalibrationOnly = requestedColorEngine.usesCameraInputDomain,
)
if (dngRawData == null) {
if (requestedColorEngine.isLumix || requestedColorEngine.isHncs) {
if (requestedColorEngine.usesCameraInputDomain) {
PLog.e(TAG, "Camera RGB engine RAW decode failed; color-converted fallback is disabled")
return@withContext null
}
@@ -2519,7 +2522,7 @@ class RawDemosaicProcessor {
profileWorkingColorSpace)) {
"ForwardMatrix calibration requires an independent scene white for dual-illuminant interpolation"
}
} else if ((requestedColorEngine.isLumix || requestedColorEngine.isHncs) &&
} else if ((requestedColorEngine.usesCameraInputDomain) &&
dngRawData.cameraCalibration == null
) {
primarySourceProfile?.let {
@@ -3030,7 +3033,7 @@ class RawDemosaicProcessor {
(!cameraColorMatchingEnabled || actualMetadata.cameraCalibration == null)
val sourceColorCorrectionMatrix = if (directCameraInput) {
EquivalentCameraCalibration.whiteBalanceTransform(actualMetadata)
} else if ((colorEngine.isLumix || colorEngine.isHncs) &&
} else if ((colorEngine.usesCameraInputDomain) &&
actualMetadata.cameraCalibration != null
) {
EquivalentCameraCalibration.sourceToProPhoto(actualMetadata)
@@ -3077,6 +3080,20 @@ class RawDemosaicProcessor {
colorCorrectionCoordinate = lumixColorCorrectionCoordinate,
)
} else null
val canonRenderPlan = if (colorEngine.isCanon) {
check(profileWorkingColorSpace == ColorSpace.ProPhoto)
check(dngFile != null || actualMetadata.cameraCalibration != null) {
"Canon requires fixed source ColorMatrix calibration for camera capture"
}
CanonProfile.createRenderPlan(context, normalizedToneMappingParameters.canonPictureStyle)
} else null
if (colorEngine.isCanon) {
PLog.i(TAG, "Canon EOS R5 rendering: style=${normalizedToneMappingParameters.canonPictureStyle} " +
"input=wb-camera-rgb profileToCamera=${cameraInputTransform.contentToString()} " +
"target=${targetCamera?.assetPath} position=after-public-pgtm " +
"kernel=0x1f5b20 nativeOutput=YUV referenceISO=100 " +
"photonHdr=${normalizedToneMappingParameters.usePhotonHdr}")
}
if (colorEngine.isLumix) {
PLog.i(TAG, "Lumix S9 equivalent Camera RGB pipeline: style=${normalizedToneMappingParameters.lumixPhotoStyle} " +
"sourceWhite=${actualMetadata.whitePointXy?.contentToString()} " +
@@ -3699,8 +3716,10 @@ class RawDemosaicProcessor {
val effectiveExposureCompensation = rawExposureCompensation
val effectiveHighlightsAdjustment = rawHighlightsAdjustment
val engineDefaultExposureCompensation = colorEngine.defaultExposureCompensationEv
val engineExposureCompensation =
normalizedToneMappingParameters.engineExposureCompensationEv(colorEngine)
val profileExposureCompensation =
effectiveExposureCompensation + engineDefaultExposureCompensation
effectiveExposureCompensation + engineDefaultExposureCompensation + engineExposureCompensation
val profileExposureUniforms = computeProfileExposureUniforms(
metadata = actualMetadata,
profileExposureCompensation = profileExposureCompensation,
@@ -3724,6 +3743,7 @@ class RawDemosaicProcessor {
TAG,
"RAW render exposure: manualEv=$effectiveExposureCompensation " +
"engineDefaultEv=${colorEngine.defaultExposureCompensationEv} " +
"engineAdjustmentEv=$engineExposureCompensation " +
"engineCompensationDomain=${colorEngine.exposureCompensationDomain} " +
"profileExposureEv=${profileExposureUniforms.exposureEv} " +
"defaultBlackRender=${resolveProfileDefaultBlackRender(
@@ -3778,6 +3798,7 @@ class RawDemosaicProcessor {
spectralFilmLut = spektrafilmLut,
hncsRenderPlan = hncsRenderPlan,
lumixRenderPlan = lumixRenderPlan,
canonRenderPlan = canonRenderPlan,
engineWorkingColorSpace = engineWorkingColorSpace,
profileToEngineTransform = profileToEngineTransform,
shadowsHighlightsParams = shadowsHighlightsParams,
@@ -3926,6 +3947,7 @@ class RawDemosaicProcessor {
spectralFilmLut = spektrafilmLut,
hncsRenderPlan = hncsRenderPlan,
lumixRenderPlan = lumixRenderPlan,
canonRenderPlan = canonRenderPlan,
colorEngine = colorEngine,
outputWorkingColorSpace = engineWorkingColorSpace,
profileToEngineTransform = combinedProfileToEngineTransform,
@@ -3951,6 +3973,7 @@ class RawDemosaicProcessor {
spectralFilmLut = spektrafilmLut,
hncsRenderPlan = hncsRenderPlan,
lumixRenderPlan = lumixRenderPlan,
canonRenderPlan = canonRenderPlan,
colorEngine = colorEngine,
outputWorkingColorSpace = engineWorkingColorSpace,
profileToEngineTransform = combinedProfileToEngineTransform,
@@ -4076,6 +4099,7 @@ class RawDemosaicProcessor {
spectralFilmLut = spektrafilmLut,
hncsRenderPlan = hncsRenderPlan,
lumixRenderPlan = lumixRenderPlan,
canonRenderPlan = canonRenderPlan,
colorEngine = colorEngine,
outputWorkingColorSpace = engineWorkingColorSpace,
profileToEngineTransform = profileToEngineTransform,
@@ -4400,6 +4424,7 @@ class RawDemosaicProcessor {
spectralFilmLut = config.spectralFilmLut,
hncsRenderPlan = config.hncsRenderPlan,
lumixRenderPlan = config.lumixRenderPlan,
canonRenderPlan = config.canonRenderPlan,
colorEngine = config.colorEngine,
outputWorkingColorSpace = config.engineWorkingColorSpace,
profileToEngineTransform = config.profileToEngineTransform,
@@ -4434,6 +4459,7 @@ class RawDemosaicProcessor {
spectralFilmLut = config.spectralFilmLut,
hncsRenderPlan = config.hncsRenderPlan,
lumixRenderPlan = config.lumixRenderPlan,
canonRenderPlan = config.canonRenderPlan,
colorEngine = config.colorEngine,
outputWorkingColorSpace = config.engineWorkingColorSpace,
profileToEngineTransform = config.profileToEngineTransform,
@@ -6859,6 +6885,7 @@ class RawDemosaicProcessor {
spectralFilmLut: SpectralFilmLut? = null,
hncsRenderPlan: HncsRenderPlan? = null,
lumixRenderPlan: LumixRenderPlan? = null,
canonRenderPlan: CanonRenderPlan? = null,
colorEngine: RawRenderingEngine = RawRenderingEngine.AdobeCurve,
outputWorkingColorSpace: ColorSpace = ColorSpace.ProPhoto,
profileToEngineTransform: FloatArray = identityMatrix3x3(),
@@ -6886,6 +6913,7 @@ class RawDemosaicProcessor {
spectralFilmLut = spectralFilmLut,
hncsRenderPlan = hncsRenderPlan,
lumixRenderPlan = lumixRenderPlan,
canonRenderPlan = canonRenderPlan,
colorEngine = colorEngine,
profileToEngineTransform = profileToEngineTransform,
profileExposureUniforms = profileExposureUniforms,
@@ -7004,6 +7032,7 @@ class RawDemosaicProcessor {
spectralFilmLut: SpectralFilmLut?,
hncsRenderPlan: HncsRenderPlan?,
lumixRenderPlan: LumixRenderPlan?,
canonRenderPlan: CanonRenderPlan?,
colorEngine: RawRenderingEngine,
profileToEngineTransform: FloatArray,
profileExposureUniforms: ProfileExposureUniforms,
@@ -7044,6 +7073,7 @@ class RawDemosaicProcessor {
spectralFilmLut = spectralFilmLut,
hncsRenderPlan = hncsRenderPlan,
lumixRenderPlan = lumixRenderPlan,
canonRenderPlan = canonRenderPlan,
bindProfileGainTable = { program ->
if (metadata != null) {
bindProfileGainTableMap(
@@ -7452,6 +7482,7 @@ class RawDemosaicProcessor {
spectralFilmLut: SpectralFilmLut?,
hncsRenderPlan: HncsRenderPlan?,
lumixRenderPlan: LumixRenderPlan?,
canonRenderPlan: CanonRenderPlan?,
colorEngine: RawRenderingEngine,
outputWorkingColorSpace: ColorSpace,
profileToEngineTransform: FloatArray,
@@ -7514,6 +7545,7 @@ class RawDemosaicProcessor {
spectralFilmLut = spectralFilmLut,
hncsRenderPlan = hncsRenderPlan,
lumixRenderPlan = lumixRenderPlan,
canonRenderPlan = canonRenderPlan,
bindProfileGainTable = { program ->
bindProfileGainTableMap(
program = program,
@@ -31,6 +31,7 @@ internal class RawEngineTonePass(
val spectralFilmLut: SpectralFilmLut?,
val hncsRenderPlan: HncsRenderPlan?,
val lumixRenderPlan: LumixRenderPlan? = null,
val canonRenderPlan: CanonRenderPlan? = null,
val bindProfileGainTable: (program: Int) -> Unit,
)
@@ -50,6 +51,7 @@ internal class RawEngineTonePass(
private val darktableFilmicAlgorithm = DarktableFilmicToneAlgorithm(quad)
private val hncsAlgorithm = HncsToneAlgorithm(quad)
private val lumixAlgorithm = LumixToneAlgorithm(quad)
private val canonAlgorithm = CanonToneAlgorithm(quad)
fun render(input: Input): Output? = algorithmFor(input.colorEngine).render(input)
@@ -73,6 +75,7 @@ internal class RawEngineTonePass(
darktableFilmicAlgorithm.release()
hncsAlgorithm.release()
lumixAlgorithm.release()
canonAlgorithm.release()
dcpTextures.release()
curveTextures.release()
}
@@ -86,6 +89,7 @@ internal class RawEngineTonePass(
RawRenderingEngine.DarktableFilmic -> darktableFilmicAlgorithm
RawRenderingEngine.Hncs -> hncsAlgorithm
RawRenderingEngine.Lumix -> lumixAlgorithm
RawRenderingEngine.Canon -> canonAlgorithm
}
}
@@ -309,6 +313,7 @@ internal class RawEngineTonePass(
RawRenderingEngine.DarktableFilmic -> DarktableFilmicToneShader.DEFINITION
RawRenderingEngine.Hncs -> HncsToneShader.DEFINITION
RawRenderingEngine.Lumix -> LumixToneShader.DEFINITION
RawRenderingEngine.Canon -> CanonToneShader.DEFINITION
}
}
@@ -33,6 +33,13 @@ enum class RawRenderingEngine(
defaultExposureCompensationEv = 0f,
exposureCompensationDomain = RawExposureCompensationDomain.Linear
),
Canon(
shaderId = 8,
// Output/adjustment space; the renderer owns its Picture Style input domain.
workingColorSpace = ColorSpace.SRGB,
defaultExposureCompensationEv = 0f,
exposureCompensationDomain = RawExposureCompensationDomain.Linear
),
AgX(
shaderId = 1,
workingColorSpace = ColorSpace.BT2020,
@@ -65,6 +72,12 @@ enum class RawRenderingEngine(
val isLumix: Boolean
get() = this == Lumix
val isCanon: Boolean
get() = this == Canon
val usesCameraInputDomain: Boolean
get() = isLumix || isHncs || isCanon
companion object {
fun fromPersistedName(
value: String?,
@@ -11,12 +11,19 @@ data class RawToneMappingParameters(
val useOppoMasterToneMap: Boolean = false,
val usePhotonHdr: Boolean = PHOTON_HDR_DEFAULT,
val lumixPhotoStyle: LumixPhotoStyle = LumixPhotoStyle.Standard,
val canonPictureStyle: CanonPictureStyle = CanonPictureStyle.Standard,
val canonExposureCompensationEv: Float = CANON_EXPOSURE_COMPENSATION_DEFAULT,
val lumixColorMatchingEnabled: Boolean = true,
val hncsColorMatchingEnabled: Boolean = true,
) {
/** Explicit engine adjustment, applied once after PGTM with the shared render exposure. */
fun engineExposureCompensationEv(engine: RawRenderingEngine): Float =
if (engine.isCanon) normalizeCanonExposureCompensation(canonExposureCompensationEv) else 0f
fun colorMatchingEnabled(engine: RawRenderingEngine): Boolean = when {
engine.isLumix -> lumixColorMatchingEnabled
engine.isHncs -> hncsColorMatchingEnabled
engine.isCanon -> true
else -> false
}
@@ -45,6 +52,7 @@ data class RawToneMappingParameters(
FILMIC_WHITE_RELATIVE_EXPOSURE_MAX
)
return copy(
canonExposureCompensationEv = normalizeCanonExposureCompensation(canonExposureCompensationEv),
agxBlackRelativeExposure = minOf(blackAgx, whiteAgx - MIN_DYNAMIC_RANGE_EV),
agxWhiteRelativeExposure = maxOf(whiteAgx, blackAgx + MIN_DYNAMIC_RANGE_EV),
agxToe = agxToe.coerceIn(AGX_TOE_MIN, AGX_TOE_MAX),
@@ -72,6 +80,14 @@ data class RawToneMappingParameters(
}
companion object {
const val CANON_EXPOSURE_COMPENSATION_DEFAULT = -0.5f
const val CANON_EXPOSURE_COMPENSATION_MIN = -4f
const val CANON_EXPOSURE_COMPENSATION_MAX = 4f
fun normalizeCanonExposureCompensation(value: Float): Float =
if (value.isFinite()) value.coerceIn(CANON_EXPOSURE_COMPENSATION_MIN, CANON_EXPOSURE_COMPENSATION_MAX)
else CANON_EXPOSURE_COMPENSATION_DEFAULT
const val PHOTON_HDR_DEFAULT = true
const val MIN_DYNAMIC_RANGE_EV = 0.2f
@@ -42,6 +42,7 @@ import com.hinnka.mycamera.raw.RawAdaptiveExposureMode
import com.hinnka.mycamera.raw.RawProcessingPreferences.DROMode
import com.hinnka.mycamera.raw.RawProfileToneMapMode
import com.hinnka.mycamera.raw.LumixPhotoStyle
import com.hinnka.mycamera.raw.CanonPictureStyle
import com.hinnka.mycamera.raw.RawRenderingEngine
import com.hinnka.mycamera.raw.RawToneMappingParameters
import com.hinnka.mycamera.raw.RawWhiteLevelCorrection
@@ -402,6 +403,26 @@ fun RawRenderingEngineSettingsPanel(
Spacer(modifier = Modifier.height(16.dp))
}
if (rawRenderingEngine.isCanon) {
CanonPictureStyleSelector(
selectedStyle = rawToneMappingParameters.canonPictureStyle,
onSelectStyle = {
onAdjustmentStart()
onRawToneMappingParametersChange(rawToneMappingParameters.copy(canonPictureStyle = it))
onAdjustmentEnd()
},
)
CanonExposureCompensationSetting(
value = rawToneMappingParameters.canonExposureCompensationEv,
onValueChange = {
onAdjustmentStart()
onRawToneMappingParametersChange(rawToneMappingParameters.copy(canonExposureCompensationEv = it))
},
onValueChangeFinished = onAdjustmentEnd,
)
Spacer(modifier = Modifier.height(16.dp))
}
if (rawRenderingEngine == RawRenderingEngine.AdobeCurve) {
RawDcpSelector(
selectedDcpId = selectedDcpId,
@@ -547,7 +568,6 @@ fun LumixPhotoStyleSelector(
selectedStyle: LumixPhotoStyle,
onSelectStyle: (LumixPhotoStyle) -> Unit,
) {
var showDialog by remember { mutableStateOf(false) }
val title = stringResource(R.string.settings_raw_lumix_photo_style)
val labels = LumixPhotoStyle.entries.associateWith { style ->
stringResource(when (style) {
@@ -569,6 +589,72 @@ fun LumixPhotoStyleSelector(
LumixPhotoStyle.VLog -> R.string.settings_raw_lumix_style_vlog
})
}
RawPhotoStyleSelector(
title = title,
description = stringResource(R.string.settings_raw_lumix_photo_style_description),
styles = LumixPhotoStyle.entries,
styleKey = { it.assetName },
labels = labels,
selectedStyle = selectedStyle,
onSelectStyle = onSelectStyle,
)
}
@Composable
fun CanonPictureStyleSelector(
selectedStyle: CanonPictureStyle,
onSelectStyle: (CanonPictureStyle) -> Unit,
) {
val labels = CanonPictureStyle.entries.associateWith { style ->
stringResource(when (style) {
CanonPictureStyle.Standard -> R.string.settings_raw_canon_style_standard
CanonPictureStyle.Portrait -> R.string.settings_raw_canon_style_portrait
CanonPictureStyle.Landscape -> R.string.settings_raw_canon_style_landscape
CanonPictureStyle.Neutral -> R.string.settings_raw_canon_style_neutral
CanonPictureStyle.Faithful -> R.string.settings_raw_canon_style_faithful
CanonPictureStyle.Monochrome -> R.string.settings_raw_canon_style_monochrome
})
}
RawPhotoStyleSelector(
title = stringResource(R.string.settings_raw_canon_picture_style),
description = stringResource(R.string.settings_raw_canon_picture_style_description),
styles = CanonPictureStyle.entries,
styleKey = { it.persistedValue },
labels = labels,
selectedStyle = selectedStyle,
onSelectStyle = onSelectStyle,
)
}
@Composable
fun CanonExposureCompensationSetting(
value: Float,
onValueChange: (Float) -> Unit,
onValueChangeFinished: (() -> Unit)? = null,
) {
SliderSettingItem(
title = stringResource(R.string.settings_raw_canon_exposure_compensation),
description = stringResource(R.string.settings_raw_canon_exposure_compensation_description),
value = value,
valueRange = RawToneMappingParameters.CANON_EXPOSURE_COMPENSATION_MIN..
RawToneMappingParameters.CANON_EXPOSURE_COMPENSATION_MAX,
resetValue = RawToneMappingParameters.CANON_EXPOSURE_COMPENSATION_DEFAULT,
onValueChange = onValueChange,
onValueChangeFinished = onValueChangeFinished,
)
}
@Composable
private fun <T> RawPhotoStyleSelector(
title: String,
description: String,
styles: List<T>,
styleKey: (T) -> String,
labels: Map<T, String>,
selectedStyle: T,
onSelectStyle: (T) -> Unit,
) {
var showDialog by remember { mutableStateOf(false) }
Row(
modifier = Modifier
.fillMaxWidth()
@@ -580,7 +666,7 @@ fun LumixPhotoStyleSelector(
Text(title, color = Color.White, fontSize = 16.sp)
Spacer(Modifier.height(2.dp))
Text(
stringResource(R.string.settings_raw_lumix_photo_style_description),
description,
color = Color.White.copy(alpha = 0.6f),
fontSize = 13.sp,
lineHeight = 18.sp,
@@ -616,13 +702,13 @@ fun LumixPhotoStyleSelector(
fontWeight = FontWeight.SemiBold,
modifier = Modifier.padding(horizontal = 24.dp, vertical = 8.dp),
)
val listState = rememberLazyListState(initialFirstVisibleItemIndex = selectedStyle.ordinal)
val listState = rememberLazyListState(initialFirstVisibleItemIndex = styles.indexOf(selectedStyle))
LazyColumn(
state = listState,
modifier = Modifier.weight(1f, fill = false).fillMaxWidth().selectableGroup(),
contentPadding = PaddingValues(horizontal = 12.dp),
) {
items(LumixPhotoStyle.entries, key = { it.assetName }) { style ->
items(styles, key = styleKey) { style ->
val selected = style == selectedStyle
Row(
modifier = Modifier
@@ -888,7 +974,8 @@ private fun RawToneMappingControls(
when (rawRenderingEngine) {
RawRenderingEngine.AdobeCurve,
RawRenderingEngine.Hncs,
RawRenderingEngine.Lumix -> Unit
RawRenderingEngine.Lumix,
RawRenderingEngine.Canon -> Unit
RawRenderingEngine.AgX -> {
SliderSettingItem(
@@ -1265,6 +1352,7 @@ private fun rawRenderingEngineName(engine: RawRenderingEngine): String {
RawRenderingEngine.Spektrafilm -> stringResource(R.string.settings_raw_color_engine_spectral_film)
RawRenderingEngine.Hncs -> stringResource(R.string.settings_raw_color_engine_hncs)
RawRenderingEngine.Lumix -> stringResource(R.string.settings_raw_color_engine_lumix)
RawRenderingEngine.Canon -> stringResource(R.string.settings_raw_color_engine_canon)
}
}
@@ -1278,6 +1366,7 @@ private fun rawColorEngineDescription(engine: RawRenderingEngine): String {
RawRenderingEngine.Spektrafilm -> stringResource(R.string.settings_raw_color_engine_spectral_film_description)
RawRenderingEngine.Hncs -> stringResource(R.string.settings_raw_color_engine_hncs_description)
RawRenderingEngine.Lumix -> stringResource(R.string.settings_raw_color_engine_lumix_description)
RawRenderingEngine.Canon -> stringResource(R.string.settings_raw_color_engine_canon_description)
}
}
@@ -33,6 +33,8 @@ import com.hinnka.mycamera.ui.components.CurveChannel
import com.hinnka.mycamera.raw.HncsFilmCurveMode
import com.hinnka.mycamera.raw.RawProfileToneMapMode
import com.hinnka.mycamera.raw.LumixPhotoStyle
import com.hinnka.mycamera.raw.CanonPictureStyle
import com.hinnka.mycamera.raw.RawToneMappingParameters
import com.hinnka.mycamera.raw.RawRenderingEngine
import com.hinnka.mycamera.raw.RawDenoiseDefaults
import com.hinnka.mycamera.raw.RawSharpeningDefaults
@@ -42,6 +44,8 @@ import com.hinnka.mycamera.raw.SpectralFilmUiInfo
import com.hinnka.mycamera.ui.components.FrameSelector
import com.hinnka.mycamera.ui.components.RawBaselineColorCorrectionSelector
import com.hinnka.mycamera.ui.components.LumixPhotoStyleSelector
import com.hinnka.mycamera.ui.components.CanonPictureStyleSelector
import com.hinnka.mycamera.ui.components.CanonExposureCompensationSetting
import com.hinnka.mycamera.ui.components.RawDcpSelector
import com.hinnka.mycamera.ui.components.SliderSettingItem
import com.hinnka.mycamera.ui.components.rawDcpLensOptions
@@ -137,6 +141,13 @@ fun PresetEditorScreen(
var rawLumixPhotoStyle by remember {
mutableStateOf(LumixPhotoStyle.fromPersistedValue(sourcePreset?.rawLumixPhotoStyle))
}
var rawCanonPictureStyle by remember {
mutableStateOf(CanonPictureStyle.fromPersistedValue(sourcePreset?.rawCanonPictureStyle))
}
var rawCanonExposureCompensationEv by remember {
mutableStateOf(sourcePreset?.rawCanonExposureCompensationEv
?: RawToneMappingParameters.CANON_EXPOSURE_COMPENSATION_DEFAULT)
}
var rawOppoMasterToneMap by remember { mutableStateOf(sourcePreset?.rawOppoMasterToneMap ?: false) }
var rawSpectralFilmStock by remember { mutableStateOf(sourcePreset?.rawSpectralFilmStock ?: "kodak_portra_400") }
var rawSpectralFilmPrint by remember { mutableStateOf(sourcePreset?.rawSpectralFilmPrint ?: "kodak_2383") }
@@ -177,6 +188,8 @@ fun PresetEditorScreen(
rawWhitePointCorrection = rawWhitePointCorrection,
rawOppoMasterToneMap = rawOppoMasterToneMap,
rawLumixPhotoStyle = rawLumixPhotoStyle.assetName,
rawCanonPictureStyle = rawCanonPictureStyle.persistedValue,
rawCanonExposureCompensationEv = rawCanonExposureCompensationEv,
rawLumixColorMatchingEnabled = sourcePreset?.rawLumixColorMatchingEnabled ?: true,
rawHncsColorMatchingEnabled = sourcePreset?.rawHncsColorMatchingEnabled ?: true,
rawSpectralFilmStock = rawSpectralFilmStock,
@@ -453,6 +466,7 @@ fun PresetEditorScreen(
RawRenderingEngine.DarktableFilmic -> stringResource(R.string.settings_raw_color_engine_darktable_filmic)
RawRenderingEngine.Spektrafilm -> stringResource(R.string.settings_raw_color_engine_spectral_film)
RawRenderingEngine.Lumix -> stringResource(R.string.settings_raw_color_engine_lumix)
RawRenderingEngine.Canon -> stringResource(R.string.settings_raw_color_engine_canon)
RawRenderingEngine.Hncs -> stringResource(
R.string.settings_raw_color_engine_hncs
)
@@ -482,6 +496,19 @@ fun PresetEditorScreen(
)
}
AnimatedVisibility(visible = rawRenderingEngine.isCanon) {
Column {
CanonPictureStyleSelector(
selectedStyle = rawCanonPictureStyle,
onSelectStyle = { rawCanonPictureStyle = it },
)
CanonExposureCompensationSetting(
value = rawCanonExposureCompensationEv,
onValueChange = { rawCanonExposureCompensationEv = it },
)
}
}
AnimatedVisibility(visible = rawRenderingEngine == RawRenderingEngine.AdobeCurve) {
Column(modifier = Modifier.fillMaxWidth()) {
HorizontalDivider(
@@ -79,6 +79,7 @@ import com.hinnka.mycamera.raw.RawCaptureExposureCompensationMetadata
import com.hinnka.mycamera.raw.RawDemosaicProcessor
import com.hinnka.mycamera.raw.RawProfileToneMapMode
import com.hinnka.mycamera.raw.LumixPhotoStyle
import com.hinnka.mycamera.raw.CanonPictureStyle
import com.hinnka.mycamera.raw.RawRenderingEngine
import com.hinnka.mycamera.raw.RawDenoiseDefaults
import com.hinnka.mycamera.raw.RawSharpeningDefaults
@@ -261,6 +262,8 @@ private data class PresetMatchSnapshot(
val rawWhitePointCorrection: Float,
val rawOppoMasterToneMap: Boolean,
val rawLumixPhotoStyle: LumixPhotoStyle,
val rawCanonPictureStyle: CanonPictureStyle,
val rawCanonExposureCompensationEv: Float,
val rawLumixColorMatchingEnabled: Boolean,
val rawHncsColorMatchingEnabled: Boolean,
val rawSpectralFilmStock: String?,
@@ -300,6 +303,8 @@ private data class PresetMatchSnapshot(
rawBlackPointCorrection == preset.rawBlackPointCorrection &&
rawWhitePointCorrection == preset.rawWhitePointCorrection &&
rawLumixPhotoStyle == LumixPhotoStyle.fromPersistedValue(preset.rawLumixPhotoStyle) &&
rawCanonPictureStyle == CanonPictureStyle.fromPersistedValue(preset.rawCanonPictureStyle) &&
rawCanonExposureCompensationEv == preset.rawCanonExposureCompensationEv &&
rawLumixColorMatchingEnabled == preset.rawLumixColorMatchingEnabled &&
rawHncsColorMatchingEnabled == preset.rawHncsColorMatchingEnabled &&
rawOppoMasterToneMap == preset.rawOppoMasterToneMap &&
@@ -396,6 +401,12 @@ private data class PresetMatchSnapshot(
if (rawLumixPhotoStyle != LumixPhotoStyle.fromPersistedValue(preset.rawLumixPhotoStyle)) {
add("rawLumixPhotoStyle current=$rawLumixPhotoStyle preset=${preset.rawLumixPhotoStyle}")
}
if (rawCanonPictureStyle != CanonPictureStyle.fromPersistedValue(preset.rawCanonPictureStyle)) {
add("rawCanonPictureStyle current=$rawCanonPictureStyle preset=${preset.rawCanonPictureStyle}")
}
if (rawCanonExposureCompensationEv != preset.rawCanonExposureCompensationEv) {
add("rawCanonExposureCompensationEv current=$rawCanonExposureCompensationEv preset=${preset.rawCanonExposureCompensationEv}")
}
if (rawLumixColorMatchingEnabled != preset.rawLumixColorMatchingEnabled ||
rawHncsColorMatchingEnabled != preset.rawHncsColorMatchingEnabled
) {
@@ -496,6 +507,8 @@ private data class CameraFeatureUpdate(
val rawProfileToneMapMode: SettingValue<RawProfileToneMapMode>? = null,
val rawOppoMasterToneMap: SettingValue<Boolean>? = null,
val rawLumixPhotoStyle: SettingValue<LumixPhotoStyle>? = null,
val rawCanonPictureStyle: SettingValue<CanonPictureStyle>? = null,
val rawCanonExposureCompensationEv: SettingValue<Float>? = null,
val rawLumixColorMatchingEnabled: SettingValue<Boolean>? = null,
val rawHncsColorMatchingEnabled: SettingValue<Boolean>? = null,
val rawSpectralFilmStock: SettingValue<String?>? = null,
@@ -649,6 +662,8 @@ class CameraViewModel(application: Application) : AndroidViewModel(application)
rawWhitePointCorrection = saved.rawWhitePointCorrection,
rawOppoMasterToneMap = saved.rawOppoMasterToneMap,
rawLumixPhotoStyle = saved.rawLumixPhotoStyle,
rawCanonPictureStyle = saved.rawCanonPictureStyle,
rawCanonExposureCompensationEv = saved.rawCanonExposureCompensationEv,
rawLumixColorMatchingEnabled = saved.rawLumixColorMatchingEnabled,
rawHncsColorMatchingEnabled = saved.rawHncsColorMatchingEnabled,
rawSpectralFilmStock = saved.rawSpectralFilmStock,
@@ -784,6 +799,8 @@ class CameraViewModel(application: Application) : AndroidViewModel(application)
rawWhitePointCorrection = userPreferences.value.rawWhitePointCorrection,
rawOppoMasterToneMap = rawToneMappingParameters.value.useOppoMasterToneMap,
rawLumixPhotoStyle = rawToneMappingParameters.value.lumixPhotoStyle.assetName,
rawCanonPictureStyle = rawToneMappingParameters.value.canonPictureStyle.persistedValue,
rawCanonExposureCompensationEv = rawToneMappingParameters.value.canonExposureCompensationEv,
rawLumixColorMatchingEnabled = rawToneMappingParameters.value.lumixColorMatchingEnabled,
rawHncsColorMatchingEnabled = rawToneMappingParameters.value.hncsColorMatchingEnabled,
rawSpectralFilmStock = rawSpectralFilmStock.value,
@@ -892,6 +909,9 @@ class CameraViewModel(application: Application) : AndroidViewModel(application)
rawWhitePointCorrection = SettingValue(this?.rawWhitePointCorrection ?: 0f),
rawOppoMasterToneMap = SettingValue(this?.rawOppoMasterToneMap ?: false),
rawLumixPhotoStyle = SettingValue(LumixPhotoStyle.fromPersistedValue(this?.rawLumixPhotoStyle)),
rawCanonPictureStyle = SettingValue(CanonPictureStyle.fromPersistedValue(this?.rawCanonPictureStyle)),
rawCanonExposureCompensationEv = SettingValue(this?.rawCanonExposureCompensationEv
?: RawToneMappingParameters.CANON_EXPOSURE_COMPENSATION_DEFAULT),
rawLumixColorMatchingEnabled = SettingValue(this?.rawLumixColorMatchingEnabled ?: true),
rawHncsColorMatchingEnabled = SettingValue(this?.rawHncsColorMatchingEnabled ?: true),
rawSpectralFilmStock = SettingValue(this?.rawSpectralFilmStock),
@@ -1031,6 +1051,7 @@ class CameraViewModel(application: Application) : AndroidViewModel(application)
val rawToneMappingUpdate = if (
update.rawProfileToneMapMode != null ||
update.rawOppoMasterToneMap != null || update.rawLumixPhotoStyle != null ||
update.rawCanonPictureStyle != null || update.rawCanonExposureCompensationEv != null ||
update.rawLumixColorMatchingEnabled != null || update.rawHncsColorMatchingEnabled != null
) {
var toneMappingParameters = prefs.rawToneMappingParameters
@@ -1043,6 +1064,12 @@ class CameraViewModel(application: Application) : AndroidViewModel(application)
update.rawLumixPhotoStyle?.let {
toneMappingParameters = toneMappingParameters.copy(lumixPhotoStyle = it.value)
}
update.rawCanonPictureStyle?.let {
toneMappingParameters = toneMappingParameters.copy(canonPictureStyle = it.value)
}
update.rawCanonExposureCompensationEv?.let {
toneMappingParameters = toneMappingParameters.copy(canonExposureCompensationEv = it.value)
}
update.rawLumixColorMatchingEnabled?.let {
toneMappingParameters = toneMappingParameters.copy(lumixColorMatchingEnabled = it.value)
}
@@ -1322,6 +1349,8 @@ class CameraViewModel(application: Application) : AndroidViewModel(application)
rawWhitePointCorrection = prefs.rawWhitePointCorrection,
rawOppoMasterToneMap = prefs.rawToneMappingParameters.useOppoMasterToneMap,
rawLumixPhotoStyle = prefs.rawToneMappingParameters.lumixPhotoStyle,
rawCanonPictureStyle = prefs.rawToneMappingParameters.canonPictureStyle,
rawCanonExposureCompensationEv = prefs.rawToneMappingParameters.canonExposureCompensationEv,
rawLumixColorMatchingEnabled = prefs.rawToneMappingParameters.lumixColorMatchingEnabled,
rawHncsColorMatchingEnabled = prefs.rawToneMappingParameters.hncsColorMatchingEnabled,
rawSpectralFilmStock = prefs.rawSpectralFilmStock,
@@ -1234,4 +1234,16 @@
<string name="settings_shutter_sound_import_failed">無法匯入此音訊。請選擇可播放、長度不超過 3 秒、48 kHz、單聲道或立體聲的片段(上限 10 MB)。</string>
<string name="settings_shutter_sound_save_failed">無法儲存聲音設定。請再試一次。</string>
<string name="settings_shutter_sound_preview_failed">無法播放此聲音。請重新匯入,或恢復預設。</string>
<string name="settings_raw_color_engine_canon">Canon</string>
<string name="settings_raw_color_engine_canon_description">Canon 相片風格色彩與色調。</string>
<string name="settings_raw_canon_picture_style">相片風格</string>
<string name="settings_raw_canon_picture_style_description">選擇 Canon 相片風格,預設為標準。</string>
<string name="settings_raw_canon_style_standard">標準</string>
<string name="settings_raw_canon_style_portrait">人像</string>
<string name="settings_raw_canon_style_landscape">風景</string>
<string name="settings_raw_canon_style_neutral">中性</string>
<string name="settings_raw_canon_style_faithful">忠實</string>
<string name="settings_raw_canon_style_monochrome">單色</string>
<string name="settings_raw_canon_exposure_compensation">Canon 曝光補償(EV)</string>
<string name="settings_raw_canon_exposure_compensation_description">在一般曝光補償的基礎上,額外調整 Canon 算圖曝光。</string>
</resources>
+12
View File
@@ -1132,4 +1132,16 @@
<string name="settings_shutter_sound_import_failed">この音声を読み込めません。3秒以内、48 kHz、モノラルまたはステレオで、再生可能なクリップを選択してください(最大10 MB)。</string>
<string name="settings_shutter_sound_save_failed">サウンド設定を保存できません。もう一度お試しください。</string>
<string name="settings_shutter_sound_preview_failed">この音声を再生できません。もう一度読み込むか、デフォルトに戻してください。</string>
<string name="settings_raw_color_engine_canon">Canon</string>
<string name="settings_raw_color_engine_canon_description">Canon ピクチャースタイルの色と階調。</string>
<string name="settings_raw_canon_picture_style">ピクチャースタイル</string>
<string name="settings_raw_canon_picture_style_description">Canonのピクチャースタイルを選択します。初期設定はスタンダードです。</string>
<string name="settings_raw_canon_style_standard">スタンダード</string>
<string name="settings_raw_canon_style_portrait">ポートレート</string>
<string name="settings_raw_canon_style_landscape">風景</string>
<string name="settings_raw_canon_style_neutral">ニュートラル</string>
<string name="settings_raw_canon_style_faithful">忠実設定</string>
<string name="settings_raw_canon_style_monochrome">モノクロ</string>
<string name="settings_raw_canon_exposure_compensation">Canon 露出補正(EV)</string>
<string name="settings_raw_canon_exposure_compensation_description">通常の露出補正に加えて、Canonレンダリングの露出を調整します。</string>
</resources>
@@ -1255,4 +1255,16 @@
<string name="settings_shutter_sound_import_failed">无法导入此音频。请选择可播放、时长不超过 3 秒、48 kHz、单声道或立体声的片段(最大 10 MB)。</string>
<string name="settings_shutter_sound_save_failed">无法保存声音设置,请重试。</string>
<string name="settings_shutter_sound_preview_failed">无法播放此声音。请重新导入,或恢复默认设置。</string>
<string name="settings_raw_color_engine_canon">Canon</string>
<string name="settings_raw_color_engine_canon_description">Canon 照片风格色彩与调性。</string>
<string name="settings_raw_canon_picture_style">照片风格</string>
<string name="settings_raw_canon_picture_style_description">选择 Canon 照片风格,默认为标准。</string>
<string name="settings_raw_canon_style_standard">标准</string>
<string name="settings_raw_canon_style_portrait">人像</string>
<string name="settings_raw_canon_style_landscape">风光</string>
<string name="settings_raw_canon_style_neutral">中性</string>
<string name="settings_raw_canon_style_faithful">可靠设置</string>
<string name="settings_raw_canon_style_monochrome">单色</string>
<string name="settings_raw_canon_exposure_compensation">Canon 曝光补偿(EV)</string>
<string name="settings_raw_canon_exposure_compensation_description">在常规曝光补偿基础上,额外调整 Canon 渲染曝光。</string>
</resources>
@@ -1230,4 +1230,16 @@
<string name="settings_shutter_sound_import_failed">無法匯入此音訊。請選擇可播放、長度不超過 3 秒、48 kHz、單聲道或立體聲的片段(上限 10 MB)。</string>
<string name="settings_shutter_sound_save_failed">無法儲存聲音設定。請再試一次。</string>
<string name="settings_shutter_sound_preview_failed">無法播放此聲音。請重新匯入,或恢復預設。</string>
<string name="settings_raw_color_engine_canon">Canon</string>
<string name="settings_raw_color_engine_canon_description">Canon 相片風格色彩與色調。</string>
<string name="settings_raw_canon_picture_style">相片風格</string>
<string name="settings_raw_canon_picture_style_description">選擇 Canon 相片風格,預設為標準。</string>
<string name="settings_raw_canon_style_standard">標準</string>
<string name="settings_raw_canon_style_portrait">人像</string>
<string name="settings_raw_canon_style_landscape">風景</string>
<string name="settings_raw_canon_style_neutral">中性</string>
<string name="settings_raw_canon_style_faithful">忠實</string>
<string name="settings_raw_canon_style_monochrome">單色</string>
<string name="settings_raw_canon_exposure_compensation">Canon 曝光補償(EV)</string>
<string name="settings_raw_canon_exposure_compensation_description">在一般曝光補償的基礎上,額外調整 Canon 渲染曝光。</string>
</resources>
@@ -1234,4 +1234,16 @@
<string name="settings_shutter_sound_import_failed">無法匯入此音訊。請選擇可播放、長度不超過 3 秒、48 kHz、單聲道或立體聲的片段(上限 10 MB)。</string>
<string name="settings_shutter_sound_save_failed">無法儲存聲音設定。請再試一次。</string>
<string name="settings_shutter_sound_preview_failed">無法播放此聲音。請重新匯入,或恢復預設。</string>
<string name="settings_raw_color_engine_canon">Canon</string>
<string name="settings_raw_color_engine_canon_description">Canon 相片風格色彩與色調。</string>
<string name="settings_raw_canon_picture_style">相片風格</string>
<string name="settings_raw_canon_picture_style_description">選擇 Canon 相片風格,預設為標準。</string>
<string name="settings_raw_canon_style_standard">標準</string>
<string name="settings_raw_canon_style_portrait">人像</string>
<string name="settings_raw_canon_style_landscape">風景</string>
<string name="settings_raw_canon_style_neutral">中性</string>
<string name="settings_raw_canon_style_faithful">忠實</string>
<string name="settings_raw_canon_style_monochrome">單色</string>
<string name="settings_raw_canon_exposure_compensation">Canon 曝光補償(EV)</string>
<string name="settings_raw_canon_exposure_compensation_description">在一般曝光補償的基礎上,額外調整 Canon 算圖曝光。</string>
</resources>
+12
View File
@@ -1279,4 +1279,16 @@
<string name="settings_shutter_sound_import_failed">Cannot import this audio. Choose a playable clip up to 3 seconds, 48 kHz, mono or stereo (10 MB maximum).</string>
<string name="settings_shutter_sound_save_failed">Cannot save sound settings. Please try again.</string>
<string name="settings_shutter_sound_preview_failed">Cannot play this sound. Please import it again or restore the default.</string>
<string name="settings_raw_color_engine_canon">Canon</string>
<string name="settings_raw_color_engine_canon_description">Canon Picture Style color and tone.</string>
<string name="settings_raw_canon_picture_style">Picture Style</string>
<string name="settings_raw_canon_picture_style_description">Choose a Canon Picture Style. Standard is the default.</string>
<string name="settings_raw_canon_style_standard">Standard</string>
<string name="settings_raw_canon_style_portrait">Portrait</string>
<string name="settings_raw_canon_style_landscape">Landscape</string>
<string name="settings_raw_canon_style_neutral">Neutral</string>
<string name="settings_raw_canon_style_faithful">Faithful</string>
<string name="settings_raw_canon_style_monochrome">Monochrome</string>
<string name="settings_raw_canon_exposure_compensation">Canon exposure compensation (EV)</string>
<string name="settings_raw_canon_exposure_compensation_description">Additional exposure adjustment for Canon rendering.</string>
</resources>
@@ -1,10 +1,39 @@
package com.hinnka.mycamera.gallery
import com.hinnka.mycamera.raw.RawMetadata
import com.hinnka.mycamera.raw.CanonPictureStyle
import com.hinnka.mycamera.raw.RawToneMappingParameters
import com.hinnka.mycamera.raw.RawRenderingEngine
import org.junit.Assert.assertEquals
import org.junit.Test
class MediaMetadataTest {
@Test
fun mergingRawMetadataPreservesEachCanonStyleAndPhotonHdrState() {
for (style in CanonPictureStyle.entries) {
for (hdrEnabled in listOf(false, true)) {
val metadata = MediaMetadata(
rawRenderingEngine = RawRenderingEngine.Canon,
rawExposureCompensation = 0.75f,
rawToneMappingParameters = RawToneMappingParameters(
canonPictureStyle = style,
canonExposureCompensationEv = -1.25f,
usePhotonHdr = hdrEnabled,
),
)
val merged = metadata.merge(rawMetadata(iso = 1600))
assertEquals(1600, merged.iso)
assertEquals(RawRenderingEngine.Canon, merged.rawRenderingEngine)
assertEquals(style, merged.rawToneMappingParameters.canonPictureStyle)
assertEquals(-1.25f, merged.rawToneMappingParameters.canonExposureCompensationEv, 0f)
assertEquals(0.75f, requireNotNull(merged.rawExposureCompensation), 0f)
assertEquals(hdrEnabled, merged.rawToneMappingParameters.usePhotonHdr)
}
}
}
@Test
fun mergeKeepsExistingIsoWhenRawIsoIsFallback100() {
val metadata = MediaMetadata(iso = 800)
@@ -1,6 +1,7 @@
package com.hinnka.mycamera.model
import com.hinnka.mycamera.camera.AspectRatio
import com.hinnka.mycamera.raw.CanonPictureStyle
import com.hinnka.mycamera.raw.RawRenderingEngine
import com.hinnka.mycamera.raw.RawDenoiseDefaults
import org.junit.Assert.assertEquals
@@ -10,6 +11,66 @@ import org.junit.Assert.assertTrue
import org.junit.Test
class CameraPresetJsonCodecTest {
@Test
fun canonPictureStylesSurviveSingleAndListPresetRoundTrips() {
val base = requireNotNull(CameraPreset.fromJson("""{"id":"canon","name":"Canon"}"""))
val persistedStyles = listOf("standard", "portrait", "landscape", "neutral", "faithful", "monochrome")
val sources = persistedStyles.mapIndexed { index, style ->
base.copy(
id = "canon_$style",
rawRenderingEngine = RawRenderingEngine.Canon.name,
rawCanonPictureStyle = style,
rawCanonExposureCompensationEv = -2f + index * 0.5f,
rawExposureCompensation = 0.75f,
)
}
for (source in sources) {
val restored = requireNotNull(CameraPreset.fromJson(source.toJson()))
assertEquals(source.rawCanonPictureStyle, restored.rawCanonPictureStyle)
assertEquals(source.rawCanonExposureCompensationEv, restored.rawCanonExposureCompensationEv, 0f)
assertEquals(0.75f, restored.rawExposureCompensation, 0f)
assertEquals(source.rawRenderingEngine, restored.rawRenderingEngine)
}
val restoredList = CameraPreset.listFromJson(sources.joinToString(prefix = "[", postfix = "]") { it.toJson() })
assertEquals(persistedStyles, restoredList.map { it.rawCanonPictureStyle })
assertEquals(sources.map { it.rawCanonExposureCompensationEv }, restoredList.map { it.rawCanonExposureCompensationEv })
}
@Test
fun legacyPresetWithoutCanonStyleDefaultsToStandardOnResave() {
val legacy = requireNotNull(CameraPreset.fromJson("""{"id":"legacy","name":"Legacy"}"""))
assertEquals(CanonPictureStyle.Standard.persistedValue, legacy.rawCanonPictureStyle)
assertEquals(-0.5f, legacy.rawCanonExposureCompensationEv, 0f)
val restored = requireNotNull(CameraPreset.fromJson(legacy.toJson()))
assertEquals("standard", restored.rawCanonPictureStyle)
assertEquals(-0.5f, restored.rawCanonExposureCompensationEv, 0f)
}
@Test
fun canonExposureIsNormalizedBeforeWritingAndAfterReadingPresets() {
val base = requireNotNull(CameraPreset.fromJson("""{"id":"canon"}"""))
for ((input, expected) in listOf(-10f to -4f, 10f to 4f, Float.NaN to -0.5f, Float.POSITIVE_INFINITY to -0.5f)) {
val saved = base.copy(rawCanonExposureCompensationEv = input).toJson()
val restored = requireNotNull(CameraPreset.fromJson(saved))
assertEquals(expected, restored.rawCanonExposureCompensationEv, 0f)
}
for ((jsonValue, expected) in listOf("-10" to -4f, "10" to 4f, "null" to -0.5f, "\"invalid\"" to -0.5f)) {
val restored = requireNotNull(CameraPreset.fromJson("""{"id":"canon","rawCanonExposureCompensationEv":$jsonValue}"""))
assertEquals(expected, restored.rawCanonExposureCompensationEv, 0f)
}
}
@Test
fun unsupportedCanonStyleUsesExistingPresetCompatibilityDefault() {
val preset = requireNotNull(CameraPreset.fromJson("""{"id":"future","rawCanonPictureStyle":"future_style"}"""))
assertEquals("standard", preset.rawCanonPictureStyle)
assertEquals("standard", requireNotNull(CameraPreset.fromJson(preset.toJson())).rawCanonPictureStyle)
}
@Test
fun colorMatchingPreservesIndependentSwitchesAndDefaultsForOldPresets() {
val legacy = requireNotNull(CameraPreset.fromJson("""{"id":"legacy","name":"Legacy"}"""))
@@ -0,0 +1,58 @@
package com.hinnka.mycamera.raw
import org.junit.Assert.assertEquals
import org.junit.Test
class CanonColorMathTest {
@Test
fun matchesOriginalDppHelperOutputsAtIntegerBoundaries() {
// Synthetic Int32 tables are identical to generate_color_math_golden.py. Expected
// results come from executing the original DLL instructions, not this Kotlin formula.
val direct = CanonColorMath.DirectInt32Curve(IntArray(65_536) { index ->
(index shl 16) or (65_535 - index)
})
val coarseValues = IntArray(1_024) { it }
coarseValues[0] = -2
coarseValues[1] = Int.MAX_VALUE
coarseValues[2] = Int.MIN_VALUE
coarseValues[3] = 0x04000001
coarseValues[1023] = 0x01000001
val coarse = CanonColorMath.CoarseInt32Curve(coarseValues)
val rows = requireNotNull(javaClass.getResourceAsStream("/canon/color_math_golden.tsv"))
.bufferedReader().use { it.readLines() }
.filter { it.isNotBlank() && !it.startsWith("#") }
require(rows.isNotEmpty())
for (row in rows) {
val fields = row.split('\t')
require(fields.size == 5)
val first = fields[1].toInt()
val actual = when (fields[0]) {
"none" -> CanonColorMath.rgbRecipeLookup(first)
"direct" -> CanonColorMath.rgbRecipeLookup(first, direct = direct)
"coarse" -> CanonColorMath.rgbRecipeLookup(first, coarse = coarse)
"both" -> CanonColorMath.rgbRecipeLookup(first, direct, coarse)
"aux" -> CanonColorMath.auxiliaryWeightedCode(
first, fields[2].toInt(), fields[3].toInt(),
)
else -> error("Unknown Canon oracle case: $row")
}
assertEquals(row, fields[4].toInt(), actual)
}
}
@Test(expected = IllegalArgumentException::class)
fun directTableRejectsCoarseCardinality() {
CanonColorMath.DirectInt32Curve(IntArray(1_024))
}
@Test(expected = IllegalArgumentException::class)
fun coarseTableRejectsDirectCardinality() {
CanonColorMath.CoarseInt32Curve(IntArray(65_536))
}
@Test(expected = IllegalArgumentException::class)
fun auxiliaryCodeRejectsValuesOutsideTheAuditedInputDomain() {
CanonColorMath.auxiliaryWeightedCode(65_536, 0, 0)
}
}
@@ -0,0 +1,44 @@
package com.hinnka.mycamera.raw
import java.io.File
import java.nio.ByteBuffer
import java.nio.ByteOrder
import java.security.MessageDigest
import org.junit.Assert.assertEquals
import org.junit.Test
class CanonR5SeedCompilerTest {
private fun asset(): ByteArray = File("src/main/assets/${CanonR5SeedCompiler.ASSET_PATH}").readBytes()
@Test
fun sixStylesMatchOriginalSelectorAcrossAllR5BranchBoundaries() {
val compiler = CanonR5SeedCompiler.fromAsset(asset())
val rows = requireNotNull(javaClass.getResourceAsStream("/canon/r5_seed_selector_golden.tsv"))
.bufferedReader().use { it.readLines() }
.filter { it.isNotBlank() && !it.startsWith("#") }
assertEquals(1152, rows.size)
for (row in rows) {
val fields = row.split('\t')
val style = CanonPictureStyle.entries.single { it.dppStyleId == fields[0].toInt() }
val seeds = compiler.compile(CanonR5SeedCompiler.Input(
style = style,
highlightTonePriority = fields[1] == "1",
parameter1000a = fields[2].toInt(),
flag1e0001 = fields[3] == "1",
))
assertEquals(row, fields[5].toInt(), seeds.scale)
val output = ByteBuffer.allocate(2048).order(ByteOrder.LITTLE_ENDIAN)
seeds[fields[4].toInt()].copyWords().forEach { output.putShort(it.toShort()) }
val digest = MessageDigest.getInstance("SHA-256").digest(output.array())
.joinToString("") { "%02x".format(it) }
assertEquals(row, fields[6], digest)
}
}
@Test(expected = IllegalArgumentException::class)
fun rejectsChangedAssetBeforeLoadingTables() {
val data = asset()
data[data.lastIndex] = (data.last().toInt() xor 1).toByte()
CanonR5SeedCompiler.fromAsset(data)
}
}
@@ -0,0 +1,76 @@
package com.hinnka.mycamera.raw
import java.io.File
import com.google.gson.JsonParser
import org.junit.Assert.assertEquals
import org.junit.Assert.assertArrayEquals
import org.junit.Assert.assertThrows
import org.junit.Test
class CanonRecipeColorMathTest {
@Test
fun publicIsoAloneCannotLoadTheMissingNativeIsoRecipe() {
val repository = sequenceOf(File("."), File("..")).first {
File(it, "research/canon_dpp/r5-pixel-golden").isDirectory
}
val assets = File(repository, "app/src/main/assets")
val manifestPath = "canon/eos_r5/standard/gamma-manifest.json"
for (nativeIso in listOf(null, "00000000")) {
val manifest = JsonParser.parseString(File(assets, manifestPath).readText()).asJsonObject
val properties = manifest.getAsJsonObject("modelProvider").getAsJsonObject("properties")
// This was the original bug: public ISO100 was present, but the native
// provider saw a missing/zero ISO and silently selected another gamma_c.
assertEquals("64000000", properties["0x10026"].asString)
if (nativeIso == null) properties.remove("0x1000a")
else properties.addProperty("0x1000a", nativeIso)
assertThrows(IllegalArgumentException::class.java) {
CanonProfile.load(CanonPictureStyle.Standard) { path ->
if (path == manifestPath) manifest.toString().toByteArray()
else File(assets, path).readBytes()
}
}
}
}
@Test
fun r5DispatchYuvAndRgbConversionMatchOriginalDppForAllSixStyles() {
val repository = sequenceOf(File("."), File("..")).first {
File(it, "research/canon_dpp/r5-pixel-golden").isDirectory
}
val assetRoot = File(repository, "app/src/main/assets")
val assets = File(assetRoot, "canon/eos_r5")
for (style in listOf("standard", "portrait", "landscape", "neutral", "faithful", "monochrome")) {
val directory = File(assets, style)
val plan = CanonProfile.load(CanonPictureStyle.fromPersistedValue(style)) {
File(assetRoot, it).readBytes()
}
assertEquals(style, plan.style.persistedValue)
assertEquals(33, plan.icc.grid)
val parameters = CanonRecipeColorMath.R5PixelParameters(plan.kernelWords)
val recombination = CanonRecipeColorMath.R5RecombinationParameters.fromRawParameters(
File(directory, "parameters.bin").readBytes(),
)
fun table(offset: Int, size: Int) = IntArray(size) { plan.lookupAtlas[offset + it].toInt() }
val y = CanonRecipeColorMath.RawGammaTable(table(0, 131072))
val c = CanonRecipeColorMath.RawGammaTable(table(131072, 131072))
val uv = CanonRecipeColorMath.R5UvGainTable(table(262144, 65536))
val weightTables = List(4) {
CanonRecipeColorMath.ChromaWeightTable(table(327680 + it * 1024, 1024))
}
File(repository, "research/canon_dpp/r5-render-golden/$style.tsv").forEachLine { row ->
if (!row.startsWith("#") && row.isNotBlank()) {
val values = row.split('\t').map { it.toInt() }
val result = CanonRecipeColorMath.renderR5Pixel(
values[2], values[1], values[0], values[3], parameters, y, c, uv,
weightTables[0], weightTables[1], weightTables[2], weightTables[3], recombination,
)
assertEquals("$style $row", CanonRecipeColorMath.Yuv(
values[4], values[5], values[6],
), result)
assertArrayEquals("$style YUV to RGB $row", values.subList(7, 10).toIntArray(),
CanonRecipeColorMath.yuvToRgb(result))
}
}
}
}
}
@@ -24,6 +24,20 @@ class DirectCameraColorTransformTest {
0.4594f, 0.3471f, 0.1578f, 0.2504f, 0.7023f, 0.0473f, 0.1023f, 0.0032f, 0.7195f,
),
).toDcpProfile()
// ColorMatrix tags only from the bundled EOS R5 calibration; no DCP look/tone data.
private val canonProfile = RawCameraCalibration(
colorMatrix1 = floatArrayOf(
1.16f, -0.6048f, 0.0405f, -0.3331f, 1.0643f, 0.3113f,
-0.0007f, 0.0513f, 0.6109f,
),
colorMatrix2 = floatArrayOf(
0.9766f, -0.2953f, -0.1254f, -0.4276f, 1.2116f, 0.2433f,
-0.0437f, 0.1336f, 0.5131f,
),
calibrationIlluminant1 = 17,
calibrationIlluminant2 = 21,
).toDcpProfile()
private val whites = listOf(
floatArrayOf(0.44757f, 0.40745f),
floatArrayOf(0.3369536f, 0.35767f), // logged S9 RW2 as-shot white
@@ -44,7 +58,7 @@ class DirectCameraColorTransformTest {
@Test
fun sharedSpaceIsColorimetricAndPhotoStyleReceivesCameraRgbWithOneWhiteBalance() {
for (profile in listOf(profile, hncsProfile)) for (white in whites) {
for (profile in listOf(profile, hncsProfile, canonProfile)) for (white in whites) {
val transform = DirectCameraColorTransform.fromProfile(profile, white)
val sensorToProfile = transform.sensorToProPhoto(wb)
val recovered = DngSdkColorSpec.multiplyMatrix3x3(
@@ -66,7 +80,7 @@ class DirectCameraColorTransformTest {
floatArrayOf(-0.01f, 0.3f, 2f),
floatArrayOf(8f, 16f, 4f),
)
for (profile in listOf(profile, hncsProfile)) for (white in whites) {
for (profile in listOf(profile, hncsProfile, canonProfile)) for (white in whites) {
val transform = DirectCameraColorTransform.fromProfile(profile, white)
for (sample in samples) for (gain in listOf(1f, 0.25f, 3.5f)) {
val working = multiply(transform.sensorToProPhoto(wb), sample)
@@ -104,7 +118,7 @@ class DirectCameraColorTransformTest {
@Test
fun matchingSourceAndTargetRecoverWhiteBalancedSensorRgbWithoutDcpLook() {
for (profile in listOf(profile, hncsProfile)) {
for (profile in listOf(profile, hncsProfile, canonProfile)) {
val metadata = RawMetadata(
width = 16,
height = 16,
@@ -86,6 +86,11 @@ class RawHncsShadersTest {
includeShadowsHighlights = true,
),
RawEngineTonePass.combinedFragmentShaderFor(RawRenderingEngine.Lumix),
RawEngineTonePass.fragmentShaderFor(RawRenderingEngine.Canon),
RawEngineTonePass.combinedFragmentShaderFor(RawRenderingEngine.Canon),
RawEngineTonePass.combinedFragmentShaderFor(RawRenderingEngine.Canon, false),
RawEngineTonePass.hdrReferenceFragmentShaderFor(RawRenderingEngine.Canon),
RawEngineTonePass.hdrBaseCurveFragmentShaderFor(RawRenderingEngine.Canon),
RawEngineTonePass.hdrReferenceFragmentShaderFor(RawRenderingEngine.Hncs),
RawEngineTonePass.hdrBaseCurveFragmentShaderFor(RawRenderingEngine.Hncs),
RawSrgbPass.FRAGMENT_SHADER,
@@ -5,6 +5,26 @@ import org.junit.Assert.assertTrue
import org.junit.Test
class RawToneMappingParametersTest {
@Test
fun canonExposureAppliesOnlyToCanonAcrossStylesAndHdrModes() {
for (style in CanonPictureStyle.entries) {
for (hdr in listOf(false, true)) {
val parameters = RawToneMappingParameters(canonPictureStyle = style, usePhotonHdr = hdr)
for (engine in RawRenderingEngine.entries) {
assertEquals(
if (engine.isCanon) -0.5f else 0f,
parameters.engineExposureCompensationEv(engine), 0f,
)
assertEquals(
if (engine.isCanon) 0.75f else 0f,
parameters.copy(canonExposureCompensationEv = 0.75f)
.engineExposureCompensationEv(engine), 0f,
)
}
}
}
}
@Test
fun photonHdrIsIndependentFromAdobeProfileToneMap() {
val parameters = RawToneMappingParameters.DEFAULT
@@ -0,0 +1,130 @@
# Original DPP 4.21.30 x64 instructions executed under Unicorn 2.1.4.
# DLL SHA256: 534157b14d45168e203beaec2176e6d0867e679b47c42f4b325e1413691d3a6c
# RGBRecipe RVA: 0x1d76c0; auxiliary weighted-code RVA: 0x027990.
# Synthetic direct Int32LE table SHA256: d7579f8389d130536d739c7d84aba91076f7fdca3ce14c5d4be086d44b902f59
# Synthetic coarse Int32LE table SHA256: 9a92be8b06f7ef7087b9f777190729828b9465fa91247dd0064515f95d3bdbcf
# kind input/first second third expected_signed_int32
none -2147483648 0 0 0
none -65536 0 0 0
none -1 0 0 0
none 0 0 0 0
none 1 0 0 1
none 62 0 0 62
none 63 0 0 63
none 64 0 0 64
none 65 0 0 65
none 126 0 0 126
none 127 0 0 127
none 128 0 0 128
none 190 0 0 190
none 191 0 0 191
none 192 0 0 192
none 32767 0 0 32767
none 32768 0 0 32768
none 65406 0 0 65406
none 65407 0 0 65407
none 65408 0 0 65408
none 65470 0 0 65470
none 65471 0 0 65471
none 65472 0 0 65472
none 65534 0 0 65534
none 65535 0 0 65535
none 65536 0 0 65535
none 2147483647 0 0 65535
direct -2147483648 0 0 65535
direct -65536 0 0 65535
direct -1 0 0 65535
direct 0 0 0 65535
direct 1 0 0 131070
direct 62 0 0 4128705
direct 63 0 0 4194240
direct 64 0 0 4259775
direct 65 0 0 4325310
direct 126 0 0 8322945
direct 127 0 0 8388480
direct 128 0 0 8454015
direct 190 0 0 12517185
direct 191 0 0 12582720
direct 192 0 0 12648255
direct 32767 0 0 2147450880
direct 32768 0 0 -2147450881
direct 65406 0 0 -8519551
direct 65407 0 0 -8454016
direct 65408 0 0 -8388481
direct 65470 0 0 -4325311
direct 65471 0 0 -4259776
direct 65472 0 0 -4194241
direct 65534 0 0 -131071
direct 65535 0 0 -65536
direct 65536 0 0 -65536
direct 2147483647 0 0 -65536
coarse -2147483648 0 0 -128
coarse -65536 0 0 -128
coarse -1 0 0 -128
coarse 0 0 0 -128
coarse 1 0 0 -128
coarse 62 0 0 -128
coarse 63 0 0 -64
coarse 64 0 0 -64
coarse 65 0 0 -64
coarse 126 0 0 -64
coarse 127 0 0 0
coarse 128 0 0 0
coarse 190 0 0 0
coarse 191 0 0 64
coarse 192 0 0 64
coarse 32767 0 0 32768
coarse 32768 0 0 32768
coarse 65406 0 0 65344
coarse 65407 0 0 65408
coarse 65408 0 0 65408
coarse 65470 0 0 65408
coarse 65471 0 0 1073741888
coarse 65472 0 0 1073741888
coarse 65534 0 0 1073741888
coarse 65535 0 0 1073741888
coarse 65536 0 0 1073741888
coarse 2147483647 0 0 1073741888
both -2147483648 0 0 65535
both -65536 0 0 65535
both -1 0 0 65535
both 0 0 0 65535
both 1 0 0 131070
both 62 0 0 4128705
both 63 0 0 4194240
both 64 0 0 4259775
both 65 0 0 4325310
both 126 0 0 8322945
both 127 0 0 8388480
both 128 0 0 8454015
both 190 0 0 12517185
both 191 0 0 12582720
both 192 0 0 12648255
both 32767 0 0 2147450880
both 32768 0 0 -2147450881
both 65406 0 0 -8519551
both 65407 0 0 -8454016
both 65408 0 0 -8388481
both 65470 0 0 -4325311
both 65471 0 0 -4259776
both 65472 0 0 -4194241
both 65534 0 0 -131071
both 65535 0 0 -65536
both 65536 0 0 -65536
both 2147483647 0 0 -65536
aux 0 0 0 0
aux 1 1 1 1
aux 65535 65535 65535 65535
aux 65535 0 0 19583
aux 0 65535 0 38463
aux 0 0 65535 7487
aux 1 0 0 0
aux 0 1 0 0
aux 0 0 1 0
aux 2 2 2 2
aux 3 0 0 0
aux 4 0 0 1
aux 32768 32767 1 29023
aux 12345 23456 34567 21405
aux 65535 65534 65533 65534
aux 65534 65535 65535 65534
1 # Original DPP 4.21.30 x64 instructions executed under Unicorn 2.1.4.
2 # DLL SHA256: 534157b14d45168e203beaec2176e6d0867e679b47c42f4b325e1413691d3a6c
3 # RGBRecipe RVA: 0x1d76c0; auxiliary weighted-code RVA: 0x027990.
4 # Synthetic direct Int32LE table SHA256: d7579f8389d130536d739c7d84aba91076f7fdca3ce14c5d4be086d44b902f59
5 # Synthetic coarse Int32LE table SHA256: 9a92be8b06f7ef7087b9f777190729828b9465fa91247dd0064515f95d3bdbcf
6 # kind input/first second third expected_signed_int32
7 none -2147483648 0 0 0
8 none -65536 0 0 0
9 none -1 0 0 0
10 none 0 0 0 0
11 none 1 0 0 1
12 none 62 0 0 62
13 none 63 0 0 63
14 none 64 0 0 64
15 none 65 0 0 65
16 none 126 0 0 126
17 none 127 0 0 127
18 none 128 0 0 128
19 none 190 0 0 190
20 none 191 0 0 191
21 none 192 0 0 192
22 none 32767 0 0 32767
23 none 32768 0 0 32768
24 none 65406 0 0 65406
25 none 65407 0 0 65407
26 none 65408 0 0 65408
27 none 65470 0 0 65470
28 none 65471 0 0 65471
29 none 65472 0 0 65472
30 none 65534 0 0 65534
31 none 65535 0 0 65535
32 none 65536 0 0 65535
33 none 2147483647 0 0 65535
34 direct -2147483648 0 0 65535
35 direct -65536 0 0 65535
36 direct -1 0 0 65535
37 direct 0 0 0 65535
38 direct 1 0 0 131070
39 direct 62 0 0 4128705
40 direct 63 0 0 4194240
41 direct 64 0 0 4259775
42 direct 65 0 0 4325310
43 direct 126 0 0 8322945
44 direct 127 0 0 8388480
45 direct 128 0 0 8454015
46 direct 190 0 0 12517185
47 direct 191 0 0 12582720
48 direct 192 0 0 12648255
49 direct 32767 0 0 2147450880
50 direct 32768 0 0 -2147450881
51 direct 65406 0 0 -8519551
52 direct 65407 0 0 -8454016
53 direct 65408 0 0 -8388481
54 direct 65470 0 0 -4325311
55 direct 65471 0 0 -4259776
56 direct 65472 0 0 -4194241
57 direct 65534 0 0 -131071
58 direct 65535 0 0 -65536
59 direct 65536 0 0 -65536
60 direct 2147483647 0 0 -65536
61 coarse -2147483648 0 0 -128
62 coarse -65536 0 0 -128
63 coarse -1 0 0 -128
64 coarse 0 0 0 -128
65 coarse 1 0 0 -128
66 coarse 62 0 0 -128
67 coarse 63 0 0 -64
68 coarse 64 0 0 -64
69 coarse 65 0 0 -64
70 coarse 126 0 0 -64
71 coarse 127 0 0 0
72 coarse 128 0 0 0
73 coarse 190 0 0 0
74 coarse 191 0 0 64
75 coarse 192 0 0 64
76 coarse 32767 0 0 32768
77 coarse 32768 0 0 32768
78 coarse 65406 0 0 65344
79 coarse 65407 0 0 65408
80 coarse 65408 0 0 65408
81 coarse 65470 0 0 65408
82 coarse 65471 0 0 1073741888
83 coarse 65472 0 0 1073741888
84 coarse 65534 0 0 1073741888
85 coarse 65535 0 0 1073741888
86 coarse 65536 0 0 1073741888
87 coarse 2147483647 0 0 1073741888
88 both -2147483648 0 0 65535
89 both -65536 0 0 65535
90 both -1 0 0 65535
91 both 0 0 0 65535
92 both 1 0 0 131070
93 both 62 0 0 4128705
94 both 63 0 0 4194240
95 both 64 0 0 4259775
96 both 65 0 0 4325310
97 both 126 0 0 8322945
98 both 127 0 0 8388480
99 both 128 0 0 8454015
100 both 190 0 0 12517185
101 both 191 0 0 12582720
102 both 192 0 0 12648255
103 both 32767 0 0 2147450880
104 both 32768 0 0 -2147450881
105 both 65406 0 0 -8519551
106 both 65407 0 0 -8454016
107 both 65408 0 0 -8388481
108 both 65470 0 0 -4325311
109 both 65471 0 0 -4259776
110 both 65472 0 0 -4194241
111 both 65534 0 0 -131071
112 both 65535 0 0 -65536
113 both 65536 0 0 -65536
114 both 2147483647 0 0 -65536
115 aux 0 0 0 0
116 aux 1 1 1 1
117 aux 65535 65535 65535 65535
118 aux 65535 0 0 19583
119 aux 0 65535 0 38463
120 aux 0 0 65535 7487
121 aux 1 0 0 0
122 aux 0 1 0 0
123 aux 0 0 1 0
124 aux 2 2 2 2
125 aux 3 0 0 0
126 aux 4 0 0 1
127 aux 32768 32767 1 29023
128 aux 12345 23456 34567 21405
129 aux 65535 65534 65533 65534
130 aux 65534 65535 65535 65534
File diff suppressed because it is too large. Load diff