]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8293 make sanity level based on quality 2 and also in conference
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 25 Nov 2015 21:42:51 +0000 (15:42 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 25 Nov 2015 21:42:51 +0000 (15:42 -0600)
src/mod/applications/mod_av/avcodec.c
src/mod/applications/mod_conference/conference_video.c
src/mod/applications/mod_conference/mod_conference.c
src/mod/codecs/mod_vpx/mod_vpx.c

index 9b2bb89a6652769893c62608dffc8a0f6be55e67..b4afb7ab40f79cf0b53bee6a973903c3d0cef22b 100644 (file)
@@ -848,7 +848,7 @@ static switch_status_t open_encoder(h264_codec_context_t *context, uint32_t widt
                context->bandwidth = switch_calc_bitrate(context->codec_settings.video.width, context->codec_settings.video.height, 0, 0) * 8;
        }
 
-       sane = switch_calc_bitrate(1920, 1080, 1, 30);
+       sane = switch_calc_bitrate(1920, 1080, 2, 30);
 
        if (context->bandwidth > sane) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "BITRATE TRUNCATED TO %d\n", sane);
index 489564e6e52da5a1e080cc04af64e2c5758a572c..a31c76966d3a166199d12647ed4c61f19fa999e4 100644 (file)
@@ -1923,7 +1923,7 @@ void conference_video_check_auto_bitrate(conference_member_t *member, mcu_layer_
                        int max = 0;
 
                        if (layer) {
-                               kps = switch_calc_bitrate(w, h, 1, (int)(member->conference->video_fps.fps));
+                               kps = switch_calc_bitrate(w, h, 2, (int)(member->conference->video_fps.fps));
                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "%s auto-setting bitrate to %dkps to accomodate %dx%d resolution\n",
                                                                  switch_channel_get_name(member->channel), kps, layer->screen_w, layer->screen_h);
                        }
index a62896c1ec9233fbebcdb124bb7e2993d6daa947..2546112ff7c5e77700063f0f7653fba6986aa568 100644 (file)
@@ -2864,7 +2864,7 @@ conference_obj_t *conference_new(char *name, conference_xml_cfg_t cfg, switch_co
 
                if (video_codec_bandwidth) {
                        if (!strcasecmp(video_codec_bandwidth, "auto")) {
-                               conference->video_codec_settings.video.bandwidth = switch_calc_bitrate(canvas_w, canvas_h, 1, (int)conference->video_fps.fps);
+                               conference->video_codec_settings.video.bandwidth = switch_calc_bitrate(canvas_w, canvas_h, 2, (int)conference->video_fps.fps);
                        } else {
                                conference->video_codec_settings.video.bandwidth = switch_parse_bandwidth_string(video_codec_bandwidth);
                        }
index b094bdeb18bd8e01fbba1f657407a7ef1b23bd94..2826cb886601bbb51d7353a4a8fc0ba9921c3039 100644 (file)
@@ -321,7 +321,7 @@ static switch_status_t init_encoder(switch_codec_t *codec)
 
        }
 
-       sane = switch_calc_bitrate(1920, 1080, 1, 30);
+       sane = switch_calc_bitrate(1920, 1080, 2, 30);
 
        if (context->bandwidth > sane) {
                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(codec->session), SWITCH_LOG_WARNING, "BITRATE TRUNCATED FROM %d TO %d\n", context->bandwidth, sane);