Commit 370fca53 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[cleanup] consolidate LIB_REND_API_5MS into API_5MS

parent 50dbeb9f
Loading
Loading
Loading
Loading
Loading
+16 −16
Original line number Diff line number Diff line
@@ -175,7 +175,7 @@ typedef struct
    float lfeConfigElevation;
    bool lfeCustomRoutingEnabled;
    char inLfePanningMatrixFile[RENDERER_MAX_CLI_ARG_LENGTH];
#ifdef LIB_REND_API_5MS
#ifdef API_5MS
    bool framing_5ms;
#endif
#ifdef FIX_488_SYNC_DELAY
@@ -209,7 +209,7 @@ typedef enum
#endif
    CmdLnOptionId_referenceVectorFile,
    CmdLnOptionId_exteriorOrientationFile,
#ifdef LIB_REND_API_5MS
#ifdef API_5MS
    CmdLnOptionId_framing5ms,
#endif
#ifdef FIX_488_SYNC_DELAY
@@ -354,7 +354,7 @@ static const CmdLnParser_Option cliOptions[] = {
        .matchShort = "exof",
        .description = "External orientation trajectory file for simulation of external orientations",
    },
#ifdef LIB_REND_API_5MS
#ifdef API_5MS
    {
        .id = CmdLnOptionId_framing5ms,
        .match = "framing_5ms",
@@ -801,7 +801,7 @@ int main(
    int32_t delayTimeScale = 0;
    int16_t i, numChannels;
    ivas_error error = IVAS_ERR_OK;
#ifndef LIB_REND_API_5MS
#ifndef API_5MS
    IVAS_VECTOR3 Pos[RENDERER_HEAD_POSITIONS_PER_FRAME];
#endif

@@ -1028,7 +1028,7 @@ int main(
    }
#endif
    const int16_t frameSize_smpls = (int16_t) (
#ifdef LIB_REND_API_5MS
#ifdef API_5MS
        ( args.framing_5ms ? 5 : 20 )
#else
        20
@@ -1460,7 +1460,7 @@ int main(
        fprintf( stdout, "\n\n-- Start the renderer (quiet mode) --\n\n" );
    }

#ifdef LIB_REND_API_5MS
#ifdef API_5MS
    ObjectPositionBuffer mtdBuffer;
#endif

@@ -1468,7 +1468,7 @@ int main(
    {
        int16_t num_in_channels;
        num_in_channels = inBuffer.config.numChannels;
#ifdef LIB_REND_API_5MS
#ifdef API_5MS
        const bool isCurrentFrameMultipleOf20ms = !args.framing_5ms || frame % 4 == 0;
#endif

@@ -1520,7 +1520,7 @@ int main(
#endif
        );

#ifdef LIB_REND_API_5MS
#ifdef API_5MS
        if ( isCurrentFrameMultipleOf20ms )
        {
#else
@@ -1558,14 +1558,14 @@ int main(
                    exit( -1 );
                }
            }
#ifdef LIB_REND_API_5MS
#ifdef API_5MS
        }
#endif

        /* Read from head rotation trajectory file if specified */
        if ( headRotReader != NULL )
        {
#ifdef LIB_REND_API_5MS
#ifdef API_5MS
            IVAS_QUATERNION headRot;
            IVAS_VECTOR3 Pos;

@@ -1622,13 +1622,13 @@ int main(
        }
        else
        {
#ifdef LIB_REND_API_5MS
#ifdef API_5MS
            if ( ( error = IVAS_REND_DisableHeadRotation( hIvasRend ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "Error disabling head rotation: %s\n", ivas_error_to_string( error ) );
                exit( -1 );
            }
#else /* LIB_REND_API_5MS */
#else /* API_5MS */
            error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL
#ifdef SPLIT_REND_WITH_HEAD_ROT
                                               ,
@@ -1640,7 +1640,7 @@ int main(
                fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) );
                exit( -1 );
            }
#endif /* LIB_REND_API_5MS */
#endif /* API_5MS */
        }

#ifdef SPLIT_REND_WITH_HEAD_ROT
@@ -1655,7 +1655,7 @@ int main(
        /* Read from external orientation file if specified */
        if ( externalOrientationFileReader != NULL )
        {
#ifdef LIB_REND_API_5MS
#ifdef API_5MS
            IVAS_QUATERNION quat;
            int8_t enableHeadRotation;
            int8_t enableExternalOrientation;
@@ -2622,7 +2622,7 @@ static CmdlnArgs defaultArgs(

    args.lfeCustomRoutingEnabled = false;
    clearString( args.inLfePanningMatrixFile );
#ifdef LIB_REND_API_5MS
#ifdef API_5MS
    args.framing_5ms = false;
#endif
#ifdef FIX_488_SYNC_DELAY
@@ -2767,7 +2767,7 @@ static void parseOption(
                exit( -1 );
            }
            break;
#ifdef LIB_REND_API_5MS
#ifdef API_5MS
        case CmdLnOptionId_framing5ms:
            assert( numOptionValues == 0 );
            args->framing_5ms = true;
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@
#define IVAS_CLDFB_NO_CHANNELS_MAX  ( 60 )
#define IVAS_MAX_INPUT_LFE_CHANNELS 4

#ifndef LIB_REND_API_5MS
#ifndef API_5MS
#define RENDERER_HEAD_POSITIONS_PER_FRAME 4
#endif

+1 −1
Original line number Diff line number Diff line
@@ -3680,7 +3680,7 @@ void ivas_dirac_dec(
    Decoder_Struct *st_ivas,                                    /* i/o: IVAS decoder structure                                  */
    float output_f[][L_FRAME48k],                               /* i/o: synthesized core-coder transport channels/DirAC output  */
    const int16_t nchan_transport                               /* i  : number of transport channels                            */
#ifdef LIB_REND_API_5MS
#ifdef API_5MS
    ,const int16_t num_subframes                                /* i  : number of subframes to render */
#endif
);
+0 −1
Original line number Diff line number Diff line
@@ -165,7 +165,6 @@
#define API_5MS
#ifdef API_5MS
#define JITTER_MEM_OPTIM_RENDERING
#define LIB_REND_API_5MS                            /* FhG: Adds 5ms framing capability to lib_rend */ /* TODO(sgi): needs to be joined with API_5MS */
#endif
#define LIB_REND_FIX_HRTFPARAMBIN_MEMLEAK
// 5 ms branch switches end
+2 −2
Original line number Diff line number Diff line
@@ -1635,7 +1635,7 @@ void ivas_dirac_dec(
    Decoder_Struct *st_ivas,      /* i/o: IVAS decoder structure                                  */
    float output_f[][L_FRAME48k], /* i/o: synthesized core-coder transport channels/DirAC output  */
    const int16_t nchan_transport /* i  : number of transport channels                            */
#ifdef LIB_REND_API_5MS
#ifdef API_5MS
    ,
    const int16_t num_subframes /* i  : number of subframes to render */
#endif
@@ -1671,7 +1671,7 @@ void ivas_dirac_dec(

    ivas_dirac_dec_set_md_map( st_ivas, DEFAULT_JBM_CLDFB_TIMESLOTS );

#ifdef LIB_REND_API_5MS
#ifdef API_5MS
    for ( subframe_idx = 0; subframe_idx < num_subframes; subframe_idx++ )
#else
    for ( subframe_idx = 0; subframe_idx < MAX_PARAM_SPATIAL_SUBFRAMES; subframe_idx++ )
Loading