From ef8a955dc0f742e1890b83a355e8bd3b423cdad0 Mon Sep 17 00:00:00 2001 From: esoha-nvidia <69258779+esoha-nvidia@users.noreply.github.com> Date: Tue, 17 Jan 2023 14:21:14 -0700 Subject: [PATCH] Add element to ssshist sssshist stores a histogram of how often each ssss value is used. There are 16 of them, from 1-16. Though 0 is unused, it's more convenient to index the elements by ssss so, rather than subtract one before indexing, we will make the array larger by one element. This fixes #266 --- src/mlv/liblj92/lj92.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mlv/liblj92/lj92.c b/src/mlv/liblj92/lj92.c index 0e98d02f..3ad22a56 100644 --- a/src/mlv/liblj92/lj92.c +++ b/src/mlv/liblj92/lj92.c @@ -49,7 +49,7 @@ typedef struct _ljp { int skiplen; // Skip this many values after each row u16* linearize; // Linearization table int linlen; - int sssshist[16]; + int sssshist[17]; // Huffman table - only one supported, and probably needed #ifdef SLOW_HUFF