Loading lib_com/bitstream.c +4 −1 Original line number Diff line number Diff line Loading @@ -1975,19 +1975,22 @@ ivas_error preview_indices( } else if ( st_ivas->ivas_format == SBA_FORMAT ) { #ifndef ORDER_BITS_ADDITION if ( ( st_ivas->sba_mode != SBA_MODE_SPAR ) || ( ( st_ivas->sba_mode == SBA_MODE_SPAR ) && ( total_brate >= IVAS_256k ) ) ) { #endif /* Read SBA planar flag and SBA order */ st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA] == 1 ); st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 ); st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 ); #ifndef ORDER_BITS_ADDITION } else { st_ivas->sba_planar = 0; st_ivas->sba_order = 1; } #endif ivas_sba_config( total_brate, st_ivas->sba_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &( st_ivas->nSCE ), &( st_ivas->nCPE ), &( st_ivas->element_mode_init ), st_ivas->sba_mode ); } } Loading lib_com/ivas_prot.h +4 −1 Original line number Diff line number Diff line Loading @@ -2586,8 +2586,11 @@ void ivas_mct_core_enc( const int16_t nChannels, /* i : number of channels to be coded */ const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const int16_t switch_bw, /* i : flag bandwidth switch occurance */ const int16_t lfe_bits, /* i : bits spent for LFE */ const int16_t lfe_bits /* i : bits spent for LFE */ #ifndef ORDER_BITS_ADDITION , const SBA_MODE sba_mode /* i : SBA mode */ #endif #ifdef FIX_I1_113 , const int16_t sba_order Loading lib_com/ivas_rom_com.c +6 −1 Original line number Diff line number Diff line Loading @@ -903,7 +903,12 @@ const ivas_spar_br_table_t ivas_spar_br_table_consts[IVAS_SPAR_BR_TABLE_LEN] = { /* When AGC is ON additional (AGC_BITS_PER_CH+1) bits may be taken from each EVS channel so minimum EVS bitrate per channel can be min EVS bitrates as per the table - AGC_BITS_PER_CH */ { 24400, 0, 1, FB, 24000, 1, WYXZ, 1, 0,{ { 16400, 15200, 24350 } }, { 24400, 0, 1, FB, 24000, 1, WYXZ, 1, 0, #ifndef ORDER_BITS_ADDITION { { 16400, 15200, 24350 } }, #else { { 16400, 14850, 24350 } }, #endif { { 15, 1, 5, 1 },{ 15, 1, 3, 1 },{ 7, 1, 3, 1 } }, 0, 0, 0 }, { 32000, 0, 1, FB, 24000, 1, WYXZ, 1, 0,{{ 24000, 20450, 31950 }},{ { 21, 1, 5, 1 },{ 15, 1, 5, 1 },{ 15, 1, 3, 1 } }, 0, 0, 0 }, Loading lib_com/ivas_spar_com.c +8 −6 Original line number Diff line number Diff line Loading @@ -2148,13 +2148,14 @@ void ivas_spar_set_bitrate_config( total_bits += ( int16_t )( ivas_spar_br_table_consts[table_idx].evs_brs[i][0] / FRAMES_PER_SEC ); max_bits += ( int16_t )( ivas_spar_br_table_consts[table_idx].evs_brs[i][1] / FRAMES_PER_SEC ); } #ifndef ORDER_BITS_ADDITION if ( ivas_total_brate >= IVAS_256k ) { #endif pSpar_md_cfg->tgt_bits_per_blk = (int16_t) ( ivas_total_brate / FRAMES_PER_SEC ) - IVAS_FORMAT_SIGNALING_NBITS_SBA - SBA_PLANAR_BITS - SBA_ORDER_BITS - length - total_bits; pSpar_md_cfg->max_bits_per_blk = (int16_t) ( ivas_total_brate / FRAMES_PER_SEC ) - IVAS_FORMAT_SIGNALING_NBITS_SBA - SBA_PLANAR_BITS - SBA_ORDER_BITS - length - max_bits; // TODO : do this for lower bitrates as well once order/planar bits are added md_coding_bits_header = SPAR_NUM_CODING_STRAT_BITS + pSpar_md_cfg->quant_strat_bits; pSpar_md_cfg->tgt_bits_per_blk -= md_coding_bits_header; pSpar_md_cfg->max_bits_per_blk -= md_coding_bits_header; Loading @@ -2164,6 +2165,7 @@ void ivas_spar_set_bitrate_config( pSpar_md_cfg->tgt_bits_per_blk += md_coding_bits_header; pSpar_md_cfg->max_bits_per_blk += md_coding_bits_header; #ifndef ORDER_BITS_ADDITION } else { Loading @@ -2174,7 +2176,7 @@ void ivas_spar_set_bitrate_config( pSpar_md_cfg->tgt_bits_per_blk = (int16_t) ceilf( ( 1.0f * pSpar_md_cfg->tgt_bits_per_blk * num_bands ) / IVAS_MAX_NUM_BANDS ); pSpar_md_cfg->max_bits_per_blk = (int16_t) ceilf( ( 1.0f * pSpar_md_cfg->max_bits_per_blk * num_bands ) / IVAS_MAX_NUM_BANDS ); } #endif return; } Loading lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,8 @@ #define SIMPLIFY_SBA_RENDERING_LOGIC /* SBA rendering maintenance related to ticket #45 */ #define SBA_CLEANING /* SBA maintenance related to ticket #45 */ #define ORDER_BITS_ADDITION /* Adding order and planar bits to more spar bitrates */ #define DIRAC_DRCT_GAIN_TUNING #define FIX_34 /* Nokia: Fix bug in MASA format EXT output spherical indexing */ Loading Loading
lib_com/bitstream.c +4 −1 Original line number Diff line number Diff line Loading @@ -1975,19 +1975,22 @@ ivas_error preview_indices( } else if ( st_ivas->ivas_format == SBA_FORMAT ) { #ifndef ORDER_BITS_ADDITION if ( ( st_ivas->sba_mode != SBA_MODE_SPAR ) || ( ( st_ivas->sba_mode == SBA_MODE_SPAR ) && ( total_brate >= IVAS_256k ) ) ) { #endif /* Read SBA planar flag and SBA order */ st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA] == 1 ); st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 2] == 1 ); st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_SBA + 1] == 1 ); #ifndef ORDER_BITS_ADDITION } else { st_ivas->sba_planar = 0; st_ivas->sba_order = 1; } #endif ivas_sba_config( total_brate, st_ivas->sba_order, -1, &( st_ivas->nchan_transport ), st_ivas->sba_planar, &( st_ivas->nSCE ), &( st_ivas->nCPE ), &( st_ivas->element_mode_init ), st_ivas->sba_mode ); } } Loading
lib_com/ivas_prot.h +4 −1 Original line number Diff line number Diff line Loading @@ -2586,8 +2586,11 @@ void ivas_mct_core_enc( const int16_t nChannels, /* i : number of channels to be coded */ const int32_t ivas_total_brate, /* i : IVAS total bitrate */ const int16_t switch_bw, /* i : flag bandwidth switch occurance */ const int16_t lfe_bits, /* i : bits spent for LFE */ const int16_t lfe_bits /* i : bits spent for LFE */ #ifndef ORDER_BITS_ADDITION , const SBA_MODE sba_mode /* i : SBA mode */ #endif #ifdef FIX_I1_113 , const int16_t sba_order Loading
lib_com/ivas_rom_com.c +6 −1 Original line number Diff line number Diff line Loading @@ -903,7 +903,12 @@ const ivas_spar_br_table_t ivas_spar_br_table_consts[IVAS_SPAR_BR_TABLE_LEN] = { /* When AGC is ON additional (AGC_BITS_PER_CH+1) bits may be taken from each EVS channel so minimum EVS bitrate per channel can be min EVS bitrates as per the table - AGC_BITS_PER_CH */ { 24400, 0, 1, FB, 24000, 1, WYXZ, 1, 0,{ { 16400, 15200, 24350 } }, { 24400, 0, 1, FB, 24000, 1, WYXZ, 1, 0, #ifndef ORDER_BITS_ADDITION { { 16400, 15200, 24350 } }, #else { { 16400, 14850, 24350 } }, #endif { { 15, 1, 5, 1 },{ 15, 1, 3, 1 },{ 7, 1, 3, 1 } }, 0, 0, 0 }, { 32000, 0, 1, FB, 24000, 1, WYXZ, 1, 0,{{ 24000, 20450, 31950 }},{ { 21, 1, 5, 1 },{ 15, 1, 5, 1 },{ 15, 1, 3, 1 } }, 0, 0, 0 }, Loading
lib_com/ivas_spar_com.c +8 −6 Original line number Diff line number Diff line Loading @@ -2148,13 +2148,14 @@ void ivas_spar_set_bitrate_config( total_bits += ( int16_t )( ivas_spar_br_table_consts[table_idx].evs_brs[i][0] / FRAMES_PER_SEC ); max_bits += ( int16_t )( ivas_spar_br_table_consts[table_idx].evs_brs[i][1] / FRAMES_PER_SEC ); } #ifndef ORDER_BITS_ADDITION if ( ivas_total_brate >= IVAS_256k ) { #endif pSpar_md_cfg->tgt_bits_per_blk = (int16_t) ( ivas_total_brate / FRAMES_PER_SEC ) - IVAS_FORMAT_SIGNALING_NBITS_SBA - SBA_PLANAR_BITS - SBA_ORDER_BITS - length - total_bits; pSpar_md_cfg->max_bits_per_blk = (int16_t) ( ivas_total_brate / FRAMES_PER_SEC ) - IVAS_FORMAT_SIGNALING_NBITS_SBA - SBA_PLANAR_BITS - SBA_ORDER_BITS - length - max_bits; // TODO : do this for lower bitrates as well once order/planar bits are added md_coding_bits_header = SPAR_NUM_CODING_STRAT_BITS + pSpar_md_cfg->quant_strat_bits; pSpar_md_cfg->tgt_bits_per_blk -= md_coding_bits_header; pSpar_md_cfg->max_bits_per_blk -= md_coding_bits_header; Loading @@ -2164,6 +2165,7 @@ void ivas_spar_set_bitrate_config( pSpar_md_cfg->tgt_bits_per_blk += md_coding_bits_header; pSpar_md_cfg->max_bits_per_blk += md_coding_bits_header; #ifndef ORDER_BITS_ADDITION } else { Loading @@ -2174,7 +2176,7 @@ void ivas_spar_set_bitrate_config( pSpar_md_cfg->tgt_bits_per_blk = (int16_t) ceilf( ( 1.0f * pSpar_md_cfg->tgt_bits_per_blk * num_bands ) / IVAS_MAX_NUM_BANDS ); pSpar_md_cfg->max_bits_per_blk = (int16_t) ceilf( ( 1.0f * pSpar_md_cfg->max_bits_per_blk * num_bands ) / IVAS_MAX_NUM_BANDS ); } #endif return; } Loading
lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,8 @@ #define SIMPLIFY_SBA_RENDERING_LOGIC /* SBA rendering maintenance related to ticket #45 */ #define SBA_CLEANING /* SBA maintenance related to ticket #45 */ #define ORDER_BITS_ADDITION /* Adding order and planar bits to more spar bitrates */ #define DIRAC_DRCT_GAIN_TUNING #define FIX_34 /* Nokia: Fix bug in MASA format EXT output spherical indexing */ Loading