Commit 2cc368d9 authored by vaclav's avatar vaclav
Browse files

fix

parent 76bfaec1
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@
#include "rom_com.h"
#include "prot_fx.h"
#include "ivas_rom_com.h"
#include "ivas_rom_com_fx.h"
#ifdef DEBUGGING
#include "debug.h"
#endif
@@ -87,8 +88,7 @@ ivas_error ivas_enc_fx(
    input_frame = extract_l( Mpy_32_16_1( input_Fs, INV_FRAME_PER_SEC_Q15 ) );
    IF( NE_16( nchan_inp, 1 ) )
    {
        n_samples_chan = div_l( L_deposit_l( n_samples ), nchan_inp ); /* Q0 */
        n_samples_chan = shl( n_samples_chan, 1 );                     /* Q0 */
        n_samples_chan = extract_l( Mpy_32_32_r( n_samples, one_by_q_level[nchan_inp] ) ); /* Q0 */
    }
    ELSE
    {
+12 −11
Original line number Diff line number Diff line
@@ -674,9 +674,9 @@ ivas_error ivas_init_encoder_fx(
            }
        }

        tmp_br = Mpy_32_32_r( ivas_total_brate, one_by_q_level[st_ivas->nchan_transport] );
        FOR( sce_id = 0; sce_id < st_ivas->nSCE; sce_id++ )
        {
            tmp_br = Mpy_32_32_r( ivas_total_brate, one_by_q_level[st_ivas->nchan_transport] );
            IF( ( error = create_sce_enc_fx( st_ivas, sce_id, tmp_br ) ) != IVAS_ERR_OK )
            {
                return error;
@@ -689,10 +689,10 @@ ivas_error ivas_init_encoder_fx(
            }
        }

        tmp_br = L_shl( Mpy_32_32_r( ivas_total_brate, one_by_q_level[st_ivas->nchan_transport] ), 1 );
        FOR( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ )
        {
            tmp_br = Mpy_32_32_r( ivas_total_brate, one_by_q_level[st_ivas->nchan_transport] );
            IF( ( error = create_cpe_enc_fx( st_ivas, cpe_id, L_shl( tmp_br, 1 ) ) ) != IVAS_ERR_OK )
            IF( ( error = create_cpe_enc_fx( st_ivas, cpe_id, tmp_br ) ) != IVAS_ERR_OK )
            {
                return error;
            }
@@ -831,10 +831,10 @@ ivas_error ivas_init_encoder_fx(
                }
            }

            tmp_br = L_shl( Mpy_32_32_r( ivas_total_brate, one_by_q_level[st_ivas->nchan_transport] ), 1 );
            FOR( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ )
            {
                tmp_br = Mpy_32_32_r( ivas_total_brate, one_by_q_level[st_ivas->nchan_transport] );
                IF( ( error = create_cpe_enc_fx( st_ivas, cpe_id, L_shl( tmp_br, 1 ) ) ) != IVAS_ERR_OK )
                IF( ( error = create_cpe_enc_fx( st_ivas, cpe_id, tmp_br ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
@@ -862,10 +862,10 @@ ivas_error ivas_init_encoder_fx(
            st_ivas->nCPE = add( st_ivas->nCPE, shr( add( st_ivas->hEncoderConfig->nchan_ism, 1 ), 1 ) ); /* Q0 */
#endif

            tmp_br = L_shl( Mpy_32_32_r( ivas_total_brate, one_by_q_level[st_ivas->nchan_transport] ), 1 );
            FOR( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ )
            {
                tmp_br = Mpy_32_32_r( ivas_total_brate, one_by_q_level[st_ivas->nchan_transport] );
                IF( ( error = create_cpe_enc_fx( st_ivas, cpe_id, L_shl( tmp_br, 1 ) ) ) != IVAS_ERR_OK )
                IF( ( error = create_cpe_enc_fx( st_ivas, cpe_id, tmp_br ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
@@ -898,10 +898,10 @@ ivas_error ivas_init_encoder_fx(
            st_ivas->nCPE = shr( hEncoderConfig->nchan_inp, CPE_CHANNELS_LOG2 ); /* Q0 */
            move16();

            tmp_br = L_shl( Mpy_32_32_r( ivas_total_brate, one_by_q_level[hEncoderConfig->nchan_inp] ), 1 );
            FOR( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ )
            {
                tmp_br = Mpy_32_32_r( ivas_total_brate, one_by_q_level[hEncoderConfig->nchan_inp] );
                IF( ( error = create_cpe_enc_fx( st_ivas, cpe_id, L_shl( tmp_br, 1 ) ) ) != IVAS_ERR_OK )
                IF( ( error = create_cpe_enc_fx( st_ivas, cpe_id, tmp_br ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
@@ -934,9 +934,9 @@ ivas_error ivas_init_encoder_fx(
                return error;
            }

            tmp_br = Mpy_32_32_r( ivas_total_brate, one_by_q_level[st_ivas->nCPE] );
            FOR( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ )
            {
                tmp_br = Mpy_32_32_r( ivas_total_brate, one_by_q_level[st_ivas->nCPE] );
                IF( ( error = create_cpe_enc_fx( st_ivas, cpe_id, tmp_br ) ) != IVAS_ERR_OK )
                {
                    return error;
@@ -960,9 +960,10 @@ ivas_error ivas_init_encoder_fx(
                return error;
            }

            i = add( st_ivas->nCPE, st_ivas->nSCE );
            tmp_br = Mpy_32_32_r( ivas_total_brate, one_by_q_level[i] );
            FOR( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ )
            {
                tmp_br = Mpy_32_32_r( ivas_total_brate, one_by_q_level[st_ivas->nSCE] );
                IF( ( error = create_cpe_enc_fx( st_ivas, cpe_id, tmp_br ) ) != IVAS_ERR_OK )
                {
                    return error;