From: Harish Mahendrakar Date: Fri, 19 Apr 2019 23:37:37 +0000 (-0700) Subject: [vp9] Fix handling of skip in row_mt=1 X-Git-Tag: v1.8.1~100 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc55568fef1f08d033dc9bd7a080f7d77a4a53ca;p=libvpx [vp9] Fix handling of skip in row_mt=1 For row_mt=1, when mi->skip is set to 1 after parse based on eobtotal for that partition, dqcoeff and eob need to be restored as recon_partition doesn't increment these pointers for skip cases Change-Id: I79711b0c175937aa6da3bba3b3bc053f91a8ce35 --- diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c index ccfb81396..d80472c42 100644 --- a/vp9/decoder/vp9_decodeframe.c +++ b/vp9/decoder/vp9_decodeframe.c @@ -1056,10 +1056,28 @@ static void parse_block(TileWorkerData *twd, VP9Decoder *const pbi, int mi_row, predict_recon_intra(xd, mi, twd, parse_intra_block_row_mt); } else { if (!mi->skip) { - const int eobtotal = - predict_recon_inter(xd, mi, twd, parse_inter_block_row_mt); - - if (bsize >= BLOCK_8X8 && eobtotal == 0) mi->skip = 1; // skip loopfilter + tran_low_t *dqcoeff[MAX_MB_PLANE]; + int *eob[MAX_MB_PLANE]; + int plane; + int eobtotal; + // Based on eobtotal and bsize, this may be mi->skip may be set to true + // In that case dqcoeff and eob need to be backed up and restored as + // recon_block will not increment these pointers for skip cases + for (plane = 0; plane < MAX_MB_PLANE; ++plane) { + const struct macroblockd_plane *const pd = &xd->plane[plane]; + dqcoeff[plane] = pd->dqcoeff; + eob[plane] = pd->eob; + } + eobtotal = predict_recon_inter(xd, mi, twd, parse_inter_block_row_mt); + + if (bsize >= BLOCK_8X8 && eobtotal == 0) { + mi->skip = 1; // skip loopfilter + for (plane = 0; plane < MAX_MB_PLANE; ++plane) { + struct macroblockd_plane *pd = &xd->plane[plane]; + pd->dqcoeff = dqcoeff[plane]; + pd->eob = eob[plane]; + } + } } }