diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c index 2a86b88fd042790dbf411ac91ff11356e35dd87f..333e7d9cc9e0f5a83a8259be580e16fb0613380a 100644 --- a/vp8/encoder/encodeframe.c +++ b/vp8/encoder/encodeframe.c @@ -1093,15 +1093,16 @@ static void adjust_act_zbin( VP8_COMP *cpi, MACROBLOCK *x ) #endif } -int vp8cx_encode_intra_macroblock(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t) +int vp8cx_encode_intra_macroblock(VP8_COMP *cpi, MACROBLOCK *x, + TOKENEXTRA **t) { MACROBLOCKD *xd = &x->e_mbd; int rate; if (cpi->sf.RD && cpi->compressor_speed != 2) - vp8_rd_pick_intra_mode(cpi, x, &rate); + vp8_rd_pick_intra_mode(x, &rate); else - vp8_pick_intra_mode(cpi, x, &rate); + vp8_pick_intra_mode(x, &rate); if(cpi->oxcf.tuning == VP8_TUNE_SSIM) { diff --git a/vp8/encoder/ethreading.c b/vp8/encoder/ethreading.c index 4c6e5d8701818b1eeebb4ff062598e22ce2f41d2..cff982d31ae6472b5c6c7e45dc2416084671e3fc 100644 --- a/vp8/encoder/ethreading.c +++ b/vp8/encoder/ethreading.c @@ -17,12 +17,6 @@ #if CONFIG_MULTITHREAD -extern int vp8cx_encode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x, - TOKENEXTRA **t, - int recon_yoffset, int recon_uvoffset, - int mb_row, int mb_col); -extern int vp8cx_encode_intra_macroblock(VP8_COMP *cpi, MACROBLOCK *x, - TOKENEXTRA **t); extern void vp8cx_mb_init_quantizer(VP8_COMP *cpi, MACROBLOCK *x, int ok_to_skip); extern void vp8_loopfilter_frame(VP8_COMP *cpi, VP8_COMMON *cm); diff --git a/vp8/encoder/pickinter.c b/vp8/encoder/pickinter.c index c4fa691a4623fb3dc3da9f29372c8a20cfcad2bc..f894d395c6153bcee4cbbe34850d231526ce5c46 100644 --- a/vp8/encoder/pickinter.c +++ b/vp8/encoder/pickinter.c @@ -1244,7 +1244,7 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, } -void vp8_pick_intra_mode(VP8_COMP *cpi, MACROBLOCK *x, int *rate_) +void vp8_pick_intra_mode(MACROBLOCK *x, int *rate_) { int error4x4, error16x16 = INT_MAX; int rate, best_rate = 0, distortion, best_sse; diff --git a/vp8/encoder/pickinter.h b/vp8/encoder/pickinter.h index 6fbd88795bc6a290de9563fb05ac299e155e38fa..35011cab35885c2c0679a58c5f3940bb5b0a15bc 100644 --- a/vp8/encoder/pickinter.h +++ b/vp8/encoder/pickinter.h @@ -18,7 +18,7 @@ extern void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int recon_uvoffset, int *returnrate, int *returndistortion, int *returnintra, int mb_row, int mb_col); -extern void vp8_pick_intra_mode(VP8_COMP *cpi, MACROBLOCK *x, int *rate); +extern void vp8_pick_intra_mode(MACROBLOCK *x, int *rate); extern int vp8_get_inter_mbpred_error(MACROBLOCK *mb, const vp8_variance_fn_ptr_t *vfp, diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index 28d5c1ee8a23c3b35b5e4399e66bb660199ecd54..0dda2405afbc96cfee56a1ab1aeaacae80657d40 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -625,7 +625,6 @@ static void copy_predictor(unsigned char *dst, const unsigned char *predictor) d[12] = p[12]; } static int rd_pick_intra4x4block( - VP8_COMP *cpi, MACROBLOCK *x, BLOCK *be, BLOCKD *b, @@ -701,7 +700,7 @@ static int rd_pick_intra4x4block( return best_rd; } -static int rd_pick_intra4x4mby_modes(VP8_COMP *cpi, MACROBLOCK *mb, int *Rate, +static int rd_pick_intra4x4mby_modes(MACROBLOCK *mb, int *Rate, int *rate_y, int *Distortion, int best_rd) { MACROBLOCKD *const xd = &mb->e_mbd; @@ -741,7 +740,7 @@ static int rd_pick_intra4x4mby_modes(VP8_COMP *cpi, MACROBLOCK *mb, int *Rate, } total_rd += rd_pick_intra4x4block( - cpi, mb, mb->block + i, xd->block + i, &best_mode, bmode_costs, + mb, mb->block + i, xd->block + i, &best_mode, bmode_costs, ta + vp8_block2above[i], tl + vp8_block2left[i], &r, &ry, &d); @@ -766,8 +765,7 @@ static int rd_pick_intra4x4mby_modes(VP8_COMP *cpi, MACROBLOCK *mb, int *Rate, } -static int rd_pick_intra16x16mby_mode(VP8_COMP *cpi, - MACROBLOCK *x, +static int rd_pick_intra16x16mby_mode(MACROBLOCK *x, int *Rate, int *rate_y, int *Distortion) @@ -869,7 +867,8 @@ static int rd_inter4x4_uv(VP8_COMP *cpi, MACROBLOCK *x, int *rate, return RDCOST(x->rdmult, x->rddiv, *rate, *distortion); } -static void rd_pick_intra_mbuv_mode(VP8_COMP *cpi, MACROBLOCK *x, int *rate, int *rate_tokenonly, int *distortion) +static void rd_pick_intra_mbuv_mode(MACROBLOCK *x, int *rate, + int *rate_tokenonly, int *distortion) { MB_PREDICTION_MODE mode; MB_PREDICTION_MODE UNINITIALIZED_IS_SAFE(mode_selected); @@ -2120,7 +2119,7 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, if(!uv_intra_done && this_ref_frame == INTRA_FRAME) { - rd_pick_intra_mbuv_mode(cpi, x, &uv_intra_rate, + rd_pick_intra_mbuv_mode(x, &uv_intra_rate, &uv_intra_rate_tokenonly, &uv_intra_distortion); uv_intra_mode = x->e_mbd.mode_info_context->mbmi.uv_mode; @@ -2146,7 +2145,7 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, * coding the BPRED mode: x->mbmode_cost[x->e_mbd.frame_type][BPRED] */ int distortion; - tmp_rd = rd_pick_intra4x4mby_modes(cpi, x, &rate, &rd.rate_y, &distortion, best_mode.yrd); + tmp_rd = rd_pick_intra4x4mby_modes(x, &rate, &rd.rate_y, &distortion, best_mode.yrd); rd.rate2 += rate; rd.distortion2 += distortion; @@ -2595,7 +2594,7 @@ void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, rd_update_mvcount(cpi, x, &best_ref_mv); } -void vp8_rd_pick_intra_mode(VP8_COMP *cpi, MACROBLOCK *x, int *rate_) +void vp8_rd_pick_intra_mode(MACROBLOCK *x, int *rate_) { int error4x4, error16x16; int rate4x4, rate16x16 = 0, rateuv; @@ -2607,15 +2606,13 @@ void vp8_rd_pick_intra_mode(VP8_COMP *cpi, MACROBLOCK *x, int *rate_) x->e_mbd.mode_info_context->mbmi.ref_frame = INTRA_FRAME; - rd_pick_intra_mbuv_mode(cpi, x, &rateuv, &rateuv_tokenonly, &distuv); + rd_pick_intra_mbuv_mode(x, &rateuv, &rateuv_tokenonly, &distuv); rate = rateuv; - error16x16 = rd_pick_intra16x16mby_mode(cpi, x, - &rate16x16, &rate16x16_tokenonly, + error16x16 = rd_pick_intra16x16mby_mode(x, &rate16x16, &rate16x16_tokenonly, &dist16x16); - error4x4 = rd_pick_intra4x4mby_modes(cpi, x, - &rate4x4, &rate4x4_tokenonly, + error4x4 = rd_pick_intra4x4mby_modes(x, &rate4x4, &rate4x4_tokenonly, &dist4x4, error16x16); if (error4x4 < error16x16) diff --git a/vp8/encoder/rdopt.h b/vp8/encoder/rdopt.h index bbcb59f673c9a7637b60a7d825ebc9df9a2fa404..d7b04425390e2aeb1472890c6d31a1ceb907f3b5 100644 --- a/vp8/encoder/rdopt.h +++ b/vp8/encoder/rdopt.h @@ -67,7 +67,7 @@ static void insertsortsad(int arr[],int idx[], int len) extern void vp8_initialize_rd_consts(VP8_COMP *cpi, int Qvalue); extern void vp8_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int recon_uvoffset, int *returnrate, int *returndistortion, int *returnintra); -extern void vp8_rd_pick_intra_mode(VP8_COMP *cpi, MACROBLOCK *x, int *rate); +extern void vp8_rd_pick_intra_mode(MACROBLOCK *x, int *rate); static void get_plane_pointers(const YV12_BUFFER_CONFIG *fb,