summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encoder.c
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2022-03-29 12:40:12 +0900
committerJohann Koenig <johannkoenig@google.com>2022-03-30 01:56:23 +0000
commit02808ecbccf4fa385a700cffdd1aac796f6f37ca (patch)
tree32d4f59c02e1a7b917e399585f8d88d5f417587c /vp9/encoder/vp9_encoder.c
parent64f58f5e0a5bfd4f38f99f964ed628734a02ab5a (diff)
downloadlibvpx-02808ecbccf4fa385a700cffdd1aac796f6f37ca.tar
libvpx-02808ecbccf4fa385a700cffdd1aac796f6f37ca.tar.gz
libvpx-02808ecbccf4fa385a700cffdd1aac796f6f37ca.tar.bz2
libvpx-02808ecbccf4fa385a700cffdd1aac796f6f37ca.zip
remove skip_block from quantize
Whether a block is skipped is handled by mi->skip. x->skip_block is kept exclusively to verify that the quantize functions are not called for skip blocks. Finishes the cleanup in 13eed991f Bug: libvpx:1612 Change-Id: I1598c3b682d3c5e6c57a15fa4cb5df2c65b3a58a
Diffstat (limited to 'vp9/encoder/vp9_encoder.c')
-rw-r--r--vp9/encoder/vp9_encoder.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index 4609a6bb2..97805fc16 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -6620,19 +6620,22 @@ static void get_quantize_error(MACROBLOCK *x, int plane, tran_low_t *coeff,
int pix_num = 1 << num_pels_log2_lookup[txsize_to_bsize[tx_size]];
const int shift = tx_size == TX_32X32 ? 0 : 2;
+ // skip block condition should be handled before this is called.
+ assert(!x->skip_block);
+
#if CONFIG_VP9_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
- vp9_highbd_quantize_fp_32x32(coeff, pix_num, x->skip_block, p->round_fp,
- p->quant_fp, qcoeff, dqcoeff, pd->dequant,
- &eob, scan_order->scan, scan_order->iscan);
+ vp9_highbd_quantize_fp_32x32(coeff, pix_num, p->round_fp, p->quant_fp,
+ qcoeff, dqcoeff, pd->dequant, &eob,
+ scan_order->scan, scan_order->iscan);
} else {
- vp9_quantize_fp_32x32(coeff, pix_num, x->skip_block, p->round_fp,
- p->quant_fp, qcoeff, dqcoeff, pd->dequant, &eob,
- scan_order->scan, scan_order->iscan);
+ vp9_quantize_fp_32x32(coeff, pix_num, p->round_fp, p->quant_fp, qcoeff,
+ dqcoeff, pd->dequant, &eob, scan_order->scan,
+ scan_order->iscan);
}
#else
- vp9_quantize_fp_32x32(coeff, pix_num, x->skip_block, p->round_fp, p->quant_fp,
- qcoeff, dqcoeff, pd->dequant, &eob, scan_order->scan,
+ vp9_quantize_fp_32x32(coeff, pix_num, p->round_fp, p->quant_fp, qcoeff,
+ dqcoeff, pd->dequant, &eob, scan_order->scan,
scan_order->iscan);
#endif // CONFIG_VP9_HIGHBITDEPTH