Commit 09a6bfaf authored by thomas dettbarn's avatar thomas dettbarn
Browse files

addressed some code review comments in sns_1st_cod_fx_q15().

parent 9975eec7
Loading
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -226,6 +226,8 @@ static Word16 sns_1st_cod_fx_q15(
        cdbk_ptr = cdbk;
        dist_min_fx = 0x7fffffffffffffffull;
        dist_split = 0;
	move64();
	move16();
	FOR( Word16 i = 0; i < 32; ++i )
	{
		Word64 dist_fx = 0;
@@ -234,12 +236,11 @@ static Word16 sns_1st_cod_fx_q15(
		{
			Word32 dist;
			Word32 tmp_1 = L_mult( ( *cdbk_ptr++ ), cdbk_fix ); // Q16
			move16();
			dist = ( L_add(snsq_fx[j], L_negate( tmp_1 ) ) );
			dist_fx = W_mac_32_32( dist_fx, dist, dist );
		}

		if ( LT_64( dist_fx, dist_min_fx ) )
		IF ( LT_64( dist_fx, dist_min_fx ) )
		{
			dist_min_fx= dist_fx;
			dist_split =i ;
@@ -257,7 +258,7 @@ static Word16 sns_1st_cod_fx_q15(
        }

        /* for second split shift by five bits to store both indices as one 10 bit value */
        IF( EQ_16( split, 1 ) )
        if( EQ_16( split, 1 ) )
        {
            dist_split = shl( dist_split, 5 );
        }