1 /****************************************************************************** 2 * * 3 * Copyright (C) 2018 The Android Open Source Project 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 * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore 19 */ 20 #ifndef IXHEAACD_CNST_H 21 #define IXHEAACD_CNST_H 22 23 #define MAX_ELEMENTS 68 24 25 #define LEN_SUPERFRAME 1024 26 #define LEN_FRAME 256 27 #define NUM_FRAMES 4 28 #define MAX_NUM_SUBFR 4 29 30 #define ORDER 16 31 #define ORDER_BY_2 (ORDER / 2) 32 33 #define FAC_LENGTH 128 34 35 #define NUM_SUBFR_SUPERFRAME 16 36 #define NUM_SUBFR_SUPERFRAME_BY2 (NUM_SUBFR_SUPERFRAME / 2) 37 #define SYNTH_DELAY_LMAX ((NUM_SUBFR_SUPERFRAME_BY2 - 1) * LEN_SUBFR) 38 39 #define FSCALE_DENOM 12800 40 #define FAC_FSCALE_MAX 24000 41 #define FAC_FSCALE_MIN 6000 42 43 #define FILTER_DELAY 12 44 45 #define TMIN 34 46 #define TFR2 (162 - TMIN) 47 #define TFR1 160 48 #define TMAX (27 + 6 * TMIN) 49 50 #define UP_SAMP 4 51 #define INTER_LP_FIL_ORDER 16 52 #define INTER_LP_FIL_LEN (UP_SAMP * INTER_LP_FIL_ORDER + 1) 53 54 #define MAX_PITCH \ 55 (TMAX + \ 56 (6 * \ 57 ((((FAC_FSCALE_MAX * TMIN) + (FSCALE_DENOM / 2)) / FSCALE_DENOM) - TMIN))) 58 59 #define PI 3.14159265358979323846264338327950288 60 61 #define PREEMPH_FILT_FAC 0.68f 62 #define PREEMPH_FAC_FIX 44564 63 64 #define IGAMMA1 1975684956 65 66 #define TILT_CODE 0.3f 67 68 #define BLOCK_LEN_LONG 1024 69 #define BLOCK_LEN_SHORT 128 70 #define BLOCK_LEN_LONG_S 960 71 #define BLOCK_LEN_SHORT_S 120 72 73 #define WIN_LEN_1024 1024 74 #define WIN_LEN_768 768 75 #define WIN_LEN_512 512 76 #define WIN_LEN_192 192 77 #define WIN_LEN_128 128 78 #define WIN_LEN_960 960 79 #define WIN_LEN_480 480 80 #define WIN_LEN_256 256 81 #define WIN_LEN_120 120 82 #define WIN_LEN_96 96 83 #define WIN_LEN_64 64 84 #define WIN_LEN_48 48 85 #define WIN_LEN_16 16 86 #define WIN_LEN_4 4 87 88 #define TW_IPLEN2S 12 89 #define TW_OS_FACTOR_WIN 16 90 91 #define WIN_SEL_0 0 92 #define WIN_SEL_1 1 93 #define WIN_SEL_2 2 94 95 #define NUM_TW_NODES 16 96 97 #define CORE_MODE_FD 0 98 #define CORE_MODE_LPD 1 99 100 #define ONLY_LONG_SEQUENCE 0 101 #define LONG_START_SEQUENCE 1 102 #define EIGHT_SHORT_SEQUENCE 2 103 #define LONG_STOP_SEQUENCE 3 104 #define STOP_START_SEQUENCE 4 105 #define NUM_WIN_SEQ 5 106 107 #define NSFB_SHORT 16 108 #define MAX_SHORT_IN_LONG_BLOCK 8 109 #define MAX_SHORT_WINDOWS 8 110 111 #define MAX_NUM_CHANNELS 6 112 #define MAX_NUM_CHANNELS_USAC_LVL2 2 113 114 #define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK) 115 116 #define MAX_31 (WORD32)0x3FFFFFFF 117 #define MIN_31 (WORD32)0xC0000000 118 #define LEN_SUBFR 64 119 120 #define SFB_PER_PRED_BAND 2 121 122 #endif /* IXHEAACD_CNST_H */ 123