#else
#define IF_RTCD(x) NULL
#endif
-void vp8_encode_intra4x4block(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x, BLOCK *be, BLOCKD *b, int best_mode)
+
+
+void vp8_encode_intra4x4block(const VP8_ENCODER_RTCD *rtcd,
+ MACROBLOCK *x, int ib)
{
+ BLOCKD *b = &x->e_mbd.block[ib];
+ BLOCK *be = &x->block[ib];
+
RECON_INVOKE(&rtcd->common->recon, intra4x4_predict)
- (b, best_mode, b->predictor);
+ (b, b->bmi.mode, b->predictor);
ENCODEMB_INVOKE(&rtcd->encodemb, subb)(be, b, 16);
vp8_intra_prediction_down_copy(x);
for (i = 0; i < 16; i++)
- {
- BLOCK *be = &mb->block[i];
- BLOCKD *b = &x->block[i];
-
- vp8_encode_intra4x4block(rtcd, mb, be, b, b->bmi.mode);
- }
-
+ vp8_encode_intra4x4block(rtcd, mb, i);
return;
}
void vp8_encode_intra16x16mby(const VP8_ENCODER_RTCD *, MACROBLOCK *x);
void vp8_encode_intra16x16mbuv(const VP8_ENCODER_RTCD *, MACROBLOCK *x);
void vp8_encode_intra4x4mby(const VP8_ENCODER_RTCD *, MACROBLOCK *mb);
-void vp8_encode_intra4x4block(const VP8_ENCODER_RTCD *, MACROBLOCK *x, BLOCK *be, BLOCKD *b, int best_mode);
-
+void vp8_encode_intra4x4block(const VP8_ENCODER_RTCD *rtcd,
+ MACROBLOCK *x, int ib);
#endif
{
for (i = 0; i < 16; i++)
{
- BLOCKD *b = &x->e_mbd.block[i];
- BLOCK *be = &x->block[i];
-
- vp8_encode_intra4x4block(IF_RTCD(&cpi->rtcd), x, be, b, B_DC_PRED);
+ x->e_mbd.block[i].bmi.mode = B_DC_PRED;
+ vp8_encode_intra4x4block(IF_RTCD(&cpi->rtcd), x, i);
}
}
static int pick_intra4x4block(
const VP8_ENCODER_RTCD *rtcd,
MACROBLOCK *x,
- BLOCK *be,
- BLOCKD *b,
+ int ib,
B_PREDICTION_MODE *best_mode,
B_PREDICTION_MODE above,
B_PREDICTION_MODE left,
int *bestrate,
int *bestdistortion)
{
+
+ BLOCKD *b = &x->e_mbd.block[ib];
+ BLOCK *be = &x->block[ib];
B_PREDICTION_MODE mode;
int best_rd = INT_MAX; // 1<<30
int rate;
}
b->bmi.mode = (B_PREDICTION_MODE)(*best_mode);
- vp8_encode_intra4x4block(rtcd, x, be, b, b->bmi.mode);
-
+ vp8_encode_intra4x4block(rtcd, x, ib);
return best_rd;
}
B_PREDICTION_MODE UNINITIALIZED_IS_SAFE(best_mode);
int UNINITIALIZED_IS_SAFE(r), UNINITIALIZED_IS_SAFE(d);
- pick_intra4x4block(rtcd, mb, mb->block + i, xd->block + i,
- &best_mode, A, L, &r, &d);
+ pick_intra4x4block(rtcd, mb, i, &best_mode, A, L, &r, &d);
cost += r;
distortion += d;