Unverified Commit 0b703ca3 authored by norvell's avatar norvell
Browse files

Merge with main

parents 80d8d7f9 7d03a381
Loading
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -285,20 +285,11 @@
    <ClCompile Include="..\lib_com\wtda_fx.c" />
  </ItemGroup>
  <ItemGroup>
    <ClInclude Include="..\lib_com\basop32.h" />
    <ClInclude Include="..\lib_com\basop_proto_func.h" />
    <ClInclude Include="..\lib_com\basop_settings.h" />
    <ClInclude Include="..\lib_com\basop_util.h" />
    <ClInclude Include="..\lib_com\cnst.h" />
    <ClInclude Include="..\lib_com\common_api_types.h" />
    <ClInclude Include="..\lib_com\complex_basop.h" />
    <ClInclude Include="..\lib_com\control.h" />
    <ClInclude Include="..\lib_com\count.h" />
    <ClInclude Include="..\lib_com\enh1632.h" />
    <ClInclude Include="..\lib_com\enh32.h" />
    <ClInclude Include="..\lib_com\enh40.h" />
    <ClInclude Include="..\lib_com\enh64.h" />
    <ClInclude Include="..\lib_com\enhUL32.h" />
    <ClInclude Include="..\lib_com\ivas_cnst.h" />
    <ClInclude Include="..\lib_com\ivas_error.h" />
    <ClInclude Include="..\lib_com\ivas_error_utils.h" />
@@ -317,9 +308,6 @@
    <ClInclude Include="..\lib_com\rom_basop_util.h" />
    <ClInclude Include="..\lib_com\rom_com.h" />
    <ClInclude Include="..\lib_com\stat_com.h" />
    <ClInclude Include="..\lib_com\stl.h" />
    <ClInclude Include="..\lib_com\typedef.h" />
    <ClInclude Include="..\lib_com\typedefs.h" />
  </ItemGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
+0 −36
Original line number Diff line number Diff line
@@ -501,9 +501,6 @@
    <ClInclude Include="..\lib_com\ivas_rom_com.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\basop32.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\basop_settings.h">
      <Filter>common_h</Filter>
    </ClInclude>
@@ -513,33 +510,9 @@
    <ClInclude Include="..\lib_com\cnst.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\complex_basop.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\control.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\count.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\basop_util.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\enh40.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\enh32.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\enh64.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\enh1632.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\enhUL32.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\rom_basic_math.h">
      <Filter>common_h</Filter>
    </ClInclude>
@@ -552,9 +525,6 @@
    <ClInclude Include="..\lib_com\stat_com.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\stl.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\move.h">
      <Filter>common_h</Filter>
    </ClInclude>
@@ -570,12 +540,6 @@
    <ClInclude Include="..\lib_com\oper_32b.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\typedef.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\typedefs.h">
      <Filter>common_h</Filter>
    </ClInclude>
    <ClInclude Include="..\lib_com\log2.h">
      <Filter>common_h</Filter>
    </ClInclude>
+60 −43
Original line number Diff line number Diff line
@@ -1616,6 +1616,38 @@ static void usage_dec( void )
}


/*---------------------------------------------------------------------*
 * resetHeadRotation()
 *
 *
 *---------------------------------------------------------------------*/

static void resetHeadRotation(
    const int16_t num_subframes,  /* i  : number of subframes   */
    IVAS_QUATERNION *pQuaternion, /* o  : head-tracking data    */
    IVAS_VECTOR3 *pPos            /* o  : listener position     */

)
{
    int16_t i;

    for ( i = 0; i < num_subframes; i++ )
    {
        pQuaternion[i].w_fx = -12582912;
        pQuaternion[i].x_fx = 0;
        pQuaternion[i].y_fx = 0;
        pQuaternion[i].z_fx = 0;
        pQuaternion[i].q_fact = 22;
        pPos[i].x_fx = 0;
        pPos[i].y_fx = 0;
        pPos[i].z_fx = 0;
        pPos[i].q_fact = 25;
    }

    return;
}


