diff options
author | Jean-Michel Trivi <jmtrivi@google.com> | 2013-08-28 17:54:51 -0700 |
---|---|---|
committer | Jean-Michel Trivi <jmtrivi@google.com> | 2013-08-28 18:06:47 -0700 |
commit | 7ad97579f8ccb843afdb5b184c4b209253839fe3 (patch) | |
tree | e5777dc9d28b9038052ea4035ae9a072e1b852e0 /libAACenc/src/qc_main.cpp | |
parent | 206a397c708738c08edc0229881018edcb8ea793 (diff) | |
download | fdk-aac-dabplus-7ad97579f8ccb843afdb5b184c4b209253839fe3.tar.gz fdk-aac-dabplus-7ad97579f8ccb843afdb5b184c4b209253839fe3.tar.bz2 fdk-aac-dabplus-7ad97579f8ccb843afdb5b184c4b209253839fe3.zip |
AAC Encoder low delay quality
* AAC-Encoder
- Revise bit distribution for lowdelay configuration to improve encoder
audio quality.
- Adjust lowdelay bitreservoir for low bitreservoir configuration.
Modified file(s):
libAACenc\src\aacEnc_ram.cpp
libAACenc\src\aacenc.cpp
libAACenc\src\aacenc_lib.cpp
libAACenc\src\aacenc_tns.cpp
libAACenc\src\adj_thr.cpp
libAACenc\src\adj_thr.h
libAACenc\src\block_switch.cpp
libAACenc\src\block_switch.h
libAACenc\src\interface.h
libAACenc\src\psy_main.cpp
libAACenc\src\qc_data.h
libAACenc\src\qc_main.cpp
* FDK-Library
- Increase the accuracy in CalcInvLdData() calculation which improves the
encoder audio quality.
Modified file(s):
libFDK\src\fixpoint_math.cpp
Bug 9428126
Change-Id: I302d7f4c3aeccf79e1b85f20e18a31e6e2b10544
Diffstat (limited to 'libAACenc/src/qc_main.cpp')
-rw-r--r-- | libAACenc/src/qc_main.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/libAACenc/src/qc_main.cpp b/libAACenc/src/qc_main.cpp index 0a4bcbc..15646e9 100644 --- a/libAACenc/src/qc_main.cpp +++ b/libAACenc/src/qc_main.cpp @@ -382,10 +382,10 @@ AAC_ENCODER_ERROR FDKaacEnc_QCInit(QC_STATE *hQC, if ( isConstantBitrateMode(hQC->bitrateMode) ) { INT bitresPerChannel = (hQC->bitResTotMax / init->channelMapping->nChannelsEff); /* 0: full bitreservoir, 1: reduced bitreservoir, 2: disabled bitreservoir */ - hQC->bitDistributenMode = (bitresPerChannel>50) ? 0 : (bitresPerChannel>0) ? 1 : 2; + hQC->bitDistributionMode = (bitresPerChannel>100) ? 0 : (bitresPerChannel>0) ? 1 : 2; } else { - hQC->bitDistributenMode = 0; /* full bitreservoir */ + hQC->bitDistributionMode = 0; /* full bitreservoir */ } @@ -420,11 +420,17 @@ AAC_ENCODER_ERROR FDKaacEnc_QCInit(QC_STATE *hQC, break; } - FDKaacEnc_AdjThrInit(hQC->hAdjThr, - init->meanPe, - hQC->elementBits, /* or channelBitrates, was: channelBitrate */ - init->channelMapping->nElements, - hQC->vbrQualFactor); + FDKaacEnc_AdjThrInit( + hQC->hAdjThr, + init->meanPe, + hQC->elementBits, /* or channelBitrates, was: channelBitrate */ + hQC->invQuant, + init->channelMapping->nElements, + init->channelMapping->nChannelsEff, + init->sampleRate, /* output sample rate */ + init->advancedBitsToPe, /* if set, calc bits2PE factor depending on samplerate */ + hQC->vbrQualFactor + ); return AAC_ENC_OK; } @@ -655,7 +661,7 @@ static AAC_ENCODER_ERROR FDKaacEnc_prepareBitDistribution(QC_STATE* h hQC->elementBits[i]->bitResLevelEl, hQC->elementBits[i]->maxBitResBitsEl, hQC->maxBitFac, - hQC->bitDistributenMode); + hQC->bitDistributionMode); *totalAvailableBits += hQC->elementBits[i]->bitResLevelEl; /* get total corrected granted PE */ |