Some asm() correction.
[fjl] / idct_test.c
index d7b543c..bd39c74 100644 (file)
@@ -76,8 +76,13 @@ void test_dc_becomes_spread_out(idct_alloc_t* idct_alloc, idct_free_t* idct_free
 
        void* userdata = idct_alloc(quant);
 
-       for (unsigned i = 0; i < 255*8; ++i) {  
-               uint32_t reference_value = i / 8;
+       for (unsigned i = -255*8; i < 255*16; ++i) {    
+               int reference_value = i / 8 + 128;
+               if (reference_value < 0) {
+                       reference_value = 0;
+               } else if (reference_value > 255) {
+                       reference_value = 255;
+               }
                coeff[0] = i;
 
                (*idct)(coeff, userdata, output);