• 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 
27 enum { ltp_buffer_size = (4 * 1024) };
28 
29 typedef struct {
30   UWORD8 last_band;
31   UWORD8 data_present;
32   UWORD16 lag;
33   UWORD8 lag_update;
34   UWORD8 coef;
35   UWORD8 long_used[MAX_SFB];
36   UWORD8 short_used[8];
37   UWORD8 short_lag_present[8];
38   UWORD8 short_lag[8];
39 } ltp_info;
40 
41 VOID ixheaacd_init_ltp_object(ltp_info *ltp);
42 
43 VOID ixheaacd_lt_update_state(WORD16 *lt_pred_stat, WORD16 *time,
44                               WORD32 *overlap, WORD32 frame_len,
45                               WORD32 object_type, WORD32 stride,
46                               WORD16 window_sequence, WORD16 *p_window_next);
47 
48 VOID ixheaacd_filter_bank_ltp(ia_aac_dec_tables_struct *aac_tables_ptr,
49                               WORD16 window_sequence, WORD16 win_shape,
50                               WORD16 win_shape_prev, WORD32 *in_data,
51                               WORD32 *out_mdct, UWORD32 object_type,
52                               UWORD32 frame_len);
53 
54 #endif
55