Commit 43bfd73a authored by vasilache's avatar vasilache
Browse files

clang review

parent cba90f9d
Loading
Loading
Loading
Loading
Loading
+13 −16
Original line number Diff line number Diff line
@@ -1406,7 +1406,7 @@ Word16 matrix_product_q30_fx(
    Word16 i, j, k;
    Word16 x_idx, y_idx;
    Word32 *Zp_fx = Z_fx;
    long long int W_tmp;
    int64_t W_tmp;

    /* Processing */
    test();
@@ -1428,7 +1428,7 @@ Word16 matrix_product_q30_fx(
                    /*( *Zp_fx ) = L_add( *Zp_fx, Mpy_32_32( X_fx[k + i * rowsX], Y_fx[k + j * rowsY] ) ); */
                    x_idx = k + i * rowsX;                                      /* Q0  */
                    y_idx = k + j * rowsY;                                      /* Q0  */
                    W_tmp += ( (long long int) X_fx[x_idx] * (long long int) Y_fx[y_idx] ); /* Q56 */
                    W_tmp += ( (int64_t) X_fx[x_idx] * (int64_t) Y_fx[y_idx] ); /* Q56 */
                }
                W_tmp = W_tmp << 6; /*  W_shl( W_tmp, 6 ); */                           /*Q62*/
                ( *Zp_fx ) = ( W_tmp + 0x80000000 ) >> 32; /*  W_round64_L( W_tmp ); */ /*Q30*/
@@ -1446,15 +1446,13 @@ Word16 matrix_product_q30_fx(
        {
            for ( i = 0; i < rowsX; ++i )
            {

                W_tmp = 0;

                for ( k = 0; k < colsX; ++k )
                {
                    /* ( *Zp_fx ) = L_add( *Zp_fx, Mpy_32_32( X_fx[i + k * rowsX], Y_fx[j + k * rowsY] ) ); */
                    x_idx = i + k * rowsX;                                      /*Q0*/
                    y_idx = j + k * rowsY;                                      /*Q0*/
                    W_tmp += ( (long long int) X_fx[x_idx] * (long long int) Y_fx[y_idx] ); /* Q56 */
                    W_tmp += ( (int64_t) X_fx[x_idx] * (int64_t) Y_fx[y_idx] ); /* Q56 */
                }
                W_tmp = W_tmp << 6;                        /*Q62*/
                ( *Zp_fx ) = ( W_tmp + 0x80000000 ) >> 32; /*Q30*/
@@ -1478,7 +1476,7 @@ Word16 matrix_product_q30_fx(
                    /* ( *Zp_fx ) = L_add( *Zp_fx, Mpy_32_32( X_fx[k + i * rowsX], Y_fx[j + k * rowsY] ) ); */
                    x_idx = k + i * rowsX;                                      /*Q0*/
                    y_idx = j + k * rowsY;                                      /*Q0*/
                    W_tmp += ( (long long int) X_fx[x_idx] * (long long int) Y_fx[y_idx] ); /* Q56*/
                    W_tmp += ( (int64_t) X_fx[x_idx] * (int64_t) Y_fx[y_idx] ); /* Q56*/
                }
                W_tmp = W_tmp << 6;                        /*Q62*/
                ( *Zp_fx ) = ( W_tmp + 0x80000000 ) >> 32; /*Q30*/
@@ -1505,8 +1503,7 @@ Word16 matrix_product_q30_fx(
                    /* ( *Zp_fx ) = L_add( *Zp_fx, Mpy_32_32( X_fx[i + k * rowsX], Y_fx[k + j * rowsY] ) ); */
                    x_idx = i + k * rowsX;                                      /*Q0*/
                    y_idx = k + j * rowsY;                                      /*Q0*/
                    W_tmp += ( (long long int) X_fx[x_idx] * (long long int) Y_fx[y_idx] ); /* Q56*/
                   
                    W_tmp += ( (int64_t) X_fx[x_idx] * (int64_t) Y_fx[y_idx] ); /* Q56*/
                }
                W_tmp = W_tmp << 6;                        /*Q62*/
                ( *Zp_fx ) = ( W_tmp + 0x80000000 ) >> 32; /*Q30*/
+8 −7
Original line number Diff line number Diff line
@@ -4121,7 +4121,7 @@ static int16_t read_surround_coherence_hr(
            }
            else
            {
                idx_ER[j] = 7; // masa_sq( error_ratio_surr, diffuseness_thresholds, DIRAC_DIFFUSE_LEVELS );
                idx_ER[j] = 7; /* masa_sq( error_ratio_surr, diffuseness_thresholds, DIRAC_DIFFUSE_LEVELS ); */
                no_cv_vec[j] = idx_cb_sur_coh_masa[idx_ER[j]] + 2;
            }
        }
@@ -4347,16 +4347,16 @@ static void read_stream_dct_coeffs_omasa(

    /* deindex */
#ifdef NONBE_1231_BASOP_819_THRESHOLD_MASA2TOTAL
    q_dct_data_fx[0] = (Word32) ( ( step_fx * q_idx[0] ) >> 6 ); // Q25
    q_dct_data_fx[0] = (Word32) ( ( step_fx * q_idx[0] ) >> 6 ); /* Q25 */
    for ( i = 1; i < len_stream; i++ )
    {
        if ( ( q_idx[i] & 1 ) == 0 )
        {
            q_dct_data_fx[i] = (Word32) ( ( step_fx * ( -q_idx[i] ) ) >> 7 ); // Q25
            q_dct_data_fx[i] = (Word32) ( ( step_fx * ( -q_idx[i] ) ) >> 7 ); /* Q25 */
        }
        ELSE
        {
            q_dct_data_fx[i] = (Word32) ( ( step_fx * ( q_idx[i] + 1 ) ) >> 7 ); // Q25
            q_dct_data_fx[i] = (Word32) ( ( step_fx * ( q_idx[i] + 1 ) ) >> 7 ); /* Q25 */
        }
    }
#else
@@ -4454,9 +4454,10 @@ void ivas_omasa_decode_masa_to_total(
            BREAK;
    }

    /* this is to make sure the comparison to the threshold 0.98 will go the same way in fixed point and floating 
       point without having to drag the fixed point values to the comparison place in the code; 1052266987 is 0.98 in Q30
       it is not needed in the fixed point*/
    /* this is to make sure the comparison to the threshold 0.98 will go the same way in */
    /* fixed point and floating point without having to drag the fixed point values to the */
    /* comparison place in the code; 1052266987 is 0.98 in Q30 it is not needed in the fixed point*/

    for ( i = 0; i < nblocks * nbands; i++ )
    {
        if ( q_dct_data_fx[i] >= 1052266987 && q_dct_data_fx[i] < 1052400000 )