Commit c647ec44 authored by Yunqing Wang's avatar Yunqing Wang
Browse files

Merge mr_pick_inter_mode and pick_inter_mode

Merged multi-resolution motion estimation with regular motion
estimation function in order to remove duplicated part. This
caused slight changes in multi-resulotion encoder quality &
performance.

Change-Id: Ib4ecc7acfebfe5eea959b5b91febae6db7b95fd1
parent a53d5a4c
......@@ -1186,23 +1186,8 @@ int vp8cx_encode_inter_macroblock
}
else
{
#if CONFIG_MULTI_RES_ENCODING
if (cpi->oxcf.mr_encoder_id == 0)
{
/* Lowest-resolution encoding */
vp8_pick_inter_mode(cpi, x, recon_yoffset, recon_uvoffset, &rate,
&distortion, &intra_error);
}else
{
/* Higher-resolution encoding */
vp8_mr_pick_inter_mode(cpi, x, recon_yoffset, recon_uvoffset, &rate,
&distortion, &intra_error, mb_row, mb_col);
}
#else
vp8_pick_inter_mode(cpi, x, recon_yoffset, recon_uvoffset, &rate,
&distortion, &intra_error);
#endif
&distortion, &intra_error, mb_row, mb_col);
}
cpi->prediction_error += distortion;
......
This diff is collapsed.
......@@ -16,14 +16,8 @@
extern void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
int recon_uvoffset, int *returnrate,
int *returndistortion, int *returnintra);
int *returndistortion, int *returnintra,
int mb_row, int mb_col);
extern void vp8_pick_intra_mode(VP8_COMP *cpi, MACROBLOCK *x, int *rate);
#if CONFIG_MULTI_RES_ENCODING
extern void vp8_mr_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);
#endif
#endif
......@@ -361,6 +361,10 @@ static vpx_codec_err_t set_vp8e_config(VP8_CONFIG *oxcf,
}
#if CONFIG_MULTI_RES_ENCODING
/* When mr_cfg is NULL, oxcf->mr_total_resolutions and oxcf->mr_encoder_id
* are both memset to 0, which ensures the correct logic under this
* situation.
*/
if(mr_cfg)
{
oxcf->mr_total_resolutions = mr_cfg->mr_total_resolutions;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment