From 8b0c11c3588963fa02be0cad36a6a23cdb748cf9 Mon Sep 17 00:00:00 2001 From: Ranjit Kumar Tulabandu Date: Tue, 27 Dec 2016 18:45:43 +0530 Subject: Multi-threading of first pass stats collection (yunqingwang) 1. Rebased the patch. Incorporated recent first pass changes. 2. Turned on the first pass unit test. Change-Id: Ia2f7ba8152d0b6dd6bf8efb9dfaf505ba7d8edee --- vp9/vp9_cx_iface.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'vp9/vp9_cx_iface.c') diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index 1d5ed7c50..c239ca6bc 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -51,6 +51,7 @@ struct vp9_extracfg { vpx_color_range_t color_range; int render_width; int render_height; + unsigned int new_mt; }; static struct vp9_extracfg default_extra_cfg = { @@ -82,6 +83,7 @@ static struct vp9_extracfg default_extra_cfg = { 0, // color range 0, // render width 0, // render height + 1, // new_mt }; struct vpx_codec_alg_priv { @@ -245,6 +247,7 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx, "kf_min_dist not supported in auto mode, use 0 " "or kf_max_dist instead."); + RANGE_CHECK(extra_cfg, new_mt, 0, 1); RANGE_CHECK(extra_cfg, enable_auto_alt_ref, 0, 2); RANGE_CHECK(extra_cfg, cpu_used, -8, 8); RANGE_CHECK_HI(extra_cfg, noise_sensitivity, 6); @@ -554,6 +557,8 @@ static vpx_codec_err_t set_encoder_config( oxcf->target_level = extra_cfg->target_level; + oxcf->new_mt = extra_cfg->new_mt; + for (sl = 0; sl < oxcf->ss_number_layers; ++sl) { #if CONFIG_SPATIAL_SVC oxcf->ss_enable_auto_arf[sl] = cfg->ss_enable_auto_alt_ref[sl]; @@ -842,6 +847,13 @@ static vpx_codec_err_t ctrl_set_target_level(vpx_codec_alg_priv_t *ctx, return update_extra_cfg(ctx, &extra_cfg); } +static vpx_codec_err_t ctrl_set_new_mt(vpx_codec_alg_priv_t *ctx, + va_list args) { + struct vp9_extracfg extra_cfg = ctx->extra_cfg; + extra_cfg.new_mt = CAST(VP9E_SET_NEW_MT, args); + return update_extra_cfg(ctx, &extra_cfg); +} + static vpx_codec_err_t ctrl_get_level(vpx_codec_alg_priv_t *ctx, va_list args) { int *const arg = va_arg(args, int *); if (arg == NULL) return VPX_CODEC_INVALID_PARAM; @@ -1594,6 +1606,7 @@ static vpx_codec_ctrl_fn_map_t encoder_ctrl_maps[] = { { VP9E_SET_SVC_REF_FRAME_CONFIG, ctrl_set_svc_ref_frame_config }, { VP9E_SET_RENDER_SIZE, ctrl_set_render_size }, { VP9E_SET_TARGET_LEVEL, ctrl_set_target_level }, + { VP9E_SET_NEW_MT, ctrl_set_new_mt }, // Getters { VP8E_GET_LAST_QUANTIZER, ctrl_get_quantizer }, -- cgit v1.2.3