]> git.sesse.net Git - narabu/commitdiff
Predict Y DC from 128 instead of 0; microscopic improvement.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 24 Sep 2017 13:35:10 +0000 (15:35 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 24 Sep 2017 13:35:10 +0000 (15:35 +0200)
coded.dat
decoder.shader
qdc.cpp

index ea88547b1c2997d6b5cbe69bc21135a48362db68..b249f4cc37271b75b0e67e977769665a3160db63 100644 (file)
Binary files a/coded.dat and b/coded.dat differ
index cab6f8cbecbb508421b01740a208b431a8387136..7136e03e5ff0de76095f1fd5974f68fe0bc5a3ba 100644 (file)
@@ -224,7 +224,7 @@ void main()
        float q = (coeff_num == 0) ? 1.0 : (quant_matrix[coeff_num] * quant_scalefac / 128.0 / sqrt(2.0));  // FIXME: fold
        q *= (1.0 / 255.0);
        //int w = (coeff_num == 0) ? 32 : int(quant_matrix[coeff_num]);
-       int last_k = 0;
+       int last_k = 128;
 
        pick_timer(start, local_timing[0]);
 
diff --git a/qdc.cpp b/qdc.cpp
index f1ff2542575f866ae4de3c063b2c57acac1586f3..5a4a9d506195586ec9c56d2893621c0f69379233 100644 (file)
--- a/qdc.cpp
+++ b/qdc.cpp
@@ -721,7 +721,7 @@ int main(int argc, char **argv)
 
        // DC coefficient pred from the right to left (within each slice)
        for (unsigned block_idx = 0; block_idx < NUM_BLOCKS; block_idx += 320) {
-               int prev_k = 0;
+               int prev_k = 128;
 
                for (unsigned subblock_idx = 320; subblock_idx --> 0; ) {
                        unsigned yb = (block_idx + subblock_idx) / WIDTH_BLOCKS;