Commit a79f064f authored by fotopoulou's avatar fotopoulou
Browse files

Merge branch 'main' into disable_bwd_for_mct

parents 6f3c26e1 bacb1e53
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -244,9 +244,9 @@
    <ClCompile Include="..\lib_com\ivas_entropy_coder_common.c" />
    <ClCompile Include="..\lib_com\ivas_fb_mixer.c" />
    <ClCompile Include="..\lib_com\ivas_filters.c" />
    <ClCompile Include="..\lib_com\ivas_ism_com.c" />
    <ClCompile Include="..\lib_com\ivas_mcmasa_com.c" />
    <ClCompile Include="..\lib_com\ivas_dirac_com.c" />
    <ClCompile Include="..\lib_com\ivas_ism_config.c" />
    <ClCompile Include="..\lib_com\ivas_masa_com.c" />
    <ClCompile Include="..\lib_com\ivas_mct_com.c" />
    <ClCompile Include="..\lib_com\ivas_mc_com.c" />
+3 −3
Original line number Diff line number Diff line
@@ -379,9 +379,6 @@
    <ClCompile Include="..\lib_com\swb_bwe_com_lr.c">
      <Filter>common_evs_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_com\ivas_ism_config.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_com\ivas_qmetadata_com.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
@@ -466,6 +463,9 @@
    <ClCompile Include="..\lib_com\ivas_td_decorr.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
    <ClCompile Include="..\lib_com\ivas_ism_com.c">
      <Filter>common_ivas_c</Filter>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_com\basop_proto_func.h">
