Commit c6eb42b1 authored by vaclav's avatar vaclav
Browse files

Merge remote-tracking branch 'remotes/origin/main' into 20230309_editorial_improvements

parents a5cf21b7 23e284e4
Loading
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -100,7 +100,6 @@ static void delayMasaMetadata(
)
{
    int16_t dir, sf, band;
    uint16_t temp;
    uint8_t currentNumberOfDirections;

    /* Move meta to delay and output. Always use two directions as the metadata is prepared to contain zero energy second direction
@@ -109,33 +108,35 @@ static void delayMasaMetadata(
    {
        for ( band = 0; band < MASA_FREQUENCY_BANDS; band++ )
        {
            uint16_t temp_u16;
            uint8_t temp_u8;
            for ( dir = 0; dir < MASA_MAXIMUM_DIRECTIONS; dir++ )
            {
                temp = delayStorage->directionIndex[dir][sf][band];
                temp_u16 = delayStorage->directionIndex[dir][sf][band];
                delayStorage->directionIndex[dir][sf][band] = extOutMeta->directionIndex[dir][sf + DELAY_MASA_PARAM_DEC_SFR][band];
                extOutMeta->directionIndex[dir][sf + DELAY_MASA_PARAM_DEC_SFR][band] = extOutMeta->directionIndex[dir][sf][band];
                extOutMeta->directionIndex[dir][sf][band] = temp;
                extOutMeta->directionIndex[dir][sf][band] = temp_u16;

                temp = delayStorage->directToTotalRatio[dir][sf][band];
                temp_u8 = delayStorage->directToTotalRatio[dir][sf][band];
                delayStorage->directToTotalRatio[dir][sf][band] = extOutMeta->directToTotalRatio[dir][sf + DELAY_MASA_PARAM_DEC_SFR][band];
                extOutMeta->directToTotalRatio[dir][sf + DELAY_MASA_PARAM_DEC_SFR][band] = extOutMeta->directToTotalRatio[dir][sf][band];
                extOutMeta->directToTotalRatio[dir][sf][band] = temp;
                extOutMeta->directToTotalRatio[dir][sf][band] = temp_u8;

                temp = delayStorage->spreadCoherence[dir][sf][band];
                temp_u8 = delayStorage->spreadCoherence[dir][sf][band];
                delayStorage->spreadCoherence[dir][sf][band] = extOutMeta->spreadCoherence[dir][sf + DELAY_MASA_PARAM_DEC_SFR][band];
                extOutMeta->spreadCoherence[dir][sf + DELAY_MASA_PARAM_DEC_SFR][band] = extOutMeta->spreadCoherence[dir][sf][band];
                extOutMeta->spreadCoherence[dir][sf][band] = temp;
                extOutMeta->spreadCoherence[dir][sf][band] = temp_u8;
            }

            temp = delayStorage->surroundCoherence[sf][band];
            temp_u8 = delayStorage->surroundCoherence[sf][band];
            delayStorage->surroundCoherence[sf][band] = extOutMeta->surroundCoherence[sf + DELAY_MASA_PARAM_DEC_SFR][band];
            extOutMeta->surroundCoherence[sf + DELAY_MASA_PARAM_DEC_SFR][band] = extOutMeta->surroundCoherence[sf][band];
            extOutMeta->surroundCoherence[sf][band] = temp;
            extOutMeta->surroundCoherence[sf][band] = temp_u8;

            temp = delayStorage->diffuseToTotalRatio[sf][band];
            temp_u8 = delayStorage->diffuseToTotalRatio[sf][band];
            delayStorage->diffuseToTotalRatio[sf][band] = extOutMeta->diffuseToTotalRatio[sf + DELAY_MASA_PARAM_DEC_SFR][band];
            extOutMeta->diffuseToTotalRatio[sf + DELAY_MASA_PARAM_DEC_SFR][band] = extOutMeta->diffuseToTotalRatio[sf][band];
            extOutMeta->diffuseToTotalRatio[sf][band] = temp;
            extOutMeta->diffuseToTotalRatio[sf][band] = temp_u8;
        }
    }