Commit 43f84d96 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch '1552_basop_sba_msan_fix' into 'main-pc'

[non-BE]Port 1298 from float to main-pc

See merge request !1525
parents 2498b3d5 4f13a0af
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@
#define FIX_959_MASA_LINEAR_REND                        /* VA: issue 959: remove unused calling of ivas_sba_linear_renderer() in MASA rendering */

#define NONBE_FIX_968_ISM_BRIR_WITH_HEADROTATION_5MS_FIX      /* FhG : issue #968: differences between 5ms and 20ms rendering for discrete ISM with BRIR and head rotation*/
#define NONBE_FIX_935_SBA_REVERB                              /* FhG: issue 935: fix MSAN error for SBA related to BINAURAL_ROOM_REVERB */
#define FIX_969_USAN_IGF_ARITH                          /* FhG: issue 969: fix USAN error in igf_sce_dec; same issue as #962 */

/* #################### End BASOP porting switches ############################ */
+8 −4
Original line number Diff line number Diff line
@@ -1098,20 +1098,24 @@ static void ivas_binaural_obtain_DMX_fx(
            FOR( chIdx = 0; chIdx < hBinRenderer->nInChannels; chIdx++ )
            {
                Word32 foa_const_fx = L_shl( hBinRenderer->hReverb->foa_enc_fx[chIdx][1], 1 ); // Q30
                Word32 one_add_foa_const, one_sub_foa_const;

                one_add_foa_const = L_add( ONE_IN_Q30, foa_const_fx );     // Q30
                one_sub_foa_const = L_sub_sat( ONE_IN_Q30, foa_const_fx ); // Q30

                inRealPtr_fx = (Word32 *) &( RealBuffer[chIdx][k][0] );
                inImagPtr_fx = (Word32 *) &( ImagBuffer[chIdx][k][0] );

                FOR( bandIdx = 0; bandIdx < hBinRenderer->conv_band; bandIdx++ )
                {
                    outRealLeftPtr_fx[bandIdx] = L_add( outRealLeftPtr_fx[bandIdx], Mpy_32_32( inRealPtr_fx[bandIdx], L_add( ONE_IN_Q30, foa_const_fx ) ) ); // Q_in - 1
                    outRealLeftPtr_fx[bandIdx] = L_add( outRealLeftPtr_fx[bandIdx], Mpy_32_32( inRealPtr_fx[bandIdx], one_add_foa_const ) ); // Q_in - 1
                    move32();
                    outImagLeftPtr_fx[bandIdx] = L_add( outImagLeftPtr_fx[bandIdx], Mpy_32_32( inImagPtr_fx[bandIdx], L_add( ONE_IN_Q30, foa_const_fx ) ) ); // Q_in - 1
                    outImagLeftPtr_fx[bandIdx] = L_add( outImagLeftPtr_fx[bandIdx], Mpy_32_32( inImagPtr_fx[bandIdx], one_add_foa_const ) ); // Q_in - 1
                    move32();

                    outRealRightPtr_fx[bandIdx] = L_add( outRealRightPtr_fx[bandIdx], Mpy_32_32( inRealPtr_fx[bandIdx], L_sub( ONE_IN_Q30, foa_const_fx ) ) ); // Q_in - 1
                    outRealRightPtr_fx[bandIdx] = L_add( outRealRightPtr_fx[bandIdx], Mpy_32_32( inRealPtr_fx[bandIdx], one_sub_foa_const ) ); // Q_in - 1
                    move32();
                    outImagRightPtr_fx[bandIdx] = L_add( outImagRightPtr_fx[bandIdx], Mpy_32_32( inImagPtr_fx[bandIdx], L_sub( ONE_IN_Q30, foa_const_fx ) ) ); // Q_in - 1
                    outImagRightPtr_fx[bandIdx] = L_add( outImagRightPtr_fx[bandIdx], Mpy_32_32( inImagPtr_fx[bandIdx], one_sub_foa_const ) ); // Q_in - 1
                    move32();
                }
            }
+8 −0
Original line number Diff line number Diff line
@@ -158,11 +158,19 @@ void ivas_renderer_select(
            move16();

            test();
#ifdef NONBE_FIX_935_SBA_REVERB
#ifdef SPLIT_REND_WITH_HEAD_ROT
            IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
#else
            IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL ) )
#endif
#else
#ifdef SPLIT_REND_WITH_HEAD_ROT
            IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
#else
            IF( EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL ) || EQ_32( output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) )
#endif
#endif /* NONBE_FIX_935_SBA_REVERB */
            {
                *renderer_type = RENDERER_BINAURAL_FASTCONV;
                move16();
+8 −0
Original line number Diff line number Diff line
@@ -216,11 +216,19 @@ ivas_error ivas_sba_dec_reconfigure_fx(
        ELSE
        {
            test();
#ifdef NONBE_FIX_935_SBA_REVERB
#ifdef SPLIT_REND_WITH_HEAD_ROT
            IF( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL ) || EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
#else
            IF( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL ) )
#endif
#else
#ifdef SPLIT_REND_WITH_HEAD_ROT
            IF( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL ) || EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) || EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
#else
            IF( EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL ) || EQ_16( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) )
#endif
#endif /* NONBE_FIX_935_SBA_REVERB */
            {
                renderer_type_new = RENDERER_BINAURAL_FASTCONV;
                move16();
+6 −0
Original line number Diff line number Diff line
@@ -294,8 +294,14 @@ ivas_error ivas_spar_dec_open_fx(

        test();
        test();
#ifdef NONBE_FIX_935_SBA_REVERB

        IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) && EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL ) && EQ_32( st_ivas->ism_mode, ISM_SBA_MODE_DISC ) )
#else
        test();

        IF( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) && ( EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL ) || EQ_32( st_ivas->hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) ) && EQ_32( st_ivas->ism_mode, ISM_SBA_MODE_DISC ) )
#endif
        {
            /* get correct granularity in case of binaural rendering of the discrete objects with the td obj renderer */
            Word32 quo, rem;