Commit 7e8b9c43 authored by janssonfr's avatar janssonfr
Browse files

Fix 418 added in separate define

parent 998c3935
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -171,7 +171,7 @@
#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 */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+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;
}