Merge "Fix issue for 0 target bitrate in multi-res build."

This commit is contained in:
Jerome Jiang 2018-02-02 05:32:55 +00:00 committed by Gerrit Code Review
commit ac54d233b6

View File

@ -804,11 +804,15 @@ static vpx_codec_err_t vp8e_encode(vpx_codec_alg_priv_t *ctx,
if (!ctx->cfg.rc_target_bitrate) {
#if CONFIG_MULTI_RES_ENCODING
LOWER_RES_FRAME_INFO *low_res_frame_info =
(LOWER_RES_FRAME_INFO *)ctx->cpi->oxcf.mr_low_res_mode_info;
low_res_frame_info->skip_encoding_prev_stream = 1;
if (ctx->cpi->oxcf.mr_encoder_id == 0)
low_res_frame_info->skip_encoding_base_stream = 1;
if (!ctx->cpi) return VPX_CODEC_ERROR;
if (ctx->cpi->oxcf.mr_total_resolutions > 1) {
LOWER_RES_FRAME_INFO *low_res_frame_info =
(LOWER_RES_FRAME_INFO *)ctx->cpi->oxcf.mr_low_res_mode_info;
if (!low_res_frame_info) return VPX_CODEC_ERROR;
low_res_frame_info->skip_encoding_prev_stream = 1;
if (ctx->cpi->oxcf.mr_encoder_id == 0)
low_res_frame_info->skip_encoding_base_stream = 1;
}
#endif
return res;
}