Commit c6bc4537 authored by vaclav's avatar vaclav
Browse files

revert improvements

parent fe75ef08
Loading
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -1229,11 +1229,7 @@ int main(
        masaIds[i] = 0u;
    }

    if ( ( error = IVAS_REND_SetObjectIDs( hIvasRend ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nIVAS_REND_SetObjectIDs: %s\n", ivas_error_to_string( error ) );
        goto cleanup;
    }
    IVAS_REND_SetObjectIDs( hIvasRend );

    for ( i = 0; i < args.inConfig.numMultiChannelBuses; ++i )
    {
+6 −4
Original line number Diff line number Diff line
@@ -1104,10 +1104,12 @@ void ivas_mdct_core_tns_ns(
            decoder_tcx_tns( st, L_frame_global[ch], L_spec[ch], L_frame[ch], L_frameTCX[ch], &x[ch][k][0], fUseTns[ch][k], &tnsData[ch][k], bfi, k, 1 );

            sns_shape_spectrum( x[ch][k], st->hTcxCfg->psychParamsCurrent, &sns_int_scf[0], st->hTcxCfg->psychParamsCurrent->nBins );

            /* In case of PLC, applying SNS up to L_spec might not be enough: In case the transition frame from DTX after an inactive period is lost, L_spec is assumed to represent a regular TCX frame,
               however, this frame is nevertheless acting as an transition frame as also visible in L_frameTCX; thus, the safer approach to prevent high frequency artifacts is to apply the SNS up to L_frameTCX;
            /*
              2025-09-07, mul:
              in case of PLC, applying SNS up to L_spec might not be enough : In case the transition frame from DTX after an inactive period is lost, L_spec is assumed to represent a regular TCX frame, however, this frame is nevertheless acting as an transition frame as also visible in L_frameTCX;
              thus, the safer approach to prevent high frequency artifacts is to apply the SNS up to L_frameTCX;
              in case this is not necessary, x[] is filled with zeros, and the multiplication is not causing any additional harm * /
            */
            v_multc( x[ch][k] + st->hTcxCfg->psychParamsCurrent->nBins, sns_int_scf[FDNS_NPTS - 1], x[ch][k] + st->hTcxCfg->psychParamsCurrent->nBins, max( L_spec[ch], L_frameTCX[ch] ) - st->hTcxCfg->psychParamsCurrent->nBins );

            decoder_tcx_tns( st, L_frame_global[ch], L_spec[ch], L_frame[ch], L_frameTCX[ch], &x[ch][k][0], fUseTns[ch][k], &tnsData[ch][k], bfi, k, 0 );
+2 −2
Original line number Diff line number Diff line
@@ -1058,7 +1058,7 @@ ivas_error IVAS_DEC_ReadFormat(
            }
        }

        /* JBM: compensate when binaural renderer granularity goes down (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 ) ) )
@@ -1072,7 +1072,7 @@ ivas_error IVAS_DEC_ReadFormat(
                return IVAS_ERR_UNEXPECTED_NULL_POINTER;
            }

            /* when granularity goes down from 5ms to 1.25ms, render what still fits in the new granularity */
            /* when granularity goes down, render what still fits in the new granularity */
            if ( tc_granularity_new < st_ivas->hTcBuffer->n_samples_granularity )
            {
                if ( ( error = ivas_jbm_dec_flush_renderer( st_ivas, tc_granularity_new, renderer_type_old, intern_config_old, &st_ivas->hIntSetup, mc_mode_old, ism_mode_old, &hIvasDec->nSamplesFlushed, pcm_type_API_to_internal( hIvasDec->pcmType ), hIvasDec->flushbuffer ) ) != IVAS_ERR_OK )