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:
@@ -279,8 +279,8 @@ static void inverse_transform_block_intra(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) {
|
||||||
@@ -361,7 +361,6 @@ static void inverse_transform_block_intra(MACROBLOCKD* xd, int plane,
|
|||||||
memset(dqcoeff, 0, (16 << (tx_size << 1)) * sizeof(dqcoeff[0]));
|
memset(dqcoeff, 0, (16 << (tx_size << 1)) * sizeof(dqcoeff[0]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static void predict_and_reconstruct_intra_block(MACROBLOCKD *const xd,
|
static void predict_and_reconstruct_intra_block(MACROBLOCKD *const xd,
|
||||||
vpx_reader *r,
|
vpx_reader *r,
|
||||||
@@ -389,10 +388,12 @@ static void predict_and_reconstruct_intra_block(MACROBLOCKD *const xd,
|
|||||||
&vp9_default_scan_orders[tx_size] : &vp9_scan_orders[tx_size][tx_type];
|
&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,
|
const int eob = vp9_decode_block_tokens(xd, plane, sc, col, row, tx_size,
|
||||||
r, mi->segment_id);
|
r, mi->segment_id);
|
||||||
|
if (eob > 0) {
|
||||||
inverse_transform_block_intra(xd, plane, tx_type, tx_size,
|
inverse_transform_block_intra(xd, plane, tx_type, tx_size,
|
||||||
dst, pd->dst.stride, eob);
|
dst, pd->dst.stride, eob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int reconstruct_inter_block(MACROBLOCKD *const xd, vpx_reader *r,
|
static int reconstruct_inter_block(MACROBLOCKD *const xd, vpx_reader *r,
|
||||||
MODE_INFO *const mi, int plane,
|
MODE_INFO *const mi, int plane,
|
||||||
|
Reference in New Issue
Block a user