Commit becf4c0d authored by vaclav's avatar vaclav
Browse files

cleaning

parent efa4d765
Loading
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -125,11 +125,7 @@ static ivas_error ivas_ism_bitrate_switching_dec(
#ifndef NONBE_1303_REND_GRANULARITY
    /* JBM: when granularity goes down (e.g. Discrete ISM with TD Obj Renderer -> ParamISM with binaural fastconv
            render what still fits in the new granularity */
#ifdef NONBE_1303_REND_GRANULARITY
    tc_granularity_new = ivas_jbm_dec_get_render_granularity( st_ivas->renderer_type, RENDERER_DISABLE, st_ivas->hDecoderConfig->output_Fs );
#else
    tc_granularity_new = ivas_jbm_dec_get_render_granularity( st_ivas->renderer_type, st_ivas->ivas_format, st_ivas->mc_mode, st_ivas->hDecoderConfig->output_Fs );
#endif

    if ( tc_granularity_new < st_ivas->hTcBuffer->n_samples_granularity )
    {
+1 −2
Original line number Diff line number Diff line
@@ -1505,9 +1505,8 @@ ivas_error ivas_masa_dec_reconfigure(
#ifndef NONBE_1303_REND_GRANULARITY
            if ( st_ivas->ivas_format == MASA_ISM_FORMAT && st_ivas->renderer_type == RENDERER_BINAURAL_PARAMETRIC && st_ivas->ism_mode == ISM_MASA_MODE_DISC )
            {
#ifndef NONBE_1303_REND_GRANULARITY
                n_samples_granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES ); /* Use the same granularity as tdrend */
#endif

                if ( n_samples_granularity > st_ivas->hTcBuffer->n_samples_granularity )
                {
                    if ( ( error = ivas_jbm_dec_set_discard_samples( st_ivas ) ) != IVAS_ERR_OK )
+0 −4
Original line number Diff line number Diff line
@@ -796,11 +796,7 @@ static ivas_error ivas_mc_dec_reconfig(
#ifndef NONBE_1303_REND_GRANULARITY
    /* JBM: when granularity goes down (e.g. MCT with CREND -> ParamMC with binaural fastconv
            render what still fits in the new granularity */
#ifdef NONBE_1303_REND_GRANULARITY
    tc_granularity_new = ivas_jbm_dec_get_render_granularity( st_ivas->renderer_type, RENDERER_DISABLE, st_ivas->hDecoderConfig->output_Fs );
#else
    tc_granularity_new = ivas_jbm_dec_get_render_granularity( st_ivas->renderer_type, st_ivas->ivas_format, st_ivas->mc_mode, st_ivas->hDecoderConfig->output_Fs );
#endif

    if ( tc_granularity_new < st_ivas->hTcBuffer->n_samples_granularity )
    {
+1 −8
Original line number Diff line number Diff line
@@ -1039,17 +1039,10 @@ ivas_error IVAS_DEC_ReadFormat(
        }

        *binaural_renderer_sec = IVAS_BIN_RENDERER_TYPE_NONE;
#ifdef NONBE_1303_REND_GRANULARITY
        if ( renderer_type_sec_new == RENDERER_BINAURAL_OBJECTS_TD )
        {
            *binaural_renderer_sec = IVAS_BIN_RENDERER_TYPE_TDREND;
        }
#else
        if ( st_ivas->ivas_format == MASA_ISM_FORMAT && st_ivas->ism_mode == ISM_MASA_MODE_DISC && output_config == IVAS_AUDIO_CONFIG_BINAURAL )
        {
            *binaural_renderer_sec = IVAS_BIN_RENDERER_TYPE_TDREND;
        }
#endif
#endif

        /* select HRTF audio configuration to load the right HRTF set for the external binary file */
@@ -1101,7 +1094,7 @@ ivas_error IVAS_DEC_ReadFormat(
        }

#ifdef NONBE_1303_REND_GRANULARITY
        /* JBM: handle cases when binaural renderer granularity changes (happens in bitrate switching) */
        /* JBM: compensate when binaural renderer granularity changes (happens in bitrate switching) */
        if ( st_ivas->ini_active_frame > 0 && st_ivas->hDecoderConfig->Opt_tsm &&
             ( ( renderer_type_old != st_ivas->renderer_type ) ||
               ( renderer_type_sec_old != renderer_type_sec_new ) ) )