Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ #define FIX_FLOAT_1522_LTV_MSAN_QMETADATA_ENC_EC3 /* Nokia: float issue 1522: fix uninit MSAN in EC3 of qmetadata encoding */ #define OPT_2416_ACELP_FAST /* VA: basop issue 2426, optimisation of acelp_fast_fx ( reduc. compl. by 0.35 wmops ) */ #define FIX_2410_HARM_MODIF_FS /* VA: basop issue 2410: Remove duplicated modif_Fs */ #define FIX_2425_REMOVE_RC_DUPLICATES /* VA: basop issue 2425: Remove duplicated RC encoder functions */ #define HARM_LEV_DURBIN /* VA: basop issue 2423: harmonize levinson-Durbin algorithm */ #define HARMONIZE_TBE2 /* VA: basop issue 2399: Remove duplicated code: TBE, step 2 */ #define HARM_FD_BWE /* VA: harmonize core-coder FD BWE function duplications */ Loading lib_enc/prot_fx_enc.h +6 −3 Original line number Diff line number Diff line Loading @@ -4217,12 +4217,13 @@ void rc_enc_finish_fx( PVQ_ENC_HANDLE hPVQ /* i/o: PVQ encoder handle */ ); #ifndef FIX_2425_REMOVE_RC_DUPLICATES void rc_enc_finish_ivas_fx( BSTR_ENC_HANDLE hBstr, PVQ_ENC_HANDLE hPVQ /* i/o: PVQ encoder handle */ ); #endif void rc_encode_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading @@ -4231,6 +4232,7 @@ void rc_encode_fx( UWord32 tot /* i : Total cumulative frequency Q0*/ ); #ifndef FIX_2425_REMOVE_RC_DUPLICATES void rc_encode_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading @@ -4245,7 +4247,7 @@ void rc_enc_uniform_ivas_fx( UWord32 value, /* i : Value to encode Q0*/ UWord32 tot /* i : Maximum value Q0*/ ); #endif void rc_enc_uniform_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading @@ -4260,13 +4262,14 @@ void rc_enc_bits_fx( Word16 bits /* i : Number of bits used Q0*/ ); #ifndef FIX_2425_REMOVE_RC_DUPLICATES void rc_enc_bits_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ UWord32 value, /* i : Value to encode Q0*/ Word16 bits /* i : Number of bits used Q0*/ ); #endif void re8_compute_base_index_fx( const Word16 *x, /* i : Elemen of Q2, Q3 or Q4 */ const Word16 ka, /* i : Identifier of the absolute leader related to x */ Loading lib_enc/pvq_core_enc_fx.c +12 −0 Original line number Diff line number Diff line Loading @@ -351,7 +351,11 @@ void pvq_encode_frame_ivas_fx( } } #ifdef FIX_2425_REMOVE_RC_DUPLICATES rc_enc_finish_fx( hBstr, hPVQ ); #else rc_enc_finish_ivas_fx( hBstr, hPVQ ); #endif return; } Loading Loading @@ -977,7 +981,11 @@ static void densityIndexSymbolEncode_ivas_fx( } } #ifdef FIX_2425_REMOVE_RC_DUPLICATES rc_encode_fx( hBstr, hPVQ, cum_freq, sym_freq, tot ); #else rc_encode_ivas_fx( hBstr, hPVQ, cum_freq, sym_freq, tot ); #endif } return; Loading Loading @@ -1146,7 +1154,11 @@ static Word16 calc_pvq_splits_ivas_fx( /* o : Number of tmp = 1; move16(); } #ifdef FIX_2425_REMOVE_RC_DUPLICATES rc_enc_bits_fx( hBstr, hPVQ, tmp, 1 ); #else rc_enc_bits_ivas_fx( hBstr, hPVQ, tmp, 1 ); #endif Np = add( Np, tmp ); } } Loading lib_enc/pvq_encode_fx.c +9 −0 Original line number Diff line number Diff line Loading @@ -365,10 +365,19 @@ void pvq_encode_ivas_fx( entry = mpvq_encode_vec_fx( y, dim, pulses ); /* send the short codeword(s) to the range encoder */ #ifdef FIX_2425_REMOVE_RC_DUPLICATES rc_enc_bits_fx( hBstr, hPVQ, UL_deposit_l( entry.lead_sign_ind ), 1 ); /* 0 or 1 */ #else rc_enc_bits_ivas_fx( hBstr, hPVQ, UL_deposit_l( entry.lead_sign_ind ), 1 ); /* 0 or 1 */ #endif IF( NE_16( dim, 1 ) ) { #ifdef FIX_2425_REMOVE_RC_DUPLICATES rc_enc_uniform_fx( hBstr, hPVQ, entry.index, entry.size ); #else rc_enc_uniform_ivas_fx( hBstr, hPVQ, entry.index, entry.size ); #endif } return; Loading lib_enc/range_enc_fx.c +27 −3 Original line number Diff line number Diff line Loading @@ -11,10 +11,16 @@ #include "prot_fx_enc.h" /* Function prototypes */ /*-------------------------------------------------------------------* * Local funtions declarations *-------------------------------------------------------------------*/ static void rc_enc_shift_fx( BSTR_ENC_HANDLE hBstr, PVQ_ENC_HANDLE hPVQ ); static void rc_enc_write_fx( BSTR_ENC_HANDLE hBstr, Word16 byte, Word16 bits ); #ifndef FIX_2425_REMOVE_RC_DUPLICATES static void rc_enc_shift_ivas_fx( BSTR_ENC_HANDLE hBstr, PVQ_ENC_HANDLE hPVQ ); static void rc_enc_write_ivas_fx( BSTR_ENC_HANDLE hBstr, Word16 byte, Word16 bits ); #endif /*-------------------------------------------------------------------* * rc_enc_init() Loading Loading @@ -51,6 +57,7 @@ void rc_enc_init_fx( * * Encode symbol with range coder *-------------------------------------------------------------------*/ #ifndef FIX_2425_REMOVE_RC_DUPLICATES void rc_encode_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading Loading @@ -89,6 +96,8 @@ void rc_encode_ivas_fx( return; } #endif void rc_encode_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading Loading @@ -131,10 +140,11 @@ void rc_encode_fx( * * Finalize range coder *-------------------------------------------------------------------*/ #ifndef FIX_2425_REMOVE_RC_DUPLICATES void rc_enc_finish_ivas_fx( BSTR_ENC_HANDLE hBstr, PVQ_ENC_HANDLE hPVQ /* i/o: PVQ encoder handle */ ) { UWord32 val, mask, high; Loading Loading @@ -215,6 +225,8 @@ void rc_enc_finish_ivas_fx( return; } #endif void rc_enc_finish_fx( BSTR_ENC_HANDLE hBstr, PVQ_ENC_HANDLE hPVQ /* i/o: PVQ encoder handle */ Loading Loading @@ -304,6 +316,7 @@ void rc_enc_finish_fx( * * Shift a byte out to bitstream *-------------------------------------------------------------------*/ #ifndef FIX_2425_REMOVE_RC_DUPLICATES static void rc_enc_shift_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ /* i/o: PVQ encoder handle */ Loading Loading @@ -338,6 +351,8 @@ static void rc_enc_shift_ivas_fx( move32(); return; } #endif static void rc_enc_shift_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ /* i/o: PVQ encoder handle */ Loading Loading @@ -376,6 +391,7 @@ static void rc_enc_shift_fx( * * *-------------------------------------------------------------------*/ #ifndef FIX_2425_REMOVE_RC_DUPLICATES void rc_enc_bits_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading Loading @@ -409,6 +425,8 @@ void rc_enc_bits_ivas_fx( return; } #endif void rc_enc_bits_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading Loading @@ -445,6 +463,7 @@ void rc_enc_bits_fx( * * Encode with uniform distribution *-------------------------------------------------------------------*/ #ifndef FIX_2425_REMOVE_RC_DUPLICATES void rc_enc_uniform_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading @@ -469,6 +488,8 @@ void rc_enc_uniform_ivas_fx( return; } #endif void rc_enc_uniform_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading Loading @@ -499,6 +520,7 @@ void rc_enc_uniform_fx( * * Write a byte to bitstream *-------------------------------------------------------------------*/ #ifndef FIX_2425_REMOVE_RC_DUPLICATES static void rc_enc_write_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ Word16 byte, /* i : Byte to write Q0*/ Loading @@ -509,6 +531,8 @@ static void rc_enc_write_ivas_fx( return; } #endif static void rc_enc_write_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ Word16 byte, /* i : Byte to write Q0*/ Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ #define FIX_FLOAT_1522_LTV_MSAN_QMETADATA_ENC_EC3 /* Nokia: float issue 1522: fix uninit MSAN in EC3 of qmetadata encoding */ #define OPT_2416_ACELP_FAST /* VA: basop issue 2426, optimisation of acelp_fast_fx ( reduc. compl. by 0.35 wmops ) */ #define FIX_2410_HARM_MODIF_FS /* VA: basop issue 2410: Remove duplicated modif_Fs */ #define FIX_2425_REMOVE_RC_DUPLICATES /* VA: basop issue 2425: Remove duplicated RC encoder functions */ #define HARM_LEV_DURBIN /* VA: basop issue 2423: harmonize levinson-Durbin algorithm */ #define HARMONIZE_TBE2 /* VA: basop issue 2399: Remove duplicated code: TBE, step 2 */ #define HARM_FD_BWE /* VA: harmonize core-coder FD BWE function duplications */ Loading
lib_enc/prot_fx_enc.h +6 −3 Original line number Diff line number Diff line Loading @@ -4217,12 +4217,13 @@ void rc_enc_finish_fx( PVQ_ENC_HANDLE hPVQ /* i/o: PVQ encoder handle */ ); #ifndef FIX_2425_REMOVE_RC_DUPLICATES void rc_enc_finish_ivas_fx( BSTR_ENC_HANDLE hBstr, PVQ_ENC_HANDLE hPVQ /* i/o: PVQ encoder handle */ ); #endif void rc_encode_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading @@ -4231,6 +4232,7 @@ void rc_encode_fx( UWord32 tot /* i : Total cumulative frequency Q0*/ ); #ifndef FIX_2425_REMOVE_RC_DUPLICATES void rc_encode_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading @@ -4245,7 +4247,7 @@ void rc_enc_uniform_ivas_fx( UWord32 value, /* i : Value to encode Q0*/ UWord32 tot /* i : Maximum value Q0*/ ); #endif void rc_enc_uniform_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading @@ -4260,13 +4262,14 @@ void rc_enc_bits_fx( Word16 bits /* i : Number of bits used Q0*/ ); #ifndef FIX_2425_REMOVE_RC_DUPLICATES void rc_enc_bits_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ UWord32 value, /* i : Value to encode Q0*/ Word16 bits /* i : Number of bits used Q0*/ ); #endif void re8_compute_base_index_fx( const Word16 *x, /* i : Elemen of Q2, Q3 or Q4 */ const Word16 ka, /* i : Identifier of the absolute leader related to x */ Loading
lib_enc/pvq_core_enc_fx.c +12 −0 Original line number Diff line number Diff line Loading @@ -351,7 +351,11 @@ void pvq_encode_frame_ivas_fx( } } #ifdef FIX_2425_REMOVE_RC_DUPLICATES rc_enc_finish_fx( hBstr, hPVQ ); #else rc_enc_finish_ivas_fx( hBstr, hPVQ ); #endif return; } Loading Loading @@ -977,7 +981,11 @@ static void densityIndexSymbolEncode_ivas_fx( } } #ifdef FIX_2425_REMOVE_RC_DUPLICATES rc_encode_fx( hBstr, hPVQ, cum_freq, sym_freq, tot ); #else rc_encode_ivas_fx( hBstr, hPVQ, cum_freq, sym_freq, tot ); #endif } return; Loading Loading @@ -1146,7 +1154,11 @@ static Word16 calc_pvq_splits_ivas_fx( /* o : Number of tmp = 1; move16(); } #ifdef FIX_2425_REMOVE_RC_DUPLICATES rc_enc_bits_fx( hBstr, hPVQ, tmp, 1 ); #else rc_enc_bits_ivas_fx( hBstr, hPVQ, tmp, 1 ); #endif Np = add( Np, tmp ); } } Loading
lib_enc/pvq_encode_fx.c +9 −0 Original line number Diff line number Diff line Loading @@ -365,10 +365,19 @@ void pvq_encode_ivas_fx( entry = mpvq_encode_vec_fx( y, dim, pulses ); /* send the short codeword(s) to the range encoder */ #ifdef FIX_2425_REMOVE_RC_DUPLICATES rc_enc_bits_fx( hBstr, hPVQ, UL_deposit_l( entry.lead_sign_ind ), 1 ); /* 0 or 1 */ #else rc_enc_bits_ivas_fx( hBstr, hPVQ, UL_deposit_l( entry.lead_sign_ind ), 1 ); /* 0 or 1 */ #endif IF( NE_16( dim, 1 ) ) { #ifdef FIX_2425_REMOVE_RC_DUPLICATES rc_enc_uniform_fx( hBstr, hPVQ, entry.index, entry.size ); #else rc_enc_uniform_ivas_fx( hBstr, hPVQ, entry.index, entry.size ); #endif } return; Loading
lib_enc/range_enc_fx.c +27 −3 Original line number Diff line number Diff line Loading @@ -11,10 +11,16 @@ #include "prot_fx_enc.h" /* Function prototypes */ /*-------------------------------------------------------------------* * Local funtions declarations *-------------------------------------------------------------------*/ static void rc_enc_shift_fx( BSTR_ENC_HANDLE hBstr, PVQ_ENC_HANDLE hPVQ ); static void rc_enc_write_fx( BSTR_ENC_HANDLE hBstr, Word16 byte, Word16 bits ); #ifndef FIX_2425_REMOVE_RC_DUPLICATES static void rc_enc_shift_ivas_fx( BSTR_ENC_HANDLE hBstr, PVQ_ENC_HANDLE hPVQ ); static void rc_enc_write_ivas_fx( BSTR_ENC_HANDLE hBstr, Word16 byte, Word16 bits ); #endif /*-------------------------------------------------------------------* * rc_enc_init() Loading Loading @@ -51,6 +57,7 @@ void rc_enc_init_fx( * * Encode symbol with range coder *-------------------------------------------------------------------*/ #ifndef FIX_2425_REMOVE_RC_DUPLICATES void rc_encode_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading Loading @@ -89,6 +96,8 @@ void rc_encode_ivas_fx( return; } #endif void rc_encode_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading Loading @@ -131,10 +140,11 @@ void rc_encode_fx( * * Finalize range coder *-------------------------------------------------------------------*/ #ifndef FIX_2425_REMOVE_RC_DUPLICATES void rc_enc_finish_ivas_fx( BSTR_ENC_HANDLE hBstr, PVQ_ENC_HANDLE hPVQ /* i/o: PVQ encoder handle */ ) { UWord32 val, mask, high; Loading Loading @@ -215,6 +225,8 @@ void rc_enc_finish_ivas_fx( return; } #endif void rc_enc_finish_fx( BSTR_ENC_HANDLE hBstr, PVQ_ENC_HANDLE hPVQ /* i/o: PVQ encoder handle */ Loading Loading @@ -304,6 +316,7 @@ void rc_enc_finish_fx( * * Shift a byte out to bitstream *-------------------------------------------------------------------*/ #ifndef FIX_2425_REMOVE_RC_DUPLICATES static void rc_enc_shift_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ /* i/o: PVQ encoder handle */ Loading Loading @@ -338,6 +351,8 @@ static void rc_enc_shift_ivas_fx( move32(); return; } #endif static void rc_enc_shift_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ /* i/o: PVQ encoder handle */ Loading Loading @@ -376,6 +391,7 @@ static void rc_enc_shift_fx( * * *-------------------------------------------------------------------*/ #ifndef FIX_2425_REMOVE_RC_DUPLICATES void rc_enc_bits_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading Loading @@ -409,6 +425,8 @@ void rc_enc_bits_ivas_fx( return; } #endif void rc_enc_bits_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading Loading @@ -445,6 +463,7 @@ void rc_enc_bits_fx( * * Encode with uniform distribution *-------------------------------------------------------------------*/ #ifndef FIX_2425_REMOVE_RC_DUPLICATES void rc_enc_uniform_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading @@ -469,6 +488,8 @@ void rc_enc_uniform_ivas_fx( return; } #endif void rc_enc_uniform_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ PVQ_ENC_HANDLE hPVQ, /* i/o: PVQ encoder handle */ Loading Loading @@ -499,6 +520,7 @@ void rc_enc_uniform_fx( * * Write a byte to bitstream *-------------------------------------------------------------------*/ #ifndef FIX_2425_REMOVE_RC_DUPLICATES static void rc_enc_write_ivas_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ Word16 byte, /* i : Byte to write Q0*/ Loading @@ -509,6 +531,8 @@ static void rc_enc_write_ivas_fx( return; } #endif static void rc_enc_write_fx( BSTR_ENC_HANDLE hBstr, /* i/o: encoder bitstream handle */ Word16 byte, /* i : Byte to write Q0*/ Loading