Change vp8_intra4x4_predict call sites
Use the _d variant from the decoder. It moves the pointer calculations to the caller. Change-Id: Iae2a793433ef082980a3ffa0a1cabf0264a6a24d
This commit is contained in:
parent
3c208a5a5e
commit
a82c58c40f
@ -18,8 +18,8 @@
|
||||
AREA ||.text||, CODE, READONLY, ALIGN=2
|
||||
|
||||
|
||||
;void vp8_intra4x4_predict(unsigned char *src, int src_stride, int b_mode,
|
||||
; unsigned char *dst, int dst_stride)
|
||||
;void vp8_intra4x4_predict_armv6(unsigned char *src, int src_stride, int b_mode,
|
||||
; unsigned char *dst, int dst_stride)
|
||||
|
||||
|vp8_intra4x4_predict_armv6| PROC
|
||||
push {r4-r12, lr}
|
||||
|
@ -54,10 +54,13 @@ void vp8_encode_intra4x4block(MACROBLOCK *x, int ib)
|
||||
BLOCKD *b = &x->e_mbd.block[ib];
|
||||
BLOCK *be = &x->block[ib];
|
||||
int dst_stride = x->e_mbd.dst.y_stride;
|
||||
unsigned char *base_dst = x->e_mbd.dst.y_buffer;
|
||||
unsigned char *dst = x->e_mbd.dst.y_buffer + b->offset;
|
||||
unsigned char *Above = dst - dst_stride;
|
||||
unsigned char *yleft = dst - 1;
|
||||
unsigned char top_left = Above[-1];
|
||||
|
||||
vp8_intra4x4_predict(base_dst + b->offset, dst_stride,
|
||||
b->bmi.as_mode, b->predictor, 16);
|
||||
vp8_intra4x4_predict_d(Above, yleft, dst_stride, b->bmi.as_mode,
|
||||
b->predictor, 16, top_left);
|
||||
|
||||
vp8_subtract_b(be, b, 16);
|
||||
|
||||
@ -67,14 +70,11 @@ void vp8_encode_intra4x4block(MACROBLOCK *x, int ib)
|
||||
|
||||
if (*b->eob > 1)
|
||||
{
|
||||
vp8_short_idct4x4llm(b->dqcoeff,
|
||||
b->predictor, 16, base_dst + b->offset, dst_stride);
|
||||
vp8_short_idct4x4llm(b->dqcoeff, b->predictor, 16, dst, dst_stride);
|
||||
}
|
||||
else
|
||||
{
|
||||
vp8_dc_only_idct_add
|
||||
(b->dqcoeff[0], b->predictor, 16, base_dst + b->offset,
|
||||
dst_stride);
|
||||
vp8_dc_only_idct_add(b->dqcoeff[0], b->predictor, 16, dst, dst_stride);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -141,20 +141,24 @@ static int pick_intra4x4block(
|
||||
BLOCKD *b = &x->e_mbd.block[ib];
|
||||
BLOCK *be = &x->block[ib];
|
||||
int dst_stride = x->e_mbd.dst.y_stride;
|
||||
unsigned char *base_dst = x->e_mbd.dst.y_buffer;
|
||||
unsigned char *dst = x->e_mbd.dst.y_buffer + b->offset;
|
||||
B_PREDICTION_MODE mode;
|
||||
int best_rd = INT_MAX;
|
||||
int rate;
|
||||
int distortion;
|
||||
|
||||
unsigned char *Above = dst - dst_stride;
|
||||
unsigned char *yleft = dst - 1;
|
||||
unsigned char top_left = Above[-1];
|
||||
|
||||
for (mode = B_DC_PRED; mode <= B_HE_PRED /*B_HU_PRED*/; mode++)
|
||||
{
|
||||
int this_rd;
|
||||
|
||||
rate = mode_costs[mode];
|
||||
vp8_intra4x4_predict
|
||||
(base_dst + b->offset, dst_stride,
|
||||
mode, b->predictor, 16);
|
||||
|
||||
vp8_intra4x4_predict_d(Above, yleft, dst_stride, mode,
|
||||
b->predictor,16, top_left);
|
||||
distortion = get_prediction_error(be, b);
|
||||
this_rd = RDCOST(x->rdmult, x->rddiv, rate, distortion);
|
||||
|
||||
|
@ -653,7 +653,11 @@ static int rd_pick_intra4x4block(
|
||||
DECLARE_ALIGNED_ARRAY(16, unsigned char, best_predictor, 16*4);
|
||||
DECLARE_ALIGNED_ARRAY(16, short, best_dqcoeff, 16);
|
||||
int dst_stride = x->e_mbd.dst.y_stride;
|
||||
unsigned char *base_dst = x->e_mbd.dst.y_buffer;
|
||||
unsigned char *dst = x->e_mbd.dst.y_buffer + b->offset;
|
||||
|
||||
unsigned char *Above = dst - dst_stride;
|
||||
unsigned char *yleft = dst - 1;
|
||||
unsigned char top_left = Above[-1];
|
||||
|
||||
for (mode = B_DC_PRED; mode <= B_HU_PRED; mode++)
|
||||
{
|
||||
@ -662,8 +666,8 @@ static int rd_pick_intra4x4block(
|
||||
|
||||
rate = bmode_costs[mode];
|
||||
|
||||
vp8_intra4x4_predict(base_dst + b->offset, dst_stride, mode,
|
||||
b->predictor, 16);
|
||||
vp8_intra4x4_predict_d(Above, yleft, dst_stride, mode,
|
||||
b->predictor, 16, top_left);
|
||||
vp8_subtract_b(be, b, 16);
|
||||
x->short_fdct4x4(be->src_diff, be->coeff, 32);
|
||||
x->quantize_b(be, b);
|
||||
@ -692,8 +696,7 @@ static int rd_pick_intra4x4block(
|
||||
}
|
||||
b->bmi.as_mode = (B_PREDICTION_MODE)(*best_mode);
|
||||
|
||||
vp8_short_idct4x4llm(best_dqcoeff, best_predictor, 16, base_dst + b->offset,
|
||||
dst_stride);
|
||||
vp8_short_idct4x4llm(best_dqcoeff, best_predictor, 16, dst, dst_stride);
|
||||
|
||||
return best_rd;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user