diff --git a/lib_com/options.h b/lib_com/options.h old mode 100644 new mode 100755 index ec4b88b340442969d09175465634f45932a8de6d..33b25d459c924ccaf43ac7661a96d618f855988c --- a/lib_com/options.h +++ b/lib_com/options.h @@ -112,7 +112,7 @@ /*#define TDREND_HRTF_TABLE_METHODS*/ /* Enable HRTF lookup from tables, for testing & evaluation. Supply file in table format to use. Note that a suitable HR filter lookup method should be written if the filters sample point grids are not in the formats. */ /*#define TDREND_STANDALONE*/ /* Used when renderer is built in standalone form, without IVAS encoding/decoding (see scripts/object_renderer_standalone). This is just here to ensure this is cleaned out by prepare_instrumentation.sh */ -/*#define DEBUG_SBA*/ /* debug DIRAC/SPAR in-out */ +/*#define DEBUG_SBA*/ /* debug DIRAC/SPAR in-out */ #ifdef DEBUG_SBA /*#define DEBUG_LBR_SBA*/ /* debug low bitrate SBA (SPAR+DirAC) */ /*#define DEBUG_SBA_AUDIO_DUMP*/ /* SBA intermediate audio wav file dumping */ @@ -175,6 +175,7 @@ #define MC_PARAMUPMIX_MODE /* Dlb: Contribution 39: Multichannel Parametric Upmix */ #define FIX_469_BRSWITCH_PUPMIX /* Dlb: Fix issue 469 for Param Upmix bitrate switching */ +#define FIX_MASA_DELAY_PRINTOUT /* VA: issue 444: fix MASA decoder delay printout */ #define HODIRAC /* FhG: Contribution 32: Sector-based HO-DirAC method for SBA at high bitrates */ #define DIRAC_ALLOC_HARM /* VA: harmonize DirAC parameters allocation/deallocation */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 20429118336c7ce4b4251990527e34ddd837fe24..95fd02a0c136dc0cc8960fd43be19b73d20bb214 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -1622,6 +1622,14 @@ 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_MASA_DELAY_PRINTOUT + if ( st_ivas->ivas_format == MASA_FORMAT ) + { + /* 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 ); + } +#endif + *timeScale = hDecoderConfig->output_Fs; return IVAS_ERR_OK;