summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-02-14 07:32:04 -0500
committerSolomon Peachy <pizza@shaftnet.org>2020-02-14 07:32:04 -0500
commitc491fb7db99b8717707da1ab80a31974290b8c33 (patch)
tree5052498840d2dae14a14111808067dc758cb9783
parent4521f2be3529ca1cf5d7541dc6933f7cb248eeaa (diff)
downloadselphy_print-c491fb7db99b8717707da1ab80a31974290b8c33.tar.gz
selphy_print-c491fb7db99b8717707da1ab80a31974290b8c33.tar.bz2
selphy_print-c491fb7db99b8717707da1ab80a31974290b8c33.zip
lib70x: Fix Sharp_CopyLine()
As part of the copyline function, we have to fill in the "extra" head/tailroom on either end. Headroom was done correctly, but tailroom was not, instead overwriting the head room of of the next row. This probably has no visible effect on the image, but it was incorrect.
-rw-r--r--lib70x/libMitsuD70ImageReProcess.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib70x/libMitsuD70ImageReProcess.c b/lib70x/libMitsuD70ImageReProcess.c
index bf39356..9826eb3 100644
--- a/lib70x/libMitsuD70ImageReProcess.c
+++ b/lib70x/libMitsuD70ImageReProcess.c
@@ -52,7 +52,7 @@
*/
-#define LIB_VERSION "0.8.1"
+#define LIB_VERSION "0.8.2"
#include <stdio.h>
#include <stdint.h>
@@ -621,15 +621,15 @@ static void CImageEffect70_DeleteMidData(struct CImageEffect70 *data)
static void CImageEffect70_Sharp_CopyLine(struct CImageEffect70 *data,
int offset, const uint16_t *row, int rownum)
{
- uint16_t *src, *v5;
+ uint16_t *dst, *v5;
- src = data->linebuf_row[offset + 5];
- v5 = src + 3 * (data->columns - 1);
+ dst = data->linebuf_row[offset + 5]; /* Points at start of dst row */
+ v5 = dst + 3 * data->columns; /* Point at end of dst row */
- memcpy(src, row -(rownum * data->pixel_count), 2 * data->band_pixels);
+ memcpy(dst, row -(rownum * data->pixel_count), 2 * data->band_pixels);
- memcpy(src - 3, src, 6);
- memcpy(v5 + 3, v5, 6);
+ memcpy(dst - 3, dst, 6); /* Fill in dst row head */
+ memcpy(v5, v5 - 3, 6); /* Fill in dst row tail */
}
static void CImageEffect70_Sharp_PrepareLine(struct CImageEffect70 *data,