From: Yunqing Wang Date: Mon, 8 Oct 2018 18:43:02 +0000 (-0700) Subject: Set up the unit scaling factor for motion search X-Git-Tag: v1.8.0~256^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4af18a71d333587d1a3f90f8f9f826d31e34cc41;p=platform%2Fupstream%2Flibvpx.git Set up the unit scaling factor for motion search Set up the unit scaling factor used during motion search. Change-Id: I6fda018d593b7ad4b7658d44c39be950a502d192 --- diff --git a/vp9/encoder/vp9_block.h b/vp9/encoder/vp9_block.h index 0613058..563fdbb 100644 --- a/vp9/encoder/vp9_block.h +++ b/vp9/encoder/vp9_block.h @@ -211,6 +211,8 @@ struct macroblock { #if CONFIG_ML_VAR_PARTITION DECLARE_ALIGNED(16, uint8_t, est_pred[64 * 64]); #endif // CONFIG_ML_VAR_PARTITION + + struct scale_factors *me_sf; }; #ifdef __cplusplus diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index c2ffe1a..5628f14 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -2449,6 +2449,17 @@ VP9_COMP *vp9_create_compressor(VP9EncoderConfig *oxcf, vp9_loop_filter_init(cm); + // Set up the unit scaling factor used during motion search. +#if CONFIG_VP9_HIGHBITDEPTH + vp9_setup_scale_factors_for_frame(&cpi->me_sf, cm->width, cm->height, + cm->width, cm->height, + cm->use_highbitdepth); +#else + vp9_setup_scale_factors_for_frame(&cpi->me_sf, cm->width, cm->height, + cm->width, cm->height); +#endif // CONFIG_VP9_HIGHBITDEPTH + cpi->td.mb.me_sf = &cpi->me_sf; + cm->error.setjmp = 0; return cpi; diff --git a/vp9/encoder/vp9_encoder.h b/vp9/encoder/vp9_encoder.h index b8922dc..e1bdf16 100644 --- a/vp9/encoder/vp9_encoder.h +++ b/vp9/encoder/vp9_encoder.h @@ -604,6 +604,7 @@ typedef struct VP9_COMP { ActiveMap active_map; fractional_mv_step_fp *find_fractional_mv_step; + struct scale_factors me_sf; vp9_diamond_search_fn_t diamond_search_sad; vp9_variance_fn_ptr_t fn_ptr[BLOCK_SIZES]; uint64_t time_receive_data;