Loading lib_enc/enc_prm_fx.c +23 −27 Original line number Diff line number Diff line Loading @@ -333,8 +333,8 @@ void enc_prm_fx( test(); test(); test(); IF( core != ACELP_CORE || st->coder_type == INACTIVE || ( st->last_core == ACELP_CORE && st->last_coder_type_raw == INACTIVE ) || IF( NE_16( core, ACELP_CORE ) || EQ_16( st->coder_type, INACTIVE ) || ( EQ_16( st->last_core, ACELP_CORE ) && EQ_16( st->last_coder_type_raw, INACTIVE ) ) || st->glr_reset ) { st->glr_idx[0] = 0; Loading Loading @@ -382,7 +382,6 @@ void enc_prm_fx( } /* Subframe parameters */ FOR( sfr = 0; sfr < nb_subfr; sfr++ ) { /* Pitch lag (4, 5, 6, 8 or 9 bits) */ Loading @@ -395,14 +394,12 @@ void enc_prm_fx( } /* Adaptive codebook filtering (1 bit) */ IF( EQ_16( st->acelp_cfg.ltf_mode, 2 ) ) { push_next_indice( hBstr, prm[j++], 1 ); } /*Innovative codebook*/ { move16(); j_old = j; Loading @@ -414,10 +411,8 @@ void enc_prm_fx( wordcnt = shr( ACELP_FIXED_CDK_BITS( st->acelp_cfg.fixed_cdk_index[sfr] ), 4 ); bitcnt = s_and( ACELP_FIXED_CDK_BITS( st->acelp_cfg.fixed_cdk_index[sfr] ), 15 ); FOR( ix = 0; ix < wordcnt; ix++ ) { push_next_indice( hBstr, prm[j++], 16 ); Loading @@ -429,7 +424,6 @@ void enc_prm_fx( } j = add( j_old, 8 ); /* Q0 */ } /* Gains (5b, 6b or 7b / subfr) */ n = ACELP_GAINS_BITS[st->acelp_cfg.gains_mode[sfr]]; Loading @@ -439,7 +433,7 @@ void enc_prm_fx( /*--------------------------------------------------------------------------------* * TCX20 * TCX20/10 parameters *--------------------------------------------------------------------------------*/ test(); Loading @@ -448,6 +442,7 @@ void enc_prm_fx( writeTCXparam_fx( st, hBstr, hm_cfg, param, nbits_header, nbits_start, nbits_lpc, NULL, NULL, NULL, -1 ); } #ifdef DEBUGGING total_nbbits = sub( hBstr->nb_bits_tot, nbits_start ); /* Q0 */ /* Check if total encoded bits does not exceed CBR target bits (->this must never happen) */ Loading @@ -456,6 +451,7 @@ void enc_prm_fx( fprintf( stderr, "AllocatedBits: %d Used bits: %d \n", st->bits_frame_core, total_nbbits ); assert( !"Core totalbits > CBR target bitrate" ); } #endif return; } Loading Loading
lib_enc/enc_prm_fx.c +23 −27 Original line number Diff line number Diff line Loading @@ -333,8 +333,8 @@ void enc_prm_fx( test(); test(); test(); IF( core != ACELP_CORE || st->coder_type == INACTIVE || ( st->last_core == ACELP_CORE && st->last_coder_type_raw == INACTIVE ) || IF( NE_16( core, ACELP_CORE ) || EQ_16( st->coder_type, INACTIVE ) || ( EQ_16( st->last_core, ACELP_CORE ) && EQ_16( st->last_coder_type_raw, INACTIVE ) ) || st->glr_reset ) { st->glr_idx[0] = 0; Loading Loading @@ -382,7 +382,6 @@ void enc_prm_fx( } /* Subframe parameters */ FOR( sfr = 0; sfr < nb_subfr; sfr++ ) { /* Pitch lag (4, 5, 6, 8 or 9 bits) */ Loading @@ -395,14 +394,12 @@ void enc_prm_fx( } /* Adaptive codebook filtering (1 bit) */ IF( EQ_16( st->acelp_cfg.ltf_mode, 2 ) ) { push_next_indice( hBstr, prm[j++], 1 ); } /*Innovative codebook*/ { move16(); j_old = j; Loading @@ -414,10 +411,8 @@ void enc_prm_fx( wordcnt = shr( ACELP_FIXED_CDK_BITS( st->acelp_cfg.fixed_cdk_index[sfr] ), 4 ); bitcnt = s_and( ACELP_FIXED_CDK_BITS( st->acelp_cfg.fixed_cdk_index[sfr] ), 15 ); FOR( ix = 0; ix < wordcnt; ix++ ) { push_next_indice( hBstr, prm[j++], 16 ); Loading @@ -429,7 +424,6 @@ void enc_prm_fx( } j = add( j_old, 8 ); /* Q0 */ } /* Gains (5b, 6b or 7b / subfr) */ n = ACELP_GAINS_BITS[st->acelp_cfg.gains_mode[sfr]]; Loading @@ -439,7 +433,7 @@ void enc_prm_fx( /*--------------------------------------------------------------------------------* * TCX20 * TCX20/10 parameters *--------------------------------------------------------------------------------*/ test(); Loading @@ -448,6 +442,7 @@ void enc_prm_fx( writeTCXparam_fx( st, hBstr, hm_cfg, param, nbits_header, nbits_start, nbits_lpc, NULL, NULL, NULL, -1 ); } #ifdef DEBUGGING total_nbbits = sub( hBstr->nb_bits_tot, nbits_start ); /* Q0 */ /* Check if total encoded bits does not exceed CBR target bits (->this must never happen) */ Loading @@ -456,6 +451,7 @@ void enc_prm_fx( fprintf( stderr, "AllocatedBits: %d Used bits: %d \n", st->bits_frame_core, total_nbbits ); assert( !"Core totalbits > CBR target bitrate" ); } #endif return; } Loading