Skip to content
Snippets Groups Projects
Commit f340e9e2 authored by Jenkins2's avatar Jenkins2 Committed by Gerrit Code Review
Browse files

Merge "codec_gsm: Avoid shifting a negative signed value."

parents 832f0587 ef68df91
No related branches found
No related tags found
No related merge requests found
......@@ -55,21 +55,21 @@ static void Decoding_of_the_coded_Log_Area_Ratios P2((LARc,LARpp),
*/
#undef STEP
#define STEP( B, MIC, INVA ) \
#define STEP( B_TIMES_TWO, MIC, INVA ) \
temp1 = GSM_ADD( *LARc++, MIC ) << 10; \
temp1 = GSM_SUB( temp1, B << 1 ); \
temp1 = GSM_SUB( temp1, B_TIMES_TWO ); \
temp1 = (word)GSM_MULT_R( INVA, temp1 ); \
*LARpp++ = GSM_ADD( temp1, temp1 );
STEP( 0, -32, 13107 );
STEP( 0, -32, 13107 );
STEP( 2048, -16, 13107 );
STEP( -2560, -16, 13107 );
STEP( 4096, -16, 13107 );
STEP( -5120, -16, 13107 );
STEP( 94, -8, 19223 );
STEP( -1792, -8, 17476 );
STEP( -341, -4, 31454 );
STEP( -1144, -4, 29708 );
STEP( 188, -8, 19223 );
STEP( -3584, -8, 17476 );
STEP( -682, -4, 31454 );
STEP( -2288, -4, 29708 );
/* NOTE: the addition of *MIC is used to restore
* the sign of *LARc.
......
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