Commit e7c593a6 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

Merge remote-tracking branch 'origin/float-pc' into...

Merge remote-tracking branch 'origin/float-pc' into 1600_ref_mc_encoder_crashes_with_br_and_bw_switching
parents 0f943250 c2bd34bb
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -272,7 +272,11 @@ void tcx_hm_modify_envelope(
    const int16_t L_frame /* i  : number of spectral lines              */
)
{
#ifdef FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI
    int32_t k, h, x;
#else
    int16_t k, h, x;
#endif
    Word16 inv_shape[2 * kTcxHmParabolaHalfWidth + 1]; /* Q15 */

    if ( gain == 0 )
+3 −0
Original line number Diff line number Diff line
@@ -1216,6 +1216,9 @@ enum
#define MASA_BIT_REDUCT_PARAM                   10
#define MASA_MAXIMUM_TWO_DIR_BANDS              24
#define NBITS_HR_COH                            4
#ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS
#define OMASA_TDREND_MATCHING_GAIN              0.7943f
#endif

#define MASA_JBM_RINGBUFFER_FRAMES              3

+6 −4
Original line number Diff line number Diff line
@@ -202,12 +202,14 @@
#define NONBE_FIX_947_STEREO_DMX_EVS_POC                      /* Orange: Fix clicks on POC */
#define NONBE_FIX_947_STEREO_DMX_EVS_PHA                      /* Orange: Fix issues on PHA */
#define NONBE_FIX_951_MCMASA_5MS_RENDERING                    /* Nokia: issue #951: Differences for 5ms and 20ms rendering for McMASA at 13.2kbps to BINAURAL */


#define NONBE_FIX_979_OSBA_STEREO_5MS                   /* FhG : issue #979 : 5ms and 20ms output different for OSBA and stereo */
#define FIX_983_DISC_ISM_DIGEST_NUM_OBJS                /* FhG: issue #983: the discrete ISM digest function uses the wrong number of objects */
#define FIX_ACCESS_WITHIN_NULL_STRUCT_MC_BW_SWITCHING   /* FhG: fix usan error in MCT with bw swicthing */
#define NONBE_FIX_986_MC_BW_SWITCHING                         /* FhG: fix crash in bw and br switching with MC */
#define FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI          /* FhG: fix and undef behaviour bug in the harmonic TCX model arithmetic coder */
#define NONBE_FIX_974_OSBA_JBM_MONO_RS_USAN             /* FhG : issue #974: usan in mono and stereo output in OSBA JBM RS */
#define NONBE_FIX_982_OMASA_DELAY_COMP_5MS               /* FhG : issue #982 : 5ms and 20ms output different for OMASA */
#define NONBE_FIX_979_OSBA_STEREO_5MS                    /* FhG : issue #979 : 5ms and 20ms output different for OSBA and stereo */
#define FIX_983_DISC_ISM_DIGEST_NUM_OBJS                 /* FhG: issue #983: the discrete ISM digest function uses the wrong number of objects */


/* #################### End BASOP porting switches ############################ */

+2 −0
Original line number Diff line number Diff line
@@ -524,6 +524,7 @@ void ivas_omasa_separate_object_render_jbm(
    for ( obj = 0; obj < num_objects; obj++ )
    {
        /* Delay the signal to match CLDFB delay. Delay the whole buffer with the first rendering call of the stretched buffer. */
#ifndef NONBE_FIX_982_OMASA_DELAY_COMP_5MS
        if ( slots_rendered == 0 )
        {
            int16_t tcBufferSize;
@@ -531,6 +532,7 @@ void ivas_omasa_separate_object_render_jbm(
            tcBufferSize = hSpatParamRendCom->num_slots * hSpatParamRendCom->slot_size;
            delay_signal( input_f[obj], tcBufferSize, st_ivas->hMasaIsmData->delayBuffer[obj], st_ivas->hMasaIsmData->delayBuffer_size );
        }
#endif
        offsetSamples = 0;

        for ( subframe_idx = first_sf; subframe_idx < last_sf; subframe_idx++ )
+26 −0
Original line number Diff line number Diff line
@@ -892,6 +892,32 @@ void ivas_jbm_dec_feed_tc_to_renderer(
        {
            ivas_ism_dec_digest_tc( st_ivas );
        }

#ifdef NONBE_FIX_982_OMASA_DELAY_COMP_5MS
        if ( st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC || st_ivas->renderer_type == RENDERER_DIRAC )
        {
            int16_t num_objects;

            /* Delay the signal to match CLDFB delay. Delay the whole buffer. */
            num_objects = 0;
            if ( ( st_ivas->ism_mode == ISM_MASA_MODE_MASA_ONE_OBJ || st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ ) && st_ivas->renderer_type != RENDERER_BINAURAL_PARAMETRIC )
            {
                num_objects = 1;
            }
            else if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC )
            {
                num_objects = st_ivas->nchan_ism;
            }
            for ( n = 0; n < num_objects; n++ )
            {
                if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC && st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC )
                {
                    v_multc( st_ivas->hTcBuffer->tc[CPE_CHANNELS + n], OMASA_TDREND_MATCHING_GAIN, st_ivas->hTcBuffer->tc[CPE_CHANNELS + n], st_ivas->hTcBuffer->n_samples_available );
                }
                delay_signal( st_ivas->hTcBuffer->tc[CPE_CHANNELS + n], st_ivas->hTcBuffer->n_samples_available, st_ivas->hMasaIsmData->delayBuffer[n], st_ivas->hMasaIsmData->delayBuffer_size );
            }
        }
#endif
    }
    else if ( st_ivas->ivas_format == MC_FORMAT )
    {
Loading