Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -166,6 +166,7 @@ #define FIX_FLOAT_1544_SBA_META_IMPRECISION_UNSAFE_MATH /* FhG: float issue 1544: imprecision in ivas_get_dirac_sba_max_md_bits() with -funsafe-math-optimizations */ #define FIX_FLOAT_1544_ITD_IMPRECISION_UNSAFE_MATH /* FhG: float issue 1544: Avoid assert() with -funsafe-math-optimizations in stereo_td_itd() */ #define FIX_FLOAT_1539_G192_FORMAT_SWITCH /* Nokia: reintroduce format switching for g192 bitstreams */ #define FIX_1527_CMR_BITRATE_IDX /* Fix for incorrect bitrate idx packed in rtp CMR E-byte */ /* #################### End BE switches ################################## */ Loading lib_util/ivas_rtp_payload.c +12 −0 Original line number Diff line number Diff line Loading @@ -658,7 +658,11 @@ static uint32_t getBitrateIdx( const uint32_t *table, uint32_t tableLen, uint32_ for ( n = 0; n < tableLen; n++ ) { #ifdef FIX_1527_CMR_BITRATE_IDX if ( bitrate >= ( table[n] * IVAS_NUM_FRAMES_PER_SEC ) ) #else if ( bitrate > ( table[n] * IVAS_NUM_FRAMES_PER_SEC ) ) #endif { idx = n; } Loading Loading @@ -724,7 +728,11 @@ static void packEBytes( /* EVS Modes */ bitrate = ( bitrate > 128000 ) ? 128000 : bitrate; bitrate = ( bitrate < 5900 ) ? 5900 : bitrate; #ifdef FIX_1527_CMR_BITRATE_IDX bitrateIdx = getBitrateIdx( evsFrameSizeInBits, ( sizeof( evsFrameSizeInBits ) / sizeof( evsFrameSizeInBits[0] ) ) - 1, bitrate ); #else bitrateIdx = getBitrateIdx( evsFrameSizeInBits, sizeof( evsFrameSizeInBits ) / sizeof( evsFrameSizeInBits[0] ), bitrate ); #endif BR = (uint8_t) bitrateIdx & MASK_4BIT; /* If a bandwidth choice cannot be signalled for a given bitrate Loading Loading @@ -788,7 +796,11 @@ static void packEBytes( /* Initial E-Byte */ bitrate = ( bitrate > 512000 ) ? 512000 : bitrate; bitrate = ( bitrate < 13200 ) ? 13200 : bitrate; #ifdef FIX_1527_CMR_BITRATE_IDX bitrateIdx = getBitrateIdx( ivasFrameSizeInBits, ( sizeof( ivasFrameSizeInBits ) / sizeof( ivasFrameSizeInBits[0] ) ) - 2, bitrate ); #else bitrateIdx = getBitrateIdx( ivasFrameSizeInBits, sizeof( ivasFrameSizeInBits ) / sizeof( ivasFrameSizeInBits[0] ), bitrate ); #endif BR = (uint8_t) bitrateIdx & MASK_4BIT; if ( nByte < maxNumEBytes ) { Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -166,6 +166,7 @@ #define FIX_FLOAT_1544_SBA_META_IMPRECISION_UNSAFE_MATH /* FhG: float issue 1544: imprecision in ivas_get_dirac_sba_max_md_bits() with -funsafe-math-optimizations */ #define FIX_FLOAT_1544_ITD_IMPRECISION_UNSAFE_MATH /* FhG: float issue 1544: Avoid assert() with -funsafe-math-optimizations in stereo_td_itd() */ #define FIX_FLOAT_1539_G192_FORMAT_SWITCH /* Nokia: reintroduce format switching for g192 bitstreams */ #define FIX_1527_CMR_BITRATE_IDX /* Fix for incorrect bitrate idx packed in rtp CMR E-byte */ /* #################### End BE switches ################################## */ Loading
lib_util/ivas_rtp_payload.c +12 −0 Original line number Diff line number Diff line Loading @@ -658,7 +658,11 @@ static uint32_t getBitrateIdx( const uint32_t *table, uint32_t tableLen, uint32_ for ( n = 0; n < tableLen; n++ ) { #ifdef FIX_1527_CMR_BITRATE_IDX if ( bitrate >= ( table[n] * IVAS_NUM_FRAMES_PER_SEC ) ) #else if ( bitrate > ( table[n] * IVAS_NUM_FRAMES_PER_SEC ) ) #endif { idx = n; } Loading Loading @@ -724,7 +728,11 @@ static void packEBytes( /* EVS Modes */ bitrate = ( bitrate > 128000 ) ? 128000 : bitrate; bitrate = ( bitrate < 5900 ) ? 5900 : bitrate; #ifdef FIX_1527_CMR_BITRATE_IDX bitrateIdx = getBitrateIdx( evsFrameSizeInBits, ( sizeof( evsFrameSizeInBits ) / sizeof( evsFrameSizeInBits[0] ) ) - 1, bitrate ); #else bitrateIdx = getBitrateIdx( evsFrameSizeInBits, sizeof( evsFrameSizeInBits ) / sizeof( evsFrameSizeInBits[0] ), bitrate ); #endif BR = (uint8_t) bitrateIdx & MASK_4BIT; /* If a bandwidth choice cannot be signalled for a given bitrate Loading Loading @@ -788,7 +796,11 @@ static void packEBytes( /* Initial E-Byte */ bitrate = ( bitrate > 512000 ) ? 512000 : bitrate; bitrate = ( bitrate < 13200 ) ? 13200 : bitrate; #ifdef FIX_1527_CMR_BITRATE_IDX bitrateIdx = getBitrateIdx( ivasFrameSizeInBits, ( sizeof( ivasFrameSizeInBits ) / sizeof( ivasFrameSizeInBits[0] ) ) - 2, bitrate ); #else bitrateIdx = getBitrateIdx( ivasFrameSizeInBits, sizeof( ivasFrameSizeInBits ) / sizeof( ivasFrameSizeInBits[0] ), bitrate ); #endif BR = (uint8_t) bitrateIdx & MASK_4BIT; if ( nByte < maxNumEBytes ) { Loading