diff --git a/apps/renderer.c b/apps/renderer.c index 1536613953582027d2c0ce08a85a8618eefacc5b..9394fb655efaaa8015ce8648dc3761664a35ceae 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -1548,7 +1548,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(): %s!\n", ivas_error_to_string( error ) ); goto cleanup; diff --git a/lib_com/options.h b/lib_com/options.h index 10ea208a2d533e39ac724361615e9d5c2ff595a9..84169d48f4029a390729b81aaa36d8065844636e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -145,6 +145,7 @@ #define FIX_1419_MONO_STEREO_UMX /* FhG: fix for issue 1419 : support upmix to all output formats for mono and stereo */ #define NONBE_MDCT_ST_DTX_FIX_SUBOPT_SPATIAL_CNG /* FhG: Fix MDCT-Stereo comfort noise for certain noise types */ #define NONBE_1344_REND_MASA_LOW_FS /* Nokia: Issue 1344: Fix sanitizer errors when using IVAS_rend to render MASA with lower sampling rates */ +#define FIX_1437_LC3PLUS_EXTREND_HIRES /* FhG: fix external renderer split bitstream header writing causing a crash for LC3plus High-res mode */ #define NONBE_1412_AVOID_ROUNDING_AZ_ELEV /* FhG: Avoid rounding when passing azimuth and elevation to efap_determine_gains() */ // object-editing feature porting diff --git a/lib_isar/isar_splitRendererPre.c b/lib_isar/isar_splitRendererPre.c index c5902b3b5298eed4f62fd15cb25f4c4a4eef75c1..445540715ad5519ac42edd6b55b6cc002207f39a 100644 --- a/lib_isar/isar_splitRendererPre.c +++ b/lib_isar/isar_splitRendererPre.c @@ -2876,6 +2876,9 @@ ivas_error splitRendLc3plusEncodeAndWrite( pBits->pose_correction = hSplitBin->multiBinPoseData.poseCorrectionMode; pBits->codec_frame_size_ms = (Word16) ( hSplitBin->hLc3plusEnc->config.lc3plus_frame_duration_us / 1000 ); pBits->isar_frame_size_ms = (Word16) ( 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.h b/lib_rend/lib_rend.h index f5f1d86cb1b094ec3825b8a4aee70ab36e224987..ea2bc3981e7bbd2c6c2eb7d479d799981be268b4 100644 --- a/lib_rend/lib_rend.h +++ b/lib_rend/lib_rend.h @@ -294,7 +294,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 */ Word16 *pCodec_frame_size_ms, /* o : pointer to codec frame size setting */ - Word16 *pIsar_frame_size_ms /* o : pointer to ISAR frame size setting */ +#ifdef FIX_1437_LC3PLUS_EXTREND_HIRES + Word16 *pIsar_frame_size_ms, /* o : pointer to ISAR frame size setting */ + Word16 *pLc3plusHighRes /* o : pointer to LC3plus High-Res setting */ +#else + Word16 *pIsar_frame_size_ms /* o : pointer to ISAR frame size setting */ +#endif ); ivas_error IVAS_REND_SetHeadRotation( diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index 299fe9b2ec5ffa6ad84d3e15ee15db337197d864..afd1027d2e1bd948c4f7d05467e8cb1921b5219b 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -9620,7 +9620,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 */ Word16 *pCodec_frame_size_ms, /* o : pointer to codec frame size setting */ - Word16 *pIsar_frame_size_ms /* o : pointer to ISAR frame size setting */ +#ifdef FIX_1437_LC3PLUS_EXTREND_HIRES + Word16 *pIsar_frame_size_ms, /* o : pointer to ISAR frame size setting */ + Word16 *pLc3plusHighRes /* o : pointer to LC3plus High-Res setting */ +#else + Word16 *pIsar_frame_size_ms /* o : pointer to ISAR frame size setting */ +#endif ) { test(); @@ -9633,6 +9638,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; }