]> git.sesse.net Git - narabu/commitdiff
Update a boring comment.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 16 Oct 2017 22:15:13 +0000 (00:15 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 16 Oct 2017 22:15:13 +0000 (00:15 +0200)
rans.shader

index 05ac1206d1961ac3732882fa152935f4bc884fde..925543ef7dfa284d0fddbce411a61444438dbc9f 100644 (file)
@@ -97,7 +97,9 @@ void encode_coeff(int signed_k, uint sign_bias, inout RansEncoder enc)
        uint k = abs(signed_k);
 
        if (k >= ESCAPE_LIMIT) {
        uint k = abs(signed_k);
 
        if (k >= ESCAPE_LIMIT) {
-               // ... boring stuff here
+               // Put the coefficient as a 1/(2^12) symbol _before_
+               // the 255 coefficient, since the decoder will read the
+               // 255 coefficient first.
                RansEncPut(enc.rans, enc.rans_offset, k, 1, prob_bits);
                k = ESCAPE_LIMIT;
        }
                RansEncPut(enc.rans, enc.rans_offset, k, 1, prob_bits);
                k = ESCAPE_LIMIT;
        }