Loading lib_dec/ivas_qmetadata_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -1191,7 +1191,7 @@ int16_t ivas_qmetadata_dec_sid_decode( /* TODO: still use old sid frame size to keep bitexactness */ metadata_sid_bits = (int16_t) ( 5000 /*IVAS_SID_5k2*/ - SID_2k40 ) / FRAMES_PER_SEC - ( SPAR_DTX_BANDS * 18 ) - 1; /* -1 for inactive mode header bit*/ #else metadata_sid_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - ( SPAR_DTX_BANDS * 18 ) - 1 - SID_FORMAT_NBITS; /* -1 for inactive mode header bit*/ metadata_sid_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - ( SPAR_DTX_BANDS * SPAR_SID_BITS_TAR_PER_BAND ) - 1 - SID_FORMAT_NBITS; /* -1 for inactive mode header bit*/ #endif } Loading lib_dec/ivas_spar_decoder.c +4 −0 Original line number Diff line number Diff line Loading @@ -351,11 +351,15 @@ ivas_error ivas_spar_dec( if ( !st0->bfi && hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) { #ifndef FIX_137_SID_MD_BITS int16_t zero_pad_bits; #endif *nb_bits_read += SID_FORMAT_NBITS; #ifndef FIX_137_SID_MD_BITS zero_pad_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; assert( zero_pad_bits <= 1 ); *nb_bits_read += zero_pad_bits; #endif } pop_wmops(); Loading lib_enc/ivas_qmetadata_enc.c +4 −0 Original line number Diff line number Diff line Loading @@ -1224,10 +1224,14 @@ void reset_metadata_spatial( #endif hMetaData->ind_list[0].value = 1; metadata_sid_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS; #ifdef FIX_137_SID_MD_BITS assert( hMetaData->nb_bits_tot == metadata_sid_bits ); #else while ( hMetaData->nb_bits_tot < metadata_sid_bits ) { push_next_indice( hMetaData, 0, 1 ); /*fill bit*/ } #endif } else { Loading Loading
lib_dec/ivas_qmetadata_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -1191,7 +1191,7 @@ int16_t ivas_qmetadata_dec_sid_decode( /* TODO: still use old sid frame size to keep bitexactness */ metadata_sid_bits = (int16_t) ( 5000 /*IVAS_SID_5k2*/ - SID_2k40 ) / FRAMES_PER_SEC - ( SPAR_DTX_BANDS * 18 ) - 1; /* -1 for inactive mode header bit*/ #else metadata_sid_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - ( SPAR_DTX_BANDS * 18 ) - 1 - SID_FORMAT_NBITS; /* -1 for inactive mode header bit*/ metadata_sid_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - ( SPAR_DTX_BANDS * SPAR_SID_BITS_TAR_PER_BAND ) - 1 - SID_FORMAT_NBITS; /* -1 for inactive mode header bit*/ #endif } Loading
lib_dec/ivas_spar_decoder.c +4 −0 Original line number Diff line number Diff line Loading @@ -351,11 +351,15 @@ ivas_error ivas_spar_dec( if ( !st0->bfi && hDecoderConfig->ivas_total_brate == IVAS_SID_5k2 ) { #ifndef FIX_137_SID_MD_BITS int16_t zero_pad_bits; #endif *nb_bits_read += SID_FORMAT_NBITS; #ifndef FIX_137_SID_MD_BITS zero_pad_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - *nb_bits_read; assert( zero_pad_bits <= 1 ); *nb_bits_read += zero_pad_bits; #endif } pop_wmops(); Loading
lib_enc/ivas_qmetadata_enc.c +4 −0 Original line number Diff line number Diff line Loading @@ -1224,10 +1224,14 @@ void reset_metadata_spatial( #endif hMetaData->ind_list[0].value = 1; metadata_sid_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS; #ifdef FIX_137_SID_MD_BITS assert( hMetaData->nb_bits_tot == metadata_sid_bits ); #else while ( hMetaData->nb_bits_tot < metadata_sid_bits ) { push_next_indice( hMetaData, 0, 1 ); /*fill bit*/ } #endif } else { Loading