Commit d59d6590 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'main' into 986-mct-encoder-crashing-with-bitrate-and-bandwidth-switching

parents 3e446302 1e778f66
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@ stages:
  - *mr-fetch-target-branch
  - *mr-get-target-commit
  - git checkout $target_commit
  - echo "Building reference codec at commit $target_commit"

  ### build reference binaries
  - *disable-debugging-macro
@@ -718,6 +719,7 @@ split-rendering-pytest-on-merge-request:
    - *mr-fetch-target-branch
    - *mr-get-target-commit
    - git checkout $target_commit
    - echo "Building reference codec at commit $target_commit"

    # build reference binaries
    - *enable-split-rendering
@@ -1126,6 +1128,7 @@ codec-comparison-on-main-push:
    ### compare to the previous merge commit in the main branch
    - git fetch origin main
    - git checkout $previous_merge_commit
    - echo "Building reference codec at commit $previous_merge_commit"

    ### build reference binaries
    - cd build
@@ -1237,6 +1240,7 @@ test-long-self-test:

    ### switch to main
    - git checkout main
    - echo "Building reference codec at commit $(git rev-parse HEAD)"

    ### build main (ref) binaries
    - cmake . -Bbuild-ref
+2 −0
Original line number Diff line number Diff line
@@ -445,7 +445,9 @@ ivas_error ivas_dirac_sba_config(
    else
    {
        hQMetaData->useLowerBandRes = 0;
#ifndef NONBE_FIX_973_HODIRAC_BAND_GROUPING
        if ( hodirac_flag == 0 )
#endif
        {
            nbands_coded = nbands - 1; /* always combine the last two bands */
        }
+3 −0
Original line number Diff line number Diff line
@@ -3683,6 +3683,9 @@ void generate_masking_noise_lb_dirac(
    HANDLE_FD_CNG_COM hFdCngCom,                                /* i/o: FD_CNG structure containing all buffers and variables */
    float *tdBuffer,                                            /* i/o: time-domain signal, if NULL no LB-CNA                 */
    const int16_t nCldfbTs,                                     /* i  : number of CLDFB slots that will be rendered           */
#ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING
    SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom,       /* i  : common spatial rendering parameters handle            */
#endif
    const int16_t cna_flag                                      /* i  : CNA flag for LB and HB                                */
);

+3 −1
Original line number Diff line number Diff line
@@ -176,7 +176,9 @@
#define NONBE_FIX_967_ISM_MONO_DMX                            /* FhG: issue 967: accumulating energies in ISM mono DMX */
#define NONBE_FIX_968_ISM_BRIR_WITH_HEADROTATION_5MS_FIX      /* FhG : issue #968: differences between 5ms and 20ms rendering for discrete ISM with BRIR and head rotation*/
#define NONBE_FIX_977_OSBA_GAIN_MISMATCH                      /* Dlb : issue 977 : Output gain mismatch for different bit rates in OSBA */

#define NONBE_FIX_973_HODIRAC_BAND_GROUPING                   /* FhG: issue 973: empty parameter band in DirAC */
#define NONBE_FIX_951_MCMASA_5MS_RENDERING                    /* Nokia: issue #951: Differences for 5ms and 20ms rendering for McMASA at 13.2 kbps to BINAURAL */
#define NONBE_FIX_979_OSBA_STEREO_5MS                           /* FhG : issue #979 : 5ms and 20ms output different for OSBA and stereo */
#define BE_FIX_567_DOUBLE_STEREO_DMX                          /* NTT: Fix formal issues */   
#define NONBE_FIX_567_DOUBLE_STEREO_DMX                       /* Orange: Double-precision replaced by single-precision */   
#define NONBE_FIX_947_STEREO_DMX_EVS_POC                      /* Orange: Fix clicks on POC */  
+35 −1
Original line number Diff line number Diff line
@@ -1805,6 +1805,9 @@ void generate_masking_noise_lb_dirac(
    HANDLE_FD_CNG_COM hFdCngCom, /* i/o: FD_CNG structure containing all buffers and variables */
    float *tdBuffer,             /* i/o: time-domain signal, if NULL no LB-CNA                 */
    const int16_t nCldfbTs,      /* i  : number of CLDFB slots that will be rendered           */
#ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING
    SPAT_PARAM_REND_COMMON_DATA_HANDLE hSpatParamRendCom, /* i  : common spatial rendering parameters handle            */
#endif
    const int16_t cna_flag /* i  : CNA flag for LB and HB                                */
)
{
@@ -1857,6 +1860,13 @@ void generate_masking_noise_lb_dirac(
    /* LB CLDFB - CNA from STFT: CNA applied only in channel 0*/
    if ( cna_flag && tdBuffer != NULL )
    {
#ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING
        int16_t cur_subframe;
        int16_t cur_subframe_start_outfs;
        int16_t cur_subframe_start_cngfs;
        int16_t slot_size_cng;
#endif

        while ( n_samples_out > 0 )
        {
            n_samples_out_loop = min( hFdCngCom->frameSize, n_samples_out );
@@ -1940,8 +1950,32 @@ void generate_masking_noise_lb_dirac(
            n_samples_out -= hFdCngCom->frameSize;
            n_samples_start += hFdCngCom->frameSize;
        }

#ifdef NONBE_FIX_951_MCMASA_5MS_RENDERING
        /* move generated noise to the 5ms subframe starts in the tc buffer according to the output sampling frequency to avoid
           overwriting it with the synthesis in case of shared tc and synth channel memory, i.e. non-TSM mode */
        slot_size_cng = hFdCngCom->frameSize / DEFAULT_JBM_CLDFB_TIMESLOTS;
        /* move start indices forward to the end of the last subframe */
        cur_subframe_start_outfs = nCldfbTs * hSpatParamRendCom->slot_size;
        cur_subframe_start_cngfs = nCldfbTs * slot_size_cng;

        /* go from the last subframe back and move the LB noise */
        for ( cur_subframe = hSpatParamRendCom->nb_subframes - 1; cur_subframe >= 0; cur_subframe-- )
        {
            int16_t move_size, subframe_size_outfs;
            move_size = slot_size_cng * hSpatParamRendCom->subframe_nbslots[cur_subframe];
            subframe_size_outfs = hSpatParamRendCom->subframe_nbslots[cur_subframe] * hSpatParamRendCom->slot_size;
            cur_subframe_start_outfs -= hSpatParamRendCom->subframe_nbslots[cur_subframe] * hSpatParamRendCom->slot_size;
            cur_subframe_start_cngfs -= hSpatParamRendCom->subframe_nbslots[cur_subframe] * slot_size_cng;
            /* move cna */
            mvr2r( tdBuffer + cur_subframe_start_cngfs, tdBuffer + cur_subframe_start_outfs, move_size );
            /* set everything else to zero */
            set_zero( tdBuffer + cur_subframe_start_outfs + move_size, subframe_size_outfs - move_size );
        }
#endif
    }


    pop_wmops();

    return;
Loading