Loading lib_enc/fd_cng_enc.c +0 −22 Original line number Original line Diff line number Diff line Loading @@ -1283,15 +1283,11 @@ void FdCngEncodeDiracMDCTStereoSID( for ( ch = 0; ch < CPE_CHANNELS; ch++ ) for ( ch = 0; ch < CPE_CHANNELS; ch++ ) { { E[ch] = 0.0f; E[ch] = 0.0f; <<<<<<< HEAD #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP for ( p = 0; p < N[ch]; p++ ) for ( p = 0; p < N[ch]; p++ ) #else #else for ( p = 0; p < NPART; p++ ) for ( p = 0; p < NPART; p++ ) #endif #endif ======= for ( p = 0; p < NPART; p++ ) /* TODO Note: NPART should likely be N[ch] if N[ch] may change */ >>>>>>> main { { ms_ptr[ch][p] = 10.f * log10f( lr_in_ptr[ch][p] + EPSILON ); ms_ptr[ch][p] = 10.f * log10f( lr_in_ptr[ch][p] + EPSILON ); E[ch] += ms_ptr[ch][p]; E[ch] += ms_ptr[ch][p]; Loading @@ -1299,18 +1295,12 @@ void FdCngEncodeDiracMDCTStereoSID( } } /* M/S transform on log envelopes */ /* M/S transform on log envelopes */ <<<<<<< HEAD #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP convertToMS( N[0], ms_ptr[0], ms_ptr[1], 0.5f ); convertToMS( N[0], ms_ptr[0], ms_ptr[1], 0.5f ); E[0] = sum_f( ms_ptr[0], N[0] ); E[0] = sum_f( ms_ptr[0], N[0] ); #else #else convertToMS( NPART, ms_ptr[0], ms_ptr[1], 0.5f ); convertToMS( NPART, ms_ptr[0], ms_ptr[1], 0.5f ); ======= convertToMS( NPART, ms_ptr[0], ms_ptr[1], 0.5f ); /* TODO Note: NPART should likely be N[0] if N[0] may change */ E[0] = sum_f( ms_ptr[0], NPART ); /* TODO Note: NPART should likely be N[0] if N[0] may change */ >>>>>>> main E[0] = sum_f( ms_ptr[0], NPART ); E[0] = sum_f( ms_ptr[0], NPART ); #endif #endif Loading Loading @@ -1348,15 +1338,11 @@ void FdCngEncodeDiracMDCTStereoSID( set_zero( ms_ptr[1], NPART ); set_zero( ms_ptr[1], NPART ); /* compute M gain */ /* compute M gain */ <<<<<<< HEAD #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP gain[0] = sum_f( ms_ptr[0], N[0] ); gain[0] = sum_f( ms_ptr[0], N[0] ); #else #else gain[0] = sum_f( ms_ptr[0], NPART ); gain[0] = sum_f( ms_ptr[0], NPART ); #endif #endif ======= gain[0] = sum_f( ms_ptr[0], NPART ); /* TODO Note: NPART should likely be N[0] if N[0] may change */ >>>>>>> main gain[0] = ( E[0] - gain[0] ) / (float) N[0]; gain[0] = ( E[0] - gain[0] ) / (float) N[0]; apply_scale( &gain[0], sts[0]->hFdCngEnc->hFdCngCom->CngBandwidth, sts[0]->hDtxEnc->last_active_brate, scaleTableStereo, SIZE_SCALE_TABLE_STEREO ); apply_scale( &gain[0], sts[0]->hFdCngEnc->hFdCngCom->CngBandwidth, sts[0]->hDtxEnc->last_active_brate, scaleTableStereo, SIZE_SCALE_TABLE_STEREO ); Loading @@ -1368,15 +1354,11 @@ void FdCngEncodeDiracMDCTStereoSID( gain[1] = gain[0]; gain[1] = gain[0]; /* undo M/S */ /* undo M/S */ <<<<<<< HEAD #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP convertToMS( NPART, ms_ptr[0], ms_ptr[1], 1.0f ); convertToMS( NPART, ms_ptr[0], ms_ptr[1], 1.0f ); #else #else convertToMS( N[0], ms_ptr[0], ms_ptr[1], 1.0f ); convertToMS( N[0], ms_ptr[0], ms_ptr[1], 1.0f ); #endif #endif ======= convertToMS( NPART, ms_ptr[0], ms_ptr[1], 1.0f ); /* TODO Note: NPART should likely be N[0] if N[0] may change */ >>>>>>> main /* restore channel noise envelopes */ /* restore channel noise envelopes */ for ( ch = 0; ch < CPE_CHANNELS; ch++ ) for ( ch = 0; ch < CPE_CHANNELS; ch++ ) Loading @@ -1384,15 +1366,11 @@ void FdCngEncodeDiracMDCTStereoSID( HANDLE_FD_CNG_ENC hFdCngEnc = sts[ch]->hFdCngEnc; HANDLE_FD_CNG_ENC hFdCngEnc = sts[ch]->hFdCngEnc; HANDLE_FD_CNG_COM hFdCngCom = hFdCngEnc->hFdCngCom; HANDLE_FD_CNG_COM hFdCngCom = hFdCngEnc->hFdCngCom; <<<<<<< HEAD #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP for ( p = 0; p < N[0]; p++ ) for ( p = 0; p < N[0]; p++ ) #else #else for ( p = 0; p < NPART; p++ ) for ( p = 0; p < NPART; p++ ) #endif #endif ======= for ( p = 0; p < NPART; p++ ) /* TODO Note: NPART should likely be N[0] if N[0] may change */ >>>>>>> main { { lr_out_ptr[ch][p] = powf( 10.f, ( ms_ptr[ch][p] + gain[ch] ) / 10.f ); lr_out_ptr[ch][p] = powf( 10.f, ( ms_ptr[ch][p] + gain[ch] ) / 10.f ); } } Loading Loading
lib_enc/fd_cng_enc.c +0 −22 Original line number Original line Diff line number Diff line Loading @@ -1283,15 +1283,11 @@ void FdCngEncodeDiracMDCTStereoSID( for ( ch = 0; ch < CPE_CHANNELS; ch++ ) for ( ch = 0; ch < CPE_CHANNELS; ch++ ) { { E[ch] = 0.0f; E[ch] = 0.0f; <<<<<<< HEAD #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP for ( p = 0; p < N[ch]; p++ ) for ( p = 0; p < N[ch]; p++ ) #else #else for ( p = 0; p < NPART; p++ ) for ( p = 0; p < NPART; p++ ) #endif #endif ======= for ( p = 0; p < NPART; p++ ) /* TODO Note: NPART should likely be N[ch] if N[ch] may change */ >>>>>>> main { { ms_ptr[ch][p] = 10.f * log10f( lr_in_ptr[ch][p] + EPSILON ); ms_ptr[ch][p] = 10.f * log10f( lr_in_ptr[ch][p] + EPSILON ); E[ch] += ms_ptr[ch][p]; E[ch] += ms_ptr[ch][p]; Loading @@ -1299,18 +1295,12 @@ void FdCngEncodeDiracMDCTStereoSID( } } /* M/S transform on log envelopes */ /* M/S transform on log envelopes */ <<<<<<< HEAD #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP convertToMS( N[0], ms_ptr[0], ms_ptr[1], 0.5f ); convertToMS( N[0], ms_ptr[0], ms_ptr[1], 0.5f ); E[0] = sum_f( ms_ptr[0], N[0] ); E[0] = sum_f( ms_ptr[0], N[0] ); #else #else convertToMS( NPART, ms_ptr[0], ms_ptr[1], 0.5f ); convertToMS( NPART, ms_ptr[0], ms_ptr[1], 0.5f ); ======= convertToMS( NPART, ms_ptr[0], ms_ptr[1], 0.5f ); /* TODO Note: NPART should likely be N[0] if N[0] may change */ E[0] = sum_f( ms_ptr[0], NPART ); /* TODO Note: NPART should likely be N[0] if N[0] may change */ >>>>>>> main E[0] = sum_f( ms_ptr[0], NPART ); E[0] = sum_f( ms_ptr[0], NPART ); #endif #endif Loading Loading @@ -1348,15 +1338,11 @@ void FdCngEncodeDiracMDCTStereoSID( set_zero( ms_ptr[1], NPART ); set_zero( ms_ptr[1], NPART ); /* compute M gain */ /* compute M gain */ <<<<<<< HEAD #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP gain[0] = sum_f( ms_ptr[0], N[0] ); gain[0] = sum_f( ms_ptr[0], N[0] ); #else #else gain[0] = sum_f( ms_ptr[0], NPART ); gain[0] = sum_f( ms_ptr[0], NPART ); #endif #endif ======= gain[0] = sum_f( ms_ptr[0], NPART ); /* TODO Note: NPART should likely be N[0] if N[0] may change */ >>>>>>> main gain[0] = ( E[0] - gain[0] ) / (float) N[0]; gain[0] = ( E[0] - gain[0] ) / (float) N[0]; apply_scale( &gain[0], sts[0]->hFdCngEnc->hFdCngCom->CngBandwidth, sts[0]->hDtxEnc->last_active_brate, scaleTableStereo, SIZE_SCALE_TABLE_STEREO ); apply_scale( &gain[0], sts[0]->hFdCngEnc->hFdCngCom->CngBandwidth, sts[0]->hDtxEnc->last_active_brate, scaleTableStereo, SIZE_SCALE_TABLE_STEREO ); Loading @@ -1368,15 +1354,11 @@ void FdCngEncodeDiracMDCTStereoSID( gain[1] = gain[0]; gain[1] = gain[0]; /* undo M/S */ /* undo M/S */ <<<<<<< HEAD #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP convertToMS( NPART, ms_ptr[0], ms_ptr[1], 1.0f ); convertToMS( NPART, ms_ptr[0], ms_ptr[1], 1.0f ); #else #else convertToMS( N[0], ms_ptr[0], ms_ptr[1], 1.0f ); convertToMS( N[0], ms_ptr[0], ms_ptr[1], 1.0f ); #endif #endif ======= convertToMS( NPART, ms_ptr[0], ms_ptr[1], 1.0f ); /* TODO Note: NPART should likely be N[0] if N[0] may change */ >>>>>>> main /* restore channel noise envelopes */ /* restore channel noise envelopes */ for ( ch = 0; ch < CPE_CHANNELS; ch++ ) for ( ch = 0; ch < CPE_CHANNELS; ch++ ) Loading @@ -1384,15 +1366,11 @@ void FdCngEncodeDiracMDCTStereoSID( HANDLE_FD_CNG_ENC hFdCngEnc = sts[ch]->hFdCngEnc; HANDLE_FD_CNG_ENC hFdCngEnc = sts[ch]->hFdCngEnc; HANDLE_FD_CNG_COM hFdCngCom = hFdCngEnc->hFdCngCom; HANDLE_FD_CNG_COM hFdCngCom = hFdCngEnc->hFdCngCom; <<<<<<< HEAD #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP #ifdef FIX_TODO_FD_CNG_SBA_CLEANUP for ( p = 0; p < N[0]; p++ ) for ( p = 0; p < N[0]; p++ ) #else #else for ( p = 0; p < NPART; p++ ) for ( p = 0; p < NPART; p++ ) #endif #endif ======= for ( p = 0; p < NPART; p++ ) /* TODO Note: NPART should likely be N[0] if N[0] may change */ >>>>>>> main { { lr_out_ptr[ch][p] = powf( 10.f, ( ms_ptr[ch][p] + gain[ch] ) / 10.f ); lr_out_ptr[ch][p] = powf( 10.f, ( ms_ptr[ch][p] + gain[ch] ) / 10.f ); } } Loading