Commit 6144f017 authored by vaclav's avatar vaclav
Browse files

clang-format + formatting

parent f3df19d1
Loading
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -752,6 +752,8 @@ void DeleteLCLDDecoder(

        free( psLCLDDecoder );
    }

    return;
}


@@ -779,7 +781,7 @@ static int32_t ReadHuff( const uint32_t ( *pauiHuffDecTable )[HUFF_DEC_TABLE_SIZ

static int32_t ReadRMSEnvelope( const int32_t iChannels, const int32_t *piNumGroups, const int32_t iNumBands, int32_t ***pppiRMSEnvelope, ISAR_SPLIT_REND_BITS_HANDLE pBits );

static int32_t ReadAllocInformation( int32_t *piAllocOffset, const ISAR_SPLIT_REND_BITS_HANDLE pBits );
static int32_t ReadAllocInformation( int32_t *piAllocOffset, ISAR_SPLIT_REND_BITS_HANDLE pBits );

static int32_t ReadLCLDData( const int32_t *piNumGroups, int32_t **ppiGroupLengths, const int32_t iNumBands, const int32_t iNumChannels, int32_t **ppiDecodingUnresolved, int32_t **ppiPredEnable, const int32_t iNumSubSets, const int32_t iSubSetId, int32_t ***pppiAlloc, int32_t ***pppiSignReal, int32_t ***pppiSignImag, int32_t ***pppiQReal, int32_t ***pppiQImag, int32_t **ppiDecodingFailed, ISAR_SPLIT_REND_BITS_HANDLE pBits, uint32_t ( *c_apauiHuffDecTables[2 * ALLOC_TABLE_SIZE] )[HUFF_DEC_TABLE_SIZE] );

@@ -871,7 +873,8 @@ int16_t AnyDecodingFailed(
 *
 *------------------------------------------------------------------------------------------*/

int32_t **GetDecodingFailedStatus( LCLDDecoder *psLCLDDecoder )
int32_t **GetDecodingFailedStatus(
    LCLDDecoder *psLCLDDecoder )
{
    return psLCLDDecoder->psPredictionDecoder->ppiDecodingFailed;
}
@@ -883,7 +886,8 @@ int32_t **GetDecodingFailedStatus( LCLDDecoder *psLCLDDecoder )
 *
 *------------------------------------------------------------------------------------------*/

int16_t GetNumSubSets( LCLDDecoder *psLCLDDecoder )
int16_t GetNumSubSets(
    LCLDDecoder *psLCLDDecoder )
{
    return (int16_t) psLCLDDecoder->psPredictionDecoder->iNumSubSets;
}
@@ -895,7 +899,8 @@ int16_t GetNumSubSets( LCLDDecoder *psLCLDDecoder )
 *
 *------------------------------------------------------------------------------------------*/

int32_t **GetDecodingFailedPrevStatus( LCLDDecoder *psLCLDDecoder )
int32_t **GetDecodingFailedPrevStatus(
    LCLDDecoder *psLCLDDecoder )
{
    return psLCLDDecoder->psPredictionDecoder->ppiDecodingFailedPrev;
}
@@ -1254,6 +1259,7 @@ static void InvMSCoding(
                int32_t n;
                int32_t phaseIdx;
                float fPred;

                phaseIdx = piLRPhaseDiffs[bMSPred] - PHASE_MIN_VAL;
                fPred = dequantPred( piMSPredCoefs[bMSPred] );
                for ( n = 0; n < piBandwidths[b]; n++ )
@@ -1384,7 +1390,9 @@ static int32_t ReadMSInformation(
                }
            }
        }

        anyNonZero = ISAR_SPLIT_REND_BITStream_read_int32( pBits, 1 );

        if ( anyNonZero )
        {
            piLRPhaseDiffs[0] = ISAR_SPLIT_REND_BITStream_read_int32( pBits, PHASE_BAND0_BITS );
@@ -1405,7 +1413,9 @@ static int32_t ReadMSInformation(
                piLRPhaseDiffs[n] = 0;
            }
        }

        anyNonZero = ISAR_SPLIT_REND_BITStream_read_int32( pBits, 1 );

        if ( anyNonZero )
        {
            piMSPredCoefs[0] = ISAR_SPLIT_REND_BITStream_read_int32( pBits, PRED_BAND0_BITS );
+11 −4
Original line number Diff line number Diff line
@@ -80,7 +80,6 @@ struct LCLD_ENCODER
    int32_t ***pppiQLCLDReal;
    int32_t ***pppiQLCLDImag;


    PredictionEncoder *psPredictionEncoder;
};

@@ -98,6 +97,7 @@ static int32_t Quantize(
    const int32_t iMaxVal )
{
    int32_t iVal;

    if ( fVal > 0.0f )
    {
        iVal = (int32_t) ( fScale * fVal + 0.5f );
@@ -126,6 +126,7 @@ static float UnQuantize(
    const int32_t iSign )
{
    float fVal;

    if ( iSign == 0 )
    {
        fVal = fScale * (float) iVal;
@@ -146,6 +147,7 @@ static void PackReal(
    float ***pppfImag )
{
    int32_t ch, b, n;

    for ( ch = 0; ch < iChannels; ch++ )
    {
        for ( b = 0; b < LCLD_BANDS; b++ )
@@ -214,6 +216,7 @@ ivas_error CreateLCLDEncoder(
        psLCLDEncoder->iNumBlocks = iNumBlocks;
    }
    psLCLDEncoder->iMSMode = 0;

    if ( ( psLCLDEncoder->piMSFlags = (int32_t *) malloc( MAX_BANDS * sizeof( int32_t ) ) ) == NULL )
    {
        return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LCLD encoder Module \n" ) );
@@ -420,6 +423,7 @@ void DeleteLCLDEncoder(
            }
            free( psLCLDEncoder->ppiGroupLengths );
        }

        if ( psLCLDEncoder->pppiRMSEnvelope != NULL )
        {
            for ( n = 0; n < psLCLDEncoder->iChannels; n++ )
@@ -571,7 +575,7 @@ int32_t EncodeLCLDFrame(
    const int32_t available_bits,
    ISAR_SPLIT_REND_BITS_HANDLE pBits )
{
    int32_t n;
    int32_t k, n;
    int32_t iAvailableBits, iBitsWritten;
    int32_t iNumMSBands = 0;
    int32_t iAudioBitsWritten;
@@ -675,7 +679,6 @@ int32_t EncodeLCLDFrame(

    if ( psLCLDEncoder->iChannels == 2 && psLCLDEncoder->iCommonGrouping == 1 )
    {
        int32_t k;
        for ( k = 0; k < psLCLDEncoder->piNumGroups[0]; k++ )
        {
            PerceptualModelStereo( psLCLDEncoder->iNumBands,
@@ -692,7 +695,6 @@ int32_t EncodeLCLDFrame(
    {
        for ( n = 0; n < psLCLDEncoder->iChannels; n++ )
        {
            int32_t k;
            for ( k = 0; k < psLCLDEncoder->piNumGroups[n]; k++ )
            {
                PerceptualModel( psLCLDEncoder->iNumBands,
@@ -1040,6 +1042,7 @@ static int32_t MSModeCalculation(
        fprintf( fid, "%d %d %d %d %d\n", iMsInfoBits, piMsPredInfoBits[MS_PHASE_AND_PRED], piMsPredInfoBits[MS_PRED_ONLY], piMsPredInfoBits[MS_PHASE_ONLY], iActualInfoBits );
    }
#endif

    if ( *piMSMode != MS_OFF )
    {
        iFBOffset = 0;
@@ -1306,8 +1309,10 @@ static int32_t CountLCLDBits(
                {
                    const uint16_t( *pauiHuffmanTable )[2] = NULL;
                    const uint16_t( *pauiHuffmanTableDPCM )[2] = NULL;

                    pauiHuffmanTable = c_apauiHuffEncTabels[iAlloc];
                    pauiHuffmanTableDPCM = c_apauiHuffEncTabels[ALLOC_TABLE_SIZE + iAlloc];

                    for ( m = 0; m < piBandwidths[b]; m++ )
                    {
                        int32_t iQuantValue1;
@@ -1394,6 +1399,7 @@ static int32_t WriteMSInformation(
#ifdef DEBUG_WRITE_MS_PRED
    int32_t iBitsWrittenTmp = 0;
#endif

    iBitsWritten = 0;
    ISAR_SPLIT_REND_BITStream_write_int32( pBits, iMSMode, 2 );
    iBitsWritten += 2;
@@ -1625,6 +1631,7 @@ static int32_t WriteAllocInformation(
    return iBitsWritten;
}


static int32_t WriteLCLDData(
    const int32_t *piNumGroups,
    int32_t **ppiGroupLengths,
+1 −1

File changed.

Contains only whitespace changes.