Commit 65d7ce39 authored by Vidhya V P's avatar Vidhya V P
Browse files

Made correction in SID MD bits calculation

parent 46b0859c
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -180,7 +180,7 @@

#define MASA_PREREND                                    /* Nokia: Contribution 42: Support for IVAS_rend to merge MASA + other format to MASA */
#define ISM_25k6_HZ_CORE                                /* VA: issue 540: 1ISM 48 kbps - change ACELP/TCX 16 kHz core to TCX only 25.6 kHz core */

#define FIX_137_SID_MD_BITS                             /* Dlb: Fix issue #137 , SID bitrate mismatch correction */


#define FIX_528_ISM_MD_FILE_TOO_SHORT                   /* VA: issue 528: ISM Metadata file too short  */
+5 −0
Original line number Diff line number Diff line
@@ -1187,8 +1187,13 @@ int16_t ivas_qmetadata_dec_sid_decode(

    if ( ivas_format == SBA_FORMAT )
    {
#ifndef FIX_137_SID_MD_BITS
        /* 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; /* -1 for inactive mode header bit*/

#endif
    }
    else
    {
+5 −0
Original line number Diff line number Diff line
@@ -985,8 +985,13 @@ void ivas_qmetadata_enc_sid_encode(

    if ( ivas_format == SBA_FORMAT )
    {
#ifndef FIX_137_SID_MD_BITS
        /* 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 * SPAR_SID_BITS_TAR_PER_BAND ) - 1; /* -1 for inactive mode header bit*/
#else
        metadata_sid_bits = (int16_t) ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - ( SPAR_DTX_BANDS * SPAR_SID_BITS_TAR_PER_BAND ) - 1; /* -1 for inactive mode header bit*/

#endif
    }
    else
    {