Commit 5b684737 authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

improve warning and error messages

parent 0487aa5e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -867,8 +867,8 @@ static void LimitRMSEnvelope(

        IF( GT_32( iDelta, iRMSDeltaMax ) )
        {
#ifdef DEBUG_VERBOSE
            printf( "WARNING RMS envelope delta limited\n" );
#ifdef DEBUGGING
            printf( "Warning: RMS envelope delta limited!\n" );
#endif
            piRMSEnvelope[iBand] = L_add( L_sub( iDelta, iRMSDeltaMax ), piRMSEnvelope[iBand] );
        }
@@ -887,8 +887,8 @@ static void LimitRMSEnvelope(

        IF( LT_32( iDelta, iRMSDeltaMin ) )
        {
#ifdef DEBUG_VERBOSE
            printf( "WARNING RMS envelope delta limited\n" );
#ifdef DEBUGGING
            printf( "Warning: RMS envelope delta limited!\n" );
#endif
            piRMSEnvelope[iBand] = L_add( piRMSEnvelope[iBand], L_sub( iRMSDeltaMin, iDelta ) );
        }
+6 −6
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@ static Word32 UnQuantize_fx(
    }
    return fVal_fx;
}

static void PackReal(
    const Word32 iChannels,
    const Word32 iNumBlocks,
@@ -159,6 +160,7 @@ static void PackReal(
        }
    }
}

/*------------------------------------------------------------------------------------------*
 * Function CreateLCLDEncoder()
 *
@@ -770,6 +772,7 @@ Word32 EncodeLCLDFrame(
    return 0;
}

#ifndef FIX_2371_REMOVE_UNUSED_ISAR_FCNS
/*------------------------------------------------------------------------------------------*
 * Function GetNumGroups()
 *
@@ -780,7 +783,7 @@ Word32 GetNumGroups( LCLDEncoder *psLCLDEncoder )
{
    return psLCLDEncoder->piNumGroups[0];
}

#endif

/*------------------------------------------------------------------------------------------*
 * Local functions
@@ -1850,7 +1853,7 @@ static Word32 WriteAllocInformation(

    IF( LT_32( iAllocOffset, MIN_ALLOC_OFFSET ) || GT_32( iAllocOffset, MAX_ALLOC_OFFSET ) )
    {
        printf( "Serious error\n" );
        printf( "Error in WriteAllocInformation() - iAllocOffset has incorrect value: %d!\n", iAllocOffset );
    }

    ISAR_SPLIT_REND_BITStream_write_int32( pBits, L_sub( iAllocOffset, MIN_ALLOC_OFFSET ), ALLOC_OFFSET_BITS );
@@ -2090,10 +2093,7 @@ static Word32 ComputeAllocation(

        IF( LE_32( *piAllocOffset, MIN_ALLOC_OFFSET ) && GT_32( iBitsUsed, iAvailableBits ) )
        {
#ifdef DEBUG_VERBOSE
            printf( "Frame can not be coded with the number of bits available\n" );
#endif
            // iLastError = ENC_ERROR_STREAM_FAILURE;
            printf( "Error in ComputeAllocation() - frame can not be coded with the number of bits available!\n" );
            return -1;
        }
        ELSE IF( GE_32( *piAllocOffset, MAX_ALLOC_OFFSET ) && LT_32( iBitsUsed, iAvailableBits ) )
+2 −1
Original line number Diff line number Diff line
@@ -65,10 +65,11 @@ Word32 EncodeLCLDFrame(
    Word16 *q_final
);

#ifndef FIX_2371_REMOVE_UNUSED_ISAR_FCNS
Word32 GetNumGroups(
    LCLDEncoder *psLCLDEncoder
);

#endif

typedef struct LCLD_DECODER LCLDDecoder;

+0 −2
Original line number Diff line number Diff line
@@ -1062,7 +1062,6 @@ ivas_error ISAR_POST_REND_FeedInputAudio(

    IF( ( error = getInputById( hIvasRend, inputId, (void **) &inputBase ) ) != IVAS_ERR_OK )
    {
        printf( "Foo\n" );
        return error;
    }

@@ -1185,7 +1184,6 @@ ivas_error ISAR_POST_REND_FeedSplitBinauralBitstream(

    IF( ( error = getInputById( hIvasRend, inputId, (void **) &inputBase ) ) != IVAS_ERR_OK )
    {
        printf( "Goo\n" );
        return error;
    }