Commit cff266bb authored by Scott LaVarnway's avatar Scott LaVarnway Committed by Gerrit Code Review
Browse files

Merge "WIP: removing predictor buffer usage from decoder" into experimental

parents 56d01ee0 6189f2bc
......@@ -425,9 +425,10 @@ typedef struct macroblockd {
void (*itxm_add)(int16_t *input, const int16_t *dq,
uint8_t *pred, uint8_t *output, int pitch, int stride, int eob);
void (*itxm_add_y_block)(int16_t *q, const int16_t *dq,
uint8_t *pre, uint8_t *dst, int stride, struct macroblockd *xd);
uint8_t *pre, int pre_stride, uint8_t *dst, int stride,
struct macroblockd *xd);
void (*itxm_add_uv_block)(int16_t *q, const int16_t *dq,
uint8_t *pre, uint8_t *dst, int stride,
uint8_t *pre, int pre_stride, uint8_t *dst, int stride,
uint16_t *eobs);
struct subpix_fn_table subpix;
......
......@@ -473,8 +473,11 @@ static void build_2x1_inter_predictor(const BLOCKD *d0, const BLOCKD *d1,
int block_size, int stride,
int which_mv, int weight,
const struct subpix_fn_table *subpix,
int row, int col) {
assert(d1->predictor - d0->predictor == block_size);
int row, int col, int use_dst) {
uint8_t *d0_predictor = use_dst ? *(d0->base_dst) + d0->dst : d0->predictor;
uint8_t *d1_predictor = use_dst ? *(d1->base_dst) + d1->dst : d1->predictor;
stride = use_dst ? d0->dst_stride : stride;
assert(d1_predictor - d0_predictor == block_size);
assert(d1->pre == d0->pre + block_size);
set_scaled_offsets(&scale[which_mv], row, col);
......@@ -484,19 +487,18 @@ static void build_2x1_inter_predictor(const BLOCKD *d0, const BLOCKD *d1,
vp9_build_inter_predictor(*base_pre + d0->pre,
d0->pre_stride,
d0->predictor, stride,
d0_predictor, stride,
&d0->bmi.as_mv[which_mv],
&scale[which_mv],
2 * block_size, block_size,
weight, subpix);
} else {
uint8_t **base_pre0 = which_mv ? d0->base_second_pre : d0->base_pre;
uint8_t **base_pre1 = which_mv ? d1->base_second_pre : d1->base_pre;
vp9_build_inter_predictor(*base_pre0 + d0->pre,
d0->pre_stride,
d0->predictor, stride,
d0_predictor, stride,
&d0->bmi.as_mv[which_mv],
&scale[which_mv],
block_size, block_size,
......@@ -506,7 +508,7 @@ static void build_2x1_inter_predictor(const BLOCKD *d0, const BLOCKD *d1,
vp9_build_inter_predictor(*base_pre1 + d1->pre,
d1->pre_stride,
d1->predictor, stride,
d1_predictor, stride,
&d1->bmi.as_mv[which_mv],
&scale[which_mv],
block_size, block_size,
......@@ -1533,7 +1535,8 @@ void vp9_build_inter64x64_predictors_sb(MACROBLOCKD *mb,
}
static void build_inter4x4_predictors_mb(MACROBLOCKD *xd,
int mb_row, int mb_col) {
int mb_row, int mb_col,
int use_dst) {
int i;
MB_MODE_INFO * mbmi = &xd->mode_info_context->mbmi;
BLOCKD *blockd = xd->block;
......@@ -1562,7 +1565,8 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd,
build_2x1_inter_predictor(d0, d1, xd->scale_factor, 8, 16, which_mv,
which_mv ? weight : 0,
&xd->subpix, mb_row * 16 + y, mb_col * 16);
&xd->subpix, mb_row * 16 + y, mb_col * 16,
use_dst);
}
}
} else {
......@@ -1579,7 +1583,8 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd,
build_2x1_inter_predictor(d0, d1, xd->scale_factor, 4, 16, which_mv,
which_mv ? weight : 0,
&xd->subpix,
mb_row * 16 + y, mb_col * 16 + x);
mb_row * 16 + y, mb_col * 16 + x,
use_dst);
}
}
}
......@@ -1597,7 +1602,8 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd,
for (which_mv = 0; which_mv < 1 + use_second_ref; ++which_mv) {
build_2x1_inter_predictor(d0, d1, xd->scale_factor_uv, 4, 8, which_mv,
which_mv ? weight : 0, &xd->subpix,
mb_row * 8 + y, mb_col * 8 + x);
mb_row * 8 + y, mb_col * 8 + x,
use_dst);
}
}
}
......@@ -1714,10 +1720,26 @@ void vp9_build_inter_predictors_mb(MACROBLOCKD *xd,
} else {
build_4x4uvmvs(xd);
build_inter4x4_predictors_mb(xd, mb_row, mb_col);
build_inter4x4_predictors_mb(xd, mb_row, mb_col, 0);
}
}
void vp9_build_inter_predictors_mb_s(MACROBLOCKD *xd,
int mb_row,
int mb_col) {
if (xd->mode_info_context->mbmi.mode != SPLITMV) {
vp9_build_inter16x16_predictors_mb(xd, xd->dst.y_buffer,
xd->dst.u_buffer,
xd->dst.v_buffer,
xd->dst.y_stride,
xd->dst.uv_stride,
mb_row, mb_col);
} else {
build_4x4uvmvs(xd);
build_inter4x4_predictors_mb(xd, mb_row, mb_col, 1);
}
}
/*encoder only*/
void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd,
int mb_row, int mb_col) {
......@@ -1766,7 +1788,8 @@ void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd,
for (which_mv = 0; which_mv < 1 + use_second_ref; ++which_mv) {
build_2x1_inter_predictor(d0, d1, xd->scale_factor_uv, 4, 8, which_mv,
which_mv ? weight : 0,
&xd->subpix, mb_row * 8 + y, mb_col * 8 + x);
&xd->subpix, mb_row * 8 + y, mb_col * 8 + x,
0);
}
}
}
......@@ -48,6 +48,10 @@ void vp9_build_inter_predictors_mb(MACROBLOCKD *xd,
int mb_row,
int mb_col);
void vp9_build_inter_predictors_mb_s(MACROBLOCKD *xd,
int mb_row,
int mb_col);
void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd,
int mb_row,
int mb_col);
......
......@@ -751,7 +751,7 @@ void vp9_build_intra_predictors_sb64uv_s(MACROBLOCKD *xd) {
void vp9_intra8x8_predict(MACROBLOCKD *xd,
BLOCKD *b,
int mode,
uint8_t *predictor) {
uint8_t *predictor, int pre_stride) {
const int block4x4_idx = (b - xd->block);
const int block_idx = (block4x4_idx >> 2) | !!(block4x4_idx & 2);
const int have_top = (block_idx >> 1) || xd->up_available;
......@@ -759,7 +759,7 @@ void vp9_intra8x8_predict(MACROBLOCKD *xd,
const int have_right = !(block_idx & 1) || xd->right_available;
vp9_build_intra_predictors_internal(*(b->base_dst) + b->dst,
b->dst_stride, predictor, 16,
b->dst_stride, predictor, pre_stride,
mode, 8, have_top, have_left,
have_right);
}
......@@ -767,14 +767,14 @@ void vp9_intra8x8_predict(MACROBLOCKD *xd,
void vp9_intra_uv4x4_predict(MACROBLOCKD *xd,
BLOCKD *b,
int mode,
uint8_t *predictor) {
uint8_t *predictor, int pre_stride) {
const int block_idx = (b - xd->block) & 3;
const int have_top = (block_idx >> 1) || xd->up_available;
const int have_left = (block_idx & 1) || xd->left_available;
const int have_right = !(block_idx & 1) || xd->right_available;
vp9_build_intra_predictors_internal(*(b->base_dst) + b->dst,
b->dst_stride, predictor, 8,
b->dst_stride, predictor, pre_stride,
mode, 4, have_top, have_left,
have_right);
}
......
......@@ -164,7 +164,8 @@ B_PREDICTION_MODE vp9_find_bpred_context(MACROBLOCKD *xd, BLOCKD *x) {
void vp9_intra4x4_predict(MACROBLOCKD *xd,
BLOCKD *x,
int b_mode,
uint8_t *predictor) {
uint8_t *predictor,
int ps) {
int i, r, c;
const int block_idx = x - xd->block;
const int have_top = (block_idx >> 2) || xd->up_available;
......@@ -276,7 +277,7 @@ void vp9_intra4x4_predict(MACROBLOCKD *xd,
predictor[c] = expected_dc;
}
predictor += 16;
predictor += ps;
}
}
break;
......@@ -287,7 +288,7 @@ void vp9_intra4x4_predict(MACROBLOCKD *xd,
predictor[c] = clip_pixel(above[c] - top_left + left[r]);
}
predictor += 16;
predictor += ps;
}
}
break;
......@@ -305,7 +306,7 @@ void vp9_intra4x4_predict(MACROBLOCKD *xd,
predictor[c] = ap[c];
}
predictor += 16;
predictor += ps;
}
}
break;
......@@ -323,29 +324,29 @@ void vp9_intra4x4_predict(MACROBLOCKD *xd,
predictor[c] = lp[r];
}
predictor += 16;
predictor += ps;
}
}
break;
case B_LD_PRED: {
uint8_t *ptr = above;
predictor[0 * 16 + 0] = (ptr[0] + ptr[1] * 2 + ptr[2] + 2) >> 2;
predictor[0 * 16 + 1] =
predictor[1 * 16 + 0] = (ptr[1] + ptr[2] * 2 + ptr[3] + 2) >> 2;
predictor[0 * 16 + 2] =
predictor[1 * 16 + 1] =
predictor[2 * 16 + 0] = (ptr[2] + ptr[3] * 2 + ptr[4] + 2) >> 2;
predictor[0 * 16 + 3] =
predictor[1 * 16 + 2] =
predictor[2 * 16 + 1] =
predictor[3 * 16 + 0] = (ptr[3] + ptr[4] * 2 + ptr[5] + 2) >> 2;
predictor[1 * 16 + 3] =
predictor[2 * 16 + 2] =
predictor[3 * 16 + 1] = (ptr[4] + ptr[5] * 2 + ptr[6] + 2) >> 2;
predictor[2 * 16 + 3] =
predictor[3 * 16 + 2] = (ptr[5] + ptr[6] * 2 + ptr[7] + 2) >> 2;
predictor[3 * 16 + 3] = (ptr[6] + ptr[7] * 2 + ptr[7] + 2) >> 2;
predictor[0 * ps + 0] = (ptr[0] + ptr[1] * 2 + ptr[2] + 2) >> 2;
predictor[0 * ps + 1] =
predictor[1 * ps + 0] = (ptr[1] + ptr[2] * 2 + ptr[3] + 2) >> 2;
predictor[0 * ps + 2] =
predictor[1 * ps + 1] =
predictor[2 * ps + 0] = (ptr[2] + ptr[3] * 2 + ptr[4] + 2) >> 2;
predictor[0 * ps + 3] =
predictor[1 * ps + 2] =
predictor[2 * ps + 1] =
predictor[3 * ps + 0] = (ptr[3] + ptr[4] * 2 + ptr[5] + 2) >> 2;
predictor[1 * ps + 3] =
predictor[2 * ps + 2] =
predictor[3 * ps + 1] = (ptr[4] + ptr[5] * 2 + ptr[6] + 2) >> 2;
predictor[2 * ps + 3] =
predictor[3 * ps + 2] = (ptr[5] + ptr[6] * 2 + ptr[7] + 2) >> 2;
predictor[3 * ps + 3] = (ptr[6] + ptr[7] * 2 + ptr[7] + 2) >> 2;
}
break;
......@@ -362,22 +363,22 @@ void vp9_intra4x4_predict(MACROBLOCKD *xd,
pp[7] = above[2];
pp[8] = above[3];
predictor[3 * 16 + 0] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2;
predictor[3 * 16 + 1] =
predictor[2 * 16 + 0] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
predictor[3 * 16 + 2] =
predictor[2 * 16 + 1] =
predictor[1 * 16 + 0] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2;
predictor[3 * 16 + 3] =
predictor[2 * 16 + 2] =
predictor[1 * 16 + 1] =
predictor[0 * 16 + 0] = (pp[3] + pp[4] * 2 + pp[5] + 2) >> 2;
predictor[2 * 16 + 3] =
predictor[1 * 16 + 2] =
predictor[0 * 16 + 1] = (pp[4] + pp[5] * 2 + pp[6] + 2) >> 2;
predictor[1 * 16 + 3] =
predictor[0 * 16 + 2] = (pp[5] + pp[6] * 2 + pp[7] + 2) >> 2;
predictor[0 * 16 + 3] = (pp[6] + pp[7] * 2 + pp[8] + 2) >> 2;
predictor[3 * ps + 0] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2;
predictor[3 * ps + 1] =
predictor[2 * ps + 0] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
predictor[3 * ps + 2] =
predictor[2 * ps + 1] =
predictor[1 * ps + 0] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2;
predictor[3 * ps + 3] =
predictor[2 * ps + 2] =
predictor[1 * ps + 1] =
predictor[0 * ps + 0] = (pp[3] + pp[4] * 2 + pp[5] + 2) >> 2;
predictor[2 * ps + 3] =
predictor[1 * ps + 2] =
predictor[0 * ps + 1] = (pp[4] + pp[5] * 2 + pp[6] + 2) >> 2;
predictor[1 * ps + 3] =
predictor[0 * ps + 2] = (pp[5] + pp[6] * 2 + pp[7] + 2) >> 2;
predictor[0 * ps + 3] = (pp[6] + pp[7] * 2 + pp[8] + 2) >> 2;
}
break;
......@@ -394,44 +395,44 @@ void vp9_intra4x4_predict(MACROBLOCKD *xd,
pp[7] = above[2];
pp[8] = above[3];
predictor[3 * 16 + 0] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
predictor[2 * 16 + 0] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2;
predictor[3 * 16 + 1] =
predictor[1 * 16 + 0] = (pp[3] + pp[4] * 2 + pp[5] + 2) >> 2;
predictor[2 * 16 + 1] =
predictor[0 * 16 + 0] = (pp[4] + pp[5] + 1) >> 1;
predictor[3 * 16 + 2] =
predictor[1 * 16 + 1] = (pp[4] + pp[5] * 2 + pp[6] + 2) >> 2;
predictor[2 * 16 + 2] =
predictor[0 * 16 + 1] = (pp[5] + pp[6] + 1) >> 1;
predictor[3 * 16 + 3] =
predictor[1 * 16 + 2] = (pp[5] + pp[6] * 2 + pp[7] + 2) >> 2;
predictor[2 * 16 + 3] =
predictor[0 * 16 + 2] = (pp[6] + pp[7] + 1) >> 1;
predictor[1 * 16 + 3] = (pp[6] + pp[7] * 2 + pp[8] + 2) >> 2;
predictor[0 * 16 + 3] = (pp[7] + pp[8] + 1) >> 1;
predictor[3 * ps + 0] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
predictor[2 * ps + 0] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2;
predictor[3 * ps + 1] =
predictor[1 * ps + 0] = (pp[3] + pp[4] * 2 + pp[5] + 2) >> 2;
predictor[2 * ps + 1] =
predictor[0 * ps + 0] = (pp[4] + pp[5] + 1) >> 1;
predictor[3 * ps + 2] =
predictor[1 * ps + 1] = (pp[4] + pp[5] * 2 + pp[6] + 2) >> 2;
predictor[2 * ps + 2] =
predictor[0 * ps + 1] = (pp[5] + pp[6] + 1) >> 1;
predictor[3 * ps + 3] =
predictor[1 * ps + 2] = (pp[5] + pp[6] * 2 + pp[7] + 2) >> 2;
predictor[2 * ps + 3] =
predictor[0 * ps + 2] = (pp[6] + pp[7] + 1) >> 1;
predictor[1 * ps + 3] = (pp[6] + pp[7] * 2 + pp[8] + 2) >> 2;
predictor[0 * ps + 3] = (pp[7] + pp[8] + 1) >> 1;
}
break;
case B_VL_PRED: {
uint8_t *pp = above;
predictor[0 * 16 + 0] = (pp[0] + pp[1] + 1) >> 1;
predictor[1 * 16 + 0] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2;
predictor[2 * 16 + 0] =
predictor[0 * 16 + 1] = (pp[1] + pp[2] + 1) >> 1;
predictor[1 * 16 + 1] =
predictor[3 * 16 + 0] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
predictor[2 * 16 + 1] =
predictor[0 * 16 + 2] = (pp[2] + pp[3] + 1) >> 1;
predictor[3 * 16 + 1] =
predictor[1 * 16 + 2] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2;
predictor[0 * 16 + 3] =
predictor[2 * 16 + 2] = (pp[3] + pp[4] + 1) >> 1;
predictor[1 * 16 + 3] =
predictor[3 * 16 + 2] = (pp[3] + pp[4] * 2 + pp[5] + 2) >> 2;
predictor[2 * 16 + 3] = (pp[4] + pp[5] * 2 + pp[6] + 2) >> 2;
predictor[3 * 16 + 3] = (pp[5] + pp[6] * 2 + pp[7] + 2) >> 2;
predictor[0 * ps + 0] = (pp[0] + pp[1] + 1) >> 1;
predictor[1 * ps + 0] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2;
predictor[2 * ps + 0] =
predictor[0 * ps + 1] = (pp[1] + pp[2] + 1) >> 1;
predictor[1 * ps + 1] =
predictor[3 * ps + 0] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
predictor[2 * ps + 1] =
predictor[0 * ps + 2] = (pp[2] + pp[3] + 1) >> 1;
predictor[3 * ps + 1] =
predictor[1 * ps + 2] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2;
predictor[0 * ps + 3] =
predictor[2 * ps + 2] = (pp[3] + pp[4] + 1) >> 1;
predictor[1 * ps + 3] =
predictor[3 * ps + 2] = (pp[3] + pp[4] * 2 + pp[5] + 2) >> 2;
predictor[2 * ps + 3] = (pp[4] + pp[5] * 2 + pp[6] + 2) >> 2;
predictor[3 * ps + 3] = (pp[5] + pp[6] * 2 + pp[7] + 2) >> 2;
}
break;
......@@ -449,44 +450,44 @@ void vp9_intra4x4_predict(MACROBLOCKD *xd,
pp[8] = above[3];
predictor[3 * 16 + 0] = (pp[0] + pp[1] + 1) >> 1;
predictor[3 * 16 + 1] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2;
predictor[2 * 16 + 0] =
predictor[3 * 16 + 2] = (pp[1] + pp[2] + 1) >> 1;
predictor[2 * 16 + 1] =
predictor[3 * 16 + 3] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
predictor[2 * 16 + 2] =
predictor[1 * 16 + 0] = (pp[2] + pp[3] + 1) >> 1;
predictor[2 * 16 + 3] =
predictor[1 * 16 + 1] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2;
predictor[1 * 16 + 2] =
predictor[0 * 16 + 0] = (pp[3] + pp[4] + 1) >> 1;
predictor[1 * 16 + 3] =
predictor[0 * 16 + 1] = (pp[3] + pp[4] * 2 + pp[5] + 2) >> 2;
predictor[0 * 16 + 2] = (pp[4] + pp[5] * 2 + pp[6] + 2) >> 2;
predictor[0 * 16 + 3] = (pp[5] + pp[6] * 2 + pp[7] + 2) >> 2;
predictor[3 * ps + 0] = (pp[0] + pp[1] + 1) >> 1;
predictor[3 * ps + 1] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2;
predictor[2 * ps + 0] =
predictor[3 * ps + 2] = (pp[1] + pp[2] + 1) >> 1;
predictor[2 * ps + 1] =
predictor[3 * ps + 3] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
predictor[2 * ps + 2] =
predictor[1 * ps + 0] = (pp[2] + pp[3] + 1) >> 1;
predictor[2 * ps + 3] =
predictor[1 * ps + 1] = (pp[2] + pp[3] * 2 + pp[4] + 2) >> 2;
predictor[1 * ps + 2] =
predictor[0 * ps + 0] = (pp[3] + pp[4] + 1) >> 1;
predictor[1 * ps + 3] =
predictor[0 * ps + 1] = (pp[3] + pp[4] * 2 + pp[5] + 2) >> 2;
predictor[0 * ps + 2] = (pp[4] + pp[5] * 2 + pp[6] + 2) >> 2;
predictor[0 * ps + 3] = (pp[5] + pp[6] * 2 + pp[7] + 2) >> 2;
}
break;
case B_HU_PRED: {
uint8_t *pp = left;
predictor[0 * 16 + 0] = (pp[0] + pp[1] + 1) >> 1;
predictor[0 * 16 + 1] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2;
predictor[0 * 16 + 2] =
predictor[1 * 16 + 0] = (pp[1] + pp[2] + 1) >> 1;
predictor[0 * 16 + 3] =
predictor[1 * 16 + 1] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
predictor[1 * 16 + 2] =
predictor[2 * 16 + 0] = (pp[2] + pp[3] + 1) >> 1;
predictor[1 * 16 + 3] =
predictor[2 * 16 + 1] = (pp[2] + pp[3] * 2 + pp[3] + 2) >> 2;
predictor[2 * 16 + 2] =
predictor[2 * 16 + 3] =
predictor[3 * 16 + 0] =
predictor[3 * 16 + 1] =
predictor[3 * 16 + 2] =
predictor[3 * 16 + 3] = pp[3];
predictor[0 * ps + 0] = (pp[0] + pp[1] + 1) >> 1;
predictor[0 * ps + 1] = (pp[0] + pp[1] * 2 + pp[2] + 2) >> 2;
predictor[0 * ps + 2] =
predictor[1 * ps + 0] = (pp[1] + pp[2] + 1) >> 1;
predictor[0 * ps + 3] =
predictor[1 * ps + 1] = (pp[1] + pp[2] * 2 + pp[3] + 2) >> 2;
predictor[1 * ps + 2] =
predictor[2 * ps + 0] = (pp[2] + pp[3] + 1) >> 1;
predictor[1 * ps + 3] =
predictor[2 * ps + 1] = (pp[2] + pp[3] * 2 + pp[3] + 2) >> 2;
predictor[2 * ps + 2] =
predictor[2 * ps + 3] =
predictor[3 * ps + 0] =
predictor[3 * ps + 1] =
predictor[3 * ps + 2] =
predictor[3 * ps + 3] = pp[3];
}
break;
......
......@@ -27,7 +27,7 @@ forward_decls vp9_common_forward_decls
#
# Dequant
#
prototype void vp9_dequant_idct_add_y_block_8x8 "int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int stride, struct macroblockd *xd"
prototype void vp9_dequant_idct_add_y_block_8x8 "int16_t *q, const int16_t *dq, uint8_t *pre, int pre_stride, uint8_t *dst, int stride, struct macroblockd *xd"
specialize vp9_dequant_idct_add_y_block_8x8
prototype void vp9_dequant_idct_add_16x16 "int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, int pitch, int stride, int eob"
......@@ -39,10 +39,10 @@ specialize vp9_dequant_idct_add_8x8
prototype void vp9_dequant_idct_add "int16_t *input, const int16_t *dq, uint8_t *pred, uint8_t *dest, int pitch, int stride, int eob"
specialize vp9_dequant_idct_add
prototype void vp9_dequant_idct_add_y_block "int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int stride, struct macroblockd *xd"
prototype void vp9_dequant_idct_add_y_block "int16_t *q, const int16_t *dq, uint8_t *pre, int pre_stride, uint8_t *dst, int stride, struct macroblockd *xd"
specialize vp9_dequant_idct_add_y_block
prototype void vp9_dequant_idct_add_uv_block "int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int stride, uint16_t *eobs"
prototype void vp9_dequant_idct_add_uv_block "int16_t *q, const int16_t *dq, uint8_t *pre, int pre_stride, uint8_t *dst, int stride, uint16_t *eobs"
specialize vp9_dequant_idct_add_uv_block
prototype void vp9_dequant_idct_add_32x32 "int16_t *q, const int16_t *dq, uint8_t *pre, uint8_t *dst, int pitch, int stride, int eob"
......@@ -119,13 +119,13 @@ specialize vp9_build_intra_predictors_sb64y_s;
prototype void vp9_build_intra_predictors_sb64uv_s "struct macroblockd *x"
specialize vp9_build_intra_predictors_sb64uv_s;
prototype void vp9_intra4x4_predict "struct macroblockd *xd, struct blockd *x, int b_mode, uint8_t *predictor"
prototype void vp9_intra4x4_predict "struct macroblockd *xd, struct blockd *x, int b_mode, uint8_t *predictor, int pre_stride"
specialize vp9_intra4x4_predict;
prototype void vp9_intra8x8_predict "struct macroblockd *xd, struct blockd *x, int b_mode, uint8_t *predictor"
prototype void vp9_intra8x8_predict "struct macroblockd *xd, struct blockd *x, int b_mode, uint8_t *predictor, int pre_stride"
specialize vp9_intra8x8_predict;
prototype void vp9_intra_uv4x4_predict "struct macroblockd *xd, struct blockd *x, int b_mode, uint8_t *predictor"
prototype void vp9_intra_uv4x4_predict "struct macroblockd *xd, struct blockd *x, int b_mode, uint8_t *predictor, int pre_stride"
specialize vp9_intra_uv4x4_predict;
if [ "$CONFIG_VP9_DECODER" = "yes" ]; then
......
......@@ -226,24 +226,28 @@ static void skip_recon_mb(VP9D_COMP *pbi, MACROBLOCKD *xd,
static void decode_16x16(VP9D_COMP *pbi, MACROBLOCKD *xd,
BOOL_DECODER* const bc) {
const TX_TYPE tx_type = get_tx_type_16x16(xd, 0);
if (tx_type != DCT_DCT) {
vp9_dequant_iht_add_16x16_c(tx_type, xd->plane[0].qcoeff,
xd->block[0].dequant, xd->predictor,
xd->dst.y_buffer, 16, xd->dst.y_stride,
xd->plane[0].eobs[0]);
xd->block[0].dequant, xd->dst.y_buffer,
xd->dst.y_buffer, xd->dst.y_stride,
xd->dst.y_stride, xd->plane[0].eobs[0]);
} else {
vp9_dequant_idct_add_16x16(xd->plane[0].qcoeff, xd->block[0].dequant,
xd->predictor, xd->dst.y_buffer,
16, xd->dst.y_stride, xd->plane[0].eobs[0]);
xd->dst.y_buffer, xd->dst.y_buffer,
xd->dst.y_stride, xd->dst.y_stride,
xd->plane[0].eobs[0]);
}
vp9_dequant_idct_add_8x8(xd->plane[1].qcoeff, xd->block[16].dequant,
xd->predictor + 16 * 16, xd->dst.u_buffer, 8,
xd->dst.uv_stride, xd->plane[1].eobs[0]);
xd->dst.u_buffer, xd->dst.u_buffer,
xd->dst.uv_stride, xd->dst.uv_stride,
xd->plane[1].eobs[0]);
vp9_dequant_idct_add_8x8(xd->plane[2].qcoeff, xd->block[20].dequant,
xd->predictor + 16 * 16 + 64, xd->dst.v_buffer, 8,
xd->dst.uv_stride, xd->plane[2].eobs[0]);
xd->dst.v_buffer, xd->dst.v_buffer,
xd->dst.uv_stride, xd->dst.uv_stride,
xd->plane[2].eobs[0]);
}
static void decode_8x8(VP9D_COMP *pbi, MACROBLOCKD *xd,
......@@ -259,27 +263,27 @@ static void decode_8x8(VP9D_COMP *pbi, MACROBLOCKD *xd,
int idx = (ib & 0x02) ? (ib + 2) : ib;
int16_t *q = BLOCK_OFFSET(xd->plane[0].qcoeff, idx, 16);
int16_t *dq = xd->block[0].dequant;
uint8_t *pre = xd->block[ib].predictor;
uint8_t *dst = *(xd->block[ib].base_dst) + xd->block[ib].dst;
int stride = xd->dst.y_stride;
BLOCKD *b = &xd->block[ib];
if (mode == I8X8_PRED) {
BLOCKD *b = &xd->block[ib];
int i8x8mode = b->bmi.as_mode.first;
vp9_intra8x8_predict(xd, b, i8x8mode, b->predictor);
vp9_intra8x8_predict(xd, b, i8x8mode, dst, stride);
}
tx_type = get_tx_type_8x8(xd, ib);
if (tx_type != DCT_DCT) {
vp9_dequant_iht_add_8x8_c(tx_type, q, dq, pre, dst, 16, stride,
vp9_dequant_iht_add_8x8_c(tx_type, q, dq, dst, dst, stride, stride,
xd->plane[0].eobs[idx]);
} else {
vp9_dequant_idct_add_8x8_c(q, dq, pre, dst, 16, stride,
vp9_dequant_idct_add_8x8_c(q, dq, dst, dst, stride, stride,