vp9/inverse_transform_block_inter: move eob check

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

Change-Id: Id0a490bcce78c2b2ec6ea24d942191eb9b2bc16e
This commit is contained in:
James Zern
2016-03-23 20:32:12 -07:00
parent f64a30acef
commit c20c955e73

View File

@@ -189,8 +189,8 @@ static void inverse_transform_block_inter(MACROBLOCKD* xd, int plane,
uint8_t *dst, int stride, uint8_t *dst, int stride,
int eob) { int eob) {
struct macroblockd_plane *const pd = &xd->plane[plane]; struct macroblockd_plane *const pd = &xd->plane[plane];
if (eob > 0) {
tran_low_t *const dqcoeff = pd->dqcoeff; tran_low_t *const dqcoeff = pd->dqcoeff;
assert(eob > 0);
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VP9_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
if (xd->lossless) { if (xd->lossless) {
@@ -270,7 +270,6 @@ static void inverse_transform_block_inter(MACROBLOCKD* xd, int plane,
else else
memset(dqcoeff, 0, (16 << (tx_size << 1)) * sizeof(dqcoeff[0])); memset(dqcoeff, 0, (16 << (tx_size << 1)) * sizeof(dqcoeff[0]));
} }
}
} }
static void inverse_transform_block_intra(MACROBLOCKD* xd, int plane, static void inverse_transform_block_intra(MACROBLOCKD* xd, int plane,
@@ -403,9 +402,11 @@ static int reconstruct_inter_block(MACROBLOCKD *const xd, vpx_reader *r,
const int eob = vp9_decode_block_tokens(xd, plane, sc, col, row, tx_size, r, const int eob = vp9_decode_block_tokens(xd, plane, sc, col, row, tx_size, r,
mi->segment_id); mi->segment_id);
inverse_transform_block_inter(xd, plane, tx_size, if (eob > 0) {
&pd->dst.buf[4 * row * pd->dst.stride + 4 * col], inverse_transform_block_inter(
xd, plane, tx_size, &pd->dst.buf[4 * row * pd->dst.stride + 4 * col],
pd->dst.stride, eob); pd->dst.stride, eob);
}
return eob; return eob;
} }