CoCg-only channel handling

This commit is contained in:
minjaesong
2025-09-29 22:16:44 +09:00
parent 8b808ca297
commit 836e69a40b

View File

@@ -4729,6 +4729,11 @@ class GraphicsJSR223Delegate(private val vm: VM) {
}
}
}
// write Y=127 if there's no luma channel
if (channelLayout == CHANNEL_LAYOUT_COCG || channelLayout == CHANNEL_LAYOUT_COCG_A) {
Arrays.fill(finalYTile, 127f)
}
// Convert to RGB based on TAV version and mode
// v1,v3 = YCoCg-R, v2,v4 = ICtCp
@@ -5232,6 +5237,11 @@ class GraphicsJSR223Delegate(private val vm: VM) {
}
}
// write Y=127 if there's no luma channel
if (channelLayout == CHANNEL_LAYOUT_COCG || channelLayout == CHANNEL_LAYOUT_COCG_A) {
Arrays.fill(finalYTile, 127f)
}
// Convert to RGB based on TAV version and mode
// v1,v3 = YCoCg-R, v2,v4 = ICtCp
if (tavVersion == 2 || tavVersion == 4) {