Commit 6f619253 authored by norvell's avatar norvell
Browse files

Add FIX_2070_JBM_TC_CHANNEL_RESCALING_ISSUE to change nchan_in ->...

Add FIX_2070_JBM_TC_CHANNEL_RESCALING_ISSUE to change nchan_in -> nchan_transport for scaling on p_tc_fx
parent 5cb54858
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -94,6 +94,7 @@
#define FIX_2176_ASSERT_DEC_MAP_PARAMS_DIRAC2STEREO          /* FhG: Reduce hStereoDft->q_smooth_buf_fx by one to prevent overflow in the subframe_band_nrg[][] calculation */
#define FIX_2015_PREMPH_SAT_ALT                              /* VA: saturation can happen during preemphasis filtering due to a too aggressive scaling factor, allows preemphis to get 1 more bit headroom */
#define FIX_2178_FL_TO_FX_WITH_OBJ_EDIT_FILE_INTERFACE       /* Nokia: Fixes float  to fx conversion in decoder app with object edit file interface */
#define FIX_2070_JBM_TC_CHANNEL_RESCALING_ISSUE              /* Eri/Orange: scale_sig32 problem on p_tc_fx[] */

/* ################### End FIXES switches ########################### */

+12 −0
Original line number Diff line number Diff line
@@ -2152,7 +2152,11 @@ 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
                        IF( st_ivas->hDecoderConfig->Opt_tsm )
@@ -2163,7 +2167,11 @@ 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
                    }
@@ -2222,7 +2230,11 @@ ivas_error ivas_jbm_dec_render_fx(
                    move16();
                }

#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
                }