Commit 8f013f70 authored by Jan Kiene's avatar Jan Kiene
Browse files

make DFT-Stereo DTX use 5.2kbps SIDs with padding only

parent f61c8965
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2981,9 +2981,11 @@ void dtx_read_padding_bits(
    int16_t num_bits )
{
    /* TODO: temporary hack, need to decide what to do with core-coder bitrate */
    st->total_brate = 3200;
    int16_t tmp;
    tmp = st->total_brate;
    st->total_brate = st->total_brate + num_bits * FRAMES_PER_SEC;
    get_next_indice(st, num_bits);
    st->total_brate = 2400;
    st->total_brate = tmp;
}
#endif

+5 −1
Original line number Diff line number Diff line
@@ -91,7 +91,8 @@ void stereo_dft_dec_sid_coh(
    int16_t b;

#ifdef ALIGN_SID_SIZE
    nr_of_sid_stereo_bits = ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS;
    /* 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;
#else
    nr_of_sid_stereo_bits = ( IVAS_SID_4k4 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS;
#endif
@@ -177,6 +178,9 @@ void stereo_dft_dec_sid_coh(
        ( *nb_bits )++;
    }

#ifdef ALIGN_SID_SIZE
    dtx_read_padding_bits( st, ( IVAS_SID_5k2 - 4400 ) / FRAMES_PER_SEC );
#endif
    return;
}

+6 −1
Original line number Diff line number Diff line
@@ -149,7 +149,8 @@ void stereo_dft_enc_sid_coh(
    int16_t n;

#ifdef ALIGN_SID_SIZE
    nr_of_sid_stereo_bits = ( IVAS_SID_5k2 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS;
    /* 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;
#else
    nr_of_sid_stereo_bits = ( IVAS_SID_4k4 - SID_2k40 ) / FRAMES_PER_SEC - SID_FORMAT_NBITS;
#endif
@@ -307,6 +308,10 @@ void stereo_dft_enc_sid_coh(
        ( *nb_bits )++;
    }

#ifdef ALIGN_SID_SIZE
    push_next_indice( hBstr, zeropad, ( IVAS_SID_5k2 - 4400 ) / FRAMES_PER_SEC );
#endif

    return;
}