/*---------------------------------------------------------------------*
 * initOnFirstGoodFrame()
 *
@@ -2093,7 +2125,6 @@ static ivas_error decodeG192(

    while ( 1 )
    {
        /* Read next frame if not enough samples availble */
        /* reference vector */
        if ( arg.enableReferenceVectorTracking && vec_pos_update == 0 )
        {
@@ -2140,18 +2171,7 @@ static ivas_error decodeG192(
        {
            if ( headRotReader == NULL )
            {
                for ( i = 0; i < (int16_t) num_subframes; i++ )
                {
                    Quaternions[i].w_fx = -12582912;
                    Quaternions[i].x_fx = 0;
                    Quaternions[i].y_fx = 0;
                    Quaternions[i].z_fx = 0;
                    Quaternions[i].q_fact = 22;
                    Pos[i].x_fx = 0;
                    Pos[i].y_fx = 0;
                    Pos[i].z_fx = 0;
                    Pos[i].q_fact = 25;
                }
                resetHeadRotation( num_subframes, Quaternions, Pos );
            }
            else
            {
@@ -2327,9 +2347,6 @@ static ivas_error decodeG192(
                    fprintf( stderr, "\nError in IVAS_DEC_GetSplitBinauralBitstream: %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
                }

                nSamplesRendered += nSamplesRendered_loop;
                nSamplesToRender -= nSamplesRendered_loop;
            }
            else
            {
@@ -2338,12 +2355,13 @@ static ivas_error decodeG192(
                    fprintf( stderr, "\nError in IVAS_DEC_GetSamplesRenderer(): %s\n", IVAS_DEC_GetErrorMessage( error ) );
                    goto cleanup;
                }
            }

            nSamplesRendered += nSamplesRendered_loop;
            nSamplesToRender -= nSamplesRendered_loop;
            }

            if ( needNewFrame )
            {

                frame++;
                if ( !arg.quietModeEnabled )
                {
@@ -2352,7 +2370,6 @@ static ivas_error decodeG192(
            }
        } while ( nSamplesRendered < nOutSamples && error == IVAS_ERR_OK );


        if ( error == IVAS_ERR_END_OF_FILE )
        {
            break;
@@ -2412,7 +2429,7 @@ static ivas_error decodeG192(
            }
        }

        /* Write ISm metadata to external file(s) */
        /* Write ISM metadata to external file(s) */
        if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL )
        {
            if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_MASA_ISM || bsFormat == IVAS_DEC_BS_SBA_ISM )
@@ -2452,6 +2469,7 @@ static ivas_error decodeG192(
                {
                    fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) );
                }

                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -2486,8 +2504,6 @@ static ivas_error decodeG192(
    {
        int16_t nSamplesFlushed;

        /* Feed into decoder */

        /* reference vector */
        if ( arg.enableReferenceVectorTracking )
        {
@@ -2553,7 +2569,7 @@ static ivas_error decodeG192(
            }
        }

        /* decode and get samples */
        /* flush remaining audio */
        if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK )
        {
            fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -2567,7 +2583,7 @@ static ivas_error decodeG192(
            goto cleanup;
        }

        /* Write ISm metadata to external file(s) */
        /* Write ISM metadata to external file(s) */
        if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL )
        {
            if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_MASA_ISM || bsFormat == IVAS_DEC_BS_SBA_ISM )
@@ -2606,6 +2622,7 @@ static ivas_error decodeG192(
                {
                    fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) );
                }

                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -2708,14 +2725,22 @@ cleanup:
    return error;
}


#ifdef SUPPORT_JBM_TRACEFILE
static ivas_error writeJbmTraceFileFrameWrapper( const void *data, void *writer )

/*---------------------------------------------------------------------*
 * writeJbmTraceFileFrameWrapper()
 *
 *
 *---------------------------------------------------------------------*/

static ivas_error writeJbmTraceFileFrameWrapper(
    const void *data,
    void *writer )
{
    return JbmTraceFileWriter_writeFrame( data, writer );
}
#endif

#endif

/*---------------------------------------------------------------------*
 * decodeVoIP()
@@ -2813,11 +2838,13 @@ static ivas_error decodeVoIP(
        fprintf( stderr, "\nError getting render frame size in samples\n" );
        return error;
    }

    if ( ( error = IVAS_DEC_GetRenderFramesizeSamples( hIvasDec, &nOutSamples ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nError getting render frame size in samples\n" );
        return error;
    }

    if ( ( error = IVAS_DEC_GetReferencesUpdateFrequency( hIvasDec, &vec_pos_len ) ) != IVAS_ERR_OK )
    {
        fprintf( stderr, "\nError getting render frame size in samples\n" );
@@ -2983,18 +3010,7 @@ static ivas_error decodeVoIP(
        {
            if ( headRotReader == NULL )
            {
                for ( i = 0; i < (int16_t) num_subframes; i++ )
                {
                    Quaternions[i].w_fx = -12582912;
                    Quaternions[i].x_fx = 0;
                    Quaternions[i].y_fx = 0;
                    Quaternions[i].z_fx = 0;
                    Quaternions[i].q_fact = 22;
                    Pos[i].x = 0.0f;
                    Pos[i].y = 0.0f;
                    Pos[i].z = 0.0f;
                    Pos[i].q_fact = 25;
                }
                resetHeadRotation( num_subframes, Quaternions, Pos );
            }
            else
            {
@@ -3030,8 +3046,7 @@ static ivas_error decodeVoIP(

                if ( ( error = ExternalOrientationFileReading( externalOrientationFileReader, &Quaternions[i], &enableHeadRotation[i], &enableExternalOrientation[i], &enableRotationInterpolation[i], &numFramesToTargetOrientation[i] ) ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError %s while reading external orientation from %s\n", IVAS_DEC_GetErrorMessage( error ),
                             RotationFileReader_getFilePath( externalOrientationFileReader ) );
                    fprintf( stderr, "\nError %s while reading external orientation from %s\n", IVAS_DEC_GetErrorMessage( error ), RotationFileReader_getFilePath( externalOrientationFileReader ) );
                    goto cleanup;
                }
            }
@@ -3347,6 +3362,7 @@ static ivas_error decodeVoIP(
                    {
                        fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) );
                    }

                    if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 1 ) ) != IVAS_ERR_OK )
                    {
                        fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
@@ -3418,7 +3434,7 @@ static ivas_error decodeVoIP(
            goto cleanup;
        }

        /* Write ISm metadata to external file(s) */
        /* Write ISM metadata to external file(s) */
        if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL )
        {
            if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_MASA_ISM || bsFormat == IVAS_DEC_BS_SBA_ISM )
@@ -3458,6 +3474,7 @@ static ivas_error decodeVoIP(
                {
                    fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) );
                }

                if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK )
                {
                    fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) );
+2 −0
Original line number Diff line number Diff line
@@ -473,4 +473,6 @@ cmplx_s C_shl( cmplx_s inp, Word16 shift_val )

#endif /* #ifdef COMPLEX_OPERATOR */

#undef WMC_TOOL_SKIP

/* end of file */
+10 −11
Original line number Diff line number Diff line
@@ -188,7 +188,6 @@ Word16 CountIndexBits(
    return result;
}

#define WMC_TOOL_SKIP

Word32 tcx_hm_render(
    Word32 lag,       /* i  : pitch lag                         Q0  */
@@ -292,6 +291,6 @@ void tcx_hm_modify_envelope(
        h = add( h, 1 );                                          /* Q0 */
        k = extract_l( L_shr( imult3216( lag, h ), fract_res ) ); /* Q0 */
    }
}

#undef WMC_TOOL_SKIP
    return;
}
Loading