diff --git a/apps/renderer.c b/apps/renderer.c index c49b793058814141cf9fd107ab831b55d433c30c..cfc6c423bd54715ae17305a6eacd3708b9f31b80 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1435,7 +1435,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; diff --git a/lib_com/options.h b/lib_com/options.h index eb37cf314fa900a1b3a4d71712d28ca1830ad771..e73a17f8de5ae06c0bfff3a358e423a3be96fa55 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -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 diff --git a/lib_isar/isar_splitRendererPre.c b/lib_isar/isar_splitRendererPre.c index 734daae97719236aa4b692e5948eb65d5393e438..41e82b0598765ad6c79f9f9d75ba16dd8777cb39 100644 --- a/lib_isar/isar_splitRendererPre.c +++ b/lib_isar/isar_splitRendererPre.c @@ -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; } diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index d0be488f83b84f2b39ac0d7287f6e3c673db6473..a4af0da9e4ab2285501064f9c6af89452963756f 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -8096,9 +8096,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 ) @@ -8109,6 +8113,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; } diff --git a/lib_rend/lib_rend.h b/lib_rend/lib_rend.h index 4b6e7340fd99c3cef14ae580255151d15c443811..51637de8b34b4f9a2bffffb50c4e420c7fcc9b59 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -287,7 +287,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(