Commit 04b34583 authored by bayers's avatar bayers
Browse files

fix #979, fixes offsets into shared buffers for OSBA and stereo with LS...

fix #979, fixes offsets into shared buffers for OSBA and stereo with LS conversion decoding, fixes a small bug in the ISM TC digest function.
parent 0d466098
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@
#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_979_OSBA_STEREO_5MS                           /* FhG : issue #979 : 5ms and 20ms output different for OSBA and stereo */
/* ##################### End NON-BE switches ########################### */

/* ################## End DEVELOPMENT switches ######################### */
+4 −0
Original line number Diff line number Diff line
@@ -1029,7 +1029,11 @@ void ivas_ism_dec_digest_tc(
        }

        /* also get the gains here */
#ifdef NONBE_FIX_979_OSBA_STEREO_5MS
        num_objects = st_ivas->nchan_ism;
#else
        num_objects = st_ivas->nchan_transport;
#endif
        for ( i = 0; i < num_objects; i++ )
        {
            mvr2r( st_ivas->hIsmRendererData->gains[i], st_ivas->hIsmRendererData->prev_gains[i], MAX_OUTPUT_CHANNELS );
+4 −0
Original line number Diff line number Diff line
@@ -984,7 +984,11 @@ ivas_error ivas_jbm_dec_render(
    {
        for ( n = 0; n < st_ivas->hTcBuffer->nchan_buffer_full; n++ )
        {
#ifdef NONBE_FIX_979_OSBA_STEREO_5MS
            p_tc[n] = &p_output[n][st_ivas->hTcBuffer->n_samples_rendered];
#else
            p_tc[n] = p_output[n];
#endif
        }

        for ( n = 0; n < MAX_TRANSPORT_CHANNELS + MAX_NUM_OBJECTS; n++ )
+14 −1
Original line number Diff line number Diff line
@@ -267,10 +267,23 @@ ivas_error ivas_osba_render_sf(
        p_output_ism[n] = &output_ism[n][0];
    }

#ifdef NONBE_FIX_979_OSBA_STEREO_5MS
    if ( !st_ivas->hDecoderConfig->Opt_tsm )
    {
        int16_t tc_offset;
        tc_offset = st_ivas->hTcBuffer->n_samples_rendered;
#endif
        for ( n = 0; n < st_ivas->nchan_ism; n++ )
        {
#ifdef NONBE_FIX_979_OSBA_STEREO_5MS
            mvr2r( &p_output[n][tc_offset], &output_ism[n][tc_offset], nSamplesAsked );
#else
        mvr2r( p_output[n], output_ism[n], nSamplesAsked );
#endif
        }
#ifdef NONBE_FIX_979_OSBA_STEREO_5MS
    }
#endif

    if ( ( error = ivas_sba_dec_render( st_ivas, nSamplesAsked, nSamplesRendered, nSamplesAvailableNext, p_output ) ) != IVAS_ERR_OK )
    {