Commit 9a68006f authored by reutelhuber's avatar reutelhuber
Browse files

fix crashes in MCT bitrate switching under FIX_MCT_BS_CRASH

parent 5edfd1b7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -159,6 +159,7 @@

#define CORECODER_BITRATE_SWITCHING                     /* Issue 133: support bitrate switching in core-coder */
#define MC_BITRATE_SWITCHING                            /* Issue 116: support bitrate switching in MC format  */
#define FIX_MCT_BS_CRASH


/* ################## End DEVELOPMENT switches ######################### */

lib_debug/mem_count.c

100644 → 100755
+4 −0
Original line number Diff line number Diff line
@@ -93,7 +93,11 @@ typedef INT64 int64_t;

/* This is the maximum number of allocations for which to keep information.
   It can be increased if required. */
#ifdef FIX_MCT_BS_CRASH
#define MAX_INFO_RECORDS 5000
#else
#define MAX_INFO_RECORDS 3000
#endif

/* This is the length after which the function name
   will be truncated when the summary is printed. */

lib_dec/ivas_mct_dec.c

100644 → 100755
+3 −0
Original line number Diff line number Diff line
@@ -458,6 +458,9 @@ ivas_error mct_dec_reconfigure(
     * run into a number of problems */
    for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ )
    {
#ifdef FIX_MCT_BS_CRASH
        st_ivas->hCPE[cpe_id]->element_brate = cp_bitrate;
#endif
        for ( n = 0; n < CPE_CHANNELS; n++ )
        {
            st = st_ivas->hCPE[cpe_id]->hCoreCoder[n];

lib_dec/ivas_mdct_core_dec.c

100644 → 100755
+4 −0
Original line number Diff line number Diff line
@@ -414,7 +414,11 @@ void ivas_mdct_dec_side_bits_frame_channel(
                param_lpc[0][0] = get_next_indice( st0, 1 ) << 1;

                /* read low br mode flag (if it is possible to be non-zero) */
#ifdef FIX_MCT_BS_CRASH
                if ( sts[0]->element_brate == IVAS_48k && !((sts[0]->core == TCX_20 && sts[1]->core == TCX_20) || sts[1]->mct_chan_mode == MCT_CHAN_MODE_LFE) )
#else
                if ( sts[0]->element_brate == IVAS_48k && !( sts[0]->core == TCX_20 && sts[1]->core == TCX_20 ) )
#endif
                {
                    sns_low_br_mode = get_next_indice( st0, 1 );
                }

lib_enc/ivas_mct_enc.c

100644 → 100755
+3 −0
Original line number Diff line number Diff line
@@ -392,6 +392,9 @@ ivas_error mct_enc_reconfigure(
    /* indicate LFE for appropriate core-coder channel */
    for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ )
    {
#ifdef FIX_MCT_BS_CRASH
        st_ivas->hCPE[cpe_id]->element_brate = cp_bitrate;
#endif
        for ( n = 0; n < CPE_CHANNELS; n++ )
        {
            st_ivas->hCPE[cpe_id]->hCoreCoder[n]->mct_chan_mode = MCT_CHAN_MODE_REGULAR;
Loading