⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 decg722.c

📁 这是在PCA下的基于IPP库示例代码例子,在网上下了IPP的库之后,设置相关参数就可以编译该代码.
💻 C
📖 第 1 页 / 共 3 页
字号:
/*/////////////////////////////////////////////////////////////////////////////
//
//                  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) 2005 Intel Corporation. All Rights Reserved.
//
//     Intel(R) Integrated Performance Primitives
//     USC - Unified Speech Codec interface library
//
// By downloading and installing USC codec, you hereby agree that the
// accompanying Materials are being provided to you under the terms and
// conditions of the End User License Agreement for the Intel(R) Integrated
// Performance Primitives product previously accepted by you. Please refer
// to the file ipplic.htm located in the root directory of your Intel(R) IPP
// product installation for more information.
//
// A speech coding standards promoted by ITU, ETSI, 3GPP and other
// organizations. Implementations of these standards, or the standard enabled
// platforms may require licenses from various entities, including
// Intel Corporation.
//
//
// Purpose: G.722.1 speech codec: decoder own functions.
//
*/

#include "owng722.h"

static __ALIGN32 CONST Ipp16s cnstStdDeviation_G722[REG_POW_TABLE_SIZE] = {
    0,     0,     0,      0,      0,
    0,     0,     0,      0,      0,
    0,     0,     0,      0,      0,
    0,     0,     0,      0,      0,
    0,     0,     1,      1,      1,
    1,     2,     3,      4,      6,
    8,    11,    16,     23,     32,
   45,    64,    91,    128,    181,
  256,   362,    512,   724,   1024,
 1448,  2048,   2896,  4096,   5793,
 8192, 11585,  16384, 23170,      0,
    0,     0,      0,     0,      0,
    0,     0,      0,     0
};

