- fixes for Android build
This commit is contained in:
parent
2f3fa06654
commit
7c753dca40
|
|
@ -21,6 +21,7 @@ CodecList::CodecList(const Settings& settings)
|
||||||
:mSettings(settings)
|
:mSettings(settings)
|
||||||
{
|
{
|
||||||
//mFactoryList.push_back(new OpusCodec::OpusFactory(16000, 1));
|
//mFactoryList.push_back(new OpusCodec::OpusFactory(16000, 1));
|
||||||
|
#if !defined(TARGET_ANDROID)
|
||||||
if (settings.mOpusSpec.empty())
|
if (settings.mOpusSpec.empty())
|
||||||
{
|
{
|
||||||
mFactoryList.push_back(new OpusCodec::OpusFactory(48000, 2, MT_OPUS_CODEC_PT));
|
mFactoryList.push_back(new OpusCodec::OpusFactory(48000, 2, MT_OPUS_CODEC_PT));
|
||||||
|
|
@ -32,6 +33,7 @@ CodecList::CodecList(const Settings& settings)
|
||||||
mFactoryList.push_back(new OpusCodec::OpusFactory(spec.mRate, spec.mChannels, spec.mPayloadType));
|
mFactoryList.push_back(new OpusCodec::OpusFactory(spec.mRate, spec.mChannels, spec.mPayloadType));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(TARGET_ANDROID) && !defined(TARGET_OPENWRT) && !defined(TARGET_WIN)
|
#if !defined(TARGET_ANDROID) && !defined(TARGET_OPENWRT) && !defined(TARGET_WIN)
|
||||||
for (int pt: mSettings.mAmrWbPayloadType)
|
for (int pt: mSettings.mAmrWbPayloadType)
|
||||||
|
|
@ -47,8 +49,8 @@ CodecList::CodecList(const Settings& settings)
|
||||||
mFactoryList.push_back(new GsmEfrCodec::GsmEfrFactory(mSettings.mWrapIuUP, mSettings.mGsmEfrPayloadType));
|
mFactoryList.push_back(new GsmEfrCodec::GsmEfrFactory(mSettings.mWrapIuUP, mSettings.mGsmEfrPayloadType));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mFactoryList.push_back(new IsacCodec::IsacFactory16K(mSettings.mIsac16KPayloadType));
|
//mFactoryList.push_back(new IsacCodec::IsacFactory16K(mSettings.mIsac16KPayloadType));
|
||||||
mFactoryList.push_back(new IlbcCodec::IlbcFactory(mSettings.mIlbc20PayloadType, mSettings.mIlbc30PayloadType));
|
//mFactoryList.push_back(new IlbcCodec::IlbcFactory(mSettings.mIlbc20PayloadType, mSettings.mIlbc30PayloadType));
|
||||||
mFactoryList.push_back(new G711Codec::AlawFactory());
|
mFactoryList.push_back(new G711Codec::AlawFactory());
|
||||||
mFactoryList.push_back(new G711Codec::UlawFactory());
|
mFactoryList.push_back(new G711Codec::UlawFactory());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -128,8 +128,8 @@ Lsf_lsp (Word16 lsf[], /* (i) Q15 : lsf[m] normalized (range: 0.0<=val<=0.5) */
|
||||||
|
|
||||||
/* lsp[i] = table[ind]+ ((table[ind+1]-table[ind])*offset) / 256 */
|
/* lsp[i] = table[ind]+ ((table[ind+1]-table[ind])*offset) / 256 */
|
||||||
|
|
||||||
L_tmp = L_mult (sub (table[ind + 1], table[ind]), offset);
|
L_tmp = L_mult (sub (g729_table[ind + 1], g729_table[ind]), offset);
|
||||||
lsp[i] = add (table[ind], extract_l (L_shr (L_tmp, 9)));
|
lsp[i] = add (g729_table[ind], extract_l (L_shr (L_tmp, 9)));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -148,13 +148,13 @@ Lsp_lsf (Word16 lsp[], /* (i) Q15 : lsp[m] (range: -1<=val<1) */
|
||||||
|
|
||||||
for (i = m - (Word16) 1; i >= 0; i--) {
|
for (i = m - (Word16) 1; i >= 0; i--) {
|
||||||
/* find value in table that is just greater than lsp[i] */
|
/* find value in table that is just greater than lsp[i] */
|
||||||
while (sub (table[ind], lsp[i]) < 0) {
|
while (sub (g729_table[ind], lsp[i]) < 0) {
|
||||||
ind = sub (ind, 1);
|
ind = sub (ind, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* acos(lsp[i])= ind*256 + ( ( lsp[i]-table[ind] ) * slope[ind] )/4096 */
|
/* acos(lsp[i])= ind*256 + ( ( lsp[i]-table[ind] ) * slope[ind] )/4096 */
|
||||||
|
|
||||||
L_tmp = L_mult (sub (lsp[i], table[ind]), g729_slope[ind]);
|
L_tmp = L_mult (sub (lsp[i], g729_table[ind]), g729_slope[ind]);
|
||||||
tmp = wround (L_shl (L_tmp, 3)); /*(lsp[i]-table[ind])*slope[ind])>>12 */
|
tmp = wround (L_shl (L_tmp, 3)); /*(lsp[i]-table[ind])*slope[ind])>>12 */
|
||||||
lsf[i] = add (tmp, shl (ind, 8));
|
lsf[i] = add (tmp, shl (ind, 8));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
extern Word16 hamwindow[L_WINDOW];
|
extern Word16 hamwindow[L_WINDOW];
|
||||||
extern Word16 g729_lag_h[M10];
|
extern Word16 g729_lag_h[M10];
|
||||||
extern Word16 g729_lag_l[M10];
|
extern Word16 g729_lag_l[M10];
|
||||||
extern Word16 table[65];
|
extern Word16 g729_table[65];
|
||||||
extern Word16 g729_slope[64];
|
extern Word16 g729_slope[64];
|
||||||
extern Word16 table2[64];
|
extern Word16 table2[64];
|
||||||
extern Word16 slope_cos[64];
|
extern Word16 slope_cos[64];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue