Use intra4x4_predict_d parameter names

Rename the local variables for consistency.

Change-Id: Ic202ff54551332f706d97da9b67b2e0959ee7f61
This commit is contained in:
Johann
2012-08-01 11:01:46 -07:00
parent a82c58c40f
commit 41aede61e9
3 changed files with 22 additions and 37 deletions

View File

@@ -177,7 +177,6 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
{ {
short *DQC = xd->dequant_y1; short *DQC = xd->dequant_y1;
int dst_stride = xd->dst.y_stride; int dst_stride = xd->dst.y_stride;
unsigned char *base_dst = xd->dst.y_buffer;
/* clear out residual eob info */ /* clear out residual eob info */
if(xd->mode_info_context->mbmi.mb_skip_coeff) if(xd->mode_info_context->mbmi.mb_skip_coeff)
@@ -188,36 +187,28 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
{ {
BLOCKD *b = &xd->block[i]; BLOCKD *b = &xd->block[i];
unsigned char *dst = xd->dst.y_buffer + b->offset;
int b_mode = xd->mode_info_context->bmi[i].as_mode; int b_mode = xd->mode_info_context->bmi[i].as_mode;
unsigned char *yabove; unsigned char *Above = dst - dst_stride;
unsigned char *yleft; unsigned char *yleft = dst - 1;
int left_stride; int left_stride = dst_stride;
unsigned char top_left; unsigned char top_left = Above[-1];
yabove = base_dst + b->offset - dst_stride; vp8_intra4x4_predict_d(Above, yleft, left_stride, b_mode,
yleft = base_dst + b->offset - 1; dst, dst_stride, top_left);
left_stride = dst_stride;
top_left = yabove[-1];
vp8_intra4x4_predict_d(yabove, yleft, left_stride,
b_mode,
base_dst + b->offset, dst_stride,
top_left);
if (xd->eobs[i]) if (xd->eobs[i])
{ {
if (xd->eobs[i] > 1) if (xd->eobs[i] > 1)
{ {
vp8_dequant_idct_add vp8_dequant_idct_add(b->qcoeff, DQC, dst, dst_stride);
(b->qcoeff, DQC,
base_dst + b->offset, dst_stride);
} }
else else
{ {
vp8_dc_only_idct_add vp8_dc_only_idct_add
(b->qcoeff[0] * DQC[0], (b->qcoeff[0] * DQC[0],
base_dst + b->offset, dst_stride, dst, dst_stride,
base_dst + b->offset, dst_stride); dst, dst_stride);
((int *)b->qcoeff)[0] = 0; ((int *)b->qcoeff)[0] = 0;
} }
} }

View File

@@ -166,7 +166,6 @@ static void mt_decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
{ {
short *DQC = xd->dequant_y1; short *DQC = xd->dequant_y1;
int dst_stride = xd->dst.y_stride; int dst_stride = xd->dst.y_stride;
unsigned char *base_dst = xd->dst.y_buffer;
/* clear out residual eob info */ /* clear out residual eob info */
if(xd->mode_info_context->mbmi.mb_skip_coeff) if(xd->mode_info_context->mbmi.mb_skip_coeff)
@@ -177,17 +176,18 @@ static void mt_decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
{ {
BLOCKD *b = &xd->block[i]; BLOCKD *b = &xd->block[i];
unsigned char *dst = xd->dst.y_buffer + b->offset;
int b_mode = xd->mode_info_context->bmi[i].as_mode; int b_mode = xd->mode_info_context->bmi[i].as_mode;
unsigned char *yabove; unsigned char *Above;
unsigned char *yleft; unsigned char *yleft;
int left_stride; int left_stride;
unsigned char top_left; unsigned char top_left;
/*Caution: For some b_mode, it needs 8 pixels (4 above + 4 above-right).*/ /*Caution: For some b_mode, it needs 8 pixels (4 above + 4 above-right).*/
if (i < 4 && pbi->common.filter_level) if (i < 4 && pbi->common.filter_level)
yabove = xd->recon_above[0] + b->offset; Above = xd->recon_above[0] + b->offset;
else else
yabove = (base_dst - dst_stride) + b->offset; Above = dst - dst_stride;
if (i%4==0 && pbi->common.filter_level) if (i%4==0 && pbi->common.filter_level)
{ {
@@ -196,34 +196,28 @@ static void mt_decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
} }
else else
{ {
yleft = (base_dst - 1) + b->offset; yleft = dst - 1;
left_stride = dst_stride; left_stride = dst_stride;
} }
if ((i==4 || i==8 || i==12) && pbi->common.filter_level) if ((i==4 || i==8 || i==12) && pbi->common.filter_level)
top_left = *(xd->recon_left[0] + i - 1); top_left = *(xd->recon_left[0] + i - 1);
else else
top_left = yabove[-1]; top_left = Above[-1];
vp8_intra4x4_predict_d(yabove, yleft, left_stride, vp8_intra4x4_predict_d(Above, yleft, left_stride,
b_mode, b_mode, dst, dst_stride, top_left);
base_dst + b->offset, dst_stride,
top_left);
if (xd->eobs[i] ) if (xd->eobs[i] )
{ {
if (xd->eobs[i] > 1) if (xd->eobs[i] > 1)
{ {
vp8_dequant_idct_add vp8_dequant_idct_add(b->qcoeff, DQC, dst, dst_stride);
(b->qcoeff, DQC,
base_dst + b->offset, dst_stride);
} }
else else
{ {
vp8_dc_only_idct_add vp8_dc_only_idct_add(b->qcoeff[0] * DQC[0],
(b->qcoeff[0] * DQC[0], dst, dst_stride, dst, dst_stride);
base_dst + b->offset, dst_stride,
base_dst + b->offset, dst_stride);
((int *)b->qcoeff)[0] = 0; ((int *)b->qcoeff)[0] = 0;
} }
} }

View File

@@ -158,7 +158,7 @@ static int pick_intra4x4block(
rate = mode_costs[mode]; rate = mode_costs[mode];
vp8_intra4x4_predict_d(Above, yleft, dst_stride, mode, vp8_intra4x4_predict_d(Above, yleft, dst_stride, mode,
b->predictor,16, top_left); b->predictor, 16, top_left);
distortion = get_prediction_error(be, b); distortion = get_prediction_error(be, b);
this_rd = RDCOST(x->rdmult, x->rddiv, rate, distortion); this_rd = RDCOST(x->rdmult, x->rddiv, rate, distortion);