From b05885ae71fbf1b0982eb53c17febd62bc4ebac2 Mon Sep 17 00:00:00 2001 From: vaclav Date: Fri, 7 Mar 2025 10:44:17 +0100 Subject: [PATCH] port FIX_921_OMASA_DELAY_PRINTOUT --- lib_com/options.h | 1 + lib_dec/lib_dec.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 2846a9a5a..7c20555e3 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -198,6 +198,7 @@ #define SPLIT_REND_POSE_CORRECTION_UNUSED_BITS #define ISAR_BITSTREAM_UPDATE_LC3PLUS /* FhG: Multiple improvements to the ISAR bitstream when LC3plus is used. See MR 1456 for details. */ #endif +#define FIX_921_OMASA_DELAY_PRINTOUT /* VA: issue 921: correct OMASA decoder delay printout */ /* #################### End BASOP porting switches ############################ */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 1b00eef1b..cd44341d9 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -2250,7 +2250,11 @@ ivas_error IVAS_DEC_GetDelay( nSamples[2] = (int16_t) roundf( (float) st_ivas->binaural_latency_ns * hDecoderConfig->output_Fs / 1000000000.f ); nSamples[0] = nSamples[1] + nSamples[2]; +#ifdef FIX_921_OMASA_DELAY_PRINTOUT + if ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) +#else if ( st_ivas->ivas_format == MASA_FORMAT ) +#endif { /* note: in MASA, all delay is compensated at the decoder by default, so subtract the encoder delay for print-out */ nSamples[1] -= NS2SA( hDecoderConfig->output_Fs, IVAS_ENC_DELAY_NS ); -- GitLab