Commit 52b54897 authored by bayers's avatar bayers
Browse files

fix compiling issues with API_5MS inactive

parent 8d73b36a
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -3325,7 +3325,11 @@ static ivas_error decodeVariableSpeed(
                        fprintf( stderr, "\nError: input bitstream file couldn't be read: %s \n\n", arg.inputBitstreamFilename );
                        goto cleanup;
                    }
#ifdef API_5MS
                    IVAS_DEC_VoIP_SetScale( hIvasDec, scale, scale );
#else
                    IVAS_DEC_VoIP_SetScale( hIvasDec, scale );
#endif
                }

                if ( ( error = BS_Reader_ReadFrame_short( hBsReader, bit_stream, &num_bits, &bfi ) ) != IVAS_ERR_OK )
@@ -3581,7 +3585,7 @@ static ivas_error decodeVariableSpeed(
        }

        /* decode and get samples */
        if ( ( error = IVAS_DEC_VoIP_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesAvailableNext, &nSamplesFlushed ) ) != IVAS_ERR_OK )
        if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesAvailableNext, &nSamplesFlushed ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) );
            goto cleanup;
+1 −0
Original line number Diff line number Diff line
@@ -156,6 +156,7 @@

#define FIX_XXX_JITTER_SBA_BINAURAL_GAIN
#define FIX_XXX_HEADTRACKER_INIT
#define FIX_XXX_TDOBJRENDERER_INPUT
#define API_5MS

/* ################## End DEVELOPMENT switches ######################### */
+3 −0
Original line number Diff line number Diff line
@@ -1645,6 +1645,9 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure(
        n_samp_full = (int16_t) ( st_ivas->hDecoderConfig->output_Fs / FRAMES_PER_SEC );
        n_samp_residual = 0;
    }
#else
    n_samp_full = ( NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) + hTcBuffer->n_samples_granularity - 1 );
    n_samp_residual = hTcBuffer->n_samples_granularity - 1;
#endif
    nsamp_to_allocate = hTcBuffer->nchan_buffer_full * n_samp_full;
    nsamp_to_allocate += nchan_residual * n_samp_residual;
+10 −0
Original line number Diff line number Diff line
@@ -3655,6 +3655,7 @@ ivas_error IVAS_DEC_reconfigure(
#ifdef API_5MS
        }
#endif
#ifdef API_5MS
        if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * apa_buffer_size * nTransportChannels ) ) == NULL )

        {
@@ -3662,6 +3663,15 @@ ivas_error IVAS_DEC_reconfigure(
        }

        set_zero( hIvasDec->apaExecBuffer, apa_buffer_size * nTransportChannels );
#else
        if ( ( hVoIP->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * nTransportChannels ) ) == NULL )

        {
            return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" );
        }

        set_zero( hVoIP->apaExecBuffer, APA_BUF_PER_CHANNEL * nTransportChannels );
#endif
    }
    else
    {
+8 −0
Original line number Diff line number Diff line
@@ -397,9 +397,17 @@ ivas_error TDREND_GetMix(
        {
            pan_left = ( SrcSpatial_p->Pos_p[1] + 1.f ) * 0.5f;
            pan_right = 1.f - pan_left;
#ifdef FIX_XXX_TDOBJRENDERER_INPUT
            v_multc_acc( Src_p->InputFrame_p, pan_left, output_buf[0], subframe_length );
            v_multc_acc( Src_p->InputFrame_p, pan_right, output_buf[1], subframe_length );
#else
            v_multc_acc( &Src_p->InputFrame_p[subframe_idx * subframe_length], pan_left, output_buf[0], subframe_length );
            v_multc_acc( &Src_p->InputFrame_p[subframe_idx * subframe_length], pan_right, output_buf[1], subframe_length );
#endif
        }
#ifdef FIX_XXX_TDOBJRENDERER_INPUT
        Src_p->InputFrame_p += subframe_length;
#endif
    }

    /* Populate output variable */
Loading