Commit 1e12de6f authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

lib_rend functions conversion, MSAN fixes in SBA path

[x] renderism functions conversion
[x] SBA path MSAN error fixes
[x] ivas_masa_merge.c BASOP changes
parent efb050e7
Loading
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -1433,8 +1433,11 @@ int main(
                if ( i == 0 )
                {
                    IVAS_REND_ReadOnlyAudioBuffer tmpBuffer = getReadOnlySubBuffer( inBuffer, (int16_t) args.inConfig.audioObjects[i].inputChannelIndex, args.inConfig.numAudioObjects );

#ifdef IVAS_FLOAT_FIXED
                    if ( ( error = IVAS_REND_FeedInputAudio_fx( hIvasRend, ismIds[i], tmpBuffer ) ) != IVAS_ERR_OK )
#else
                    if ( ( error = IVAS_REND_FeedInputAudio( hIvasRend, ismIds[i], tmpBuffer ) ) != IVAS_ERR_OK )
#endif
                    {
                        fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) );
                        exit( -1 );
@@ -1450,8 +1453,11 @@ int main(
            else
            {
                IVAS_REND_ReadOnlyAudioBuffer tmpBuffer = getReadOnlySubBuffer( inBuffer, (int16_t) args.inConfig.audioObjects[i].inputChannelIndex, 1 );

#ifdef IVAS_FLOAT_FIXED
                if ( ( error = IVAS_REND_FeedInputAudio_fx( hIvasRend, ismIds[i], tmpBuffer ) ) != IVAS_ERR_OK )
#else
                if ( ( error = IVAS_REND_FeedInputAudio( hIvasRend, ismIds[i], tmpBuffer ) ) != IVAS_ERR_OK )
#endif
				{
                    fprintf( stderr, "Error: %s\n", ivas_error_to_string( error ) );
                    exit( -1 );
+8 −0
Original line number Diff line number Diff line
@@ -44,10 +44,18 @@
/* clang-format off */
#ifdef IVAS_FLOAT_FIXED
#define MATRIX_CONSTANT (759250113) 
#define NUM_SAMPLES_960 (960)
#define NUM_SAMPLES_720 (720)
#define NUM_SAMPLES_320 (320)
#define NUM_SAMPLES_160 (160)
#define L_SUBFRAME_48k         (240)
#define L_SUBFRAME_32k         (180)
#define L_SUBFRAME_16k         (80)
#define L_SUBFRAME_8k           (40)
#define Q31_BY_NUM_SAMPLES_960 ( 2239294 )
#define Q31_BY_NUM_SAMPLES_720 ( 2986764 )
#define Q31_BY_NUM_SAMPLES_320 ( 6731924 )
#define Q31_BY_NUM_SAMPLES_160 ( 13506186 )
#define Q31_BY_SUB_FRAME_240 ( 8985287 )
#define Q31_BY_SUB_FRAME_180 ( 11997115 )
#define Q31_BY_SUB_FRAME_80  ( 27183337 )
+4 −0
Original line number Diff line number Diff line
@@ -118,6 +118,10 @@ typedef struct _IVAS_ENC_CHANNEL_AWARE_CONFIG

typedef struct _IVAS_ISM_METADATA
{
#ifdef IVAS_FLOAT_FIXED
    Word32 azimuth_fx;
    Word32 elevation_fx;
#endif
    float azimuth;
    float elevation;
    float radius;
+2 −0
Original line number Diff line number Diff line
@@ -49,6 +49,8 @@
#define _180_OVER_PI                            ( 180.0f / EVS_PI )
#ifdef IVAS_FLOAT_FIXED
#define _180_OVER_PI_Q25                         1922527233
#define _180_IN_Q22 (754974720)
#define _360_IN_Q22 (1509949440)
#define _180_OVER_PI_FX                          (Word32) (( 180.0f / EVS_PI ) *ONE_IN_Q10)
#define PI_OVER_180_Q15                          ( 572 )
#define _180_OVER_PI_Q9                          ( 29335 )
+12 −0
Original line number Diff line number Diff line
@@ -1577,7 +1577,11 @@ ivas_error acelp_core_dec_ivas_fx(

        q_bpf_error_signal = Q6;

#ifdef MSAN_FIX
        Copy_Scale_sig_16_32(bpf_error_signal_16fx, tmp_bpf_error_signal_fx, st->L_frame, q_bpf_error_signal - st->Q_syn); // Q6
#else
        Copy_Scale_sig_16_32(bpf_error_signal_16fx, tmp_bpf_error_signal_fx, L_FRAME16k, q_bpf_error_signal - st->Q_syn); // Q6
#endif
        for (i = 0; i < CLDFB_NO_COL_MAX; i++)
        {
            Scale_sig32(realBuffer_fx[i], CLDFB_NO_CHANNELS_MAX, -Q7); //Q0
@@ -1855,12 +1859,20 @@ ivas_error acelp_core_dec_ivas_fx(
              ( EQ_16( st->extl, -1 ) || EQ_16( st->extl, SWB_CNG ) || ( EQ_16( st->extl, WB_BWE ) && st->extl_brate == 0 && NE_16( st->coder_type, AUDIO ) ) ) ) )
        {
            Word16 tmp_exp = 0;
#ifdef MSAN_FIX
            Copy_Scale_sig_32_16(synth_fx, synth_fx16, output_frame, 0);
#else
            Copy_Scale_sig_32_16(synth_fx, synth_fx16, L_FRAME48k, 0);
#endif

            hf_synth_ivas_fx( st->hBWE_zero, st->core_brate, output_frame, Aq_fx, exc_fx,
                              psyn_fx, synth_fx16, st->Q_exc, st->Q_syn2, st->hBWE_zero->delay_syn_hf_fx, &tmp_exp,
                              st->hBWE_zero->mem_hp_interp_fx, st->extl, st->CNG_mode, st->element_mode );
#ifdef MSAN_FIX
            Copy_Scale_sig_16_32(synth_fx16, synth_fx, 0, output_frame);
#else
            Copy_Scale_sig_16_32(synth_fx16, synth_fx, 0, L_FRAME48k);
#endif

            IF( st->hBWE_FD != NULL )
            {
Loading