]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7500: make video bandwidth accurate for vpx
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 20 Feb 2015 02:32:53 +0000 (20:32 -0600)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:04 +0000 (12:47 -0500)
src/mod/codecs/mod_vpx/mod_vpx.c

index eeb56e01266fd683c9d33223632db926f13ec07c..6d7540b0b38397b87eecba27a59f6db9380130c1 100644 (file)
@@ -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,