]> git.sesse.net Git - narabu/blobdiff - decoder.shader
Make blocks per stream a named constant.
[narabu] / decoder.shader
index 724a2f5f38362538adab6750d83297f96c440d24..3b721264b4026f5a6b9cbb6e9c6a5749b15bd30e 100644 (file)
@@ -16,6 +16,7 @@ const uint prob_bits = 12;
 const uint prob_scale = 1 << prob_bits;
 const uint NUM_SYMS = 256;
 const uint ESCAPE_LIMIT = NUM_SYMS - 1;
+const uint BLOCKS_PER_STREAM = 320;
 
 // These need to be folded into quant_matrix.
 const float dc_scalefac = 8.0;
@@ -230,7 +231,7 @@ void main()
 
        pick_timer(start, local_timing[0]);
 
-       for (uint block_idx = 40; block_idx --> 0; ) {
+       for (uint block_idx = BLOCKS_PER_STREAM / 8; block_idx --> 0; ) {
                pick_timer(start, local_timing[1]);
 
                // rANS decode one coefficient across eight blocks (so 64x8 coefficients).