📄 ps_dec_tabs_fp.c
字号:
/*//////////////////////////////////////////////////////////////////////////////
//
// INTEL CORPORATION PROPRIETARY INFORMATION
// This software is supplied under the terms of a license agreement or
// nondisclosure agreement with Intel Corporation and may not be copied
// or disclosed except in accordance with the terms of that agreement.
// Copyright(c) 2007 Intel Corporation. All Rights Reserved.
//
*/
/* SYSTEM */
#include <math.h>
/* IPP */
#include "ipps.h"
#include "ippac.h"
/* SBR */
#include "sbr_dec_tabs_fp.h"
/* PS */
#include "ps_dec_struct.h"
/********************************************************************/
const Ipp32s tabResBand1020[] = {3, 8, 2, 2};
const Ipp32s tabResBand34[] = {5, 12, 8, 4, 4, 4};
const Ipp32s tabQuantIidStd[] = { -25, -18, -14, -10, -7, -4, -2, 0,
2, 4, 7, 10, 14, 18, 25};
const Ipp32s tabQuantIidFine[] = { -50, -45, -40, -35, -30, -25, -22,
-19, -16, -13, -10, -8, -6, -4,
-2, 0, 2, 4, 6, 8, 10, 13, 16, 19,
22, 25, 30, 35, 40, 45, 50};
/* stereo processing algorithm */
const Ipp32f tabQuantRHO[] = { 1.0f, 0.937f, 0.84118f, 0.60092f,
0.36764f, 0.0f, -0.589f, -1.0f};
/********************************************************************/
// prototype filter coefficients (p50,ISO/IEC 14496-3:2001/Amd.2:2004(E)
// name: Q - the number of subbands, B - Band config [20 OR 34]
//
const Ipp32f tabQ8B20[] = {
0.00746082949812f, 0.02270420949825f, 0.04546865930473f, 0.07266113929591f,
0.09885108575264f, 0.11793710567217f, 0.125f, 0.11793710567217f,
0.09885108575264f, 0.07266113929591f, 0.04546865930473f, 0.02270420949825f,
0.00746082949812f
};
const Ipp32f tabQ2B20[] = {
0.f, 0.01899487526049f, 0.f, -0.07293139167538f,
0.f, 0.30596630545168f, 0.5f, 0.30596630545168f,
0.f, -0.07293139167538f, 0.f, 0.01899487526049f,
0.f
};
const Ipp32f tabQ12B34[] = {
0.04081179924692f, 0.03812810994926f, 0.05144908135699f, 0.06399831151592f,
0.07428313801106f, 0.08100347892914f, 0.08333333333333f, 0.08100347892914f,
0.07428313801106f, 0.06399831151592f, 0.05144908135699f, 0.03812810994926f,
0.04081179924692f
};
const Ipp32f tabQ8B34[] = {
0.01565675600122f, 0.03752716391991f, 0.05417891378782f, 0.08417044116767f,
0.10307344158036f, 0.12222452249753f, 0.12500000000000f, 0.12222452249753f,
0.10307344158036f, 0.08417044116767f, 0.05417891378782f, 0.03752716391991f,
0.01565675600122f
};
const Ipp32f tabQ4B34[] = {
-0.05908211155639f, -0.04871498374946f, 0.f, 0.07778723915851f,
0.16486303567403f, 0.23279856662996f, 0.25f, 0.23279856662996f,
0.16486303567403f, 0.07778723915851f, 0.f, -0.04871498374946f,
-0.05908211155639f
};
const Ipp32f* pCoefTabs[13] = {NULL, NULL, NULL, tabQ2B20,
tabQ4B34, NULL, NULL, NULL,
tabQ8B34, tabQ8B20, NULL, NULL, tabQ12B34};
/********************************************************************/
// tables of scale factor for stereo processing algorithm
// c[b] = 10^(iid[b] / 20)
//
const Ipp32f tabScaleIidStd[] = {
1.4119828f, 1.4031382f, 1.3868767f, 1.3483998f, 1.2912494f,
1.1960374f, 1.1073724f, 1.f, 0.87961715f, 0.75464857f,
0.5767799f, 0.42640144f, 0.27671829f, 0.17664462f, 0.079401627f
};
const Ipp32f tabScaleIidFine[] = {
1.4142065f, 1.4141912f, 1.4141428f, 1.41399f, 1.413507f, 1.4119828f,
1.409773f, 1.4053948f, 1.3967797f, 1.380053f, 1.3483998f, 1.3139201f,
1.2643101f, 1.1960374f, 1.1073724f, 1.f, 0.87961715f, 0.75464857f,
0.63365608f, 0.52308106f, 0.42640144f, 0.3089554f, 0.22137465f, 0.15768789f,
0.11198225f, 0.079401627f,0.044699017f,0.025144693f, 0.014141428f,0.007952581f,
0.004472114f
};
/********************************************************************/
/* transient detection tables [8.6.4.5.3] */
/* BAND_20 */
const Ipp32s tabStartBord_Band20[] = {6, 7, 0, 1, 2, 3, 9, 8, 10, 11,
3, 4, 5, 6, 7, 8, 9, 11, 14, 18, 23, 35, 64};
const Ipp32s tabStopBord_Band20[] = { 7, 8, 1, 2, 3, 4, 10, 9, 11, 12, 4,
5, 6, 7, 8, 9, 11, 14, 18, 23, 35, 64 };
const Ipp32s tabBin_Band20[] = { 1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 };
const Ipp32s tabPostBinMap_Band20[] = {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
/* BAND34 */
const Ipp32s tabBin_Band34[] = { 0, 1, 2, 3, 4, 5, 6, 6, 7, 2, 1, 0,
10, 10, 4, 5, 6, 7, 8, 9,10, 11, 12, 9,
14, 11, 12, 13,14,15,16,13,16, 17, 18,19,
20, 21, 22, 23,24,25,26,27,28, 29, 30,31,
32,33};
const Ipp32s tabStartBord_Band34[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11,12,13,14,15,16,17,18,19,20, 21,
22,23,24,25,26,27,28,29,30,31, 5,
6, 7, 8, 9,10,11,13,15,17,19, 21,
24, 27, 30, 33, 37, 41 };
const Ipp32s tabStopBord_Band34[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11,12,13,14,15,16,17,18,19, 20,
21,22,23,24,25,26,27,28,29, 30,
31,32,6,7,8,9,10,11,13,15,17,
19,21,24,27,30,33,37,41,64 };
const Ipp32s tabPostBinMap_Band34[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0 };
const sTDSpec setConfBand20 = {22, 20, 3, 10, 10, 23,
(Ipp32s*)tabStartBord_Band20,
(Ipp32s*)tabStopBord_Band20,
(Ipp32s*)tabBin_Band20,
(Ipp32s*)tabPostBinMap_Band20};
const sTDSpec setConfBand34 = {50, 34, 5, 32, 32, 23,
(Ipp32s*)tabStartBord_Band34,
(Ipp32s*)tabStopBord_Band34,
(Ipp32s*)tabBin_Band34,
(Ipp32s*)tabPostBinMap_Band34};
/********************************************************************/
/* EOF */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -