From e859f98c044fa14431d3f6b24f6119765f05f4d0 Mon Sep 17 00:00:00 2001
From: Pierre Lespagnol <pierre.lespagnol@savoirfairelinux.com>
Date: Mon, 14 Sep 2020 14:09:14 -0400
Subject: [PATCH] autoadapt: improve algorithm parameters

- Reduce time during bitrate increase (to reach bandwidth limit faster)
- Increase the default bitrate value from 600 kbit/s to 800 kbit/s
- Increase maximum bitrate value from 3 Mbit/s to 6 Mbit/s (needed for high resolution, if we use a low resolution the CRF mode will lower the bitrate anyway)

Change-Id: I467649d27178e5f8577d313f3d12ce0ed6712005
---
 src/media/media_codec.h               | 4 ++--
 src/media/video/video_rtp_session.cpp | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/media/media_codec.h b/src/media/media_codec.h
index a13795cd43..be7d3013f4 100644
--- a/src/media/media_codec.h
+++ b/src/media/media_codec.h
@@ -72,8 +72,8 @@ struct SystemCodecInfo
     static constexpr unsigned DEFAULT_NO_QUALITY {0};
 
     static constexpr unsigned DEFAULT_MIN_BITRATE {200};
-    static constexpr unsigned DEFAULT_MAX_BITRATE {3000};
-    static constexpr unsigned DEFAULT_VIDEO_BITRATE {600}; // in Kbits/second
+    static constexpr unsigned DEFAULT_MAX_BITRATE {6000};
+    static constexpr unsigned DEFAULT_VIDEO_BITRATE {800}; // in Kbits/second
 
     SystemCodecInfo(unsigned codecId,
                     unsigned avcodecId,
diff --git a/src/media/video/video_rtp_session.cpp b/src/media/video/video_rtp_session.cpp
index 54837382a8..0d3fc06a55 100644
--- a/src/media/video/video_rtp_session.cpp
+++ b/src/media/video/video_rtp_session.cpp
@@ -56,7 +56,7 @@ static constexpr unsigned MAX_REMB_DEC {1};
 
 constexpr auto DELAY_AFTER_RESTART = std::chrono::milliseconds(1000);
 constexpr auto EXPIRY_TIME_RTCP = std::chrono::seconds(2);
-constexpr auto DELAY_AFTER_REMB_INC = std::chrono::seconds(2);
+constexpr auto DELAY_AFTER_REMB_INC = std::chrono::seconds(1);
 constexpr auto DELAY_AFTER_REMB_DEC = std::chrono::milliseconds(500);
 
 VideoRtpSession::VideoRtpSession(const string& callID, const DeviceParams& localVideoParams)
-- 
GitLab