Commit 9c9ffa16 authored by emerit's avatar emerit
Browse files

fix tests

parent 1eaaf3dc
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@
#define OPT_TCXLTP_FILTER_LOOP                               /* FhG: optimize loop in tcx_ltp_synth_filter */
#define FIX_2049_DIFF_IN_DECORR_TAIL                         /* FhG: correct scale values in ivas_dirac_dec_binaural_process_output_fx() */
#define FIX_2602_NONBE_SAT_IN_SWB_TBE_SCALE                  /* Dolby/FhG: fix for issue 2026: Saturation in SWB TBE re-scaling function preventing StereoDownmix complexity job to complete */
#define FIX_1785_NONBE_ASSERT_IN_IVAS_JBM_DEC_RENDER_FX      /* Orange: 10ms Rendering: Assert in ivas_jbm_dec_render_fx() -> scale_sig32 */
#define FIX_1785_ASSERT_IN_IVAS_JBM_DEC_RENDER_FX            /* Orange: 10ms Rendering: Assert in ivas_jbm_dec_render_fx() -> scale_sig32 */

/* #################### Start BASOP porting switches ############################ */

+30 −19
Original line number Diff line number Diff line
@@ -2302,7 +2302,7 @@ ivas_error ivas_jbm_dec_render_fx(

        IF( EQ_32( st_ivas->mc_mode, MC_MODE_MCT ) )
        {
#ifndef FIX_1785_NONBE_ASSERT_IN_IVAS_JBM_DEC_RENDER_FX
#ifndef FIX_1785_ASSERT_IN_IVAS_JBM_DEC_RENDER_FX
            Word16 crendInPlaceRotation = FALSE;
#endif
            move16();
@@ -2316,12 +2316,14 @@ ivas_error ivas_jbm_dec_render_fx(
            {
                IF( LT_16( add( st_ivas->hTransSetup.nchan_out_woLFE, st_ivas->hTransSetup.num_lfe ), add( st_ivas->hIntSetup.nchan_out_woLFE, st_ivas->hIntSetup.num_lfe ) ) )
                {
#ifndef FIX_1785_NONBE_ASSERT_IN_IVAS_JBM_DEC_RENDER_FX
#ifndef FIX_1785_ASSERT_IN_IVAS_JBM_DEC_RENDER_FX
                    crendInPlaceRotation = TRUE;
#endif
                    move16();

                    ivas_mc2sba_fx( st_ivas->hTransSetup, p_tc_fx, p_output_fx, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE_FX );
#else
                    ivas_mc2sba_fx( st_ivas->hTransSetup, p_tc_fx, p_tc_fx, *nSamplesRendered, st_ivas->hIntSetup.ambisonics_order, GAIN_LFE_FX );
#endif
                }
            }

@@ -2348,7 +2350,7 @@ ivas_error ivas_jbm_dec_render_fx(

                FOR( i = 0; i < nchan_in; i++ )
                {
#ifdef FIX_1785_NONBE_ASSERT_IN_IVAS_JBM_DEC_RENDER_FX
#ifdef FIX_1785_ASSERT_IN_IVAS_JBM_DEC_RENDER_FX
                    scale_sig32( p_tc_fx[i], *nSamplesRendered, negate( sub( Q11, *st_ivas->hCrendWrapper->p_io_qfactor ) ) ); // Q = *st_ivas->hCrendWrapper->p_io_qfactor
#else
                    scale_sig32( p_output_fx[i], *nSamplesRendered, negate( sub( Q11, *st_ivas->hCrendWrapper->p_io_qfactor ) ) ); // Q = *st_ivas->hCrendWrapper->p_io_qfactor
@@ -2361,9 +2363,9 @@ ivas_error ivas_jbm_dec_render_fx(

                IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
                {
#ifdef FIX_1785_NONBE_ASSERT_IN_IVAS_JBM_DEC_RENDER_FX
#ifdef FIX_1785_ASSERT_IN_IVAS_JBM_DEC_RENDER_FX
                    IF( ( error = ivas_rend_crendProcessSubframesSplitBin( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, ( st_ivas->hSplitBinRend == NULL ) ? NULL : &st_ivas->hSplitBinRend->splitrend.multiBinPoseData, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData,
                                                                           &st_ivas->hIntSetup, st_ivas->hEFAPdata, st_ivas->hTcBuffer, p_tc_fx, p_tc_fx, *nSamplesRendered, output_Fs ) ) != IVAS_ERR_OK )
                                                                           &st_ivas->hIntSetup, st_ivas->hEFAPdata, st_ivas->hTcBuffer, p_tc_fx, p_output_fx, *nSamplesRendered, output_Fs ) ) != IVAS_ERR_OK )
#else
                    IF( ( error = ivas_rend_crendProcessSubframesSplitBin( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, ( st_ivas->hSplitBinRend == NULL ) ? NULL : &st_ivas->hSplitBinRend->splitrend.multiBinPoseData, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData,
                                                                           &st_ivas->hIntSetup, st_ivas->hEFAPdata, st_ivas->hTcBuffer, crendInPlaceRotation ? p_output_fx : p_tc_fx, p_output_fx, *nSamplesRendered, output_Fs ) ) != IVAS_ERR_OK )
@@ -2374,9 +2376,9 @@ ivas_error ivas_jbm_dec_render_fx(
                }
                ELSE
                {
#ifdef FIX_1785_NONBE_ASSERT_IN_IVAS_JBM_DEC_RENDER_FX
#ifdef FIX_1785_ASSERT_IN_IVAS_JBM_DEC_RENDER_FX
                    IF( NE_32( ( error = ivas_rend_crendProcessSubframe_fx( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData,
                                                                            &st_ivas->hIntSetup, st_ivas->hEFAPdata, st_ivas->hTcBuffer, p_tc_fx, p_tc_fx, *nSamplesRendered, output_Fs, 0 ) ),
                                                                            &st_ivas->hIntSetup, st_ivas->hEFAPdata, st_ivas->hTcBuffer, p_tc_fx, p_output_fx, *nSamplesRendered, output_Fs, 0 ) ),
                               IVAS_ERR_OK ) )
#else
                    IF( NE_32( ( error = ivas_rend_crendProcessSubframe_fx( st_ivas->hCrendWrapper, st_ivas->intern_config, st_ivas->hOutSetup.output_config, st_ivas->hDecoderConfig, st_ivas->hCombinedOrientationData,
@@ -2399,25 +2401,38 @@ ivas_error ivas_jbm_dec_render_fx(
                        }
                    }

#ifdef FIX_1785_NONBE_ASSERT_IN_IVAS_JBM_DEC_RENDER_FX
                    ivas_binaural_add_LFE_fx( st_ivas, *nSamplesRendered, p_tc_fx, p_tc_fx );
#else
                    ivas_binaural_add_LFE_fx( st_ivas, *nSamplesRendered, p_tc_fx, p_output_fx );
#endif
                }

                FOR( i = 0; i < nchan_in; i++ )
#ifdef FIX_1785_ASSERT_IN_IVAS_JBM_DEC_RENDER_FX
                FOR( i = 0; i < nchan_out; i++ )
                {
                    scale_sig32( p_output_fx[i], *nSamplesRendered, sub( Q11, *st_ivas->hCrendWrapper->p_io_qfactor ) ); // Q11
                }

                n = nchan_out;
                move16();
                IF( st_ivas->hDecoderConfig->Opt_tsm )
                {
                    n = 0;
                    move16();
                }

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

#else
                FOR( i = 0; i < nchan_in; i++ )
                {
                    scale_sig32( p_output_fx[i], *nSamplesRendered, sub( Q11, *st_ivas->hCrendWrapper->p_io_qfactor ) ); // Q11
                    IF( st_ivas->hDecoderConfig->Opt_tsm )
                    {
                        scale_sig32( p_tc_fx[i], *nSamplesRendered, sub( Q11, *st_ivas->hCrendWrapper->p_io_qfactor ) ); // Q11
                    }
#endif
                }
#endif
            }
            ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_MC ) )
            {
@@ -2690,11 +2705,7 @@ ivas_error ivas_jbm_dec_render_fx(
        }
    }

#ifdef FIX_1785_NONBE_ASSERT_IN_IVAS_JBM_DEC_RENDER_FX
    ivas_syn_output_fx( p_tc_fx, output_q_factor, *nSamplesRendered, nchan_out_syn_output, data );
#else
    ivas_syn_output_fx( p_output_fx, output_q_factor, *nSamplesRendered, nchan_out_syn_output, data );
#endif

    *nSamplesAvailableNext = st_ivas->hTcBuffer->n_samples_available;
    move16();