Commit 191018ab authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/ivas-float-update' into 1902-ref-PortFlpMr1832

parents 9f4de62b 1f404724
Loading
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -1081,7 +1081,18 @@ int main(
            fprintf( stderr, "\nFailed to read renderer configuration from file %s\n", args.renderConfigFilePath );
            goto cleanup;
        }

#ifdef NONBE_FIX_1337_MISSING_DIRECTIVITY_DISTATT_EXTREND
        if ( ( error = RenderConfigReader_getDirectivity( renderConfigReader, args.directivityPatternId, renderConfig.directivity ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "Failed to get directivity patterns for one or more of IDs: %d %d %d %d\n\n", args.directivityPatternId[0], args.directivityPatternId[1], args.directivityPatternId[2], args.directivityPatternId[3] );
            goto cleanup;
        }
        if ( ( error = RenderConfigReader_getDistanceAttenuation( renderConfigReader, renderConfig.distAtt ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "Failed to get Distance Attenuation \n\n" );
            goto cleanup;
        }
#endif
        if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
#ifdef FIX_1053_REVERB_RECONFIGURATION
+6 −0
Original line number Diff line number Diff line
@@ -182,10 +182,13 @@
#define NONBE_1329_FIX_OSBA_CRASH                       /* FhG: issue 1329: prevent assert when bit budget is low*/
#define NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER            /* FhG: issue 1128: set output ambisonics order to input order for EXT output  */
#define FIX_1138_SBA_EXT_ERROR_PRINTOUT                 /* VA: issue 1138: Fix SBA EXT output call of audioCfg2channels() */
#define NONBE_1244_FIX_SWB_BWE_MEMORY                   /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ 
#define NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART             /* Nokia: Set default early part energy correction to unity for BINAURAL_ROOM_REVERB */
#define NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR            /* Nokia: Fix issue 1174 by removing the unnecessary inner loop causing problems. */
#define NONBE_FIX_1097_SBA_DTX_BRATE_SWITCHING_ENC      /* FhG: fix out-of-bound errors when switching from SID frame to active frame*/
#define NONBE_FIX_1052_SBA_EXT_FIX                      /* VA: SBA external output support fix - do not overwrite "output_config" parameter */

#define NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION    /* Ericsson: Issue 1196, Always apply filter interpolation for each subframe */
#define FIX_1113_CLDFB_REND_IN_ISAR                     /* issue 1113: fix the use of CLDFB renderer in split-rendering at the external renderer */
#define NONBE_FIX_1110_STEREO_DTX_BRATE_SWITCHING       /* VA: issue 1110: fix encoder crash in the stereo DTX bitrate switching condition */
#define FIX_1099_JBM_MD_HANDLE_ALLOC                    /* VA: issue 1099: Limit the allocation of `hJbmMetadata` handle to MASA and OMASA only */
@@ -199,7 +202,10 @@
#define FIX_1158_FASTCONV_REVERB_HRTF                   /* Philips: issue 1158: Rendering with FastConv to BINAURAL_ROOM_REVERB uses BRIR convolution instead of HRTF */
#define NONBE_FIX_1176_OSBA_REVERB_JBM_ASAN_ERROR       /* Ericsson: Issue 1176, fix in TDREND_firfilt for subframes shorter than the filter length */
#define NONBE_1131_ACELP_OOB                            /* VA: issue 1131: fix division-by-zero in acelp gain decoding caused by wrong length of buffer update when switching from HQ core to ACELP core */
#define NONBE_1240_FIX_CORE_SELECTION_ISM_SW            /* VA: issue 1240: Remove the forcing of the TCX core in ISM when switching from a high bitarte to a low one */
#define FIX_1101_CLEANING_JBM_CALL                      /* VA: issue 1101: remove obsolete call of ivas_jbm_dec_tc_buffer_open() */
#define NONBE_FIX_1337_MISSING_DIRECTIVITY_DISTATT_EXTREND /* Eri: issue 1337: Missing directivity setting and distance attenuation in external renderer IVAS_rend */
#define FIX_1348_OVERFLOW                               /* FhG: fix BASOP overflow in hq_lr_dec(), brings floating-point code inline with FX */

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

+8 −0
Original line number Diff line number Diff line
@@ -260,7 +260,15 @@ void hq_lr_dec(
        frac1 = L_Extract_lc( L_tmp, &exp ); /* Extract exponent of L_tmp */
        L_tmp = Pow2( 30, frac1 );
        exp = sub( exp, 30 );
#ifdef FIX_1348_OVERFLOW
#ifdef BASOP_NOGLOB
        Ep_fx[i] = L_shl_o( L_tmp, s_max( sub( exp, 6 ), -31 ), &Overflow ); /* Q -6 */
#else
        Ep_fx[i] = L_shl( L_tmp, s_max( sub( exp, 6 ), -31 ) ); /* Q -6 */
#endif
#else
        Ep_fx[i] = L_shl( L_tmp, sub( exp, 6 ) ); /* Q -6 */
#endif
        Ep[i] = (float) ( Ep_fx[i] / pow( 2.0, -6 ) );
    }

+5 −0
Original line number Diff line number Diff line
@@ -204,7 +204,12 @@ ivas_error ivas_td_binaural_renderer_sf(
        /* Render subframe */
        /* ism_md_subframe_update_jbm != subframe_idx: trigger update only for ism_md_subframe_update_jbm == subframe_idx,
           where then the two TDREND_GetMix()-arguments subframe_idx and ism_md_subframe_update are equal, and we want to enforce the update inside TDREND_GetMix to use subframe_idx == 0 */

#ifdef NONBE_FIX_1196_TD_HEADTRACKING_INTERPOLATION
        if ( ( error = TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0 ) ) != IVAS_ERR_OK )
#else
        if ( ( error = TDREND_GetMix( st_ivas->hBinRendererTd, output_f_local, output_frame, 0, ism_md_subframe_update_jbm != subframe_idx ) ) != IVAS_ERR_OK )
#endif
        {
            return error;
        }
+5 −0
Original line number Diff line number Diff line
@@ -183,7 +183,12 @@ void ivas_decision_matrix_enc(
        st->core = ACELP_CORE;
    }

#ifdef NONBE_1240_FIX_CORE_SELECTION_ISM_SW
    /* sanity check: highest bitrates in ISM */
    if ( st->is_ism_format && st->tcxonly && st->total_brate > MAX_ACELP_BRATE_ISM )
#else
    if ( st->is_ism_format && st->tcxonly )
#endif
    {
        st->core = TCX_20_CORE;
    }
Loading