Commit 1c9da7c7 authored by fotopoulou's avatar fotopoulou
Browse files

Merge branch '752-osba-mct-misconfiguration-causes-crashes-at-256kbps' into 'main'

[non BE] [ref-using-main]fix for issue 752 under CR_FIX_752_OSBA_MISCONFIG_MCT

See merge request !1042
parents eb137f09 74a03fca
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -366,7 +366,7 @@ codec-smoke-test:
  extends:
    - .test-job-linux-needs-testv-dir
    - .rules-merge-request
  timeout: "10 minutes"
  timeout: "15 minutes"
  stage: test
  needs: ["build-codec-linux-cmake", "build-codec-linux-make", "build-codec-instrumented-linux", "build-codec-sanitizers-linux"]
  script:
+4 −0
Original line number Diff line number Diff line
@@ -2740,7 +2740,11 @@ ivas_error preview_indices(
            /* Read SBA planar flag and SBA order */
            st_ivas->sba_planar = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + IVAS_COMBINED_FORMAT_SIGNALLING_BITS] == 1 );

#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
            if ( total_brate >= IVAS_256k )
#else
            if ( total_brate > IVAS_256k )
#endif
            {
                st_ivas->sba_order = ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + IVAS_COMBINED_FORMAT_SIGNALLING_BITS + 2] == 1 );
                st_ivas->sba_order += 2 * ( bit_stream[IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + IVAS_COMBINED_FORMAT_SIGNALLING_BITS + 1] == 1 );
+1 −0
Original line number Diff line number Diff line
@@ -169,6 +169,7 @@
#define NONBE_FIX_729_ASAN_2ISM_ACELP                         /* VA: issue 729: fix ASAN ACELP errors with 2 ISM coding using LTV */
#define NONBE_FIX_694_OMASA_ACELP                             /* Nokia: Issue #694: OMASA crash in ACELP with extreme item */
#define NONBE_FIX_760_COHERENCE_MASA                          /* Nokia: Issue 760: fixes decoder crash for some cases when all energy ratios are 1 */
#define NONBE_FIX_752_OSBA_MISCONFIG_MCT                      /* FhG: issue 752: misconfiguration of MCT causes crashes for coding with sampling rate under 48kHz at 256kbps*/
/* ##################### End NON-BE switches ############################# */

/* ################## End DEVELOPMENT switches ######################### */
+15 −0
Original line number Diff line number Diff line
@@ -60,6 +60,9 @@ ivas_error ivas_corecoder_dec_reconfig(
    int16_t n, sce_id, cpe_id, output_frame;
    int16_t nSCE_existing, nCPE_existing;
    int32_t ivas_total_brate;
#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
    int16_t nchan_transport_real;
#endif
    MC_MODE last_mc_mode;
    DECODER_CONFIG_HANDLE hDecoderConfig;
    ivas_error error;
@@ -82,6 +85,14 @@ ivas_error ivas_corecoder_dec_reconfig(
        last_mc_mode = MC_MODE_NONE;
    }

#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
    nchan_transport_real = st_ivas->nchan_transport;

    if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
    {
        nchan_transport_real += st_ivas->nchan_ism;
    }
#endif
    /*-----------------------------------------------------------------*
     * Allocate, initialize, and configure SCE/CPE/MCT handles
     *-----------------------------------------------------------------*/
@@ -105,7 +116,11 @@ ivas_error ivas_corecoder_dec_reconfig(
        }
    }

#ifdef NONBE_FIX_752_OSBA_MISCONFIG_MCT
    if ( nchan_transport_real == nchan_transport_old && st_ivas->nSCE == nSCE_old && st_ivas->nCPE == nCPE_old )
#else
    if ( st_ivas->nchan_transport == nchan_transport_old && st_ivas->nSCE == nSCE_old && st_ivas->nCPE == nCPE_old )
#endif
    {
        for ( sce_id = 0; sce_id < st_ivas->nSCE; sce_id++ )
        {
+4 −3
Original line number Diff line number Diff line
@@ -1531,11 +1531,12 @@ ivas_error ivas_init_decoder(
            st_ivas->hCPE[0]->hCoreCoder[0] = st_ivas->hSCE[0]->hCoreCoder[0]; /* don't allocate unnecessary core coder, simply point to core coder of SCE element */
            st_ivas->hCPE[0]->hCoreCoder[1] = NULL;
        }

#ifndef NONBE_FIX_752_OSBA_MISCONFIG_MCT
        if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
        {
            st_ivas->nchan_transport += st_ivas->nchan_ism;
        }
#endif
        if ( st_ivas->nCPE > 1 )
        {
            if ( ( error = create_mct_dec( st_ivas ) ) != IVAS_ERR_OK )
@@ -1543,12 +1544,12 @@ ivas_error ivas_init_decoder(
                return error;
            }
        }

#ifndef NONBE_FIX_752_OSBA_MISCONFIG_MCT
        if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
        {
            st_ivas->nchan_transport -= st_ivas->nchan_ism;
        }

#endif
        if ( st_ivas->ism_mode == ISM_SBA_MODE_DISC )
        {
            if ( ( error = ivas_ism_metadata_dec_create( st_ivas, st_ivas->nchan_ism, temp_brate ) ) != IVAS_ERR_OK )
Loading