Commit 6f43ff58 authored by Jingning Han's avatar Jingning Han
Browse files

Make the use of pred buffers consistent in MB/SB

Use in-place buffers (dst of MACROBLOCKD) for  macroblock prediction.
This makes the macroblock buffer handling consistent with those of
superblock. Remove predictor buffer MACROBLOCKD.

Change-Id: Id1bcd898961097b1e6230c10f0130753a59fc6df
parent 38f62321
...@@ -290,7 +290,6 @@ typedef struct { ...@@ -290,7 +290,6 @@ typedef struct {
} MODE_INFO; } MODE_INFO;
typedef struct blockd { typedef struct blockd {
uint8_t *predictor;
int16_t *diff; int16_t *diff;
int16_t *dequant; int16_t *dequant;
...@@ -354,7 +353,6 @@ struct mb_plane { ...@@ -354,7 +353,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
#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
......
...@@ -78,7 +78,6 @@ void vp9_setup_block_dptrs(MACROBLOCKD *mb) { ...@@ -78,7 +78,6 @@ void vp9_setup_block_dptrs(MACROBLOCKD *mb) {
const int to = r * 4 + c; const int to = r * 4 + c;
const int from = r * 4 * 16 + c * 4; const int from = r * 4 * 16 + c * 4;
blockd[to].diff = &mb->diff[from]; blockd[to].diff = &mb->diff[from];
blockd[to].predictor = &mb->predictor[from];
} }
} }
...@@ -87,7 +86,6 @@ void vp9_setup_block_dptrs(MACROBLOCKD *mb) { ...@@ -87,7 +86,6 @@ void vp9_setup_block_dptrs(MACROBLOCKD *mb) {
const int to = 16 + r * 2 + c; const int to = 16 + r * 2 + c;
const int from = 256 + r * 4 * 8 + c * 4; const int from = 256 + r * 4 * 8 + c * 4;
blockd[to].diff = &mb->diff[from]; blockd[to].diff = &mb->diff[from];
blockd[to].predictor = &mb->predictor[from];
} }
} }
...@@ -96,7 +94,6 @@ void vp9_setup_block_dptrs(MACROBLOCKD *mb) { ...@@ -96,7 +94,6 @@ void vp9_setup_block_dptrs(MACROBLOCKD *mb) {
const int to = 20 + r * 2 + c; const int to = 20 + r * 2 + c;
const int from = 320 + r * 4 * 8 + c * 4; const int from = 320 + r * 4 * 8 + c * 4;
blockd[to].diff = &mb->diff[from]; blockd[to].diff = &mb->diff[from];
blockd[to].predictor = &mb->predictor[from];
} }
} }
......
...@@ -32,22 +32,22 @@ static INLINE void recon(int rows, int cols, ...@@ -32,22 +32,22 @@ static INLINE void recon(int rows, int cols,
void vp9_recon_b_c(uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, void vp9_recon_b_c(uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr,
int stride) { int stride) {
recon(4, 4, pred_ptr, 16, diff_ptr, 16, dst_ptr, stride); recon(4, 4, pred_ptr, stride, diff_ptr, 16, dst_ptr, stride);
} }
void vp9_recon_uv_b_c(uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, void vp9_recon_uv_b_c(uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr,
int stride) { int stride) {
recon(4, 4, pred_ptr, 8, diff_ptr, 8, dst_ptr, stride); recon(4, 4, pred_ptr, stride, diff_ptr, 8, dst_ptr, stride);
} }
void vp9_recon4b_c(uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, void vp9_recon4b_c(uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr,
int stride) { int stride) {
recon(4, 16, pred_ptr, 16, diff_ptr, 16, dst_ptr, stride); recon(4, 16, pred_ptr, stride, diff_ptr, 16, dst_ptr, stride);
} }
void vp9_recon2b_c(uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, void vp9_recon2b_c(uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr,
int stride) { int stride) {
recon(4, 8, pred_ptr, 8, diff_ptr, 8, dst_ptr, stride); recon(4, 8, pred_ptr, stride, diff_ptr, 8, dst_ptr, stride);
} }
void vp9_recon_sby_s_c(MACROBLOCKD *mb, uint8_t *dst, void vp9_recon_sby_s_c(MACROBLOCKD *mb, uint8_t *dst,
...@@ -95,7 +95,8 @@ void vp9_recon_mby_c(MACROBLOCKD *xd) { ...@@ -95,7 +95,8 @@ void vp9_recon_mby_c(MACROBLOCKD *xd) {
for (i = 0; i < 16; i += 4) { for (i = 0; i < 16; i += 4) {
BLOCKD *b = &xd->block[i]; BLOCKD *b = &xd->block[i];
vp9_recon4b(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride); vp9_recon4b(*(b->base_dst) + b->dst, b->diff,
*(b->base_dst) + b->dst, b->dst_stride);
} }
} }
...@@ -104,13 +105,13 @@ void vp9_recon_mb_c(MACROBLOCKD *xd) { ...@@ -104,13 +105,13 @@ void vp9_recon_mb_c(MACROBLOCKD *xd) {
for (i = 0; i < 16; i += 4) { for (i = 0; i < 16; i += 4) {
BLOCKD *b = &xd->block[i]; BLOCKD *b = &xd->block[i];
vp9_recon4b(*(b->base_dst) + b->dst, b->diff,
vp9_recon4b(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride); *(b->base_dst) + b->dst, b->dst_stride);
} }
for (i = 16; i < 24; i += 2) { for (i = 16; i < 24; i += 2) {
BLOCKD *b = &xd->block[i]; BLOCKD *b = &xd->block[i];
vp9_recon2b(*(b->base_dst) + b->dst, b->diff,
vp9_recon2b(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride); *(b->base_dst) + b->dst, b->dst_stride);
} }
} }
...@@ -399,7 +399,7 @@ static void build_2x1_inter_predictor_wh(const BLOCKD *d0, const BLOCKD *d1, ...@@ -399,7 +399,7 @@ static void build_2x1_inter_predictor_wh(const BLOCKD *d0, const BLOCKD *d1,
int row, int col) { int row, int col) {
struct scale_factors * scale = &s[which_mv]; struct scale_factors * scale = &s[which_mv];
assert(d1->predictor - d0->predictor == block_size); assert(d1->dst - d0->dst == block_size);
assert(d1->pre == d0->pre + block_size); assert(d1->pre == d0->pre + block_size);
scale->set_scaled_offsets(scale, row, col); scale->set_scaled_offsets(scale, row, col);
...@@ -446,11 +446,11 @@ static void build_2x1_inter_predictor(const BLOCKD *d0, const BLOCKD *d1, ...@@ -446,11 +446,11 @@ static void build_2x1_inter_predictor(const BLOCKD *d0, const BLOCKD *d1,
int block_size, int stride, int block_size, int stride,
int which_mv, int weight, int which_mv, int weight,
const struct subpix_fn_table *subpix, const struct subpix_fn_table *subpix,
int row, int col, int use_dst) { int row, int col) {
uint8_t *d0_predictor = use_dst ? *(d0->base_dst) + d0->dst : d0->predictor; uint8_t *d0_predictor = *(d0->base_dst) + d0->dst;
uint8_t *d1_predictor = use_dst ? *(d1->base_dst) + d1->dst : d1->predictor; uint8_t *d1_predictor = *(d1->base_dst) + d1->dst;
struct scale_factors * scale = &s[which_mv]; struct scale_factors * scale = &s[which_mv];
stride = use_dst ? d0->dst_stride : stride; stride = d0->dst_stride;
assert(d1_predictor - d0_predictor == block_size); assert(d1_predictor - d0_predictor == block_size);
assert(d1->pre == d0->pre + block_size); assert(d1->pre == d0->pre + block_size);
...@@ -1338,8 +1338,7 @@ void vp9_build_inter_predictors_sb(MACROBLOCKD *mb, ...@@ -1338,8 +1338,7 @@ void vp9_build_inter_predictors_sb(MACROBLOCKD *mb,
} }
static void build_inter4x4_predictors_mb(MACROBLOCKD *xd, 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; int i;
MB_MODE_INFO * mbmi = &xd->mode_info_context->mbmi; MB_MODE_INFO * mbmi = &xd->mode_info_context->mbmi;
BLOCKD *blockd = xd->block; BLOCKD *blockd = xd->block;
...@@ -1368,8 +1367,7 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd, ...@@ -1368,8 +1367,7 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd,
build_2x1_inter_predictor(d0, d1, xd->scale_factor, 8, 16, which_mv, build_2x1_inter_predictor(d0, d1, xd->scale_factor, 8, 16, which_mv,
which_mv ? weight : 0, 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 { } else {
...@@ -1386,8 +1384,7 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd, ...@@ -1386,8 +1384,7 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd,
build_2x1_inter_predictor(d0, d1, xd->scale_factor, 4, 16, which_mv, build_2x1_inter_predictor(d0, d1, xd->scale_factor, 4, 16, which_mv,
which_mv ? weight : 0, which_mv ? weight : 0,
&xd->subpix, &xd->subpix,
mb_row * 16 + y, mb_col * 16 + x, mb_row * 16 + y, mb_col * 16 + x);
use_dst);
} }
} }
} }
...@@ -1405,8 +1402,7 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd, ...@@ -1405,8 +1402,7 @@ static void build_inter4x4_predictors_mb(MACROBLOCKD *xd,
for (which_mv = 0; which_mv < 1 + use_second_ref; ++which_mv) { 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, build_2x1_inter_predictor(d0, d1, xd->scale_factor_uv, 4, 8, which_mv,
which_mv ? weight : 0, &xd->subpix, which_mv ? weight : 0, &xd->subpix,
mb_row * 8 + y, mb_col * 8 + x, mb_row * 8 + y, mb_col * 8 + x);
use_dst);
} }
} }
} }
...@@ -1493,58 +1489,17 @@ static void build_4x4uvmvs(MACROBLOCKD *xd) { ...@@ -1493,58 +1489,17 @@ static void build_4x4uvmvs(MACROBLOCKD *xd) {
} }
} }
void vp9_build_inter16x16_predictors_mb(MACROBLOCKD *xd,
uint8_t *dst_y,
uint8_t *dst_u,
uint8_t *dst_v,
int dst_ystride,
int dst_uvstride,
int mb_row,
int mb_col) {
vp9_build_inter16x16_predictors_mby(xd, dst_y, dst_ystride, mb_row, mb_col);
vp9_build_inter16x16_predictors_mbuv(xd, dst_u, dst_v, dst_uvstride,
mb_row, mb_col);
#if CONFIG_COMP_INTERINTRA_PRED
if (xd->mode_info_context->mbmi.second_ref_frame == INTRA_FRAME) {
vp9_build_interintra_16x16_predictors_mb(xd, dst_y, dst_u, dst_v,
dst_ystride, dst_uvstride);
}
#endif
}
void vp9_build_inter_predictors_mb(MACROBLOCKD *xd, void vp9_build_inter_predictors_mb(MACROBLOCKD *xd,
int mb_row, int mb_row,
int mb_col) { int mb_col) {
if (xd->mode_info_context->mbmi.mode != SPLITMV) { if (xd->mode_info_context->mbmi.mode != SPLITMV) {
// TODO(jingning): to be replaced with vp9_build_inter_predictors_sb() when vp9_build_inter_predictors_sb(xd, mb_row, mb_col, BLOCK_SIZE_MB16X16);
// converting buffers from predictors to dst.
vp9_build_inter16x16_predictors_mb(xd, xd->predictor,
&xd->predictor[256],
&xd->predictor[320], 16, 8,
mb_row, mb_col);
} else { } else {
build_4x4uvmvs(xd); build_4x4uvmvs(xd);
build_inter4x4_predictors_mb(xd, mb_row, mb_col, 0); build_inter4x4_predictors_mb(xd, mb_row, mb_col);
} }
} }
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*/ /*encoder only*/
void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd, void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd,
int mb_row, int mb_col) { int mb_row, int mb_col) {
...@@ -1593,8 +1548,7 @@ void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd, ...@@ -1593,8 +1548,7 @@ void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd,
for (which_mv = 0; which_mv < 1 + use_second_ref; ++which_mv) { 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, build_2x1_inter_predictor(d0, d1, xd->scale_factor_uv, 4, 8, which_mv,
which_mv ? weight : 0, 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);
} }
} }
} }
...@@ -29,14 +29,20 @@ void vp9_build_inter16x16_predictors_mbuv(MACROBLOCKD *xd, ...@@ -29,14 +29,20 @@ void vp9_build_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
int mb_row, int mb_row,
int mb_col); int mb_col);
void vp9_build_inter16x16_predictors_mb(MACROBLOCKD *xd, void vp9_build_inter_predictors_sby(MACROBLOCKD *x,
uint8_t *dst_y, uint8_t *dst_y,
int dst_ystride,
int mb_row,
int mb_col,
BLOCK_SIZE_TYPE bsize);
void vp9_build_inter_predictors_sbuv(MACROBLOCKD *x,
uint8_t *dst_u, uint8_t *dst_u,
uint8_t *dst_v, uint8_t *dst_v,
int dst_ystride,
int dst_uvstride, int dst_uvstride,
int mb_row, int mb_row,
int mb_col); int mb_col,
BLOCK_SIZE_TYPE bsize);
void vp9_build_inter_predictors_sb(MACROBLOCKD *mb, void vp9_build_inter_predictors_sb(MACROBLOCKD *mb,
int mb_row, int mb_col, int mb_row, int mb_col,
...@@ -46,10 +52,6 @@ void vp9_build_inter_predictors_mb(MACROBLOCKD *xd, ...@@ -46,10 +52,6 @@ void vp9_build_inter_predictors_mb(MACROBLOCKD *xd,
int mb_row, int mb_row,
int mb_col); 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, void vp9_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd,
int mb_row, int mb_row,
int mb_col); int mb_col);
......
...@@ -273,7 +273,8 @@ void vp9_recon_intra_mbuv(MACROBLOCKD *xd) { ...@@ -273,7 +273,8 @@ void vp9_recon_intra_mbuv(MACROBLOCKD *xd) {
int i; int i;
for (i = 16; i < 24; i += 2) { for (i = 16; i < 24; i += 2) {
BLOCKD *b = &xd->block[i]; BLOCKD *b = &xd->block[i];
vp9_recon2b(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride); vp9_recon2b(*(b->base_dst) + b->dst, b->diff,
*(b->base_dst) + b->dst, b->dst_stride);
} }
} }
...@@ -758,40 +759,6 @@ void vp9_build_intra_predictors_sbuv_s(MACROBLOCKD *xd, ...@@ -758,40 +759,6 @@ void vp9_build_intra_predictors_sbuv_s(MACROBLOCKD *xd,
xd->left_available, xd->right_available); xd->left_available, xd->right_available);
} }
// TODO(jingning): merge mby and mbuv into the above sby and sbmu functions
void vp9_build_intra_predictors_mby(MACROBLOCKD *xd) {
vp9_build_intra_predictors(xd->dst.y_buffer, xd->dst.y_stride,
xd->predictor, 16,
xd->mode_info_context->mbmi.mode,
16, 16,
xd->up_available, xd->left_available,
xd->right_available);
}
void vp9_build_intra_predictors_mbuv_internal(MACROBLOCKD *xd,
uint8_t *upred_ptr,
uint8_t *vpred_ptr,
int uv_stride,
int mode, int bsize) {
vp9_build_intra_predictors(xd->dst.u_buffer, xd->dst.uv_stride,
upred_ptr, uv_stride, mode,
bsize, bsize,
xd->up_available, xd->left_available,
xd->right_available);
vp9_build_intra_predictors(xd->dst.v_buffer, xd->dst.uv_stride,
vpred_ptr, uv_stride, mode,
bsize, bsize,
xd->up_available, xd->left_available,
xd->right_available);
}
void vp9_build_intra_predictors_mbuv(MACROBLOCKD *xd) {
vp9_build_intra_predictors_mbuv_internal(xd, &xd->predictor[256],
&xd->predictor[320], 8,
xd->mode_info_context->mbmi.uv_mode,
8);
}
void vp9_intra8x8_predict(MACROBLOCKD *xd, void vp9_intra8x8_predict(MACROBLOCKD *xd,
BLOCKD *b, BLOCKD *b,
int mode, int mode,
......
...@@ -68,11 +68,15 @@ specialize vp9_recon_b ...@@ -68,11 +68,15 @@ specialize vp9_recon_b
prototype void vp9_recon_uv_b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride" prototype void vp9_recon_uv_b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride"
specialize vp9_recon_uv_b specialize vp9_recon_uv_b
# TODO(jingning): The prototype functions in c are modified to enable block-size configurable
# operations. Need to change the sse2 accrodingly.
prototype void vp9_recon2b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride" prototype void vp9_recon2b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride"
specialize vp9_recon2b sse2 specialize vp9_recon2b
# specialize vp9_recon2b sse2
prototype void vp9_recon4b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride" prototype void vp9_recon4b "uint8_t *pred_ptr, int16_t *diff_ptr, uint8_t *dst_ptr, int stride"
specialize vp9_recon4b sse2 specialize vp9_recon4b
# specialize vp9_recon4b sse2
prototype void vp9_recon_mb "struct macroblockd *x" prototype void vp9_recon_mb "struct macroblockd *x"
specialize vp9_recon_mb specialize vp9_recon_mb
...@@ -86,17 +90,14 @@ specialize vp9_recon_sby_s ...@@ -86,17 +90,14 @@ specialize vp9_recon_sby_s
prototype void vp9_recon_sbuv_s "struct macroblockd *x, uint8_t *udst, uint8_t *vdst, enum BLOCK_SIZE_TYPE bsize" prototype void vp9_recon_sbuv_s "struct macroblockd *x, uint8_t *udst, uint8_t *vdst, enum BLOCK_SIZE_TYPE bsize"
specialize void vp9_recon_sbuv_s specialize void vp9_recon_sbuv_s
prototype void vp9_build_intra_predictors "uint8_t *src, int src_stride, uint8_t *pred, int y_stride, int mode, int bw, int bh, int up_available, int left_available, int right_available"
specialize void vp9_build_intra_predictors
prototype void vp9_build_intra_predictors_sby_s "struct macroblockd *x, enum BLOCK_SIZE_TYPE bsize" prototype void vp9_build_intra_predictors_sby_s "struct macroblockd *x, enum BLOCK_SIZE_TYPE bsize"
specialize vp9_build_intra_predictors_sby_s; specialize vp9_build_intra_predictors_sby_s
prototype void vp9_build_intra_predictors_sbuv_s "struct macroblockd *x, enum BLOCK_SIZE_TYPE bsize" prototype void vp9_build_intra_predictors_sbuv_s "struct macroblockd *x, enum BLOCK_SIZE_TYPE bsize"
specialize vp9_build_intra_predictors_sbuv_s; specialize vp9_build_intra_predictors_sbuv_s
prototype void vp9_build_intra_predictors_mby "struct macroblockd *x"
specialize vp9_build_intra_predictors_mby;
prototype void vp9_build_intra_predictors_mbuv "struct macroblockd *x"
specialize vp9_build_intra_predictors_mbuv;
prototype void vp9_intra4x4_predict "struct macroblockd *xd, struct blockd *x, int b_mode, uint8_t *predictor, int pre_stride" prototype void vp9_intra4x4_predict "struct macroblockd *xd, struct blockd *x, int b_mode, uint8_t *predictor, int pre_stride"
specialize vp9_intra4x4_predict; specialize vp9_intra4x4_predict;
...@@ -620,16 +621,10 @@ specialize vp9_block_error mmx sse2 ...@@ -620,16 +621,10 @@ specialize vp9_block_error mmx sse2
vp9_block_error_sse2=vp9_block_error_xmm vp9_block_error_sse2=vp9_block_error_xmm
prototype void vp9_subtract_b "struct block *be, struct blockd *bd, int pitch" prototype void vp9_subtract_b "struct block *be, struct blockd *bd, int pitch"
specialize vp9_subtract_b mmx sse2 # TODO(jingning): The prototype function in c has been changed to remove
# the use of predictor buffer in MACROBLOCKD. Need to modify the mmx and sse2
prototype void vp9_subtract_b "struct block *be, struct blockd *bd, int pitch" # versions accordingly.
specialize vp9_subtract_b mmx sse2 specialize vp9_subtract_b
prototype void vp9_subtract_mby "int16_t *diff, uint8_t *src, uint8_t *pred, int stride"
specialize vp9_subtract_mby mmx sse2
prototype void vp9_subtract_mbuv "int16_t *diff, uint8_t *usrc, uint8_t *vsrc, uint8_t *pred, int stride"
specialize vp9_subtract_mbuv mmx sse2
# #
# Structured Similarity (SSIM) # Structured Similarity (SSIM)
......
...@@ -73,15 +73,15 @@ static void build_intra_predictors_mbuv_x86(MACROBLOCKD *xd, ...@@ -73,15 +73,15 @@ static void build_intra_predictors_mbuv_x86(MACROBLOCKD *xd,
} }
void vp9_build_intra_predictors_mbuv_sse2(MACROBLOCKD *xd) { void vp9_build_intra_predictors_mbuv_sse2(MACROBLOCKD *xd) {
build_intra_predictors_mbuv_x86(xd, &xd->predictor[256], build_intra_predictors_mbuv_x86(xd, xd->dst.u_buffer,
&xd->predictor[320], 8, xd->dst.v_buffer, xd->dst.uv_stride,
vp9_intra_pred_uv_tm_sse2, vp9_intra_pred_uv_tm_sse2,
vp9_intra_pred_uv_ho_mmx2); vp9_intra_pred_uv_ho_mmx2);
} }
void vp9_build_intra_predictors_mbuv_ssse3(MACROBLOCKD *xd) { void vp9_build_intra_predictors_mbuv_ssse3(MACROBLOCKD *xd) {
build_intra_predictors_mbuv_x86(xd, &xd->predictor[256], build_intra_predictors_mbuv_x86(xd, xd->dst.u_buffer,
&xd->predictor[320], 8, xd->dst.v_buffer, xd->dst.uv_stride,
vp9_intra_pred_uv_tm_ssse3, vp9_intra_pred_uv_tm_ssse3,
vp9_intra_pred_uv_ho_ssse3); vp9_intra_pred_uv_ho_ssse3);
} }
......
...@@ -645,7 +645,7 @@ static void decode_mb(VP9D_COMP *pbi, MACROBLOCKD *xd, ...@@ -645,7 +645,7 @@ static void decode_mb(VP9D_COMP *pbi, MACROBLOCKD *xd,
xd->mode_info_context->mbmi.mode, tx_size, xd->mode_info_context->mbmi.mode, tx_size,
xd->mode_info_context->mbmi.interp_filter); xd->mode_info_context->mbmi.interp_filter);
#endif #endif
vp9_build_inter_predictors_mb_s(xd, mb_row, mb_col); vp9_build_inter_predictors_mb(xd, mb_row, mb_col);
} }
if (xd->mode_info_context->mbmi.mb_skip_coeff) { if (xd->mode_info_context->mbmi.mb_skip_coeff) {
......
...@@ -2230,15 +2230,8 @@ static void encode_macroblock(VP9_COMP *cpi, TOKENEXTRA **t, ...@@ -2230,15 +2230,8 @@ static void encode_macroblock(VP9_COMP *cpi, TOKENEXTRA **t,
if (!x->skip) { if (!x->skip) {
vp9_encode_inter16x16(cm, x, mb_row, mb_col); vp9_encode_inter16x16(cm, x, mb_row, mb_col);
} else { } else {
vp9_build_inter16x16_predictors_mb(xd, vp9_build_inter_predictors_sb(xd, mb_row, mb_col, BLOCK_SIZE_MB16X16);
xd->dst.y_buffer,
xd->dst.u_buffer,
xd->dst.v_buffer,
xd->dst.y_stride,
xd->dst.uv_stride,
mb_row, mb_col);
#if CONFIG_COMP_INTERINTRA_PRED #if CONFIG_COMP_INTERINTRA_PRED
if (xd->mode_info_context->mbmi.second_ref_frame == INTRA_FRAME) { if (xd->mode_info_context->mbmi.second_ref_frame == INTRA_FRAME) {
vp9_build_interintra_16x16_predictors_mb(xd, vp9_build_interintra_16x16_predictors_mb(xd,
......
...@@ -52,7 +52,8 @@ static void encode_intra4x4block(MACROBLOCK *x, int ib) { ...@@ -52,7 +52,8 @@ static void encode_intra4x4block(MACROBLOCK *x, int ib) {
b->bmi.as_mode.context = vp9_find_bpred_context(&x->e_mbd, b); b->bmi.as_mode.context = vp9_find_bpred_context(&x->e_mbd, b);
#endif #endif
vp9_intra4x4_predict(&x->e_mbd, b, b->bmi.as_mode.first, b->predictor, 16); vp9_intra4x4_predict(&x->e_mbd, b, b->bmi.as_mode.first,
*(b->base_dst) + b->dst, b->dst_stride);
vp9_subtract_b(be, b, 16); vp9_subtract_b(be, b, 16);
tx_type = get_tx_type_4x4(&x->e_mbd, ib); tx_type = get_tx_type_4x4(&x->e_mbd, ib);
...@@ -69,7 +70,8 @@ static void encode_intra4x4block(MACROBLOCK *x, int ib) { ...@@ -69,7 +70,8 @@ static void encode_intra4x4block(MACROBLOCK *x, int ib) {
b->diff, 32); b->diff, 32);
}