Commit febce4cc authored by TYAGIRIS's avatar TYAGIRIS
Browse files

clean up of ISAR API

parent 8f16819f
Loading
Loading
Loading
Loading
Loading
+30 −155
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@ static void printSupportedAudioConfigs( void );

static IVAS_AUDIO_CONFIG parseAudioConfig( const char *configString );

static void convertOutputBuffer( const float *floatBuffer, const int16_t numSamplesPerChannel, const int16_t numChannels, int16_t *intBuffer, const int16_t cldfb_in, IVAS_CLDFB_FILTER_BANK_HANDLE *cldfbSyn );
static void convertOutputBuffer( const float *floatBuffer, const int16_t numSamplesPerChannel, const int16_t numChannels, int16_t *intBuffer );

/*------------------------------------------------------------------------------------------*
 * Local functions
@@ -612,54 +612,12 @@ static void convertInputBuffer(
    const int16_t numIntSamplesPerChannel,
    const int16_t numFloatSamplesPerChannel,
    const int16_t numChannels,
    float *floatBuffer,
    const int16_t cldfb_in_flag,
    IVAS_CLDFB_FILTER_BANK_HANDLE *cldfbAna )
    float *floatBuffer )
{
    int16_t chnl, smpl, i;

    i = 0;

    if ( cldfb_in_flag )
    {
        int16_t slotIdx, numCldfbBands, numFloatPcmSamples;
        float fIn[IVAS_MAX_OUTPUT_CHANNELS][IVAS_MAX_FRAME_SIZE];

        numFloatPcmSamples = numFloatSamplesPerChannel >> 1;
        numCldfbBands = numFloatPcmSamples / IVAS_CLDFB_NO_COL_MAX;

        /* CLDFB Analysis*/
        assert( numIntSamplesPerChannel <= IVAS_MAX_OUTPUT_CHANNELS * IVAS_MAX_FRAME_SIZE );
        for ( smpl = 0; smpl < numFloatPcmSamples; ++smpl )
        {
            for ( chnl = 0; chnl < numChannels; ++chnl )
            {
                if ( i < numIntSamplesPerChannel )
                {
                    fIn[chnl][smpl] = (float) intBuffer[i];
                }
                else
                {
                    fIn[chnl][smpl] = 0.f;
                }

                ++i;
            }
        }

        for ( chnl = 0; chnl < numChannels; ++chnl )
        {
            for ( slotIdx = 0; slotIdx < IVAS_CLDFB_NO_COL_MAX; slotIdx++ )
            {
                ISAR_POST_REND_cldfbAnalysis_ts_wrapper( &fIn[chnl][numCldfbBands * slotIdx],
                                                         &floatBuffer[( chnl * numFloatSamplesPerChannel ) + ( 2 * slotIdx * numCldfbBands )],
                                                         &floatBuffer[numCldfbBands + ( chnl * numFloatSamplesPerChannel ) + ( 2 * slotIdx * numCldfbBands )],
                                                         numCldfbBands, cldfbAna[chnl] );
            }
        }
    }
    else
    {
    for ( smpl = 0; smpl < numFloatSamplesPerChannel; ++smpl )
    {
        for ( chnl = 0; chnl < numChannels; ++chnl )
@@ -676,7 +634,6 @@ static void convertInputBuffer(
            ++i;
        }
    }
    }

    return;
}
@@ -692,63 +649,13 @@ static void convertOutputBuffer(
    const float *floatBuffer,
    const int16_t numSamplesPerChannel,
    const int16_t numChannels,
    int16_t *intBuffer,
    const int16_t cldfb_in_flag,
    IVAS_CLDFB_FILTER_BANK_HANDLE *cldfbSyn )
    int16_t *intBuffer )
{
    int16_t chnl, smpl, i;
    float temp;

    i = 0;

    if ( cldfb_in_flag )
    {
        int16_t slotIdx, numCldfbBands, numPcmSamples, b;
        float fIn[IVAS_MAX_OUTPUT_CHANNELS][IVAS_MAX_FRAME_SIZE];
        float re[IVAS_MAX_OUTPUT_CHANNELS][IVAS_CLDFB_NO_COL_MAX][IVAS_CLDFB_NO_CHANNELS_MAX];
        float im[IVAS_MAX_OUTPUT_CHANNELS][IVAS_CLDFB_NO_COL_MAX][IVAS_CLDFB_NO_CHANNELS_MAX];

        numPcmSamples = numSamplesPerChannel >> 1;
        numCldfbBands = numPcmSamples / IVAS_CLDFB_NO_COL_MAX;

        /* CLDFB Synthesis*/
        for ( chnl = 0; chnl < numChannels; ++chnl )
        {
            for ( slotIdx = 0; slotIdx < IVAS_CLDFB_NO_COL_MAX; slotIdx++ )
            {
                for ( b = 0; b < numCldfbBands; b++ )
                {
                    re[chnl][slotIdx][b] = floatBuffer[( chnl * numSamplesPerChannel ) + ( 2 * slotIdx * numCldfbBands ) + b];
                    im[chnl][slotIdx][b] = floatBuffer[numCldfbBands + ( chnl * numSamplesPerChannel ) + ( 2 * slotIdx * numCldfbBands ) + b];
                }
            }
        }

        /* Implement CLDFB synthesis */
        for ( chnl = 0; chnl < numChannels; ++chnl )
        {
            float *RealBuffer[IVAS_CLDFB_NO_COL_MAX];
            float *ImagBuffer[IVAS_CLDFB_NO_COL_MAX];

            for ( slotIdx = 0; slotIdx < IVAS_CLDFB_NO_COL_MAX; slotIdx++ )
            {
                RealBuffer[slotIdx] = re[chnl][slotIdx];
                ImagBuffer[slotIdx] = im[chnl][slotIdx];
            }

            ISAR_POST_REND_cldfbSynthesis_wrapper( RealBuffer, ImagBuffer, &( fIn[chnl][0] ), numCldfbBands * IVAS_CLDFB_NO_COL_MAX, cldfbSyn[chnl] );
        }
        for ( smpl = 0; smpl < numPcmSamples; ++smpl )
        {
            for ( chnl = 0; chnl < numChannels; ++chnl )
            {
                intBuffer[i] = (int16_t) roundf( fIn[chnl][smpl] );
                ++i;
            }
        }
    }
    else
    {
    for ( smpl = 0; smpl < numSamplesPerChannel; ++smpl )
    {
        for ( chnl = 0; chnl < numChannels; ++chnl )
@@ -768,7 +675,6 @@ static void convertOutputBuffer(
            ++i;
        }
    }
    }

    return;
}
@@ -786,9 +692,6 @@ int main(
    ISAR_POST_REND_HANDLE hIsarPostRend;
    RotFileReader *headRotReader = NULL;
    RotFileReader *externalOrientationFileReader = NULL;
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbAna[IVAS_MAX_INPUT_CHANNELS];
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbSyn[IVAS_MAX_INPUT_CHANNELS];
    int16_t cldfb_in_flag, CLDFBframeSize_smpls;
    SplitRendBFIFileReader *splitRendBFIReader = NULL;
    AudioFileReader *audioReader = NULL;
    AudioFileWriter *audioWriter;
@@ -821,8 +724,6 @@ int main(
#endif

    hSplitRendFileReadWrite = NULL;
    CLDFBframeSize_smpls = 0;
    cldfb_in_flag = 0;
    bitsBuffer.bits = NULL;
    bitsBuffer.config.bitsRead = 0;
    bitsBuffer.config.bitsWritten = 0;
@@ -982,15 +883,6 @@ int main(

    int16_t numOutChannels = 2;

    if ( cldfb_in_flag )
    {
        if ( ( error = ISAR_POST_REND_openCldfb( cldfbAna, cldfbSyn, totalNumInChannels, numOutChannels, args.sampleRate ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "Error in ISAR_POST_REND_openCldfb(): %s\n", ivas_error_to_string( error ) );
            exit( -1 );
        }
    }

    if ( AudioFileWriter_open( &audioWriter, args.outputFilePath, args.sampleRate, numOutChannels ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "Failed to open file: %s\n", args.outputFilePath );
@@ -1001,27 +893,18 @@ int main(
    outBufferSize = frameSize_smpls * numOutChannels;
    inpInt16Buffer = malloc( inBufferSize * sizeof( int16_t ) );

    if ( cldfb_in_flag == 0 )
    {
    inFloatBuffer = malloc( inBufferSize * sizeof( float ) );
    inBuffer.config.numSamplesPerChannel = (int16_t) frameSize_smpls;
    outFloatBuffer = malloc( outBufferSize * sizeof( float ) );
    outBuffer.config.numSamplesPerChannel = (int16_t) frameSize_smpls;
    }
    else
    {
        inFloatBuffer = malloc( CLDFBframeSize_smpls * totalNumInChannels * sizeof( float ) );
        inBuffer.config.numSamplesPerChannel = (int16_t) CLDFBframeSize_smpls;
        outFloatBuffer = malloc( CLDFBframeSize_smpls * totalNumInChannels * sizeof( float ) );
        outBuffer.config.numSamplesPerChannel = (int16_t) CLDFBframeSize_smpls;
    }

    outInt16Buffer = malloc( outBufferSize * sizeof( int16_t ) );

    inBuffer.config.is_cldfb = cldfb_in_flag;
    inBuffer.config.is_cldfb = 0;
    inBuffer.config.numChannels = (int16_t) totalNumInChannels;
    inBuffer.data = inFloatBuffer;

    outBuffer.config.is_cldfb = cldfb_in_flag;
    outBuffer.config.is_cldfb = 0;
    outBuffer.config.numChannels = (int16_t) numOutChannels;
    outBuffer.data = outFloatBuffer;

@@ -1100,7 +983,7 @@ int main(
        }

        /* Convert from int to float and from interleaved to packed */
        convertInputBuffer( inpInt16Buffer, numSamplesRead, inBuffer.config.numSamplesPerChannel, num_in_channels, inFloatBuffer, inBuffer.config.is_cldfb, cldfbAna );
        convertInputBuffer( inpInt16Buffer, numSamplesRead, inBuffer.config.numSamplesPerChannel, num_in_channels, inFloatBuffer );

        int16_t num_subframes, sf_idx;
        num_subframes = (int16_t) args.render_framesize;
@@ -1128,12 +1011,9 @@ int main(
        }
        else
        {
            if ( ( error = ISAR_POST_REND_DisableHeadRotation( hIsarPostRend ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "Error disabling head rotation: %s\n", ivas_error_to_string( error ) );
            fprintf( stderr, "Head Rotation should be enabled in post renderer\n" );
            exit( -1 );
        }
        }

        /* Read from split renderer bfi file if specified */
        if ( splitRendBFIReader != NULL && splitBinNeedsNewFrame )
@@ -1190,7 +1070,7 @@ int main(

        /* Convert from float to int and from packed to interleaved.
         * Values in outFloatBuffer are guaranteed to be within range INT16_MIN:INT16_MAX */
        convertOutputBuffer( outFloatBuffer, outBuffer.config.numSamplesPerChannel, num_out_channels, outInt16Buffer, cldfb_in_flag, cldfbSyn );
        convertOutputBuffer( outFloatBuffer, outBuffer.config.numSamplesPerChannel, num_out_channels, outInt16Buffer );

        if ( delayNumSamples == -1 )
        {
@@ -1302,11 +1182,6 @@ int main(
        free( bitsBufferData );
    }

    if ( cldfb_in_flag )
    {
        ISAR_POST_REND_closeCldfb( cldfbAna, cldfbSyn );
    }

    split_rend_reader_writer_close( &hSplitRendFileReadWrite );
    SplitRendBFIFileReader_close( &splitRendBFIReader );

+14 −156
Original line number Diff line number Diff line
@@ -618,13 +618,14 @@ static void clearInputSplitRend(
 *------------------------------------------------------------------------*/

ivas_error ISAR_POST_REND_open(
    ISAR_POST_REND_HANDLE *phIvasRend,
    const int32_t outputSampleRate,
    const AUDIO_CONFIG outConfig,
    const bool asHrtfBinary,
    const int16_t nonDiegeticPan,
    const float nonDiegeticPanGain,
    const int16_t num_subframes )
    ISAR_POST_REND_HANDLE *phIvasRend, /* i/o: Pointer to renderer handle                          */
    const int32_t outputSampleRate,    /* i  : output sampling rate                                */
    const IVAS_AUDIO_CONFIG outConfig, /* i  : output audio config                                 */
    const bool asHrtfBinary,           /* i  : load hrtf binary file                               */
    const int16_t nonDiegeticPan,      /* i  : non-diegetic object flag                            */
    const float nonDiegeticPanGain,    /* i  : non-diegetic panning gain                           */
    const int16_t num_subframes        /* i  : number of subframes                                 */
)
{
    int16_t i;
    ISAR_POST_REND_HANDLE hIvasRend;
@@ -702,8 +703,9 @@ ivas_error ISAR_POST_REND_open(
 *-------------------------------------------------------------------*/

ivas_error ISAR_POST_REND_NumOutChannels(
    ISAR_POST_REND_CONST_HANDLE hIvasRend,
    int16_t *numOutChannels )
    ISAR_POST_REND_CONST_HANDLE hIvasRend, /* i  : Renderer handle                                     */
    int16_t *numOutChannels                /* o  : number of output channels                           */
)
{
    /* Validate function arguments */
    if ( hIvasRend == NULL || numOutChannels == NULL )
@@ -1272,28 +1274,6 @@ ivas_error ISAR_POST_REND_SetHeadRotation(
}


/*-------------------------------------------------------------------*
 * ISAR_POST_REND_DisableHeadRotation()
 *
 *
 *-------------------------------------------------------------------*/

ivas_error ISAR_POST_REND_DisableHeadRotation(
    ISAR_POST_REND_HANDLE hIvasRend /* i/o: Renderer handle  */
)
{
    /* Validate function arguments */
    if ( hIvasRend == NULL )
    {
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

    hIvasRend->headRotData.headRotEnabled = 0;

    return IVAS_ERR_OK;
}


/*-------------------------------------------------------------------*
 * ISAR_POST_REND_SetSplitRendBFI()
 *
@@ -1301,8 +1281,9 @@ ivas_error ISAR_POST_REND_DisableHeadRotation(
 *-------------------------------------------------------------------*/

ivas_error ISAR_POST_REND_SetSplitRendBFI(
    ISAR_POST_REND_HANDLE hIvasRend,
    const int16_t bfi )
    ISAR_POST_REND_HANDLE hIvasRend, /* i/o: Renderer handle                                     */
    const int16_t bfi                /* i: BFI flag                                     */
)
{
    hIvasRend->splitRendBFI = bfi;

@@ -1797,129 +1778,6 @@ void ISAR_POST_REND_Close(
    return;
}

/*-------------------------------------------------------------------*
 * ISAR_POST_REND_openCldfb()
 *
 *
 *-------------------------------------------------------------------*/

ivas_error ISAR_POST_REND_openCldfb(
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbAna[IVAS_MAX_INPUT_CHANNELS],
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbSyn[IVAS_MAX_OUTPUT_CHANNELS],
    const int16_t num_in_chs,
    const int16_t num_out_chs,
    const int32_t output_Fs )
{
    int16_t n;
    ivas_error error;

    for ( n = 0; n < num_in_chs; n++ )
    {
        if ( ( error = openCldfb( &( cldfbAna[n] ), CLDFB_ANALYSIS, output_Fs, CLDFB_PROTOTYPE_5_00MS ) ) != IVAS_ERR_OK )
        {
            return error;
        }
    }
    for ( ; n < IVAS_MAX_INPUT_CHANNELS; n++ )
    {
        cldfbAna[n] = NULL;
    }

    for ( n = 0; n < num_out_chs; n++ )
    {
        if ( ( error = openCldfb( &( cldfbSyn[n] ), CLDFB_SYNTHESIS, output_Fs, CLDFB_PROTOTYPE_5_00MS ) ) != IVAS_ERR_OK )
        {
            return error;
        }
    }
    for ( ; n < IVAS_MAX_OUTPUT_CHANNELS; n++ )
    {
        cldfbSyn[n] = NULL;
    }

    return IVAS_ERR_OK;
}


/*-------------------------------------------------------------------*
 * ISAR_POST_REND_closeCldfb()
 *
 *
 *-------------------------------------------------------------------*/

void ISAR_POST_REND_closeCldfb(
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbAna[IVAS_MAX_INPUT_CHANNELS],
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbSyn[IVAS_MAX_OUTPUT_CHANNELS] )
{
    int16_t n;

    for ( n = 0; n < IVAS_MAX_INPUT_CHANNELS; n++ )
    {
        if ( cldfbAna[n] != NULL )
        {
            deleteCldfb( &( cldfbAna[n] ) );
            cldfbAna[n] = NULL;
        }
    }

    for ( n = 0; n < IVAS_MAX_OUTPUT_CHANNELS; n++ )
    {
        if ( cldfbSyn[n] != NULL )
        {
            deleteCldfb( &( cldfbSyn[n] ) );
            cldfbSyn[n] = NULL;
        }
    }

    return;
}


/*-------------------------------------------------------------------*
 * ISAR_POST_REND_cldfbSynthesis_wrapper()
 *
 *
 *-------------------------------------------------------------------*/

void ISAR_POST_REND_cldfbAnalysis_ts_wrapper(
    const float *timeIn,                          /* i  : time buffer         */
    float realBuffer[IVAS_CLDFB_NO_CHANNELS_MAX], /* o  : real value buffer   */
    float imagBuffer[IVAS_CLDFB_NO_CHANNELS_MAX], /* o  : imag value buffer   */
    const int16_t samplesToProcess,               /* i  : samples to process  */
    IVAS_CLDFB_FILTER_BANK_HANDLE h_cldfb         /* i  : filterbank state    */
)
{
    cldfbAnalysis_ts( timeIn, realBuffer, imagBuffer, samplesToProcess, h_cldfb );

    return;
}


/*-------------------------------------------------------------------*
 * ISAR_POST_REND_cldfbSynthesis_wrapper()
 *
 *
 *-------------------------------------------------------------------*/

void ISAR_POST_REND_cldfbSynthesis_wrapper(
    float **realBuffer,                   /* i  : real values                 */
    float **imagBuffer,                   /* i  : imag values                 */
    float *timeOut,                       /* o  : output time domain samples  */
    const int16_t samplesToProcess,       /* i  : number of processed samples */
    IVAS_CLDFB_FILTER_BANK_HANDLE h_cldfb /* i  : filter bank state           */
)
{
    cldfbSynthesis( realBuffer, imagBuffer, timeOut, samplesToProcess, h_cldfb );

    return;
}


/*-------------------------------------------------------------------*
 * ISAR_REND_SetSplitRendBitstreamHeader()
 *
 *
 *-------------------------------------------------------------------*/

ivas_error ISAR_REND_SetSplitRendBitstreamHeader(
    ISAR_POST_REND_HANDLE hIvasRend,                           /* i/o: IVAS renderer handle                                                     */
+2 −76
Original line number Diff line number Diff line
@@ -181,54 +181,11 @@ ivas_error ISAR_POST_REND_SetHeadRotation(
    const int16_t sf_idx                                        /* i  : subframe index                                      */
);

/* Head rotation becomes enabled by calling ISAR_POST_REND_SetHeadRotation. Use this to disable. */
ivas_error ISAR_POST_REND_DisableHeadRotation(
    ISAR_POST_REND_HANDLE hIvasRend                             /* i/o: Renderer handle                                     */
);

ivas_error ISAR_POST_REND_SetOrientationTrackingMode(
    ISAR_POST_REND_HANDLE hIvasRend,                            /* i/o: Renderer handle                                     */
    const IVAS_HEAD_ORIENT_TRK_T orientation_tracking           /* i  : Head orientation tracking type                      */
);

ivas_error ISAR_POST_REND_SetReferenceRotation(
    ISAR_POST_REND_HANDLE hIvasRend,                            /* i/o: Renderer handle                                     */
    const IVAS_QUATERNION refRot                                /* i  : Reference rotation                                  */
);

ivas_error ISAR_POST_REND_GetMainOrientation(
    ISAR_POST_REND_HANDLE hIvasRend,                            /* i/o: Renderer handle                                     */
    IVAS_QUATERNION *pOrientation                               /* i/o: Quaternion pointer for main orientation             */
);

ivas_error ISAR_POST_REND_GetTrackedRotation(
    ISAR_POST_REND_HANDLE hIvasRend,                            /* i/o: Renderer handle                                     */
    IVAS_QUATERNION *pRotation                                  /* i/o: Quaternion pointer for processed rotation           */
);

ivas_error ISAR_POST_REND_SetSplitRendBFI(
    ISAR_POST_REND_HANDLE hIvasRend,
    const int16_t bfi
);

ivas_error ISAR_POST_REND_SetExternalOrientation(
    ISAR_POST_REND_HANDLE hIvasRend,                            /* i/o: Renderer handle                                     */
    IVAS_QUATERNION *orientation,                               /* i  : external orientation data                                               */
    int8_t enableHeadRotation,                                  /* i  : flag to enable head rotation for this frame                             */
    int8_t enableExternalOrientation,                           /* i  : flag to enable external orientation for this frame                      */
    int8_t enableRotationInterpolation,                         /* i  : flag to interpolate rotations from current and previous frames          */
    int16_t numFramesToTargetOrientation,                       /* i  : number of frames until target orientation is reached                    */
    const int16_t sf_idx                                        /* i  : subframe index                                                          */
);

ivas_error ISAR_POST_REND_CombineHeadAndExternalOrientation(
    ISAR_POST_REND_HANDLE hIvasRend                             /* i/o: Renderer handle                                     */
    const int16_t bfi                                           /* i: BFI flag                                     */
);

ivas_error ISAR_POST_REND_GetCombinedOrientation(
    ISAR_POST_REND_HANDLE hIvasRend,                            /* i/o: Renderer handle                                     */
    IVAS_QUATERNION *pOrientation                               /* i/o: Quaternion pointer processed orientation            */
);

ivas_error ISAR_POST_REND_getSamples(
    ISAR_POST_REND_HANDLE hIvasRend,                            /* i/o: Renderer handle                                     */
@@ -248,37 +205,6 @@ ivas_error ISAR_REND_SetSplitRendBitstreamHeader(
    const int16_t codec_frame_size_ms                           /* o: codec frame size setting                              */
);

/* Split binaural rendering functions */

ivas_error ISAR_POST_REND_openCldfb(
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbAna[IVAS_MAX_INPUT_CHANNELS],
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbSyn[IVAS_MAX_OUTPUT_CHANNELS],
    const int16_t num_in_chs,
    const int16_t num_out_chs,
    const int32_t output_Fs 
);

void ISAR_POST_REND_closeCldfb(
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbAna[IVAS_MAX_INPUT_CHANNELS],
    IVAS_CLDFB_FILTER_BANK_HANDLE cldfbSyn[IVAS_MAX_OUTPUT_CHANNELS] 
);

void ISAR_POST_REND_cldfbAnalysis_ts_wrapper(
    const float *timeIn,                            /* i  : time buffer                                         */
    float realBuffer[IVAS_CLDFB_NO_CHANNELS_MAX],   /* o  : real value buffer                                   */
    float imagBuffer[IVAS_CLDFB_NO_CHANNELS_MAX],   /* o  : imag value buffer                                   */
    const int16_t samplesToProcess,                 /* i  : samples to process                                  */
    IVAS_CLDFB_FILTER_BANK_HANDLE h_cldfb           /* i  : filterbank state                                    */
);

void ISAR_POST_REND_cldfbSynthesis_wrapper(
    float **realBuffer,                             /* i  : real values                                         */
    float **imagBuffer,                             /* i  : imag values                                         */
    float *timeOut,                                 /* o  : output time domain samples                          */
    const int16_t samplesToProcess,                 /* i  : number of processed samples                         */
    IVAS_CLDFB_FILTER_BANK_HANDLE h_cldfb           /* i  : filter bank state                                   */
);

#ifdef DEBUGGING
int32_t ISAR_POST_REND_GetNoCLipping(
    IVAS_REND_CONST_HANDLE hIvasRend                /* i  : Renderer handle                                     */
+41 −37

File changed.

Preview size limit exceeded, changes collapsed.

+30 −26
Original line number Diff line number Diff line
@@ -43,38 +43,42 @@ int32_t ISAR_PRE_REND_void_func( void );
#else

ivas_error ISAR_PRE_REND_open(
    SPLIT_REND_WRAPPER *hSplitBinRend,
    ISAR_SPLIT_REND_CONFIG_DATA *pSplitRendConfig,
    const int32_t output_Fs,
    const int16_t cldfb_in_flag,
    const int16_t pcm_out_flag,
    const int16_t num_subframes,
    const int16_t mixed_td_cldfb_flag );
    SPLIT_REND_WRAPPER *hSplitBinRend,             /* i/o: Split renderer pre-renerer handle      */
    ISAR_SPLIT_REND_CONFIG_DATA *pSplitRendConfig, /* i/o: Split renderer pre-renerer config      */
    const int32_t output_Fs,                       /* i: output sampling rate      */
    const int16_t cldfb_in_flag,                   /* i: Flag to indicate CLDFB or time doamin input      */
    const int16_t pcm_out_flag,                    /* i: Flag to indicate PCM output      */
    const int16_t num_subframes,                   /* i: number of subframes      */
    const int16_t mixed_td_cldfb_flag              /* i: Flag to indicate combined TD and CLDFB input      */
);

void ISAR_PRE_REND_close(
    SPLIT_REND_WRAPPER *hSplitBinRend,
    IVAS_REND_AudioBuffer *pSplitRendEncBuffer );
    SPLIT_REND_WRAPPER *hSplitBinRend,         /* i/o: Split renderer pre-renerer handle      */
    IVAS_REND_AudioBuffer *pSplitRendEncBuffer /* i/o: Split renderer data buffer      */
);

void ISAR_PRE_REND_GetMultiBinPoseData(
    const ISAR_SPLIT_REND_CONFIG_DATA *pSplit_rend_config,
    MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData,
    const ISAR_SPLIT_REND_ROT_AXIS rot_axis );
    const ISAR_SPLIT_REND_CONFIG_DATA *pSplit_rend_config, /* i: Split renderer pre-renerer config      */
    MULTI_BIN_REND_POSE_DATA *pMultiBinPoseData,           /* i/o: pose correction data handle     */
    const ISAR_SPLIT_REND_ROT_AXIS rot_axis                /* i: Rotation axis      */
);

ivas_error ISAR_PRE_REND_MultiBinToSplitBinaural(
    SPLIT_REND_WRAPPER *hSplitBin,
    const IVAS_QUATERNION headPosition,
    const int32_t SplitRendBitRate,
    ISAR_SPLIT_REND_CODEC splitCodec,
    int16_t codec_frame_size_ms,
    ISAR_SPLIT_REND_BITS_HANDLE pBits,
    float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX],
    float Cldfb_In_BinImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX],
    const int16_t max_bands,
    float *output[],
    const int16_t low_res_pre_rend_rot,
    const int16_t cldfb_in_flag,
    const int16_t pcm_out_flag,
    const int16_t ro_md_flag );
    SPLIT_REND_WRAPPER *hSplitBin,                                     /* i/o: Split renderer pre-renerer handle      */
    const IVAS_QUATERNION headPosition,                                /* i: head rotation QUATERNION      */
    const int32_t SplitRendBitRate,                                    /* i: Split renderer bitrate      */
    ISAR_SPLIT_REND_CODEC splitCodec,                                  /* i/o: Split renderer codec      */
    int16_t codec_frame_size_ms,                                       /* i/o: Split renderer codec framesize   */
    ISAR_SPLIT_REND_BITS_HANDLE pBits,                                 /* i/o: Split renderer codec framesize   */
    float Cldfb_In_BinReal[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: CLDFB real buffer   */
    float Cldfb_In_BinImag[][CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: CLDFB imag buffer   */
    const int16_t max_bands,                                           /* i: CLDFB bands   */
    float *output[],                                                   /* i/o: PCM in/out buffer   */
    const int16_t low_res_pre_rend_rot,                                /* i: low time resolution pre-renderer flag   */
    const int16_t cldfb_in_flag,                                       /* i: Flag to indicate CLDFB or time doamin input      */
    const int16_t pcm_out_flag,                                        /* i: Flag to indicate PCM output      */
    const int16_t ro_md_flag                                           /* i: Flag to indicate real only metadata for yaw      */
);

#endif
#endif /* LIB_ISAR_PRE_REND_H */