From 2152826bc959466a8eea4b97d8249be634b26171 Mon Sep 17 00:00:00 2001 From: David Conrad Date: Tue, 7 Jun 2022 15:05:50 -0700 Subject: Fix chroma deblock filter size calculation for lossless In section 5.11.34 txSz is always defined to TX_4X4 if Lossless is true Chroma deblock filter size calculation needs to use this overridden txSz when lossless is enabled --- src/decode.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/decode.c b/src/decode.c index 126a39e..35937e8 100644 --- a/src/decode.c +++ b/src/decode.c @@ -2087,11 +2087,14 @@ static int decode_b(Dav1dTaskContext *const t, const uint8_t (*const lf_lvls)[8][2] = (const uint8_t (*)[8][2]) &ts->lflvl[b->seg_id][0][b->ref[0] + 1][!is_globalmv]; const uint16_t tx_split[2] = { b->tx_split0, b->tx_split1 }; + enum RectTxfmSize ytx = b->max_ytx, uvtx = b->uvtx; + if (f->frame_hdr->segmentation.lossless[b->seg_id]) { + ytx = (enum RectTxfmSize) TX_4X4; + uvtx = (enum RectTxfmSize) TX_4X4; + } dav1d_create_lf_mask_inter(t->lf_mask, f->lf.level, f->b4_stride, lf_lvls, t->bx, t->by, f->w4, f->h4, b->skip, bs, - f->frame_hdr->segmentation.lossless[b->seg_id] ? - (enum RectTxfmSize) TX_4X4 : b->max_ytx, - tx_split, b->uvtx, f->cur.p.layout, + ytx, tx_split, uvtx, f->cur.p.layout, &t->a->tx_lpf_y[bx4], &t->l.tx_lpf_y[by4], has_chroma ? &t->a->tx_lpf_uv[cbx4] : NULL, has_chroma ? &t->l.tx_lpf_uv[cby4] : NULL); -- cgit v1.2.3