Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(767)

Unified Diff: silk/control_audio_bandwidth.c

Issue 12388030: Update Opus to 1.0.2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « silk/SigProc_FIX.h ('k') | silk/control_codec.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: silk/control_audio_bandwidth.c
diff --git a/silk/control_audio_bandwidth.c b/silk/control_audio_bandwidth.c
index a9af91345c6c1d06a0660332280b80c41c1a44d0..b645dd57f45202927acd408829c92f486eda0e95 100644
--- a/silk/control_audio_bandwidth.c
+++ b/silk/control_audio_bandwidth.c
@@ -80,6 +80,8 @@ opus_int silk_control_audio_bandwidth(
} else {
if( psEncC->sLP.transition_frame_no <= 0 ) {
encControl->switchReady = 1;
+ /* Make room for redundancy */
+ encControl->maxBits -= encControl->maxBits * 5 / ( encControl->payloadSize_ms + 5 );
} else {
/* Direction: down (at double speed) */
psEncC->sLP.mode = -2;
@@ -106,6 +108,8 @@ opus_int silk_control_audio_bandwidth(
} else {
if( psEncC->sLP.mode == 0 ) {
encControl->switchReady = 1;
+ /* Make room for redundancy */
+ encControl->maxBits -= encControl->maxBits * 5 / ( encControl->payloadSize_ms + 5 );
} else {
/* Direction: up */
psEncC->sLP.mode = 1;
« no previous file with comments | « silk/SigProc_FIX.h ('k') | silk/control_codec.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698