Commit cba90f9d authored by vasilache's avatar vasilache
Browse files

clang review

parent 4e79c6a0
Loading
Loading
Loading
Loading
Loading
+9 −11
Original line number Diff line number Diff line
@@ -1380,7 +1380,7 @@ Word16 matrix_product_fx(
                    x_idx = i + k * rowsX;                                           /*Q0*/
                    y_idx = k + j * rowsY;                                           /*Q0*/
                    ( *Zp_fx ) = ( *Zp_fx ) + Mpy_32_32( X_fx[x_idx], Y_fx[y_idx] ); /*Qx + Qy - 31  L_sat_add() */
                    // TODO: overflow of Z_fx to be checked
                    /* TODO: overflow of Z_fx to be checked */
                    move32();
                }
                Zp_fx++;
@@ -1422,11 +1422,10 @@ Word16 matrix_product_q30_fx(
        {
            for ( i = 0; i < colsX; ++i )
            {
                //( *Zp_fx ) = 0;
                W_tmp = 0;
                for ( k = 0; k < rowsX; ++k )
                {
                    //( *Zp_fx ) = L_add( *Zp_fx, Mpy_32_32( X_fx[k + i * rowsX], Y_fx[k + j * rowsY] ) );
                    /*( *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 */
@@ -1447,12 +1446,12 @@ Word16 matrix_product_q30_fx(
        {
            for ( i = 0; i < rowsX; ++i )
            {
                //( *Zp_fx ) = 0;

                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] ) );
                    /* ( *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 */
@@ -1473,14 +1472,13 @@ Word16 matrix_product_q30_fx(
        {
            for ( i = 0; i < colsX; ++i )
            {
                //( *Zp_fx ) = 0;
                W_tmp = 0;
                for ( k = 0; k < colsX; ++k )
                {
                    //( *Zp_fx ) = L_add( *Zp_fx, Mpy_32_32( X_fx[k + i * rowsX], Y_fx[j + k * rowsY] ) );
                    /* ( *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 += ( (long long int) X_fx[x_idx] * (long long int) Y_fx[y_idx] ); /* Q56*/
                }
                W_tmp = W_tmp << 6;                        /*Q62*/
                ( *Zp_fx ) = ( W_tmp + 0x80000000 ) >> 32; /*Q30*/
@@ -1500,15 +1498,15 @@ Word16 matrix_product_q30_fx(
        {
            for ( i = 0; i < rowsX; ++i )
            {
                //( *Zp_fx ) = 0;
                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[k + j * rowsY] ) );
                    /* ( *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 += ( (long long int) X_fx[x_idx] * (long long int) Y_fx[y_idx] ); /* Q56*/
                   
                }
                W_tmp = W_tmp << 6;                        /*Q62*/
                ( *Zp_fx ) = ( W_tmp + 0x80000000 ) >> 32; /*Q30*/
+4 −3
Original line number Diff line number Diff line
@@ -6198,9 +6198,10 @@ void ivas_omasa_encode_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 )