From 52ad767d2557836da8118aa27ac49da35d97a704 Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Thu, 8 Sep 2022 18:57:17 -0400 Subject: [PATCH] Fix woffset10 calculation --- src/subcmd_to_cel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subcmd_to_cel.cpp b/src/subcmd_to_cel.cpp index 2e54240..c8feee0 100644 --- a/src/subcmd_to_cel.cpp +++ b/src/subcmd_to_cel.cpp @@ -136,7 +136,7 @@ namespace l if(celtype_.lrform) ccc_.ccb_PRE1 |= PRE1_LRFORM; ccc_.ccb_PRE1 |= PRE1_TLLSB_PDC0; - ccc_.ccb_PRE1 |= (((w_ / (sizeof(uint32_t)/sizeof(uint16_t))) - PRE1_WOFFSET_PREFETCH) << PRE1_WOFFSET10_SHIFT); + ccc_.ccb_PRE1 |= (((w_ / (sizeof(uint32_t)/(celtype_.bpp / 8))) - PRE1_WOFFSET_PREFETCH) << PRE1_WOFFSET10_SHIFT); ccc_.ccb_Width = w_; ccc_.ccb_Height = h_;