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

Prevents a SILK stereo encoding-side desync

We now make sure that side is given >0 bits when it isn't disabled.
parent d5c92637
No related branches found
No related tags found
No related merge requests found
......@@ -168,6 +168,11 @@ void silk_stereo_LR_to_MS(
width_Q14 = state->smth_width_Q14;
}
if (*mid_only_flag == 0 && mid_side_rates_bps[ 1 ] < 1)
{
mid_side_rates_bps[ 1 ] = 1;
mid_side_rates_bps[ 0 ] = silk_max_int( 1, total_rate_bps - mid_side_rates_bps[ 1 ]);
}
#if 0
DEBUG_STORE_DATA( midside.dat, &mid_side_rates_bps[ 0 ], 8 );
DEBUG_STORE_DATA( norms0.pcm, &state->mid_side_amp_Q0[0], 8 );
......
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