Commit f8dfb65a authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge remote-tracking branch 'origin/ivas-float-update' into...

Merge remote-tracking branch 'origin/ivas-float-update' into 2194_ref_port_float_MR2105_default_reverb_configuration
parents 895b3b62 02c20afa
Loading
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -1463,7 +1463,16 @@ int main(
            audioWriter = NULL;
        }

#ifdef FIX_1437_LC3PLUS_EXTREND_HIRES
        if ( ( error = IVAS_REND_GetSplitRendBitstreamHeader( hIvasRend,
                                                              &bitsBuffer.config.codec,
                                                              &bitsBuffer.config.poseCorrection,
                                                              &bitsBuffer.config.codec_frame_size_ms,
                                                              &bitsBuffer.config.isar_frame_size_ms,
                                                              &bitsBuffer.config.lc3plus_highres ) ) != IVAS_ERR_OK )
#else
        if ( ( error = IVAS_REND_GetSplitRendBitstreamHeader( hIvasRend, &bitsBuffer.config.codec, &bitsBuffer.config.poseCorrection, &bitsBuffer.config.codec_frame_size_ms, &bitsBuffer.config.isar_frame_size_ms ) ) != IVAS_ERR_OK )
#endif
        {
            fprintf( stderr, "\nError in IVAS_REND_GetSplitRendBitstreamHeader()!\n" );
            goto cleanup;
+1 −0
Original line number Diff line number Diff line
@@ -202,6 +202,7 @@
#define NONBE_1412_AVOID_ROUNDING_AZ_ELEV              /* FhG:  Avoid rounding when passing azimuth and elevation to efap_determine_gains() */
#define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS    /* FhG: fix non-BE in DFT stereo encoder between optimization levels */
#define NONBE_FIX_NONBE_BETWEEN_OPTIMIZATION_LEVELS_2  /* FhG: fix even more non-BEnesses */
#define FIX_1437_LC3PLUS_EXTREND_HIRES                  /* FhG: fix external renderer split bitstream header writing causing a crash for LC3plus High-res mode */
#define FIX_GAIN_EDIT_LIMITS                           /* Harmonize gain edit limits for all opertation points. For all modes, limit to max +12dB. For parametric modes, limit to min -24dB. */

// object-editing feature porting
+3 −0
Original line number Diff line number Diff line
@@ -1872,6 +1872,9 @@ ivas_error splitRendLc3plusEncodeAndWrite(
    pBits->pose_correction = hSplitBin->multiBinPoseData.poseCorrectionMode;
    pBits->codec_frame_size_ms = (int16_t) ( hSplitBin->hLc3plusEnc->config.lc3plus_frame_duration_us / 1000 );
    pBits->isar_frame_size_ms = (int16_t) ( hSplitBin->hLc3plusEnc->config.isar_frame_duration_us / 1000 );
#ifdef FIX_1437_LC3PLUS_EXTREND_HIRES
    pBits->lc3plus_highres = hSplitBin->hLc3plusEnc->config.high_res_mode_enabled;
#endif
    return IVAS_ERR_OK;
}

+12 −3
Original line number Diff line number Diff line
@@ -1632,6 +1632,7 @@ static ivas_error setRendInputActiveIsm(

    for ( i = 0; i < (int16_t) ( sizeof( inputIsm->splitTdRendWrappers ) / sizeof( *inputIsm->splitTdRendWrappers ) ); ++i )
    {
        inputIsm->splitTdRendWrappers[i] = defaultTdRendWrapper();
        inputIsm->splitTdRendWrappers[i].hHrtfTD = &hrtfs->hHrtfTD;
    }

@@ -2650,6 +2651,7 @@ static ivas_error setRendInputActiveMc(

    for ( i = 0; i < (int16_t) ( sizeof( inputMc->splitTdRendWrappers ) / sizeof( *inputMc->splitTdRendWrappers ) ); ++i )
    {
        inputMc->splitTdRendWrappers[i] = defaultTdRendWrapper();
        if ( hrtfs->hHrtfTD )
        {
            inputMc->splitTdRendWrappers[i].binaural_latency_ns = (int32_t) ( hrtfs->hHrtfTD->latency_s * 1000000000.f );
@@ -8276,9 +8278,13 @@ ivas_error IVAS_REND_GetSplitRendBitstreamHeader(
    IVAS_REND_HANDLE hIvasRend,                           /* i/o: IVAS renderer handle                                                     */
    ISAR_SPLIT_REND_CODEC *pCodec,                        /* o: pointer to codec setting                */
    ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection, /* o: pointer to pose correction mode                */
    int16_t *pCodec_frame_size_ms                         /* o: pointer to codec frame size setting     */
    ,
    int16_t *pIsar_frame_size_ms /* o: pointer to isar frame size setting     */
    int16_t *pCodec_frame_size_ms,                        /* o: pointer to codec frame size setting     */
#ifdef FIX_1437_LC3PLUS_EXTREND_HIRES
    int16_t *pIsar_frame_size_ms, /* o  : pointer to ISAR frame size setting      */
    int16_t *pLc3plusHighRes      /* o  : pointer to LC3plus High-Res setting     */
#else
    int16_t *pIsar_frame_size_ms /* o  : pointer to ISAR frame size setting      */
#endif
)
{
    if ( hIvasRend == NULL || hIvasRend->hRendererConfig == NULL )
@@ -8289,6 +8295,9 @@ ivas_error IVAS_REND_GetSplitRendBitstreamHeader(
    *pCodec_frame_size_ms = hIvasRend->hRendererConfig->split_rend_config.codec_frame_size_ms;
    *pIsar_frame_size_ms = hIvasRend->hRendererConfig->split_rend_config.isar_frame_size_ms;
    *poseCorrection = hIvasRend->hRendererConfig->split_rend_config.poseCorrectionMode;
#ifdef FIX_1437_LC3PLUS_EXTREND_HIRES
    *pLc3plusHighRes = hIvasRend->hRendererConfig->split_rend_config.lc3plus_highres;
#endif
    return IVAS_ERR_OK;
}

+6 −1
Original line number Diff line number Diff line
@@ -299,7 +299,12 @@ ivas_error IVAS_REND_GetSplitRendBitstreamHeader(
    ISAR_SPLIT_REND_CODEC *pCodec,                  /* o  : pointer to codec setting                            */
    ISAR_SPLIT_REND_POSE_CORRECTION_MODE *poseCorrection,  /* o: pointer to pose correction mode                */
    int16_t *pCodec_frame_size_ms,                  /* o  : pointer to codec frame size setting                 */
    int16_t *pIsar_frame_size_ms                    /* o  : pointer to isar frame size setting                  */
#ifdef FIX_1437_LC3PLUS_EXTREND_HIRES
    int16_t *pIsar_frame_size_ms,                   /* o  : pointer to ISAR frame size setting                  */
    int16_t *pLc3plusHighRes                        /* o  : pointer to LC3plus High-Res setting                 */
#else
    int16_t *pIsar_frame_size_ms                    /* o  : pointer to ISAR frame size setting                  */
#endif
);

ivas_error IVAS_REND_SetHeadRotation(