Commit 4af195db authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into...

Merge branch 'main' into 184-scaling-of-old_synthesis-part-for-first-good-frame-after-frameloss-missing-in-mct
parents 0f03cb5b 7b39f63c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2186,7 +2186,7 @@ void ivas_spar_bitrate_dist(
    {
        for ( i = 0; i < nchan_transport; i++ )
        {
            core_range_bits[i] = (int16_t) ( ( ivas_spar_br_table_consts[table_idx].evs_brs[i][2] - ivas_spar_br_table_consts[table_idx].evs_brs[i][0] ) / FRAMES_PER_SEC );
            core_range_bits[i] = (int16_t) ( ( ivas_spar_br_table_consts[table_idx].core_brs[i][2] - ivas_spar_br_table_consts[table_idx].core_brs[i][0] ) / FRAMES_PER_SEC );
            core_bits_act[i] += min( residual_bits, core_range_bits[i] );
            residual_bits -= core_range_bits[i];

@@ -2200,7 +2200,7 @@ void ivas_spar_bitrate_dist(
    {
        for ( i = 0; i < nchan_transport; i++ )
        {
            core_range_bits[i] = (int16_t) ( ( ivas_spar_br_table_consts[table_idx].core_brs[i][0] - ivas_spar_br_table_consts[table_idx].evs_brs[i][1] ) / FRAMES_PER_SEC );
            core_range_bits[i] = (int16_t) ( ( ivas_spar_br_table_consts[table_idx].core_brs[i][0] - ivas_spar_br_table_consts[table_idx].core_brs[i][1] ) / FRAMES_PER_SEC );
        }

        overflow_bits = -residual_bits;
+1 −1
Original line number Diff line number Diff line
@@ -143,7 +143,7 @@
#define DISABLE_ADAP_RES_COD_TMP                        /* temporary fix for IVAS-403, disables adaptive residual coding */
/*#define ITD_WINNER_GAIN_MODIFY */                     /* ITD optimization - WORK IN PROGRESS */
/*#define FIX_I4_OL_PITCH*/                             /* fix open-loop pitch used for EVS core switching */
/*#define FIX_I1_113*/                                  /* under review : MCT bit distribution optimization for SBA high bitrates*/
#define FIX_I1_113                                      /* under review : MCT bit distribution optimization for SBA high bitrates*/
#define PRINT_SBA_ORDER                                 /* Issue 179: print-out also the SBA order of IVAS SBA format to stdout */
#define SPAR_STEREO_NO_DIRAC                            /* Issue 180: skip DirAC processing channels for stereo output */
#define AGC_TUNING_IMPROVEMENT                          /* Issue 168: Enable AGC for low bit rate (1 TC) */
+1 −1
Original line number Diff line number Diff line
@@ -136,7 +136,7 @@ static void AdjustChannelRatios(
    force_ch_bit_ratios[2] = 5;
    force_ch_bit_ratios[3] = 3;
#else
    ivas_spar_bitrate_dist( temp_brs, nAvailBits, , sba_order, 3 );
    ivas_spar_bitrate_dist( temp_brs, nAvailBits, ivas_total_brate, sba_order, (int16_t) FB );

    sum_ratio = 0.0f;
    for ( i = 0; i < nChannels; i++ )
+15 −5
Original line number Diff line number Diff line
@@ -964,10 +964,13 @@ class IvasModeRunner(IvasModeCollector.IvasModeCollector):
        nd = 0
        nm = 0
        for mode in self.flat_mode_list:
            nm += 1
            nel = len(self.flat_mode_list[mode]["item_list"])
            nd += len(self.flat_mode_list[mode]["cmd"]["dec"]) * nel
            ne += nel
            nd_tmp = len(self.flat_mode_list[mode]["cmd"]["dec"]) * nel
            ne_tmp = nel
            if nd_tmp != 0 and ne_tmp != 0:
                nm += 1
                nd += nd_tmp
                ne += ne_tmp
        self.stats["num_modes"] = nm
        if self.run_encoder:
            self.stats["num_encs_total"] = ne
@@ -1528,6 +1531,13 @@ class IvasModeRunner(IvasModeCollector.IvasModeCollector):

    def run_enc_dec_threads(self):
        self.get_modes_initial_statistics()

        self.results = []
        # check if there are any files found
        if self.stats["num_encs_total"] == 0 and self.stats["num_decs_total"] == 0:
            self.logger.error("Found no items to run the modes.")
            raise NoInputForAnyModesFound

        self.create_enc_queue()

        self.dec_queue = {
@@ -1536,7 +1546,6 @@ class IvasModeRunner(IvasModeCollector.IvasModeCollector):
            "all_encoded": False,
        }
        # run all encoders
        self.results = []
        run_dec = 1
        tasks_enc = []
        tasks_dec = []
@@ -1648,4 +1657,5 @@ class IvasModeRunner(IvasModeCollector.IvasModeCollector):
        return decoded_item_list


# if __name__ == '__main__':
class NoInputForAnyModesFound(Exception):
    pass
 No newline at end of file