Loading lib_com/ivas_cnst.h +3 −2 Original line number Diff line number Diff line Loading @@ -79,6 +79,9 @@ typedef enum #define IVAS_FORMAT_SIGNALING_NBITS 2 /* number of bits for signaling the IVAS format */ #define IVAS_FORMAT_SIGNALING_NBITS_SBA ( IVAS_FORMAT_SIGNALING_NBITS + 1 ) #ifdef ARITH_HUFF_CODER_CHANGES #define IVAS_SBA_SIGNALING_OVERHEAD 550 #endif /*----------------------------------------------------------------------------------* Loading Loading @@ -1619,8 +1622,6 @@ typedef enum #define CLDFB_PAR_WEIGHT_START_BAND 7 #ifdef ARITH_HUFF_CODER_CHANGES #define IVAS_SBA_SIGNALLING_OVERHEAD 550 #define FRAMES_PER_SECOND_HUFF_ARITH 50 #define QUANT_STRAT_0 0 #define QUANT_STRAT_2 2 #endif Loading lib_enc/ivas_spar_md_enc.c +14 −12 Original line number Diff line number Diff line Loading @@ -112,11 +112,11 @@ ivas_error ivas_spar_md_enc_open( ivas_error error; int16_t num_channels, i, j; #ifdef ARITH_HUFF_CODER_CHANGES int16_t bits_per_PR, bits_per_C, bits_per_P = 0; int16_t bits_PR, bits_C, bits_P = 0; int32_t wc_coarse_strat = 0; int16_t num_bands_arith_huff = IVAS_MAX_NUM_BANDS; int16_t n_input, n_dmx, n_dec = 0; int16_t table_idx, quant_start = 0; int16_t table_idx, quant_strat = 0; #endif error = IVAS_ERR_OK; Loading Loading @@ -214,24 +214,26 @@ ivas_error ivas_spar_md_enc_open( #ifdef ARITH_HUFF_CODER_CHANGES /*calculate the worst case strat vlaue*/ if ( hEncoderConfig->ivas_total_brate <= 192000 ) { quant_start = QUANT_STRAT_2; table_idx = ivas_get_spar_table_idx( hEncoderConfig->ivas_total_brate, sba_order, SPAR_CONFIG_BW, NULL, NULL ); if ( ( ivas_spar_br_table_consts[table_idx].q_lvls[2][0] == 1 && ivas_spar_br_table_consts[table_idx].q_lvls[2][1] == 1 && ivas_spar_br_table_consts[table_idx].q_lvls[2][2] == 1 && ivas_spar_br_table_consts[table_idx].q_lvls[2][3] == 1 ) ) { quant_strat = QUANT_STRAT_0; } else { quant_start = QUANT_STRAT_0; table_idx = ivas_get_spar_table_idx( hEncoderConfig->ivas_total_brate, hEncoderConfig->sba_order, SPAR_CONFIG_BW, NULL, NULL ); quant_strat = QUANT_STRAT_2; } n_input = ivas_sba_get_nchan_metadata( hEncoderConfig->sba_order ); n_dmx = ivas_spar_br_table_consts[table_idx].nchan_transport; n_dec = n_input - n_dmx; bits_per_PR = ( (int16_t) log2( ivas_spar_br_table_consts[table_idx].q_lvls[quant_start][0] ) + 1 ) * ( n_input - 1 ); bits_per_C = ( (int16_t) log2( ivas_spar_br_table_consts[table_idx].q_lvls[quant_start][1] ) + 1 ) * ( ( n_dmx - 1 ) * n_dec ); bits_per_P = ( (int16_t) log2( ivas_spar_br_table_consts[table_idx].q_lvls[quant_start][2] ) + 1 ) * n_dec; wc_coarse_strat = bits_per_PR + bits_per_C + bits_per_P; wc_coarse_strat = ( wc_coarse_strat * num_bands_arith_huff * FRAMES_PER_SECOND_HUFF_ARITH ) + IVAS_SBA_SIGNALLING_OVERHEAD; bits_PR = ( (int16_t) log2( ivas_spar_br_table_consts[table_idx].q_lvls[quant_strat][0] ) + 1 ) * ( n_input - 1 ); bits_C = ( (int16_t) log2( ivas_spar_br_table_consts[table_idx].q_lvls[quant_strat][1] ) + 1 ) * ( ( n_dmx - 1 ) * n_dec ); bits_P = ( (int16_t) log2( ivas_spar_br_table_consts[table_idx].q_lvls[quant_strat][2] ) + 1 ) * n_dec; wc_coarse_strat = bits_PR + bits_C + bits_P; wc_coarse_strat = ( wc_coarse_strat * num_bands_arith_huff * FRAMES_PER_SECOND ) + IVAS_SBA_SIGNALING_OVERHEAD; wc_coarse_strat = wc_coarse_strat / FRAMES_PER_SECOND; hMdEnc->wc_strat = wc_coarse_strat; hMdEnc->wc_coarse_strat_buff = (Indice *) malloc( wc_coarse_strat * sizeof( Indice ) ); Loading lib_enc/ivas_stat_enc.h +1 −1 File changed.Contains only whitespace changes. Show changes Loading
lib_com/ivas_cnst.h +3 −2 Original line number Diff line number Diff line Loading @@ -79,6 +79,9 @@ typedef enum #define IVAS_FORMAT_SIGNALING_NBITS 2 /* number of bits for signaling the IVAS format */ #define IVAS_FORMAT_SIGNALING_NBITS_SBA ( IVAS_FORMAT_SIGNALING_NBITS + 1 ) #ifdef ARITH_HUFF_CODER_CHANGES #define IVAS_SBA_SIGNALING_OVERHEAD 550 #endif /*----------------------------------------------------------------------------------* Loading Loading @@ -1619,8 +1622,6 @@ typedef enum #define CLDFB_PAR_WEIGHT_START_BAND 7 #ifdef ARITH_HUFF_CODER_CHANGES #define IVAS_SBA_SIGNALLING_OVERHEAD 550 #define FRAMES_PER_SECOND_HUFF_ARITH 50 #define QUANT_STRAT_0 0 #define QUANT_STRAT_2 2 #endif Loading
lib_enc/ivas_spar_md_enc.c +14 −12 Original line number Diff line number Diff line Loading @@ -112,11 +112,11 @@ ivas_error ivas_spar_md_enc_open( ivas_error error; int16_t num_channels, i, j; #ifdef ARITH_HUFF_CODER_CHANGES int16_t bits_per_PR, bits_per_C, bits_per_P = 0; int16_t bits_PR, bits_C, bits_P = 0; int32_t wc_coarse_strat = 0; int16_t num_bands_arith_huff = IVAS_MAX_NUM_BANDS; int16_t n_input, n_dmx, n_dec = 0; int16_t table_idx, quant_start = 0; int16_t table_idx, quant_strat = 0; #endif error = IVAS_ERR_OK; Loading Loading @@ -214,24 +214,26 @@ ivas_error ivas_spar_md_enc_open( #ifdef ARITH_HUFF_CODER_CHANGES /*calculate the worst case strat vlaue*/ if ( hEncoderConfig->ivas_total_brate <= 192000 ) { quant_start = QUANT_STRAT_2; table_idx = ivas_get_spar_table_idx( hEncoderConfig->ivas_total_brate, sba_order, SPAR_CONFIG_BW, NULL, NULL ); if ( ( ivas_spar_br_table_consts[table_idx].q_lvls[2][0] == 1 && ivas_spar_br_table_consts[table_idx].q_lvls[2][1] == 1 && ivas_spar_br_table_consts[table_idx].q_lvls[2][2] == 1 && ivas_spar_br_table_consts[table_idx].q_lvls[2][3] == 1 ) ) { quant_strat = QUANT_STRAT_0; } else { quant_start = QUANT_STRAT_0; table_idx = ivas_get_spar_table_idx( hEncoderConfig->ivas_total_brate, hEncoderConfig->sba_order, SPAR_CONFIG_BW, NULL, NULL ); quant_strat = QUANT_STRAT_2; } n_input = ivas_sba_get_nchan_metadata( hEncoderConfig->sba_order ); n_dmx = ivas_spar_br_table_consts[table_idx].nchan_transport; n_dec = n_input - n_dmx; bits_per_PR = ( (int16_t) log2( ivas_spar_br_table_consts[table_idx].q_lvls[quant_start][0] ) + 1 ) * ( n_input - 1 ); bits_per_C = ( (int16_t) log2( ivas_spar_br_table_consts[table_idx].q_lvls[quant_start][1] ) + 1 ) * ( ( n_dmx - 1 ) * n_dec ); bits_per_P = ( (int16_t) log2( ivas_spar_br_table_consts[table_idx].q_lvls[quant_start][2] ) + 1 ) * n_dec; wc_coarse_strat = bits_per_PR + bits_per_C + bits_per_P; wc_coarse_strat = ( wc_coarse_strat * num_bands_arith_huff * FRAMES_PER_SECOND_HUFF_ARITH ) + IVAS_SBA_SIGNALLING_OVERHEAD; bits_PR = ( (int16_t) log2( ivas_spar_br_table_consts[table_idx].q_lvls[quant_strat][0] ) + 1 ) * ( n_input - 1 ); bits_C = ( (int16_t) log2( ivas_spar_br_table_consts[table_idx].q_lvls[quant_strat][1] ) + 1 ) * ( ( n_dmx - 1 ) * n_dec ); bits_P = ( (int16_t) log2( ivas_spar_br_table_consts[table_idx].q_lvls[quant_strat][2] ) + 1 ) * n_dec; wc_coarse_strat = bits_PR + bits_C + bits_P; wc_coarse_strat = ( wc_coarse_strat * num_bands_arith_huff * FRAMES_PER_SECOND ) + IVAS_SBA_SIGNALING_OVERHEAD; wc_coarse_strat = wc_coarse_strat / FRAMES_PER_SECOND; hMdEnc->wc_strat = wc_coarse_strat; hMdEnc->wc_coarse_strat_buff = (Indice *) malloc( wc_coarse_strat * sizeof( Indice ) ); Loading