Commit 4c51a2bc authored by sagnowski's avatar sagnowski
Browse files

Merge branch 'main' into 2102_basop_split-rendering-in-voip-mode

parents 4020bf71 cede165d
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -123,6 +123,7 @@
#define NONBE_1359_FIX_IVASREND_OMASA_BINAURAL_LOUDNESS /* Nokia: issue 1339: Apply scaling to the object-part of OMASA for binaural rendering in IVAS_rend. */
#define NONBE_1362_FIX_OMASA_TO_MASA1_RENDERING         /* Nokia: Fix OMASA to MASA1 rendering in IVAS_rend */
#define FIX_1383_HEAD_TRACK_SANITIZER                   /* Nok: issue 1383: Fix head tracking struc values reading in renderer */
#define FIX_1411_IGF_CRASH_BW_SWITCHING                 /* FhG: Fix for issue 1411: fixes crash that can happen for IGF with BW switching and DTX*/

// object-editing feature porting
#define TMP_FIX_SPLIT_REND                              // temporary fix to split-rendering (it follows the later state of the framework but it is needed now because of current test-conditions)
+57 −38
Original line number Diff line number Diff line
@@ -988,6 +988,12 @@ ivas_error ivas_cpe_enc_fx(
     * Core codec configuration
     *----------------------------------------------------------------*/

#ifdef FIX_1411_IGF_CRASH_BW_SWITCHING
    test();
    test();
    IF( NE_32( sts[0]->core_brate, SID_2k40 ) && NE_32( sts[0]->core_brate, FRAME_NO_DATA ) ) /* Reconfigurations not needed with DTX*/
    {
#endif
        test();
        IF( EQ_16( hCPE->element_mode, IVAS_CPE_MDCT ) && st_ivas->hMCT == NULL )
        {
@@ -1006,6 +1012,7 @@ ivas_error ivas_cpe_enc_fx(
                test();
                test();
                hCPE->hStereoMdct->isSBAStereoMode = ( ( EQ_16( ivas_format, SBA_FORMAT ) || EQ_16( ivas_format, SBA_ISM_FORMAT ) ) && ( EQ_16( st_ivas->nchan_transport, 2 ) ) ); /* Q0 */
                move16();

                test();
                IF( LE_32( hCPE->element_brate, MAX_MDCT_ITD_BRATE ) && EQ_16( ivas_format, STEREO_FORMAT ) )
@@ -1027,18 +1034,27 @@ ivas_error ivas_cpe_enc_fx(
            test();
            test();
            test();
#ifdef FIX_1411_IGF_CRASH_BW_SWITCHING
            test();
            test();
            IF( ( NE_32( hCPE->last_element_brate, hCPE->element_brate ) || NE_16( hCPE->element_mode, hCPE->last_element_mode ) || ( EQ_16( hCPE->element_mode, IVAS_CPE_TD ) && NE_16( sts[0]->bits_frame_nominal, last_bits_frame_nominal ) ) || NE_16( sts[n]->last_bwidth, sts[n]->bwidth ) || EQ_32( sts[n]->last_core_brate, SID_2k40 ) || EQ_32( sts[n]->last_core_brate, FRAME_NO_DATA ) ) && ( EQ_16( n, 0 ) || EQ_16( hCPE->element_mode, IVAS_CPE_MDCT ) ) )
#else
        IF( ( NE_32( hCPE->last_element_brate, hCPE->element_brate ) || NE_16( hCPE->element_mode, hCPE->last_element_mode ) || ( EQ_16( hCPE->element_mode, IVAS_CPE_TD ) && NE_16( sts[0]->bits_frame_nominal, last_bits_frame_nominal ) ) || NE_16( sts[n]->last_bwidth, sts[n]->bwidth ) ) && ( n == 0 || EQ_16( hCPE->element_mode, IVAS_CPE_MDCT ) ) )
#endif
            {
                Word16 igf;
                Word16 bw;

                /* float uses ternary operator for this: bw = ( hCPE->element_mode == IVAS_CPE_MDCT ) ? sts[n]->bwidth : sts[n]->max_bwidth; */
                bw = max_bwidth;
                move16();
                IF( EQ_16( hCPE->element_mode, IVAS_CPE_MDCT ) )
                {
                    bw = sts[n]->bwidth;
                    move16();
                }
                igf = getIgfPresent_fx( sts[n]->element_mode, L_mult0( sts[n]->bits_frame_nominal, FRAMES_PER_SEC ), bw, sts[n]->rf_mode ); /* Q0 */
                move16();
#ifdef FIX_1413_IGF_INIT_PRINTOUT
                IF( ( error = IGF_Reconfig_fx( &sts[n]->hIGFEnc, igf, 0, L_mult0( sts[n]->bits_frame_nominal, FRAMES_PER_SEC ), bw, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK )
#else
@@ -1050,6 +1066,9 @@ ivas_error ivas_cpe_enc_fx(
                }
            }
        }
#ifdef FIX_1411_IGF_CRASH_BW_SWITCHING
    }
#endif

    /* set ACELP@12k8 / ACELP@16k flag for flexible ACELP core */
    FOR( n = 0; n < n_CoreChannels; n++ )