1e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard/* 2e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** Copyright 2003-2010, VisualOn, Inc. 3e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** 4e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** Licensed under the Apache License, Version 2.0 (the "License"); 5e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** you may not use this file except in compliance with the License. 6e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** You may obtain a copy of the License at 7e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** 8e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** http://www.apache.org/licenses/LICENSE-2.0 9e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** 10e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** Unless required by applicable law or agreed to in writing, software 11e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** distributed under the License is distributed on an "AS IS" BASIS, 12e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** See the License for the specific language governing permissions and 14e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** limitations under the License. 15e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard */ 16e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard/******************************************************************************* 17e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard File: aac_rom.h 18e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 19b676a05348e4c516fa8b57e33b10548e6142c3f8Mans Rullgard Content: constant tables 20e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 21956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong*******************************************************************************/ 22956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong 23956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong#ifndef ROM_H 24956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong#define ROM_H 25e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 26956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong#include "config.h" 27956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong#include "psy_const.h" 28956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong#include "tns_param.h" 29956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong 30956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong/* 31956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong mdct 32956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong*/ 33956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const int ShortWindowSine[FRAME_LEN_SHORT/2]; 34e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const int LongWindowKBD[FRAME_LEN_LONG/2]; 35e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 36e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const unsigned char bitrevTab[17 + 129]; 37e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const int cossintab[128 + 1024]; 38e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 39e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#if defined (ARMV5E) && !defined (ARMV7Neon) 40e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const int twidTab64[(4*6 + 16*6)/2]; 41e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const int twidTab512[(8*6 + 32*6 + 128*6)/2]; 42e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#else 43e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const int twidTab64[4*6 + 16*6]; 44956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const int twidTab512[8*6 + 32*6 + 128*6]; 45956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong#endif 46956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong 47956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong/* 48956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong form factor 49956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong*/ 50956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const Word32 formfac_sqrttable[96]; 51956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong 52956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong/* 53956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong quantizer 54956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong*/ 55956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const Word32 mTab_3_4[512]; 56956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const Word32 mTab_4_3[512]; 57956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong/*! $2^{-\frac{n}{16}}$ table */ 58956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const Word16 pow2tominusNover16[17] ; 59956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong 609538ab83ed3917e643fc88f63ed83736d5a22d19Martin Storsjoextern const Word32 specExpMantTableComb_enc[4][14]; 61956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord8 specExpTableComb_enc[4][14]; 62956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong 63956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const Word16 quantBorders[4][4]; 64e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard//extern const Word16 quantRecon[3][4]; 65956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const Word16 quantRecon[4][3]; 66956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong 67956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong/* 68956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong huffman 69956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong*/ 70956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ltab1_2[3][3][3][3]; 71956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ltab3_4[3][3][3][3]; 72956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ltab5_6[9][9]; 73956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ltab7_8[8][8]; 74956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ltab9_10[13][13]; 75956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ltab11[17][17]; 76956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ltabscf[121]; 77956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ctab1[3][3][3][3]; 78956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ctab2[3][3][3][3]; 79956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ctab3[3][3][3][3]; 80956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ctab4[3][3][3][3]; 81956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ctab5[9][9]; 82956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ctab6[9][9]; 83956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ctab7[8][8]; 84956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ctab8[8][8]; 85956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ctab9[13][13]; 86956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ctab10[13][13]; 87956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord16 huff_ctab11[17][17]; 88956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const UWord32 huff_ctabscf[121]; 89956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong 90956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong 91956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong 92956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong/* 93956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong misc 94956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong*/ 95e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const int sampRateTab[NUM_SAMPLE_RATES]; 96e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const int BandwithCoefTab[8][NUM_SAMPLE_RATES]; 97e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const int rates[8]; 98e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const UWord8 sfBandTotalShort[NUM_SAMPLE_RATES]; 99e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const UWord8 sfBandTotalLong[NUM_SAMPLE_RATES]; 100e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const int sfBandTabShortOffset[NUM_SAMPLE_RATES]; 101e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const short sfBandTabShort[76]; 102e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const int sfBandTabLongOffset[NUM_SAMPLE_RATES]; 103e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const short sfBandTabLong[325]; 104956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong 105956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const Word32 m_log2_table[INT_BITS]; 106956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong 107956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong/* 108956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong TNS 109956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong*/ 110e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const Word32 tnsCoeff3[8]; 111e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const Word32 tnsCoeff3Borders[8]; 112e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const Word32 tnsCoeff4[16]; 113e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const Word32 tnsCoeff4Borders[16]; 114e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const Word32 invSBF[24]; 115e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardextern const Word16 sideInfoTabLong[MAX_SFB_LONG + 1]; 116956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dongextern const Word16 sideInfoTabShort[MAX_SFB_SHORT + 1]; 117956c553ab0ce72f8074ad0fda2ffd66a0305700cJames Dong#endif 118