Skip to content
Snippets Groups Projects
Commit d76bc917 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Prevents the SILK encoder from failing below 600 kb/s stereo.

Not that it actually reaches the target, but it should no longer cause
a range coder mismatch
parent 5f089d22
No related branches found
No related tags found
No related merge requests found
......@@ -96,6 +96,8 @@ void silk_stereo_LR_to_MS(
/* Determine bitrate distribution between mid and side, and possibly reduce stereo width */
total_rate_bps -= is10msFrame ? 1200 : 600; /* Subtract approximate bitrate for coding stereo parameters */
if (total_rate_bps < 1)
total_rate_bps = 1;
min_mid_rate_bps = SKP_SMLABB( 2000, fs_kHz, 900 );
SKP_assert( min_mid_rate_bps < 32767 );
/* Default bitrate distribution: 8 parts for Mid and (5+3*frac) parts for Side. so: mid_rate = ( 8 / ( 13 + 3 * frac ) ) * total_ rate */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment