Commit dc24cb33 authored by vaclav's avatar vaclav
Browse files

- Merge remote-tracking branch 'remotes/origin/main' into...

- Merge remote-tracking branch 'remotes/origin/main' into 2053-basop-PortMr2078-from-float-unnecessary-allocation-of-memories-for-channels-in-the-jbm-decoder
parents e9646cab 6b98c8e2
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -79,6 +79,8 @@
#define FIX_2092_ASSERT_IN_OMASA_RENDER                      /* FhG, Nokia: Fix LTV crash due to overflow in OMASA EXT output */
#define FIX_2084_FLOATING_POINT_LEFTOVERS                    /* FhG: convert floating-point leftovers in IVAS_ENC_FeedObjectMetadata() */
#define FIX_2141_ASSERT_IN_OMASA_BITRATE_SWITSCHING          /* FhG: Replace L_shl with L_shl_sat to prevent overflow when calculating scale factors for very small numbers in the logarithmic domain */
#define FIX_APA_EXECS_SCALING                                /* VA: fix scaling of JBM APA buffer */

/* ################### End FIXES switches ########################### */

/* #################### Start BASOP porting switches ############################ */
@@ -115,6 +117,7 @@
#define FIX_RENDERER_STACK                              /* VA: issue 1322: reduction of renderers' buffers size */
#define JBM_MEMORY_OPT                                  /* VA: issue 916: optimization of RAM in the JBM decoder */
#define FIX_1370_EXTERNAL_ORIENTATION_CHECK             /* Nokia: add sanity check for Euler angles for external orientations */
#define NONBE_FIX_1197_OMASA_META_BUFFER                /* Nokia: OMASA ISM_MASA_MODE_PARAM_ONE_OBJ history zero in rateswitching - port 251 */


// object-editing feature porting
+19 −0
Original line number Diff line number Diff line
@@ -662,6 +662,25 @@ ivas_error ivas_omasa_dec_config_fx(
            ivas_omasa_separate_object_renderer_close( st_ivas );
        }

#ifdef NONBE_FIX_1197_OMASA_META_BUFFER
        test();
        IF( EQ_32( st_ivas->ism_mode, ISM_MASA_MODE_PARAM_ONE_OBJ ) && st_ivas->hMasaIsmData != NULL ) /* this structure is in use only in ISM_MASA_MODE_PARAM_ONE_OBJ */
        {
            MASA_ISM_DATA_HANDLE hMasaIsmData = st_ivas->hMasaIsmData;
            FOR( Word16 obj_idx = 0; obj_idx < MAX_NUM_OBJECTS; obj_idx++ )
            {
                set_s( hMasaIsmData->azimuth_ism_fx[obj_idx], 0, MAX_PARAM_SPATIAL_SUBFRAMES + DELAY_MASA_PARAM_DEC_SFR );
                set_s( hMasaIsmData->elevation_ism_fx[obj_idx], 0, MAX_PARAM_SPATIAL_SUBFRAMES + DELAY_MASA_PARAM_DEC_SFR );
                FOR( int16_t sf = 0; sf < MAX_PARAM_SPATIAL_SUBFRAMES + DELAY_MASA_PARAM_DEC_SFR; sf++ )
                {
                    set_l( hMasaIsmData->energy_ratio_ism_fx[obj_idx][sf], 0, CLDFB_NO_CHANNELS_MAX );
                }
            }
            set_s( hMasaIsmData->azimuth_separated_ism_fx, 0, MAX_PARAM_SPATIAL_SUBFRAMES + DELAY_MASA_PARAM_DEC_SFR );
            set_s( hMasaIsmData->elevation_separated_ism_fx, 0, MAX_PARAM_SPATIAL_SUBFRAMES + DELAY_MASA_PARAM_DEC_SFR );
        }
#endif

        IF( EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) )
        {
            IF( EQ_32( st_ivas->ism_mode, ISM_MASA_MODE_DISC ) )
+5 −5
Original line number Diff line number Diff line
@@ -912,7 +912,7 @@ UWord8 apa_exec_ivas_fx(
    Word16 Q_a_out;
    Word16 Q_a_out_init_old;

#ifdef JBM_MEMORY_OPT
#ifdef FIX_APA_EXECS_SCALING
    Q_a_out = add( getScaleFactor32_copy( a_in, l_in ), Q11 - Q16 - Q1 );
#else
    Q_a_out = add( getScaleFactor32_copy( a_in, L_mult0( ps->num_channels, APA_BUF_PER_CHANNEL ) ), Q11 - Q16 - Q1 );
@@ -993,7 +993,7 @@ UWord8 apa_exec_ivas_fx(
        Scale_sig( ps->buf_out_fx, ps->buf_out_capacity, sub( Q_a_out, ps->Q_buf_out ) ); // Q_buf_out -> Q_a_out
        IF( EQ_32( ps->scale, 100 ) )
        {
#ifdef JBM_MEMORY_OPT
#ifdef FIX_APA_EXECS_SCALING
            FOR( i = 0; i < ps->l_frm; i++ )
#else
            FOR( i = 0; i < ps->num_channels * APA_BUF_PER_CHANNEL; i++ )
@@ -1009,7 +1009,7 @@ UWord8 apa_exec_ivas_fx(
        {
            Word16 *frm_in_ptr = &( frm_in[ps->l_frm] );

#ifdef JBM_MEMORY_OPT
#ifdef FIX_APA_EXECS_SCALING
            FOR( i = 0; i < ps->l_frm; i++ )
#else
            FOR( i = 0; i < ps->num_channels * APA_BUF_PER_CHANNEL; i++ )
@@ -1063,8 +1063,8 @@ UWord8 apa_exec_ivas_fx(
                }
            }

#ifdef JBM_MEMORY_OPT
            FOR( i = 0; i < 2 * ps->l_frm; i++ )
#ifdef FIX_APA_EXECS_SCALING
            FOR( i = 0; i < l_frm_out; i++ )
#else
            FOR( i = 0; i < ps->num_channels * APA_BUF_PER_CHANNEL; i++ )
#endif