diff --git a/hi/vpxenc.c b/hi/vpxenc.c index e42051f..a3d60ba 100644 --- a/hi/vpxenc.c +++ b/hi/vpxenc.c @@ -110,22 +110,26 @@ static int encodevpx_start(CHiPubNode *pubn) { vpx_codec_enc_config_default(node->iface, &node->cfg, 0); node->cfg.g_w = firstFrame->width; node->cfg.g_h = firstFrame->height; + node->cfg.g_profile = 2; node->cfg.g_timebase.num = 1; node->cfg.g_timebase.den = 30; node->cfg.g_lag_in_frames = 0; - node->cfg.g_threads = 8; + node->cfg.g_threads = 4; node->cfg.kf_mode = VPX_KF_AUTO; node->cfg.kf_max_dist = 300; - node->cfg.rc_end_usage = VPX_VBR; - node->cfg.rc_target_bitrate = 512; - node->cfg.rc_min_quantizer = 4; - node->cfg.rc_max_quantizer = 48; + node->cfg.rc_end_usage = VPX_CBR; + node->cfg.rc_target_bitrate = 3000; + node->cfg.rc_min_quantizer = 24; + node->cfg.rc_max_quantizer = 32; + node->cfg.rc_undershoot_pct = 95; vpx_codec_enc_init(&node->codec, node->iface, &node->cfg, 0); - vpx_codec_control(&node->codec, VP8E_SET_CPUUSED, 8); + vpx_codec_control(&node->codec, VP8E_SET_CPUUSED, 9); + //vpx_codec_control(&node->codec, VP9E_SET_SVC, 1); vpx_codec_control(&node->codec, VP9E_SET_ROW_MT, 1); - vpx_codec_control(&node->codec, VP9E_SET_TILE_COLUMNS, 2); + //vpx_codec_control(&node->codec, VP9E_SET_TILE_COLUMNS, 3); vpx_codec_control(&node->codec, VP9E_SET_TILE_ROWS, 1); + vpx_codec_control(&node->codec, VP9E_SET_NOISE_SENSITIVITY, 0); vpx_codec_control(&node->codec, VP9E_SET_TUNE_CONTENT, VP9E_CONTENT_SCREEN); node->strideY = (node->cfg.g_w + 64) & ~63;