Loading lib_util/ivas_rtp_pi_data.c +7 −7 Original line number Diff line number Diff line Loading @@ -757,13 +757,13 @@ static ivas_error packReverseISMGain( const IVAS_PIDATA_GENERIC *piData, uint8_t buffer[nBytes++] = ( r_ism_gain->piDataType & MASK_5BIT ); /* PF/PM populated during final packing */ gain = (int16_t) r_ism_gain->dB; idx = min( -gain, 97 ); idx = min( -gain, 25 ); if ( gain > 0 ) { idx += 97; idx += 25; } buffer[nBytes++] = ( idx & MASK_7BIT ) << 1; buffer[nBytes++] = ( idx & MASK_6BIT ) << 2; *nBytesWritten = nBytes; return IVAS_ERR_OK; } Loading @@ -785,19 +785,19 @@ static ivas_error unpackReverseISMGain( const uint8_t *buffer, uint32_t numDataB /* Unpack gain */ idx = ( *buffer ) >> 1; /* negative gains*/ if ( idx < 97 ) if ( idx < 25 ) { r_ism_gain->dB = -(int8_t) ( idx ); } /* Set to min for muting, to be interpreted as -Inf */ else if ( idx == 97 ) else if ( idx == 25 ) { r_ism_gain->dB = -128; } /* postive gains */ else if ( idx < 101 ) else if ( idx < 38 ) { r_ism_gain->dB = (int8_t) idx - 97; r_ism_gain->dB = (int8_t) idx - 25; } else { Loading Loading
lib_util/ivas_rtp_pi_data.c +7 −7 Original line number Diff line number Diff line Loading @@ -757,13 +757,13 @@ static ivas_error packReverseISMGain( const IVAS_PIDATA_GENERIC *piData, uint8_t buffer[nBytes++] = ( r_ism_gain->piDataType & MASK_5BIT ); /* PF/PM populated during final packing */ gain = (int16_t) r_ism_gain->dB; idx = min( -gain, 97 ); idx = min( -gain, 25 ); if ( gain > 0 ) { idx += 97; idx += 25; } buffer[nBytes++] = ( idx & MASK_7BIT ) << 1; buffer[nBytes++] = ( idx & MASK_6BIT ) << 2; *nBytesWritten = nBytes; return IVAS_ERR_OK; } Loading @@ -785,19 +785,19 @@ static ivas_error unpackReverseISMGain( const uint8_t *buffer, uint32_t numDataB /* Unpack gain */ idx = ( *buffer ) >> 1; /* negative gains*/ if ( idx < 97 ) if ( idx < 25 ) { r_ism_gain->dB = -(int8_t) ( idx ); } /* Set to min for muting, to be interpreted as -Inf */ else if ( idx == 97 ) else if ( idx == 25 ) { r_ism_gain->dB = -128; } /* postive gains */ else if ( idx < 101 ) else if ( idx < 38 ) { r_ism_gain->dB = (int8_t) idx - 97; r_ism_gain->dB = (int8_t) idx - 25; } else { Loading