xref: /aosp_15_r20/external/libxaac/encoder/ixheaace_adjust_threshold_data.h (revision 15dc779a375ca8b5125643b829a8aa4b70d7f451)
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 typedef struct {
23   UWORD8 modify_min_snr;
24   WORD32 start_sfb_long;
25   WORD32 start_sfb_short;
26 } ia_ah_param_struct;
27 
28 typedef struct {
29   FLOAT32 max_red;
30   FLOAT32 start_ratio;
31   FLOAT32 max_ratio;
32   FLOAT32 red_ratio_fac;
33   FLOAT32 red_offs;
34 } ia_min_snr_adapt_param_struct;
35 
36 typedef struct {
37   FLOAT32 clip_save_low;
38   FLOAT32 clip_save_high;
39   FLOAT32 min_bit_save;
40   FLOAT32 max_bit_save;
41   FLOAT32 clip_spend_low;
42   FLOAT32 clip_spend_high;
43   FLOAT32 min_bits_spend;
44   FLOAT32 max_bits_spend;
45 } ia_bitres_param_struct;
46 
47 typedef struct {
48   FLOAT32 pe_min;
49   FLOAT32 pe_max;
50   FLOAT32 pe_offset;
51   ia_ah_param_struct str_ah_param;
52   ia_min_snr_adapt_param_struct str_min_snr_adapt_params;
53   FLOAT32 pe_last;
54   WORD32 dyn_bits_last;
55   FLOAT32 pe_correction_fac;
56 } ia_adj_thr_elem_struct;
57 
58 typedef struct {
59   ia_bitres_param_struct str_bitres_params_long;
60   ia_bitres_param_struct str_bitres_params_short;
61   ia_adj_thr_elem_struct str_adj_thr_ele;
62 } ia_adj_thr_state_struct;
63