Commit c9fb3b83 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_1135_EXT_RENDERER_HANDLES

parent 20592923
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -172,10 +172,8 @@ typedef struct
    char customHrtfFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    char renderConfigFilePath[RENDERER_MAX_CLI_ARG_LENGTH];
    int8_t orientation_tracking;
#ifdef FIX_1135_EXT_RENDERER_HANDLES
    int16_t Opt_Headrotation;
    int16_t Opt_ExternalOrientation;
#endif
    int16_t nonDiegeticPan;
    float nonDiegeticPanGain;
    IVAS_REND_COMPLEXITY_LEVEL complexityLevel;
@@ -972,11 +970,7 @@ int main(
    Word32 nonDiegeticPanGain_fx = ( args.nonDiegeticPanGain == 1.0f ) ? ONE_IN_Q31 : ( args.nonDiegeticPanGain == -1.0f ) ? L_negate( ONE_IN_Q31 )
                                                                                                                           : (Word32) ( args.nonDiegeticPanGain * ( 1LL << Q31 ) );

#ifdef FIX_1135_EXT_RENDERER_HANDLES
    IF( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, nonDiegeticPanGain_fx, args.Opt_Headrotation, args.Opt_ExternalOrientation, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK )
#else
    IF( ( error = IVAS_REND_Open( &hIvasRend, args.sampleRate, args.outConfig.audioConfig, !isEmptyString( args.customHrtfFilePath ), args.nonDiegeticPan, nonDiegeticPanGain_fx, (int16_t) args.render_framesize ) ) != IVAS_ERR_OK )
#endif
    {
        fprintf( stderr, "\nError opening renderer handle: %s\n", ivas_error_to_string( error ) );
        goto cleanup;
@@ -2746,10 +2740,8 @@ static CmdlnArgs defaultArgs(
    clearString( args.renderConfigFilePath );
    clearString( args.externalOrientationFilePath );

#ifdef FIX_1135_EXT_RENDERER_HANDLES
    args.Opt_Headrotation = 0;
    args.Opt_ExternalOrientation = 0;
#endif

    args.orientation_tracking = IVAS_HEAD_ORIENT_TRK_NONE;

@@ -2840,9 +2832,7 @@ static void parseOption(
            break;
        case CmdLnOptionId_trajFile:
            assert( numOptionValues == 1 );
#ifdef FIX_1135_EXT_RENDERER_HANDLES
            args->Opt_Headrotation = 1;
#endif
            strncpy( args->headRotationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 );
            break;
        case CmdLnOptionId_outputMetadata:
@@ -2863,9 +2853,7 @@ static void parseOption(
            break;
        case CmdLnOptionId_exteriorOrientationFile:
            assert( numOptionValues == 1 );
#ifdef FIX_1135_EXT_RENDERER_HANDLES
            args->Opt_ExternalOrientation = 1;
#endif
            strncpy( args->externalOrientationFilePath, optionValues[0], RENDERER_MAX_CLI_ARG_LENGTH - 1 );
            break;
        case CmdLnOptionId_customHrtfFile:
@@ -2990,12 +2978,10 @@ static CmdlnArgs parseCmdlnArgs(
        exit( -1 ); /* Error printout handled by failing function */
    }

#ifdef FIX_1135_EXT_RENDERER_HANDLES
    if ( args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED || args.outConfig.audioConfig == IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM )
    {
        args.Opt_Headrotation = 1;
    }
#endif

    return args;
}
+0 −1
Original line number Diff line number Diff line
@@ -90,7 +90,6 @@

#define FIX_1129_EXT_REND_OUTPUT_HIGH                   /* Philips: issue 1129: External renderer BINAURAL_ROOM_REVERB format output level too high compared to internal rendering output */
#define NONBE_1360_LFE_DELAY                            /* Dlb: LFE delay alignment when rendering in CLDFB domain*/
#define FIX_1135_EXT_RENDERER_HANDLES                   /* VA: issue 1135: Memory usage reduction in external renderer: Allocate only handles that are really needed. */
#define FIX_1209_SID_SIGNALING                          /* VA: issue 1209: remove dead code in IVAS SID signaling */
#define NONBE_1250_MCMASA_LS_OUTPUT                     /* VA: issue 1250: fix crash in McMASA to custom LS output decoding */
#define NONBE_FIX_1176_OSBA_REVERB_JBM_ASAN_ERROR       /* Ericsson: Issue 1176, fix in TDREND_firfilt for subframes shorter than the filter length */
+0 −7
Original line number Diff line number Diff line
@@ -574,13 +574,6 @@ ivas_error IVAS_DEC_Configure(
    }
    move16();

#ifndef FIX_1135_EXT_RENDERER_HANDLES
    IF( EQ_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_CODED ) || EQ_32( hDecoderConfig->output_config, IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) )
    {
        hDecoderConfig->Opt_Headrotation = TRUE;
        move16();
    }
#endif
    /* Set decoder parameters to initial values */
    IF( NE_32( ( error = ivas_init_decoder_front( st_ivas ) ), IVAS_ERR_OK ) )
    {
+0 −12
Original line number Diff line number Diff line
@@ -410,25 +410,17 @@ ivas_error ivas_td_binaural_renderer_unwrap_fx(
        Word16 tmp_headRotEnabled;
        tmp_headRotEnabled = 0;
        move16();
#ifdef FIX_1135_EXT_RENDERER_HANDLES
        Word16 tmp_CombinedOrient_subframe_idx;
        tmp_CombinedOrient_subframe_idx = 0;
        move16();
#endif
        IF( enableCombinedOrientation != NULL )
        {
            tmp_headRotEnabled = enableCombinedOrientation[hCombinedOrientationData->subframe_idx];
            move16();
#ifdef FIX_1135_EXT_RENDERER_HANDLES
            tmp_CombinedOrient_subframe_idx = hCombinedOrientationData->subframe_idx;
#endif
        }

#ifdef FIX_1135_EXT_RENDERER_HANDLES
        IF( NE_32( ( error = TDREND_Update_listener_orientation_fx( hBinRendererTd, tmp_headRotEnabled, &Quaternions[tmp_CombinedOrient_subframe_idx], &Pos[tmp_CombinedOrient_subframe_idx] ) ), IVAS_ERR_OK ) )
#else
        IF( NE_32( ( error = TDREND_Update_listener_orientation_fx( hBinRendererTd, tmp_headRotEnabled, &Quaternions[hCombinedOrientationData->subframe_idx], &Pos[hCombinedOrientationData->subframe_idx] ) ), IVAS_ERR_OK ) )
#endif
        {
            return error;
        }
@@ -963,12 +955,8 @@ ivas_error ivas_td_binaural_renderer_ext_fx(
        Word16 pos_q = Q25;
        move16();

#ifdef FIX_1135_EXT_RENDERER_HANDLES
        test();
        IF( *hCombinedOrientationData != NULL && ( *hCombinedOrientationData )->listenerPos != NULL )
#else
        IF( ( *hCombinedOrientationData )->listenerPos != NULL )
#endif
        {
            ( *hCombinedOrientationData )->listenerPos[idx].x_fx = L_shr( ( *hCombinedOrientationData )->listenerPos[idx].x_fx, sub( ( *hCombinedOrientationData )->listenerPos[idx].q_fact, pos_q ) );
            move32();
+0 −2
Original line number Diff line number Diff line
@@ -115,10 +115,8 @@ ivas_error IVAS_REND_Open(
    const bool asHrtfBinary,                        /* i  : load hrtf binary file                               */
    const Word16 nonDiegeticPan,                    /* i  : non-diegetic object flag                            */
    const Word32 nonDiegeticPanGain,                /* i  : non-diegetic panning gain                        Q31*/
#ifdef FIX_1135_EXT_RENDERER_HANDLES
    const Word16 Opt_Headrotation,                  /* i  : indicates whether head-rotation is used             */
    const Word16 Opt_ExternalOrientation,           /* i  : indicates whether external orientations are used    */
#endif
    const Word16 num_subframes                      /* i  : number of subframes                                 */
);

Loading