FDK update for downsampled SBR
Add missing support for downsampled SBR in libFDK Bug 9428126 Change-Id: Idb732f8d31a115d36dd4b22916599db7fab98cae
This commit is contained in:
parent
16c472c201
commit
3a0a695565
@ -110,7 +110,7 @@ amm-info@iis.fraunhofer.de
|
|||||||
/* Decoder library info */
|
/* Decoder library info */
|
||||||
#define AACDECODER_LIB_VL0 2
|
#define AACDECODER_LIB_VL0 2
|
||||||
#define AACDECODER_LIB_VL1 5
|
#define AACDECODER_LIB_VL1 5
|
||||||
#define AACDECODER_LIB_VL2 0
|
#define AACDECODER_LIB_VL2 1
|
||||||
#define AACDECODER_LIB_TITLE "AAC Decoder Lib"
|
#define AACDECODER_LIB_TITLE "AAC Decoder Lib"
|
||||||
#define AACDECODER_LIB_BUILD_DATE __DATE__
|
#define AACDECODER_LIB_BUILD_DATE __DATE__
|
||||||
#define AACDECODER_LIB_BUILD_TIME __TIME__
|
#define AACDECODER_LIB_BUILD_TIME __TIME__
|
||||||
|
@ -171,6 +171,9 @@ extern const FIXP_WTP sin_twiddle_L64[];
|
|||||||
|
|
||||||
extern const FIXP_QTW qmf_phaseshift_cos32[32];
|
extern const FIXP_QTW qmf_phaseshift_cos32[32];
|
||||||
extern const FIXP_QTW qmf_phaseshift_sin32[32];
|
extern const FIXP_QTW qmf_phaseshift_sin32[32];
|
||||||
|
/* Adapted analysis post-twiddles for down-sampled HQ SBR */
|
||||||
|
extern const FIXP_QTW qmf_phaseshift_cos_downsamp32[32];
|
||||||
|
extern const FIXP_QTW qmf_phaseshift_sin_downsamp32[32];
|
||||||
extern const FIXP_QTW qmf_phaseshift_cos64[64];
|
extern const FIXP_QTW qmf_phaseshift_cos64[64];
|
||||||
extern const FIXP_QTW qmf_phaseshift_sin64[64];
|
extern const FIXP_QTW qmf_phaseshift_sin64[64];
|
||||||
|
|
||||||
|
@ -137,6 +137,8 @@ amm-info@iis.fraunhofer.de
|
|||||||
#define QMF_FLAG_MPSLDFB 16
|
#define QMF_FLAG_MPSLDFB 16
|
||||||
/* Complex Low Delay Filter Bank used in MPEG Surround Encoder allows a optimized calculation of the modulation in qmfForwardModulationHQ() */
|
/* Complex Low Delay Filter Bank used in MPEG Surround Encoder allows a optimized calculation of the modulation in qmfForwardModulationHQ() */
|
||||||
#define QMF_FLAG_MPSLDFB_OPTIMIZE_MODULATION 32
|
#define QMF_FLAG_MPSLDFB_OPTIMIZE_MODULATION 32
|
||||||
|
/* Flag to indicate HE-AAC down-sampled SBR mode (decoder) -> adapt analysis post twiddling */
|
||||||
|
#define QMF_FLAG_DOWNSAMPLED 64
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -93,7 +93,7 @@ amm-info@iis.fraunhofer.de
|
|||||||
/* FDK tools library info */
|
/* FDK tools library info */
|
||||||
#define FDK_TOOLS_LIB_VL0 2
|
#define FDK_TOOLS_LIB_VL0 2
|
||||||
#define FDK_TOOLS_LIB_VL1 3
|
#define FDK_TOOLS_LIB_VL1 3
|
||||||
#define FDK_TOOLS_LIB_VL2 0
|
#define FDK_TOOLS_LIB_VL2 1
|
||||||
#define FDK_TOOLS_LIB_TITLE "FDK Tools"
|
#define FDK_TOOLS_LIB_TITLE "FDK Tools"
|
||||||
#define FDK_TOOLS_LIB_BUILD_DATE __DATE__
|
#define FDK_TOOLS_LIB_BUILD_DATE __DATE__
|
||||||
#define FDK_TOOLS_LIB_BUILD_TIME __TIME__
|
#define FDK_TOOLS_LIB_BUILD_TIME __TIME__
|
||||||
|
@ -1462,6 +1462,26 @@ const FIXP_PFT qmf_64[QMF640_PFT_TABLE_SIZE+QMF_NO_POLY] =
|
|||||||
QFC(0xfe4d1be3), QFC(0xd1c58ace), QFC(0x2e3a7532), QFC(0x01b2e41d), QFC(0x00000000),
|
QFC(0xfe4d1be3), QFC(0xd1c58ace), QFC(0x2e3a7532), QFC(0x01b2e41d), QFC(0x00000000),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
RAM_ALIGN
|
||||||
|
LNK_SECTION_CONSTDATA
|
||||||
|
const FIXP_QTW qmf_phaseshift_cos_downsamp32[] =
|
||||||
|
{
|
||||||
|
QTC(0x7fd8878e), QTC(0x7e9d55fc), QTC(0x7c29fbee), QTC(0x78848414), QTC(0x73b5ebd1), QTC(0x6dca0d14), QTC(0x66cf8120), QTC(0x5ed77c8a),
|
||||||
|
QTC(0x55f5a4d2), QTC(0x4c3fdff4), QTC(0x41ce1e65), QTC(0x36ba2014), QTC(0x2b1f34eb), QTC(0x1f19f97b), QTC(0x12c8106f), QTC(0x0647d97c),
|
||||||
|
QTC(0xf9b82684), QTC(0xed37ef91), QTC(0xe0e60685), QTC(0xd4e0cb15), QTC(0xc945dfec), QTC(0xbe31e19b), QTC(0xb3c0200c), QTC(0xaa0a5b2e),
|
||||||
|
QTC(0xa1288376), QTC(0x99307ee0), QTC(0x9235f2ec), QTC(0x8c4a142f), QTC(0x877b7bec), QTC(0x83d60412), QTC(0x8162aa04), QTC(0x80277872),
|
||||||
|
};
|
||||||
|
|
||||||
|
RAM_ALIGN
|
||||||
|
LNK_SECTION_CONSTDATA
|
||||||
|
const FIXP_QTW qmf_phaseshift_sin_downsamp32[] =
|
||||||
|
{
|
||||||
|
QTC(0x0647d97c), QTC(0x12c8106f), QTC(0x1f19f97b), QTC(0x2b1f34eb), QTC(0x36ba2014), QTC(0x41ce1e65), QTC(0x4c3fdff4), QTC(0x55f5a4d2),
|
||||||
|
QTC(0x5ed77c8a), QTC(0x66cf8120), QTC(0x6dca0d14), QTC(0x73b5ebd1), QTC(0x78848414), QTC(0x7c29fbee), QTC(0x7e9d55fc), QTC(0x7fd8878e),
|
||||||
|
QTC(0x7fd8878e), QTC(0x7e9d55fc), QTC(0x7c29fbee), QTC(0x78848414), QTC(0x73b5ebd1), QTC(0x6dca0d14), QTC(0x66cf8120), QTC(0x5ed77c8a),
|
||||||
|
QTC(0x55f5a4d2), QTC(0x4c3fdff4), QTC(0x41ce1e65), QTC(0x36ba2014), QTC(0x2b1f34eb), QTC(0x1f19f97b), QTC(0x12c8106f), QTC(0x0647d97c),
|
||||||
|
};
|
||||||
|
|
||||||
#else /* QMF_NO_POLY == 5 */
|
#else /* QMF_NO_POLY == 5 */
|
||||||
#endif /* QMF_NO_POLY==5 */
|
#endif /* QMF_NO_POLY==5 */
|
||||||
|
|
||||||
|
@ -1017,8 +1017,14 @@ qmfInitFilterBank (HANDLE_QMF_FILTER_BANK h_Qmf, /*!< Handle to return */
|
|||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
h_Qmf->p_filter = qmf_64;
|
h_Qmf->p_filter = qmf_64;
|
||||||
|
if (flags & QMF_FLAG_DOWNSAMPLED) {
|
||||||
|
h_Qmf->t_cos = qmf_phaseshift_cos_downsamp32;
|
||||||
|
h_Qmf->t_sin = qmf_phaseshift_sin_downsamp32;
|
||||||
|
}
|
||||||
|
else {
|
||||||
h_Qmf->t_cos = qmf_phaseshift_cos32;
|
h_Qmf->t_cos = qmf_phaseshift_cos32;
|
||||||
h_Qmf->t_sin = qmf_phaseshift_sin32;
|
h_Qmf->t_sin = qmf_phaseshift_sin32;
|
||||||
|
}
|
||||||
h_Qmf->p_stride = 2;
|
h_Qmf->p_stride = 2;
|
||||||
h_Qmf->FilterSize = 640;
|
h_Qmf->FilterSize = 640;
|
||||||
h_Qmf->filterScale = 0;
|
h_Qmf->filterScale = 0;
|
||||||
|
@ -760,6 +760,8 @@ createSbrDec (SBR_CHANNEL * hSbrChannel,
|
|||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
int qmfErr;
|
int qmfErr;
|
||||||
|
/* Adapted QMF analysis post-twiddles for down-sampled HQ SBR */
|
||||||
|
const UINT downSampledFlag = (downsampleFac==2) ? QMF_FLAG_DOWNSAMPLED : 0;
|
||||||
|
|
||||||
qmfErr = qmfInitAnalysisFilterBank (
|
qmfErr = qmfInitAnalysisFilterBank (
|
||||||
&hs->AnalysiscQMF,
|
&hs->AnalysiscQMF,
|
||||||
@ -768,7 +770,7 @@ createSbrDec (SBR_CHANNEL * hSbrChannel,
|
|||||||
hHeaderData->freqBandData.lowSubband,
|
hHeaderData->freqBandData.lowSubband,
|
||||||
hHeaderData->freqBandData.highSubband,
|
hHeaderData->freqBandData.highSubband,
|
||||||
hHeaderData->numberOfAnalysisBands,
|
hHeaderData->numberOfAnalysisBands,
|
||||||
qmfFlags & (~QMF_FLAG_KEEP_STATES)
|
(qmfFlags & (~QMF_FLAG_KEEP_STATES)) | downSampledFlag
|
||||||
);
|
);
|
||||||
if (qmfErr != 0) {
|
if (qmfErr != 0) {
|
||||||
return SBRDEC_UNSUPPORTED_CONFIG;
|
return SBRDEC_UNSUPPORTED_CONFIG;
|
||||||
|
@ -137,7 +137,7 @@ amm-info@iis.fraunhofer.de
|
|||||||
/* Decoder library info */
|
/* Decoder library info */
|
||||||
#define SBRDECODER_LIB_VL0 2
|
#define SBRDECODER_LIB_VL0 2
|
||||||
#define SBRDECODER_LIB_VL1 2
|
#define SBRDECODER_LIB_VL1 2
|
||||||
#define SBRDECODER_LIB_VL2 0
|
#define SBRDECODER_LIB_VL2 1
|
||||||
#define SBRDECODER_LIB_TITLE "SBR Decoder"
|
#define SBRDECODER_LIB_TITLE "SBR Decoder"
|
||||||
#define SBRDECODER_LIB_BUILD_DATE __DATE__
|
#define SBRDECODER_LIB_BUILD_DATE __DATE__
|
||||||
#define SBRDECODER_LIB_BUILD_TIME __TIME__
|
#define SBRDECODER_LIB_BUILD_TIME __TIME__
|
||||||
|
Loading…
Reference in New Issue
Block a user