1 /****************************************************************************** 2 * 3 * Copyright 1999-2012 Broadcom Corporation 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ******************************************************************************/ 18 19 /****************************************************************************** 20 * 21 * This file contains the coefficient table used for DCT computation in 22 * analysis. 23 * 24 ******************************************************************************/ 25 26 #include "sbc_encoder.h" 27 /*DCT coeff for 4 sub-band case.*/ 28 #if (SBC_FAST_DCT == FALSE) 29 const int16_t gas16AnalDCTcoeff4[] = { 30 (int16_t)(0.7071 * 32768), (int16_t)(0.9239 * 32768), 31 (int16_t)(1.0000 * 32767), (int16_t)(0.9239 * 32768), 32 (int16_t)(0.7071 * 32768), (int16_t)(0.3827 * 32768), 33 (int16_t)(0.0000 * 32768), (int16_t)(-0.3827 * 32768), 34 35 (int16_t)(-0.7071 * 32768), (int16_t)(0.3827 * 32768), 36 (int16_t)(1.0000 * 32767), (int16_t)(0.3827 * 32768), 37 (int16_t)(-0.7071 * 32768), (int16_t)(-0.9239 * 32768), 38 (int16_t)(-0.0000 * 32768), (int16_t)(0.9239 * 32768), 39 40 (int16_t)(-0.7071 * 32768), (int16_t)(-0.3827 * 32768), 41 (int16_t)(1.0000 * 32767), (int16_t)(-0.3827 * 32768), 42 (int16_t)(-0.7071 * 32768), (int16_t)(0.9239 * 32768), 43 (int16_t)(0.0000 * 32768), (int16_t)(-0.9239 * 32768), 44 45 (int16_t)(0.7071 * 32768), (int16_t)(-0.9239 * 32768), 46 (int16_t)(1.0000 * 32767), (int16_t)(-0.9239 * 32768), 47 (int16_t)(0.7071 * 32768), (int16_t)(-0.3827 * 32768), 48 (int16_t)(-0.0000 * 32768), (int16_t)(0.3827 * 32768)}; 49 50 /*DCT coeff for 8 sub-band case.*/ 51 const int16_t gas16AnalDCTcoeff8[] = { 52 (int16_t)(0.7071 * 32768), (int16_t)(0.8315 * 32768), 53 (int16_t)(0.9239 * 32768), (int16_t)(0.9808 * 32768), 54 (int16_t)(1.0000 * 32767), (int16_t)(0.9808 * 32768), 55 (int16_t)(0.9239 * 32768), (int16_t)(0.8315 * 32768), 56 (int16_t)(0.7071 * 32768), (int16_t)(0.5556 * 32768), 57 (int16_t)(0.3827 * 32768), (int16_t)(0.1951 * 32768), 58 (int16_t)(0.0000 * 32768), (int16_t)(-0.1951 * 32768), 59 (int16_t)(-0.3827 * 32768), (int16_t)(-0.5556 * 32768), 60 (int16_t)(-0.7071 * 32768), (int16_t)(-0.1951 * 32768), 61 (int16_t)(0.3827 * 32768), (int16_t)(0.8315 * 32768), 62 (int16_t)(1.0000 * 32767), (int16_t)(0.8315 * 32768), 63 (int16_t)(0.3827 * 32768), (int16_t)(-0.1951 * 32768), 64 (int16_t)(-0.7071 * 32768), (int16_t)(-0.9808 * 32768), 65 (int16_t)(-0.9239 * 32768), (int16_t)(-0.5556 * 32768), 66 (int16_t)(-0.0000 * 32768), (int16_t)(0.5556 * 32768), 67 (int16_t)(0.9239 * 32768), (int16_t)(0.9808 * 32768), 68 (int16_t)(-0.7071 * 32768), (int16_t)(-0.9808 * 32768), 69 (int16_t)(-0.3827 * 32768), (int16_t)(0.5556 * 32768), 70 (int16_t)(1.0000 * 32767), (int16_t)(0.5556 * 32768), 71 (int16_t)(-0.3827 * 32768), (int16_t)(-0.9808 * 32768), 72 (int16_t)(-0.7071 * 32768), (int16_t)(0.1951 * 32768), 73 (int16_t)(0.9239 * 32768), (int16_t)(0.8315 * 32768), 74 (int16_t)(0.0000 * 32768), (int16_t)(-0.8315 * 32768), 75 (int16_t)(-0.9239 * 32768), (int16_t)(-0.1951 * 32768), 76 (int16_t)(0.7071 * 32768), (int16_t)(-0.5556 * 32768), 77 (int16_t)(-0.9239 * 32768), (int16_t)(0.1951 * 32768), 78 (int16_t)(1.0000 * 32767), (int16_t)(0.1951 * 32768), 79 (int16_t)(-0.9239 * 32768), (int16_t)(-0.5556 * 32768), 80 (int16_t)(0.7071 * 32768), (int16_t)(0.8315 * 32768), 81 (int16_t)(-0.3827 * 32768), (int16_t)(-0.9808 * 32768), 82 (int16_t)(-0.0000 * 32768), (int16_t)(0.9808 * 32768), 83 (int16_t)(0.3827 * 32768), (int16_t)(-0.8315 * 32768), 84 (int16_t)(0.7071 * 32768), (int16_t)(0.5556 * 32768), 85 (int16_t)(-0.9239 * 32768), (int16_t)(-0.1951 * 32768), 86 (int16_t)(1.0000 * 32767), (int16_t)(-0.1951 * 32768), 87 (int16_t)(-0.9239 * 32768), (int16_t)(0.5556 * 32768), 88 (int16_t)(0.7071 * 32768), (int16_t)(-0.8315 * 32768), 89 (int16_t)(-0.3827 * 32768), (int16_t)(0.9808 * 32768), 90 (int16_t)(0.0000 * 32768), (int16_t)(-0.9808 * 32768), 91 (int16_t)(0.3827 * 32768), (int16_t)(0.8315 * 32768), 92 (int16_t)(-0.7071 * 32768), (int16_t)(0.9808 * 32768), 93 (int16_t)(-0.3827 * 32768), (int16_t)(-0.5556 * 32768), 94 (int16_t)(1.0000 * 32767), (int16_t)(-0.5556 * 32768), 95 (int16_t)(-0.3827 * 32768), (int16_t)(0.9808 * 32768), 96 (int16_t)(-0.7071 * 32768), (int16_t)(-0.1951 * 32768), 97 (int16_t)(0.9239 * 32768), (int16_t)(-0.8315 * 32768), 98 (int16_t)(-0.0000 * 32768), (int16_t)(0.8315 * 32768), 99 (int16_t)(-0.9239 * 32768), (int16_t)(0.1951 * 32768), 100 (int16_t)(-0.7071 * 32768), (int16_t)(0.1951 * 32768), 101 (int16_t)(0.3827 * 32768), (int16_t)(-0.8315 * 32768), 102 (int16_t)(1.0000 * 32767), (int16_t)(-0.8315 * 32768), 103 (int16_t)(0.3827 * 32768), (int16_t)(0.1951 * 32768), 104 (int16_t)(-0.7071 * 32768), (int16_t)(0.9808 * 32768), 105 (int16_t)(-0.9239 * 32768), (int16_t)(0.5556 * 32768), 106 (int16_t)(-0.0000 * 32768), (int16_t)(-0.5556 * 32768), 107 (int16_t)(0.9239 * 32768), (int16_t)(-0.9808 * 32768), 108 (int16_t)(0.7071 * 32768), (int16_t)(-0.8315 * 32768), 109 (int16_t)(0.9239 * 32768), (int16_t)(-0.9808 * 32768), 110 (int16_t)(1.0000 * 32767), (int16_t)(-0.9808 * 32768), 111 (int16_t)(0.9239 * 32768), (int16_t)(-0.8315 * 32768), 112 (int16_t)(0.7071 * 32768), (int16_t)(-0.5556 * 32768), 113 (int16_t)(0.3827 * 32768), (int16_t)(-0.1951 * 32768), 114 (int16_t)(-0.0000 * 32768), (int16_t)(0.1951 * 32768), 115 (int16_t)(-0.3827 * 32768), (int16_t)(0.5556 * 32768)}; 116 #endif 117