Commit 6c62b168 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch 'objectrenderersources_cleanup' into 'main'

Clean up : objectRendererSources

See merge request !302
parents 0e681ce0 4e838b23
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -654,8 +654,18 @@ void ivas_get_dirac_sba_max_md_bits_fx(
    Word16 exp_res = 0;
    IF (var1 % 5 != 0) {
        var4 = BASOP_Util_Add_Mant32Exp(var2_32, exp, ONE_IN_Q30, 1, &exp_res);
        exp = exp_res;
    }
    *metadata_max_bits = extract_l(L_min(MAX16B, L_shr(var4, 14)));
    Word16 flag = BASOP_Util_Cmp_Mant32Exp(MAX16B, 31, var4, exp);
    Word32 tmp;
    if (flag == 1) {
        tmp = var4;
    }
    else {
        tmp = MAX16B;
        exp = 31;
    }
    *metadata_max_bits = (Word16)L_shr(tmp, 31 - exp);;
    *qmetadata_max_bit_req = QMETADATA_MAXBIT_REQ_SBA >> 1;

    return;
+10 −2
Original line number Diff line number Diff line
@@ -7333,11 +7333,19 @@ ivas_error ivas_td_binaural_open_fx(
    Word16 * SrcInd,         /*Temporarily used to store the updated value of SrcInd*/
    Word16 *num_src
);
#endif // IVAS_FLOAT_FIXED

#else
ivas_error ivas_td_binaural_open(
    Decoder_Struct *st_ivas                                     /* i/o: IVAS decoder structure                  */
);
#endif // IVAS_FLOAT_FIXED

#ifdef IVAS_FLOAT_FIXED
ivas_error ivas_td_binaural_renderer_fx(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
    Word32 *output[],                                            /* i/o: SCE channels / Binaural synthesis       */
    const Word16 output_frame                                  /* i  : output frame length                     */
);
#endif

ivas_error ivas_td_binaural_renderer(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                  */
+62 −68
Original line number Diff line number Diff line
@@ -371,15 +371,6 @@ ivas_error ivas_dec_setup(
                            // Cleanup changes for ivas_td_binaural_open: fixed to float
                            IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) )
                            {
                                fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Pos_fx, st_ivas->hBinRendererTd->Listener_p->Pos, st_ivas->hBinRendererTd->Listener_p->Pos_q, 3 );
                                fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Vel_fx, st_ivas->hBinRendererTd->Listener_p->Vel, Q30, 3 );
                                fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Front_fx, st_ivas->hBinRendererTd->Listener_p->Front, Q30, 3 );
                                fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Up_fx, st_ivas->hBinRendererTd->Listener_p->Up, Q30, 3 );
                                fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Right_fx, st_ivas->hBinRendererTd->Listener_p->Right, Q30, 3 );
                                TDREND_DirAtten_t *DirAtten_p = st_ivas->hBinRendererTd->DirAtten_p;
                                DirAtten_p->ConeInnerAngle = fix_to_float( DirAtten_p->ConeInnerAngle_fx, Q22 );
                                DirAtten_p->ConeOuterAngle = fix_to_float( DirAtten_p->ConeOuterAngle_fx, Q22 );
                                DirAtten_p->ConeOuterGain = fix_to_float( DirAtten_p->ConeOuterGain_fx, Q30 );
                                Word16 nchan_rend = num_src;
                                IF( EQ_16( st_ivas->ivas_format, MC_FORMAT ) && NE_16( st_ivas->transport_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) )
                                {
@@ -390,26 +381,15 @@ ivas_error ivas_dec_setup(
                                    TDREND_SRC_t *Src_p = st_ivas->hBinRendererTd->Sources[SrcInd[nS]];
                                    IF( Src_p->SrcSpatial_p != NULL )
                                    {
                                        Src_p->SrcSpatial_p->DirAtten.ConeInnerAngle = 360.0f;
                                        Src_p->SrcSpatial_p->DirAtten.ConeOuterAngle = 360.0f;
                                        Src_p->SrcSpatial_p->DirAtten.ConeOuterGain = 1.0f;
                                        FOR( Word16 nC = 0; nC < SPAT_BIN_MAX_INPUT_CHANNELS; nC++ )
                                        {
                                            fixedToFloat_arrL( Src_p->SrcSpatial_p->Pos_p_fx + nC * 3, Src_p->SrcSpatial_p->Pos_p + nC * 3, Q31, 3 );
                                            fixedToFloat_arrL( Src_p->SrcSpatial_p->Front_p_fx + nC * 3, Src_p->SrcSpatial_p->Front_p + nC * 3, Q30, 3 );
                                        }
                                    }
                                    FOR( Word16 nC = 0; nC < SPAT_BIN_MAX_INPUT_CHANNELS; nC++ )
                                    {
                                        Src_p->SrcRend_p->SrcGainMin_p[nC] = 0.0f;
                                        Src_p->SrcRend_p->SrcGainMax_p[nC] = 1.0f;
                                    }
                                    TDREND_SRC_SPATIAL_t *SrcSpatial_p = st_ivas->hBinRendererTd->Sources[nS]->SrcSpatial_p;
                                    fixedToFloat_arrL( SrcSpatial_p->Pos_p_fx, SrcSpatial_p->Pos_p, Q31, 3 );
                                    fixedToFloat_arrL( SrcSpatial_p->Front_p_fx, SrcSpatial_p->Front_p, Q30, 3 );
                                    SrcSpatial_p->DirAtten.ConeInnerAngle = fix_to_float( SrcSpatial_p->DirAtten.ConeInnerAngle_fx, Q22 );
                                    SrcSpatial_p->DirAtten.ConeOuterAngle = fix_to_float( SrcSpatial_p->DirAtten.ConeOuterAngle_fx, Q22 );
                                    SrcSpatial_p->DirAtten.ConeOuterGain = fix_to_float( SrcSpatial_p->DirAtten.ConeOuterGain_fx, Q30 );
                                }
                            }
                            // Cleanup changes for ivas_cldfb_dec_reconfig_fx: fixed to float