static __ALIGN32 CONST Ipp16s cnstDiffRegionPowerDecTree_G722[REG_NUM][DIFF_REG_POW_LEVELS-1][2] = {
{
   {  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},{  0,  0},{  0,  0},{  0,  0},{  0,  0}
},
{
   {  1,  2},{  3,  4},{  5,  6},{  7,  8},{  9, 10},{ 11,-12},{-11,-10},{ -8, -9},
   { -7, -6},{-13, 12},{ -5, -4},{  0, 13},{ -3,-14},{ -2, 14},{ -1, 15},{-15, 16},
   {-16, 17},{-17, 18},{ 19, 20},{ 21, 22},{-18,-19},{-20,-21},{-22,-23}
},
{
   {  1,  2},{  3,  4},{  5,  6},{  7,  8},{-10, -9},{ -8,-11},{ -7, -6},{  9, -5},
   { 10,-12},{ -4, 11},{-13, -3},{ 12, -2},{ 13,-14},{ -1, 14},{ 15,-15},{  0, 16},
   {-16, 17},{-17, 18},{-18, 19},{ 20, 21},{ 22,-19},{-20,-21},{-22,-23}
},
{
   {  1,  2},{  3,  4},{  5,  6},{  7,  8},{  9, 10},{-12, 11},{-11,-13},{-10, -9},
   { 12,-14},{ -8, -7},{-15, -6},{ 13, -5},{-16, -4},{ 14,-17},{ 15, -3},{ 16,-18},
   { -2, 17},{ 18,-19},{ -1, 19},{-20, 20},{  0, 21},{ 22,-21},{-22,-23}
},
{
   {  1,  2},{  3,  4},{  5,  6},{-11,-10},{  7,-12},{  8, -9},{  9,-13},{-14, 10},
   { -8,-15},{-16, 11},{ -7, 12},{-17, -6},{ 13, 14},{-18, 15},{ -5, -4},{ 16, 17},
   { -3, -2},{-19, 18},{ -1, 19},{-20, 20},{ 21, 22},{  0,-21},{-22,-23}
},
{
   {  1,  2},{  3,  4},{  5,  6},{-12,-11},{-13,  7},{  8,-14},{-10,  9},{ 10,-15},
   { -9, 11},{ -8, 12},{-16, 13},{ -7, -6},{-17, 14},{ -5,-18},{ 15, -4},{ 16,-19},
   { 17, -3},{-20, 18},{ -2, 19},{-21, 20},{  0, 21},{ 22, -1},{-22,-23}
},
{
   {  1,  2},{  3,  4},{  5,  6},{-11,  7},{-12,-10},{-13, -9},{  8,  9},{-14, -8},
   { 10,-15},{ -7, 11},{-16, 12},{ -6,-17},{ 13, 14},{ -5, 15},{-18, 16},{ -4, 17},
   { -3,-19},{ 18, -2},{-20, 19},{ -1, 20},{  0, 21},{ 22,-21},{-22,-23}
},
{
   {  1,  2},{  3,  4},{  5,-12},{  6,-11},{-10,-13},{ -9,  7},{  8,-14},{  9, -8},
   {-15, 10},{ -7,-16},{ 11, -6},{ 12,-17},{ 13, -5},{-18, 14},{ 15, -4},{-19, 16},
   { 17, -3},{-20, 18},{ 19, 20},{ 21, 22},{  0, -2},{ -1,-21},{-22,-23}
},
{
   {  1,  2},{  3,  4},{  5,-12},{  6,-13},{-11,-10},{  7,-14},{  8, -9},{  9,-15},
   { -8, 10},{ -7,-16},{ 11, 12},{ -6,-17},{ -5, 13},{ 14, 15},{-18, -4},{-19, 16},
   { -3, 17},{ 18, -2},{-20, 19},{ 20, 21},{ 22,  0},{ -1,-21},{-22,-23}
},
{
   {  1,  2},{  3,  4},{  5,  6},{-11,-10},{-12, -9},{  7,  8},{-13, -8},{  9,-14},
   { -7, 10},{ -6,-15},{ 11, 12},{ -5,-16},{ 13, 14},{-17, 15},{ -4, 16},{ 17,-18},
   { 18, -3},{ -2, 19},{ -1,  0},{-19, 20},{-20, 21},{ 22,-21},{-22,-23}
},
{
   {  1,  2},{  3,  4},{  5,  6},{-11,  7},{-10,-12},{ -9,  8},{ -8,-13},{  9, -7},
   { 10,-14},{ -6, 11},{-15, 12},{ -5, 13},{-16, -4},{ 14, 15},{-17, -3},{-18, 16},
   { 17,-19},{ -2, 18},{-20, 19},{ -1, 20},{ 21, 22},{  0,-21},{-22,-23}
},
{
   {  1,  2},{  3,  4},{  5,-12},{  6,-11},{  7,  8},{-10,-13},{ -9,  9},{ -8,-14},
   { 10, -7},{ 11,-15},{ -6, 12},{ -5, 13},{ -4,-16},{ 14, 15},{ -3,-17},{ 16, 17},
   {-18, -2},{ 18,-19},{ -1, 19},{-20, 20},{-21, 21},{ 22,  0},{-22,-23}
},
{
   {  1,  2},{  3,  4},{  5,-12},{-13,  6},{-11,  7},{-14,  8},{-10,  9},{-15, -9},
   { -8, 10},{ -7,-16},{ 11, -6},{ 12, -5},{-17, 13},{ 14,-18},{ 15, -4},{ 16,-19},
   { 17, -3},{ 18, -2},{ 19, -1},{-20, 20},{ 21, 22},{  0,-21},{-22,-23}
},
{
   {  1,  2},{  3,  4},{-12,  5},{-11,-13},{  6,-14},{-10,  7},{  8,-15},{ -9,  9},
   {-16, 10},{ -8,-17},{ 11, 12},{ -7,-18},{ -6, 13},{ 14, -5},{ 15,-19},{ -4, 16},
   {-20, 17},{ 18, 19},{ 20, 21},{ 22,  0},{ -1, -3},{ -2,-21},{-22,-23}
}};


