Loading lib_isar/isar_lcld_decoder.c +14 −4 Original line number Diff line number Diff line Loading @@ -752,6 +752,8 @@ void DeleteLCLDDecoder( free( psLCLDDecoder ); } return; } Loading Loading @@ -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] ); Loading Loading @@ -871,7 +873,8 @@ int16_t AnyDecodingFailed( * *------------------------------------------------------------------------------------------*/ int32_t **GetDecodingFailedStatus( LCLDDecoder *psLCLDDecoder ) int32_t **GetDecodingFailedStatus( LCLDDecoder *psLCLDDecoder ) { return psLCLDDecoder->psPredictionDecoder->ppiDecodingFailed; } Loading @@ -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; } Loading @@ -895,7 +899,8 @@ int16_t GetNumSubSets( LCLDDecoder *psLCLDDecoder ) * *------------------------------------------------------------------------------------------*/ int32_t **GetDecodingFailedPrevStatus( LCLDDecoder *psLCLDDecoder ) int32_t **GetDecodingFailedPrevStatus( LCLDDecoder *psLCLDDecoder ) { return psLCLDDecoder->psPredictionDecoder->ppiDecodingFailedPrev; } Loading Loading @@ -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++ ) Loading Loading @@ -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 ); Loading @@ -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 ); Loading lib_isar/isar_lcld_encoder.c +11 −4 Original line number Diff line number Diff line Loading @@ -80,7 +80,6 @@ struct LCLD_ENCODER int32_t ***pppiQLCLDReal; int32_t ***pppiQLCLDImag; PredictionEncoder *psPredictionEncoder; }; Loading @@ -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 ); Loading Loading @@ -126,6 +126,7 @@ static float UnQuantize( const int32_t iSign ) { float fVal; if ( iSign == 0 ) { fVal = fScale * (float) iVal; Loading @@ -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++ ) Loading Loading @@ -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" ) ); Loading Loading @@ -420,6 +423,7 @@ void DeleteLCLDEncoder( } free( psLCLDEncoder->ppiGroupLengths ); } if ( psLCLDEncoder->pppiRMSEnvelope != NULL ) { for ( n = 0; n < psLCLDEncoder->iChannels; n++ ) Loading Loading @@ -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; Loading Loading @@ -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, Loading @@ -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, Loading Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -1625,6 +1631,7 @@ static int32_t WriteAllocInformation( return iBitsWritten; } static int32_t WriteLCLDData( const int32_t *piNumGroups, int32_t **ppiGroupLengths, Loading lib_rend/lib_rend.c +1 −1 File changed.Contains only whitespace changes. Show changes Loading
lib_isar/isar_lcld_decoder.c +14 −4 Original line number Diff line number Diff line Loading @@ -752,6 +752,8 @@ void DeleteLCLDDecoder( free( psLCLDDecoder ); } return; } Loading Loading @@ -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] ); Loading Loading @@ -871,7 +873,8 @@ int16_t AnyDecodingFailed( * *------------------------------------------------------------------------------------------*/ int32_t **GetDecodingFailedStatus( LCLDDecoder *psLCLDDecoder ) int32_t **GetDecodingFailedStatus( LCLDDecoder *psLCLDDecoder ) { return psLCLDDecoder->psPredictionDecoder->ppiDecodingFailed; } Loading @@ -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; } Loading @@ -895,7 +899,8 @@ int16_t GetNumSubSets( LCLDDecoder *psLCLDDecoder ) * *------------------------------------------------------------------------------------------*/ int32_t **GetDecodingFailedPrevStatus( LCLDDecoder *psLCLDDecoder ) int32_t **GetDecodingFailedPrevStatus( LCLDDecoder *psLCLDDecoder ) { return psLCLDDecoder->psPredictionDecoder->ppiDecodingFailedPrev; } Loading Loading @@ -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++ ) Loading Loading @@ -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 ); Loading @@ -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 ); Loading
lib_isar/isar_lcld_encoder.c +11 −4 Original line number Diff line number Diff line Loading @@ -80,7 +80,6 @@ struct LCLD_ENCODER int32_t ***pppiQLCLDReal; int32_t ***pppiQLCLDImag; PredictionEncoder *psPredictionEncoder; }; Loading @@ -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 ); Loading Loading @@ -126,6 +126,7 @@ static float UnQuantize( const int32_t iSign ) { float fVal; if ( iSign == 0 ) { fVal = fScale * (float) iVal; Loading @@ -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++ ) Loading Loading @@ -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" ) ); Loading Loading @@ -420,6 +423,7 @@ void DeleteLCLDEncoder( } free( psLCLDEncoder->ppiGroupLengths ); } if ( psLCLDEncoder->pppiRMSEnvelope != NULL ) { for ( n = 0; n < psLCLDEncoder->iChannels; n++ ) Loading Loading @@ -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; Loading Loading @@ -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, Loading @@ -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, Loading Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -1625,6 +1631,7 @@ static int32_t WriteAllocInformation( return iBitsWritten; } static int32_t WriteLCLDData( const int32_t *piNumGroups, int32_t **ppiGroupLengths, Loading