17#define MAX(a,b) (a > b ? a : b)
18#define MIN(a,b) (a < b ? a : b)
20#define FRAME_SIZE (MAX_FRAME_SIZE >> 1)
22#define DCT_LENGTH (MAX_DCT_LENGTH >> 1)
24#define NUM_CATEGORIES 8
26#define REGION_POWER_TABLE_SIZE 64
27#define REGION_POWER_TABLE_NUM_NEGATIVES 24
29#define NUM_CATEGORIZATION_CONTROL_BITS 4
30#define NUM_CATEGORIZATION_CONTROL_POSSIBILITIES 16
32#define MAX_NUM_CATEGORIZATION_CONTROL_BITS 5
33#define MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES 32
38#define NUMBER_OF_REGIONS 14
39#define MAX_NUMBER_OF_REGIONS 28
42#define ESF_ADJUSTMENT_TO_RMS_INDEX (9-2)
44#define MAX_DCT_LENGTH_LOG 7
45#define DCT_LENGTH_LOG 6
49#if defined(G722_1_USE_FIXED_POINT)
53#define DCT_LENGTH_DIV_2 160
54#define DCT_LENGTH_DIV_4 80
55#define DCT_LENGTH_DIV_8 40
56#define DCT_LENGTH_DIV_16 20
57#define DCT_LENGTH_DIV_32 10
58#define DCT_LENGTH_DIV_64 5
60void adjust_abs_region_power_index(int16_t *absolute_region_power_index, int16_t *mlt_coefs, int16_t number_of_regions);
62int16_t samples_to_rmlt_coefs(
const int16_t new_samples[],
67void rmlt_coefs_to_samples(int16_t *coefs,
73void rmlt_coefs_to_samples(int16_t *coefs,
79void categorize(int16_t number_of_available_bits,
80 int16_t number_of_regions,
81 int16_t num_categorization_control_possibilities,
83 int16_t *power_categories,
84 int16_t *category_balances);
86int16_t calc_offset(int16_t *rms_index, int16_t number_of_regions, int16_t available_bits);
88void comp_powercat_and_catbalance(int16_t *power_categories,
89 int16_t *category_balances,
91 int16_t number_of_available_bits,
92 int16_t number_of_regions,
93 int16_t num_categorization_control_possibilities,
96void dct_type_iv_a(int16_t input[], int16_t output[],
int dct_length);
98void dct_type_iv_s(int16_t input[], int16_t output[],
int dct_length);
102#define PI 3.141592653589793238462
104#define ENCODER_SCALE_FACTOR 18318.0f
106#define REGION_SIZE_INVERSE (1.0f/20.0f)
117#define INTEROP_RMLT_SCALE_FACTOR_7 22.0f
118#define INTEROP_RMLT_SCALE_FACTOR_14 33.0f
120void categorize(
int number_of_regions,
121 int number_of_available_bits,
122 int rms_index[MAX_NUMBER_OF_REGIONS],
123 int power_categories[MAX_NUMBER_OF_REGIONS],
124 int category_balances[MAX_NUM_CATEGORIZATION_CONTROL_POSSIBILITIES - 1]);
126void samples_to_rmlt_coefs(
const float new_samples[],
131void rmlt_coefs_to_samples(
float coefs[],
136void dct_type_iv(
float input[],
float output[],
int dct_length);
Definition g722_1/g722_1.h:66