Commit c6b073fb authored by emerit's avatar emerit
Browse files

Merge branch 'main' into 744-fix-sofa-to-rom-tables-and-binaural-binary-files

parents 2b9d7745 e5a2a984
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -170,6 +170,7 @@
#define FIX_632_USAN_ERROR_NULL_POINTER                 /* FhG: issue 632 USAN offset to null pointer proto_diffuse_buffer_f in dirac rendering*/
#define FIX_759_CODE_COVERAGE_OSBA                      /* VA: issue 759: remove obsolete code in the OSBA encoder */
#define FIX_708_AEID_COMMAND_LINE                       /* VA: issue 708: improve AEID command-line robustness */
#define FIX_513_REND_MC_ALLOC                           /* FhG: issue 513, optimise external renderer allocation for multichannel */
#define FIX_518_ISM_BRIR_EXTREND                        /* FhG: fix issue #518, cleanup ISM to BINAURAL_ROOM_IR rendering in the external renderer */
#define FIX_764_HARM_CODE                               /* VA: issue 764: introduce new function for the same code block at four different places */
#define FIX_747_ISM_TODOS                               /* VA: issue 747 - address ISM ToDos */
@@ -183,6 +184,8 @@
#define FIX_803_SCE_MD_HANDLE                           /* VA: issue 803: Resolve "MD handle needed only for one SCE" */
#define FIX_812_DOUBLE_PREC_MCT                         /* FhG: Issue 812: Avoid double precision in MCT */
#define FIX_807_VARIABLE_SPEED_DECODING                 /* FhG: Issue 807: Resolve "Variable Speed Decoding broken" */
#define FIX_818_DOUBLE_PREC_KERNEN_SW                   /* FhG: Issue 818: Avoid double precision in kernel switching */


#define FIX_INV_DIFFUSE_WEIGHT                          /* Orange : Fix error in energy compensation in late binaural reverb*/
#define FIX_638_ENERGIE_IAC_ROM_TABLES                  /* Missing left/right and coherence late reverb tables in binary format*/
@@ -216,11 +219,14 @@
#define NONBE_FIX_738_SBA_BR_SW_ASAN                          /* FhG: issue 738: fixes bug when switching to an MCT bitrate and previous frame was ACELP */
#define NONBE_CR_FIX_735_SBA_HP20_BRATE_SWITCHING             /* VA: Issue 735: Resolve "HP20 filtering bug in SBA/OSBA bitrate switching" */
#define NONBE_FIX_588_UPDATE_FASTCONV_SD                      /* FhG: issue 588: update FastConv SD HRTFs in CLDFB domain with new conversion method */
#define NONBE_FIX_774_OSBA_MONO_DEC_CRASH                     /* FhG: issue 774: decoder crash for OSBA to mono */
#define NONBE_FIX_802_PARAMUPMIX_HIGHPASS                     /* Dlb: issue 802: Move HighPass filter operation for ParamUpmix */
#define NONBE_FIX_778_TNS_UNFIED_STEREO_MSAN                  /* FhG: Issue 778: MSAN error due to uninitialized TNS configuration */
#define NONBE_FIX_797_OMASA_INACTIVE_SEP_OBJ                 /* VA: issue 797:  fix of crash when the separated object is inactive and the MASA metadata is using very few bits */
#define NONBE_FIX_798_OSBA_MC_DEC_CRASH
#define NONBE_FIX_806_OMASA_ONE_SEP_TRANSPORT_MIX             /* Nokia: issue 806: fix one separated object mode transport mix of the separated object */
#define NONBE_FIX_809_EXTERNAL_TARGET_INTERPOLATION           /* FhG: issue 809: unify external target interpolation inter and intra frame behaviour */
#define NONBE_FIX_775_OSBA_BR_SWITCHING_CRASH                 /* FhG: issue 775: fix crash in OSBA with bitrate switching and output order lower than input order */

#define JBM_FOR_OSBA                                          /* FhG: implement OSBA format in the JBM path */

+22 −1
Original line number Diff line number Diff line
@@ -68,9 +68,13 @@ ivas_error ivas_mono_dmx_renderer_open(
        return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for downmixing\n" ) );
    }

#ifdef NONBE_FIX_774_OSBA_MONO_DEC_CRASH
    hDownmix->inputEnergy = 0;
    hDownmix->protoEnergy = 0;
#else
    set_zero( hDownmix->inputEnergy, CLDFB_NO_CHANNELS_MAX );
    set_zero( hDownmix->protoEnergy, CLDFB_NO_CHANNELS_MAX );

#endif
    st_ivas->hMonoDmxRenderer = hDownmix;

    return IVAS_ERR_OK;
@@ -121,19 +125,36 @@ void ivas_mono_downmix_render_passive(
    }

    /* compute the input energy, proto energy after smoothing */
#ifdef NONBE_FIX_774_OSBA_MONO_DEC_CRASH
    hDownmix->inputEnergy *= DOWNMIX_ALPHA;
    hDownmix->protoEnergy *= DOWNMIX_ALPHA;
#else
    hDownmix->inputEnergy[0] *= DOWNMIX_ALPHA;
    hDownmix->protoEnergy[0] *= DOWNMIX_ALPHA;