+26 −1
Original line number Diff line number Diff line
@@ -1295,6 +1295,22 @@ static ivas_error initOnFirstGoodFrame(
    ivas_error error = IVAS_ERR_UNKNOWN;

    /* Now delay, number of output channels and frame size are known */
#ifdef FIX_371_DELAY_REPORT
    if ( ( error = IVAS_DEC_GetDelay( hIvasDec, pFullDelayNumSamples, delayTimeScale ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) );
        return error;
    }

    if ( !arg.delayCompensationEnabled )
    {
#ifdef BINAURALIZATION_DELAY_REPORT
        pFullDelayNumSamples[0] = 0;
#else
        *pFullDelayNumSamples = 0;
#endif
    }
#else
    if ( arg.delayCompensationEnabled )
    {
        if ( ( error = IVAS_DEC_GetDelay( hIvasDec, pFullDelayNumSamples, delayTimeScale ) ) != IVAS_ERR_OK )
@@ -1311,6 +1327,7 @@ static ivas_error initOnFirstGoodFrame(
        *pFullDelayNumSamples = 0;
#endif
    }
#endif
#ifdef BINAURALIZATION_DELAY_REPORT
    *pRemainingDelayNumSamples = pFullDelayNumSamples[0];
#else
@@ -1714,7 +1731,7 @@ static ivas_error decodeG192(
            }
        }

        /* Write ISm metadata to external file(s) */
        /* Write ISM metadata to external file(s) */
        if ( decodedGoodFrame && arg.outputFormat == IVAS_DEC_OUTPUT_EXT )
        {
            if ( bsFormat == IVAS_DEC_BS_OBJ )
@@ -1813,7 +1830,11 @@ static ivas_error decodeG192(
        if ( delayNumSamples_orig[2] > 0 )
        {
            printf( "HRIR/BRIR delay:        %4.2f ms   (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[2] / (float) delayTimeScale, delayNumSamples_orig[2], delayTimeScale );
#ifdef FIX_371_DELAY_REPORT
            printf( "Total delay:            %4.2f ms   (%3u samples at timescale %5u)\n", 1000.f * ( delayNumSamples_orig[1] + delayNumSamples_orig[2] ) / (float) delayTimeScale, delayNumSamples_orig[1] + delayNumSamples_orig[2], delayTimeScale );
#else
            printf( "Total delay:            %4.2f ms   (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[0] / (float) delayTimeScale, delayNumSamples_orig[0], delayTimeScale );
#endif
        }
#else
        fprintf( stdout, "\nDecoder delay:          %-5u [samples]  - Timescale: %5u\n", delayNumSamples_orig, delayTimeScale );
@@ -2314,7 +2335,11 @@ static ivas_error decodeVoIP(
        if ( delayNumSamples_orig[2] > 0 )
        {
            printf( "HRIR/BRIR delay:        %4.2f ms   (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[2] / (float) delayTimeScale, delayNumSamples_orig[2], delayTimeScale );
#ifdef FIX_371_DELAY_REPORT
            printf( "Total delay:            %4.2f ms   (%3u samples at timescale %5u)\n", 1000.f * ( delayNumSamples_orig[1] + delayNumSamples_orig[2] ) / (float) delayTimeScale, delayNumSamples_orig[1] + delayNumSamples_orig[2], delayTimeScale );
#else
            printf( "Total delay:            %4.2f ms   (%3u samples at timescale %5u)\n", 1000.f * delayNumSamples_orig[0] / (float) delayTimeScale, delayNumSamples_orig[0], delayTimeScale );
#endif
        }
#else
        printf( "\nDecoder delay:       %5u [samples]  - Timescale: %5u\n", delayNumSamples_orig, delayTimeScale );
+1 −1
Original line number Diff line number Diff line
@@ -706,7 +706,7 @@ int main(
        }
#endif

        /* Read ISm input metadata */
        /* Read ISM input metadata */
        for ( i = 0; i < numIsmInputs; ++i )
        {
            if ( ismReaders[i] == NULL )
+14 −12
Original line number Diff line number Diff line
@@ -761,7 +761,7 @@ int main(
    }

#ifdef FIX_I109_ORIENTATION_TRACKING
    if ( IVAS_REND_SetOrientationTrackingMode( hIvasRend, args.orientationTracking ) )
    if ( ( error = IVAS_REND_SetOrientationTrackingMode( hIvasRend, args.orientationTracking ) ) != IVAS_ERR_OK )
    {
        return error;
    }
@@ -988,17 +988,18 @@ int main(
        {
            IVAS_QUATERNION quaternion;
#ifdef TD5
            if ( HeadRotationFileReading( referenceRotReader, &quaternion, NULL ) != IVAS_ERR_OK )
            if ( ( error = HeadRotationFileReading( referenceRotReader, &quaternion, NULL ) ) != IVAS_ERR_OK )
#else
            if ( HeadRotationFileReading( referenceRotReader, &quaternion ) != IVAS_ERR_OK )
#endif
            {
                fprintf( stderr, "Error in Head Rotation File Reading.\r\n" );
                fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) );
                exit( -1 );
            }
            if ( IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ) != IVAS_ERR_OK )

            if ( ( error = IVAS_REND_SetReferenceRotation( hIvasRend, quaternion ) ) != IVAS_ERR_OK )
            {
                fprintf( stderr, "Error setting Reference Rotation.\r\n" );
                fprintf( stderr, "Error setting Reference Rotation: %s\n", ivas_error_to_string( error ) );
                exit( -1 );
            }
        }
@@ -1008,16 +1009,17 @@ int main(
        if ( headRotReader != NULL )
        {
            IVAS_QUATERNION quatBuffer[RENDERER_HEAD_POSITIONS_PER_FRAME];

#ifdef FIX_I109_ORIENTATION_TRACKING
            for ( i = 0; i < RENDERER_HEAD_POSITIONS_PER_FRAME; i++ )
            {
#ifdef TD5
                if ( HeadRotationFileReading( headRotReader, &quatBuffer[i], &Pos[i] ) != IVAS_ERR_OK )
                if ( ( error = HeadRotationFileReading( headRotReader, &quatBuffer[i], &Pos[i] ) ) != IVAS_ERR_OK )
#else
                if ( HeadRotationFileReading( headRotReader, &quatBuffer[i] ) != IVAS_ERR_OK )
#endif
                {
                    fprintf( stderr, "Error in Head Rotation File Reading.\r\n" );
                    fprintf( stderr, "Error in Head Rotation File Reading: %s\n", ivas_error_to_string( error ) );
                    exit( -1 );
                }
            }
@@ -1029,24 +1031,24 @@ int main(
#endif
#endif
#ifdef TD5
            if ( IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer, Pos ) != IVAS_ERR_OK )
            if ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer, Pos ) ) != IVAS_ERR_OK )
#else
            if ( IVAS_REND_SetHeadRotation( hIvasRend, quatBuffer ) != IVAS_ERR_OK )
#endif
            {
                fprintf( stderr, "Error setting Head Rotation\n" );
                fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) );
                exit( -1 );
            }
        }
        else
        {
#ifdef TD5
            if ( ( IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT ) )
            if ( ( ( error = IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT ) ) // VE: TBC
#else
            if ( ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_OK ) && ( IVAS_REND_SetHeadRotation( hIvasRend, NULL ) != IVAS_ERR_INVALID_OUTPUT_FORMAT ) )
#endif
            {
                fprintf( stderr, "Error setting Head Rotation\n" );
                fprintf( stderr, "Error setting Head Rotation: %s\n", ivas_error_to_string( error ) );
                exit( -1 );
            }
        }
@@ -1916,7 +1918,7 @@ void getMetadataFromFileReader(

    if ( ( error = IsmFileReader_readNextFrame( ismReader, &ismMetadata ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nError (%s) while reading ism metadata from: %s\n\n", ivas_error_to_string( error ), IsmFileReader_getFilePath( ismReader ) );
        fprintf( stderr, "\nError (%s) while reading ISM metadata from: %s\n\n", ivas_error_to_string( error ), IsmFileReader_getFilePath( ismReader ) );
        exit( -1 );
    }

Loading