mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-17 22:30:41 +00:00
Rename gamut array
This commit is contained in:
parent
550931305b
commit
af23f7cf71
@ -63,7 +63,7 @@ byte[256] gamma = 0, 2, 0 // Gamma correction
|
||||
var brightness = 0
|
||||
var contrast = 0
|
||||
var tint = 22
|
||||
var[3] luma = 128, 128, 128 //0.35, 0.62, 0.18
|
||||
var[3] gamut = 128, 128, 128 //0.35, 0.62, 0.18
|
||||
byte errDiv = 3
|
||||
var rgbErr // Running color error array
|
||||
byte flags = 0
|
||||
@ -146,12 +146,9 @@ def calcChroma(angle)#0
|
||||
// Red maxes at 103.5 degrees
|
||||
// Green maxes at 240.7 degrees
|
||||
// Blue maxes at 347.1 degrees
|
||||
//r = max(0, luma[RED] - contrast + (cos(angle - RED_ANGLE) >> 7))
|
||||
//g = max(0, luma[GRN] - contrast + (cos(angle - GREEN_ANGLE) >> 7))
|
||||
//b = max(0, luma[BLU] - contrast + (cos(angle - BLUE_ANGLE) >> 7))
|
||||
r = max(0, 32767 / luma[RED] + cos(angle - RED_ANGLE) / luma[RED]) - contrast)
|
||||
g = max(0, 32767 / luma[GRN] + cos(angle - GREEN_ANGLE) / luma[GRN]) - contrast)
|
||||
b = max(0, 32767 / luma[BLU] + cos(angle - BLUE_ANGLE) / luma[BLU]) - contrast)
|
||||
r = max(0, 32767 / gamut[RED] + cos(angle - RED_ANGLE) / gamut[RED]) - contrast)
|
||||
g = max(0, 32767 / gamut[GRN] + cos(angle - GREEN_ANGLE) / gamut[GRN]) - contrast)
|
||||
b = max(0, 32767 / gamut[BLU] + cos(angle - BLUE_ANGLE) / gamut[BLU]) - contrast)
|
||||
// Make chroma add up to white
|
||||
ntscChroma[i*3 + RED] = (r + 2) / 4
|
||||
ntscChroma[i*3 + GRN] = (g + 2) / 4
|
||||
@ -254,9 +251,9 @@ def rgbInit#0
|
||||
puti(ntscChroma[i*3 + BLU]); putln
|
||||
next
|
||||
putln
|
||||
puti(luma[RED]); putc(',')
|
||||
puti(luma[GRN]); putc(',')
|
||||
puti(luma[BLU]); putln
|
||||
puti(gamut[RED]); putc(',')
|
||||
puti(gamut[GRN]); putc(',')
|
||||
puti(gamut[BLU]); putln
|
||||
fin
|
||||
// Make up for scaled chroma cycle color match
|
||||
for i = 0 to 11
|
||||
@ -537,7 +534,7 @@ if ^arg
|
||||
^(arg + 1) = BLU
|
||||
wend
|
||||
^(arg + 3) = ^arg - 3
|
||||
luma[^(arg + 1)] = luma[^(arg + 1)] + atoi(arg + 3)
|
||||
gamut[^(arg + 1)] = gamut[^(arg + 1)] + atoi(arg + 3)
|
||||
fin
|
||||
break
|
||||
is 'M' // Memory mode - no video output
|
||||
|
Loading…
x
Reference in New Issue
Block a user