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_SBRDECSETTINGS_H 21 #define IXHEAACD_SBRDECSETTINGS_H 22 23 #define SBR_UPSAMPLE_FAC 2 24 25 #define SBR_UPSAMPLE_IDX_0_0 0 26 #define SBR_UPSAMPLE_IDX_2_1 1 27 #define SBR_UPSAMPLE_IDX_8_3 2 28 #define SBR_UPSAMPLE_IDX_4_1 3 29 30 #define MAX_FRAME_SIZE 1024 31 32 #define QMF_FILTER_STATE_SYN_SIZE 1280 33 #define QMF_FILTER_STATE_ANA_SIZE 320 34 #define NO_SYNTHESIS_CHANNELS 64 35 #define NO_ANALYSIS_CHANNELS (NO_SYNTHESIS_CHANNELS / SBR_UPSAMPLE_FAC) 36 #define NO_POLY (QMF_FILTER_STATE_ANA_SIZE / (2 * NO_ANALYSIS_CHANNELS)) 37 38 #define NO_SYNTHESIS_CHANNELS_DOWN_SAMPLED (NO_SYNTHESIS_CHANNELS / 2) 39 #define QMF_FILTER_STATE_SYN_SIZE_DOWN_SAMPLED (QMF_FILTER_STATE_SYN_SIZE / 2) 40 #define NO_SYN_ANA_CHANNELS (NO_SYNTHESIS_CHANNELS - NO_ANALYSIS_CHANNELS) 41 42 #define CALC_STOP_BAND 43 44 #define MAX_NOISE_ENVELOPES 2 45 #define MAX_NOISE_COEFFS 5 46 #define MAX_NUM_NOISE_VALUES (MAX_NOISE_ENVELOPES * MAX_NOISE_COEFFS) 47 #define MAX_NUM_LIMITERS 12 48 49 #define MAX_ENVELOPES_SBR 5 50 #define MAX_ENVELOPES 8 51 #define MAX_FREQ_COEFFS 56 52 53 #define MAX_FREQ_COEFFS_FS44100 35 54 #define MAX_FREQ_COEFFS_FS48000 32 55 #define MAX_FREQ_COEFFS_SBR 48 56 57 #define MAX_NUM_ELEMENTS 16 58 59 #define SBR_TIME_STEP 2 60 61 #define MAX_NUM_ENVELOPE_VALUES (MAX_ENVELOPES * MAX_FREQ_COEFFS) 62 63 #define MAX_GAIN_EXP 34 64 65 #define LPC_ORDER 2 66 67 #define MAX_INVF_BANDS MAX_NOISE_COEFFS 68 69 #define MAX_COLS (MAX_FRAME_SIZE / NO_ANALYSIS_CHANNELS) 70 #define MAX_OV_COLS 6 71 #define MAX_ENV_COLS (MAX_COLS + MAX_OV_COLS) 72 73 #define MAX_ENV_COLS_960 (30 + MAX_OV_COLS) 74 75 #define SBR_FREQ_SCALE_DEFAULT 2 76 #define SBR_ALTER_SCALE_DEFAULT 1 77 #define SBR_NOISE_BANDS_DEFAULT 2 78 79 #define SBR_LIMITER_BANDS_DEFAULT 2 80 #define SBR_LIMITER_GAINS_DEFAULT 2 81 #define SBR_INTERPOL_FREQ_DEFAULT 1 82 #define SBR_SMOOTHING_LENGTH_DEFAULT 1 83 84 #define SBR_TIME_SLOTS (MAX_COLS / SBR_TIME_STEP) 85 #define SBR_OV_SLOTS (MAX_OV_COLS / SBR_TIME_STEP) 86 87 #endif 88