Commit 78e3ae9c authored by thomas dettbarn's avatar thomas dettbarn Committed by Manuel Jander
Browse files

preparation for the cleanup.

parent dd8de624
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -386,11 +386,15 @@ static Word16 sns_1st_cod_fx_q15(
            {
                Word32 tmp;
                Word32 dist;
                Word16 tmp2;

                tmp = L_mult( *cdbk_ptr++, cdbk_fix ); // Q16
                dist = L_sub( snsq_fx[j],  tmp );
                dist = L_shr( dist, 4 ); // TODO: Magic shift.
                dist = L_mult( extract_l( dist ), extract_l( dist ) );
                dist = L_shr( dist, 4 ); // TODO: Magic shift
                dist = L_shr( dist, 4 ); // make sure that the next multiplication does not overflow

                tmp2 = extract_l( dist );
                dist = L_mult( tmp2, tmp2 );
                dist = L_shr( dist, 4 ); // make sure that the sum does not overflow
                dist_fx = L_add( dist_fx, dist );
            }