Loading lib_rend/ivas_PredDecoder.c +1 −14 Original line number Diff line number Diff line Loading @@ -40,19 +40,6 @@ #include "ivas_lcld_rom_tables.h" #include "wmc_auto.h" #ifdef SPLIT_REND_LCLD_5MS /*-------------------------------------------------------------------* * Function get_bit() * * *-------------------------------------------------------------------*/ static int get_bit( int state, int bit_id ) { return ( state & ( 1 << bit_id ) ); } #endif /*-------------------------------------------------------------------* * Function CreatePredictionDecoder() * Loading Loading @@ -436,7 +423,7 @@ int32_t ReadPredictors( /* disable any inactive prediction bands */ for ( c = 0; c < psPredictionDecoder->iChannels; c++ ) { int set; int32_t set; for ( set = 0; set < psPredictionDecoder->iNumSubSets; set++ ) { if ( !get_bit( psPredictionDecoder->piPredChanEnable[c], set ) ) Loading lib_rend/ivas_PredEncoder.c +4 −15 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ * * *-------------------------------------------------------------------*/ static void activate_bit( int *state, int bit_id ) static void activate_bit( int32_t *state, int32_t bit_id ) { ( *state ) |= ( 1 << bit_id ); } Loading @@ -58,21 +58,10 @@ static void activate_bit( int *state, int bit_id ) * *-------------------------------------------------------------------*/ static void deactivate_bit( int *state, int bit_id ) static void deactivate_bit( int32_t *state, int32_t bit_id ) { ( *state ) &= ( ~( 1 << bit_id ) ); } /*-------------------------------------------------------------------* * Function get_bit() * * *-------------------------------------------------------------------*/ static int get_bit( int state, int bit_id ) { return ( state & ( 1 << bit_id ) ); } #endif /*-------------------------------------------------------------------* Loading Loading @@ -439,7 +428,7 @@ void ComputePredictors( pppfImagBuf = psPredictionEncoder->pppfInpBufImag; for ( c = 0; c < psPredictionEncoder->iChannels; c++ ) { int n; int32_t n; for ( n = 0; n < LCLD_PRED_WIN_LEN - iNumBlocks; n++ ) { mvr2r( pppfRealBuf[c][n + iNumBlocks], pppfRealBuf[c][n], LCLD_BANDS ); Loading Loading @@ -519,7 +508,7 @@ void ComputePredictors( float fA1Phase; float fGain2; float fBitGain2; int iNumBlocksPerPredCoef = min( iNumBlocks * psPredictionEncoder->iNumSubSets, LCLD_PRED_WIN_LEN ); int32_t iNumBlocksPerPredCoef = min( iNumBlocks * psPredictionEncoder->iNumSubSets, LCLD_PRED_WIN_LEN ); const float fMagScale = ( 2.0f * (float) ( 1 << ( PRED_QUNAT_FILTER_MAG_BITS ) ) + 1.0f ) / M_PI; const float fInvMagScale = M_PI / ( 2.0f * (float) ( 1 << ( PRED_QUNAT_FILTER_MAG_BITS ) ) + 1.0f ); Loading lib_rend/ivas_lcld_decoder.c +1 −1 Original line number Diff line number Diff line Loading @@ -831,7 +831,7 @@ int32_t DecodeLCLDFrame( fid = fopen( "pred_dec.txt", "wt" ); for ( n = 0; n < psLCLDDecoder->iChannels; n++ ) { int b; int16_t b; for ( b = 0; b < 60; b++ ) fprintf( fid, "%.5f ", (float) psLCLDDecoder->psPredictionDecoder->ppiPredBandEnable[n][b] * psLCLDDecoder->psPredictionDecoder->ppfA1Imag[n][b] ); } Loading lib_rend/ivas_lcld_encoder.c +6 −6 Original line number Diff line number Diff line Loading @@ -89,24 +89,24 @@ struct LCLD_ENCODER }; #ifdef SPLIT_REND_LCLD_5MS static int Quantize( float fVal, float fScale, int *iSign, int iMaxVal ) static int32_t Quantize( float fVal, float fScale, int32_t *iSign, int32_t iMaxVal ) { int iVal; int32_t iVal; if ( fVal > 0.0f ) { iVal = (int) ( fScale * fVal + 0.5f ); iVal = (int32_t) ( fScale * fVal + 0.5f ); *iSign = 0; } else { iVal = (int) ( -fScale * fVal + 0.5f ); iVal = (int32_t) ( -fScale * fVal + 0.5f ); *iSign = 1; } iVal = ( iVal < iMaxVal ) ? iVal : iMaxVal; return iVal; } static float UnQuantize( int iVal, float fScale, int iSign ) static float UnQuantize( int32_t iVal, float fScale, int32_t iSign ) { float fVal; if ( iSign == 0 ) Loading Loading @@ -694,7 +694,7 @@ int32_t EncodeLCLDFrame( fid = fopen( "pred_enc.txt", "wt" ); for ( n = 0; n < psLCLDEncoder->iChannels; n++ ) { int b; int16_t b; for ( b = 0; b < 60; b++ ) fprintf( fid, "%.5f ", (float) psLCLDEncoder->psPredictionEncoder->ppiPredBandEnable[n][b] * psLCLDEncoder->psPredictionEncoder->ppfA1Imag[n][b] ); } Loading lib_rend/ivas_prot_rend.h +5 −0 Original line number Diff line number Diff line Loading @@ -1973,6 +1973,11 @@ int32_t ivas_split_rend_bitstream_read_int32( const int32_t bits ); #ifdef SPLIT_REND_LCLD_5MS int32_t get_bit( const int32_t state, const int32_t bit_id ); #endif void ivas_rend_closeCldfbRend( CLDFB_REND_WRAPPER *pCldfbRend Loading Loading
lib_rend/ivas_PredDecoder.c +1 −14 Original line number Diff line number Diff line Loading @@ -40,19 +40,6 @@ #include "ivas_lcld_rom_tables.h" #include "wmc_auto.h" #ifdef SPLIT_REND_LCLD_5MS /*-------------------------------------------------------------------* * Function get_bit() * * *-------------------------------------------------------------------*/ static int get_bit( int state, int bit_id ) { return ( state & ( 1 << bit_id ) ); } #endif /*-------------------------------------------------------------------* * Function CreatePredictionDecoder() * Loading Loading @@ -436,7 +423,7 @@ int32_t ReadPredictors( /* disable any inactive prediction bands */ for ( c = 0; c < psPredictionDecoder->iChannels; c++ ) { int set; int32_t set; for ( set = 0; set < psPredictionDecoder->iNumSubSets; set++ ) { if ( !get_bit( psPredictionDecoder->piPredChanEnable[c], set ) ) Loading
lib_rend/ivas_PredEncoder.c +4 −15 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ * * *-------------------------------------------------------------------*/ static void activate_bit( int *state, int bit_id ) static void activate_bit( int32_t *state, int32_t bit_id ) { ( *state ) |= ( 1 << bit_id ); } Loading @@ -58,21 +58,10 @@ static void activate_bit( int *state, int bit_id ) * *-------------------------------------------------------------------*/ static void deactivate_bit( int *state, int bit_id ) static void deactivate_bit( int32_t *state, int32_t bit_id ) { ( *state ) &= ( ~( 1 << bit_id ) ); } /*-------------------------------------------------------------------* * Function get_bit() * * *-------------------------------------------------------------------*/ static int get_bit( int state, int bit_id ) { return ( state & ( 1 << bit_id ) ); } #endif /*-------------------------------------------------------------------* Loading Loading @@ -439,7 +428,7 @@ void ComputePredictors( pppfImagBuf = psPredictionEncoder->pppfInpBufImag; for ( c = 0; c < psPredictionEncoder->iChannels; c++ ) { int n; int32_t n; for ( n = 0; n < LCLD_PRED_WIN_LEN - iNumBlocks; n++ ) { mvr2r( pppfRealBuf[c][n + iNumBlocks], pppfRealBuf[c][n], LCLD_BANDS ); Loading Loading @@ -519,7 +508,7 @@ void ComputePredictors( float fA1Phase; float fGain2; float fBitGain2; int iNumBlocksPerPredCoef = min( iNumBlocks * psPredictionEncoder->iNumSubSets, LCLD_PRED_WIN_LEN ); int32_t iNumBlocksPerPredCoef = min( iNumBlocks * psPredictionEncoder->iNumSubSets, LCLD_PRED_WIN_LEN ); const float fMagScale = ( 2.0f * (float) ( 1 << ( PRED_QUNAT_FILTER_MAG_BITS ) ) + 1.0f ) / M_PI; const float fInvMagScale = M_PI / ( 2.0f * (float) ( 1 << ( PRED_QUNAT_FILTER_MAG_BITS ) ) + 1.0f ); Loading
lib_rend/ivas_lcld_decoder.c +1 −1 Original line number Diff line number Diff line Loading @@ -831,7 +831,7 @@ int32_t DecodeLCLDFrame( fid = fopen( "pred_dec.txt", "wt" ); for ( n = 0; n < psLCLDDecoder->iChannels; n++ ) { int b; int16_t b; for ( b = 0; b < 60; b++ ) fprintf( fid, "%.5f ", (float) psLCLDDecoder->psPredictionDecoder->ppiPredBandEnable[n][b] * psLCLDDecoder->psPredictionDecoder->ppfA1Imag[n][b] ); } Loading
lib_rend/ivas_lcld_encoder.c +6 −6 Original line number Diff line number Diff line Loading @@ -89,24 +89,24 @@ struct LCLD_ENCODER }; #ifdef SPLIT_REND_LCLD_5MS static int Quantize( float fVal, float fScale, int *iSign, int iMaxVal ) static int32_t Quantize( float fVal, float fScale, int32_t *iSign, int32_t iMaxVal ) { int iVal; int32_t iVal; if ( fVal > 0.0f ) { iVal = (int) ( fScale * fVal + 0.5f ); iVal = (int32_t) ( fScale * fVal + 0.5f ); *iSign = 0; } else { iVal = (int) ( -fScale * fVal + 0.5f ); iVal = (int32_t) ( -fScale * fVal + 0.5f ); *iSign = 1; } iVal = ( iVal < iMaxVal ) ? iVal : iMaxVal; return iVal; } static float UnQuantize( int iVal, float fScale, int iSign ) static float UnQuantize( int32_t iVal, float fScale, int32_t iSign ) { float fVal; if ( iSign == 0 ) Loading Loading @@ -694,7 +694,7 @@ int32_t EncodeLCLDFrame( fid = fopen( "pred_enc.txt", "wt" ); for ( n = 0; n < psLCLDEncoder->iChannels; n++ ) { int b; int16_t b; for ( b = 0; b < 60; b++ ) fprintf( fid, "%.5f ", (float) psLCLDEncoder->psPredictionEncoder->ppiPredBandEnable[n][b] * psLCLDEncoder->psPredictionEncoder->ppfA1Imag[n][b] ); } Loading
lib_rend/ivas_prot_rend.h +5 −0 Original line number Diff line number Diff line Loading @@ -1973,6 +1973,11 @@ int32_t ivas_split_rend_bitstream_read_int32( const int32_t bits ); #ifdef SPLIT_REND_LCLD_5MS int32_t get_bit( const int32_t state, const int32_t bit_id ); #endif void ivas_rend_closeCldfbRend( CLDFB_REND_WRAPPER *pCldfbRend Loading