]> git.sesse.net Git - narabu/blobdiff - decoder.shader
Predict DC across the entire slice instead of resetting each row. Opens up for slices...
[narabu] / decoder.shader
index e7b83e0ccbb52402dcb0a827119fe272eff892fc..cab6f8cbecbb508421b01740a208b431a8387136 100644 (file)
@@ -229,10 +229,6 @@ void main()
        pick_timer(start, local_timing[0]);
 
        for (uint block_idx = 40; block_idx --> 0; ) {
-               uint block_x = block_idx % 20;
-               uint block_y = block_idx / 20;
-               if (block_x == 19) last_k = 0;
-
                pick_timer(start, local_timing[1]);
 
                // rANS decode one coefficient across eight blocks (so 64x8 coefficients).
@@ -309,8 +305,12 @@ void main()
 
                pick_timer(start, local_timing[6]);
 
-               uint y = block_row * 16 + block_y * 8;
-               uint x = block_x * 64 + local_y * 8 + local_x;
+               uint global_block_idx = (block_row * 40 + block_idx) * 8 + local_y;
+               uint block_x = global_block_idx % 160;
+               uint block_y = global_block_idx / 160;
+
+               uint y = block_y * 8;
+               uint x = block_x * 8 + local_x;
                for (uint yl = 0; yl < 8; ++yl) {
                        imageStore(out_tex, ivec2(x, yl + y), vec4(temp[row_offset + yl * 8], 0.0, 0.0, 1.0));
                }