#endif
    for ( i = 0; i < output_frame; i++ )
    {
#ifdef NONBE_FIX_774_OSBA_MONO_DEC_CRASH
        hDownmix->protoEnergy += proto_signal[i] * proto_signal[i];
#else
        hDownmix->protoEnergy[0] += proto_signal[i] * proto_signal[i];
#endif
        for ( j = 0; j < numInputChannels; j++ )
        {
#ifdef NONBE_FIX_774_OSBA_MONO_DEC_CRASH
            hDownmix->inputEnergy += ( output_f[j][i] * output_f[j][i] );
#else
            hDownmix->inputEnergy[0] += ( output_f[j][i] * output_f[j][i] );
#endif
        }
    }

    /* compute the eq factor */
#ifdef NONBE_FIX_774_OSBA_MONO_DEC_CRASH
    eq = min( DOWNMIX_MAX_GAIN, sqrtf( hDownmix->inputEnergy / ( EPSILON + hDownmix->protoEnergy ) ) );
#else
    eq = min( DOWNMIX_MAX_GAIN, sqrtf( hDownmix->inputEnergy[0] / ( EPSILON + hDownmix->protoEnergy[0] ) ) );
#endif

    /* equalize the downmix */
    v_multc( proto_signal, eq, output_f[0], output_frame );
+27 −0
Original line number Diff line number Diff line
@@ -479,6 +479,12 @@ ivas_error ivas_sba_dec_reconfigure(

        ivas_dirac_config_bands( band_grouping, IVAS_MAX_NUM_BANDS, (int16_t) ( st_ivas->hDecoderConfig->output_Fs * INV_CLDFB_BANDWIDTH + 0.5f ),
                                 st_ivas->hSpar->dirac_to_spar_md_bands, st_ivas->hQMetaData->useLowerBandRes, st_ivas->hSpar->enc_param_start_band, 0 );
#ifdef NONBE_FIX_775_OSBA_BR_SWITCHING_CRASH
        if ( st_ivas->hDirAC )
        {
            st_ivas->hDirAC->hConfig->enc_param_start_band = st_ivas->hSpar->enc_param_start_band;
        }
#endif
    }
#endif

@@ -526,6 +532,27 @@ ivas_error ivas_sba_dec_reconfigure(
                }
            }

#ifdef NONBE_FIX_774_OSBA_MONO_DEC_CRASH
            if ( st_ivas->renderer_type == RENDERER_MONO_DOWNMIX )
            {
                if ( st_ivas->hMonoDmxRenderer == NULL )
                {
                    if ( ( error = ivas_mono_dmx_renderer_open( st_ivas ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }
                }
            }
            else
            {
                if ( st_ivas->hMonoDmxRenderer != NULL )
                {
                    free( st_ivas->hMonoDmxRenderer );
                    st_ivas->hMonoDmxRenderer = NULL;
                }
            }
#endif

            if ( st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV )
            {
                /* Allocate TD renderer for the objects in DISC mode */
+8 −0
Original line number Diff line number Diff line
@@ -228,7 +228,11 @@ static void kernel_switch_trafo(

    edxt( inputBuffer, y, l / 2 + m + r / 2, kernelType, FALSE );

#ifdef FIX_818_DOUBLE_PREC_KERNEL_SW
    v_multc( y, sqrtf( (float) NORM_MDCT_FACTOR / ( l / 2 + m + r / 2 ) ), y, l / 2 + m + r / 2 );
#else
    v_multc( y, (float) sqrt( (float) NORM_MDCT_FACTOR / ( l / 2 + m + r / 2 ) ), y, l / 2 + m + r / 2 );
#endif

    return;
}
@@ -277,7 +281,11 @@ static void kernel_switch_update_transforms(

        edxt( windowedTimeSignal, sigR, s, kernelType, FALSE );

#ifdef FIX_818_DOUBLE_PREC_KERNEL_SW
        v_multc( sigR, sqrtf( (float) NORM_MDCT_FACTOR / s ), sigR, s );
#else
        v_multc( sigR, (float) sqrt( (float) NORM_MDCT_FACTOR / s ), sigR, s );
#endif
    }
    else /* 2 TCX5 subframes or 1 TCX10 or 1 transitory TCX20 */
    {
+17 −1
Original line number Diff line number Diff line
@@ -1362,8 +1362,24 @@ static void external_target_interpolation(
            {
                if ( i > 0 )
                {
#ifdef NONBE_FIX_809_EXTERNAL_TARGET_INTERPOLATION
                    if ( hExtOrientationData->enableExternalOrientation[i - 1] == 0 )
                    {
                        IVAS_QUATERNION identity;
                        identity.w = 1.0f;
                        identity.x = identity.y = identity.z = 0.0f;
                        hCombinedOrientationData->Quaternions_ext_interpolation_start = identity;
                    }
                    else if ( hExtOrientationData->enableExternalOrientation[i - 1] == 2 )
                    {
                        hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_frozen_ext;
                    }
                    else
#endif
                    {
                        hCombinedOrientationData->Quaternions_ext_interpolation_start = hExtOrientationData->Quaternions[i - 1];
                    }
                }
                else
                {
                    hCombinedOrientationData->Quaternions_ext_interpolation_start = hCombinedOrientationData->Quaternion_prev_extOrientation;
Loading