shithub: dav1d

Download patch

ref: a57b07778e905f74178cbe05d84727516daac414
parent: 14d586ac2f9fa48c86bdc32b60a56e90bf132f73
author: Ronald S. Bultje <rsbultje@gmail.com>
date: Mon Dec 23 10:30:08 EST 2019

Check skip flag before setting tx context to TX_4X4 in lossless frames

Fixes #318.

--- a/src/decode.c
+++ b/src/decode.c
@@ -627,8 +627,8 @@
     // var-tx tree coding
     b->tx_split[0] = b->tx_split[1] = 0;
     b->max_ytx = dav1d_max_txfm_size_for_bs[bs][0];
-    if (f->frame_hdr->segmentation.lossless[b->seg_id] ||
-        b->max_ytx == TX_4X4)
+    if (!b->skip && (f->frame_hdr->segmentation.lossless[b->seg_id] ||
+                     b->max_ytx == TX_4X4))
     {
         b->max_ytx = b->uvtx = TX_4X4;
         if (f->frame_hdr->txfm_mode == DAV1D_TX_SWITCHABLE) {
@@ -645,8 +645,6 @@
             case_set(bh4, l., 1, by4);
             case_set(bw4, a->, 0, bx4);
 #undef set_ctx
-        } else {
-            assert(f->frame_hdr->txfm_mode == DAV1D_TX_LARGEST);
         }
         b->uvtx = dav1d_max_txfm_size_for_bs[bs][f->cur.p.layout];
     } else {