aboutsummaryrefslogtreecommitdiffstats
path: root/libquanta_vquantise_wu.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-02-25 20:14:12 +0100
committerMattias Andrée <m@maandree.se>2026-02-25 20:14:12 +0100
commitbf70082de09ae5d5748a048592adee7659cdb56f (patch)
tree5acb57aa9658035e36fff404d112ea1c95175544 /libquanta_vquantise_wu.c
parentfix man pages (diff)
downloadlibquanta-bf70082de09ae5d5748a048592adee7659cdb56f.tar.gz
libquanta-bf70082de09ae5d5748a048592adee7659cdb56f.tar.bz2
libquanta-bf70082de09ae5d5748a048592adee7659cdb56f.tar.xz
Fix missing initilisation of colour_shift_up/down
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--libquanta_vquantise_wu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libquanta_vquantise_wu.c b/libquanta_vquantise_wu.c
index 25a4ad2..fa5ae4a 100644
--- a/libquanta_vquantise_wu.c
+++ b/libquanta_vquantise_wu.c
@@ -701,6 +701,8 @@ libquanta_vquantise_wu(struct libquanta_palette *palette, va_list args)
subindex_multiplier = 1U;
for (i = nchannels; i--; subindex_multiplier *= ((1U << WORKING_BITS) + 1U)) {
channels[i].subindex_multiplier = subindex_multiplier;
+ channels[i].colour_shift_down = 0;
+ channels[i].colour_shift_up = 0;
if (channels[i].ch->bits_in > WORKING_BITS)
channels[i].colour_shift_down = channels[i].ch->bits_in - WORKING_BITS;
else if (channels[i].ch->bits_in < WORKING_BITS)