X-Git-Url: https://git.sesse.net/?p=fjl;a=blobdiff_plain;f=driver.c;h=dd1b1ae8d8796840a51b7dbd7c4d8119b25fbad9;hp=08b684a0715162f058a12fe920c7e9c4fb90fd62;hb=8013439fb5294f64bd76af91c4303070db2448a7;hpb=85cda6b1da31916b0127d1217825dea725619245 diff --git a/driver.c b/driver.c index 08b684a..dd1b1ae 100644 --- a/driver.c +++ b/driver.c @@ -5,6 +5,7 @@ #include "choice.h" #include "dehuff.h" #include "input.h" +#include "zigzag.h" struct jpeg_image { unsigned precision; @@ -121,7 +122,7 @@ void read_scan(struct byte_source* source, struct jpeg_image* image, huffman_tab possibly_refill(&bits, s); i += r; - zz[i] = extend(read_bits(&bits, s), s); + zz[unzigzag[i]] = extend(read_bits(&bits, s), s); } for (unsigned i = 0; i < 63; ++i) {