mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-04-10 23:41:35 +00:00
Revert to more complete grey1 -> grey2 mappingg
This commit is contained in:
parent
efa87a5473
commit
6f6c41943a
@ -109,7 +109,7 @@ def rgbPix(rgbptr, errptr, cx)#1
|
||||
fin
|
||||
// Calc match if current pixel is zero
|
||||
pd:[0], pd:[1] = dist(r0, g0, b0, pr3, pg3, pb3)
|
||||
if lookahead > 0
|
||||
if lookahead > 0
|
||||
// Look ahead in chroma cycle for possible better match for next RGB pixel
|
||||
i = ((cx + 1) & 3) * 3
|
||||
lr1 = pr2 + ntscChroma[i+RED]
|
||||
@ -284,11 +284,11 @@ def rgbImportExport(rgbfile, dhgrfile)#0
|
||||
for j = 0 to 191
|
||||
fileio:read(refnum, rgbScanline, 560 * 3)
|
||||
for i = 0 to 559*3 step 3
|
||||
rgbScanline->[i+RED] = gamma[rgbScanline->[i+RED]]
|
||||
rgbScanline->[i+GRN] = gamma[rgbScanline->[i+GRN]]
|
||||
rgbScanline->[i+BLU] = gamma[rgbScanline->[i+BLU]]
|
||||
rgbScanline->[i+RED] = gamma[rgbScanline->[i+RED]]
|
||||
rgbScanline->[i+GRN] = gamma[rgbScanline->[i+GRN]]
|
||||
rgbScanline->[i+BLU] = gamma[rgbScanline->[i+BLU]]
|
||||
next
|
||||
memset(@ntscCycle, $4040, 12) // Start with artificial grey chroma cycle
|
||||
memset(@ntscCycle, $0000, 12) // Reset chroma cycle
|
||||
rgbptr = rgbScanline
|
||||
errptr = rgbErr
|
||||
for i = 0 to 559
|
||||
@ -297,16 +297,18 @@ def rgbImportExport(rgbfile, dhgrfile)#0
|
||||
fin
|
||||
rgbptr = rgbptr + 3
|
||||
errptr = errptr + 3 * 2
|
||||
// Special grey handling
|
||||
if (i & 3) == 3
|
||||
when dcgrGetPixel(i >> 2, j)
|
||||
is 5 // GREY1 -> map to GREY2
|
||||
dhgrOp(OP_SRC)
|
||||
dcgrColor(10)
|
||||
dcgrPixel(i >> 2, j)
|
||||
is 10 // GREY2
|
||||
memset(@ntscCycle, $0000, 12) // Create artificial grey chroma cycle
|
||||
wend
|
||||
// Map GREY1 -> GREY2
|
||||
if (i & 3) == 3 and dcgrGetPixel(i >> 2, j) == 5
|
||||
dhgrOp(OP_SRC)
|
||||
dcgrColor(10)
|
||||
dcgrPixel(i >> 2, j)
|
||||
memcpy(@ntscCycle, @ntscChroma, 9)
|
||||
ntscCycle[3+RED] = 0
|
||||
ntscCycle[3+GRN] = 0
|
||||
ntscCycle[3+BLU] = 0
|
||||
ntscCycle[9+RED] = 0
|
||||
ntscCycle[9+GRN] = 0
|
||||
ntscCycle[9+BLU] = 0
|
||||
fin
|
||||
next
|
||||
if ^$C000 == $83
|
||||
|
Loading…
x
Reference in New Issue
Block a user