diff --git a/vp8/common/blockd.h b/vp8/common/blockd.h index cb546e74b..9db884312 100644 --- a/vp8/common/blockd.h +++ b/vp8/common/blockd.h @@ -255,7 +255,7 @@ typedef struct { union b_mode_info bmi[16]; } MODE_INFO; -typedef struct { +typedef struct blockd { short *qcoeff; short *dqcoeff; unsigned char *predictor; @@ -277,7 +277,7 @@ typedef struct { union b_mode_info bmi; } BLOCKD; -typedef struct MacroBlockD { +typedef struct macroblockd { DECLARE_ALIGNED(16, short, diff[400]); /* from idct diff */ DECLARE_ALIGNED(16, unsigned char, predictor[384]); DECLARE_ALIGNED(16, short, qcoeff[400]); diff --git a/vp8/common/loopfilter.h b/vp8/common/loopfilter.h index df78b8c12..c9f4fb5a4 100644 --- a/vp8/common/loopfilter.h +++ b/vp8/common/loopfilter.h @@ -81,22 +81,22 @@ typedef void loop_filter_uvfunction /* assorted loopfilter functions which get used elsewhere */ struct VP8Common; -struct MacroBlockD; +struct macroblockd; void vp8_loop_filter_init(struct VP8Common *cm); void vp8_loop_filter_frame_init(struct VP8Common *cm, - struct MacroBlockD *mbd, + struct macroblockd *mbd, int default_filt_lvl); -void vp8_loop_filter_frame(struct VP8Common *cm, struct MacroBlockD *mbd); +void vp8_loop_filter_frame(struct VP8Common *cm, struct macroblockd *mbd); void vp8_loop_filter_partial_frame(struct VP8Common *cm, - struct MacroBlockD *mbd, + struct macroblockd *mbd, int default_filt_lvl); void vp8_loop_filter_frame_yonly(struct VP8Common *cm, - struct MacroBlockD *mbd, + struct macroblockd *mbd, int default_filt_lvl); void vp8_loop_filter_update_sharpness(loop_filter_info_n *lfi, diff --git a/vp8/common/rtcd_defs.sh b/vp8/common/rtcd_defs.sh index d7e5b5b25..4f096b392 100644 --- a/vp8/common/rtcd_defs.sh +++ b/vp8/common/rtcd_defs.sh @@ -1,8 +1,15 @@ common_forward_decls() { cat <encodemb, subb)(be, b, 16); + vp8_subtract_b(be, b, 16); tx_type = get_tx_type(&x->e_mbd, b); if (tx_type != DCT_DCT) { @@ -109,8 +109,7 @@ void vp8_encode_intra16x16mby(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x) { vp8_build_comp_intra_predictors_mby(xd); #endif - ENCODEMB_INVOKE(&rtcd->encodemb, submby)(x->src_diff, *(b->base_src), - xd->predictor, b->src_stride); + vp8_subtract_mby(x->src_diff, *(b->base_src), xd->predictor, b->src_stride); if (tx_size == TX_16X16) { BLOCKD *bd = &xd->block[0]; @@ -159,9 +158,9 @@ void vp8_encode_intra16x16mbuv(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x) { } #endif - ENCODEMB_INVOKE(&rtcd->encodemb, submbuv)(x->src_diff, - x->src.u_buffer, x->src.v_buffer, - xd->predictor, x->src.uv_stride); + vp8_subtract_mbuv(x->src_diff, x->src.u_buffer, x->src.v_buffer, + xd->predictor, x->src.uv_stride); + if (tx_size == TX_4X4) { vp8_transform_mbuv_4x4(x); vp8_quantize_mbuv_4x4(x); @@ -221,7 +220,7 @@ void vp8_encode_intra8x8(const VP8_ENCODER_RTCD *rtcd, for (i = 0; i < 4; i++) { b = &xd->block[ib + iblock[i]]; be = &x->block[ib + iblock[i]]; - ENCODEMB_INVOKE(&rtcd->encodemb, subb)(be, b, 16); + vp8_subtract_b(be, b, 16); x->vp8_short_fdct4x4(be->src_diff, be->coeff, 32); x->quantize_b_4x4(be, b); vp8_inverse_transform_b_4x4(IF_RTCD(&rtcd->common->idct), b, 32); @@ -261,7 +260,7 @@ void vp8_encode_intra_uv4x4(const VP8_ENCODER_RTCD *rtcd, } #endif - ENCODEMB_INVOKE(&rtcd->encodemb, subb)(be, b, 8); + vp8_subtract_b(be, b, 8); x->vp8_short_fdct4x4(be->src_diff, be->coeff, 16); x->quantize_b_4x4(be, b); diff --git a/vp8/encoder/encodemb.c b/vp8/encoder/encodemb.c index d3bd0f1dd..aaf0819b8 100644 --- a/vp8/encoder/encodemb.c +++ b/vp8/encoder/encodemb.c @@ -19,6 +19,7 @@ #include "vpx_mem/vpx_mem.h" #include "rdopt.h" #include "vp8/common/systemdependent.h" +#include "vpx_rtcd.h" #if CONFIG_RUNTIME_CPU_DETECT #define IF_RTCD(x) (x) @@ -126,8 +127,10 @@ void vp8_subtract_mby_c(short *diff, unsigned char *src, static void vp8_subtract_mb(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x) { BLOCK *b = &x->block[0]; - ENCODEMB_INVOKE(&rtcd->encodemb, submby)(x->src_diff, *(b->base_src), x->e_mbd.predictor, b->src_stride); - ENCODEMB_INVOKE(&rtcd->encodemb, submbuv)(x->src_diff, x->src.u_buffer, x->src.v_buffer, x->e_mbd.predictor, x->src.uv_stride); + vp8_subtract_mby(x->src_diff, *(b->base_src), x->e_mbd.predictor, + b->src_stride); + vp8_subtract_mbuv(x->src_diff, x->src.u_buffer, x->src.v_buffer, + x->e_mbd.predictor, x->src.uv_stride); } static void build_dcblock_4x4(MACROBLOCK *x) { @@ -942,8 +945,7 @@ void vp8_encode_inter16x16y(const VP8_ENCODER_RTCD *rtcd, MACROBLOCK *x) { vp8_build_1st_inter16x16_predictors_mby(xd, xd->predictor, 16, 0); - ENCODEMB_INVOKE(&rtcd->encodemb, submby)(x->src_diff, *(b->base_src), - xd->predictor, b->src_stride); + vp8_subtract_mby(x->src_diff, *(b->base_src), xd->predictor, b->src_stride); vp8_transform_mby_4x4(x); vp8_quantize_mby_4x4(x); diff --git a/vp8/encoder/encodemb.h b/vp8/encoder/encodemb.h index 6c28ea025..6c2300e34 100644 --- a/vp8/encoder/encodemb.h +++ b/vp8/encoder/encodemb.h @@ -15,73 +15,6 @@ #include "vpx_ports/config.h" #include "block.h" -#define prototype_mberr(sym) \ - int (sym)(MACROBLOCK *mb, int dc) - -#define prototype_berr(sym) \ - int (sym)(short *coeff, short *dqcoeff, int block_size) - -#define prototype_mbuverr(sym) \ - int (sym)(MACROBLOCK *mb) - -#define prototype_subb(sym) \ - void (sym)(BLOCK *be,BLOCKD *bd, int pitch) - -#define prototype_submby(sym) \ - void (sym)(short *diff, unsigned char *src, unsigned char *pred, int stride) - -#define prototype_submbuv(sym) \ - void (sym)(short *diff, unsigned char *usrc, unsigned char *vsrc,\ - unsigned char *pred, int stride) - -#if ARCH_X86 || ARCH_X86_64 -#include "x86/encodemb_x86.h" -#endif - -#if ARCH_ARM -#include "arm/encodemb_arm.h" -#endif - -#ifndef vp8_encodemb_berr -#define vp8_encodemb_berr vp8_block_error_c -#endif -extern prototype_berr(vp8_encodemb_berr); - -#ifndef vp8_encodemb_mberr -#define vp8_encodemb_mberr vp8_mbblock_error_c -#endif -extern prototype_mberr(vp8_encodemb_mberr); - -#ifndef vp8_encodemb_mbuverr -#define vp8_encodemb_mbuverr vp8_mbuverror_c -#endif -extern prototype_mbuverr(vp8_encodemb_mbuverr); - -#ifndef vp8_encodemb_subb -#define vp8_encodemb_subb vp8_subtract_b_c -#endif -extern prototype_subb(vp8_encodemb_subb); - -#ifndef vp8_encodemb_submby -#define vp8_encodemb_submby vp8_subtract_mby_c -#endif -extern prototype_submby(vp8_encodemb_submby); - -#ifndef vp8_encodemb_submbuv -#define vp8_encodemb_submbuv vp8_subtract_mbuv_c -#endif -extern prototype_submbuv(vp8_encodemb_submbuv); - - -typedef struct { - prototype_berr(*berr); - prototype_mberr(*mberr); - prototype_mbuverr(*mbuverr); - prototype_subb(*subb); - prototype_submby(*submby); - prototype_submbuv(*submbuv); -} vp8_encodemb_rtcd_vtable_t; - typedef struct { MB_PREDICTION_MODE mode; MV_REFERENCE_FRAME ref_frame; diff --git a/vp8/encoder/generic/csystemdependent.c b/vp8/encoder/generic/csystemdependent.c index 44e83fdc7..71f8780d4 100644 --- a/vp8/encoder/generic/csystemdependent.c +++ b/vp8/encoder/generic/csystemdependent.c @@ -32,14 +32,6 @@ void vp8_cmachine_specific_config(VP8_COMP *cpi) { cpi->rtcd.fdct.fast4x4 = vp8_short_fdct4x4_c; cpi->rtcd.fdct.fast8x4 = vp8_short_fdct8x4_c; cpi->rtcd.fdct.walsh_short4x4 = vp8_short_walsh4x4_c; - - cpi->rtcd.encodemb.berr = vp8_block_error_c; - cpi->rtcd.encodemb.mberr = vp8_mbblock_error_c; - cpi->rtcd.encodemb.mbuverr = vp8_mbuverror_c; - cpi->rtcd.encodemb.subb = vp8_subtract_b_c; - cpi->rtcd.encodemb.submby = vp8_subtract_mby_c; - cpi->rtcd.encodemb.submbuv = vp8_subtract_mbuv_c; - cpi->rtcd.search.full_search = vp8_full_search_sad; cpi->rtcd.search.refining_search = vp8_refining_search_sad; cpi->rtcd.search.diamond_search = vp8_diamond_search_sad; diff --git a/vp8/encoder/onyx_int.h b/vp8/encoder/onyx_int.h index ab6802509..010611cc2 100644 --- a/vp8/encoder/onyx_int.h +++ b/vp8/encoder/onyx_int.h @@ -351,7 +351,6 @@ typedef struct { typedef struct VP8_ENCODER_RTCD { VP8_COMMON_RTCD *common; vp8_fdct_rtcd_vtable_t fdct; - vp8_encodemb_rtcd_vtable_t encodemb; vp8_search_rtcd_vtable_t search; vp8_temporal_rtcd_vtable_t temporal; } VP8_ENCODER_RTCD; diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index b2207cb1f..f68bf0219 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -42,7 +42,7 @@ #include "vp8/common/seg_common.h" #include "vp8/common/pred_common.h" #include "vp8/common/entropy.h" - +#include "vpx_rtcd.h" #if CONFIG_NEWBESTREFMV #include "vp8/common/mvref_common.h" #endif @@ -710,11 +710,8 @@ static void macro_block_yrd_4x4(MACROBLOCK *mb, BLOCK *beptr; int d; - ENCODEMB_INVOKE(&rtcd->encodemb, submby)( - mb->src_diff, - *(mb->block[0].base_src), - xd->predictor, - mb->block[0].src_stride); + vp8_subtract_mby(mb->src_diff, *(mb->block[0].base_src), xd->predictor, + mb->block[0].src_stride); // Fdct and building the 2nd order block for (beptr = mb->block; beptr < mb->block + 16; beptr += 2) { @@ -735,9 +732,9 @@ static void macro_block_yrd_4x4(MACROBLOCK *mb, mb->quantize_b_4x4(mb_y2, x_y2); // Distortion - d = ENCODEMB_INVOKE(&rtcd->encodemb, mberr)(mb, 1); + vp8_mbblock_error(mb, 1); - d += ENCODEMB_INVOKE(&rtcd->encodemb, berr)(mb_y2->coeff, x_y2->dqcoeff, 16); + d += vp8_block_error(mb_y2->coeff, x_y2->dqcoeff, 16); *Distortion = (d >> 2); // rate @@ -784,11 +781,8 @@ static void macro_block_yrd_8x8(MACROBLOCK *mb, BLOCKD *const x_y2 = xd->block + 24; int d; - ENCODEMB_INVOKE(&rtcd->encodemb, submby)( - mb->src_diff, - *(mb->block[0].base_src), - xd->predictor, - mb->block[0].src_stride); + vp8_subtract_mby(mb->src_diff, *(mb->block[0].base_src), xd->predictor, + mb->block[0].src_stride); vp8_transform_mby_8x8(mb); vp8_quantize_mby_8x8(mb); @@ -803,8 +797,8 @@ static void macro_block_yrd_8x8(MACROBLOCK *mb, xd->dqcoeff[128] = 0; xd->dqcoeff[192] = 0; - d = ENCODEMB_INVOKE(&rtcd->encodemb, mberr)(mb, 0); - d += ENCODEMB_INVOKE(&rtcd->encodemb, berr)(mb_y2->coeff, x_y2->dqcoeff, 16); + d = vp8_mbblock_error(mb, 0); + d += vp8_block_error(mb_y2->coeff, x_y2->dqcoeff, 16); *Distortion = (d >> 2); // rate @@ -836,11 +830,8 @@ static void macro_block_yrd_16x16(MACROBLOCK *mb, int *Rate, int *Distortion, BLOCK *be = &mb->block[0]; TX_TYPE tx_type; - ENCODEMB_INVOKE(&rtcd->encodemb, submby)( - mb->src_diff, - *(mb->block[0].base_src), - mb->e_mbd.predictor, - mb->block[0].src_stride); + vp8_subtract_mby(mb->src_diff, *(mb->block[0].base_src), mb->e_mbd.predictor, + mb->block[0].src_stride); tx_type = get_tx_type_16x16(xd, b); if (tx_type != DCT_DCT) { @@ -855,7 +846,7 @@ static void macro_block_yrd_16x16(MACROBLOCK *mb, int *Rate, int *Distortion, if (mb->e_mbd.mode_info_context->mbmi.mode < I8X8_PRED) vp8_optimize_mby_16x16(mb, rtcd); - d = ENCODEMB_INVOKE(&rtcd->encodemb, mberr)(mb, 0); + d = vp8_mbblock_error(mb, 0); *Distortion = (d >> 2); // rate @@ -1029,8 +1020,8 @@ static void super_block_yrd_8x8(MACROBLOCK *x, xd->dqcoeff[128] = 0; xd->dqcoeff[192] = 0; - d += ENCODEMB_INVOKE(&rtcd->encodemb, mberr)(x, 0); - d += ENCODEMB_INVOKE(&rtcd->encodemb, berr)(by2->coeff, bdy2->dqcoeff, 16); + d += vp8_mbblock_error(x, 0); + d += vp8_block_error(by2->coeff, bdy2->dqcoeff, 16); xd->above_context = ta + x_idx; xd->left_context = tl + y_idx; r += vp8_rdcost_mby_8x8(x, 0); @@ -1121,7 +1112,7 @@ static int64_t rd_pick_intra4x4block(VP8_COMP *cpi, MACROBLOCK *x, BLOCK *be, rate += bmode_costs[mode2]; } #endif - ENCODEMB_INVOKE(IF_RTCD(&cpi->rtcd.encodemb), subb)(be, b, 16); + vp8_subtract_b(be, b, 16); b->bmi.as_mode.first = mode; tx_type = get_tx_type_4x4(xd, b); @@ -1138,8 +1129,7 @@ static int64_t rd_pick_intra4x4block(VP8_COMP *cpi, MACROBLOCK *x, BLOCK *be, ratey = cost_coeffs(x, b, PLANE_TYPE_Y_WITH_DC, &tempa, &templ, TX_4X4); rate += ratey; - distortion = ENCODEMB_INVOKE(IF_RTCD(&cpi->rtcd.encodemb), berr)( - be->coeff, b->dqcoeff, 16) >> 2; + distortion = vp8_block_error(be->coeff, b->dqcoeff, 16) >> 2; this_rd = RDCOST(x->rdmult, x->rddiv, rate, distortion); @@ -1621,17 +1611,14 @@ static int rd_cost_mbuv(MACROBLOCK *mb) { static int64_t rd_inter16x16_uv(VP8_COMP *cpi, MACROBLOCK *x, int *rate, int *distortion, int fullpixel, int *skip) { - ENCODEMB_INVOKE(IF_RTCD(&cpi->rtcd.encodemb), submbuv)(x->src_diff, - x->src.u_buffer, - x->src.v_buffer, - x->e_mbd.predictor, - x->src.uv_stride); + vp8_subtract_mbuv(x->src_diff, x->src.u_buffer, x->src.v_buffer, + x->e_mbd.predictor, x->src.uv_stride); vp8_transform_mbuv_4x4(x); vp8_quantize_mbuv_4x4(x); *rate = rd_cost_mbuv(x); - *distortion = ENCODEMB_INVOKE(&cpi->rtcd.encodemb, mbuverr)(x) / 4; + *distortion = vp8_mbuverror(x) / 4; *skip = mbuv_is_skippable_4x4(&x->e_mbd); return RDCOST(x->rdmult, x->rddiv, *rate, *distortion); @@ -1696,7 +1683,7 @@ static int64_t rd_inter32x32_uv_8x8(VP8_COMP *cpi, MACROBLOCK *x, int *rate, xd->above_context = ta + x_idx; xd->left_context = tl + y_idx; r += rd_cost_mbuv_8x8(x, 0); - d += ENCODEMB_INVOKE(&cpi->rtcd.encodemb, mbuverr)(x) / 4; + d += vp8_mbuverror(x) / 4; skippable = skippable && mbuv_is_skippable_8x8(xd); } @@ -1714,17 +1701,14 @@ static int64_t rd_inter32x32_uv_8x8(VP8_COMP *cpi, MACROBLOCK *x, int *rate, static int64_t rd_inter16x16_uv_8x8(VP8_COMP *cpi, MACROBLOCK *x, int *rate, int *distortion, int fullpixel, int *skip) { - ENCODEMB_INVOKE(IF_RTCD(&cpi->rtcd.encodemb), submbuv)(x->src_diff, - x->src.u_buffer, - x->src.v_buffer, - x->e_mbd.predictor, - x->src.uv_stride); + vp8_subtract_mbuv(x->src_diff, x->src.u_buffer, x->src.v_buffer, + x->e_mbd.predictor, x->src.uv_stride); vp8_transform_mbuv_8x8(x); vp8_quantize_mbuv_8x8(x); *rate = rd_cost_mbuv_8x8(x, 1); - *distortion = ENCODEMB_INVOKE(&cpi->rtcd.encodemb, mbuverr)(x) / 4; + *distortion = vp8_mbuverror(x) / 4; *skip = mbuv_is_skippable_8x8(&x->e_mbd); return RDCOST(x->rdmult, x->rddiv, *rate, *distortion); @@ -1734,14 +1718,14 @@ static int64_t rd_inter16x16_uv_8x8(VP8_COMP *cpi, MACROBLOCK *x, int *rate, static int64_t rd_inter4x4_uv(VP8_COMP *cpi, MACROBLOCK *x, int *rate, int *distortion, int *skippable, int fullpixel) { vp8_build_inter4x4_predictors_mbuv(&x->e_mbd); - ENCODEMB_INVOKE(IF_RTCD(&cpi->rtcd.encodemb), submbuv)(x->src_diff, - x->src.u_buffer, x->src.v_buffer, x->e_mbd.predictor, x->src.uv_stride); + vp8_subtract_mbuv(x->src_diff, x->src.u_buffer, x->src.v_buffer, + x->e_mbd.predictor, x->src.uv_stride); vp8_transform_mbuv_4x4(x); vp8_quantize_mbuv_4x4(x); *rate = rd_cost_mbuv(x); - *distortion = ENCODEMB_INVOKE(&cpi->rtcd.encodemb, mbuverr)(x) / 4; + *distortion = vp8_mbuverror(x) / 4; *skippable = mbuv_is_skippable_4x4(&x->e_mbd); return RDCOST(x->rdmult, x->rddiv, *rate, *distortion); @@ -1786,9 +1770,8 @@ static void rd_pick_intra_mbuv_mode(VP8_COMP *cpi, } #endif - ENCODEMB_INVOKE(IF_RTCD(&cpi->rtcd.encodemb), submbuv)(x->src_diff, - x->src.u_buffer, x->src.v_buffer, x->e_mbd.predictor, - x->src.uv_stride); + vp8_subtract_mbuv(x->src_diff, x->src.u_buffer, x->src.v_buffer, + x->e_mbd.predictor, x->src.uv_stride); vp8_transform_mbuv_4x4(x); vp8_quantize_mbuv_4x4(x); @@ -1796,7 +1779,7 @@ static void rd_pick_intra_mbuv_mode(VP8_COMP *cpi, rate = rate_to + x->intra_uv_mode_cost[x->e_mbd.frame_type][mbmi->uv_mode]; - distortion = ENCODEMB_INVOKE(&cpi->rtcd.encodemb, mbuverr)(x) / 4; + distortion = vp8_mbuverror(x) / 4; this_rd = RDCOST(x->rdmult, x->rddiv, rate, distortion); @@ -1845,9 +1828,8 @@ static void rd_pick_intra_mbuv_mode_8x8(VP8_COMP *cpi, mbmi->uv_mode = mode; vp8_build_intra_predictors_mbuv(&x->e_mbd); - ENCODEMB_INVOKE(IF_RTCD(&cpi->rtcd.encodemb), submbuv)(x->src_diff, - x->src.u_buffer, x->src.v_buffer, x->e_mbd.predictor, - x->src.uv_stride); + vp8_subtract_mbuv(x->src_diff, x->src.u_buffer, x->src.v_buffer, + x->e_mbd.predictor, x->src.uv_stride); vp8_transform_mbuv_8x8(x); vp8_quantize_mbuv_8x8(x); @@ -1855,7 +1837,7 @@ static void rd_pick_intra_mbuv_mode_8x8(VP8_COMP *cpi, rate_to = rd_cost_mbuv_8x8(x, 1); rate = rate_to + x->intra_uv_mode_cost[x->e_mbd.frame_type][mbmi->uv_mode]; - distortion = ENCODEMB_INVOKE(&cpi->rtcd.encodemb, mbuverr)(x) / 4; + distortion = vp8_mbuverror(x) / 4; this_rd = RDCOST(x->rdmult, x->rddiv, rate, distortion); if (this_rd < best_rd) { @@ -1905,7 +1887,7 @@ static void super_block_uvrd_8x8(MACROBLOCK *x, vp8_quantize_mbuv_8x8(x); s &= mbuv_is_skippable_8x8(xd); - d += ENCODEMB_INVOKE(&rtcd->encodemb, mbuverr)(x) >> 2; + d += vp8_mbuverror(x) >> 2; xd->above_context = ta + x_idx; xd->left_context = tl + y_idx; r += rd_cost_mbuv_8x8(x, 0); @@ -2115,10 +2097,10 @@ static int64_t encode_inter_mb_segment(MACROBLOCK *x, vp8_build_inter_predictors_b(bd, 16, xd->subpixel_predict); if (xd->mode_info_context->mbmi.second_ref_frame) vp8_build_2nd_inter_predictors_b(bd, 16, xd->subpixel_predict_avg); - ENCODEMB_INVOKE(&rtcd->encodemb, subb)(be, bd, 16); + vp8_subtract_b(be, bd, 16); x->vp8_short_fdct4x4(be->src_diff, be->coeff, 32); x->quantize_b_4x4(be, bd); - thisdistortion = vp8_block_error_c(be->coeff, bd->dqcoeff, 16); + thisdistortion = vp8_block_error(be->coeff, bd->dqcoeff, 16); *distortion += thisdistortion; *labelyrate += cost_coeffs(x, bd, PLANE_TYPE_Y_WITH_DC, ta + vp8_block2above[i], diff --git a/vp8/encoder/x86/encodemb_x86.h b/vp8/encoder/x86/encodemb_x86.h deleted file mode 100644 index 69b3edd66..000000000 --- a/vp8/encoder/x86/encodemb_x86.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2010 The WebM project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - -#ifndef ENCODEMB_X86_H -#define ENCODEMB_X86_H - - -/* Note: - * - * This platform is commonly built for runtime CPU detection. If you modify - * any of the function mappings present in this file, be sure to also update - * them in the function pointer initialization code - */ -#if HAVE_MMX -extern prototype_berr(vp8_block_error_mmx); -extern prototype_mberr(vp8_mbblock_error_mmx); -extern prototype_mbuverr(vp8_mbuverror_mmx); -extern prototype_subb(vp8_subtract_b_mmx); -extern prototype_submby(vp8_subtract_mby_mmx); -extern prototype_submbuv(vp8_subtract_mbuv_mmx); - - -#if !CONFIG_RUNTIME_CPU_DETECT -#undef vp8_encodemb_berr -#define vp8_encodemb_berr vp8_block_error_mmx - -#undef vp8_encodemb_mberr -#define vp8_encodemb_mberr vp8_mbblock_error_mmx - -#undef vp8_encodemb_mbuverr -#define vp8_encodemb_mbuverr vp8_mbuverror_mmx - -#undef vp8_encodemb_subb -#define vp8_encodemb_subb vp8_subtract_b_mmx - -#undef vp8_encodemb_submby -#define vp8_encodemb_submby vp8_subtract_mby_mmx - -#undef vp8_encodemb_submbuv -#define vp8_encodemb_submbuv vp8_subtract_mbuv_mmx - -#endif -#endif - - -#if HAVE_SSE2 -extern prototype_berr(vp8_block_error_xmm); -extern prototype_mberr(vp8_mbblock_error_xmm); -extern prototype_mbuverr(vp8_mbuverror_xmm); -extern prototype_subb(vp8_subtract_b_sse2); -extern prototype_submby(vp8_subtract_mby_sse2); -extern prototype_submbuv(vp8_subtract_mbuv_sse2); - -#if !CONFIG_RUNTIME_CPU_DETECT -#undef vp8_encodemb_berr -#define vp8_encodemb_berr vp8_block_error_xmm - -#undef vp8_encodemb_mberr -#define vp8_encodemb_mberr vp8_mbblock_error_xmm - -#undef vp8_encodemb_mbuverr -#define vp8_encodemb_mbuverr vp8_mbuverror_xmm - -#undef vp8_encodemb_subb -#define vp8_encodemb_subb vp8_subtract_b_sse2 - -#undef vp8_encodemb_submby -#define vp8_encodemb_submby vp8_subtract_mby_sse2 - -#undef vp8_encodemb_submbuv -#define vp8_encodemb_submbuv vp8_subtract_mbuv_sse2 - -#endif -#endif - - -#endif diff --git a/vp8/encoder/x86/x86_csystemdependent.c b/vp8/encoder/x86/x86_csystemdependent.c index a169b493e..053601939 100644 --- a/vp8/encoder/x86/x86_csystemdependent.c +++ b/vp8/encoder/x86/x86_csystemdependent.c @@ -88,25 +88,8 @@ void vp8_arch_x86_encoder_init(VP8_COMP *cpi) { */ /* Override default functions with fastest ones for this CPU. */ -#if HAVE_MMX - if (flags & HAS_MMX) { - cpi->rtcd.encodemb.berr = vp8_block_error_mmx; - cpi->rtcd.encodemb.mberr = vp8_mbblock_error_mmx; - cpi->rtcd.encodemb.mbuverr = vp8_mbuverror_mmx; - cpi->rtcd.encodemb.subb = vp8_subtract_b_mmx; - cpi->rtcd.encodemb.submby = vp8_subtract_mby_mmx; - cpi->rtcd.encodemb.submbuv = vp8_subtract_mbuv_mmx; - } -#endif - #if HAVE_SSE2 if (flags & HAS_SSE2) { - cpi->rtcd.encodemb.berr = vp8_block_error_xmm; - cpi->rtcd.encodemb.mberr = vp8_mbblock_error_xmm; - cpi->rtcd.encodemb.mbuverr = vp8_mbuverror_xmm; - cpi->rtcd.encodemb.subb = vp8_subtract_b_sse2; - cpi->rtcd.encodemb.submby = vp8_subtract_mby_sse2; - cpi->rtcd.encodemb.submbuv = vp8_subtract_mbuv_sse2; cpi->rtcd.temporal.apply = vp8_temporal_filter_apply_sse2; } diff --git a/vp8/vp8cx.mk b/vp8/vp8cx.mk index 6d2f18080..bbafcdb05 100644 --- a/vp8/vp8cx.mk +++ b/vp8/vp8cx.mk @@ -89,7 +89,6 @@ VP8_CX_SRCS-yes += encoder/mbgraph.c VP8_CX_SRCS-yes += encoder/mbgraph.h -VP8_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/encodemb_x86.h VP8_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/dct_x86.h VP8_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/mcomp_x86.h VP8_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/quantize_x86.h