Commit 17699507 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

align differences to main

parent ec912770
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -738,6 +738,7 @@ int main(
            goto cleanup;
        }
    }

    /*------------------------------------------------------------------------------------------*
     * Load custom loudspeaker layout data
     *------------------------------------------------------------------------------------------*/
+6 −6
Original line number Diff line number Diff line
@@ -469,9 +469,9 @@ int32_t ivas_get_lc3plus_bitrate( const int32_t SplitRendBitRate, IVAS_SPLIT_REN
{
    if ( poseCorrectionMode == IVAS_SPLIT_REND_POSE_CORRECTION_MODE_CLDFB )
    {
        int32_t inBandMdBps = (int32_t) ( 8 * 1000 /
        int32_t inBandMdBps = (int32_t) ( 8 *
#ifdef API_5MS
                                          split_prerender_frame_size_ms
                                          1000 / split_prerender_frame_size_ms
#else
                                          FRAMES_PER_SEC
#endif
@@ -570,13 +570,13 @@ int32_t ivas_get_lc3plus_size_from_id( const int8_t SplitRendBitRateId, IVAS_SPL
    );

    /* Return size in bytes */
    return (int32_t) ( bitrate *
    return (int32_t) ( bitrate
#ifdef API_5MS
                       split_prerender_frame_size_ms
                       * split_prerender_frame_size_ms / 1000
#else
                       FRAMES_PER_SEC
                       / FRAMES_PER_SEC
#endif
                       / 1000 / 8 );
                       / 8 );
}

ivas_error ivas_split_rend_validate_config( const IVAS_SPLIT_REND_CONFIG_DATA *pSplitRendConfig, const int16_t is_pcm_out )
+14 −24
Original line number Diff line number Diff line
@@ -217,8 +217,10 @@ typedef struct
    input_base base;
    SPLIT_POST_REND_WRAPPER splitPostRendWrapper;
    float *bufferData;
#ifdef API_5MS
    int16_t numCachedSamples; /* Number of decoded samples in bufferData that have not yet been played out */
    IVAS_REND_BitstreamBuffer *hBits;
#endif
} input_split_post_rend;
#endif

@@ -2871,7 +2873,9 @@ static ivas_error setRendInputActiveSplitPostRend(
                       MAX_BIN_BUFFER_LENGTH
#endif
    );
#ifdef API_5MS
    inputSplitPostRend->numCachedSamples = 0;
#endif

    if ( ( error = updateSplitPostRendPanGains( inputSplitPostRend, outConfig, hRendCfg ) ) != IVAS_ERR_OK )
    {
@@ -3380,6 +3384,7 @@ static DecoderDummy *initDecoderDummy(
            decDummy->hHeadTrackData->Quaternions[i].y = 0.0f;
            decDummy->hHeadTrackData->Quaternions[i].z = 0.0f;
        }
        decDummy->hHeadTrackData->num_quaternions = 0;
#endif
        decDummy->hHeadTrackData->lrSwitchInterpVal = 0.0f;
        decDummy->hHeadTrackData->lrSwitchedCurrent = 0;
@@ -5965,7 +5970,10 @@ static ivas_error rotateFrameSba(
#else
    int16_t subframe_idx, subframe_len;
#endif
    float *readPtr, *writePtr;
#ifdef API_5MS
    float *readPtr;
#endif
    float *writePtr;
    rotation_matrix Rmat;
    float tmpRot[2 * HEADROT_ORDER + 1];
    rotation_gains gains;
@@ -6052,35 +6060,15 @@ static ivas_error rotateFrameSba(

                    for ( m = m1; m < m2; m++ )
                    {
// sgi@bay sgi2tmu to be verified how to resolve this correctly
// <<<<<<< HEAD
// #ifdef API_5MS
//                         readPtr = getSmplPtr( inAudio, m, i );
//                         /* crossfade with previous rotation gains */
//                         tmpRot[n - m1] += crossfade[i] * gains[n][m] * ( *readPtr ) +
//                                           ( 1 - crossfade[i] ) * gains_prev[n][m] * ( *readPtr );
// #else
//                     readPtr = getSmplPtr( inAudio, m, subframe_idx * subframe_len + i );
//                     /* crossfade with previous rotation gains */
//                     tmpRot[n - m1] += headRotData->crossfade[i] * gains[n][m] * ( *readPtr ) +
//                                       ( 1 - headRotData->crossfade[i] ) * gains_prev[n][m] * ( *readPtr );
// #endif
// =======
//                         val = inAudio.data[m * inAudio.config.numSamplesPerChannel + idx];
//                         /* crossfade with previous rotation gains */
//                         tmpRot[n - m1] += ( cf * gains[n][m] * val + oneminuscf * gains_prev[n][m] * val );
// >>>>>>> main
// tmp merge:
#ifdef API_5MS
                        readPtr = getSmplPtr( inAudio, m, i );
                        /* crossfade with previous rotation gains */
                        tmpRot[n - m1] += crossfade[i] * gains[n][m] * ( *readPtr ) +
                                          ( 1 - crossfade[i] ) * gains_prev[n][m] * ( *readPtr );
#else
                    readPtr = getSmplPtr( inAudio, m, subframe_idx * subframe_len + i );
                    val = inAudio.data[m * inAudio.config.numSamplesPerChannel + idx];
                    /* crossfade with previous rotation gains */
                    tmpRot[n - m1] += headRotData->crossfade[i] * gains[n][m] * ( *readPtr ) +
                                      ( 1 - headRotData->crossfade[i] ) * gains_prev[n][m] * ( *readPtr );
                    tmpRot[n - m1] += ( cf * gains[n][m] * val + oneminuscf * gains_prev[n][m] * val );
#endif
                        // merge end
                    }
@@ -6522,6 +6510,9 @@ static ivas_error renderIsmToSplitBinaural(
    input_ism *ismInput,
    const IVAS_REND_AudioBuffer outAudio )
{
#ifndef API_5MS
    int32_t i;
#endif
    ivas_error error;
    float tmpProcessing[MAX_NUM_OBJECTS][L_FRAME48k];
    int16_t pos_idx;
@@ -6531,7 +6522,6 @@ static ivas_error renderIsmToSplitBinaural(
    IVAS_QUATERNION originalHeadRot;
#else
    IVAS_QUATERNION originalHeadRot[MAX_PARAM_SPATIAL_SUBFRAMES];
    int16_t i;
#endif
    float tmpBinaural[MAX_HEAD_ROT_POSES * BINAURAL_CHANNELS][L_FRAME48k];
    int16_t output_frame = ismInput->base.inputBuffer.config.numSamplesPerChannel;