Skip to content

Commit 7d8ea08

Browse files
authored
Merge pull request aous72#162 from aous72/bug_64bit_oneline_transform
Fixes a bug when a resolution has one 64bit line.
2 parents 949d376 + a85e756 commit 7d8ea08

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/core/codestream/ojph_resolution.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -586,9 +586,19 @@ namespace ojph {
586586
else
587587
{
588588
// vertical transform
589-
si32* sp = aug->line->i32;
590-
for (ui32 i = width; i > 0; --i)
591-
*sp++ <<= 1;
589+
if (aug->line->flags & line_buf::LFT_32BIT)
590+
{
591+
si32* sp = aug->line->i32;
592+
for (ui32 i = width; i > 0; --i)
593+
*sp++ <<= 1;
594+
}
595+
else
596+
{
597+
assert(aug->line->flags & line_buf::LFT_64BIT);
598+
si64* sp = aug->line->i64;
599+
for (ui32 i = width; i > 0; --i)
600+
*sp++ <<= 1;
601+
}
592602
// horizontal transform
593603
rev_horz_ana(atk, bands[2].get_line(),
594604
bands[3].get_line(), aug->line, width, horz_even);

0 commit comments

Comments
 (0)