Commit e6671752 authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Merge branch 'FhG/external-renderer' into Philips/external-renderer-api2

parents 3d4b99c6 9ebeea99
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -108,6 +108,9 @@ if(WMOPS)
  add_definitions("-DWMOPS=1")
endif()

if(DEC_TO_REND_FLOAT_DUMP)
  add_compile_definitions(DEC_TO_REND_FLOAT_DUMP)
endif()

project(stereo-evs)
set_property(GLOBAL PROPERTY USE_FOLDERS ON) # make Visual Studio projects look nicer
+29 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
*******************************************************************************************************/

#include "options.h"
#include "debug.h"
#include "audio_file_reader.h"
#include "audio_file_writer.h"
#include "cmdl_tools.h"
@@ -59,6 +60,7 @@
#include <stdio.h>
#include <string.h>

#ifdef EXT_RENDERER
#ifndef count_malloc
#ifdef RAM_COUNTING_TOOL
#define count_malloc( n1 )     MALLOC_FCT_CALL( n1 )
@@ -790,6 +792,10 @@ int32_t main( int32_t argc, char **argv )
        fprintf( stderr, "Failed to open file: %s\n", args.outputFilePath );
        exit( -1 );
    }
#ifdef DEC_TO_REND_FLOAT_DUMP
    printf( "Warning: Renderer executable built with DEC_TO_REND_FLOAT_DUMP enabled!\n" );
    printf( "         Float dump file (./float_out.wav) will be forced as input.\n" );
#endif

    inBufferSize = frameSize_smpls * totalNumInChannels;
    outBufferSize = frameSize_smpls * numOutChannels;
@@ -840,6 +846,20 @@ int32_t main( int32_t argc, char **argv )

        /* Convert from int to float and from interleaved to packed */
        convertInputBuffer( inpInt16Buffer, numSamplesRead, frameSize_smpls, num_in_channels, inFloatBuffer );
#ifdef DEC_TO_REND_FLOAT_DUMP
        /* Overwrite from dump file */
        float tmp[960 * 16];
        dbgread( tmp, sizeof( float ), numSamplesRead, "./float_out.raw" );

        /* Conversion from interleaved to packed still necessary */
        for ( int32_t i = 0; i < numSamplesRead / num_in_channels; ++i )
        {
            for ( int32_t c = 0; c < num_in_channels; ++c )
            {
                inFloatBuffer[c * frameSize_smpls + i] = tmp[i * num_in_channels + c];
            }
        }
#endif

        for ( int32_t i = 0; i < RENDERER_MAX_MASA_INPUTS; ++i )
        {
@@ -2295,3 +2315,12 @@ static void convertOutputBuffer( const float *floatBuffer,
        }
    }
}
#else
int32_t main( int32_t argc, char **argv )
{
    (void) argc;
    (void) argv;
    fprintf( stderr, "Enable EXT_RENDERER in options.h to use the external renderer.\n" );
    return 0;
}
#endif
+10 −0
Original line number Diff line number Diff line
@@ -144,6 +144,16 @@ uint32_t ivas_syn_output(
        }
    }

#ifdef DEC_TO_REND_FLOAT_DUMP
    for ( i = 0; i < output_frame; ++i )
    {
        for ( n = 0; n < n_channels; ++n )
        {
            dbgwrite( &synth[n][i], sizeof( float ), 1, 1, "./float_out.raw" );
        }
    }
#endif

    return noClipping;
}

+2 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
#ifndef IVAS_LIB_REND_INTERNALS_H
#define IVAS_LIB_REND_INTERNALS_H

#ifdef EXT_RENDERER
typedef struct
{
    int8_t headRotEnabled;
@@ -88,3 +89,4 @@ ivas_error ivas_rend_TDObjRendOpen(
    int32_t outFs );

#endif
#endif
+2 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@
#include <stdlib.h>
#include <string.h>

#ifdef EXT_RENDERER
/* Maximum buffer length (per channel) in samples.
 * Keep this separate from L_FRAME48k in case we want to support different size later */
#define MAX_BUFFER_LENGTH_PER_CHANNEL ( L_FRAME48k )
@@ -4193,3 +4194,4 @@ int32_t IVAS_REND_GetCntFramesLimited(
    return hIvasRend->hLimiter->cnt_frames_limited;
}
#endif
#endif
Loading