Commit 77dc5c65 authored by Paul Wilkins's avatar Paul Wilkins
Browse files

Code clean up.

Further cases of inconsistent naming convention.

Change-Id: Id3411ecec6f01a4c889268a00f0c9fd5a92ea143
parent a1168155
......@@ -15,14 +15,15 @@
extern void vp8_recon16x16mb_neon(unsigned char *pred_ptr, short *diff_ptr, unsigned char *dst_ptr, int ystride, unsigned char *udst_ptr, unsigned char *vdst_ptr);
void vp8_recon_mb_neon(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) {
unsigned char *pred_ptr = &x->predictor[0];
short *diff_ptr = &x->diff[0];
unsigned char *dst_ptr = x->dst.y_buffer;
unsigned char *udst_ptr = x->dst.u_buffer;
unsigned char *vdst_ptr = x->dst.v_buffer;
int ystride = x->dst.y_stride;
/*int uv_stride = x->dst.uv_stride;*/
void vp8_recon_mb_neon(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *xd) {
unsigned char *pred_ptr = &xd->predictor[0];
short *diff_ptr = &xd->diff[0];
unsigned char *dst_ptr = xd->dst.y_buffer;
unsigned char *udst_ptr = xd->dst.u_buffer;
unsigned char *vdst_ptr = xd->dst.v_buffer;
int ystride = xd->dst.y_stride;
/*int uv_stride = xd->dst.uv_stride;*/
vp8_recon16x16mb_neon(pred_ptr, diff_ptr, dst_ptr, ystride, udst_ptr, vdst_ptr);
vp8_recon16x16mb_neon(pred_ptr, diff_ptr, dst_ptr, ystride,
udst_ptr, vdst_ptr);
}
......@@ -24,15 +24,16 @@ extern void vp8_build_intra_predictors_mby_neon_func(
int Up,
int Left);
void vp8_build_intra_predictors_mby_neon(MACROBLOCKD *x) {
unsigned char *y_buffer = x->dst.y_buffer;
unsigned char *ypred_ptr = x->predictor;
int y_stride = x->dst.y_stride;
int mode = x->mode_info_context->mbmi.mode;
int Up = x->up_available;
int Left = x->left_available;
vp8_build_intra_predictors_mby_neon_func(y_buffer, ypred_ptr, y_stride, mode, Up, Left);
void vp8_build_intra_predictors_mby_neon(MACROBLOCKD *xd) {
unsigned char *y_buffer = xd->dst.y_buffer;
unsigned char *ypred_ptr = xd->predictor;
int y_stride = xd->dst.y_stride;
int mode = xd->mode_info_context->mbmi.mode;
int Up = xd->up_available;
int Left = xd->left_available;
vp8_build_intra_predictors_mby_neon_func(y_buffer, ypred_ptr,
y_stride, mode, Up, Left);
}
#endif
......@@ -46,15 +47,16 @@ extern void vp8_build_intra_predictors_mby_s_neon_func(
int Up,
int Left);
void vp8_build_intra_predictors_mby_s_neon(MACROBLOCKD *x) {
unsigned char *y_buffer = x->dst.y_buffer;
unsigned char *ypred_ptr = x->predictor;
int y_stride = x->dst.y_stride;
int mode = x->mode_info_context->mbmi.mode;
int Up = x->up_available;
int Left = x->left_available;
void vp8_build_intra_predictors_mby_s_neon(MACROBLOCKD *xd) {
unsigned char *y_buffer = xd->dst.y_buffer;
unsigned char *ypred_ptr = xd->predictor;
int y_stride = xd->dst.y_stride;
int mode = xd->mode_info_context->mbmi.mode;
int Up = xd->up_available;
int Left = xd->left_available;
vp8_build_intra_predictors_mby_s_neon_func(y_buffer, ypred_ptr, y_stride, mode, Up, Left);
vp8_build_intra_predictors_mby_s_neon_func(y_buffer, ypred_ptr,
y_stride, mode, Up, Left);
}
#endif
......@@ -463,8 +463,8 @@ static void txfm_map(BLOCKD *b, B_PREDICTION_MODE bmode) {
}
#endif
extern void vp8_build_block_doffsets(MACROBLOCKD *x);
extern void vp8_setup_block_dptrs(MACROBLOCKD *x);
extern void vp8_build_block_doffsets(MACROBLOCKD *xd);
extern void vp8_setup_block_dptrs(MACROBLOCKD *xd);
static void update_blockd_bmi(MACROBLOCKD *xd) {
int i;
......
......@@ -13,21 +13,21 @@
static void recon_dcblock(MACROBLOCKD *x) {
BLOCKD *b = &x->block[24];
static void recon_dcblock(MACROBLOCKD *xd) {
BLOCKD *b = &xd->block[24];
int i;
for (i = 0; i < 16; i++) {
x->block[i].dqcoeff[0] = b->diff[i];
xd->block[i].dqcoeff[0] = b->diff[i];
}
}
static void recon_dcblock_8x8(MACROBLOCKD *x) {
BLOCKD *b = &x->block[24]; // for coeff 0, 2, 8, 10
x->block[0].dqcoeff[0] = b->diff[0];
x->block[4].dqcoeff[0] = b->diff[1];
x->block[8].dqcoeff[0] = b->diff[4];
x->block[12].dqcoeff[0] = b->diff[8];
static void recon_dcblock_8x8(MACROBLOCKD *xd) {
BLOCKD *b = &xd->block[24]; // for coeff 0, 2, 8, 10
xd->block[0].dqcoeff[0] = b->diff[0];
xd->block[4].dqcoeff[0] = b->diff[1];
xd->block[8].dqcoeff[0] = b->diff[4];
xd->block[12].dqcoeff[0] = b->diff[8];
}
......@@ -45,24 +45,28 @@ void vp8_inverse_transform_b(const vp8_idct_rtcd_vtable_t *rtcd, BLOCKD *b, int
}
void vp8_inverse_transform_mby(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x) {
void vp8_inverse_transform_mby(const vp8_idct_rtcd_vtable_t *rtcd,
MACROBLOCKD *xd) {
int i;
BLOCKD *blockd = xd->block;
/* do 2nd order transform on the dc block */
IDCT_INVOKE(rtcd, iwalsh16)(x->block[24].dqcoeff, x->block[24].diff);
IDCT_INVOKE(rtcd, iwalsh16)(blockd[24].dqcoeff, blockd[24].diff);
recon_dcblock(x);
recon_dcblock(xd);
for (i = 0; i < 16; i++) {
vp8_inverse_transform_b(rtcd, &x->block[i], 32);
vp8_inverse_transform_b(rtcd, &blockd[i], 32);
}
}
void vp8_inverse_transform_mbuv(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x) {
void vp8_inverse_transform_mbuv(const vp8_idct_rtcd_vtable_t *rtcd,
MACROBLOCKD *xd) {
int i;
BLOCKD *blockd = xd->block;
for (i = 16; i < 24; i++) {
vp8_inverse_transform_b(rtcd, &x->block[i], 16);
vp8_inverse_transform_b(rtcd, &blockd[i], 16);
}
}
......
......@@ -21,21 +21,21 @@ extern void vp8_inverse_htransform_b(const vp8_idct_rtcd_vtable_t *rtcd, BLOCKD
#endif
extern void vp8_inverse_transform_b(const vp8_idct_rtcd_vtable_t *rtcd, BLOCKD *b, int pitch);
extern void vp8_inverse_transform_mb(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
extern void vp8_inverse_transform_mby(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
extern void vp8_inverse_transform_mbuv(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
extern void vp8_inverse_transform_mb(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
extern void vp8_inverse_transform_mby(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
extern void vp8_inverse_transform_mbuv(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
extern void vp8_inverse_transform_b_8x8(const vp8_idct_rtcd_vtable_t *rtcd, short *input_dqcoeff, short *output_coeff, int pitch);
extern void vp8_inverse_transform_mb_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
extern void vp8_inverse_transform_mby_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
extern void vp8_inverse_transform_mbuv_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
extern void vp8_inverse_transform_mb_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
extern void vp8_inverse_transform_mby_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
extern void vp8_inverse_transform_mbuv_8x8(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
#if CONFIG_TX16X16
extern void vp8_inverse_transform_b_16x16(const vp8_idct_rtcd_vtable_t *rtcd,
short *input_dqcoeff, short *output_coeff,
int pitch);
extern void vp8_inverse_transform_mb_16x16(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
extern void vp8_inverse_transform_mby_16x16(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
extern void vp8_inverse_transform_mbuv_16x16(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
extern void vp8_inverse_transform_mb_16x16(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
extern void vp8_inverse_transform_mby_16x16(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
extern void vp8_inverse_transform_mbuv_16x16(const vp8_idct_rtcd_vtable_t *rtcd, MACROBLOCKD *xd);
#endif
#endif
......@@ -124,36 +124,36 @@ void vp8_recon2b_c
}
}
void vp8_recon_mby_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) {
void vp8_recon_mby_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *xd) {
#if ARCH_ARM
BLOCKD *b = &x->block[0];
BLOCKD *b = &xd->block[0];
RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
/*b = &x->block[4];*/
/*b = &xd->block[4];*/
b += 4;
RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
/*b = &x->block[8];*/
/*b = &xd->block[8];*/
b += 4;
RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
/*b = &x->block[12];*/
/*b = &xd->block[12];*/
b += 4;
RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
#else
int i;
for (i = 0; i < 16; i += 4) {
BLOCKD *b = &x->block[i];
BLOCKD *b = &xd->block[i];
RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
}
#endif
}
void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) {
void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *xd) {
#if ARCH_ARM
BLOCKD *b = &x->block[0];
BLOCKD *b = &xd->block[0];
RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
b += 4;
......@@ -164,7 +164,7 @@ void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) {
RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
b += 4;
/*b = &x->block[16];*/
/*b = &xd->block[16];*/
RECON_INVOKE(rtcd, recon2)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
b++;
......@@ -180,13 +180,13 @@ void vp8_recon_mb_c(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x) {
int i;
for (i = 0; i < 16; i += 4) {
BLOCKD *b = &x->block[i];
BLOCKD *b = &xd->block[i];
RECON_INVOKE(rtcd, recon4)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
}
for (i = 16; i < 24; i += 2) {
BLOCKD *b = &x->block[i];
BLOCKD *b = &xd->block[i];
RECON_INVOKE(rtcd, recon2)(b->predictor, b->diff, *(b->base_dst) + b->dst, b->dst_stride);
}
......
......@@ -21,10 +21,10 @@
void sym(unsigned char *pred, short *diff, unsigned char *dst, int pitch)
#define prototype_recon_macroblock(sym) \
void sym(const struct vp8_recon_rtcd_vtable *rtcd, MACROBLOCKD *x)
void sym(const struct vp8_recon_rtcd_vtable *rtcd, MACROBLOCKD *xd)
#define prototype_build_intra_predictors(sym) \
void sym(MACROBLOCKD *x)
void sym(MACROBLOCKD *xd)
#define prototype_intra4x4_predict(sym) \
void sym(BLOCKD *x, int b_mode, unsigned char *predictor)
......@@ -244,5 +244,6 @@ typedef struct vp8_recon_rtcd_vtable {
#define RECON_INVOKE(ctx,fn) vp8_recon_##fn
#endif
void vp8_recon_intra_mbuv(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
void vp8_recon_intra_mbuv(const vp8_recon_rtcd_vtable_t *rtcd,
MACROBLOCKD *xd);
#endif
......@@ -295,7 +295,7 @@ void vp8_build_2nd_inter_predictors_b(BLOCKD *d, int pitch, vp8_subpix_fn_t sppf
}
}
static void build_inter_predictors4b(MACROBLOCKD *x, BLOCKD *d, int pitch) {
static void build_inter_predictors4b(MACROBLOCKD *xd, BLOCKD *d, int pitch) {
unsigned char *ptr_base;
unsigned char *ptr;
unsigned char *pred_ptr = d->predictor;
......@@ -303,12 +303,15 @@ static void build_inter_predictors4b(MACROBLOCKD *x, BLOCKD *d, int pitch) {
ptr_base = *(d->base_pre);
mv.as_int = d->bmi.as_mv.first.as_int;
ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride + (mv.as_mv.col >> 3);
ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride +
(mv.as_mv.col >> 3);
if (mv.as_mv.row & 7 || mv.as_mv.col & 7) {
x->subpixel_predict8x8(ptr, d->pre_stride, (mv.as_mv.col & 7) << 1, (mv.as_mv.row & 7) << 1, pred_ptr, pitch);
xd->subpixel_predict8x8(ptr, d->pre_stride, (mv.as_mv.col & 7) << 1,
(mv.as_mv.row & 7) << 1, pred_ptr, pitch);
} else {
RECON_INVOKE(&x->rtcd->recon, copy8x8)(ptr, d->pre_stride, pred_ptr, pitch);
RECON_INVOKE(&xd->rtcd->recon, copy8x8)
(ptr, d->pre_stride, pred_ptr, pitch);
}
}
......@@ -318,7 +321,8 @@ static void build_inter_predictors4b(MACROBLOCKD *x, BLOCKD *d, int pitch) {
* come from an earlier call to build_inter_predictors_4b()) with the
* predictor of the second reference frame / motion vector.
*/
static void build_2nd_inter_predictors4b(MACROBLOCKD *x, BLOCKD *d, int pitch) {
static void build_2nd_inter_predictors4b(MACROBLOCKD *xd,
BLOCKD *d, int pitch) {
unsigned char *ptr_base;
unsigned char *ptr;
unsigned char *pred_ptr = d->predictor;
......@@ -326,16 +330,19 @@ static void build_2nd_inter_predictors4b(MACROBLOCKD *x, BLOCKD *d, int pitch) {
ptr_base = *(d->base_second_pre);
mv.as_int = d->bmi.as_mv.second.as_int;
ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride + (mv.as_mv.col >> 3);
ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride +
(mv.as_mv.col >> 3);
if (mv.as_mv.row & 7 || mv.as_mv.col & 7) {
x->subpixel_predict_avg8x8(ptr, d->pre_stride, (mv.as_mv.col & 7) << 1, (mv.as_mv.row & 7) << 1, pred_ptr, pitch);
xd->subpixel_predict_avg8x8(ptr, d->pre_stride, (mv.as_mv.col & 7) << 1,
(mv.as_mv.row & 7) << 1, pred_ptr, pitch);
} else {
RECON_INVOKE(&x->rtcd->recon, avg8x8)(ptr, d->pre_stride, pred_ptr, pitch);
RECON_INVOKE(&xd->rtcd->recon, avg8x8)
(ptr, d->pre_stride, pred_ptr, pitch);
}
}
static void build_inter_predictors2b(MACROBLOCKD *x, BLOCKD *d, int pitch) {
static void build_inter_predictors2b(MACROBLOCKD *xd, BLOCKD *d, int pitch) {
unsigned char *ptr_base;
unsigned char *ptr;
unsigned char *pred_ptr = d->predictor;
......@@ -343,12 +350,14 @@ static void build_inter_predictors2b(MACROBLOCKD *x, BLOCKD *d, int pitch) {
ptr_base = *(d->base_pre);
mv.as_int = d->bmi.as_mv.first.as_int;
ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride + (mv.as_mv.col >> 3);
ptr = ptr_base + d->pre + (mv.as_mv.row >> 3) * d->pre_stride +
(mv.as_mv.col >> 3);
if (mv.as_mv.row & 7 || mv.as_mv.col & 7) {
x->subpixel_predict8x4(ptr, d->pre_stride, (mv.as_mv.col & 7) << 1, (mv.as_mv.row & 7) << 1, pred_ptr, pitch);
xd->subpixel_predict8x4(ptr, d->pre_stride, (mv.as_mv.col & 7) << 1,
(mv.as_mv.row & 7) << 1, pred_ptr, pitch);
} else {
RECON_INVOKE(&x->rtcd->recon, copy8x4)(ptr, d->pre_stride, pred_ptr, pitch);
RECON_INVOKE(&xd->rtcd->recon, copy8x4)(ptr, d->pre_stride, pred_ptr, pitch);
}
}
......
......@@ -16,40 +16,44 @@
#include "onyxc_int.h"
#endif
extern void vp8_build_1st_inter16x16_predictors_mby(MACROBLOCKD *x,
extern void vp8_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd,
unsigned char *dst_y,
int dst_ystride);
extern void vp8_build_1st_inter16x16_predictors_mbuv(MACROBLOCKD *x,
extern void vp8_build_1st_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
unsigned char *dst_u,
unsigned char *dst_v,
int dst_uvstride);
extern void vp8_build_1st_inter16x16_predictors_mb(MACROBLOCKD *x,
extern void vp8_build_1st_inter16x16_predictors_mb(MACROBLOCKD *xd,
unsigned char *dst_y,
unsigned char *dst_u,
unsigned char *dst_v,
int dst_ystride,
int dst_uvstride);
extern void vp8_build_2nd_inter16x16_predictors_mby(MACROBLOCKD *x,
extern void vp8_build_2nd_inter16x16_predictors_mby(MACROBLOCKD *xd,
unsigned char *dst_y,
int dst_ystride);
extern void vp8_build_2nd_inter16x16_predictors_mbuv(MACROBLOCKD *x,
extern void vp8_build_2nd_inter16x16_predictors_mbuv(MACROBLOCKD *xd,
unsigned char *dst_u,
unsigned char *dst_v,
int dst_uvstride);
extern void vp8_build_2nd_inter16x16_predictors_mb(MACROBLOCKD *x,
extern void vp8_build_2nd_inter16x16_predictors_mb(MACROBLOCKD *xd,
unsigned char *dst_y,
unsigned char *dst_u,
unsigned char *dst_v,
int dst_ystride,
int dst_uvstride);
extern void vp8_build_inter_predictors_mb(MACROBLOCKD *x);
extern void vp8_build_inter_predictors_mb(MACROBLOCKD *xd);
extern void vp8_build_inter_predictors_b(BLOCKD *d, int pitch, vp8_subpix_fn_t sppf);
extern void vp8_build_2nd_inter_predictors_b(BLOCKD *d, int pitch, vp8_subpix_fn_t sppf);
extern void vp8_build_inter_predictors_b(BLOCKD *d, int pitch,
vp8_subpix_fn_t sppf);
extern void vp8_build_2nd_inter_predictors_b(BLOCKD *d, int pitch,
vp8_subpix_fn_t sppf);
extern void vp8_build_inter4x4_predictors_mbuv(MACROBLOCKD *x);
extern void vp8_setup_interp_filters(MACROBLOCKD *x, INTERPOLATIONFILTERTYPE filter, VP8_COMMON *cm);
extern void vp8_build_inter4x4_predictors_mbuv(MACROBLOCKD *xd);
extern void vp8_setup_interp_filters(MACROBLOCKD *xd,
INTERPOLATIONFILTERTYPE filter,
VP8_COMMON *cm);
#endif
......@@ -14,8 +14,8 @@
#include "reconintra.h"
#include "vpx_mem/vpx_mem.h"
/* For skip_recon_mb(), add vp8_build_intra_predictors_mby_s(MACROBLOCKD *x) and
* vp8_build_intra_predictors_mbuv_s(MACROBLOCKD *x).
/* For skip_recon_mb(), add vp8_build_intra_predictors_mby_s(MACROBLOCKD *xd)
* and vp8_build_intra_predictors_mbuv_s(MACROBLOCKD *xd).
*/
void d27_predictor(unsigned char *ypred_ptr, int y_stride, int n,
......
......@@ -26,6 +26,6 @@ void d27_predictor(unsigned char *ypred_ptr, int y_stride, int n,
void d64_predictor(unsigned char *ypred_ptr, int y_stride, int n,
unsigned char *yabove_row, unsigned char *yleft_col);
extern void init_intra_left_above_pixels(MACROBLOCKD *x);
extern void init_intra_left_above_pixels(MACROBLOCKD *xd);
#endif
......@@ -296,13 +296,17 @@ void vp8_comp_intra4x4_predict(BLOCKD *x,
/* copy 4 bytes from the above right down so that the 4x4 prediction modes using pixels above and
* to the right prediction have filled in pixels to use.
*/
void vp8_intra_prediction_down_copy(MACROBLOCKD *x) {
unsigned char *above_right = *(x->block[0].base_dst) + x->block[0].dst - x->block[0].dst_stride + 16;
void vp8_intra_prediction_down_copy(MACROBLOCKD *xd) {
unsigned char *above_right = *(xd->block[0].base_dst) + xd->block[0].dst -
xd->block[0].dst_stride + 16;
unsigned int *src_ptr = (unsigned int *)above_right;
unsigned int *dst_ptr0 = (unsigned int *)(above_right + 4 * x->block[0].dst_stride);
unsigned int *dst_ptr1 = (unsigned int *)(above_right + 8 * x->block[0].dst_stride);
unsigned int *dst_ptr2 = (unsigned int *)(above_right + 12 * x->block[0].dst_stride);
unsigned int *dst_ptr0 =
(unsigned int *)(above_right + 4 * xd->block[0].dst_stride);
unsigned int *dst_ptr1 =
(unsigned int *)(above_right + 8 * xd->block[0].dst_stride);
unsigned int *dst_ptr2 =
(unsigned int *)(above_right + 12 * xd->block[0].dst_stride);
*dst_ptr0 = *src_ptr;
*dst_ptr1 = *src_ptr;
......
......@@ -12,6 +12,6 @@
#ifndef __INC_RECONINTRA4x4_H
#define __INC_RECONINTRA4x4_H
extern void vp8_intra_prediction_down_copy(MACROBLOCKD *x);
extern void vp8_intra_prediction_down_copy(MACROBLOCKD *xd);
#endif
......@@ -28,15 +28,15 @@ extern build_intra_predictors_mbuv_prototype(vp8_intra_pred_uv_ve_mmx);
extern build_intra_predictors_mbuv_prototype(vp8_intra_pred_uv_tm_sse2);
extern build_intra_predictors_mbuv_prototype(vp8_intra_pred_uv_tm_ssse3);
static void vp8_build_intra_predictors_mbuv_x86(MACROBLOCKD *x,
static void vp8_build_intra_predictors_mbuv_x86(MACROBLOCKD *xd,
unsigned char *dst_u,
unsigned char *dst_v,
int dst_stride,
build_intra_predictors_mbuv_fn_t tm_func,
build_intra_predictors_mbuv_fn_t ho_func) {
int mode = x->mode_info_context->mbmi.uv_mode;
int mode = xd->mode_info_context->mbmi.uv_mode;
build_intra_predictors_mbuv_fn_t fn;
int src_stride = x->dst.uv_stride;
int src_stride = xd->dst.uv_stride;
switch (mode) {
case V_PRED:
......@@ -49,15 +49,15 @@ static void vp8_build_intra_predictors_mbuv_x86(MACROBLOCKD *x,
fn = tm_func;
break;
case DC_PRED:
if (x->up_available) {
if (x->left_available) {
if (xd->up_available) {
if (xd->left_available) {
fn = vp8_intra_pred_uv_dc_mmx2;
break;
} else {
fn = vp8_intra_pred_uv_dctop_mmx2;
break;
}
} else if (x->left_available) {
} else if (xd->left_available) {
fn = vp8_intra_pred_uv_dcleft_mmx2;
break;
} else {
......@@ -69,34 +69,34 @@ static void vp8_build_intra_predictors_mbuv_x86(MACROBLOCKD *x,
return;
}
fn(dst_u, dst_stride, x->dst.u_buffer, src_stride);
fn(dst_v, dst_stride, x->dst.v_buffer, src_stride);
fn(dst_u, dst_stride, xd->dst.u_buffer, src_stride);
fn(dst_v, dst_stride, xd->dst.v_buffer, src_stride);
}
void vp8_build_intra_predictors_mbuv_sse2(MACROBLOCKD *x) {
vp8_build_intra_predictors_mbuv_x86(x, &x->predictor[256],
&x->predictor[320], 8,
void vp8_build_intra_predictors_mbuv_sse2(MACROBLOCKD *xd) {
vp8_build_intra_predictors_mbuv_x86(xd, &xd->predictor[256],
&xd->predictor[320], 8,
vp8_intra_pred_uv_tm_sse2,
vp8_intra_pred_uv_ho_mmx2);
}
void vp8_build_intra_predictors_mbuv_ssse3(MACROBLOCKD *x) {
vp8_build_intra_predictors_mbuv_x86(x, &x->predictor[256],
&x->predictor[320], 8,
void vp8_build_intra_predictors_mbuv_ssse3(MACROBLOCKD *xd) {
vp8_build_intra_predictors_mbuv_x86(xd, &xd->predictor[256],
&xd->predictor[320], 8,
vp8_intra_pred_uv_tm_ssse3,
vp8_intra_pred_uv_ho_ssse3);
}
void vp8_build_intra_predictors_mbuv_s_sse2(MACROBLOCKD *x) {
vp8_build_intra_predictors_mbuv_x86(x, x->dst.u_buffer,
x->dst.v_buffer, x->dst.uv_stride,
void vp8_build_intra_predictors_mbuv_s_sse2(MACROBLOCKD *xd) {
vp8_build_intra_predictors_mbuv_x86(xd, xd->dst.u_buffer,
xd->dst.v_buffer, xd->dst.uv_stride,
vp8_intra_pred_uv_tm_sse2,
vp8_intra_pred_uv_ho_mmx2);
}
void vp8_build_intra_predictors_mbuv_s_ssse3(MACROBLOCKD *x) {
vp8_build_intra_predictors_mbuv_x86(x, x->dst.u_buffer,
x->dst.v_buffer, x->dst.uv_stride,
void vp8_build_intra_predictors_mbuv_s_ssse3(MACROBLOCKD *xd) {
vp8_build_intra_predictors_mbuv_x86(xd, xd->dst.u_buffer,
xd->dst.v_buffer, xd->dst.uv_stride,
vp8_intra_pred_uv_tm_ssse3,
vp8_intra_pred_uv_ho_ssse3);
}
......@@ -61,14 +61,17 @@ static int vp8_read_uv_mode(vp8_reader *bc, const vp8_prob *p) {
// This function reads the current macro block's segnent id from the bitstream
// It should only be called if a segment map update is indicated.
static void vp8_read_mb_segid(vp8_reader *r, MB_MODE_INFO *mi, MACROBLOCKD *x) {
static void vp8_read_mb_segid(vp8_reader *r, MB_MODE_INFO *mi,
MACROBLOCKD *xd) {
/* Is segmentation enabled */
if (x->segmentation_enabled && x->update_mb_segmentation_map) {
if (xd->segmentation_enabled && xd->update_mb_segmentation_map) {
/* If so then read the segment id. */
if (vp8_read(r, x->mb_segment_tree_probs[0]))
mi->segment_id = (unsigned char)(2 + vp8_read(r, x->mb_segment_tree_probs[2]));
if (vp8_read(r, xd->mb_segment_tree_probs[0]))
mi->segment_id =
(unsigned char)(2 + vp8_read(r, xd->mb_segment_tree_probs[2]));
else
mi->segment_id = (unsigned char)(vp8_read(r, x->mb_segment_tree_probs[1]));
mi->segment_id =
(unsigned char)(vp8_read(r, xd->mb_segment_tree_probs[1]));
}
}
......
......@@ -14,7 +14,7 @@
#include "onyxd_int.h"
void vp8_reset_mb_tokens_context(MACROBLOCKD *x);
void vp8_reset_mb_tokens_context(MACROBLOCKD *xd);
int vp8_decode_mb_tokens(VP8D_COMP *, MACROBLOCKD *);