Commit c7e76b25 authored by vaclav's avatar vaclav
Browse files

FIX_2396_OOB_JBM_16KHZ

parent 2eeee757
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -171,6 +171,8 @@
#define FIX_1465_SWB_TBE_RANDOM_VECTOR_CREATION         /* Dolby: issue 1465: Fix constant in create_random_vector() to allow more reliable fixed point port */
#define FIX_BASOP_2317_UNINIT_VALUE_IN_STEREO_CNG       /* Eri: Basop issue 2317: Uninitialized value read in case of DTX and BW switching   */
#define FIX_1283_STEREO_DFT_COLLAPSE                    /* FhG: issue 1283: fix for critical issue with DFT stereo core coder */
#define FIX_2396_OOB_JBM_16KHZ                          /* VA: basop issue 2396: fix OOB scaling of buffer output_32_fx[] in JBM at 16kHz */

/* ##################### End NON-BE switches ########################### */

/* ################## End MAINTENANCE switches ######################### */
+24 −0
Original line number Diff line number Diff line
@@ -79,6 +79,30 @@ ivas_error ivas_dec(

    output_frame = (int16_t) ( output_Fs / FRAMES_PER_SEC );

#ifdef FIX_2396_OOB_JBM_16KHZ
    if ( st_ivas->hDecoderConfig->Opt_tsm )
    {
        int16_t len_offset, offset;
        DECODER_TC_BUFFER_HANDLE hTcBuffer;
        hTcBuffer = st_ivas->hTcBuffer;

        /* buffers are shared between 'hTcBuffer->tc[]' and 'p_output_f[]':
           set TC buffers to their original locations if they were changed in ivas_dec_feed_tc_to_renderer() */
        len_offset = NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS );

        IF( LT_16( len_offset, L_FRAME48k ) )
        {
            offset = 0;
            for( n = 0; n < s_max( hTcBuffer->nchan_transport_rend, hTcBuffer->nchan_buffer_full ); n++ )
            {
                hTcBuffer->tc[n] = &hTcBuffer->tc_buffer[offset];
                st_ivas->p_output_f[n] = hTcBuffer->tc[n];
                offset += L_FRAME48k;
            }
        }
    }

#endif
    /* set pointers to transport channels audio */
    for ( n = 0; n < MAX_TRANSPORT_CHANNELS; n++ )
    {