diff options
author | Dave Burke <daveburke@google.com> | 2012-05-12 13:17:25 -0700 |
---|---|---|
committer | Dave Burke <daveburke@google.com> | 2012-05-12 13:47:46 -0700 |
commit | 698b536f3b34a7cfc41a80e1034cc359456bdd66 (patch) | |
tree | fa3dfa75d535b188725f1b84316cb4b06db79771 /libSBRenc/src/env_est.cpp | |
parent | 9bf37cc9712506b2483650c82d3c41152337ef7e (diff) | |
download | fdk-aac-dabplus-698b536f3b34a7cfc41a80e1034cc359456bdd66.tar.gz fdk-aac-dabplus-698b536f3b34a7cfc41a80e1034cc359456bdd66.tar.bz2 fdk-aac-dabplus-698b536f3b34a7cfc41a80e1034cc359456bdd66.zip |
Update to 2012_05_11 version.
Fixes:
- Don't throw error for invalid bitrate but limit to functional value
- More robust ASC parsing
- More robust handling of corrupt bitstreams
- Handle multiple raw access units
Change-Id: Ib49fe2545ff4185fe924126da702fe84ac5c2d87
Diffstat (limited to 'libSBRenc/src/env_est.cpp')
-rw-r--r-- | libSBRenc/src/env_est.cpp | 34 |
1 files changed, 5 insertions, 29 deletions
diff --git a/libSBRenc/src/env_est.cpp b/libSBRenc/src/env_est.cpp index 0b7f7b0..8e8e190 100644 --- a/libSBRenc/src/env_est.cpp +++ b/libSBRenc/src/env_est.cpp @@ -799,27 +799,6 @@ calculateSbrEnvelope (FIXP_DBL **RESTRICT YBufferLeft, /*! energy buffer left * } /* i*/ } -/* - * Update QMF buffers - */ -static void FDKsbrEnc_updateRIBuffers(HANDLE_ENV_CHANNEL h_envChan) -{ - int i; - - /* rBufferWriteOffset ist always 0, do we need this ? */ - for (i = 0; i < h_envChan->sbrExtractEnvelope.rBufferWriteOffset; i++) { - FIXP_DBL *temp; - - temp = h_envChan->sbrExtractEnvelope.rBuffer[i]; - h_envChan->sbrExtractEnvelope.rBuffer[i] = h_envChan->sbrExtractEnvelope.rBuffer[i + h_envChan->sbrExtractEnvelope.no_cols]; - h_envChan->sbrExtractEnvelope.rBuffer[i + h_envChan->sbrExtractEnvelope.no_cols] = temp; - - temp = h_envChan->sbrExtractEnvelope.iBuffer[i]; - h_envChan->sbrExtractEnvelope.iBuffer[i] = h_envChan->sbrExtractEnvelope.iBuffer[i + h_envChan->sbrExtractEnvelope.no_cols]; - h_envChan->sbrExtractEnvelope.iBuffer[i + h_envChan->sbrExtractEnvelope.no_cols] = temp; - } -} - /***************************************************************************/ /*! @@ -873,8 +852,8 @@ FDKsbrEnc_extractSbrEnvelope1 ( Precalculation of Tonality Quotas COEFF Transform OK */ FDKsbrEnc_CalculateTonalityQuotas(&hEnvChan->TonCorr, - sbrExtrEnv->rBuffer+ sbrExtrEnv->rBufferWriteOffset, - sbrExtrEnv->iBuffer+ sbrExtrEnv->rBufferWriteOffset, + sbrExtrEnv->rBuffer, + sbrExtrEnv->iBuffer, h_con->freqBandTable[HI][h_con->nSfb[HI]], hEnvChan->qmfScale); @@ -914,8 +893,6 @@ FDKsbrEnc_extractSbrEnvelope1 ( sbrExtrEnv->no_cols); - - FDKsbrEnc_updateRIBuffers(hEnvChan); } /***************************************************************************/ @@ -1741,12 +1718,11 @@ FDKsbrEnc_InitExtractSbrEnvelope (HANDLE_SBR_EXTRACT_ENVELOPE hSbrCut, { hSbrCut->YBufferWriteOffset = tran_off*time_step; } - hSbrCut->rBufferWriteOffset = 0; hSbrCut->rBufferReadOffset = 0; YBufferLength = hSbrCut->YBufferWriteOffset + no_cols; - rBufferLength = hSbrCut->rBufferWriteOffset + no_cols; + rBufferLength = no_cols; hSbrCut->pre_transient_info[0] = 0; hSbrCut->pre_transient_info[1] = 0; @@ -1824,8 +1800,8 @@ FDKsbrEnc_deleteExtractSbrEnvelope (HANDLE_SBR_EXTRACT_ENVELOPE hSbrCut) INT FDKsbrEnc_GetEnvEstDelay(HANDLE_SBR_EXTRACT_ENVELOPE hSbr) { - return hSbr->no_rows*((hSbr->YBufferWriteOffset)*2 + /* mult 2 because nrg's are grouped half */ - hSbr->rBufferWriteOffset - hSbr->rBufferReadOffset ); /* in reference hold half spec and calc nrg's on overlapped spec */ + return hSbr->no_rows*((hSbr->YBufferWriteOffset)*2 /* mult 2 because nrg's are grouped half */ + - hSbr->rBufferReadOffset ); /* in reference hold half spec and calc nrg's on overlapped spec */ } |