diff --git a/lib_com/options.h b/lib_com/options.h index 80cd7a383bbd806dfa0f5fa82fac8262234d7590..65e625614e677b07ca92916391dab3e283b59ae7 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -171,7 +171,7 @@ #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_1122_KEEP_EVS_MODE_UNCHANGED /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR. */ - +#define NONBE_FIX_1334_EXTREND_OMASA /* FhG: issue 1334: fix crash for external split-pre rendering to OMASA */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_rend/lib_rend.c b/lib_rend/lib_rend.c index ec4f99cd69d2a551771b0f855a802b018db145bb..812b88d44b505a34a4715974bcddb71711614d1e 100644 --- a/lib_rend/lib_rend.c +++ b/lib_rend/lib_rend.c @@ -3368,6 +3368,16 @@ static int16_t getCldfbRendFlag( numMcInputs += ( hIvasRend->inputsMc[i].base.inConfig == IVAS_AUDIO_CONFIG_INVALID && new_configType != IVAS_REND_AUDIO_CONFIG_TYPE_CHANNEL_BASED ) ? 0 : 1; } +#ifdef NONBE_FIX_1334_EXTREND_OMASA + if ( ( numMasaInputs > 0 ) || ( numSbaInputs > 0 && hIvasRend->hRendererConfig->split_rend_config.rendererSelection == IVAS_BIN_RENDERER_TYPE_FASTCONV ) ) + { + isCldfbRend = 1; + } + else if ( numIsmInputs > 0 || numMcInputs > 0 ) + { + isCldfbRend = 0; + } +#else if ( numIsmInputs > 0 || numMcInputs > 0 ) { isCldfbRend = 0; @@ -3376,6 +3386,7 @@ static int16_t getCldfbRendFlag( { isCldfbRend = 1; } +#endif } return isCldfbRend; @@ -5629,11 +5640,20 @@ static ivas_error renderInputIsm( { ivas_error error; IVAS_REND_AudioBuffer inAudio; +#ifdef NONBE_FIX_1334_EXTREND_OMASA + int16_t cldfb2tdSampleFact; +#endif error = IVAS_ERR_OK; inAudio = ismInput->base.inputBuffer; +#ifdef NONBE_FIX_1334_EXTREND_OMASA + cldfb2tdSampleFact = outAudio.config.is_cldfb ? 2 : 1; + if ( ( ismInput->base.numNewSamplesPerChannel * cldfb2tdSampleFact != outAudio.config.numSamplesPerChannel ) && + ( outConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) && ( outConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) ) +#else if ( ismInput->base.numNewSamplesPerChannel != outAudio.config.numSamplesPerChannel ) +#endif { return IVAS_ERROR( IVAS_ERR_INVALID_BUFFER_SIZE, "Mismatch between the number of input samples vs number of requested output samples - currently not allowed" ); }