summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-02-14 11:28:23 -0500
committerSolomon Peachy <pizza@shaftnet.org>2020-02-14 11:28:23 -0500
commitbc1f796196e42d257e02df3c147f45c5cab581cb (patch)
tree8298e2c35d699f6e1996f25678c8968abd1b41b9
parentfe47fa92214284ff65e261415c8909dd185a9271 (diff)
downloadselphy_print-bc1f796196e42d257e02df3c147f45c5cab581cb.tar.gz
selphy_print-bc1f796196e42d257e02df3c147f45c5cab581cb.tar.bz2
selphy_print-bc1f796196e42d257e02df3c147f45c5cab581cb.zip
lib70x: 98xx input data is BGR. Mitsu code assumes RGB!
-rw-r--r--lib70x/libMitsuD70ImageReProcess.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib70x/libMitsuD70ImageReProcess.c b/lib70x/libMitsuD70ImageReProcess.c
index d6fda63..6a43136 100644
--- a/lib70x/libMitsuD70ImageReProcess.c
+++ b/lib70x/libMitsuD70ImageReProcess.c
@@ -1823,10 +1823,10 @@ static int CP98xx_DoGammaConv(struct CP98xx_GammaParams *Gamma,
outRowBufOffset += (cols - 1) * 3;
for (col = 0, curRowBufOffset = 0 ; col < cols ; col ++) {
- // XXX is this order correct? output is YMC but this treats input as RGB?
- outRowPtr[outRowBufOffset] = Gamma->GNMby[inRowPtr[curRowBufOffset + 2]];
+ /* Mitsu code treats input as RGB, we always use BGR. */
+ outRowPtr[outRowBufOffset] = Gamma->GNMby[inRowPtr[curRowBufOffset]];
outRowPtr[outRowBufOffset + 1] = Gamma->GNMgm[inRowPtr[curRowBufOffset + 1]];
- outRowPtr[outRowBufOffset + 2] = Gamma->GNMrc[inRowPtr[curRowBufOffset]];
+ outRowPtr[outRowBufOffset + 2] = Gamma->GNMrc[inRowPtr[curRowBufOffset + 2]];
curRowBufOffset += 3;
if (already_reversed)
outRowBufOffset += 3;