@@ -497,15 +477,6 @@ ivas_error ivas_dec_setup(
                        // Cleanup changes for ivas_td_binaural_open: fixed to float
                        IF( EQ_16( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) )
                        {
                            fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Pos_fx, st_ivas->hBinRendererTd->Listener_p->Pos, st_ivas->hBinRendererTd->Listener_p->Pos_q, 3 );
                            fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Vel_fx, st_ivas->hBinRendererTd->Listener_p->Vel, Q30, 3 );
                            fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Front_fx, st_ivas->hBinRendererTd->Listener_p->Front, Q30, 3 );
                            fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Up_fx, st_ivas->hBinRendererTd->Listener_p->Up, Q30, 3 );
                            fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Right_fx, st_ivas->hBinRendererTd->Listener_p->Right, Q30, 3 );
                            TDREND_DirAtten_t *DirAtten_p = st_ivas->hBinRendererTd->DirAtten_p;
                            DirAtten_p->ConeInnerAngle = fix_to_float( DirAtten_p->ConeInnerAngle_fx, Q22 );
                            DirAtten_p->ConeOuterAngle = fix_to_float( DirAtten_p->ConeOuterAngle_fx, Q22 );
                            DirAtten_p->ConeOuterGain = fix_to_float( DirAtten_p->ConeOuterGain_fx, Q30 );
                            Word16 nchan_rend = num_src;
                            IF( EQ_16( st_ivas->ivas_format, MC_FORMAT ) && NE_16( st_ivas->transport_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) )
                            {
@@ -516,26 +487,15 @@ ivas_error ivas_dec_setup(
                                TDREND_SRC_t *Src_p = st_ivas->hBinRendererTd->Sources[SrcInd[nS]];
                                IF( Src_p->SrcSpatial_p != NULL )
                                {
                                    Src_p->SrcSpatial_p->DirAtten.ConeInnerAngle = 360.0f;
                                    Src_p->SrcSpatial_p->DirAtten.ConeOuterAngle = 360.0f;
                                    Src_p->SrcSpatial_p->DirAtten.ConeOuterGain = 1.0f;
                                    FOR( Word16 nC = 0; nC < SPAT_BIN_MAX_INPUT_CHANNELS; nC++ )
                                    {
                                        fixedToFloat_arrL( Src_p->SrcSpatial_p->Pos_p_fx + nC * 3, Src_p->SrcSpatial_p->Pos_p + nC * 3, Q31, 3 );
                                        fixedToFloat_arrL( Src_p->SrcSpatial_p->Front_p_fx + nC * 3, Src_p->SrcSpatial_p->Front_p + nC * 3, Q30, 3 );
                                    }
                                }
                                FOR( Word16 nC = 0; nC < SPAT_BIN_MAX_INPUT_CHANNELS; nC++ )
                                {
                                    Src_p->SrcRend_p->SrcGainMin_p[nC] = 0.0f;
                                    Src_p->SrcRend_p->SrcGainMax_p[nC] = 1.0f;
                                }
                                TDREND_SRC_SPATIAL_t *SrcSpatial_p = st_ivas->hBinRendererTd->Sources[nS]->SrcSpatial_p;
                                fixedToFloat_arrL( SrcSpatial_p->Pos_p_fx, SrcSpatial_p->Pos_p, Q31, 3 );
                                fixedToFloat_arrL( SrcSpatial_p->Front_p_fx, SrcSpatial_p->Front_p, Q30, 3 );
                                SrcSpatial_p->DirAtten.ConeInnerAngle = fix_to_float( SrcSpatial_p->DirAtten.ConeInnerAngle_fx, Q22 );
                                SrcSpatial_p->DirAtten.ConeOuterAngle = fix_to_float( SrcSpatial_p->DirAtten.ConeOuterAngle_fx, Q22 );
                                SrcSpatial_p->DirAtten.ConeOuterGain = fix_to_float( SrcSpatial_p->DirAtten.ConeOuterGain_fx, Q30 );
                            }
                        }
                        // Cleanup changes for ivas_cldfb_dec_reconfig_fx: fixed to float
