Commit a7a2fa1a authored by malenov's avatar malenov
Browse files

restore resst_stack() function, now with correct ptr_max_stack

parent 1c677675
Loading
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -437,10 +437,6 @@ int main(
        }
    }

#ifdef WMOPS
    reset_wmops();
#endif

    /*-----------------------------------------------------------------*
     * Decoding
     *-----------------------------------------------------------------*/
@@ -1118,6 +1114,7 @@ static ivas_error decodeG192(
    }

#ifdef WMOPS
    reset_stack();
    reset_wmops();
#endif

@@ -1629,6 +1626,7 @@ static ivas_error decodeVoIP(
    }

#ifdef WMOPS
    reset_stack();
    reset_wmops();
#endif

+1 −0
Original line number Diff line number Diff line
@@ -552,6 +552,7 @@ int main(
    }

#ifdef WMOPS
    reset_stack();
    reset_wmops();
#endif

+10 −5
Original line number Diff line number Diff line
@@ -532,6 +532,11 @@ int main(
    int16_t i, numChannels;
    ivas_error error = IVAS_ERR_OK;

#ifdef WMOPS
    reset_wmops();
    reset_mem( USE_32BITS );
#endif

    for ( i = 0; i < RENDERER_MAX_MASA_INPUTS; ++i )
    {
        masaReaders[i] = NULL;
@@ -757,10 +762,10 @@ int main(

    inBufferSize = frameSize_smpls * totalNumInChannels;
    outBufferSize = frameSize_smpls * numOutChannels;
    inpInt16Buffer = malloc_( inBufferSize * sizeof( int16_t ) );
    inFloatBuffer = malloc_( inBufferSize * sizeof( float ) );
    outInt16Buffer = malloc_( outBufferSize * sizeof( int16_t ) );
    outFloatBuffer = malloc_( outBufferSize * sizeof( float ) );
    inpInt16Buffer = malloc( inBufferSize * sizeof( int16_t ) );
    inFloatBuffer = malloc( inBufferSize * sizeof( float ) );
    outInt16Buffer = malloc( outBufferSize * sizeof( int16_t ) );
    outFloatBuffer = malloc( outBufferSize * sizeof( float ) );

    inBuffer.config.numSamplesPerChannel = (int16_t) frameSize_smpls;
    inBuffer.config.numChannels = (int16_t) totalNumInChannels;
@@ -771,8 +776,8 @@ int main(
    outBuffer.data = outFloatBuffer;

#ifdef WMOPS
    reset_stack();
    reset_wmops();
    reset_mem( USE_32BITS );
#endif

    if ( !args.quietModeEnabled )
+7 −0
Original line number Diff line number Diff line
@@ -770,6 +770,13 @@ int push_stack( const char *filename, const char *fctname )

    /* Check, if This is the New Worst-Case RAM (stack + heap) */
    current_stack_size = (int32_t) ( ( ( ptr_base_stack - ptr_current_stack ) * sizeof( int16_t ) ) );

    if (current_stack_size < 0 )
    {
        /* prevent negative stack size */
        current_stack_size = 0;
    }

    if ( current_stack_size + current_heap_size > wc_ram_size )
    {
        wc_ram_size = current_stack_size + current_heap_size;