vp9/inverse_transform_block_intra: move eob check

1 level up. the function is a no-op for eob == 0 and shouldn't be called

Change-Id: I1b4a050424cf2d0ea820120c8e7c4fb3065e39e7
This commit is contained in:
James Zern
2016-03-23 20:24:17 -07:00
parent 813221a163
commit f64a30acef

View File

@@ -279,8 +279,8 @@ static void inverse_transform_block_intra(MACROBLOCKD* xd, int plane,
uint8_t *dst, int stride,
int eob) {
struct macroblockd_plane *const pd = &xd->plane[plane];
if (eob > 0) {
tran_low_t *const dqcoeff = pd->dqcoeff;
assert(eob > 0);
#if CONFIG_VP9_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
if (xd->lossless) {
@@ -360,7 +360,6 @@ static void inverse_transform_block_intra(MACROBLOCKD* xd, int plane,
else
memset(dqcoeff, 0, (16 << (tx_size << 1)) * sizeof(dqcoeff[0]));
}
}
}
static void predict_and_reconstruct_intra_block(MACROBLOCKD *const xd,
@@ -389,9 +388,11 @@ static void predict_and_reconstruct_intra_block(MACROBLOCKD *const xd,
&vp9_default_scan_orders[tx_size] : &vp9_scan_orders[tx_size][tx_type];
const int eob = vp9_decode_block_tokens(xd, plane, sc, col, row, tx_size,
r, mi->segment_id);
if (eob > 0) {
inverse_transform_block_intra(xd, plane, tx_type, tx_size,
dst, pd->dst.stride, eob);
}
}
}
static int reconstruct_inter_block(MACROBLOCKD *const xd, vpx_reader *r,