@@ -2224,30 +2184,13 @@ ivas_error ivas_init_decoder_fx(
    ELSE IF ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD )
    {
#ifdef IVAS_FLOAT_FIXED
#if 1 /*Cleanup changes: float to fixed */
                Word16 SrcInd[MAX_NUM_TDREND_CHANNELS];
                Word16 num_src;
                FOR( i = 0; i < 4; i++ )
                {
                    st_ivas->hRenderConfig->directivity_fx[i * 3] = (Word16)floatToFixed( st_ivas->hRenderConfig->directivity[i * 3], 6 );
                    st_ivas->hRenderConfig->directivity_fx[i * 3 + 1] = (Word16)floatToFixed( st_ivas->hRenderConfig->directivity[i * 3 + 1], 6 );
                    st_ivas->hRenderConfig->directivity_fx[i * 3 + 2] = (Word16)floatToFixed( st_ivas->hRenderConfig->directivity[i * 3 + 2], 15 );
                }
#endif
                IF( ( error = ivas_td_binaural_open_fx( st_ivas, SrcInd, &num_src ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
#if 1 // Cleanup changes for ivas_td_binaural_open: fixed to float
                fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Pos_fx, st_ivas->hBinRendererTd->Listener_p->Pos, st_ivas->hBinRendererTd->Listener_p->Pos_q, 3 );
                fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Vel_fx, st_ivas->hBinRendererTd->Listener_p->Vel, Q30, 3 );
                fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Front_fx, st_ivas->hBinRendererTd->Listener_p->Front, Q30, 3 );
                fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Up_fx, st_ivas->hBinRendererTd->Listener_p->Up, Q30, 3 );
                fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Right_fx, st_ivas->hBinRendererTd->Listener_p->Right, Q30, 3 );
                TDREND_DirAtten_t *DirAtten_p = st_ivas->hBinRendererTd->DirAtten_p;
                DirAtten_p->ConeInnerAngle = fix_to_float( DirAtten_p->ConeInnerAngle_fx, Q22 );
                DirAtten_p->ConeOuterAngle = fix_to_float( DirAtten_p->ConeOuterAngle_fx, Q22 );
                DirAtten_p->ConeOuterGain = fix_to_float( DirAtten_p->ConeOuterGain_fx, Q30 );
                Word16 nchan_rend = num_src;
                IF( EQ_16( st_ivas->ivas_format, MC_FORMAT ) && NE_16( st_ivas->transport_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) )
                {
@@ -2258,26 +2201,15 @@ ivas_error ivas_init_decoder_fx(
                    TDREND_SRC_t *Src_p = st_ivas->hBinRendererTd->Sources[SrcInd[nS]];
                    IF( Src_p->SrcSpatial_p != NULL )
                    {
                        Src_p->SrcSpatial_p->DirAtten.ConeInnerAngle = 360.0f;
                        Src_p->SrcSpatial_p->DirAtten.ConeOuterAngle = 360.0f;
                        Src_p->SrcSpatial_p->DirAtten.ConeOuterGain = 1.0f;
                        FOR( Word16 nC = 0; nC < SPAT_BIN_MAX_INPUT_CHANNELS; nC++ )
                        {
                            fixedToFloat_arrL( Src_p->SrcSpatial_p->Pos_p_fx + nC * 3, Src_p->SrcSpatial_p->Pos_p + nC * 3, Q31, 3 );
                            fixedToFloat_arrL( Src_p->SrcSpatial_p->Front_p_fx + nC * 3, Src_p->SrcSpatial_p->Front_p + nC * 3, Q30, 3 );
                        }
                    }
                    FOR( Word16 nC = 0; nC < SPAT_BIN_MAX_INPUT_CHANNELS; nC++ )
                    {
                        Src_p->SrcRend_p->SrcGainMin_p[nC] = 0.0f;
                        Src_p->SrcRend_p->SrcGainMax_p[nC] = 1.0f;
                    }
                    TDREND_SRC_SPATIAL_t *SrcSpatial_p = st_ivas->hBinRendererTd->Sources[nS]->SrcSpatial_p;
                    fixedToFloat_arrL( SrcSpatial_p->Pos_p_fx, SrcSpatial_p->Pos_p, Q31, 3 );
                    fixedToFloat_arrL( SrcSpatial_p->Front_p_fx, SrcSpatial_p->Front_p, Q30, 3 );
                    SrcSpatial_p->DirAtten.ConeInnerAngle = fix_to_float( SrcSpatial_p->DirAtten.ConeInnerAngle_fx, Q22 );
                    SrcSpatial_p->DirAtten.ConeOuterAngle = fix_to_float( SrcSpatial_p->DirAtten.ConeOuterAngle_fx, Q22 );
                    SrcSpatial_p->DirAtten.ConeOuterGain = fix_to_float( SrcSpatial_p->DirAtten.ConeOuterGain_fx, Q30 );
                }
#endif
#else
@@ -2367,10 +2299,41 @@ ivas_error ivas_init_decoder_fx(
        IF ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->ism_mode == ISM_MASA_MODE_DISC )
        {
            /* Allocate TD renderer for the objects in DISC mode */
#ifdef IVAS_FLOAT_FIXED
            Word16 SrcInd[MAX_NUM_TDREND_CHANNELS];
            Word16 num_src;
            IF((error = ivas_td_binaural_open_fx(st_ivas, SrcInd, &num_src)) != IVAS_ERR_OK)
            {
                return error;
            }
#if 1 // Cleanup changes for ivas_td_binaural_open: fixed to float
            Word16 nchan_rend = num_src;
            IF(EQ_16(st_ivas->ivas_format, MC_FORMAT) && NE_16(st_ivas->transport_config, IVAS_AUDIO_CONFIG_LS_CUSTOM))
            {
                nchan_rend--; /* Skip LFE channel -- added to the others */
            }
            FOR(Word16 nS = 0; nS < nchan_rend; nS++)
            {
                TDREND_SRC_t *Src_p = st_ivas->hBinRendererTd->Sources[SrcInd[nS]];
                IF(Src_p->SrcSpatial_p != NULL)
                {
                    FOR(Word16 nC = 0; nC < SPAT_BIN_MAX_INPUT_CHANNELS; nC++)
                    {
                        fixedToFloat_arrL(Src_p->SrcSpatial_p->Pos_p_fx + nC * 3, Src_p->SrcSpatial_p->Pos_p + nC * 3, Q31, 3);
                        fixedToFloat_arrL(Src_p->SrcSpatial_p->Front_p_fx + nC * 3, Src_p->SrcSpatial_p->Front_p + nC * 3, Q30, 3);
                    }
                }
                TDREND_SRC_SPATIAL_t *SrcSpatial_p = st_ivas->hBinRendererTd->Sources[nS]->SrcSpatial_p;
                fixedToFloat_arrL(SrcSpatial_p->Pos_p_fx, SrcSpatial_p->Pos_p, Q31, 3);
                fixedToFloat_arrL(SrcSpatial_p->Front_p_fx, SrcSpatial_p->Front_p, Q30, 3);
            }
#endif
#else
            IF ( ( error = ivas_td_binaural_open( st_ivas ) ) != IVAS_ERR_OK )
            {
                return error;
            }
#endif

            /* Allocate 'hIsmRendererData' handle and memory for delay buffer within 'hMasaIsmData' */
            IF ( ( error = ivas_omasa_separate_object_renderer_open( st_ivas ) ) != IVAS_ERR_OK )
@@ -2412,10 +2375,41 @@ ivas_error ivas_init_decoder_fx(
        IF ( ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV ) && st_ivas->ism_mode == ISM_SBA_MODE_DISC )
        {
            /* Allocate TD renderer for the objects in DISC mode */
#ifdef IVAS_FLOAT_FIXED
            Word16 SrcInd[MAX_NUM_TDREND_CHANNELS];
            Word16 num_src;
            IF((error = ivas_td_binaural_open_fx(st_ivas, SrcInd, &num_src)) != IVAS_ERR_OK)
            {
                return error;
            }
#if 1 // Cleanup changes for ivas_td_binaural_open: fixed to float
            Word16 nchan_rend = num_src;
            IF(EQ_16(st_ivas->ivas_format, MC_FORMAT) && NE_16(st_ivas->transport_config, IVAS_AUDIO_CONFIG_LS_CUSTOM))
            {
                nchan_rend--; /* Skip LFE channel -- added to the others */
            }
            FOR(Word16 nS = 0; nS < nchan_rend; nS++)
            {
                TDREND_SRC_t *Src_p = st_ivas->hBinRendererTd->Sources[SrcInd[nS]];
                IF(Src_p->SrcSpatial_p != NULL)
                {
                    FOR(Word16 nC = 0; nC < SPAT_BIN_MAX_INPUT_CHANNELS; nC++)
                    {
                        fixedToFloat_arrL(Src_p->SrcSpatial_p->Pos_p_fx + nC * 3, Src_p->SrcSpatial_p->Pos_p + nC * 3, Q31, 3);
                        fixedToFloat_arrL(Src_p->SrcSpatial_p->Front_p_fx + nC * 3, Src_p->SrcSpatial_p->Front_p + nC * 3, Q30, 3);
                    }
                }
                TDREND_SRC_SPATIAL_t *SrcSpatial_p = st_ivas->hBinRendererTd->Sources[nS]->SrcSpatial_p;
                fixedToFloat_arrL(SrcSpatial_p->Pos_p_fx, SrcSpatial_p->Pos_p, Q31, 3);
                fixedToFloat_arrL(SrcSpatial_p->Front_p_fx, SrcSpatial_p->Front_p, Q30, 3);
            }
#endif
#else
            IF ( ( error = ivas_td_binaural_open( st_ivas ) ) != IVAS_ERR_OK )
            {
                return error;
            }
#endif
        }
    }

+0 −28
Original line number Diff line number Diff line
@@ -619,30 +619,13 @@ static ivas_error ivas_ism_bitrate_switching_dec(
            /* Open the TD Binaural renderer */
            if ( st_ivas->hHrtfTD == NULL || st_ivas->hBinRendererTd == NULL )
            {
#if 1 /*Cleanup changes: float to fixed */
                Word16 SrcInd[MAX_NUM_TDREND_CHANNELS];
                Word16 num_src;
                FOR( Word16 i = 0; i < 4; i++ )
                {
                    st_ivas->hRenderConfig->directivity_fx[i * 3] = (Word16)floatToFixed( st_ivas->hRenderConfig->directivity[i * 3], 6 );
                    st_ivas->hRenderConfig->directivity_fx[i * 3 + 1] = (Word16)floatToFixed( st_ivas->hRenderConfig->directivity[i * 3 + 1], 6 );
                    st_ivas->hRenderConfig->directivity_fx[i * 3 + 2] = (Word16)floatToFixed( st_ivas->hRenderConfig->directivity[i * 3 + 2], 15 );
                }
#endif
                IF ( ( error = ivas_td_binaural_open_fx( st_ivas , SrcInd, &num_src ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
#if 1 // Cleanup changes for ivas_td_binaural_open: fixed to float
                fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Pos_fx, st_ivas->hBinRendererTd->Listener_p->Pos, st_ivas->hBinRendererTd->Listener_p->Pos_q, 3 );
                fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Vel_fx, st_ivas->hBinRendererTd->Listener_p->Vel, Q30, 3 );
                fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Front_fx, st_ivas->hBinRendererTd->Listener_p->Front, Q30, 3 );
                fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Up_fx, st_ivas->hBinRendererTd->Listener_p->Up, Q30, 3 );
                fixedToFloat_arrL( st_ivas->hBinRendererTd->Listener_p->Right_fx, st_ivas->hBinRendererTd->Listener_p->Right, Q30, 3 );
                TDREND_DirAtten_t *DirAtten_p = st_ivas->hBinRendererTd->DirAtten_p;
                DirAtten_p->ConeInnerAngle = fix_to_float( DirAtten_p->ConeInnerAngle_fx, Q22 );
                DirAtten_p->ConeOuterAngle = fix_to_float( DirAtten_p->ConeOuterAngle_fx, Q22 );
                DirAtten_p->ConeOuterGain = fix_to_float( DirAtten_p->ConeOuterGain_fx, Q30 );
                Word16 nchan_rend = num_src;
                IF( EQ_16( st_ivas->ivas_format, MC_FORMAT ) && NE_16( st_ivas->transport_config, IVAS_AUDIO_CONFIG_LS_CUSTOM ) )
                {
@@ -653,26 +636,15 @@ static ivas_error ivas_ism_bitrate_switching_dec(
                    TDREND_SRC_t *Src_p = st_ivas->hBinRendererTd->Sources[SrcInd[nS]];
                    IF( Src_p->SrcSpatial_p != NULL )
                    {
                        Src_p->SrcSpatial_p->DirAtten.ConeInnerAngle = 360.0f;
                        Src_p->SrcSpatial_p->DirAtten.ConeOuterAngle = 360.0f;
                        Src_p->SrcSpatial_p->DirAtten.ConeOuterGain = 1.0f;
                        FOR( Word16 nC = 0; nC < SPAT_BIN_MAX_INPUT_CHANNELS; nC++ )
                        {
                            fixedToFloat_arrL( Src_p->SrcSpatial_p->Pos_p_fx + nC * 3, Src_p->SrcSpatial_p->Pos_p + nC * 3, Q31, 3 );
                            fixedToFloat_arrL( Src_p->SrcSpatial_p->Front_p_fx + nC * 3, Src_p->SrcSpatial_p->Front_p + nC * 3, Q30, 3 );
                        }
                    }
                    FOR( Word16 nC = 0; nC < SPAT_BIN_MAX_INPUT_CHANNELS; nC++ )
                    {
                        Src_p->SrcRend_p->SrcGainMin_p[nC] = 0.0f;
                        Src_p->SrcRend_p->SrcGainMax_p[nC] = 1.0f;
                    }
                    TDREND_SRC_SPATIAL_t *SrcSpatial_p = st_ivas->hBinRendererTd->Sources[nS]->SrcSpatial_p;
                    fixedToFloat_arrL( SrcSpatial_p->Pos_p_fx, SrcSpatial_p->Pos_p, Q31, 3 );
                    fixedToFloat_arrL( SrcSpatial_p->Front_p_fx, SrcSpatial_p->Front_p, Q30, 3 );
                    SrcSpatial_p->DirAtten.ConeInnerAngle = fix_to_float( SrcSpatial_p->DirAtten.ConeInnerAngle_fx, Q22 );
                    SrcSpatial_p->DirAtten.ConeOuterAngle = fix_to_float( SrcSpatial_p->DirAtten.ConeOuterAngle_fx, Q22 );
                    SrcSpatial_p->DirAtten.ConeOuterGain = fix_to_float( SrcSpatial_p->DirAtten.ConeOuterGain_fx, Q30 );
                }
#endif

+99 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading