Commit fc0987bc authored by emerit's avatar emerit
Browse files

rollback nchan_in

parent 0a908ba4
Loading
Loading
Loading
Loading
+1 −25
Original line number Diff line number Diff line
@@ -2142,12 +2142,10 @@ ivas_error ivas_jbm_dec_render_fx(
                gd_bits = find_guarded_bits_fx( subframe_len );
                exp = 13;
                move16();
#ifndef FIX_1330_JBM_MEMORY
                IF( NE_32( ( error = getAudioConfigNumChannels( st_ivas->intern_config, &nchan_in ) ), IVAS_ERR_OK ) )
                {
                    return error;
                }
#endif
                IF( NE_32( ( error = getAudioConfigNumChannels( st_ivas->hOutSetup.output_config, &nchan_out ) ), IVAS_ERR_OK ) )
                {
                    return error;
@@ -2158,11 +2156,7 @@ ivas_error ivas_jbm_dec_render_fx(

                IF( crendInPlaceRotation )
                {
#ifdef FIX_2070_JBM_TC_CHANNEL_RESCALING_ISSUE
                    FOR( i = 0; i < st_ivas->nchan_transport; i++ )
#else
                    FOR( i = 0; i < nchan_in; i++ )
#endif
                    {
                        scale_sig32( p_output_fx[i], *nSamplesRendered, negate( sub( Q11, *st_ivas->hCrendWrapper->p_io_qfactor ) ) ); // Q = *st_ivas->hCrendWrapper->p_io_qfactor
#ifndef FIX_1330_JBM_MEMORY
@@ -2175,11 +2169,7 @@ ivas_error ivas_jbm_dec_render_fx(
                }
                ELSE
                {
#ifdef FIX_2070_JBM_TC_CHANNEL_RESCALING_ISSUE
                    FOR( i = 0; i < st_ivas->nchan_transport; i++ )
#else
                    FOR( i = 0; i < nchan_in; i++ )
#endif
                    {
                        scale_sig32( p_tc_fx[i], *nSamplesRendered, negate( sub( Q11, *st_ivas->hCrendWrapper->p_io_qfactor ) ) ); // Q = *st_ivas->hCrendWrapper->p_io_qfactor
                    }
@@ -2217,19 +2207,13 @@ ivas_error ivas_jbm_dec_render_fx(
#ifndef FIX_1330_JBM_MEMORY
                    IF( st_ivas->hDecoderConfig->Opt_tsm )
                    {
#endif
                        IF( NE_16( exp, *st_ivas->hCrendWrapper->p_io_qfactor ) )
                        {
#ifdef FIX_1330_JBM_MEMORY
                            FOR( i = 0; i < st_ivas->nchan_transport; i++ )
#else
                            FOR( i = 0; i < nchan_in; i++ )
#endif
                            {
                                scale_sig32( p_tc_fx[i], *nSamplesRendered, sub( *st_ivas->hCrendWrapper->p_io_qfactor, exp ) );
                            }
                        }
#ifndef FIX_1330_JBM_MEMORY
                    }
#endif
                    ivas_binaural_add_LFE_fx( st_ivas, *nSamplesRendered, p_tc_fx, p_output_fx );
@@ -2237,11 +2221,7 @@ ivas_error ivas_jbm_dec_render_fx(

                IF( crendInPlaceRotation )
                {
#ifdef FIX_2070_JBM_TC_CHANNEL_RESCALING_ISSUE
                    n = st_ivas->nchan_transport;
#else
                    n = nchan_in;
#endif
                }
                ELSE
                {
@@ -2261,11 +2241,7 @@ ivas_error ivas_jbm_dec_render_fx(
                }
#endif

#ifdef FIX_2070_JBM_TC_CHANNEL_RESCALING_ISSUE
                FOR( i = n; i < st_ivas->nchan_transport; i++ )
#else
                FOR( i = n; i < nchan_in; i++ )
#endif
                {
                    scale_sig32( p_tc_fx[i], *nSamplesRendered, sub( Q11, *st_ivas->hCrendWrapper->p_io_qfactor ) ); // Q11
                }