shithub: dav1d

Download patch

ref: 5698bc91b692dbcc2e92c2990c5a2d841cfbea1d
parent: 9f8129145c850e5c9995031aff4a9e997cd02acf
author: Nathan E. Egge <[email protected]>
date: Sun Nov 18 13:32:17 EST 2018

Call msac_decode_bool() for 2 element CDFs.

--- a/src/decode.c
+++ b/src/decode.c
@@ -2108,8 +2108,7 @@
             const Av1Block *const b = &f->frame_thread.b[t->by * f->b4_stride + t->bx];
             is_split = b->bl != bl;
         } else {
-            const uint16_t cdf[2] = { gather_top_partition_prob(pc, bl), 0 };
-            is_split = msac_decode_symbol(&t->ts->msac, cdf, 2);
+            is_split = msac_decode_bool(&t->ts->msac, gather_top_partition_prob(pc, bl) >> EC_PROB_SHIFT);
             if (DEBUG_BLOCK_INFO)
                 printf("poc=%d,y=%d,x=%d,bl=%d,ctx=%d,bp=%d: r=%d\n",
                        f->frame_hdr.frame_offset, t->by, t->bx, bl, ctx,
@@ -2137,8 +2136,7 @@
             const Av1Block *const b = &f->frame_thread.b[t->by * f->b4_stride + t->bx];
             is_split = b->bl != bl;
         } else {
-            uint16_t cdf[2] = { gather_left_partition_prob(pc, bl), 0 };
-            is_split = msac_decode_symbol(&t->ts->msac, cdf, 2);
+            is_split = msac_decode_bool(&t->ts->msac, gather_left_partition_prob(pc, bl) >> EC_PROB_SHIFT);
             if (f->cur.p.layout == DAV1D_PIXEL_LAYOUT_I422 && !is_split)
                 return 1;
             if (DEBUG_BLOCK_INFO)