static __ALIGN32 CONST Ipp16s  cnstDecMLTTreeCtg0_G722[180][2] = {
{   1,   0},{   2,   3},{   4,   5},{   6,   7},
{   8,   9},{  -1, -14},{  10,  11},{  12,  13},
{  14,  15},{  16,  17},{  18,  19},{ -15,  20},
{  21,  22},{  23, -28},{  24,  -2},{  25,  26},
{  27,  28},{  29,  30},{  31,  32},{ -29,  33},
{ -16,  34},{  -3,  35},{  36,  37},{ -42,  38},
{  39,  40},{  41,  42},{  43,  44},{ -17,  45},
{ -43,  46},{  47,  48},{  -4,  49},{ -56,  50},
{  51,  52},{  53,  54},{  55,  56},{ -57,  -5},
{ -30,  57},{  58,  59},{ -18,  60},{  61, -70},
{  62,  63},{  64,  -6},{  65,  66},{ -44,  67},
{ -71,  68},{  69,  70},{ -19, -31},{ -84,  71},
{  72,  73},{  74,  75},{  76,  77},{  -7,  78},
{  79, -20},{  80,  81},{ -85,  82},{ -98,  83},
{ -58,  84},{  85, -32},{ -99,  86},{  -8,  87},
{  88,  89},{ -72, -45},{  90, -33},{  91,-112},
{ -21,  92},{ -59,-113},{ -46,  93},{  -9,  94},
{ -22,  95},{  96,  97},{  98,  99},{ -23, -86},
{ 100, 101},{ -34, -73},{ 102,-126},{-127, -35},
{ 103, -47},{ 104, 105},{ 106, 107},{-140,-100},
{-114, -87},{ 108, 109},{ 110, 111},{-141, -60},
{ 112, -48},{ 113, -24},{ -10, -61},{ 114,-101},
{ 115, 116},{ -74, -36},{ 117,-128},{ 118, -62},
{ 119, 120},{ -37, 121},{ -11, -49},{ -88, 122},
{ 123,-115},{-154, -25},{-142, 124},{-155,-129},
{ 125, -50},{ 126, 127},{ -76, -75},{ 128, 129},
{ -63, -77},{-102, -39},{ -38, 130},{ -51, 131},
{ -89,-116},{-117,-156},{ 132, -52},{ -78, 133},
{ 134,-103},{ 135, 136},{-143, -65},{ 137, -64},
{-130,-131},{ -90, 138},{-104, -91},{ -92, 139},
{-169,-183},{ -26,-118},{ 140, 141},{-144, -66},
{ -12, 142},{-168, 143},{-105,-157},{ 144,-182},
{ 145, 146},{ -79, 147},{ -53,-170},{ 148, 149},
{ -27,-145},{ 150, -80},{-106, -13},{-132, -67},
{-158, -40},{-119, 151},{ 152,-107},{ 153, 154},
{ -41,-184},{ 155, 156},{ -54, 157},{-171, 158},
{ -94, 159},{-134,-146},{ -93,-133},{-159,-108},
{ 160, -81},{ 161,-160},{ 162, -68},{-120,-122},
{-172, 163},{ -55, -95},{ 164,-109},{-161, -82},
{-173,-185},{ 165, -69},{-147,-186},{ 166, 167},
{-121, -96},{ 168,-148},{-174, 169},{ 170,-136},
{ -83, 171},{ 172, 173},{-135,-110},{-187, 174},
{-149,-150},{ 175,-123},{-162,-163},{ -97,-175},
{-188, 176},{ 177, 178},{ 179,-111},{-151,-124},
{-137,-177},{-176,-125},{-164,-138},{-189,-190}
};
static __ALIGN32 CONST Ipp16s  cnstDecMLTTreeCtg1_G722[93][2] = {
{   1,   0},{   2,   3},{   4,   5},{   6,   7},
{   8, -10},{  -1,   9},{  10,  11},{  12,  13},
{ -11,  14},{  15,  16},{  17,  18},{ -20,  -2},
{  19,  20},{ -21,  21},{  22,  23},{ -12,  24},
{  25,  26},{  27,  28},{  29,  30},{ -30,  31},
{ -31,  -3},{  32, -22},{  33, -13},{  34,  35},
{  36,  37},{  38,  39},{  40,  -4},{ -41, -14},
{  41, -40},{ -32,  42},{  43, -23},{  44,  45},
{  46,  47},{  48,  -5},{ -51, -50},{ -42,  49},
{ -33,  50},{ -15,  51},{  52,  53},{  54, -24},
{  55, -43},{  56, -52},{  57, -61},{ -60,  58},
{ -25,  59},{ -16, -34},{  -6,  60},{ -62,  61},
{ -71,  62},{ -35,  -7},{  63, -72},{ -53, -17},
{  64, -44},{ -26, -70},{  65, -45},{ -36,  66},
{ -63,  67},{ -80, -54},{ -81,  68},{ -27,  69},
{  70, -82},{ -18,  71},{  72, -55},{  73, -64},
{  74, -73},{  75, -46},{ -37,  76},{ -91,  -8},
{  -9,  77},{ -90, -83},{  78, -28},{  79, -56},
{ -65, -38},{ -74,  80},{ -19, -57},{ -92,  81},
{ -47, -48},{  82, -66},{  83, -29},{ -84,  84},
{ -75, -85},{ -67, -93},{ -39,  85},{ -76,  86},
{ -58,  87},{  88, -49},{ -94,  89},{  90, -68},
{  91, -78},{ -86, -59},{ -77, -95},{  92, -69},
{ -87, -96}
};
static __ALIGN32 CONST Ipp16s  cnstDecMLTTreeCtg2_G722[47][2] = {
{   1,   0},{   2,   3},{   4,   5},{   6,  -7},
{  -1,   7},{  -8,   8},{   9,  10},{  11,  12},
{  13, -14},{ -15,  -9},{  -2,  14},{  15,  16},
{  17,  18},{  19, -16},{  20, -22},{ -10,  21},
{ -21,  -3},{  22,  23},{  24,  25},{ -23, -17},
{  26,  27},{  28, -29},{ -11, -28},{  29,  30},
{  -4, -24},{ -30,  31},{  32, -18},{  33, -35},
{ -36,  34},{ -31, -12},{  35, -25},{  -5, -37},
{  36,  37},{ -42,  38},{ -19, -43},{ -32,  39},
{ -13, -38},{ -26, -20},{  40,  -6},{ -44,  41},
{  42, -39},{ -33, -45},{  43, -27},{  44, -46},
{  45, -34},{ -40,  46},{ -41, -47}
};
static __ALIGN32 CONST Ipp16s  cnstDecMLTTreeCtg3_G722[519][2] = {
{   1,   2},{   3,   4},{   5,   0},{   6,   7},
{   8,   9},{  10,  11},{  12,  13},{  14,  15},
{  16,  17},{-125,  18},{  -1,  19},{  20,  21},
{  22,  23},{  24,  25},{  -5, -25},{  26,  27},
{  -6,-150},{  28,  29},{  30,  31},{  32,  33},
{  34, -30},{  35,  36},{  37,  38},{  39, -31},
{-126,-155},{  40,  41},{-156,  42},{  43,-130},
{  44,-131},{-151, -26},{  45,  46},{-250,  47},
{  48,  49},{  50,  51},{  52,-275},{  53,  54},
{  -2,  -7},{  55,  56},{  57,  58},{  59,  60},
{  61,  62},{  63,  64},{  65,  66},{  67,  68},
{  69,  70},{  71, -50},{  72,-180},{  73,  74},
{  75,  76},{  77, -55},{  78,-175},{  79, -36},
{  80,  81},{ -35, -10},{  82,  83},{-280,  84},
{ -11,  85},{  86, -32},{  87,  88},{  89,-161},
{  90,-276},{  91,  92},{-281,  93},{  -8,  94},
{  95,  96},{  97,-157},{-181,-400},{-132,  98},
{-375,  99},{-160, 100},{-127, 101},{ -27, 102},
{ 103,-251},{ -56, 104},{ 105,-256},{-300,  -3},
{-152,-255},{ 106, 107},{ -37, 108},{-305, 109},
{-176, 110},{-136, 111},{ -12, 112},{ 113, 114},
{ 115,-135},{ 116, 117},{-162, 118},{ -16, -51},
{-186, 119},{ 120, 121},{ 122, 123},{ -41, 124},
{ -61, 125},{ 126, 127},{ 128, 129},{ 130, -60},
{ 131, 132},{-306, 133},{ 134,-205},{-405, 135},
{ 136, 137},{ 138, 139},{-185, 140},{ 141,-500},
{ -15, 142},{ 143, -80},{ -75, -40},{-301, 144},
{ 145, 146},{-200, 147},{ 148, 149},{ 150, 151},
{ 152,-525},{ 153,-177},{-425, 154},{ 155, -13},
{-430, 156},{ 157,-406},{ 158, 159},{-206,-380},
{ 160, 161},{ 162, 163},{ 164,-182},{-137, 165},
{-286, 166},{ 167,-401},{ 168, 169},{ -42, -33},
{ 170,-166},{ -57,-325},{ 171,-187},{ -38, 172},
{ 173, 174},{-165,-330},{  -4,-282},{ 175,-257},
{-261,-311},{-376, 176},{ 177, 178},{ -28, 179},
{ 180,  -9},{-285, 181},{ 182, 183},{ 184,-277},
{ 185,-133},{-310, -81},{ -85, 186},{-158,-210},
{ -17, 187},{ 188, 189},{ 190, -52},{-141, 191},
{ 192,-128},{-191, -20},{ 193,-140},{ 194, 195},
{-211,-260},{ 196, 197},{ 198, 199},{ 200, -66},
{-201,-225},{-381, 201},{ 202, 203},{ 204, 205},
{ 206, 207},{-163,-287},{ 208,-100},{ 209, 210},
{ 211, 212},{ 213,-252},{-105, -76},{ 214, 215},
{ 216, -21},{ -86, -62},{-307, 217},{ -65,-455},
{-550, 218},{ 219, 220},{ 221, 222},{ 223, 224},
{ 225,-230},{-142, 226},{-302,-426},{-431, 227},
{ 228, 229},{ 230,-190},{-402, -46},{-153,-450},
{-505, 231},{ 232, 233},{ 234, 235},{ 236, 237},
{ 238, 239},{-262, -29},{ 240, 241},{ 242, 243},

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -