Loading lib_com/bitstream_fx.c +12 −9 Original line number Diff line number Diff line Loading @@ -242,7 +242,7 @@ static Word16 rate2AMRWB_IOmode( case ACELP_23k85: return AMRWB_IO_2385; default: break; BREAK; } return -1; Loading Loading @@ -298,7 +298,7 @@ Word16 rate2EVSmode( case HQ_128k: return PRIMARY_128000; default: break; BREAK; } if ( is_amr_wb != NULL ) Loading Loading @@ -3206,12 +3206,15 @@ Word16 find_indice( { Word16 i; for ( i = 0; i < hBstr->nb_ind_tot; i++ ) FOR( i = 0; i < hBstr->nb_ind_tot; i++ ) { if ( hBstr->ind_list[i].id == id && hBstr->ind_list[i].nb_bits > 0 ) test(); IF( EQ_16( hBstr->ind_list[i].id, id ) && hBstr->ind_list[i].nb_bits > 0 ) { *value = hBstr->ind_list[i].value; *nb_bits = hBstr->ind_list[i].nb_bits; move16(); move16(); return i; } } Loading Loading @@ -3273,7 +3276,7 @@ UWord16 delete_indice( #endif } return i - j; return sub( i, j ); } Loading Loading @@ -3949,13 +3952,13 @@ static void decoder_selectCodec( case 2800: st->codec_mode = MODE1; move16(); break; BREAK; default: /* validate that total_brate (derived from RTP packet or a file header) is one of the defined bitrates */ st->codec_mode = st->last_codec_mode; move16(); st->bfi = 1; move16(); break; BREAK; } } } Loading Loading @@ -4417,7 +4420,7 @@ void ivas_set_bitstream_pointers( num_bits = 0; /* set bitstream pointers for SCEs */ for ( k = 0; k < st_ivas->nSCE; k++ ) FOR( k = 0; k < st_ivas->nSCE; k++ ) { sts = st_ivas->hSCE[k]->hCoreCoder; sts[0]->bit_stream = st_ivas->bit_stream + num_bits; Loading @@ -4425,7 +4428,7 @@ void ivas_set_bitstream_pointers( } /* set bitstream pointers for CPEs */ for ( k = 0; k < st_ivas->nCPE; k++ ) FOR( k = 0; k < st_ivas->nCPE; k++ ) { sts = st_ivas->hCPE[k]->hCoreCoder; sts[0]->bit_stream = st_ivas->bit_stream + num_bits; Loading lib_com/fd_cng_com_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -3259,11 +3259,11 @@ void SynthesisSTFT_dirac_fx( case 640: fftScale = FFT_SCALING_640; move32(); break; BREAK; case 512: fftScale = FFT_SCALING_512; move32(); break; BREAK; default: assert( !"Not supported FFT length!" ); } Loading lib_com/ivas_mc_com_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -153,7 +153,7 @@ Word16 ivas_mc_ls_setup_get_num_channels_fx( case MC_LS_SETUP_7_1: nchan = 8; move16(); break; BREAK; case MC_LS_SETUP_5_1_2: nchan = 8; move16(); Loading lib_com/longarith.c +19 −17 Original line number Diff line number Diff line Loading @@ -62,18 +62,18 @@ void longadd( Word32 carry = 0; assert( lena >= lenb ); for ( h = 0; h < lenb; h++ ) FOR( h = 0; h < lenb; h++ ) { carry += ( (UWord32) a[h] ) + ( (UWord32) b[h] ); a[h] = (UWord16) carry; carry = carry >> 16; carry = L_shr( carry, 16 ); } for ( ; h < lena; h++ ) FOR( ; h < lena; h++ ) { carry = ( (UWord32) a[h] ) + carry; a[h] = (UWord16) carry; carry = carry >> 16; carry = L_shr( carry, 16 ); } assert( carry == 0 ); /* carry != 0 indicates addition overflow */ Loading Loading @@ -106,26 +106,26 @@ void longshiftright( lena -= intb; fracb = b & 0xF; if ( fracb ) IF( fracb ) { fracb_u = 16 - fracb; for ( k = 0; k < lena - 1; k++ ) FOR( k = 0; k < lena - 1; k++ ) { d[k] = ( ( a[k] >> fracb ) | ( a[k + 1] << fracb_u ) ) & 0xFFFF; } d[k] = ( a[k] >> fracb ); k++; } else ELSE { for ( k = 0; k < lena; k++ ) FOR( k = 0; k < lena; k++ ) { d[k] = a[k]; } } /* fill remaining upper bits with zero */ for ( ; k < lend; k++ ) FOR( ; k < lend; k++ ) { d[k] = 0; } Loading Loading @@ -175,30 +175,32 @@ void longshiftleft( Word16 fracb_l; /* shift right value for all lower words a[k-1] */ Word16 k = len - 1; intb = b >> 4; intb = shr( b, 4 ); fracb = b & 0xF; if ( fracb ) IF( fracb ) { fracb_l = 16 - fracb; for ( ; k > intb; k-- ) FOR( ; k > intb; k-- ) { d[k] = ( a[k - intb] << fracb ) | ( a[k - intb - 1] >> fracb_l ); d[k] = ( shl( a[k - intb], fracb ) ) | ( shr( a[k - intb - 1], fracb_l ) ); } d[k] = ( a[k - intb] << fracb ); d[k] = shl( a[k - intb], fracb ); k--; } else ELSE { for ( ; k >= intb; k-- ) FOR( ; k >= intb; k-- ) { d[k] = a[k - intb]; move16(); } } for ( ; k >= 0; k-- ) FOR( ; k >= 0; k-- ) { d[k] = 0; move16(); } return; Loading lib_com/parameter_bitmaping_fx.c +11 −8 Original line number Diff line number Diff line Loading @@ -54,9 +54,9 @@ void GetParameters( assert( ( paramsBitMap != NULL ) && ( nArrayLength > 0 ) && ( pParameter != NULL ) && ( pStream != NULL ) && ( pnSize != NULL ) && ( pnBits != NULL ) ); nParams = paramsBitMap->nParams; for ( index = 0; index < nArrayLength; index++ ) FOR( index = 0; index < nArrayLength; index++ ) { for ( iParam = 0; iParam < nParams; iParam++ ) FOR( iParam = 0; iParam < nParams; iParam++ ) { ParamBitMap const *const param = ¶msBitMap->params[iParam]; Loading @@ -64,11 +64,12 @@ void GetParameters( pSubStruct = param->GetParamValue( pParameter, index, &value ); #undef WMC_TOOL_SKIP /* If a function for encoding/decoding value is defined than it should take care of 0 */ if ( param->fZeroAllowed || ( param->EncodeValue != NULL ) ) test(); IF( param->fZeroAllowed || ( param->EncodeValue != NULL ) ) { *( *pStream )++ = value; } else ELSE { *( *pStream )++ = value - 1; } Loading @@ -76,7 +77,8 @@ void GetParameters( #define WMC_TOOL_SKIP *pnBits += ( param->nBits != 0 ) ? param->nBits : param->GetNumberOfBits( value, index ); #undef WMC_TOOL_SKIP if ( ( param->pSubParamBitMap != NULL ) && ( value > 0 ) ) test(); IF( ( param->pSubParamBitMap != NULL ) && ( value > 0 ) ) { GetParameters( param->pSubParamBitMap, value, ( pSubStruct != NULL ) ? pSubStruct : pParameter, pStream, pnSize, pnBits ); } Loading Loading @@ -163,9 +165,9 @@ void SetParameters( assert( ( paramsBitMap != NULL ) && ( nArrayLength > 0 ) && ( pParameter != NULL ) && ( pStream != NULL ) && ( pnSize != NULL ) ); nParams = paramsBitMap->nParams; for ( index = 0; index < nArrayLength; index++ ) FOR( index = 0; index < nArrayLength; index++ ) { for ( iParam = 0; iParam < nParams; iParam++ ) FOR( iParam = 0; iParam < nParams; iParam++ ) { ParamBitMap const *const param = ¶msBitMap->params[iParam]; /* If a function for encoding/decoding value is defined than it should take care of 0 */ Loading @@ -175,7 +177,8 @@ void SetParameters( pSubStruct = param->SetParamValue( pParameter, index, value ); #undef WMC_TOOL_SKIP ++*pnSize; if ( ( param->pSubParamBitMap != NULL ) && ( value > 0 ) ) test(); IF( ( param->pSubParamBitMap != NULL ) && ( value > 0 ) ) { SetParameters( param->pSubParamBitMap, value, ( pSubStruct != NULL ) ? pSubStruct : pParameter, pStream, pnSize ); } Loading Loading
lib_com/bitstream_fx.c +12 −9 Original line number Diff line number Diff line Loading @@ -242,7 +242,7 @@ static Word16 rate2AMRWB_IOmode( case ACELP_23k85: return AMRWB_IO_2385; default: break; BREAK; } return -1; Loading Loading @@ -298,7 +298,7 @@ Word16 rate2EVSmode( case HQ_128k: return PRIMARY_128000; default: break; BREAK; } if ( is_amr_wb != NULL ) Loading Loading @@ -3206,12 +3206,15 @@ Word16 find_indice( { Word16 i; for ( i = 0; i < hBstr->nb_ind_tot; i++ ) FOR( i = 0; i < hBstr->nb_ind_tot; i++ ) { if ( hBstr->ind_list[i].id == id && hBstr->ind_list[i].nb_bits > 0 ) test(); IF( EQ_16( hBstr->ind_list[i].id, id ) && hBstr->ind_list[i].nb_bits > 0 ) { *value = hBstr->ind_list[i].value; *nb_bits = hBstr->ind_list[i].nb_bits; move16(); move16(); return i; } } Loading Loading @@ -3273,7 +3276,7 @@ UWord16 delete_indice( #endif } return i - j; return sub( i, j ); } Loading Loading @@ -3949,13 +3952,13 @@ static void decoder_selectCodec( case 2800: st->codec_mode = MODE1; move16(); break; BREAK; default: /* validate that total_brate (derived from RTP packet or a file header) is one of the defined bitrates */ st->codec_mode = st->last_codec_mode; move16(); st->bfi = 1; move16(); break; BREAK; } } } Loading Loading @@ -4417,7 +4420,7 @@ void ivas_set_bitstream_pointers( num_bits = 0; /* set bitstream pointers for SCEs */ for ( k = 0; k < st_ivas->nSCE; k++ ) FOR( k = 0; k < st_ivas->nSCE; k++ ) { sts = st_ivas->hSCE[k]->hCoreCoder; sts[0]->bit_stream = st_ivas->bit_stream + num_bits; Loading @@ -4425,7 +4428,7 @@ void ivas_set_bitstream_pointers( } /* set bitstream pointers for CPEs */ for ( k = 0; k < st_ivas->nCPE; k++ ) FOR( k = 0; k < st_ivas->nCPE; k++ ) { sts = st_ivas->hCPE[k]->hCoreCoder; sts[0]->bit_stream = st_ivas->bit_stream + num_bits; Loading
lib_com/fd_cng_com_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -3259,11 +3259,11 @@ void SynthesisSTFT_dirac_fx( case 640: fftScale = FFT_SCALING_640; move32(); break; BREAK; case 512: fftScale = FFT_SCALING_512; move32(); break; BREAK; default: assert( !"Not supported FFT length!" ); } Loading
lib_com/ivas_mc_com_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -153,7 +153,7 @@ Word16 ivas_mc_ls_setup_get_num_channels_fx( case MC_LS_SETUP_7_1: nchan = 8; move16(); break; BREAK; case MC_LS_SETUP_5_1_2: nchan = 8; move16(); Loading
lib_com/longarith.c +19 −17 Original line number Diff line number Diff line Loading @@ -62,18 +62,18 @@ void longadd( Word32 carry = 0; assert( lena >= lenb ); for ( h = 0; h < lenb; h++ ) FOR( h = 0; h < lenb; h++ ) { carry += ( (UWord32) a[h] ) + ( (UWord32) b[h] ); a[h] = (UWord16) carry; carry = carry >> 16; carry = L_shr( carry, 16 ); } for ( ; h < lena; h++ ) FOR( ; h < lena; h++ ) { carry = ( (UWord32) a[h] ) + carry; a[h] = (UWord16) carry; carry = carry >> 16; carry = L_shr( carry, 16 ); } assert( carry == 0 ); /* carry != 0 indicates addition overflow */ Loading Loading @@ -106,26 +106,26 @@ void longshiftright( lena -= intb; fracb = b & 0xF; if ( fracb ) IF( fracb ) { fracb_u = 16 - fracb; for ( k = 0; k < lena - 1; k++ ) FOR( k = 0; k < lena - 1; k++ ) { d[k] = ( ( a[k] >> fracb ) | ( a[k + 1] << fracb_u ) ) & 0xFFFF; } d[k] = ( a[k] >> fracb ); k++; } else ELSE { for ( k = 0; k < lena; k++ ) FOR( k = 0; k < lena; k++ ) { d[k] = a[k]; } } /* fill remaining upper bits with zero */ for ( ; k < lend; k++ ) FOR( ; k < lend; k++ ) { d[k] = 0; } Loading Loading @@ -175,30 +175,32 @@ void longshiftleft( Word16 fracb_l; /* shift right value for all lower words a[k-1] */ Word16 k = len - 1; intb = b >> 4; intb = shr( b, 4 ); fracb = b & 0xF; if ( fracb ) IF( fracb ) { fracb_l = 16 - fracb; for ( ; k > intb; k-- ) FOR( ; k > intb; k-- ) { d[k] = ( a[k - intb] << fracb ) | ( a[k - intb - 1] >> fracb_l ); d[k] = ( shl( a[k - intb], fracb ) ) | ( shr( a[k - intb - 1], fracb_l ) ); } d[k] = ( a[k - intb] << fracb ); d[k] = shl( a[k - intb], fracb ); k--; } else ELSE { for ( ; k >= intb; k-- ) FOR( ; k >= intb; k-- ) { d[k] = a[k - intb]; move16(); } } for ( ; k >= 0; k-- ) FOR( ; k >= 0; k-- ) { d[k] = 0; move16(); } return; Loading
lib_com/parameter_bitmaping_fx.c +11 −8 Original line number Diff line number Diff line Loading @@ -54,9 +54,9 @@ void GetParameters( assert( ( paramsBitMap != NULL ) && ( nArrayLength > 0 ) && ( pParameter != NULL ) && ( pStream != NULL ) && ( pnSize != NULL ) && ( pnBits != NULL ) ); nParams = paramsBitMap->nParams; for ( index = 0; index < nArrayLength; index++ ) FOR( index = 0; index < nArrayLength; index++ ) { for ( iParam = 0; iParam < nParams; iParam++ ) FOR( iParam = 0; iParam < nParams; iParam++ ) { ParamBitMap const *const param = ¶msBitMap->params[iParam]; Loading @@ -64,11 +64,12 @@ void GetParameters( pSubStruct = param->GetParamValue( pParameter, index, &value ); #undef WMC_TOOL_SKIP /* If a function for encoding/decoding value is defined than it should take care of 0 */ if ( param->fZeroAllowed || ( param->EncodeValue != NULL ) ) test(); IF( param->fZeroAllowed || ( param->EncodeValue != NULL ) ) { *( *pStream )++ = value; } else ELSE { *( *pStream )++ = value - 1; } Loading @@ -76,7 +77,8 @@ void GetParameters( #define WMC_TOOL_SKIP *pnBits += ( param->nBits != 0 ) ? param->nBits : param->GetNumberOfBits( value, index ); #undef WMC_TOOL_SKIP if ( ( param->pSubParamBitMap != NULL ) && ( value > 0 ) ) test(); IF( ( param->pSubParamBitMap != NULL ) && ( value > 0 ) ) { GetParameters( param->pSubParamBitMap, value, ( pSubStruct != NULL ) ? pSubStruct : pParameter, pStream, pnSize, pnBits ); } Loading Loading @@ -163,9 +165,9 @@ void SetParameters( assert( ( paramsBitMap != NULL ) && ( nArrayLength > 0 ) && ( pParameter != NULL ) && ( pStream != NULL ) && ( pnSize != NULL ) ); nParams = paramsBitMap->nParams; for ( index = 0; index < nArrayLength; index++ ) FOR( index = 0; index < nArrayLength; index++ ) { for ( iParam = 0; iParam < nParams; iParam++ ) FOR( iParam = 0; iParam < nParams; iParam++ ) { ParamBitMap const *const param = ¶msBitMap->params[iParam]; /* If a function for encoding/decoding value is defined than it should take care of 0 */ Loading @@ -175,7 +177,8 @@ void SetParameters( pSubStruct = param->SetParamValue( pParameter, index, value ); #undef WMC_TOOL_SKIP ++*pnSize; if ( ( param->pSubParamBitMap != NULL ) && ( value > 0 ) ) test(); IF( ( param->pSubParamBitMap != NULL ) && ( value > 0 ) ) { SetParameters( param->pSubParamBitMap, value, ( pSubStruct != NULL ) ? pSubStruct : pParameter, pStream, pnSize ); } Loading