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_LT_PREDICT_H 21 #define IXHEAACD_LT_PREDICT_H 22 23 #define MAX_SFB 51 24 #define MAX_LTP_SFB 40 25 #define MAX_LTP_SFB_SR_FIVE_PLUS_480 31 26 #define MAX_LTP_SFB_SR_FIVE_480 38 27 #define MAX_LTP_SFB_SR_FIVE_LESS_480 36 28 #define MAX_LTP_SFB_SR_FIVE_PLUS_512 32 29 #define MAX_LTP_SFB_SR_FIVE_512 38 30 #define MAX_LTP_SFB_SR_FIVE_LESS_512 37 31 32 enum { ltp_buffer_size = (4 * 1024) }; 33 34 typedef struct { 35 UWORD8 last_band; 36 UWORD8 data_present; 37 UWORD16 lag; 38 UWORD8 lag_update; 39 UWORD8 coef; 40 UWORD8 long_used[MAX_SFB]; 41 UWORD8 short_used[8]; 42 UWORD8 short_lag_present[8]; 43 UWORD8 short_lag[8]; 44 } ltp_info; 45 46 VOID ixheaacd_init_ltp_object(ltp_info *ltp); 47 48 VOID ixheaacd_lt_update_state(WORD16 *lt_pred_stat, VOID *time, WORD32 *overlap, 49 WORD32 frame_len, WORD32 object_type, 50 WORD32 stride, WORD16 window_sequence, 51 WORD16 *p_window_next, WORD slot_element); 52 53 VOID ixheaacd_filter_bank_ltp(ia_aac_dec_tables_struct *aac_tables_ptr, 54 WORD16 window_sequence, WORD16 win_shape, 55 WORD16 win_shape_prev, WORD32 *in_data, 56 WORD32 *out_mdct, UWORD32 object_type, 57 UWORD32 frame_len); 58 59 #endif /* IXHEAACD_LT_PREDICT_H */ 60