Commit b41a6f9e authored by Martin Storsjo's avatar Martin Storsjo

Revert "Avoid too big changes in isScale"

This reverts commit 226601a8.

This change doesn't seem to be necessary any longer, a proper
fix seems to be included upstream now in
60a27b7f.
parent 321233ee
...@@ -593,7 +593,6 @@ void FDKaacEnc_IntensityStereoProcessing( ...@@ -593,7 +593,6 @@ void FDKaacEnc_IntensityStereoProcessing(
FIXP_DBL realIsScale[MAX_GROUPED_SFB]; FIXP_DBL realIsScale[MAX_GROUPED_SFB];
INTENSITY_PARAMETERS isParams; INTENSITY_PARAMETERS isParams;
INT isMask[MAX_GROUPED_SFB]; INT isMask[MAX_GROUPED_SFB];
INT lastValIs = 0, delta;
FDKmemclear((void*)isBook,sfbCnt*sizeof(INT)); FDKmemclear((void*)isBook,sfbCnt*sizeof(INT));
FDKmemclear((void*)isMask,sfbCnt*sizeof(INT)); FDKmemclear((void*)isMask,sfbCnt*sizeof(INT));
...@@ -749,14 +748,6 @@ void FDKaacEnc_IntensityStereoProcessing( ...@@ -749,14 +748,6 @@ void FDKaacEnc_IntensityStereoProcessing(
isScale[sfb+sfboffs] = (INT)(((realIsScale[sfb+sfboffs]>>1)+FL2FXCONST_DBL(0.5f/(1<<(REAL_SCALE_SF+LD_DATA_SHIFT+1))))>>(DFRACT_BITS-1-REAL_SCALE_SF-LD_DATA_SHIFT-1)); isScale[sfb+sfboffs] = (INT)(((realIsScale[sfb+sfboffs]>>1)+FL2FXCONST_DBL(0.5f/(1<<(REAL_SCALE_SF+LD_DATA_SHIFT+1))))>>(DFRACT_BITS-1-REAL_SCALE_SF-LD_DATA_SHIFT-1));
} }
delta = isScale[sfb+sfboffs] - lastValIs;
if (delta < -CODE_BOOK_SCF_LAV) {
isScale[sfb+sfboffs] = lastValIs - CODE_BOOK_SCF_LAV;
} else if (delta + CODE_BOOK_SCF_LAV >= (INT)(sizeof(FDKaacEnc_huff_ltabscf)/sizeof(FDKaacEnc_huff_ltabscf[0]))) {
isScale[sfb+sfboffs] = lastValIs + sizeof(FDKaacEnc_huff_ltabscf)/sizeof(FDKaacEnc_huff_ltabscf[0]) - CODE_BOOK_SCF_LAV - 1;
}
lastValIs = isScale[sfb+sfboffs];
sfbEnergyRight[sfb+sfboffs] = FL2FXCONST_DBL(0.0f); sfbEnergyRight[sfb+sfboffs] = FL2FXCONST_DBL(0.0f);
sfbEnergyLdDataRight[sfb+sfboffs] = FL2FXCONST_DBL(-1.0f); sfbEnergyLdDataRight[sfb+sfboffs] = FL2FXCONST_DBL(-1.0f);
sfbThresholdRight[sfb+sfboffs] = FL2FXCONST_DBL(0.0f); sfbThresholdRight[sfb+sfboffs] = FL2FXCONST_DBL(0.0f);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment