Commit e144d637 authored by bayers's avatar bayers
Browse files

fix variable speed decoding, fix OSBA binaural rendering (prevent overwriting...

fix variable speed decoding, fix OSBA binaural rendering (prevent overwriting of subframe info in the main TC buffer)
parent 35cccbdf
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1604,7 +1604,11 @@ static bool parseCmdlIVAS_dec(
    }

#ifdef API_5MS_BASELINE
    if ( ( !arg->enableHeadRotation ) && ( !arg->enableExternalOrientation ) )
    if ( ( !arg->enableHeadRotation ) && ( !arg->enableExternalOrientation )
#ifdef VARIABLE_SPEED_DECODING
         && ( !arg->tsmEnabled )
#endif
    )
    {
        arg->enable5ms = false;
    }
+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@
/*#define DEBUG_BINAURAL_FILTER_DESIGN*/        /* debugging of Crend binaural filter design */
/*#define DEBUG_AGC_ENCODER_CMD_OPTION*/        /* Ability to force enable or disable AGC behaviour in DIRAC/SPAR via command line option */
/*#define DEBUG_JBM_CMD_OPTION*/                /* ability for telling the decoder the frontend fetch size and to not delay compensate for bad frames at the beginning */
/*#define VARIABLE_SPEED_DECODING*/                 /* variable speed decoding employing the JBM functioniality; move to DEBUGGING after build for disabled is fixed */
#define VARIABLE_SPEED_DECODING                 /* variable speed decoding employing the JBM functioniality; move to DEBUGGING after build for disabled is fixed */

/*Split Rendering Debug switches*/
/*#define DBG_WAV_WRITER*/                      /* add debugging function dbgwrite_wav() */
+24 −16
Original line number Diff line number Diff line
@@ -1235,8 +1235,15 @@ void ivas_spar_dec_set_render_map(
    set_s( hSpar->render_to_md_map, 0, MAX_JBM_SUBFRAMES_5MS * JBM_CLDFB_SLOTS_IN_SUBFRAME );
    ivas_jbm_dec_get_adapted_subframes( nCldfbTs, hSpar->subframe_nbslots, &hSpar->nb_subframes );
#ifdef API_5MS
    /* copy also to tc buffer */
    /* only for non-combined formats and combinded formats w/o discrete objects */
#ifdef JBM_FOR_OSBA
    if ( !( st_ivas->ivas_format == SBA_ISM_FORMAT && st_ivas->ism_mode == ISM_SBA_MODE_DISC ) )
#endif
    {
        st_ivas->hTcBuffer->nb_subframes = hSpar->nb_subframes;
        mvs2s( hSpar->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hSpar->nb_subframes );
    }
#endif
    ivas_jbm_dec_get_md_map( DEFAULT_JBM_CLDFB_TIMESLOTS, nCldfbTs, 1, 0, DEFAULT_JBM_CLDFB_TIMESLOTS, hSpar->render_to_md_map );

@@ -1556,7 +1563,8 @@ void ivas_spar_dec_upmixer_sf(
            for ( i = 0; i < nchan_transport; i++ )
            {
                tmp = roundf( output[i][j] * PCM16_TO_FLT_FAC );
                pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B : (short) tmp;
                pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B
                                                                           : (short) tmp;
                dbgwrite( &pcm, sizeof( int16_t ), 1, 1, "dmx_dec.raw" );
            }
        }