📄 aac_dec_decoding_int.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) 2003-2005 Intel Corporation. All Rights Reserved.//// Intel(R) Integrated Performance Primitives AAC Decode Sample for Windows*//// By downloading and installing this sample, 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.//// MPEG-4 and AAC are international standards promoted by ISO, IEC, ITU, ETSI// and other organizations. Implementations of these standards, or the standard// enabled platforms may require licenses from various entities, including// Intel Corporation.//*//********************************************************************/#include "aac_dec_own.h"#include <math.h>/********************************************************************/static int is_intensity(s_SE_Individual_channel_stream *pData, int group, int sfb);static int is_noise(s_SE_Individual_channel_stream *pData, int group, int sfb);/********************************************************************/static int Pow43_table[] = { 0x00000000, 0x00002000, 0x000050a2, 0x00008a74, 0x0000cb2f, 0x00011198, 0x00015ce3, 0x0001ac7f, 0x0001ffff, 0x00025710, 0x0002b16b, 0x00030ed7, 0x00036f23, 0x0003d227, 0x000437be, 0x00049fc8, 0x00050a28, 0x000576c6, 0x0005e58c, 0x00065663, 0x0006c93a, 0x00073dff, 0x0007b4a2, 0x00082d16, 0x0008a74b, 0x00092336, 0x0009a0cb, 0x000a1fff, 0x000aa0c8, 0x000b231c, 0x000ba6f1, 0x000c2c3f, 0x000cb2ff, 0x000d3b28, 0x000dc4b2, 0x000e4f98, 0x000edbd1, 0x000f6959, 0x000ff829, 0x0010883b, 0x00111989, 0x0011ac0f, 0x00123fc7, 0x0012d4ac, 0x00136aba, 0x001401ed, 0x00149a3f, 0x001533ac, 0x0015ce31, 0x001669ca, 0x00170673, 0x0017a428, 0x001842e6, 0x0018e2a9, 0x0019836e, 0x001a2532, 0x001ac7f2, 0x001b6baa, 0x001c1058, 0x001cb5fa, 0x001d5c8b, 0x001e040a, 0x001eac74, 0x001f55c7, 0x001fffff, 0x0020ab1c, 0x00215719, 0x002203f5, 0x0022b1ae, 0x00236041, 0x00240fad, 0x0024bff0, 0x00257106, 0x002622ef, 0x0026d5a9, 0x00278931, 0x00283d85, 0x0028f2a5, 0x0029a88e, 0x002a5f3e, 0x002b16b4, 0x002bceee, 0x002c87eb, 0x002d41a8, 0x002dfc25, 0x002eb760, 0x002f7357, 0x00303009, 0x0030ed74, 0x0031ab98, 0x00326a72, 0x00332a01, 0x0033ea44, 0x0034ab3a, 0x00356ce1, 0x00362f39, 0x0036f23f, 0x0037b5f3, 0x00387a54, 0x00393f5f, 0x003a0515, 0x003acb74, 0x003b927b, 0x003c5a28, 0x003d227b, 0x003deb73, 0x003eb50f, 0x003f7f4d, 0x00404a2c, 0x004115ac, 0x0041e1cc, 0x0042ae8a, 0x00437be6, 0x004449de, 0x00451873, 0x0045e7a2, 0x0046b76b, 0x004787cd, 0x004858c8, 0x00492a59, 0x0049fc82, 0x004acf40, 0x004ba292, 0x004c7679, 0x004d4af3, 0x004e1fff, 0x004ef59e, 0x004fcbcc, 0x0050a28b, 0x005179da, 0x005251b7, 0x00532a22, 0x0054031a, 0x0054dc9e, 0x0055b6ae, 0x00569149, 0x00576c6f, 0x0058481e, 0x00592456, 0x005a0117, 0x005ade5f, 0x005bbc2e, 0x005c9a84, 0x005d7960, 0x005e58c0, 0x005f38a5, 0x0060190e, 0x0060f9fb, 0x0061db6a, 0x0062bd5b, 0x00639fce, 0x006482c1, 0x00656636, 0x00664a2a, 0x00672e9d, 0x0068138f, 0x0068f8ff, 0x0069deed, 0x006ac557, 0x006bac3f, 0x006c93a2, 0x006d7b81, 0x006e63dc, 0x006f4cb0, 0x007035ff, 0x00711fc7, 0x00720a08, 0x0072f4c2, 0x0073dff3, 0x0074cb9d, 0x0075b7bd, 0x0076a454, 0x00779162, 0x00787ee5, 0x00796cdd, 0x007a5b4a, 0x007b4a2b, 0x007c3981, 0x007d294a, 0x007e1985, 0x007f0a34, 0x007ffb55, 0x0080ece7, 0x0081deeb, 0x0082d160, 0x0083c446, 0x0084b79b, 0x0085ab60, 0x00869f95, 0x00879439, 0x0088894b, 0x00897ecb, 0x008a74b9, 0x008b6b15, 0x008c61dd, 0x008d5912, 0x008e50b4, 0x008f48c1, 0x0090413a, 0x00913a1e, 0x0092336d, 0x00932d26, 0x0094274a, 0x009521d7, 0x00961ccd, 0x0097182d, 0x009813f5, 0x00991026, 0x009a0cbf, 0x009b09bf, 0x009c0727, 0x009d04f6, 0x009e032c, 0x009f01c8, 0x00a000ca, 0x00a10032, 0x00a1ffff, 0x00a30032, 0x00a400c9, 0x00a501c5, 0x00a60325, 0x00a704e9, 0x00a80711, 0x00a9099c, 0x00aa0c8a, 0x00ab0fda, 0x00ac138d, 0x00ad17a2, 0x00ae1c19, 0x00af20f2, 0x00b0262c, 0x00b12bc7, 0x00b231c2, 0x00b3381e, 0x00b43eda, 0x00b545f6, 0x00b64d72, 0x00b7554d, 0x00b85d87, 0x00b96620, 0x00ba6f17, 0x00bb786c, 0x00bc8220, 0x00bd8c32, 0x00be96a0, 0x00bfa16d, 0x00c0ac96, 0x00c1b81c, 0x00c2c3fe, 0x00c3d03c, 0x00c4dcd7, 0x00c5e9cd, 0x00c6f71f, 0x00c804cc, 0x00c912d4, 0x00ca2137, 0x00cb2ff5, 0x00cc3f0c, 0x00cd4e7e, 0x00ce5e4a, 0x00cf6e6f, 0x00d07eee, 0x00d18fc5, 0x00d2a0f6, 0x00d3b280, 0x00d4c461, 0x00d5d69b, 0x00d6e92e, 0x00d7fc18, 0x00d90f59, 0x00da22f2, 0x00db36e2, 0x00dc4b29, 0x00dd5fc7, 0x00de74bb, 0x00df8a06, 0x00e09fa6, 0x00e1b59d, 0x00e2cbe9, 0x00e3e28b, 0x00e4f982, 0x00e610ce, 0x00e7286f, 0x00e84064, 0x00e958ae, 0x00ea714c, 0x00eb8a3f, 0x00eca385, 0x00edbd1f, 0x00eed70c, 0x00eff14d, 0x00f10be1, 0x00f226c8, 0x00f34201, 0x00f45d8d, 0x00f5796b, 0x00f6959c, 0x00f7b21e, 0x00f8cef3, 0x00f9ec18, 0x00fb0990, 0x00fc2758, 0x00fd4572, 0x00fe63dc, 0x00ff8297, 0x0100a1a3, 0x0101c0ff, 0x0102e0ab, 0x010400a8, 0x010520f4, 0x01064190, 0x0107627b, 0x010883b5, 0x0109a53f, 0x010ac718, 0x010be93f, 0x010d0bb5, 0x010e2e7a, 0x010f518d, 0x011074ee, 0x0111989d, 0x0112bc9a, 0x0113e0e4, 0x0115057c, 0x01162a62, 0x01174f94, 0x01187514, 0x01199ae0, 0x011ac0f9, 0x011be75f, 0x011d0e11, 0x011e3510, 0x011f5c5a, 0x012083f0, 0x0121abd3, 0x0122d400, 0x0123fc7a, 0x0125253e, 0x01264e4e, 0x012777a9, 0x0128a14f, 0x0129cb3f, 0x012af57a, 0x012c1fff, 0x012d4acf, 0x012e75e9, 0x012fa14d, 0x0130ccfb, 0x0131f8f3, 0x01332534, 0x013451be, 0x01357e92, 0x0136abaf, 0x0137d916, 0x013906c5, 0x013a34bc, 0x013b62fd, 0x013c9186, 0x013dc057, 0x013eef70, 0x01401ed2, 0x01414e7b, 0x01427e6d, 0x0143aea6, 0x0144df26, 0x01460fee, 0x014740fd, 0x01487254, 0x0149a3f1, 0x014ad5d5, 0x014c0800, 0x014d3a72, 0x014e6d2a, 0x014fa029, 0x0150d36e, 0x015206f9, 0x01533aca, 0x01546ee1, 0x0155a33e, 0x0156d7e0, 0x01580cc8, 0x015941f5, 0x015a7768, 0x015bad1f, 0x015ce31c, 0x015e195e, 0x015f4fe4, 0x016086af, 0x0161bdbf, 0x0162f513, 0x01642cab, 0x01656488, 0x01669ca9, 0x0167d50e, 0x01690db6, 0x016a46a3, 0x016b7fd2, 0x016cb946, 0x016df2fd, 0x016f2cf7, 0x01706734, 0x0171a1b5, 0x0172dc78, 0x0174177e, 0x017552c7, 0x01768e53, 0x0177ca21, 0x01790631, 0x017a4284, 0x017b7f19, 0x017cbbf0, 0x017df909, 0x017f3664, 0x01807401, 0x0181b1df, 0x0182efff, 0x01842e60, 0x01856d03, 0x0186abe6, 0x0187eb0b, 0x01892a71, 0x018a6a18, 0x018baa00, 0x018cea28, 0x018e2a91, 0x018f6b3b, 0x0190ac25, 0x0191ed4f, 0x01932eba, 0x01947064, 0x0195b24f, 0x0196f479, 0x019836e4, 0x0199798e, 0x019abc77, 0x019bffa1, 0x019d4309, 0x019e86b1, 0x019fca98, 0x01a10ebe, 0x01a25324, 0x01a397c8, 0x01a4dcab, 0x01a621cd, 0x01a7672d, 0x01a8accc, 0x01a9f2aa, 0x01ab38c6, 0x01ac7f20, 0x01adc5b8, 0x01af0c8e, 0x01b053a3, 0x01b19af5, 0x01b2e285, 0x01b42a53, 0x01b5725f, 0x01b6baa8, 0x01b8032e, 0x01b94bf2, 0x01ba94f3, 0x01bbde32, 0x01bd27ad, 0x01be7165, 0x01bfbb5b, 0x01c1058d, 0x01c24ffc, 0x01c39aa8, 0x01c4e590, 0x01c630b4, 0x01c77c15, 0x01c8c7b3, 0x01ca138c, 0x01cb5fa2, 0x01ccabf4, 0x01cdf882, 0x01cf454c, 0x01d09251, 0x01d1df92, 0x01d32d0f, 0x01d47ac8, 0x01d5c8bb, 0x01d716eb, 0x01d86555, 0x01d9b3fb, 0x01db02dc, 0x01dc51f8, 0x01dda14f, 0x01def0e1, 0x01e040ae, 0x01e190b5, 0x01e2e0f7, 0x01e43174, 0x01e5822b, 0x01e6d31d, 0x01e82449, 0x01e975af, 0x01eac74f, 0x01ec192a, 0x01ed6b3e, 0x01eebd8d, 0x01f01015, 0x01f162d7, 0x01f2b5d3, 0x01f40909, 0x01f55c78, 0x01f6b020, 0x01f80402, 0x01f9581d, 0x01faac72, 0x01fc0100, 0x01fd55c7, 0x01feaac7, 0x01ffffff, 0x02015571, 0x0202ab1c, 0x020400ff, 0x0205571b, 0x0206ad70, 0x020803fd, 0x02095ac2, 0x020ab1c0, 0x020c08f7, 0x020d6065, 0x020eb80c, 0x02100fea, 0x02116801, 0x0212c050, 0x021418d6, 0x02157195, 0x0216ca8b, 0x021823b9, 0x02197d1e, 0x021ad6bb, 0x021c308f, 0x021d8a9b, 0x021ee4de, 0x02203f58, 0x02219a0a, 0x0222f4f2, 0x02245012, 0x0225ab68, 0x022706f6, 0x022862ba, 0x0229beb5, 0x022b1ae7, 0x022c774f, 0x022dd3ee, 0x022f30c4, 0x02308dd0, 0x0231eb12, 0x0233488b, 0x0234a63a, 0x0236041f, 0x0237623a, 0x0238c08b, 0x023a1f12, 0x023b7dcf, 0x023cdcc2, 0x023e3beb, 0x023f9b49, 0x0240fadd, 0x02425aa7, 0x0243baa6, 0x02451ada, 0x02467b44, 0x0247dbe4, 0x02493cb8, 0x024a9dc2, 0x024bff01, 0x024d6075, 0x024ec21e, 0x025023fc, 0x0251860f, 0x0252e857, 0x02544ad4, 0x0255ad85, 0x0257106b, 0x02587386, 0x0259d6d5, 0x025b3a58, 0x025c9e10, 0x025e01fc, 0x025f661d, 0x0260ca72, 0x02622efb, 0x026393b8, 0x0264f8a9, 0x02665dce, 0x0267c327, 0x026928b4, 0x026a8e75, 0x026bf46a, 0x026d5a92, 0x026ec0ee, 0x0270277d, 0x02718e40, 0x0272f537, 0x02745c60, 0x0275c3be, 0x02772b4e, 0x02789312, 0x0279fb09, 0x027b6333, 0x027ccb90, 0x027e3420, 0x027f9ce3, 0x028105d9, 0x02826f02, 0x0283d85e, 0x028541ec, 0x0286abad, 0x028815a1, 0x02897fc7, 0x028aea1f, 0x028c54ab, 0x028dbf68, 0x028f2a58, 0x0290957a, 0x029200cf, 0x02936c55, 0x0294d80e, 0x029643f9, 0x0297b016, 0x02991c64, 0x029a88e5, 0x029bf598, 0x029d627c, 0x029ecf92, 0x02a03cda, 0x02a1aa54, 0x02a317ff, 0x02a485db, 0x02a5f3e9, 0x02a76229, 0x02a8d09a, 0x02aa3f3c, 0x02abae10, 0x02ad1d14, 0x02ae8c4a, 0x02affbb2, 0x02b16b4a, 0x02b2db13, 0x02b44b0d, 0x02b5bb38, 0x02b72b94, 0x02b89c21, 0x02ba0cde, 0x02bb7dcd, 0x02bceeec, 0x02be603b, 0x02bfd1bb, 0x02c1436c, 0x02c2b54d, 0x02c4275f, 0x02c599a1, 0x02c70c13, 0x02c87eb5, 0x02c9f188, 0x02cb648b, 0x02ccd7be, 0x02ce4b21, 0x02cfbeb4, 0x02d13278, 0x02d2a66b, 0x02d41a8e, 0x02d58ee0, 0x02d70363, 0x02d87815, 0x02d9ecf7, 0x02db6209, 0x02dcd74a, 0x02de4cbb, 0x02dfc25b, 0x02e1382b, 0x02e2ae2a, 0x02e42459, 0x02e59ab7, 0x02e71144, 0x02e88800, 0x02e9feec, 0x02eb7606, 0x02eced50, 0x02ee64c9, 0x02efdc71, 0x02f15448, 0x02f2cc4d, 0x02f44482, 0x02f5bce5, 0x02f73577, 0x02f8ae38, 0x02fa2727, 0x02fba045, 0x02fd1992, 0x02fe930d, 0x03000cb7, 0x0301868f, 0x03030095, 0x03047aca, 0x0305f52d, 0x03076fbf, 0x0308ea7f, 0x030a656c, 0x030be088, 0x030d5bd3, 0x030ed74b, 0x031052f1, 0x0311cec5, 0x03134ac7, 0x0314c6f7, 0x03164355, 0x0317bfe0, 0x03193c9a, 0x031ab981, 0x031c3695, 0x031db3d8, 0x031f3147, 0x0320aee5, 0x03222cb0, 0x0323aaa8, 0x032528ce, 0x0326a721, 0x032825a1, 0x0329a44f, 0x032b232a, 0x032ca232, 0x032e2168, 0x032fa0ca, 0x03312059, 0x0332a016, 0x03341fff, 0x0335a016, 0x03372059, 0x0338a0ca, 0x033a2167, 0x033ba231, 0x033d2327, 0x033ea44a, 0x0340259a, 0x0341a717, 0x034328c0, 0x0344aa96, 0x03462c98, 0x0347aec7, 0x03493122, 0x034ab3a9, 0x034c365d, 0x034db93d, 0x034f3c4a, 0x0350bf82, 0x035242e7, 0x0353c678, 0x03554a35, 0x0356ce1e, 0x03585233, 0x0359d675, 0x035b5ae2, 0x035cdf7b, 0x035e6440, 0x035fe930, 0x03616e4d, 0x0362f395, 0x03647909, 0x0365fea9, 0x03678474, 0x03690a6b, 0x036a908d, 0x036c16db, 0x036d9d55, 0x036f23fa, 0x0370aaca, 0x037231c6, 0x0373b8ed, 0x0375403f, 0x0376c7bd, 0x03784f66, 0x0379d73a, 0x037b5f39, 0x037ce763, 0x037e6fb9, 0x037ff839, 0x038180e5, 0x038309bb, 0x038492bd, 0x03861be9, 0x0387a540, 0x03892ec2, 0x038ab86e, 0x038c4246, 0x038dcc48, 0x038f5675, 0x0390e0cc, 0x03926b4f, 0x0393f5fb, 0x039580d2, 0x03970bd4, 0x03989700, 0x039a2257, 0x039badd8, 0x039d3983, 0x039ec559, 0x03a05159, 0x03a1dd83, 0x03a369d7, 0x03a4f656, 0x03a682fe, 0x03a80fd1, 0x03a99cce, 0x03ab29f5, 0x03acb746, 0x03ae44c1, 0x03afd266, 0x03b16035, 0x03b2ee2d, 0x03b47c50, 0x03b60a9c, 0x03b79912, 0x03b927b2, 0x03bab67b, 0x03bc456e, 0x03bdd48b, 0x03bf63d1, 0x03c0f341, 0x03c282da, 0x03c4129d, 0x03c5a28a, 0x03c7329f, 0x03c8c2de, 0x03ca5347, 0x03cbe3d9, 0x03cd7494, 0x03cf0578, 0x03d09686, 0x03d227bd, 0x03d3b91d, 0x03d54aa6, 0x03d6dc58, 0x03d86e33, 0x03da0037, 0x03db9265, 0x03dd24bb, 0x03deb73a, 0x03e049e2, 0x03e1dcb3, 0x03e36fad, 0x03e502cf, 0x03e6961a, 0x03e8298f, 0x03e9bd2b, 0x03eb50f1, 0x03ece4df, 0x03ee78f5, 0x03f00d35, 0x03f1a19c, 0x03f3362d, 0x03f4cae5, 0x03f65fc7, 0x03f7f4d0, 0x03f98a02, 0x03fb1f5d, 0x03fcb4df, 0x03fe4a8a, 0x03ffe05e, 0x04017659, 0x04030c7d, 0x0404a2c9, 0x0406393d, 0x0407cfd9, 0x0409669d, 0x040afd89, 0x040c949d, 0x040e2bd9, 0x040fc33e, 0x04115aca, 0x0412f27e, 0x04148a59, 0x0416225d, 0x0417ba89, 0x041952dc, 0x041aeb57, 0x041c83f9, 0x041e1cc4, 0x041fb5b6, 0x04214ecf, 0x0422e810, 0x04248179, 0x04261b09, 0x0427b4c1, 0x04294ea0, 0x042ae8a7, 0x042c82d5, 0x042e1d2b, 0x042fb7a8, 0x0431524c, 0x0432ed17, 0x0434880a, 0x04362324, 0x0437be65, 0x043959cd, 0x043af55d, 0x043c9113, 0x043e2cf1, 0x043fc8f6, 0x04416521, 0x04430174, 0x04449dee, 0x04463a8e, 0x0447d756, 0x04497444,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -