Commit fd294c55 authored by Yunqing Wang's avatar Yunqing Wang Committed by Gerrit Code Review
Browse files

Merge "Merge mr_pick_inter_mode and pick_inter_mode"

parents 0ccefd2c c647ec44
...@@ -1186,23 +1186,8 @@ int vp8cx_encode_inter_macroblock ...@@ -1186,23 +1186,8 @@ int vp8cx_encode_inter_macroblock
} }
else 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, vp8_pick_inter_mode(cpi, x, recon_yoffset, recon_uvoffset, &rate,
&distortion, &intra_error); &distortion, &intra_error, mb_row, mb_col);
#endif
} }
cpi->prediction_error += distortion; cpi->prediction_error += distortion;
......
This diff is collapsed.
...@@ -16,14 +16,8 @@ ...@@ -16,14 +16,8 @@
extern void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, extern void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
int recon_uvoffset, int *returnrate, 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); 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 #endif
...@@ -361,6 +361,10 @@ static vpx_codec_err_t set_vp8e_config(VP8_CONFIG *oxcf, ...@@ -361,6 +361,10 @@ static vpx_codec_err_t set_vp8e_config(VP8_CONFIG *oxcf,
} }
#if CONFIG_MULTI_RES_ENCODING #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) if(mr_cfg)
{ {
oxcf->mr_total_resolutions = mr_cfg->mr_total_resolutions; 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