From a85e756efbe81759bba1c6143eeb757c56676cee Mon Sep 17 00:00:00 2001 From: Aous Naman Date: Fri, 13 Dec 2024 11:39:31 +1100 Subject: [PATCH] Fixes a bug when a resolution has one 64bit line. --- src/core/codestream/ojph_resolution.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/core/codestream/ojph_resolution.cpp b/src/core/codestream/ojph_resolution.cpp index 3a59ef5..965a394 100644 --- a/src/core/codestream/ojph_resolution.cpp +++ b/src/core/codestream/ojph_resolution.cpp @@ -586,9 +586,19 @@ namespace ojph { else { // vertical transform - si32* sp = aug->line->i32; - for (ui32 i = width; i > 0; --i) - *sp++ <<= 1; + if (aug->line->flags & line_buf::LFT_32BIT) + { + si32* sp = aug->line->i32; + for (ui32 i = width; i > 0; --i) + *sp++ <<= 1; + } + else + { + assert(aug->line->flags & line_buf::LFT_64BIT); + si64* sp = aug->line->i64; + for (ui32 i = width; i > 0; --i) + *sp++ <<= 1; + } // horizontal transform rev_horz_ana(atk, bands[2].get_line(), bands[3].get_line(), aug->line, width, horz_even);