Commit 05a79f2f authored by John Koleszar's avatar John Koleszar
Browse files

Move EOB to per-plane data

Continue migrating data from BLOCKD/MACROBLOCKD to the per-plane
structures.

Change-Id: Ibbfa68d6da438d32dcbe8df68245ee28b0a2fa2c
parent 4c05a051
...@@ -298,6 +298,7 @@ enum { MAX_MB_PLANE = 3 }; ...@@ -298,6 +298,7 @@ enum { MAX_MB_PLANE = 3 };
struct mb_plane { struct mb_plane {
DECLARE_ALIGNED(16, int16_t, qcoeff[64 * 64]); DECLARE_ALIGNED(16, int16_t, qcoeff[64 * 64]);
DECLARE_ALIGNED(16, int16_t, dqcoeff[64 * 64]); DECLARE_ALIGNED(16, int16_t, dqcoeff[64 * 64]);
DECLARE_ALIGNED(16, uint16_t, eobs[256]);
}; };
#define BLOCK_OFFSET(x, i, n) ((x) + (i) * (n)) #define BLOCK_OFFSET(x, i, n) ((x) + (i) * (n))
...@@ -310,7 +311,6 @@ struct mb_plane { ...@@ -310,7 +311,6 @@ struct mb_plane {
typedef struct macroblockd { typedef struct macroblockd {
DECLARE_ALIGNED(16, int16_t, diff[64*64+32*32*2]); /* from idct diff */ DECLARE_ALIGNED(16, int16_t, diff[64*64+32*32*2]); /* from idct diff */
DECLARE_ALIGNED(16, uint8_t, predictor[384]); // unused for superblocks DECLARE_ALIGNED(16, uint8_t, predictor[384]); // unused for superblocks
DECLARE_ALIGNED(16, uint16_t, eobs[256+64*2]);
#if CONFIG_CODE_NONZEROCOUNT #if CONFIG_CODE_NONZEROCOUNT
DECLARE_ALIGNED(16, uint16_t, nzcs[256+64*2]); DECLARE_ALIGNED(16, uint16_t, nzcs[256+64*2]);
#endif #endif
...@@ -700,21 +700,19 @@ struct plane_block_idx { ...@@ -700,21 +700,19 @@ struct plane_block_idx {
// TODO(jkoleszar): returning a struct so it can be used in a const context, // TODO(jkoleszar): returning a struct so it can be used in a const context,
// expect to refactor this further later. // expect to refactor this further later.
static INLINE struct plane_block_idx plane_block_idx(MACROBLOCKD *xd, static INLINE struct plane_block_idx plane_block_idx(int y_blocks,
int b_idx) { int b_idx) {
const BLOCK_SIZE_TYPE sb_type = xd->mode_info_context->mbmi.sb_type; const int v_offset = y_blocks * 5 / 4;
const int u_offset = 16 << (sb_type * 2);
const int v_offset = 20 << (sb_type * 2);
struct plane_block_idx res; struct plane_block_idx res;
if (b_idx < u_offset) { if (b_idx < y_blocks) {
res.plane = 0; res.plane = 0;
res.block = b_idx; res.block = b_idx;
} else if (b_idx < v_offset) { } else if (b_idx < v_offset) {
res.plane = 1; res.plane = 1;
res.block = b_idx - u_offset; res.block = b_idx - y_blocks;
} else { } else {
assert(b_idx < (24 << (sb_type * 2))); assert(b_idx < y_blocks * 3 / 2);
res.plane = 2; res.plane = 2;
res.block = b_idx - v_offset; res.block = b_idx - v_offset;
} }
......
...@@ -29,7 +29,8 @@ void vp9_inverse_transform_mby_4x4(MACROBLOCKD *xd) { ...@@ -29,7 +29,8 @@ void vp9_inverse_transform_mby_4x4(MACROBLOCKD *xd) {
vp9_short_iht4x4(BLOCK_OFFSET(xd->plane[0].dqcoeff, i, 16), vp9_short_iht4x4(BLOCK_OFFSET(xd->plane[0].dqcoeff, i, 16),
xd->block[i].diff, 16, tx_type); xd->block[i].diff, 16, tx_type);
} else { } else {
vp9_inverse_transform_b_4x4(xd, xd->eobs[i], vp9_inverse_transform_b_4x4(xd,
xd->plane[0].eobs[i],
BLOCK_OFFSET(xd->plane[0].dqcoeff, i, 16), BLOCK_OFFSET(xd->plane[0].dqcoeff, i, 16),
xd->block[i].diff, 32); xd->block[i].diff, 32);
} }
...@@ -40,12 +41,12 @@ void vp9_inverse_transform_mbuv_4x4(MACROBLOCKD *xd) { ...@@ -40,12 +41,12 @@ void vp9_inverse_transform_mbuv_4x4(MACROBLOCKD *xd) {
int i; int i;
for (i = 16; i < 20; i++) { for (i = 16; i < 20; i++) {
vp9_inverse_transform_b_4x4(xd, xd->eobs[i], vp9_inverse_transform_b_4x4(xd, xd->plane[1].eobs[i - 16],
BLOCK_OFFSET(xd->plane[1].dqcoeff, i - 16, 16), BLOCK_OFFSET(xd->plane[1].dqcoeff, i - 16, 16),
xd->block[i].diff, 16); xd->block[i].diff, 16);
} }
for (i = 20; i < 24; i++) { for (i = 20; i < 24; i++) {
vp9_inverse_transform_b_4x4(xd, xd->eobs[i], vp9_inverse_transform_b_4x4(xd, xd->plane[2].eobs[i - 20],
BLOCK_OFFSET(xd->plane[2].dqcoeff, i - 20, 16), BLOCK_OFFSET(xd->plane[2].dqcoeff, i - 20, 16),
xd->block[i].diff, 16); xd->block[i].diff, 16);
} }
...@@ -175,7 +176,7 @@ void vp9_inverse_transform_sby_4x4(MACROBLOCKD *xd) { ...@@ -175,7 +176,7 @@ void vp9_inverse_transform_sby_4x4(MACROBLOCKD *xd) {
const TX_TYPE tx_type = get_tx_type_4x4(xd, y_idx * 8 + x_idx); const TX_TYPE tx_type = get_tx_type_4x4(xd, y_idx * 8 + x_idx);
if (tx_type == DCT_DCT) { if (tx_type == DCT_DCT) {
vp9_inverse_transform_b_4x4(xd, xd->eobs[n], vp9_inverse_transform_b_4x4(xd, xd->plane[0].eobs[n],
BLOCK_OFFSET(xd->plane[0].dqcoeff, n, 16), BLOCK_OFFSET(xd->plane[0].dqcoeff, n, 16),
xd->diff + x_idx * 4 + y_idx * 4 * 32, 64); xd->diff + x_idx * 4 + y_idx * 4 * 32, 64);
} else { } else {
...@@ -213,11 +214,11 @@ void vp9_inverse_transform_sbuv_4x4(MACROBLOCKD *xd) { ...@@ -213,11 +214,11 @@ void vp9_inverse_transform_sbuv_4x4(MACROBLOCKD *xd) {
for (n = 0; n < 16; n++) { for (n = 0; n < 16; n++) {
const int x_idx = n & 3, y_idx = n >> 2; const int x_idx = n & 3, y_idx = n >> 2;
vp9_inverse_transform_b_4x4(xd, xd->eobs[64 + n], vp9_inverse_transform_b_4x4(xd, xd->plane[1].eobs[n],
BLOCK_OFFSET(xd->plane[1].dqcoeff, n, 16), BLOCK_OFFSET(xd->plane[1].dqcoeff, n, 16),
xd->diff + 1024 + x_idx * 4 + y_idx * 16 * 4, xd->diff + 1024 + x_idx * 4 + y_idx * 16 * 4,
32); 32);
vp9_inverse_transform_b_4x4(xd, xd->eobs[64 + 16 + n], vp9_inverse_transform_b_4x4(xd, xd->plane[2].eobs[n],
BLOCK_OFFSET(xd->plane[2].dqcoeff, n, 16), BLOCK_OFFSET(xd->plane[2].dqcoeff, n, 16),
xd->diff + 1280 + x_idx * 4 + y_idx * 16 * 4, xd->diff + 1280 + x_idx * 4 + y_idx * 16 * 4,
32); 32);
...@@ -278,7 +279,7 @@ void vp9_inverse_transform_sb64y_4x4(MACROBLOCKD *xd) { ...@@ -278,7 +279,7 @@ void vp9_inverse_transform_sb64y_4x4(MACROBLOCKD *xd) {
const TX_TYPE tx_type = get_tx_type_4x4(xd, y_idx * 16 + x_idx); const TX_TYPE tx_type = get_tx_type_4x4(xd, y_idx * 16 + x_idx);
if (tx_type == DCT_DCT) { if (tx_type == DCT_DCT) {
vp9_inverse_transform_b_4x4(xd, xd->eobs[n], vp9_inverse_transform_b_4x4(xd, xd->plane[0].eobs[n],
BLOCK_OFFSET(xd->plane[0].dqcoeff, n, 16), BLOCK_OFFSET(xd->plane[0].dqcoeff, n, 16),
xd->diff + x_idx * 4 + y_idx * 4 * 64, 128); xd->diff + x_idx * 4 + y_idx * 4 * 64, 128);
} else { } else {
...@@ -327,10 +328,10 @@ void vp9_inverse_transform_sb64uv_4x4(MACROBLOCKD *xd) { ...@@ -327,10 +328,10 @@ void vp9_inverse_transform_sb64uv_4x4(MACROBLOCKD *xd) {
for (n = 0; n < 64; n++) { for (n = 0; n < 64; n++) {
const int x_idx = n & 7, y_idx = n >> 3, off = x_idx * 4 + y_idx * 32 * 4; const int x_idx = n & 7, y_idx = n >> 3, off = x_idx * 4 + y_idx * 32 * 4;
vp9_inverse_transform_b_4x4(xd, xd->eobs[256 + n], vp9_inverse_transform_b_4x4(xd, xd->plane[1].eobs[n],
BLOCK_OFFSET(xd->plane[1].dqcoeff, n, 16), BLOCK_OFFSET(xd->plane[1].dqcoeff, n, 16),
xd->diff + 4096 + off, 64); xd->diff + 4096 + off, 64);
vp9_inverse_transform_b_4x4(xd, xd->eobs[256 + 64 + n], vp9_inverse_transform_b_4x4(xd, xd->plane[2].eobs[n],
BLOCK_OFFSET(xd->plane[2].dqcoeff, n, 16), BLOCK_OFFSET(xd->plane[2].dqcoeff, n, 16),
xd->diff + 4096 + 1024 + off, 64); xd->diff + 4096 + 1024 + off, 64);
} }
......
...@@ -248,20 +248,20 @@ static void decode_16x16(VP9D_COMP *pbi, MACROBLOCKD *xd, ...@@ -248,20 +248,20 @@ static void decode_16x16(VP9D_COMP *pbi, MACROBLOCKD *xd,
vp9_ht_dequant_idct_add_16x16_c(tx_type, xd->plane[0].qcoeff, vp9_ht_dequant_idct_add_16x16_c(tx_type, xd->plane[0].qcoeff,
xd->block[0].dequant, xd->predictor, xd->block[0].dequant, xd->predictor,
xd->dst.y_buffer, 16, xd->dst.y_stride, xd->dst.y_buffer, 16, xd->dst.y_stride,
xd->eobs[0]); xd->plane[0].eobs[0]);
} else { } else {
vp9_dequant_idct_add_16x16(xd->plane[0].qcoeff, xd->block[0].dequant, vp9_dequant_idct_add_16x16(xd->plane[0].qcoeff, xd->block[0].dequant,
xd->predictor, xd->dst.y_buffer, xd->predictor, xd->dst.y_buffer,
16, xd->dst.y_stride, xd->eobs[0]); 16, xd->dst.y_stride, xd->plane[0].eobs[0]);
} }
vp9_dequant_idct_add_8x8(xd->plane[1].qcoeff, xd->block[16].dequant, vp9_dequant_idct_add_8x8(xd->plane[1].qcoeff, xd->block[16].dequant,
xd->predictor + 16 * 16, xd->dst.u_buffer, 8, xd->predictor + 16 * 16, xd->dst.u_buffer, 8,
xd->dst.uv_stride, xd->eobs[16]); xd->dst.uv_stride, xd->plane[1].eobs[0]);
vp9_dequant_idct_add_8x8(xd->plane[2].qcoeff, xd->block[16].dequant, vp9_dequant_idct_add_8x8(xd->plane[2].qcoeff, xd->block[16].dequant,
xd->predictor + 16 * 16 + 64, xd->dst.v_buffer, 8, xd->predictor + 16 * 16 + 64, xd->dst.v_buffer, 8,
xd->dst.uv_stride, xd->eobs[20]); xd->dst.uv_stride, xd->plane[2].eobs[0]);
} }
static void decode_8x8(VP9D_COMP *pbi, MACROBLOCKD *xd, static void decode_8x8(VP9D_COMP *pbi, MACROBLOCKD *xd,
...@@ -298,10 +298,10 @@ static void decode_8x8(VP9D_COMP *pbi, MACROBLOCKD *xd, ...@@ -298,10 +298,10 @@ static void decode_8x8(VP9D_COMP *pbi, MACROBLOCKD *xd,
tx_type = get_tx_type_8x8(xd, ib); tx_type = get_tx_type_8x8(xd, ib);
if (tx_type != DCT_DCT) { if (tx_type != DCT_DCT) {
vp9_ht_dequant_idct_add_8x8_c(tx_type, q, dq, pre, dst, 16, stride, vp9_ht_dequant_idct_add_8x8_c(tx_type, q, dq, pre, dst, 16, stride,
xd->eobs[idx]); xd->plane[0].eobs[idx]);
} else { } else {
vp9_dequant_idct_add_8x8_c(q, dq, pre, dst, 16, stride, vp9_dequant_idct_add_8x8_c(q, dq, pre, dst, 16, stride,
xd->eobs[idx]); xd->plane[0].eobs[idx]);
} }
} }
} else { } else {
...@@ -325,29 +325,31 @@ static void decode_8x8(VP9D_COMP *pbi, MACROBLOCKD *xd, ...@@ -325,29 +325,31 @@ static void decode_8x8(VP9D_COMP *pbi, MACROBLOCKD *xd,
vp9_intra_uv4x4_predict(xd, b, i8x8mode, b->predictor); vp9_intra_uv4x4_predict(xd, b, i8x8mode, b->predictor);
xd->itxm_add(BLOCK_OFFSET(xd->plane[1].qcoeff, i, 16), xd->itxm_add(BLOCK_OFFSET(xd->plane[1].qcoeff, i, 16),
b->dequant, b->predictor, b->dequant, b->predictor,
*(b->base_dst) + b->dst, 8, b->dst_stride, xd->eobs[16 + i]); *(b->base_dst) + b->dst, 8, b->dst_stride,
xd->plane[1].eobs[i]);
b = &xd->block[20 + i]; b = &xd->block[20 + i];
vp9_intra_uv4x4_predict(xd, b, i8x8mode, b->predictor); vp9_intra_uv4x4_predict(xd, b, i8x8mode, b->predictor);
xd->itxm_add(BLOCK_OFFSET(xd->plane[2].qcoeff, i, 16), xd->itxm_add(BLOCK_OFFSET(xd->plane[2].qcoeff, i, 16),
b->dequant, b->predictor, b->dequant, b->predictor,
*(b->base_dst) + b->dst, 8, b->dst_stride, xd->eobs[20 + i]); *(b->base_dst) + b->dst, 8, b->dst_stride,
xd->plane[2].eobs[i]);
} }
} else if (xd->mode_info_context->mbmi.mode == SPLITMV) { } else if (xd->mode_info_context->mbmi.mode == SPLITMV) {
xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->block[16].dequant, xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->block[16].dequant,
xd->predictor + 16 * 16, xd->dst.u_buffer, xd->predictor + 16 * 16, xd->dst.u_buffer,
xd->dst.uv_stride, xd->eobs + 16); xd->dst.uv_stride, xd->plane[1].eobs);
xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->block[16].dequant, xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->block[16].dequant,
xd->predictor + 16 * 16 + 64, xd->dst.v_buffer, xd->predictor + 16 * 16 + 64, xd->dst.v_buffer,
xd->dst.uv_stride, xd->eobs + 20); xd->dst.uv_stride, xd->plane[2].eobs);
} else { } else {
vp9_dequant_idct_add_8x8(xd->plane[1].qcoeff, xd->block[16].dequant, vp9_dequant_idct_add_8x8(xd->plane[1].qcoeff, xd->block[16].dequant,
xd->predictor + 16 * 16, xd->dst.u_buffer, 8, xd->predictor + 16 * 16, xd->dst.u_buffer, 8,
xd->dst.uv_stride, xd->eobs[16]); xd->dst.uv_stride, xd->plane[1].eobs[0]);
vp9_dequant_idct_add_8x8(xd->plane[2].qcoeff, xd->block[16].dequant, vp9_dequant_idct_add_8x8(xd->plane[2].qcoeff, xd->block[16].dequant,
xd->predictor + 16 * 16 + 64, xd->dst.v_buffer, 8, xd->predictor + 16 * 16 + 64, xd->dst.v_buffer, 8,
xd->dst.uv_stride, xd->eobs[20]); xd->dst.uv_stride, xd->plane[2].eobs[0]);
} }
#if 0 // def DEC_DEBUG #if 0 // def DEC_DEBUG
if (dec_debug) { if (dec_debug) {
...@@ -394,24 +396,27 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd, ...@@ -394,24 +396,27 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd,
BLOCK_OFFSET(xd->plane[0].qcoeff, ib + iblock[j], 16), BLOCK_OFFSET(xd->plane[0].qcoeff, ib + iblock[j], 16),
b->dequant, b->predictor, b->dequant, b->predictor,
*(b->base_dst) + b->dst, 16, *(b->base_dst) + b->dst, 16,
b->dst_stride, xd->eobs[ib + iblock[j]]); b->dst_stride,
xd->plane[0].eobs[ib + iblock[j]]);
} else { } else {
xd->itxm_add(BLOCK_OFFSET(xd->plane[0].qcoeff, ib + iblock[j], 16), xd->itxm_add(BLOCK_OFFSET(xd->plane[0].qcoeff, ib + iblock[j], 16),
b->dequant, b->predictor, b->dequant, b->predictor,
*(b->base_dst) + b->dst, 16, b->dst_stride, *(b->base_dst) + b->dst, 16, b->dst_stride,
xd->eobs[ib + iblock[j]]); xd->plane[0].eobs[ib + iblock[j]]);
} }
} }
b = &xd->block[16 + i]; b = &xd->block[16 + i];
vp9_intra_uv4x4_predict(xd, b, i8x8mode, b->predictor); vp9_intra_uv4x4_predict(xd, b, i8x8mode, b->predictor);
xd->itxm_add(BLOCK_OFFSET(xd->plane[1].qcoeff, i, 16), xd->itxm_add(BLOCK_OFFSET(xd->plane[1].qcoeff, i, 16),
b->dequant, b->predictor, b->dequant, b->predictor,
*(b->base_dst) + b->dst, 8, b->dst_stride, xd->eobs[16 + i]); *(b->base_dst) + b->dst, 8, b->dst_stride,
xd->plane[1].eobs[i]);
b = &xd->block[20 + i]; b = &xd->block[20 + i];
vp9_intra_uv4x4_predict(xd, b, i8x8mode, b->predictor); vp9_intra_uv4x4_predict(xd, b, i8x8mode, b->predictor);
xd->itxm_add(BLOCK_OFFSET(xd->plane[2].qcoeff, i, 16), xd->itxm_add(BLOCK_OFFSET(xd->plane[2].qcoeff, i, 16),
b->dequant, b->predictor, b->dequant, b->predictor,
*(b->base_dst) + b->dst, 8, b->dst_stride, xd->eobs[20 + i]); *(b->base_dst) + b->dst, 8, b->dst_stride,
xd->plane[2].eobs[i]);
} }
} else if (mode == B_PRED) { } else if (mode == B_PRED) {
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
...@@ -430,11 +435,12 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd, ...@@ -430,11 +435,12 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd,
BLOCK_OFFSET(xd->plane[0].qcoeff, i, 16), BLOCK_OFFSET(xd->plane[0].qcoeff, i, 16),
b->dequant, b->predictor, b->dequant, b->predictor,
*(b->base_dst) + b->dst, 16, b->dst_stride, *(b->base_dst) + b->dst, 16, b->dst_stride,
xd->eobs[i]); xd->plane[0].eobs[i]);
} else { } else {
xd->itxm_add(BLOCK_OFFSET(xd->plane[0].qcoeff, i, 16), xd->itxm_add(BLOCK_OFFSET(xd->plane[0].qcoeff, i, 16),
b->dequant, b->predictor, b->dequant, b->predictor,
*(b->base_dst) + b->dst, 16, b->dst_stride, xd->eobs[i]); *(b->base_dst) + b->dst, 16, b->dst_stride,
xd->plane[0].eobs[i]);
} }
} }
#if CONFIG_NEWBINTRAMODES #if CONFIG_NEWBINTRAMODES
...@@ -444,10 +450,10 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd, ...@@ -444,10 +450,10 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd,
vp9_build_intra_predictors_mbuv(xd); vp9_build_intra_predictors_mbuv(xd);
xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->block[16].dequant, xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->block[16].dequant,
xd->predictor + 16 * 16, xd->dst.u_buffer, xd->predictor + 16 * 16, xd->dst.u_buffer,
xd->dst.uv_stride, xd->eobs + 16); xd->dst.uv_stride, xd->plane[1].eobs);
xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->block[16].dequant, xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->block[16].dequant,
xd->predictor + 16 * 16 + 64, xd->dst.v_buffer, xd->predictor + 16 * 16 + 64, xd->dst.v_buffer,
xd->dst.uv_stride, xd->eobs + 20); xd->dst.uv_stride, xd->plane[2].eobs);
} else if (mode == SPLITMV || get_tx_type_4x4(xd, 0) == DCT_DCT) { } else if (mode == SPLITMV || get_tx_type_4x4(xd, 0) == DCT_DCT) {
xd->itxm_add_y_block(xd->plane[0].qcoeff, xd->itxm_add_y_block(xd->plane[0].qcoeff,
xd->block[0].dequant, xd->block[0].dequant,
...@@ -457,10 +463,10 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd, ...@@ -457,10 +463,10 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd,
xd); xd);
xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->block[16].dequant, xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->block[16].dequant,
xd->predictor + 16 * 16, xd->dst.u_buffer, xd->predictor + 16 * 16, xd->dst.u_buffer,
xd->dst.uv_stride, xd->eobs + 16); xd->dst.uv_stride, xd->plane[1].eobs);
xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->block[16].dequant, xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->block[16].dequant,
xd->predictor + 16 * 16 + 64, xd->dst.v_buffer, xd->predictor + 16 * 16 + 64, xd->dst.v_buffer,
xd->dst.uv_stride, xd->eobs + 20); xd->dst.uv_stride, xd->plane[2].eobs);
} else { } else {
#if 0 // def DEC_DEBUG #if 0 // def DEC_DEBUG
if (dec_debug) { if (dec_debug) {
...@@ -487,19 +493,20 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd, ...@@ -487,19 +493,20 @@ static void decode_4x4(VP9D_COMP *pbi, MACROBLOCKD *xd,
BLOCK_OFFSET(xd->plane[0].qcoeff, i, 16), BLOCK_OFFSET(xd->plane[0].qcoeff, i, 16),
b->dequant, b->predictor, b->dequant, b->predictor,
*(b->base_dst) + b->dst, 16, *(b->base_dst) + b->dst, 16,
b->dst_stride, xd->eobs[i]); b->dst_stride, xd->plane[0].eobs[i]);
} else { } else {
xd->itxm_add(BLOCK_OFFSET(xd->plane[0].qcoeff, i, 16), xd->itxm_add(BLOCK_OFFSET(xd->plane[0].qcoeff, i, 16),
b->dequant, b->predictor, b->dequant, b->predictor,
*(b->base_dst) + b->dst, 16, b->dst_stride, xd->eobs[i]); *(b->base_dst) + b->dst, 16, b->dst_stride,
xd->plane[0].eobs[i]);
} }
} }
xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->block[16].dequant, xd->itxm_add_uv_block(xd->plane[1].qcoeff, xd->block[16].dequant,
xd->predictor + 16 * 16, xd->dst.u_buffer, xd->predictor + 16 * 16, xd->dst.u_buffer,
xd->dst.uv_stride, xd->eobs + 16); xd->dst.uv_stride, xd->plane[1].eobs);
xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->block[16].dequant, xd->itxm_add_uv_block(xd->plane[2].qcoeff, xd->block[16].dequant,
xd->predictor + 16 * 16 + 64, xd->dst.v_buffer, xd->predictor + 16 * 16 + 64, xd->dst.v_buffer,
xd->dst.uv_stride, xd->eobs + 20); xd->dst.uv_stride, xd->plane[2].eobs);
} }
} }
...@@ -507,9 +514,6 @@ static void decode_sb_16x16(MACROBLOCKD *mb, int y_size) { ...@@ -507,9 +514,6 @@ static void decode_sb_16x16(MACROBLOCKD *mb, int y_size) {
const int y_count = y_size * y_size; const int y_count = y_size * y_size;
const int uv_size = y_size / 2; const int uv_size = y_size / 2;
const int uv_count = uv_size * uv_size; const int uv_count = uv_size * uv_size;
const int u_eob_offset = 16 * y_count;
const int v_eob_offset = u_eob_offset + 16 * uv_count;
int n; int n;
for (n = 0; n < y_count; n++) { for (n = 0; n < y_count; n++) {
...@@ -524,7 +528,7 @@ static void decode_sb_16x16(MACROBLOCKD *mb, int y_size) { ...@@ -524,7 +528,7 @@ static void decode_sb_16x16(MACROBLOCKD *mb, int y_size) {
mb->dst.y_buffer + y_offset, mb->dst.y_buffer + y_offset,
mb->dst.y_buffer + y_offset, mb->dst.y_buffer + y_offset,
mb->dst.y_stride, mb->dst.y_stride, mb->dst.y_stride, mb->dst.y_stride,
mb->eobs[n * 16]); mb->plane[0].eobs[n * 16]);
} else { } else {
vp9_ht_dequant_idct_add_16x16_c(tx_type, vp9_ht_dequant_idct_add_16x16_c(tx_type,
BLOCK_OFFSET(mb->plane[0].qcoeff, n, 256), BLOCK_OFFSET(mb->plane[0].qcoeff, n, 256),
...@@ -532,7 +536,7 @@ static void decode_sb_16x16(MACROBLOCKD *mb, int y_size) { ...@@ -532,7 +536,7 @@ static void decode_sb_16x16(MACROBLOCKD *mb, int y_size) {
mb->dst.y_buffer + y_offset, mb->dst.y_buffer + y_offset,
mb->dst.y_buffer + y_offset, mb->dst.y_buffer + y_offset,
mb->dst.y_stride, mb->dst.y_stride, mb->dst.y_stride, mb->dst.y_stride,
mb->eobs[n * 16]); mb->plane[0].eobs[n * 16]);
} }
} }
...@@ -545,13 +549,13 @@ static void decode_sb_16x16(MACROBLOCKD *mb, int y_size) { ...@@ -545,13 +549,13 @@ static void decode_sb_16x16(MACROBLOCKD *mb, int y_size) {
mb->dst.u_buffer + uv_offset, mb->dst.u_buffer + uv_offset,
mb->dst.u_buffer + uv_offset, mb->dst.u_buffer + uv_offset,
mb->dst.uv_stride, mb->dst.uv_stride, mb->dst.uv_stride, mb->dst.uv_stride,
mb->eobs[u_eob_offset + n * 16]); mb->plane[1].eobs[n * 16]);
vp9_dequant_idct_add_16x16(BLOCK_OFFSET(mb->plane[2].qcoeff, n, 256), vp9_dequant_idct_add_16x16(BLOCK_OFFSET(mb->plane[2].qcoeff, n, 256),
mb->block[20].dequant, mb->block[20].dequant,
mb->dst.v_buffer + uv_offset, mb->dst.v_buffer + uv_offset,
mb->dst.v_buffer + uv_offset, mb->dst.v_buffer + uv_offset,
mb->dst.uv_stride, mb->dst.uv_stride, mb->dst.uv_stride, mb->dst.uv_stride,
mb->eobs[v_eob_offset + n * 16]); mb->plane[2].eobs[n * 16]);
} }
} }
...@@ -559,9 +563,6 @@ static INLINE void decode_sb_8x8(MACROBLOCKD *xd, int y_size) { ...@@ -559,9 +563,6 @@ static INLINE void decode_sb_8x8(MACROBLOCKD *xd, int y_size) {
const int y_count = y_size * y_size; const int y_count = y_size * y_size;
const int uv_size = y_size / 2; const int uv_size = y_size / 2;
const int uv_count = uv_size * uv_size; const int uv_count = uv_size * uv_size;
const int u_eob_offset = 4 * y_count;
const int v_eob_offset = u_eob_offset + 4 * uv_count;
int n; int n;
// luma // luma
...@@ -577,7 +578,7 @@ static INLINE void decode_sb_8x8(MACROBLOCKD *xd, int y_size) { ...@@ -577,7 +578,7 @@ static INLINE void decode_sb_8x8(MACROBLOCKD *xd, int y_size) {
xd->dst.y_buffer + y_offset, xd->dst.y_buffer + y_offset,
xd->dst.y_buffer + y_offset, xd->dst.y_buffer + y_offset,
xd->dst.y_stride, xd->dst.y_stride, xd->dst.y_stride, xd->dst.y_stride,
xd->eobs[n * 4]); xd->plane[0].eobs[n * 4]);
} else { } else {
vp9_ht_dequant_idct_add_8x8_c(tx_type, vp9_ht_dequant_idct_add_8x8_c(tx_type,
BLOCK_OFFSET(xd->plane[0].qcoeff, n, 64), BLOCK_OFFSET(xd->plane[0].qcoeff, n, 64),
...@@ -585,7 +586,7 @@ static INLINE void decode_sb_8x8(MACROBLOCKD *xd, int y_size) { ...@@ -585,7 +586,7 @@ static INLINE void decode_sb_8x8(MACROBLOCKD *xd, int y_size) {
xd->dst.y_buffer + y_offset, xd->dst.y_buffer + y_offset,
xd->dst.y_buffer + y_offset, xd->dst.y_buffer + y_offset,
xd->dst.y_stride, xd->dst.y_stride, xd->dst.y_stride, xd->dst.y_stride,
xd->eobs[n * 4]); xd->plane[0].eobs[n * 4]);
} }
} }
...@@ -599,13 +600,13 @@ static INLINE void decode_sb_8x8(MACROBLOCKD *xd, int y_size) { ...@@ -599,13 +600,13 @@ static INLINE void decode_sb_8x8(MACROBLOCKD *xd, int y_size) {
xd->dst.u_buffer + uv_offset, xd->dst.u_buffer + uv_offset,
xd->dst.u_buffer + uv_offset, xd->dst.u_buffer + uv_offset,
xd->dst.uv_stride, xd->dst.uv_stride, xd->dst.uv_stride, xd->dst.uv_stride,
xd->eobs[u_eob_offset + n * 4]); xd->plane[1].eobs[n * 4]);
vp9_dequant_idct_add_8x8_c(BLOCK_OFFSET(xd->plane[2].qcoeff, n, 64), vp9_dequant_idct_add_8x8_c(BLOCK_OFFSET(xd->plane[2].qcoeff, n, 64),
xd->block[20].dequant, xd->block[20].dequant,
xd->dst.v_buffer + uv_offset, xd->dst.v_buffer + uv_offset,
xd->dst.v_buffer + uv_offset, xd->dst.v_buffer + uv_offset,
xd->dst.uv_stride, xd->dst.uv_stride, xd->dst.uv_stride, xd->dst.uv_stride,
xd->eobs[v_eob_offset + n * 4]); xd->plane[2].eobs[n * 4]);
} }
} }
...@@ -614,9 +615,6 @@ static void decode_sb_4x4(MACROBLOCKD *xd, int y_size) { ...@@ -614,9 +615,6 @@ static void decode_sb_4x4(MACROBLOCKD *xd, int y_size) {
const int y_count = y_size * y_size; const int y_count = y_size * y_size;
const int uv_size = y_size / 2; const int uv_size = y_size / 2;
const int uv_count = uv_size * uv_size; const int uv_count = uv_size * uv_size;
const int u_eob_offset = y_count;
const int v_eob_offset = u_eob_offset + uv_count;
int n; int n;