diff --git a/lib_com/options.h b/lib_com/options.h index 92c5871eb0bf1c38039df9d2680804147f121880..88a871ffc3fd38c5d9f981a4a5bc75bd397a35c2 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -101,6 +101,8 @@ #define FIX_2000_NON_LINEARITY_OVERSHOOT /* Eri: Issue 2000: SWB TBE energy overshoot in non-linearity. Aligns with float */ #define FIX_2010_PREP_TBE_EXC /* FhG: fix issues with varying Q-values for code_preQ_fx[] */ +#define FIX_2011_BSTR_FIRST_LOST /* VA: issue 2011: decoding of a bitstream with first frame lost */ + /* #################### Start BASOP porting switches ############################ */ #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 */ diff --git a/lib_dec/lib_dec_fx.c b/lib_dec/lib_dec_fx.c index c1cc0bd04f18dc0a9b90da6451a9ce61b628d0d2..77b2507502d2f3f45ce2e88932d10a002466f3f8 100644 --- a/lib_dec/lib_dec_fx.c +++ b/lib_dec/lib_dec_fx.c @@ -1138,6 +1138,12 @@ ivas_error IVAS_DEC_GetSamples( { hIvasDec->hasBeenFedFrame = false; move16(); +#ifdef FIX_2011_BSTR_FIRST_LOST + set16_fx( pcmBuf, 0, imult1616( hIvasDec->st_ivas->hDecoderConfig->nchan_out, nSamplesAsked ) ); + nSamplesRendered = nSamplesAsked; + move16(); + hIvasDec->nSamplesAvailableNext = sub( hIvasDec->nSamplesAvailableNext, nSamplesAsked ); +#else set16_fx( pcmBuf, 0, imult1616( hIvasDec->st_ivas->hDecoderConfig->nchan_out, nSamplesAsked ) ); hIvasDec->nSamplesRendered = add( hIvasDec->nSamplesRendered, nSamplesAsked ); move16(); @@ -1152,6 +1158,7 @@ ivas_error IVAS_DEC_GetSamples( move16(); move16(); } +#endif } ELSE { @@ -1324,6 +1331,13 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( return IVAS_ERR_UNEXPECTED_NULL_POINTER; } +#ifdef FIX_2011_BSTR_FIRST_LOST + IF( !hIvasDec->hasBeenFedFirstGoodFrame ) + { + return IVAS_ERR_OK; + } + +#endif st_ivas = hIvasDec->st_ivas; output_config = st_ivas->hDecoderConfig->output_config; output_Fs = st_ivas->hDecoderConfig->output_Fs;