Write to the right coefficient.
authorsgunderson@bigfoot.com <>
Sun, 31 May 2009 09:44:48 +0000 (11:44 +0200)
committersgunderson@bigfoot.com <>
Sun, 31 May 2009 09:44:48 +0000 (11:44 +0200)
driver.c

index 0834df763d2124f9268c441b9e2f2074d97815c3..6a7a8ec82d01996cdd83ea511575e6a65a76afc4 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -165,9 +165,9 @@ void read_scan(struct byte_source* source, struct jpeg_image* image, huffman_tab
                                                }
 
                                                possibly_refill(&bits, s);
+                                               coeff[unzigzag[i]] = extend(read_bits(&bits, s), s);
 
                                                i += r;
-                                               coeff[unzigzag[i]] = extend(read_bits(&bits, s), s);
                                        }
                        
                                        uint8_t pixdata[DCTSIZE2];