From: Anthony Minessale Date: Fri, 20 Feb 2015 02:32:53 +0000 (-0600) Subject: FS-7500: make video bandwidth accurate for vpx X-Git-Tag: v1.6.2~614^2~359 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8729d54409af9244080d0e8cfbb5d0e653769e2;p=thirdparty%2Ffreeswitch.git FS-7500: make video bandwidth accurate for vpx --- diff --git a/src/mod/codecs/mod_vpx/mod_vpx.c b/src/mod/codecs/mod_vpx/mod_vpx.c index eeb56e0126..6d7540b0b3 100644 --- a/src/mod/codecs/mod_vpx/mod_vpx.c +++ b/src/mod/codecs/mod_vpx/mod_vpx.c @@ -137,13 +137,13 @@ static switch_status_t init_encoder(switch_codec_t *codec) } if (context->codec_settings.video.bandwidth) { - context->bandwidth = context->codec_settings.video.bandwidth; + context->bandwidth = context->codec_settings.video.bandwidth * 4; } else { - context->bandwidth = context->codec_settings.video.width * context->codec_settings.video.height / 512; + context->bandwidth = ((context->codec_settings.video.width * context->codec_settings.video.height) / 900) * 4; } - if (context->bandwidth > 5120) { - context->bandwidth = 5120; + if (context->bandwidth > 40960) { + context->bandwidth = 40960; } switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(codec->session), SWITCH_LOG_NOTICE,