From fc3b30ccd2069dda2711381d7cddb5daaa803019 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Wed, 25 May 2022 21:42:55 -0500 Subject: [PATCH] significant mem savings --- src/pixie/fileformats/jpeg.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pixie/fileformats/jpeg.nim b/src/pixie/fileformats/jpeg.nim index 09100f2..4656ab4 100644 --- a/src/pixie/fileformats/jpeg.nim +++ b/src/pixie/fileformats/jpeg.nim @@ -315,9 +315,9 @@ proc decodeSOF0(state: var DecoderState) = # Allocate block data structures. component.blocks = newSeqWith( - component.width, + state.numMcuWide * component.yScale, newSeq[array[64, int16]]( - component.height + state.numMcuHigh * component.xScale ) )