Commit baad7c03 authored by janssonfr's avatar janssonfr
Browse files

Merge branch '418-using-the-correct-bitrate-for-unified-stereo-sid' into 'main'

[non BE] Fix 418 added in separate define

See merge request !569
parents db06b33a 9a41bbc4
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -167,6 +167,9 @@

#define FIX_401_DIRAC_RENDERER_META_READ_INDICES        /* Nokia: Issue 401: Fix metadata reading indices in DirAC renderer. */

#define FIX_406_IVAS_POSITION                           /* Eri: Issue 406: Unify IVAS_POSITION to use IVAS_VECTOR3 instead */
#define REND_DEBUGGING_REVISION                         /* VA: encapsulate rendering debugging options with DEBUGGING */
#define FIX_418_SID_BITRATE                             /* Eri: Issue 418: Using the correct bitrate for unified stereo SID */
#define PARAMMC_SHORT_ENC_MDFT                          /* FhG: Issue 410: complexity optimization for parametric Multichannel modes */
#define FIX_421_TD_INT_TUNE                             /* Eri: Issue 421: Increase use of interpolation in TD renderer filter transition */

+6 −0
Original line number Diff line number Diff line
@@ -90,8 +90,12 @@ void stereo_dft_dec_sid_coh(
    int16_t bits_tmp;
    int16_t b;

#ifdef FIX_418_SID_BITRATE
    nr_of_sid_stereo_bits = ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS;
#else
    /* TODO: still use old number of bits to keep bitexactness in output */
    nr_of_sid_stereo_bits = ( 4400 /*IVAS_SID_5k2*/ - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS;
#endif

    /* If the coherence is not encoded due to lack of bits set alpha to zero which leads to that the coherence */
    /* from the previous frame is used. */
@@ -174,7 +178,9 @@ void stereo_dft_dec_sid_coh(
        ( *nb_bits )++;
    }

#ifndef FIX_418_SID_BITRATE
    dtx_read_padding_bits( st, ( IVAS_SID_5k2 - 4400 ) / FRAMES_PER_SEC );
#endif

    return;
}
+6 −0
Original line number Diff line number Diff line
@@ -173,8 +173,12 @@ void stereo_dft_enc_sid_coh(
    int16_t alpha_level;
    int16_t n;

#ifdef FIX_418_SID_BITRATE
    nr_of_sid_stereo_bits = ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS;
#else
    /* TODO: still use old number of bits to keep bitexactness in output */
    nr_of_sid_stereo_bits = ( 4400 /*IVAS_SID_5k2*/ - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS;
#endif
    zeropad = 0;

    /* Encode coherence vector. Find best fixed predictor by minimizing prediction error on input vector.
@@ -329,7 +333,9 @@ void stereo_dft_enc_sid_coh(
        ( *nb_bits )++;
    }

#ifndef FIX_418_SID_BITRATE
    push_next_indice( hBstr, zeropad, ( IVAS_SID_5k2 - 4400 ) / FRAMES_PER_SEC );
#endif

    return;
}