1 /****************************************************************************** 2 * * 3 * Copyright (C) 2023 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 #pragma once 22 struct ixheaace_mps_frame_win { 23 WORD32 num_time_slots_max; 24 WORD32 frame_keep_flag; 25 WORD32 start_slope; 26 WORD32 stop_slope; 27 WORD32 start_rect; 28 WORD32 stop_rect; 29 30 WORD32 taper_ana_len; 31 WORD32 taper_syn_len; 32 33 FLOAT32 p_taper_ana_flt[MAX_TIME_SLOTS]; 34 FLOAT32 p_tapper_sync_flt[MAX_TIME_SLOTS]; 35 }; 36 37 struct ixheaace_mps_frame_win_config { 38 WORD32 num_time_slots_max; 39 WORD32 frame_keep_flag; 40 }; 41 42 typedef struct { 43 WORD32 slot; 44 WORD32 hold; 45 46 } ixheaace_mps_frame_win_data; 47 48 struct ixheaace_mps_frame_win_list { 49 ixheaace_mps_frame_win_data dat[MAX_NUM_PARAMS]; 50 WORD32 win_list_cnt; 51 }; 52 53 typedef struct ixheaace_mps_frame_win ixheaace_mps_frame_win, *ixheaace_mps_pstr_frame_win; 54 55 typedef struct ixheaace_mps_frame_win_config ixheaace_mps_frame_win_config, 56 *ixheaace_mps_pstr_frame_win_config; 57 58 typedef struct ixheaace_mps_frame_win_list ixheaace_mps_frame_win_list, 59 *ixheaace_mps_pstr_frame_win_list; 60 61 IA_ERRORCODE ixheaace_mps_212_frame_window_init( 62 ixheaace_mps_pstr_frame_win pstr_frame_window, 63 const ixheaace_mps_pstr_frame_win_config pstr_frame_window_config); 64 65 IA_ERRORCODE ixheaace_mps_212_frame_window_get_window( 66 ixheaace_mps_pstr_frame_win pstr_frame_window, WORD32 tr_pos[MAX_NUM_PARAMS], 67 const WORD32 time_slots, ixheaace_mps_framing_info *const pstr_framing_info, 68 FLOAT32 *p_window_ana_mps[MAX_NUM_PARAMS], 69 ixheaace_mps_pstr_frame_win_list const p_frame_win_list, const WORD32 avoid_keep); 70 71 VOID ixheaace_mps_212_analysis_windowing( 72 const WORD32 num_time_slots, const WORD32 start_time_slot, FLOAT32 *p_frame_window_ana_mps, 73 ixheaace_cmplx_str pp_cmplx_data_in[MAX_ANA_TIME_SLOT][MAX_QMF_BANDS], 74 ixheaace_cmplx_str pp_cmplx_data_out[MAX_ANA_TIME_SLOT][MAX_QMF_BANDS], 75 const WORD32 num_hybrid_bands); 76