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