Restructuring of Decoder
This commit is contained in:
parent
7fd0b9fdfd
commit
ae104f0711
172 changed files with 5545 additions and 5788 deletions
|
|
@ -31,11 +31,15 @@ cc_library_static {
|
|||
],
|
||||
|
||||
export_include_dirs: [
|
||||
"common",
|
||||
"decoder",
|
||||
"decoder/drc_src",
|
||||
],
|
||||
|
||||
srcs: [
|
||||
"common/ixheaac_esbr_fft.c",
|
||||
"common/ixheaac_esbr_rom.c",
|
||||
"common/ixheaac_fft_ifft_32x32_rom.c",
|
||||
"decoder/ixheaacd_aacdecoder.c",
|
||||
"decoder/ixheaacd_aacpluscheck.c",
|
||||
"decoder/ixheaacd_aac_ec.c",
|
||||
|
|
@ -68,13 +72,10 @@ cc_library_static {
|
|||
"decoder/ixheaacd_env_dec.c",
|
||||
"decoder/ixheaacd_env_extr.c",
|
||||
"decoder/ixheaacd_esbr_envcal.c",
|
||||
"decoder/ixheaacd_esbr_fft.c",
|
||||
"decoder/ixheaacd_esbr_polyphase.c",
|
||||
"decoder/ixheaacd_esbr_rom.c",
|
||||
"decoder/ixheaacd_ext_ch_ele.c",
|
||||
"decoder/ixheaacd_fft.c",
|
||||
"decoder/ixheaacd_fft_ifft_32x32.c",
|
||||
"decoder/ixheaacd_fft_ifft_32x32_rom.c",
|
||||
"decoder/ixheaacd_freq_sca.c",
|
||||
"decoder/ixheaacd_fwd_alias_cnx.c",
|
||||
"decoder/ixheaacd_hbe_dft_trans.c",
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ if(NOT COMPILER_HAS_SANITIZER)
|
|||
libxaac_set_link_libraries()
|
||||
endif()
|
||||
|
||||
include("${XAAC_ROOT}/common/common.cmake")
|
||||
include("${XAAC_ROOT}/decoder/libxaacdec.cmake")
|
||||
include("${XAAC_ROOT}/test/xaacdec.cmake")
|
||||
include("${XAAC_ROOT}/test/decoder/xaacdec.cmake")
|
||||
include("${XAAC_ROOT}/fuzzer/xaac_dec_fuzzer.cmake")
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ into better quality at lower bit-rates.
|
|||
|
||||
## Files to be included are
|
||||
* [`ixheaacd_apicmd_standards.h`](decoder/ixheaacd_apicmd_standards.h)
|
||||
* [`ixheaacd_type_def.h`](decoder/ixheaacd_type_def.h)
|
||||
* [`ixheaac_type_def.h`](common/ixheaac_type_def.h)
|
||||
* [`ixheaacd_memory_standards.h`](decoder/ixheaacd_memory_standards.h)
|
||||
* [`ixheaacd_error_standards.h`](decoder/ixheaacd_error_standards.h)
|
||||
* [`ixheaac_error_standards.h`](common/ixheaac_error_standards.h)
|
||||
* [`ixheaacd_error_handler.h`](decoder/ixheaacd_error_handler.h)
|
||||
* [`ixheaacd_aac_config.h`](decoder/ixheaacd_aac_config.h)
|
||||
|
||||
|
|
|
|||
9
common/common.cmake
Normal file
9
common/common.cmake
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# src files
|
||||
list(
|
||||
APPEND
|
||||
LIBXAAC_COMMON_SRCS
|
||||
"${XAAC_ROOT}/common/ixheaac_esbr_fft.c"
|
||||
"${XAAC_ROOT}/common/ixheaac_esbr_rom.c"
|
||||
"${XAAC_ROOT}/common/ixheaac_fft_ifft_32x32_rom.c")
|
||||
|
||||
include_directories(${XAAC_ROOT}/common)
|
||||
|
|
@ -17,11 +17,11 @@
|
|||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#ifndef IXHEAACD_BASIC_OP_H
|
||||
#define IXHEAACD_BASIC_OP_H
|
||||
#ifndef IXHEAAC_BASIC_OP_H
|
||||
#define IXHEAAC_BASIC_OP_H
|
||||
|
||||
#define add_d(a, b) ((a) + (b))
|
||||
#define sub_d(a, b) ((a) - (b))
|
||||
#define ixheaacd_cbrt_calc(a) cbrt(1.0f / a)
|
||||
#define ixheaac_cbrt_calc(a) cbrt(1.0f / a)
|
||||
|
||||
#endif
|
||||
#endif /* IXHEAAC_BASIC_OP_H */
|
||||
|
|
@ -17,38 +17,38 @@
|
|||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#ifndef IXHEAACD_BASIC_OPS_H
|
||||
#define IXHEAACD_BASIC_OPS_H
|
||||
#ifndef IXHEAAC_BASIC_OPS_H
|
||||
#define IXHEAAC_BASIC_OPS_H
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_extract16h(WORD32 var) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_extract16h(WORD32 var) {
|
||||
WORD16 var_out;
|
||||
|
||||
var_out = (WORD16)(var >> 16);
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_extract16l(WORD32 var) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_extract16l(WORD32 var) {
|
||||
WORD16 var_out;
|
||||
|
||||
var_out = (WORD16)var;
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_deposit16h_in32(WORD16 var) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_deposit16h_in32(WORD16 var) {
|
||||
WORD32 var_out;
|
||||
|
||||
var_out = (WORD32)var << 16;
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_deposit16l_in32(WORD16 var) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_deposit16l_in32(WORD16 var) {
|
||||
WORD32 var_out;
|
||||
|
||||
var_out = (WORD32)var;
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE UWORD32 ixheaacd_extu(UWORD32 a, WORD32 shift_left,
|
||||
static PLATFORM_INLINE UWORD32 ixheaac_extu(UWORD32 a, WORD32 shift_left,
|
||||
WORD32 shift_right) {
|
||||
UWORD32 x;
|
||||
x = (UWORD32)a << shift_left;
|
||||
|
|
@ -57,20 +57,20 @@ static PLATFORM_INLINE UWORD32 ixheaacd_extu(UWORD32 a, WORD32 shift_left,
|
|||
return x;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mult32x16h_in32_shl_sat(WORD32 a,
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mult32x16h_in32_shl_sat(WORD32 a,
|
||||
WORD32 b) {
|
||||
WORD32 result;
|
||||
|
||||
if (a == (WORD32)0x80000000 && b == (WORD16)0x8000) {
|
||||
result = (WORD32)0x7fffffff;
|
||||
} else {
|
||||
result = ixheaacd_mult32x16in32_shl(a, ixheaacd_extract16h(b));
|
||||
result = ixheaac_mult32x16in32_shl(a, ixheaac_extract16h(b));
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_div32_pos_normb(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_div32_pos_normb(WORD32 a, WORD32 b) {
|
||||
WORD32 quotient;
|
||||
UWORD32 mantissa_nr = a;
|
||||
UWORD32 mantissa_dr = b;
|
||||
|
|
@ -97,41 +97,41 @@ static PLATFORM_INLINE WORD32 ixheaacd_div32_pos_normb(WORD32 a, WORD32 b) {
|
|||
return quotient;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_shr32_dir_sat_limit(WORD32 a, WORD b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_shr32_dir_sat_limit(WORD32 a, WORD b) {
|
||||
WORD32 out_val;
|
||||
|
||||
if (b < 0) {
|
||||
out_val = ixheaacd_shl32_sat(a, -b);
|
||||
out_val = ixheaac_shl32_sat(a, -b);
|
||||
} else {
|
||||
b = ixheaacd_min32(b, 31);
|
||||
out_val = ixheaacd_shr32(a, b);
|
||||
b = ixheaac_min32(b, 31);
|
||||
out_val = ixheaac_shr32(a, b);
|
||||
}
|
||||
|
||||
return out_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_shl32_dir_sat_limit(WORD32 a, WORD b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat_limit(WORD32 a, WORD b) {
|
||||
WORD32 out_val;
|
||||
|
||||
if (b < 0) {
|
||||
b = -b;
|
||||
b = ixheaacd_min32(b, 31);
|
||||
out_val = ixheaacd_shr32(a, b);
|
||||
b = ixheaac_min32(b, 31);
|
||||
out_val = ixheaac_shr32(a, b);
|
||||
} else {
|
||||
out_val = ixheaacd_shl32_sat(a, b);
|
||||
out_val = ixheaac_shl32_sat(a, b);
|
||||
}
|
||||
|
||||
return out_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD64 ixheaacd_mac32x32in64_dual(WORD32 a, WORD32 b,
|
||||
static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64_dual(WORD32 a, WORD32 b,
|
||||
WORD64 c) {
|
||||
WORD64 result;
|
||||
WORD64 temp_result;
|
||||
|
||||
temp_result = (WORD64)a * (WORD64)b;
|
||||
result = ixheaacd_add64_sat(c, temp_result);
|
||||
result = ixheaac_add64_sat(c, temp_result);
|
||||
return (result);
|
||||
}
|
||||
|
||||
#endif /* IXHEAACD_BASIC_OPS_H */
|
||||
#endif /* IXHEAAC_BASIC_OPS_H */
|
||||
|
|
@ -17,10 +17,10 @@
|
|||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#ifndef IXHEAACD_BASIC_OPS16_H
|
||||
#define IXHEAACD_BASIC_OPS16_H
|
||||
#ifndef IXHEAAC_BASIC_OPS16_H
|
||||
#define IXHEAAC_BASIC_OPS16_H
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_sat16(WORD32 op1) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_sat16(WORD32 op1) {
|
||||
WORD16 var_out;
|
||||
|
||||
if (op1 > 0X00007fffL) {
|
||||
|
|
@ -33,69 +33,69 @@ static PLATFORM_INLINE WORD16 ixheaacd_sat16(WORD32 op1) {
|
|||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_add16(WORD16 op1, WORD16 op2) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_add16(WORD16 op1, WORD16 op2) {
|
||||
WORD16 var_out;
|
||||
|
||||
var_out = ((WORD16)(op1 + op2));
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_add16_sat(WORD16 op1, WORD16 op2) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_add16_sat(WORD16 op1, WORD16 op2) {
|
||||
WORD16 var_out;
|
||||
WORD32 sum;
|
||||
|
||||
sum = (WORD32)op1 + (WORD32)op2;
|
||||
var_out = ixheaacd_sat16(sum);
|
||||
var_out = ixheaac_sat16(sum);
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_sub16(WORD16 op1, WORD16 op2) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_sub16(WORD16 op1, WORD16 op2) {
|
||||
WORD16 var_out;
|
||||
|
||||
var_out = ((WORD16)(op1 - op2));
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_sub16_sat(WORD16 op1, WORD16 op2) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_sub16_sat(WORD16 op1, WORD16 op2) {
|
||||
WORD16 var_out;
|
||||
WORD32 diff;
|
||||
|
||||
diff = (WORD32)op1 - op2;
|
||||
var_out = ixheaacd_sat16(diff);
|
||||
var_out = ixheaac_sat16(diff);
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_mult16(WORD16 op1, WORD16 op2) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_mult16(WORD16 op1, WORD16 op2) {
|
||||
WORD16 var_out;
|
||||
|
||||
var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 16));
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_mult16_shl(WORD16 op1, WORD16 op2) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_mult16_shl(WORD16 op1, WORD16 op2) {
|
||||
WORD16 var_out;
|
||||
|
||||
var_out = ((WORD16)(((WORD32)op1 * (WORD32)op2) >> 15));
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_mult16_shl_sat(WORD16 op1, WORD16 op2) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_mult16_shl_sat(WORD16 op1, WORD16 op2) {
|
||||
WORD16 var_out;
|
||||
WORD32 temp;
|
||||
|
||||
temp = ((WORD32)(((WORD32)op1 * (WORD32)op2) >> 15));
|
||||
var_out = ixheaacd_sat16(temp);
|
||||
var_out = ixheaac_sat16(temp);
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_shl16(WORD16 op1, WORD16 shift) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_shl16(WORD16 op1, WORD16 shift) {
|
||||
WORD16 var_out;
|
||||
|
||||
var_out = (WORD16)(op1 << shift);
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_shl16_sat(WORD16 op1, WORD16 shift) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_shl16_sat(WORD16 op1, WORD16 shift) {
|
||||
WORD16 var_out;
|
||||
WORD32 temp;
|
||||
|
||||
|
|
@ -103,60 +103,60 @@ static PLATFORM_INLINE WORD16 ixheaacd_shl16_sat(WORD16 op1, WORD16 shift) {
|
|||
shift = 15;
|
||||
}
|
||||
temp = (WORD32)(op1 << shift);
|
||||
var_out = ixheaacd_sat16(temp);
|
||||
var_out = ixheaac_sat16(temp);
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_shr16(WORD16 op1, WORD16 shift) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_shr16(WORD16 op1, WORD16 shift) {
|
||||
WORD16 var_out;
|
||||
|
||||
var_out = ((WORD16)(op1 >> shift));
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_shl16_dir(WORD16 op1, WORD16 shift) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_shl16_dir(WORD16 op1, WORD16 shift) {
|
||||
WORD16 var_out;
|
||||
if (shift > 0) {
|
||||
var_out = ixheaacd_shl16(op1, shift);
|
||||
var_out = ixheaac_shl16(op1, shift);
|
||||
} else {
|
||||
var_out = ixheaacd_shr16(op1, (WORD16)(-shift));
|
||||
var_out = ixheaac_shr16(op1, (WORD16)(-shift));
|
||||
}
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_shr16_dir(WORD16 op1, WORD16 shift) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_shr16_dir(WORD16 op1, WORD16 shift) {
|
||||
WORD16 var_out;
|
||||
|
||||
if (shift < 0) {
|
||||
var_out = ixheaacd_shl16(op1, (WORD16)(-shift));
|
||||
var_out = ixheaac_shl16(op1, (WORD16)(-shift));
|
||||
} else {
|
||||
var_out = ixheaacd_shr16(op1, shift);
|
||||
var_out = ixheaac_shr16(op1, shift);
|
||||
}
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_shl16_dir_sat(WORD16 op1, WORD16 shift) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_shl16_dir_sat(WORD16 op1, WORD16 shift) {
|
||||
WORD16 var_out;
|
||||
if (shift > 0) {
|
||||
var_out = ixheaacd_shl16_sat(op1, shift);
|
||||
var_out = ixheaac_shl16_sat(op1, shift);
|
||||
} else {
|
||||
var_out = ixheaacd_shr16(op1, (WORD16)(-shift));
|
||||
var_out = ixheaac_shr16(op1, (WORD16)(-shift));
|
||||
}
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_shr16_dir_sat(WORD16 op1, WORD16 shift) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_shr16_dir_sat(WORD16 op1, WORD16 shift) {
|
||||
WORD16 var_out;
|
||||
|
||||
if (shift < 0) {
|
||||
var_out = ixheaacd_shl16_sat(op1, (WORD16)(-shift));
|
||||
var_out = ixheaac_shl16_sat(op1, (WORD16)(-shift));
|
||||
} else {
|
||||
var_out = ixheaacd_shr16(op1, shift);
|
||||
var_out = ixheaac_shr16(op1, shift);
|
||||
}
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_norm16(WORD16 op1) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_norm16(WORD16 op1) {
|
||||
WORD16 var_out;
|
||||
|
||||
if (0 == op1) {
|
||||
|
|
@ -177,7 +177,7 @@ static PLATFORM_INLINE WORD16 ixheaacd_norm16(WORD16 op1) {
|
|||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_abs16(WORD16 op1) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_abs16(WORD16 op1) {
|
||||
WORD16 var_out;
|
||||
|
||||
if (op1 < 0) {
|
||||
|
|
@ -188,7 +188,7 @@ static PLATFORM_INLINE WORD16 ixheaacd_abs16(WORD16 op1) {
|
|||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_abs16_sat(WORD16 op1) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_abs16_sat(WORD16 op1) {
|
||||
WORD16 var_out;
|
||||
|
||||
if (-32768 == op1) {
|
||||
|
|
@ -203,7 +203,7 @@ static PLATFORM_INLINE WORD16 ixheaacd_abs16_sat(WORD16 op1) {
|
|||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_negate16(WORD16 op1) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_negate16(WORD16 op1) {
|
||||
WORD16 var_out;
|
||||
|
||||
if (-32768 == op1) {
|
||||
|
|
@ -214,24 +214,24 @@ static PLATFORM_INLINE WORD16 ixheaacd_negate16(WORD16 op1) {
|
|||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_min16(WORD16 op1, WORD16 op2) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_min16(WORD16 op1, WORD16 op2) {
|
||||
WORD16 var_out;
|
||||
|
||||
var_out = op1 < op2 ? op1 : op2;
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_max16(WORD16 op1, WORD16 op2) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_max16(WORD16 op1, WORD16 op2) {
|
||||
WORD16 var_out;
|
||||
|
||||
var_out = op1 > op2 ? op1 : op2;
|
||||
return (var_out);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 ixheaacd_round16(WORD32 op1) {
|
||||
static PLATFORM_INLINE WORD16 ixheaac_round16(WORD32 op1) {
|
||||
WORD16 var_out;
|
||||
|
||||
var_out = (WORD16)(ixheaacd_add32_sat(op1, 0x8000) >> 16);
|
||||
var_out = (WORD16)(ixheaac_add32_sat(op1, 0x8000) >> 16);
|
||||
return (var_out);
|
||||
}
|
||||
#endif
|
||||
#endif /* IXHEAAC_BASIC_OPS16_H */
|
||||
|
|
@ -17,10 +17,10 @@
|
|||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#ifndef IXHEAACD_BASIC_OPS32_H
|
||||
#define IXHEAACD_BASIC_OPS32_H
|
||||
#ifndef IXHEAAC_BASIC_OPS32_H
|
||||
#define IXHEAAC_BASIC_OPS32_H
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_min32(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_min32(WORD32 a, WORD32 b) {
|
||||
WORD32 min_val;
|
||||
|
||||
min_val = (a < b) ? a : b;
|
||||
|
|
@ -28,7 +28,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_min32(WORD32 a, WORD32 b) {
|
|||
return min_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_max32(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_max32(WORD32 a, WORD32 b) {
|
||||
WORD32 max_val;
|
||||
|
||||
max_val = (a > b) ? a : b;
|
||||
|
|
@ -36,7 +36,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_max32(WORD32 a, WORD32 b) {
|
|||
return max_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_shl32(WORD32 a, WORD b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_shl32(WORD32 a, WORD b) {
|
||||
WORD32 out_val;
|
||||
|
||||
b = ((UWORD32)(b << 24) >> 24);
|
||||
|
|
@ -48,7 +48,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_shl32(WORD32 a, WORD b) {
|
|||
return out_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_shr32(WORD32 a, WORD b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_shr32(WORD32 a, WORD b) {
|
||||
WORD32 out_val;
|
||||
|
||||
b = ((UWORD32)(b << 24) >> 24);
|
||||
|
|
@ -64,7 +64,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_shr32(WORD32 a, WORD b) {
|
|||
return out_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_shl32_sat(WORD32 a, WORD b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_shl32_sat(WORD32 a, WORD b) {
|
||||
WORD32 out_val;
|
||||
if (a > (MAX_32 >> b))
|
||||
out_val = MAX_32;
|
||||
|
|
@ -75,55 +75,55 @@ static PLATFORM_INLINE WORD32 ixheaacd_shl32_sat(WORD32 a, WORD b) {
|
|||
return (out_val);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_shl32_dir(WORD32 a, WORD b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_shl32_dir(WORD32 a, WORD b) {
|
||||
WORD32 out_val;
|
||||
|
||||
if (b < 0) {
|
||||
out_val = ixheaacd_shr32(a, -b);
|
||||
out_val = ixheaac_shr32(a, -b);
|
||||
} else {
|
||||
out_val = ixheaacd_shl32(a, b);
|
||||
out_val = ixheaac_shl32(a, b);
|
||||
}
|
||||
|
||||
return out_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_shl32_dir_sat(WORD32 a, WORD b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_shl32_dir_sat(WORD32 a, WORD b) {
|
||||
WORD32 out_val;
|
||||
|
||||
if (b < 0) {
|
||||
out_val = ixheaacd_shr32(a, -b);
|
||||
out_val = ixheaac_shr32(a, -b);
|
||||
} else {
|
||||
out_val = ixheaacd_shl32_sat(a, b);
|
||||
out_val = ixheaac_shl32_sat(a, b);
|
||||
}
|
||||
|
||||
return out_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_shr32_dir(WORD32 a, WORD b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_shr32_dir(WORD32 a, WORD b) {
|
||||
WORD32 out_val;
|
||||
|
||||
if (b < 0) {
|
||||
out_val = ixheaacd_shl32(a, -b);
|
||||
out_val = ixheaac_shl32(a, -b);
|
||||
} else {
|
||||
out_val = ixheaacd_shr32(a, b);
|
||||
out_val = ixheaac_shr32(a, b);
|
||||
}
|
||||
|
||||
return out_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_shr32_dir_sat(WORD32 a, WORD b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_shr32_dir_sat(WORD32 a, WORD b) {
|
||||
WORD32 out_val;
|
||||
|
||||
if (b < 0) {
|
||||
out_val = ixheaacd_shl32_sat(a, -b);
|
||||
out_val = ixheaac_shl32_sat(a, -b);
|
||||
} else {
|
||||
out_val = ixheaacd_shr32(a, b);
|
||||
out_val = ixheaac_shr32(a, b);
|
||||
}
|
||||
|
||||
return out_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mult16x16in32(WORD16 a, WORD16 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32(WORD16 a, WORD16 b) {
|
||||
WORD32 product;
|
||||
|
||||
product = (WORD32)a * (WORD32)b;
|
||||
|
|
@ -131,7 +131,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_mult16x16in32(WORD16 a, WORD16 b) {
|
|||
return product;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mult32x16hin32(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mult32x16hin32(WORD32 a, WORD32 b) {
|
||||
WORD32 result;
|
||||
WORD64 temp_result;
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_mult32x16hin32(WORD32 a, WORD32 b) {
|
|||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mult32x16in32_sat(WORD32 a, WORD16 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_sat(WORD32 a, WORD16 b) {
|
||||
WORD32 result;
|
||||
WORD64 temp_result;
|
||||
|
||||
|
|
@ -159,27 +159,27 @@ static PLATFORM_INLINE WORD32 ixheaacd_mult32x16in32_sat(WORD32 a, WORD16 b) {
|
|||
return(result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mult16x16in32_shl(WORD16 a, WORD16 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl(WORD16 a, WORD16 b) {
|
||||
WORD32 product;
|
||||
|
||||
product = ixheaacd_shl32(ixheaacd_mult16x16in32(a, b), 1);
|
||||
product = ixheaac_shl32(ixheaac_mult16x16in32(a, b), 1);
|
||||
|
||||
return product;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mult16x16in32_shl_sat(WORD16 a,
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mult16x16in32_shl_sat(WORD16 a,
|
||||
WORD16 b) {
|
||||
WORD32 product;
|
||||
product = (WORD32)a * (WORD32)b;
|
||||
if (product != (WORD32)0x40000000L) {
|
||||
product = ixheaacd_shl32(product, 1);
|
||||
product = ixheaac_shl32(product, 1);
|
||||
} else {
|
||||
product = MAX_32;
|
||||
}
|
||||
return product;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_add32(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_add32(WORD32 a, WORD32 b) {
|
||||
WORD32 sum;
|
||||
|
||||
sum = (WORD32)a + (WORD32)b;
|
||||
|
|
@ -187,7 +187,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_add32(WORD32 a, WORD32 b) {
|
|||
return sum;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_sub32(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_sub32(WORD32 a, WORD32 b) {
|
||||
WORD32 diff;
|
||||
|
||||
diff = (WORD32)a - (WORD32)b;
|
||||
|
|
@ -195,7 +195,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_sub32(WORD32 a, WORD32 b) {
|
|||
return diff;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_add32_sat(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_add32_sat(WORD32 a, WORD32 b) {
|
||||
WORD64 sum;
|
||||
|
||||
sum = (WORD64)a + (WORD64)b;
|
||||
|
|
@ -206,7 +206,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_add32_sat(WORD32 a, WORD32 b) {
|
|||
return (WORD32)sum;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_add32_sat3(WORD32 a, WORD32 b,
|
||||
static PLATFORM_INLINE WORD32 ixheaac_add32_sat3(WORD32 a, WORD32 b,
|
||||
WORD32 c) {
|
||||
WORD64 sum;
|
||||
|
||||
|
|
@ -224,7 +224,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_add32_sat3(WORD32 a, WORD32 b,
|
|||
return (WORD32)sum;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_sub32_sat(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_sub32_sat(WORD32 a, WORD32 b) {
|
||||
WORD64 diff;
|
||||
|
||||
diff = (WORD64)a - (WORD64)b;
|
||||
|
|
@ -235,7 +235,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_sub32_sat(WORD32 a, WORD32 b) {
|
|||
return (WORD32)diff;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD ixheaacd_norm32(WORD32 a) {
|
||||
static PLATFORM_INLINE WORD ixheaac_norm32(WORD32 a) {
|
||||
WORD norm_val;
|
||||
|
||||
if (a == 0) {
|
||||
|
|
@ -256,7 +256,7 @@ static PLATFORM_INLINE WORD ixheaacd_norm32(WORD32 a) {
|
|||
return norm_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD ixheaacd_pnorm32(WORD32 a) {
|
||||
static PLATFORM_INLINE WORD ixheaac_pnorm32(WORD32 a) {
|
||||
WORD norm_val;
|
||||
|
||||
if (a == 0) {
|
||||
|
|
@ -270,7 +270,7 @@ static PLATFORM_INLINE WORD ixheaacd_pnorm32(WORD32 a) {
|
|||
return norm_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_abs32(WORD32 a) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_abs32(WORD32 a) {
|
||||
WORD32 abs_val;
|
||||
|
||||
abs_val = a;
|
||||
|
|
@ -282,7 +282,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_abs32(WORD32 a) {
|
|||
return abs_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_abs32_nrm(WORD32 a) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_abs32_nrm(WORD32 a) {
|
||||
WORD32 abs_val;
|
||||
|
||||
abs_val = a;
|
||||
|
|
@ -294,7 +294,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_abs32_nrm(WORD32 a) {
|
|||
return abs_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_abs32_sat(WORD32 a) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_abs32_sat(WORD32 a) {
|
||||
WORD32 abs_val;
|
||||
|
||||
abs_val = a;
|
||||
|
|
@ -308,7 +308,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_abs32_sat(WORD32 a) {
|
|||
return abs_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_negate32(WORD32 a) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_negate32(WORD32 a) {
|
||||
WORD32 neg_val;
|
||||
|
||||
neg_val = -a;
|
||||
|
|
@ -316,7 +316,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_negate32(WORD32 a) {
|
|||
return neg_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_negate32_sat(WORD32 a) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_negate32_sat(WORD32 a) {
|
||||
WORD32 neg_val;
|
||||
|
||||
if (a == MIN_32) {
|
||||
|
|
@ -327,7 +327,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_negate32_sat(WORD32 a) {
|
|||
return neg_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_div32(WORD32 a, WORD32 b,
|
||||
static PLATFORM_INLINE WORD32 ixheaac_div32(WORD32 a, WORD32 b,
|
||||
WORD *q_format) {
|
||||
WORD32 quotient;
|
||||
UWORD32 mantissa_nr, mantissa_dr;
|
||||
|
|
@ -357,9 +357,9 @@ static PLATFORM_INLINE WORD32 ixheaacd_div32(WORD32 a, WORD32 b,
|
|||
|
||||
quotient = 0;
|
||||
|
||||
q_nr = ixheaacd_norm32(a);
|
||||
q_nr = ixheaac_norm32(a);
|
||||
mantissa_nr = (UWORD32)a << (q_nr);
|
||||
q_dr = ixheaacd_norm32(b);
|
||||
q_dr = ixheaac_norm32(b);
|
||||
mantissa_dr = (UWORD32)b << (q_dr);
|
||||
*q_format = (WORD)(30 + q_nr - q_dr);
|
||||
|
||||
|
|
@ -381,7 +381,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_div32(WORD32 a, WORD32 b,
|
|||
return quotient;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_shr32_sat(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_shr32_sat(WORD32 a, WORD32 b) {
|
||||
WORD32 out_val;
|
||||
|
||||
b = ((UWORD32)(b << 24) >> 24);
|
||||
|
|
@ -395,54 +395,54 @@ static PLATFORM_INLINE WORD32 ixheaacd_shr32_sat(WORD32 a, WORD32 b) {
|
|||
return a;
|
||||
}
|
||||
else {
|
||||
a = ixheaacd_add32_sat(a, (1 << (b - 1)));
|
||||
a = ixheaac_add32_sat(a, (1 << (b - 1)));
|
||||
out_val = (WORD32)a >> b;
|
||||
}
|
||||
|
||||
return out_val;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mac16x16in32_sat(WORD32 a, WORD16 b,
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mac16x16in32_sat(WORD32 a, WORD16 b,
|
||||
WORD16 c) {
|
||||
WORD32 acc;
|
||||
|
||||
acc = ixheaacd_mult16x16in32(b, c);
|
||||
acc = ixheaac_mult16x16in32(b, c);
|
||||
|
||||
acc = ixheaacd_add32_sat(a, acc);
|
||||
acc = ixheaac_add32_sat(a, acc);
|
||||
|
||||
return acc;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mac16x16in32_shl(WORD32 a, WORD16 b,
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mac16x16in32_shl(WORD32 a, WORD16 b,
|
||||
WORD16 c) {
|
||||
WORD32 acc;
|
||||
|
||||
acc = ixheaacd_mult16x16in32_shl(b, c);
|
||||
acc = ixheaac_mult16x16in32_shl(b, c);
|
||||
|
||||
acc = ixheaacd_add32(a, acc);
|
||||
acc = ixheaac_add32(a, acc);
|
||||
|
||||
return acc;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mac16x16in32_shl_sat(WORD32 a, WORD16 b,
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mac16x16in32_shl_sat(WORD32 a, WORD16 b,
|
||||
WORD16 c) {
|
||||
WORD32 acc;
|
||||
|
||||
acc = ixheaacd_mult16x16in32_shl_sat(b, c);
|
||||
acc = ixheaac_mult16x16in32_shl_sat(b, c);
|
||||
|
||||
acc = ixheaacd_add32_sat(a, acc);
|
||||
acc = ixheaac_add32_sat(a, acc);
|
||||
|
||||
return acc;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_msu16x16in32(WORD32 a, WORD16 b, WORD16 c) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_msu16x16in32(WORD32 a, WORD16 b, WORD16 c) {
|
||||
WORD32 acc;
|
||||
|
||||
acc = ixheaacd_mult16x16in32(b, c);
|
||||
acc = ixheaac_mult16x16in32(b, c);
|
||||
|
||||
acc = ixheaacd_sub32(a, acc);
|
||||
acc = ixheaac_sub32(a, acc);
|
||||
|
||||
return acc;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* IXHEAAC_BASIC_OPS32_H */
|
||||
|
|
@ -17,10 +17,10 @@
|
|||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#ifndef IXHEAACD_BASIC_OPS40_H
|
||||
#define IXHEAACD_BASIC_OPS40_H
|
||||
#ifndef IXHEAAC_BASIC_OPS40_H
|
||||
#define IXHEAAC_BASIC_OPS40_H
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mult32x16in32_shl(WORD32 a, WORD16 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl(WORD32 a, WORD16 b) {
|
||||
WORD32 result;
|
||||
WORD64 temp_result;
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_mult32x16in32_shl(WORD32 a, WORD16 b) {
|
|||
return (result << 1);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mult32x16in32(WORD32 a, WORD16 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32(WORD32 a, WORD16 b) {
|
||||
WORD32 result;
|
||||
WORD64 temp_result;
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_mult32x16in32(WORD32 a, WORD16 b) {
|
|||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mult32x32in32(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mult32x32in32(WORD32 a, WORD32 b) {
|
||||
WORD32 result;
|
||||
WORD64 temp_result;
|
||||
|
||||
|
|
@ -53,20 +53,20 @@ static PLATFORM_INLINE WORD32 ixheaacd_mult32x32in32(WORD32 a, WORD32 b) {
|
|||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mult32x16in32_shl_sat(WORD32 a,
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mult32x16in32_shl_sat(WORD32 a,
|
||||
WORD16 b) {
|
||||
WORD32 result;
|
||||
|
||||
if (a == (WORD32)0x80000000 && b == (WORD16)0x8000) {
|
||||
result = (WORD32)0x7fffffff;
|
||||
} else {
|
||||
result = ixheaacd_mult32x16in32_shl(a, b);
|
||||
result = ixheaac_mult32x16in32_shl(a, b);
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mult32_shl(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mult32_shl(WORD32 a, WORD32 b) {
|
||||
WORD32 result;
|
||||
WORD64 temp_result;
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_mult32_shl(WORD32 a, WORD32 b) {
|
|||
return (result << 1);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mult32(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mult32(WORD32 a, WORD32 b) {
|
||||
WORD32 result;
|
||||
WORD64 temp_result;
|
||||
|
||||
|
|
@ -86,53 +86,53 @@ static PLATFORM_INLINE WORD32 ixheaacd_mult32(WORD32 a, WORD32 b) {
|
|||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mult32_shl_sat(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mult32_shl_sat(WORD32 a, WORD32 b) {
|
||||
WORD32 result;
|
||||
|
||||
if (a == (WORD32)0x80000000 && b == (WORD32)0x80000000) {
|
||||
result = 0x7fffffff;
|
||||
} else {
|
||||
result = ixheaacd_mult32_shl(a, b);
|
||||
result = ixheaac_mult32_shl(a, b);
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mac32x16in32(WORD32 a, WORD32 b,
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mac32x16in32(WORD32 a, WORD32 b,
|
||||
WORD16 c) {
|
||||
WORD32 result;
|
||||
|
||||
result = a + ixheaacd_mult32x16in32(b, c);
|
||||
result = a + ixheaac_mult32x16in32(b, c);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mac32x16in32_shl(WORD32 a, WORD32 b,
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mac32x16in32_shl(WORD32 a, WORD32 b,
|
||||
WORD16 c) {
|
||||
WORD32 result;
|
||||
|
||||
result = a + ixheaacd_mult32x16in32_shl(b, c);
|
||||
result = a + ixheaac_mult32x16in32_shl(b, c);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mac32x16in32_shl_sat(WORD32 a, WORD32 b, WORD16 c) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mac32x16in32_shl_sat(WORD32 a, WORD32 b, WORD16 c) {
|
||||
WORD32 result;
|
||||
|
||||
result = ixheaacd_add32_sat(a, ixheaacd_mult32x16in32_shl_sat(b, c));
|
||||
result = ixheaac_add32_sat(a, ixheaac_mult32x16in32_shl_sat(b, c));
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mac32(WORD32 a, WORD32 b, WORD32 c) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mac32(WORD32 a, WORD32 b, WORD32 c) {
|
||||
WORD32 result;
|
||||
|
||||
result = a + ixheaacd_mult32(b, c);
|
||||
result = a + ixheaac_mult32(b, c);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD64 ixheaacd_mult32x32in64(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD64 ixheaac_mult32x32in64(WORD32 a, WORD32 b) {
|
||||
WORD64 result;
|
||||
|
||||
result = (WORD64)a * (WORD64)b;
|
||||
|
|
@ -140,14 +140,14 @@ static PLATFORM_INLINE WORD64 ixheaacd_mult32x32in64(WORD32 a, WORD32 b) {
|
|||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD64 ixheaacd_mac32x32in64(WORD64 sum, WORD32 a,
|
||||
static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64(WORD64 sum, WORD32 a,
|
||||
WORD32 b) {
|
||||
sum += (WORD64)a * (WORD64)b;
|
||||
|
||||
return (sum);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD64 ixheaacd_mac32x32in64_7(const WORD32 *a,
|
||||
static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64_7(const WORD32 *a,
|
||||
const WORD16 *b) {
|
||||
WORD64 sum;
|
||||
sum = (WORD64)a[0] * (WORD64)b[0];
|
||||
|
|
@ -161,7 +161,7 @@ static PLATFORM_INLINE WORD64 ixheaacd_mac32x32in64_7(const WORD32 *a,
|
|||
return (sum);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD64 ixheaacd_mac32x32in64_n(WORD64 sum,
|
||||
static PLATFORM_INLINE WORD64 ixheaac_mac32x32in64_n(WORD64 sum,
|
||||
const WORD32 *a,
|
||||
const WORD16 *b,
|
||||
WORD32 n) {
|
||||
|
|
@ -172,13 +172,13 @@ static PLATFORM_INLINE WORD64 ixheaacd_mac32x32in64_n(WORD64 sum,
|
|||
return (sum);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD64 ixheaacd_mult64(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD64 ixheaac_mult64(WORD32 a, WORD32 b) {
|
||||
WORD64 result;
|
||||
result = (WORD64)a * (WORD64)b;
|
||||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD64 ixheaacd_mult64_sat(WORD64 a, WORD64 b) {
|
||||
static PLATFORM_INLINE WORD64 ixheaac_mult64_sat(WORD64 a, WORD64 b) {
|
||||
WORD64 result;
|
||||
|
||||
if (a > 0 && b > 0 && a > MAX_64 / b) return MAX_64;
|
||||
|
|
@ -190,7 +190,7 @@ static PLATFORM_INLINE WORD64 ixheaacd_mult64_sat(WORD64 a, WORD64 b) {
|
|||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD64 ixheaacd_add64_sat(WORD64 a, WORD64 b) {
|
||||
static PLATFORM_INLINE WORD64 ixheaac_add64_sat(WORD64 a, WORD64 b) {
|
||||
WORD64 result, comp;
|
||||
result = (a < 0) ? MIN_64 : MAX_64;
|
||||
comp = result - a;
|
||||
|
|
@ -199,7 +199,7 @@ static PLATFORM_INLINE WORD64 ixheaacd_add64_sat(WORD64 a, WORD64 b) {
|
|||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_sat64_32(WORD64 a) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_sat64_32(WORD64 a) {
|
||||
WORD32 result;
|
||||
if (a >= MAX_32) {
|
||||
result = MAX_32;
|
||||
|
|
@ -211,13 +211,13 @@ static PLATFORM_INLINE WORD32 ixheaacd_sat64_32(WORD64 a) {
|
|||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD64 ixheaacd_add64(WORD64 a, WORD64 b) {
|
||||
static PLATFORM_INLINE WORD64 ixheaac_add64(WORD64 a, WORD64 b) {
|
||||
WORD64 result;
|
||||
result = a + b;
|
||||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD64 ixheaacd_sub64(WORD64 a, WORD64 b) {
|
||||
static PLATFORM_INLINE WORD64 ixheaac_sub64(WORD64 a, WORD64 b) {
|
||||
WORD64 diff;
|
||||
|
||||
diff = (WORD64)a - (WORD64)b;
|
||||
|
|
@ -225,10 +225,10 @@ static PLATFORM_INLINE WORD64 ixheaacd_sub64(WORD64 a, WORD64 b) {
|
|||
return diff;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD64 ixheaacd_sub64_sat(WORD64 a, WORD64 b) {
|
||||
static PLATFORM_INLINE WORD64 ixheaac_sub64_sat(WORD64 a, WORD64 b) {
|
||||
WORD64 diff;
|
||||
|
||||
diff = ixheaacd_sub64(a, b);
|
||||
diff = ixheaac_sub64(a, b);
|
||||
|
||||
if ((((WORD64)a ^ (WORD64)b) & (WORD64)MIN_64) != 0) {
|
||||
if (((WORD64)diff ^ (WORD64)a) & (WORD64)MIN_64) {
|
||||
|
|
@ -239,7 +239,7 @@ static PLATFORM_INLINE WORD64 ixheaacd_sub64_sat(WORD64 a, WORD64 b) {
|
|||
return (diff);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mul32_sh(WORD32 a, WORD32 b,
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mul32_sh(WORD32 a, WORD32 b,
|
||||
WORD8 shift) {
|
||||
WORD32 result;
|
||||
WORD64 temp_result;
|
||||
|
|
@ -250,7 +250,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_mul32_sh(WORD32 a, WORD32 b,
|
|||
return (result);
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mult32x16hin32_shl(WORD32 a, WORD32 b) {
|
||||
static PLATFORM_INLINE WORD32 ixheaac_mult32x16hin32_shl(WORD32 a, WORD32 b) {
|
||||
WORD32 product;
|
||||
WORD64 temp_product;
|
||||
|
||||
|
|
@ -260,4 +260,4 @@ static PLATFORM_INLINE WORD32 ixheaacd_mult32x16hin32_shl(WORD32 a, WORD32 b) {
|
|||
return (product << 1);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /* IXHEAAC_BASIC_OPS40_H */
|
||||
59
common/ixheaac_basic_ops_arr.h
Normal file
59
common/ixheaac_basic_ops_arr.h
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/******************************************************************************
|
||||
* *
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#ifndef IXHEAAC_BASIC_OPS_ARR_H
|
||||
#define IXHEAAC_BASIC_OPS_ARR_H
|
||||
|
||||
static PLATFORM_INLINE VOID ixheaac_shr32_arr(WORD32 *word32_arr, WORD16 shift,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
*word32_arr = ixheaac_shr32(*word32_arr, shift);
|
||||
word32_arr++;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID ixheaac_shl32_arr_sat(WORD32 *word32_arr,
|
||||
WORD16 shift, WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
*word32_arr = ixheaac_shl32_sat(*word32_arr, shift);
|
||||
word32_arr++;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID ixheaac_shr16_arr(WORD16 *word16_arr, WORD16 shift,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
*word16_arr = ixheaac_shr16(*word16_arr, shift);
|
||||
word16_arr++;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* IXHEAAC_BASIC_OPS_ARR_H */
|
||||
|
|
@ -17,8 +17,8 @@
|
|||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#ifndef IXHEAACD_CONSTANTS_H
|
||||
#define IXHEAACD_CONSTANTS_H
|
||||
#ifndef IXHEAAC_CONSTANTS_H
|
||||
#define IXHEAAC_CONSTANTS_H
|
||||
|
||||
/*****************************************************************************/
|
||||
/* constant macros */
|
||||
|
|
@ -83,4 +83,4 @@
|
|||
#define C76 (0.5339693427f) //(sin(u) - 2 * sin(2 * u) - sin(3 * u)) / 3;
|
||||
#define C77 (-0.8748422265f) //(sin(u) + sin(2 * u) + 2 * sin(3 * u)) / 3;
|
||||
|
||||
#endif /* IXHEAACD_CONSTANTS_H */
|
||||
#endif /* IXHEAAC_CONSTANTS_H */
|
||||
|
|
@ -17,15 +17,11 @@
|
|||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#ifndef IXHEAACD_FFT_IFFT_ROM_H
|
||||
#define IXHEAACD_FFT_IFFT_ROM_H
|
||||
#ifndef IXHEAAC_ERROR_STANDARDS_H
|
||||
#define IXHEAAC_ERROR_STANDARDS_H
|
||||
|
||||
extern const FLOAT64 ixheaacd_twid_tbl_fft_double[514];
|
||||
extern const FLOAT64 ixheaacd_twid_tbl_fft_ntwt3r[1155];
|
||||
extern const FLOAT64 ixheaacd_twid_tbl_fft_ntwt3i[1155];
|
||||
extern const FLOAT32 ixheaacd_twid_tbl_fft_224[372];
|
||||
extern const FLOAT32 ixheaacd_twid_tbl_fft_288[380];
|
||||
extern const FLOAT32 ixheaacd_twid_tbl_fft_336[564];
|
||||
extern const FLOAT32 ixheaacd_twid_tbl_fft_168[276];
|
||||
#define IA_NO_ERROR 0x00000000
|
||||
|
||||
#endif /* IXHEAACD_FFT_IFFT_ROM_H */
|
||||
#define IA_FATAL_ERROR 0x80000000
|
||||
|
||||
#endif /* IXHEAAC_ERROR_STANDARDS_H */
|
||||
|
|
@ -20,9 +20,9 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
|
||||
#define PLATFORM_INLINE __inline
|
||||
|
||||
|
|
@ -35,11 +35,11 @@
|
|||
(j) = _ >> (m); \
|
||||
} while (0)
|
||||
|
||||
extern const FLOAT32 ixheaacd_twiddle_table_fft_float[514];
|
||||
extern const FLOAT32 ixheaacd_twidle_tbl_48[64];
|
||||
extern const FLOAT32 ixheaacd_twidle_tbl_24[32];
|
||||
extern const FLOAT32 ixheaac_twiddle_table_fft_float[514];
|
||||
extern const FLOAT32 ixheaac_twidle_tbl_48[64];
|
||||
extern const FLOAT32 ixheaac_twidle_tbl_24[32];
|
||||
|
||||
void ixheaacd_real_synth_fft_p2(FLOAT32 *ptr_x, FLOAT32 *ptr_y,
|
||||
void ixheaac_real_synth_fft_p2(FLOAT32 *ptr_x, FLOAT32 *ptr_y,
|
||||
WORD32 npoints) {
|
||||
WORD32 i, j, k, n_stages, h2;
|
||||
FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
|
||||
|
|
@ -48,13 +48,13 @@ void ixheaacd_real_synth_fft_p2(FLOAT32 *ptr_x, FLOAT32 *ptr_y,
|
|||
WORD32 dig_rev_shift;
|
||||
const FLOAT32 *ptr_w;
|
||||
|
||||
dig_rev_shift = ixheaacd_norm32(npoints) + 1 - 16;
|
||||
n_stages = 30 - ixheaacd_norm32(npoints);
|
||||
dig_rev_shift = ixheaac_norm32(npoints) + 1 - 16;
|
||||
n_stages = 30 - ixheaac_norm32(npoints);
|
||||
not_power_4 = n_stages & 1;
|
||||
|
||||
n_stages = n_stages >> 1;
|
||||
|
||||
ptr_w = ixheaacd_twiddle_table_fft_float;
|
||||
ptr_w = ixheaac_twiddle_table_fft_float;
|
||||
|
||||
for (i = 0; i < npoints; i += 4) {
|
||||
FLOAT32 *inp = ptr_x;
|
||||
|
|
@ -537,7 +537,7 @@ void ixheaacd_real_synth_fft_p2(FLOAT32 *ptr_x, FLOAT32 *ptr_y,
|
|||
}
|
||||
}
|
||||
|
||||
void ixheaacd_cmplx_anal_fft_p2(FLOAT32 *ptr_x, FLOAT32 *ptr_y,
|
||||
void ixheaac_cmplx_anal_fft_p2(FLOAT32 *ptr_x, FLOAT32 *ptr_y,
|
||||
WORD32 npoints) {
|
||||
WORD32 i, j, k, n_stages, h2;
|
||||
FLOAT32 x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
|
||||
|
|
@ -546,13 +546,13 @@ void ixheaacd_cmplx_anal_fft_p2(FLOAT32 *ptr_x, FLOAT32 *ptr_y,
|
|||
WORD32 dig_rev_shift;
|
||||
const FLOAT32 *ptr_w;
|
||||
|
||||
dig_rev_shift = ixheaacd_norm32(npoints) + 1 - 16;
|
||||
n_stages = 30 - ixheaacd_norm32(npoints);
|
||||
dig_rev_shift = ixheaac_norm32(npoints) + 1 - 16;
|
||||
n_stages = 30 - ixheaac_norm32(npoints);
|
||||
not_power_4 = n_stages & 1;
|
||||
|
||||
n_stages = n_stages >> 1;
|
||||
|
||||
ptr_w = ixheaacd_twiddle_table_fft_float;
|
||||
ptr_w = ixheaac_twiddle_table_fft_float;
|
||||
|
||||
for (i = 0; i < npoints; i += 4) {
|
||||
FLOAT32 *inp = ptr_x;
|
||||
|
|
@ -1051,7 +1051,7 @@ void ixheaacd_cmplx_anal_fft_p2(FLOAT32 *ptr_x, FLOAT32 *ptr_y,
|
|||
}
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE void ixheaacd_aac_ld_dec_fft_3_float(FLOAT32 *inp,
|
||||
static PLATFORM_INLINE void ixheaac_aac_ld_dec_fft_3_float(FLOAT32 *inp,
|
||||
FLOAT32 *op) {
|
||||
FLOAT32 add_r, sub_r;
|
||||
FLOAT32 add_i, sub_i;
|
||||
|
|
@ -1088,7 +1088,7 @@ static PLATFORM_INLINE void ixheaacd_aac_ld_dec_fft_3_float(FLOAT32 *inp,
|
|||
return;
|
||||
}
|
||||
|
||||
void ixheaacd_real_synth_fft_p3(FLOAT32 *x_in, FLOAT32 *x_out, WORD32 npoints) {
|
||||
void ixheaac_real_synth_fft_p3(FLOAT32 *x_in, FLOAT32 *x_out, WORD32 npoints) {
|
||||
WORD32 i, j;
|
||||
FLOAT32 x_3[8];
|
||||
FLOAT32 y_3[16];
|
||||
|
|
@ -1103,7 +1103,7 @@ void ixheaacd_real_synth_fft_p3(FLOAT32 *x_in, FLOAT32 *x_out, WORD32 npoints) {
|
|||
x_3[j] = x_in[3 * j + i];
|
||||
}
|
||||
|
||||
ixheaacd_real_synth_fft_p2(x_3, y_3, 8);
|
||||
ixheaac_real_synth_fft_p2(x_3, y_3, 8);
|
||||
|
||||
for (j = 0; j < 16; j += 2) {
|
||||
x[3 * j + 2 * i] = y_3[j];
|
||||
|
|
@ -1115,7 +1115,7 @@ void ixheaacd_real_synth_fft_p3(FLOAT32 *x_in, FLOAT32 *x_out, WORD32 npoints) {
|
|||
FLOAT32 *wr;
|
||||
FLOAT32 tmp;
|
||||
FLOAT32 *x_tw = x;
|
||||
wr = (FLOAT32 *)ixheaacd_twidle_tbl_24;
|
||||
wr = (FLOAT32 *)ixheaac_twidle_tbl_24;
|
||||
x_tw += 2;
|
||||
|
||||
for (i = 0; i < (npoints / 3); i++) {
|
||||
|
|
@ -1136,7 +1136,7 @@ void ixheaacd_real_synth_fft_p3(FLOAT32 *x_in, FLOAT32 *x_out, WORD32 npoints) {
|
|||
}
|
||||
|
||||
for (i = 0; i < (npoints / 3); i++) {
|
||||
ixheaacd_aac_ld_dec_fft_3_float(x_p3, y_p3);
|
||||
ixheaac_aac_ld_dec_fft_3_float(x_p3, y_p3);
|
||||
|
||||
x_p3 = x_p3 + 6;
|
||||
y_p3 = y_p3 + 6;
|
||||
|
|
@ -1152,7 +1152,7 @@ void ixheaacd_real_synth_fft_p3(FLOAT32 *x_in, FLOAT32 *x_out, WORD32 npoints) {
|
|||
}
|
||||
}
|
||||
|
||||
void ixheaacd_cmplx_anal_fft_p3(FLOAT32 *x_in, FLOAT32 *x_out, WORD32 npoints) {
|
||||
void ixheaac_cmplx_anal_fft_p3(FLOAT32 *x_in, FLOAT32 *x_out, WORD32 npoints) {
|
||||
WORD32 i, j;
|
||||
FLOAT32 x_3[32];
|
||||
FLOAT32 y_3[32];
|
||||
|
|
@ -1167,7 +1167,7 @@ void ixheaacd_cmplx_anal_fft_p3(FLOAT32 *x_in, FLOAT32 *x_out, WORD32 npoints) {
|
|||
x_3[j + 1] = x_in[3 * j + i + 1];
|
||||
}
|
||||
|
||||
ixheaacd_cmplx_anal_fft_p2(x_3, y_3, 16);
|
||||
ixheaac_cmplx_anal_fft_p2(x_3, y_3, 16);
|
||||
|
||||
for (j = 0; j < 32; j += 2) {
|
||||
x_in[3 * j + i] = y_3[j];
|
||||
|
|
@ -1178,7 +1178,7 @@ void ixheaacd_cmplx_anal_fft_p3(FLOAT32 *x_in, FLOAT32 *x_out, WORD32 npoints) {
|
|||
{
|
||||
FLOAT32 *wr;
|
||||
FLOAT32 tmp;
|
||||
wr = (FLOAT32 *)ixheaacd_twidle_tbl_48;
|
||||
wr = (FLOAT32 *)ixheaac_twidle_tbl_48;
|
||||
x_in += 2;
|
||||
|
||||
for (i = 0; i < (npoints / 3); i++) {
|
||||
|
|
@ -1199,7 +1199,7 @@ void ixheaacd_cmplx_anal_fft_p3(FLOAT32 *x_in, FLOAT32 *x_out, WORD32 npoints) {
|
|||
}
|
||||
|
||||
for (i = 0; i < (npoints / 3); i++) {
|
||||
ixheaacd_aac_ld_dec_fft_3_float(ptr_x, ptr_y);
|
||||
ixheaac_aac_ld_dec_fft_3_float(ptr_x, ptr_y);
|
||||
|
||||
ptr_x = ptr_x + 6;
|
||||
ptr_y = ptr_y + 6;
|
||||
|
|
@ -17,11 +17,11 @@
|
|||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaacd_esbr_rom.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
#include "ixheaac_esbr_rom.h"
|
||||
|
||||
const FLOAT32 ixheaacd_sub_samp_qmf_window_coeff[40 + 80 + 120 + 160 + 200 +
|
||||
const FLOAT32 ixheaac_sub_samp_qmf_window_coeff[40 + 80 + 120 + 160 + 200 +
|
||||
240 + 320 + 400 + 440] = {
|
||||
0.000000000000f, -0.000715773669f, -0.000665041502f, 0.000402654026f,
|
||||
0.002620175947f, 0.005039302167f, 0.005271575879f, 0.000027604519f,
|
||||
|
|
@ -534,7 +534,7 @@ const FLOAT32 ixheaacd_sub_samp_qmf_window_coeff[40 + 80 + 120 + 160 + 200 +
|
|||
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_random_phase[512][2] = {
|
||||
const FLOAT32 ixheaac_random_phase[512][2] = {
|
||||
{-0.99948153278296f, -0.59483417516607f},
|
||||
{0.97113454393991f, -0.67528515225647f},
|
||||
{0.14130051758487f, -0.95090983575689f},
|
||||
|
|
@ -1048,30 +1048,30 @@ const FLOAT32 ixheaacd_random_phase[512][2] = {
|
|||
{-0.94705089665984f, -0.29580042814306f},
|
||||
{0.91599807087376f, -0.98147830385781f}};
|
||||
|
||||
const FLOAT32 ixheaacd_hphase_tbl[2][8] = {{1.0f, 0.0f, -1.0f, 0.0f},
|
||||
const FLOAT32 ixheaac_hphase_tbl[2][8] = {{1.0f, 0.0f, -1.0f, 0.0f},
|
||||
{0.0f, 1.0f, 0.0f, -1.0f}};
|
||||
|
||||
const FLOAT32 ixheaacd_g_lim_gains[4] = {0.70795f, 1.0f, 1.41254f, 1e10f};
|
||||
const FLOAT32 ixheaac_g_lim_gains[4] = {0.70795f, 1.0f, 1.41254f, 1e10f};
|
||||
|
||||
const ia_fir_table_struct ixheaacd_fir_0 = {1.0f};
|
||||
const ia_fir_table_struct ixheaacd_fir_1 = {0.33333333333333f, 0.66666666666666f};
|
||||
const ia_fir_table_struct ixheaacd_fir_2 = {0.12500000000000f, 0.37500000000000f,
|
||||
const ia_fir_table_struct ixheaac_fir_0 = {1.0f};
|
||||
const ia_fir_table_struct ixheaac_fir_1 = {0.33333333333333f, 0.66666666666666f};
|
||||
const ia_fir_table_struct ixheaac_fir_2 = {0.12500000000000f, 0.37500000000000f,
|
||||
0.50000000000000f};
|
||||
const ia_fir_table_struct ixheaacd_fir_3 = {0.05857864376269f, 0.20000000000000f,
|
||||
const ia_fir_table_struct ixheaac_fir_3 = {0.05857864376269f, 0.20000000000000f,
|
||||
0.34142135623731f, 0.40000000000000f};
|
||||
const ia_fir_table_struct ixheaacd_fir_4 = {0.03183050093751f, 0.11516383427084f,
|
||||
const ia_fir_table_struct ixheaac_fir_4 = {0.03183050093751f, 0.11516383427084f,
|
||||
0.21816949906249f, 0.30150283239582f,
|
||||
0.33333333333333f};
|
||||
const ia_fir_table_struct* ixheaacd_fir_table[5] = {
|
||||
&ixheaacd_fir_0, &ixheaacd_fir_1, &ixheaacd_fir_2, &ixheaacd_fir_3,
|
||||
&ixheaacd_fir_4};
|
||||
const FLOAT32 ixheaacd_q_gamma_table[4] = {0.0f, 1.0f, 2.0f, 4.0f};
|
||||
const ia_fir_table_struct* ixheaac_fir_table[5] = {
|
||||
&ixheaac_fir_0, &ixheaac_fir_1, &ixheaac_fir_2, &ixheaac_fir_3,
|
||||
&ixheaac_fir_4};
|
||||
const FLOAT32 ixheaac_q_gamma_table[4] = {0.0f, 1.0f, 2.0f, 4.0f};
|
||||
|
||||
const WORD32 ixheaacd_start_subband2kL_tbl[33] = {
|
||||
const WORD32 ixheaac_start_subband2kL_tbl[33] = {
|
||||
0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6,
|
||||
6, 8, 8, 8, 8, 8, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12};
|
||||
|
||||
const FLOAT32 ixheaacd_cos_table_trans_qmf[7][32 * 2] = {
|
||||
const FLOAT32 ixheaac_cos_table_trans_qmf[7][32 * 2] = {
|
||||
|
||||
{
|
||||
-0.698376249409f, 0.715730825284f, 0.732654271672f, 0.680600997795f,
|
||||
|
|
@ -1214,7 +1214,7 @@ const FLOAT32 ixheaacd_cos_table_trans_qmf[7][32 * 2] = {
|
|||
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_phase_vocoder_cos_table[64] = {
|
||||
const FLOAT32 ixheaac_phase_vocoder_cos_table[64] = {
|
||||
0.012272f, -0.036807f, 0.061321f, -0.085797f, 0.110222f, -0.134581f,
|
||||
0.158858f, -0.183040f, 0.207111f, -0.231058f, 0.254866f, -0.278520f,
|
||||
0.302006f, -0.325310f, 0.348419f, -0.371317f, 0.393992f, -0.416430f,
|
||||
|
|
@ -1227,7 +1227,7 @@ const FLOAT32 ixheaacd_phase_vocoder_cos_table[64] = {
|
|||
0.972940f, -0.978317f, 0.983105f, -0.987301f, 0.990903f, -0.993907f,
|
||||
0.996313f, -0.998118f, 0.999322f, -0.999925f,
|
||||
};
|
||||
const FLOAT32 ixheaacd_phase_vocoder_sin_table[64] = {
|
||||
const FLOAT32 ixheaac_phase_vocoder_sin_table[64] = {
|
||||
0.999925f, -0.999322f, 0.998118f, -0.996313f, 0.993907f, -0.990903f,
|
||||
0.987301f, -0.983105f, 0.978317f, -0.972940f, 0.966976f, -0.960431f,
|
||||
0.953306f, -0.945607f, 0.937339f, -0.928506f, 0.919114f, -0.909168f,
|
||||
|
|
@ -1241,7 +1241,7 @@ const FLOAT32 ixheaacd_phase_vocoder_sin_table[64] = {
|
|||
0.085797f, -0.061321f, 0.036807f, -0.012272f,
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_hbe_post_anal_proc_interp_coeff[4][2] = {
|
||||
const FLOAT32 ixheaac_hbe_post_anal_proc_interp_coeff[4][2] = {
|
||||
|
||||
{0.3984033437f, 0.3984033437f},
|
||||
{0.3984033437f, -0.3984033437f},
|
||||
|
|
@ -1249,7 +1249,7 @@ const FLOAT32 ixheaacd_hbe_post_anal_proc_interp_coeff[4][2] = {
|
|||
{-0.3984033437f, 0.3984033437f},
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_hbe_x_prod_cos_table_trans_2[(128 + 128) * 2] = {
|
||||
const FLOAT32 ixheaac_hbe_x_prod_cos_table_trans_2[(128 + 128) * 2] = {
|
||||
|
||||
1.000000f, 0.000000f, 0.991445f, 0.130526f, 0.965926f, 0.258819f,
|
||||
0.923880f, 0.382683f, 0.866025f, 0.500000f, 0.793353f, 0.608761f,
|
||||
|
|
@ -1341,7 +1341,7 @@ const FLOAT32 ixheaacd_hbe_x_prod_cos_table_trans_2[(128 + 128) * 2] = {
|
|||
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_hbe_x_prod_cos_table_trans_3[(128 + 128) * 2] = {
|
||||
const FLOAT32 ixheaac_hbe_x_prod_cos_table_trans_3[(128 + 128) * 2] = {
|
||||
|
||||
1.000000f, 0.000000f, 0.965926f, 0.258819f, 0.866025f, 0.500000f,
|
||||
0.707107f, 0.707107f, 0.500000f, 0.866025f, 0.258819f, 0.965926f,
|
||||
|
|
@ -1433,7 +1433,7 @@ const FLOAT32 ixheaacd_hbe_x_prod_cos_table_trans_3[(128 + 128) * 2] = {
|
|||
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_hbe_x_prod_cos_table_trans_4[(128 + 128) * 2] = {
|
||||
const FLOAT32 ixheaac_hbe_x_prod_cos_table_trans_4[(128 + 128) * 2] = {
|
||||
|
||||
1.000000f, 0.000000f, 0.923880f, 0.382683f, 0.707107f, 0.707107f,
|
||||
0.382683f, 0.923880f, -0.000000f, 1.000000f, -0.382683f, 0.923880f,
|
||||
|
|
@ -1524,7 +1524,7 @@ const FLOAT32 ixheaacd_hbe_x_prod_cos_table_trans_4[(128 + 128) * 2] = {
|
|||
0.923880f, -0.382683f, 0.980785f, -0.195090f,
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_hbe_x_prod_cos_table_trans_4_1[2 * (128 + 128)] = {
|
||||
const FLOAT32 ixheaac_hbe_x_prod_cos_table_trans_4_1[2 * (128 + 128)] = {
|
||||
|
||||
1.000000f, 0.000000f, 0.866025f, 0.500000f, 0.500000f, 0.866025f,
|
||||
-0.000000f, 1.000000f, -0.500000f, 0.866025f, -0.866025f, 0.500000f,
|
||||
|
|
@ -1615,13 +1615,13 @@ const FLOAT32 ixheaacd_hbe_x_prod_cos_table_trans_4_1[2 * (128 + 128)] = {
|
|||
-0.707106f, -0.707107f, -0.608761f, -0.793354f,
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_synth_cos_table_kl_4[16] = {
|
||||
const FLOAT32 ixheaac_synth_cos_table_kl_4[16] = {
|
||||
0.250000000000f, 0.000000000000f, 0.230969882082f, 0.095670860615f,
|
||||
0.176776691433f, 0.176776699160f, 0.095670850519f, 0.230969886264f,
|
||||
-0.000000010928f, 0.250000000000f, -0.095670870711f, 0.230969877900f,
|
||||
0.176776706887f, -0.176776683706f, 0.230969890446f, -0.095670840423f};
|
||||
|
||||
const FLOAT32 ixheaacd_synth_cos_table_kl_8[32] = {
|
||||
const FLOAT32 ixheaac_synth_cos_table_kl_8[32] = {
|
||||
0.125000000000f, 0.000000000000f, 0.122598159917f, 0.024386290922f,
|
||||
0.115484941041f, 0.047835430308f, 0.103933700399f, 0.069446280831f,
|
||||
0.088388345717f, 0.088388349580f, 0.069446276288f, 0.103933703435f,
|
||||
|
|
@ -1631,7 +1631,7 @@ const FLOAT32 ixheaacd_synth_cos_table_kl_8[32] = {
|
|||
0.088388353444f, -0.088388341853f, 0.103933706471f, -0.069446271745f,
|
||||
0.115484945223f, -0.047835420212f, 0.122598162049f, -0.024386280204f};
|
||||
|
||||
const FLOAT32 ixheaacd_synth_cos_table_kl_12[48] = {
|
||||
const FLOAT32 ixheaac_synth_cos_table_kl_12[48] = {
|
||||
0.083333333333f, 0.000000000000f, 0.082620405075f, 0.010877182986f,
|
||||
0.080493818700f, 0.021568254345f, 0.076989960694f, 0.031890286872f,
|
||||
0.072168783042f, 0.041666667718f, 0.066112777434f, 0.050730120288f,
|
||||
|
|
@ -1645,7 +1645,7 @@ const FLOAT32 ixheaacd_synth_cos_table_kl_12[48] = {
|
|||
0.072168786684f, -0.041666661409f, 0.076989963482f, -0.031890280141f,
|
||||
0.080493820586f, -0.021568247308f, 0.082620406026f, -0.010877175763f};
|
||||
|
||||
const FLOAT32 ixheaacd_synth_cos_table_kl_16[64] = {
|
||||
const FLOAT32 ixheaac_synth_cos_table_kl_16[64] = {
|
||||
0.062500000000f, 0.000000000000f, 0.062199045400f, 0.006126071441f,
|
||||
0.061299079959f, 0.012193145461f, 0.059808770835f, 0.018142792819f,
|
||||
0.057742470521f, 0.023917715154f, 0.055120078619f, 0.029462296805f,
|
||||
|
|
@ -1663,7 +1663,7 @@ const FLOAT32 ixheaacd_synth_cos_table_kl_16[64] = {
|
|||
0.057742472612f, -0.023917710106f, 0.059808772421f, -0.018142787590f,
|
||||
0.061299081025f, -0.012193140102f, 0.062199045936f, -0.006126066003f};
|
||||
|
||||
const FLOAT32 ixheaacd_synth_cos_table_kl_20[40 * 20] = {
|
||||
const FLOAT32 ixheaac_synth_cos_table_kl_20[40 * 20] = {
|
||||
0.035355f, -0.035355f, -0.035355f, 0.035355f, 0.035355f, -0.035355f,
|
||||
-0.035355f, 0.035355f, 0.035355f, -0.035355f, -0.035355f, 0.035355f,
|
||||
0.035355f, -0.035355f, -0.035355f, 0.035355f, 0.035355f, -0.035355f,
|
||||
|
|
@ -1801,7 +1801,7 @@ const FLOAT32 ixheaacd_synth_cos_table_kl_20[40 * 20] = {
|
|||
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_analy_cos_sin_table_kl_8[32] = {
|
||||
const FLOAT32 ixheaac_analy_cos_sin_table_kl_8[32] = {
|
||||
1.000000000000f, 0.000000000000f, 0.980785279337f, 0.195090327375f,
|
||||
0.923879528329f, 0.382683442461f, 0.831469603196f, 0.555570246649f,
|
||||
0.707106765732f, 0.707106796641f, 0.555570210304f, 0.831469627481f,
|
||||
|
|
@ -1811,7 +1811,7 @@ const FLOAT32 ixheaacd_analy_cos_sin_table_kl_8[32] = {
|
|||
-0.707106827549f, 0.707106734824f, -0.831469651765f, 0.555570173959f,
|
||||
-0.923879561785f, 0.382683361693f, -0.980785296393f, 0.195090241632f};
|
||||
|
||||
const FLOAT32 ixheaacd_analy_cos_sin_table_kl_16[64] = {
|
||||
const FLOAT32 ixheaac_analy_cos_sin_table_kl_16[64] = {
|
||||
1.000000000000f, 0.000000000000f, 0.995184726404f, 0.098017143048f,
|
||||
0.980785279337f, 0.195090327375f, 0.956940333353f, 0.290284685097f,
|
||||
0.923879528329f, 0.382683442461f, 0.881921257909f, 0.471396748873f,
|
||||
|
|
@ -1829,7 +1829,7 @@ const FLOAT32 ixheaacd_analy_cos_sin_table_kl_16[64] = {
|
|||
-0.923879561785f, 0.382683361693f, -0.956940358731f, 0.290284601439f,
|
||||
-0.980785296393f, 0.195090241632f, -0.995184734973f, 0.098017056047f};
|
||||
|
||||
const FLOAT32 ixheaacd_analy_cos_sin_table_kl_24[96] = {
|
||||
const FLOAT32 ixheaac_analy_cos_sin_table_kl_24[96] = {
|
||||
1.000000000000f, 0.000000000000f, 0.997858923119f, 0.065403131048f,
|
||||
0.991444860898f, 0.130526195832f, 0.980785279337f, 0.195090327375f,
|
||||
0.965925824404f, 0.258819052140f, 0.946930126568f, 0.321439473926f,
|
||||
|
|
@ -1855,7 +1855,7 @@ const FLOAT32 ixheaacd_analy_cos_sin_table_kl_24[96] = {
|
|||
-0.965925847030f, 0.258818967696f, -0.980785296393f, 0.195090241632f,
|
||||
-0.991444872309f, 0.130526109157f, -0.997858941555f, 0.065403044224f};
|
||||
|
||||
const FLOAT32 ixheaacd_analy_cos_sin_table_kl_32[128] = {
|
||||
const FLOAT32 ixheaac_analy_cos_sin_table_kl_32[128] = {
|
||||
1.000000000000f, 0.000000000000f, 0.998795456138f, 0.049067675692f,
|
||||
0.995184726404f, 0.098017143048f, 0.989176509363f, 0.146730478509f,
|
||||
0.980785279337f, 0.195090327375f, 0.970031251535f, 0.242980186528f,
|
||||
|
|
@ -1889,7 +1889,7 @@ const FLOAT32 ixheaacd_analy_cos_sin_table_kl_32[128] = {
|
|||
-0.980785296393f, 0.195090241632f, -0.989176522191f, 0.146730392032f,
|
||||
-0.995184734973f, 0.098017056047f, -0.998795460428f, 0.049067588374f};
|
||||
|
||||
const FLOAT32 ixheaacd_analy_cos_sin_table_kl_40[40 * 40 * 2] = {
|
||||
const FLOAT32 ixheaac_analy_cos_sin_table_kl_40[40 * 40 * 2] = {
|
||||
0.000000f, -1.000000f, 0.039260f, -0.999229f, 0.078459f, -0.996917f,
|
||||
0.117537f, -0.993068f, 0.156434f, -0.987688f, 0.195090f, -0.980785f,
|
||||
0.233445f, -0.972370f, 0.271440f, -0.962455f, 0.309017f, -0.951057f,
|
||||
|
|
@ -2426,7 +2426,7 @@ const FLOAT32 ixheaacd_analy_cos_sin_table_kl_40[40 * 40 * 2] = {
|
|||
-0.999229f, -0.039260f,
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_analy_cos_sin_table_kl_56[56 * 56 * 2] = {
|
||||
const FLOAT32 ixheaac_analy_cos_sin_table_kl_56[56 * 56 * 2] = {
|
||||
0.000000000f, -1.000000000f, 0.028046256f, -0.999606609f, 0.056070447f, -0.998426795f,
|
||||
0.084050521f, -0.996461511f, 0.111964479f, -0.993712187f, 0.139790341f, -0.990181148f,
|
||||
0.167506218f, -0.985871017f, 0.195090324f, -0.980785251f, 0.222520933f, -0.974927902f,
|
||||
|
|
@ -3475,7 +3475,7 @@ const FLOAT32 ixheaacd_analy_cos_sin_table_kl_56[56 * 56 * 2] = {
|
|||
-0.999606609f, -0.028046256f,
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_twiddle_table_fft_float[514] = {
|
||||
const FLOAT32 ixheaac_twiddle_table_fft_float[514] = {
|
||||
1.00000000000000000000f, 0.99998117528260111000f,
|
||||
0.99992470183914450000f, 0.99983058179582340000f,
|
||||
0.99969881869620425000f, 0.99952941750109314000f,
|
||||
|
|
@ -3734,7 +3734,7 @@ const FLOAT32 ixheaacd_twiddle_table_fft_float[514] = {
|
|||
-0.99983058179582340000f, -0.99992470183914450000f,
|
||||
-0.99998117528260111000f, -1.00000000000000000000f};
|
||||
|
||||
const FLOAT32 ixheaacd_twidle_tbl_48[64] = {
|
||||
const FLOAT32 ixheaac_twidle_tbl_48[64] = {
|
||||
1.000000000000f, 0.000000000000f, 1.000000000000f, 0.000000000000f,
|
||||
0.991444885731f, -0.130526185036f, 0.965925812721f, -0.258819043636f,
|
||||
0.965925812721f, -0.258819043636f, 0.866025388241f, -0.500000000000f,
|
||||
|
|
@ -3752,7 +3752,7 @@ const FLOAT32 ixheaacd_twidle_tbl_48[64] = {
|
|||
-0.258819043636f, -0.965925812721f, -0.866025388241f, 0.500000000000f,
|
||||
-0.382683426142f, -0.923879504204f, -0.707106769085f, 0.707106769085f};
|
||||
|
||||
const FLOAT32 ixheaacd_twidle_tbl_24[32] = {
|
||||
const FLOAT32 ixheaac_twidle_tbl_24[32] = {
|
||||
1.000000000000f, 0.000000000000f, 1.000000000000f, 0.000000000000f,
|
||||
0.965925812721f, -0.258819043636f, 0.866025388241f, -0.500000000000f,
|
||||
0.866025388241f, -0.500000000000f, 0.500000000000f, -0.866025388241f,
|
||||
|
|
@ -3762,13 +3762,13 @@ const FLOAT32 ixheaacd_twidle_tbl_24[32] = {
|
|||
0.000000000000f, -1.000000000000f, -1.000000000000f, -0.000000000000f,
|
||||
-0.258819043636f, -0.965925812721f, -0.866025388241f, 0.500000000000f};
|
||||
|
||||
const FLOAT32 ixheaacd_sel_case[5][8] = {{1, -1, 1, 1, 1, 1, -1, 1},
|
||||
const FLOAT32 ixheaac_sel_case[5][8] = {{1, -1, 1, 1, 1, 1, -1, 1},
|
||||
{1, 1, -1, 1, 1, -1, 1, 1},
|
||||
{-1, 1, -1, -1, -1, -1, 1, -1},
|
||||
{-1, -1, 1, -1, -1, 1, -1, -1},
|
||||
{1, -1, 1, 1, 1, 1, -1, 1}};
|
||||
|
||||
const FLOAT32 ixheaacd_sub_samp_qmf_window_coeff_28_36[280 + 360] = {
|
||||
const FLOAT32 ixheaac_sub_samp_qmf_window_coeff_28_36[280 + 360] = {
|
||||
0.000000000000f, -0.000542621361f, -0.000488583522f, -0.000520001457f, -0.000570539269f,
|
||||
-0.000620978128f, -0.000670987472f, -0.000715773669f, -0.000745512953f, -0.000770621584f,
|
||||
-0.000778765010f, -0.000779523922f, -0.000758759677f, -0.000724509649f, -0.000665041502f,
|
||||
|
|
@ -3900,14 +3900,14 @@ const FLOAT32 ixheaacd_sub_samp_qmf_window_coeff_28_36[280 + 360] = {
|
|||
-0.000565432478f, -0.000525322452f, -0.000494276232f, -0.000490735809f, -0.000559715729f,
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_dft_hbe_window_ts_12[13] = {
|
||||
const FLOAT32 ixheaac_dft_hbe_window_ts_12[13] = {
|
||||
0.000000000000000f, 0.017037086855466f, 0.066987298107781f, 0.146446609406726f,
|
||||
0.250000000000000f, 0.370590477448740f, 0.500000000000000f, 0.629409522551260f,
|
||||
0.750000000000000f, 0.853553390593274f, 0.933012701892219f, 0.982962913144534f,
|
||||
1.000000000000000f
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_dft_hbe_window_ts_18[19] = {
|
||||
const FLOAT32 ixheaac_dft_hbe_window_ts_18[19] = {
|
||||
0.000000000000000f, 0.007596123493896f, 0.030153689607046f, 0.066987298107781f,
|
||||
0.116977778440511f, 0.178606195156730f, 0.250000000000000f, 0.328989928337166f,
|
||||
0.413175911166535f, 0.500000000000000f, 0.586824088833465f, 0.671010071662834f,
|
||||
|
|
@ -3915,7 +3915,7 @@ const FLOAT32 ixheaacd_dft_hbe_window_ts_18[19] = {
|
|||
0.969846310392954f, 0.992403876506104f, 1.000000000000000f
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_sine_pi_n_by_1024[1024] = {
|
||||
const FLOAT32 ixheaac_sine_pi_n_by_1024[1024] = {
|
||||
0.0000000000f, 0.0030679568f, 0.0061358846f, 0.0092037548f, 0.0122715383f, 0.0153392063f,
|
||||
0.0184067299f, 0.0214740803f, 0.0245412285f, 0.0276081458f, 0.0306748032f, 0.0337411719f,
|
||||
0.0368072229f, 0.0398729276f, 0.0429382569f, 0.0460031821f, 0.0490676743f, 0.0521317047f,
|
||||
|
|
@ -4089,7 +4089,7 @@ const FLOAT32 ixheaacd_sine_pi_n_by_1024[1024] = {
|
|||
0.0122715383f, 0.0092037548f, 0.0061358846f, 0.0030679568f,
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_sine_pi_n_by_960[960] = {
|
||||
const FLOAT32 ixheaac_sine_pi_n_by_960[960] = {
|
||||
0.0000000000f, 0.0032724865f, 0.0065449380f, 0.0098173193f, 0.0130895956f, 0.0163617316f,
|
||||
0.0196336925f, 0.0229054430f, 0.0261769483f, 0.0294481732f, 0.0327190828f, 0.0359896420f,
|
||||
0.0392598158f, 0.0425295691f, 0.0457988669f, 0.0490676743f, 0.0523359562f, 0.0556036777f,
|
||||
|
|
@ -4252,7 +4252,7 @@ const FLOAT32 ixheaacd_sine_pi_n_by_960[960] = {
|
|||
0.0196336925f, 0.0163617316f, 0.0130895956f, 0.0098173193f, 0.0065449380f, 0.0032724865f,
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_sine_pi_n_by_896[896] = {
|
||||
const FLOAT32 ixheaac_sine_pi_n_by_896[896] = {
|
||||
0.0000000000f, 0.0035062346f, 0.0070124261f, 0.0105185314f, 0.0140245074f, 0.0175303110f,
|
||||
0.0210358991f, 0.0245412285f, 0.0280462563f, 0.0315509392f, 0.0350552343f, 0.0385590984f,
|
||||
0.0420624885f, 0.0455653615f, 0.0490676743f, 0.0525693839f, 0.0560704472f, 0.0595708212f,
|
||||
|
|
@ -4405,7 +4405,7 @@ const FLOAT32 ixheaacd_sine_pi_n_by_896[896] = {
|
|||
0.0070124261f, 0.0035062346f,
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_sine_pi_n_by_832[832] = {
|
||||
const FLOAT32 ixheaac_sine_pi_n_by_832[832] = {
|
||||
0.0000000000f, 0.0037759437f, 0.0075518336f, 0.0113276159f, 0.0151032366f, 0.0188786420f,
|
||||
0.0226537782f, 0.0264285914f, 0.0302030278f, 0.0339770336f, 0.0377505549f, 0.0415235380f,
|
||||
0.0452959291f, 0.0490676743f, 0.0528387200f, 0.0566090123f, 0.0603784974f, 0.0641471217f,
|
||||
|
|
@ -4547,7 +4547,7 @@ const FLOAT32 ixheaacd_sine_pi_n_by_832[832] = {
|
|||
0.0151032366f, 0.0113276159f, 0.0075518336f, 0.0037759437f,
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_sine_pi_n_by_768[768] = {
|
||||
const FLOAT32 ixheaac_sine_pi_n_by_768[768] = {
|
||||
0.0000000000f, 0.0040906040f, 0.0081811396f, 0.0122715383f, 0.0163617316f, 0.0204516512f,
|
||||
0.0245412285f, 0.0286303952f, 0.0327190828f, 0.0368072229f, 0.0408947472f, 0.0449815871f,
|
||||
0.0490676743f, 0.0531529405f, 0.0572373173f, 0.0613207363f, 0.0654031292f, 0.0694844278f,
|
||||
|
|
@ -4678,7 +4678,7 @@ const FLOAT32 ixheaacd_sine_pi_n_by_768[768] = {
|
|||
0.0245412285f, 0.0204516512f, 0.0163617316f, 0.0122715383f, 0.0081811396f, 0.0040906040f,
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_sine_pi_n_by_704[704] = {
|
||||
const FLOAT32 ixheaac_sine_pi_n_by_704[704] = {
|
||||
0.0000000000f, 0.0044624748f, 0.0089248606f, 0.0133870688f, 0.0178490104f, 0.0223105965f,
|
||||
0.0267717384f, 0.0312323471f, 0.0356923338f, 0.0401516098f, 0.0446100863f, 0.0490676743f,
|
||||
0.0535242853f, 0.0579798303f, 0.0624342208f, 0.0668873680f, 0.0713391832f, 0.0757895778f,
|
||||
|
|
@ -4799,7 +4799,7 @@ const FLOAT32 ixheaacd_sine_pi_n_by_704[704] = {
|
|||
0.0089248606f, 0.0044624748f,
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_sine_pi_n_by_640[640] = {
|
||||
const FLOAT32 ixheaac_sine_pi_n_by_640[640] = {
|
||||
0.0000000000f, 0.0049087188f, 0.0098173193f, 0.0147256833f, 0.0196336925f, 0.0245412285f,
|
||||
0.0294481732f, 0.0343544084f, 0.0392598158f, 0.0441642771f, 0.0490676743f, 0.0539698892f,
|
||||
0.0588708037f, 0.0637702996f, 0.0686682589f, 0.0735645636f, 0.0784590957f, 0.0833517373f,
|
||||
|
|
@ -4909,7 +4909,7 @@ const FLOAT32 ixheaacd_sine_pi_n_by_640[640] = {
|
|||
0.0196336925f, 0.0147256833f, 0.0098173193f, 0.0049087188f,
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_sine_pi_n_by_576[576] = {
|
||||
const FLOAT32 ixheaac_sine_pi_n_by_576[576] = {
|
||||
0.0000000000f, 0.0054541269f, 0.0109080915f, 0.0163617316f, 0.0218148850f, 0.0272673895f,
|
||||
0.0327190828f, 0.0381698028f, 0.0436193874f, 0.0490676743f, 0.0545145016f, 0.0599597073f,
|
||||
0.0654031292f, 0.0708446056f, 0.0762839745f, 0.0817210741f, 0.0871557427f, 0.0925878187f,
|
||||
|
|
@ -5008,7 +5008,7 @@ const FLOAT32 ixheaacd_sine_pi_n_by_576[576] = {
|
|||
0.0327190828f, 0.0272673895f, 0.0218148850f, 0.0163617316f, 0.0109080915f, 0.0054541269f,
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_sine_pi_by_2_N[] = {
|
||||
const FLOAT32 ixheaac_sine_pi_by_2_N[] = {
|
||||
0.0015339802f, 0.9999988235f,
|
||||
0.0016362454f, 0.9999986613f,
|
||||
0.0017531200f, 0.9999984633f,
|
||||
|
|
@ -5020,7 +5020,7 @@ const FLOAT32 ixheaacd_sine_pi_by_2_N[] = {
|
|||
0.0049087188f, 0.9999879522f
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_sin_cos_448[] = {
|
||||
const FLOAT32 ixheaac_sin_cos_448[] = {
|
||||
0.014025f, 0.999902f, 0.028046f, 0.999607f, 0.042062f, 0.999115f, 0.056070f, 0.998427f,
|
||||
0.070067f, 0.997542f, 0.084051f, 0.996462f, 0.098017f, 0.995185f, 0.111964f, 0.993712f,
|
||||
0.125890f, 0.992044f, 0.139790f, 0.990181f, 0.153663f, 0.988123f, 0.167506f, 0.985871f,
|
||||
|
|
@ -5050,7 +5050,7 @@ const FLOAT32 ixheaacd_sin_cos_448[] = {
|
|||
0.995185f, 0.098017f, 0.996462f, 0.084051f, 0.997542f, 0.070067f, 0.998427f, 0.056070f,
|
||||
0.999115f, 0.042062f, 0.999607f, 0.028046f, 0.999902f, 0.014025f, 1.000000f, 0.000000f};
|
||||
|
||||
const FLOAT32 ixheaacd_sin_cos_672[] = {
|
||||
const FLOAT32 ixheaac_sin_cos_672[] = {
|
||||
0.009350f, 0.999956f, 0.018699f, 0.999825f, 0.028046f,
|
||||
0.999607f, 0.037391f, 0.999301f, 0.046733f, 0.998907f,
|
||||
0.056070f, 0.998427f, 0.065403f, 0.997859f, 0.074730f,
|
||||
|
|
@ -5120,7 +5120,7 @@ const FLOAT32 ixheaacd_sin_cos_672[] = {
|
|||
0.999825f, 0.018699f, 0.999956f, 0.009350f, 1.000000f,
|
||||
0.000000f};
|
||||
|
||||
const FLOAT32 ixheaacd_sin_cos_512[] = {
|
||||
const FLOAT32 ixheaac_sin_cos_512[] = {
|
||||
0.012272f, 0.999925f, 0.024541f, 0.999699f, 0.036807f, 0.999322f, 0.049068f, 0.998795f,
|
||||
0.061321f, 0.998118f, 0.073565f, 0.997290f, 0.085797f, 0.996313f, 0.098017f, 0.995185f,
|
||||
0.110222f, 0.993907f, 0.122411f, 0.992480f, 0.134581f, 0.990903f, 0.146730f, 0.989177f,
|
||||
|
|
@ -5182,7 +5182,7 @@ const FLOAT32 ixheaacd_sin_cos_512[] = {
|
|||
0.995185f, 0.098017f, 0.996462f, 0.084051f, 0.997542f, 0.070067f, 0.998427f, 0.056070f,
|
||||
0.999115f, 0.042062f, 0.999607f, 0.028046f, 0.999902f, 0.014025f, 1.000000f, 0.000000f};
|
||||
|
||||
const FLOAT32 ixheaacd_sin_cos_576[] = {
|
||||
const FLOAT32 ixheaac_sin_cos_576[] = {
|
||||
0.010908f, 0.999941f, 0.021815f, 0.999762f, 0.032719f, 0.999465f, 0.043619f, 0.999048f,
|
||||
0.054515f, 0.998513f, 0.065403f, 0.997859f, 0.076284f, 0.997086f, 0.087156f, 0.996195f,
|
||||
0.098017f, 0.995185f, 0.108867f, 0.994056f, 0.119704f, 0.992810f, 0.130526f, 0.991445f,
|
||||
|
|
@ -5220,7 +5220,7 @@ const FLOAT32 ixheaacd_sin_cos_576[] = {
|
|||
0.997086f, 0.076284f, 0.997859f, 0.065403f, 0.998513f, 0.054515f, 0.999048f, 0.043619f,
|
||||
0.999465f, 0.032719f, 0.999762f, 0.021815f, 0.999941f, 0.010908f, 1.000000f, 0.000000f};
|
||||
|
||||
const FLOAT32 ixheaacd_sin_cos_384[] = {
|
||||
const FLOAT32 ixheaac_sin_cos_384[] = {
|
||||
0.016362f, 0.999866f, 0.032719f, 0.999465f, 0.049068f, 0.998795f,
|
||||
0.065403f, 0.997859f, 0.081721f, 0.996655f, 0.098017f, 0.995185f,
|
||||
0.114287f, 0.993448f, 0.130526f, 0.991445f, 0.146730f, 0.989177f,
|
||||
|
|
@ -5299,7 +5299,7 @@ const FLOAT32 ixheaacd_sin_cos_384[] = {
|
|||
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_sin_cos_768[] = {
|
||||
const FLOAT32 ixheaac_sin_cos_768[] = {
|
||||
0.008181f, 0.999967f, 0.016362f, 0.999866f, 0.024541f, 0.999699f, 0.032719f, 0.999465f,
|
||||
0.040895f, 0.999163f, 0.049068f, 0.998795f, 0.057237f, 0.998361f, 0.065403f, 0.997859f,
|
||||
0.073565f, 0.997290f, 0.081721f, 0.996655f, 0.089872f, 0.995953f, 0.098017f, 0.995185f,
|
||||
83
common/ixheaac_esbr_rom.h
Normal file
83
common/ixheaac_esbr_rom.h
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
/******************************************************************************
|
||||
* *
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#ifndef IXHEAAC_ESBR_ROM_H
|
||||
#define IXHEAAC_ESBR_ROM_H
|
||||
|
||||
extern const FLOAT32 ixheaac_sub_samp_qmf_window_coeff[40 + 80 + 120 + 160 +
|
||||
200 + 240 + 320 + 400 + 440];
|
||||
extern const FLOAT32 ixheaac_random_phase[512][2];
|
||||
extern const FLOAT32 ixheaac_hphase_tbl[2][8];
|
||||
|
||||
extern const FLOAT32 ixheaac_g_lim_gains[4];
|
||||
|
||||
typedef FLOAT32 ia_fir_table_struct[5];
|
||||
extern const ia_fir_table_struct ixheaac_fir_0;
|
||||
extern const ia_fir_table_struct ixheaac_fir_1;
|
||||
extern const ia_fir_table_struct ixheaac_fir_2;
|
||||
extern const ia_fir_table_struct ixheaac_fir_3;
|
||||
extern const ia_fir_table_struct ixheaac_fir_4;
|
||||
extern const ia_fir_table_struct *ixheaac_fir_table[5];
|
||||
extern const FLOAT32 ixheaac_q_gamma_table[4];
|
||||
extern const WORD32 ixheaac_start_subband2kL_tbl[33];
|
||||
extern const FLOAT32 ixheaac_cos_table_trans_qmf[7][32 * 2];
|
||||
|
||||
extern const FLOAT32 ixheaac_phase_vocoder_cos_table[64];
|
||||
extern const FLOAT32 ixheaac_phase_vocoder_sin_table[64];
|
||||
extern const FLOAT32 ixheaac_hbe_post_anal_proc_interp_coeff[4][2];
|
||||
|
||||
extern const FLOAT32 ixheaac_hbe_x_prod_cos_table_trans_2[2 * (128 + 128)];
|
||||
extern const FLOAT32 ixheaac_hbe_x_prod_cos_table_trans_3[2 * (128 + 128)];
|
||||
extern const FLOAT32 ixheaac_hbe_x_prod_cos_table_trans_4[2 * (128 + 128)];
|
||||
extern const FLOAT32 ixheaac_hbe_x_prod_cos_table_trans_4_1[2 * (128 + 128)];
|
||||
|
||||
extern const FLOAT32 ixheaac_synth_cos_table_kl_4[16];
|
||||
extern const FLOAT32 ixheaac_synth_cos_table_kl_8[32];
|
||||
extern const FLOAT32 ixheaac_synth_cos_table_kl_12[48];
|
||||
extern const FLOAT32 ixheaac_synth_cos_table_kl_16[64];
|
||||
extern const FLOAT32 ixheaac_synth_cos_table_kl_20[40 * 20];
|
||||
extern const FLOAT32 ixheaac_analy_cos_sin_table_kl_8[32];
|
||||
extern const FLOAT32 ixheaac_analy_cos_sin_table_kl_16[64];
|
||||
extern const FLOAT32 ixheaac_analy_cos_sin_table_kl_24[96];
|
||||
extern const FLOAT32 ixheaac_analy_cos_sin_table_kl_32[128];
|
||||
extern const FLOAT32 ixheaac_analy_cos_sin_table_kl_40[40 * 40 * 2];
|
||||
|
||||
extern const FLOAT32 ixheaac_dft_hbe_window_ts_12[13];
|
||||
extern const FLOAT32 ixheaac_dft_hbe_window_ts_18[19];
|
||||
|
||||
extern const FLOAT32 ixheaac_sine_pi_n_by_1024[1024];
|
||||
extern const FLOAT32 ixheaac_sine_pi_n_by_960[960];
|
||||
extern const FLOAT32 ixheaac_sine_pi_n_by_896[896];
|
||||
extern const FLOAT32 ixheaac_sine_pi_n_by_832[832];
|
||||
extern const FLOAT32 ixheaac_sine_pi_n_by_768[768];
|
||||
extern const FLOAT32 ixheaac_sine_pi_n_by_704[704];
|
||||
extern const FLOAT32 ixheaac_sine_pi_n_by_640[640];
|
||||
extern const FLOAT32 ixheaac_sine_pi_n_by_576[576];
|
||||
extern const FLOAT32 ixheaac_sine_pi_by_2_N[];
|
||||
extern const FLOAT32 ixheaac_sin_cos_448[];
|
||||
extern const FLOAT32 ixheaac_sin_cos_672[];
|
||||
extern const FLOAT32 ixheaac_sin_cos_512[];
|
||||
extern const FLOAT32 ixheaac_sin_cos_576[];
|
||||
extern const FLOAT32 ixheaac_sin_cos_384[];
|
||||
extern const FLOAT32 ixheaac_sin_cos_768[];
|
||||
|
||||
extern const FLOAT32 ixheaac_sel_case[5][8];
|
||||
extern const FLOAT32 ixheaac_sub_samp_qmf_window_coeff_28_36[280 + 360];
|
||||
extern const FLOAT32 ixheaac_analy_cos_sin_table_kl_56[56 * 56 * 2];
|
||||
#endif /* IXHEAAC_ESBR_ROM_H */
|
||||
|
|
@ -17,9 +17,9 @@
|
|||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
const FLOAT64 ixheaacd_twid_tbl_fft_double[514] = {
|
||||
const FLOAT64 ixheaac_twid_tbl_fft_double[514] = {
|
||||
1.00000000000000000000, 0.99998117528260111000, 0.99992470183914450000,
|
||||
0.99983058179582340000, 0.99969881869620425000, 0.99952941750109314000,
|
||||
0.99932238458834954000, 0.99907772775264536000, 0.99879545620517241000,
|
||||
|
|
@ -193,7 +193,7 @@ const FLOAT64 ixheaacd_twid_tbl_fft_double[514] = {
|
|||
-0.99983058179582340000, -0.99992470183914450000, -0.99998117528260111000,
|
||||
-1.00000000000000000000};
|
||||
|
||||
const FLOAT64 ixheaacd_twid_tbl_fft_ntwt3r[1155] = {
|
||||
const FLOAT64 ixheaac_twid_tbl_fft_ntwt3r[1155] = {
|
||||
1.00000000000000000000, 1.00000000000000000000, 1.00000000000000000000,
|
||||
1.00000000000000000000, 0.99986613790956180000, 0.99946458747636568000,
|
||||
1.00000000000000000000, 0.99946458747636568000, 0.99785892323860348000,
|
||||
|
|
@ -580,7 +580,7 @@ const FLOAT64 ixheaacd_twid_tbl_fft_ntwt3r[1155] = {
|
|||
1.00000000000000000000, 0.99986613790956180000, 0.99946458747636557000,
|
||||
1.00000000000000000000, 1.00000000000000000000, 1.00000000000000000000};
|
||||
|
||||
const FLOAT64 ixheaacd_twid_tbl_fft_ntwt3i[1155] = {
|
||||
const FLOAT64 ixheaac_twid_tbl_fft_ntwt3i[1155] = {
|
||||
0.00000000000000000000, 0.00000000000000000000, 0.00000000000000000000,
|
||||
0.00000000000000000000, -0.01636173162648678000, -0.03271908282177613700,
|
||||
0.00000000000000000000, -0.03271908282177613700, -0.06540312923014306200,
|
||||
|
|
@ -967,7 +967,7 @@ const FLOAT64 ixheaacd_twid_tbl_fft_ntwt3i[1155] = {
|
|||
0.00000000000000000000, 0.01636173162648756400, 0.03271908282177770500,
|
||||
0.00000000000000000000, 0.00000000000000024492, 0.00000000000000048984};
|
||||
|
||||
const FLOAT32 ixheaacd_twid_tbl_fft_224[372] = {
|
||||
const FLOAT32 ixheaac_twid_tbl_fft_224[372] = {
|
||||
-0.028046f, 0.999607f, -0.056070f, 0.998427f, -0.084051f, 0.996461f, -0.111964f,
|
||||
0.993712f, -0.139790f, 0.990181f, -0.167506f, 0.985871f, -0.056070f, 0.998427f,
|
||||
-0.111964f, 0.993712f, -0.167506f, 0.985871f, -0.222521f, 0.974928f, -0.276836f,
|
||||
|
|
@ -1023,7 +1023,7 @@ const FLOAT32 ixheaacd_twid_tbl_fft_224[372] = {
|
|||
-0.508075f, -0.861313f, 0.330279f, -0.943883f, 0.934249f, -0.356622f, 0.875223f,
|
||||
0.483719f};
|
||||
|
||||
const FLOAT32 ixheaacd_twid_tbl_fft_288[380] = {
|
||||
const FLOAT32 ixheaac_twid_tbl_fft_288[380] = {
|
||||
-0.021815f, 0.999762f, -0.043619f, 0.999048f, -0.043619f, 0.999048f, -0.087156f,
|
||||
0.996195f, -0.065403f, 0.997859f, -0.130526f, 0.991445f, -0.087156f, 0.996195f,
|
||||
-0.173648f, 0.984808f, -0.108867f, 0.994056f, -0.216440f, 0.976296f, -0.130526f,
|
||||
|
|
@ -1080,7 +1080,7 @@ const FLOAT32 ixheaacd_twid_tbl_fft_288[380] = {
|
|||
-0.608761f, -0.887011f, -0.461749f, 0.819152f, -0.573576f, -0.876727f, -0.480989f,
|
||||
0.843391f, -0.537300f};
|
||||
|
||||
const FLOAT32 ixheaacd_twid_tbl_fft_336[564] = {
|
||||
const FLOAT32 ixheaac_twid_tbl_fft_336[564] = {
|
||||
-0.018699f, 0.999825f, -0.037391f, 0.999301f, -0.056070f, 0.998427f, -0.074730f,
|
||||
0.997204f, -0.093364f, 0.995632f, -0.111964f, 0.993712f, -0.130526f, 0.991445f,
|
||||
-0.149042f, 0.988831f, -0.167506f, 0.985871f, -0.185912f, 0.982566f, -0.204252f,
|
||||
|
|
@ -1165,7 +1165,7 @@ const FLOAT32 ixheaacd_twid_tbl_fft_336[564] = {
|
|||
|
||||
};
|
||||
|
||||
const FLOAT32 ixheaacd_twid_tbl_fft_168[276] = {
|
||||
const FLOAT32 ixheaac_twid_tbl_fft_168[276] = {
|
||||
-0.037391f, 0.999301f, -0.074730f, 0.997204f, -0.111964f, 0.993712f, -0.149042f,
|
||||
0.988831f, -0.185912f, 0.982566f, -0.222521f, 0.974928f, -0.258819f, 0.965926f,
|
||||
-0.294755f, 0.955573f, -0.330279f, 0.943883f, -0.365341f, 0.930874f, -0.399892f,
|
||||
31
common/ixheaac_fft_ifft_rom.h
Normal file
31
common/ixheaac_fft_ifft_rom.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/******************************************************************************
|
||||
* *
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#ifndef IXHEAAC_FFT_IFFT_ROM_H
|
||||
#define IXHEAAC_FFT_IFFT_ROM_H
|
||||
|
||||
extern const FLOAT64 ixheaac_twid_tbl_fft_double[514];
|
||||
extern const FLOAT64 ixheaac_twid_tbl_fft_ntwt3r[1155];
|
||||
extern const FLOAT64 ixheaac_twid_tbl_fft_ntwt3i[1155];
|
||||
extern const FLOAT32 ixheaac_twid_tbl_fft_224[372];
|
||||
extern const FLOAT32 ixheaac_twid_tbl_fft_288[380];
|
||||
extern const FLOAT32 ixheaac_twid_tbl_fft_336[564];
|
||||
extern const FLOAT32 ixheaac_twid_tbl_fft_168[276];
|
||||
|
||||
#endif /* IXHEAAC_FFT_IFFT_ROM_H */
|
||||
|
|
@ -17,8 +17,8 @@
|
|||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#ifndef IXHEAACD_SBR_CONST_H
|
||||
#define IXHEAACD_SBR_CONST_H
|
||||
#ifndef IXHEAAC_SBR_CONST_H
|
||||
#define IXHEAAC_SBR_CONST_H
|
||||
|
||||
#define SBR_AMPLITUDE_RESOLUTION_1_5 0
|
||||
#define SBR_AMPLITUDE_RESOLUTION_3_0 1
|
||||
|
|
@ -219,23 +219,6 @@
|
|||
#define SBR_ENVT_NUMENV 0
|
||||
#define SBR_ENVT_TRANIDX 3
|
||||
|
||||
static const int ixheaacd_ld_env_table_512[LD_ENV_TBL_512][LD_ENV_TBL_SIZE] = {
|
||||
{2, 4, -1, 0}, {2, 5, -1, 0}, {3, 2, 6, 1}, {3, 3, 7, 1},
|
||||
{3, 4, 8, 1}, {3, 5, 9, 1}, {3, 6, 10, 1}, {3, 7, 11, 1},
|
||||
{3, 8, 12, 1}, {3, 9, 13, 1}, {3, 10, 14, 1}, {2, 11, -1, 1},
|
||||
{2, 12, -1, 1}, {2, 13, -1, 1}, {2, 14, -1, 1}, {2, 15, -1, 1},
|
||||
};
|
||||
|
||||
static const int ixheaacd_ld_env_table_480[LD_ENV_TBL_480][LD_ENV_TBL_SIZE] = {
|
||||
{2, 4, -1, 0}, {2, 5, -1, 0}, {3, 2, 6, 1}, {3, 3, 7, 1},
|
||||
{3, 4, 8, 1}, {3, 5, 9, 1}, {3, 6, 10, 1}, {3, 7, 11, 1},
|
||||
{3, 8, 12, 1}, {3, 9, 13, 1}, {2, 10, -1, 1}, {2, 11, -1, 1},
|
||||
{2, 12, -1, 1}, {2, 13, -1, 1}, {2, 14, -1, 1},
|
||||
};
|
||||
|
||||
static const int ixheaacd_ld_env_table_time_slot[LD_ENV_TIME_SLOT] = {
|
||||
8, 5, 0, 0, 0, 0, 0};
|
||||
|
||||
#define SBR_CLA_BITS 2
|
||||
#define SBR_ABS_BITS 2
|
||||
#define SBR_RES_BITS 1
|
||||
|
|
@ -250,4 +233,4 @@ static const int ixheaacd_ld_env_table_time_slot[LD_ENV_TIME_SLOT] = {
|
|||
|
||||
#define LEN_NIBBLE (4)
|
||||
|
||||
#endif
|
||||
#endif /* IXHEAAC_SBR_CONST_H */
|
||||
90
common/ixheaac_type_def.h
Normal file
90
common/ixheaac_type_def.h
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
/******************************************************************************
|
||||
* *
|
||||
* Copyright (C) 2023 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#ifndef IXHEAAC_TYPE_DEF_H
|
||||
#define IXHEAAC_TYPE_DEF_H
|
||||
|
||||
/****************************************************************************/
|
||||
/* types type define prefix examples
|
||||
* bytes */
|
||||
/************************ *********** ****** **************** ***** */
|
||||
|
||||
#define SIZE_T size_t
|
||||
|
||||
typedef char CHAR8; /* c CHAR8 c_name 1 */
|
||||
typedef char* pCHAR8; /* pc pCHAR8 pc_nmae 1 */
|
||||
|
||||
typedef signed char WORD8; /* b WORD8 b_name 1 */
|
||||
typedef signed char* pWORD8; /* pb pWORD8 pb_nmae 1 */
|
||||
|
||||
typedef unsigned char UWORD8; /* ub UWORD8 ub_count 1 */
|
||||
typedef unsigned char* pUWORD8; /* pub pUWORD8 pub_count 1 */
|
||||
|
||||
typedef signed short WORD16; /* s WORD16 s_count 2 */
|
||||
typedef signed short* pWORD16; /* ps pWORD16 ps_count 2 */
|
||||
typedef unsigned short UWORD16; /* us UWORD16 us_count 2 */
|
||||
typedef unsigned short* pUWORD16; /* pus pUWORD16 pus_count 2 */
|
||||
|
||||
typedef signed int WORD24; /* k WORD24 k_count 3 */
|
||||
typedef signed int* pWORD24; /* pk pWORD24 pk_count 3 */
|
||||
typedef unsigned int UWORD24; /* uk UWORD24 uk_count 3 */
|
||||
typedef unsigned int* pUWORD24; /* puk pUWORD24 puk_count 3 */
|
||||
|
||||
typedef signed int WORD32; /* i WORD32 i_count 4 */
|
||||
typedef signed int* pWORD32; /* pi pWORD32 pi_count 4 */
|
||||
typedef unsigned int UWORD32; /* ui UWORD32 ui_count 4 */
|
||||
typedef unsigned int* pUWORD32; /* pui pUWORD32 pui_count 4 */
|
||||
|
||||
typedef signed long long WORD40; /* m WORD40 m_count 5 */
|
||||
typedef signed long long* pWORD40; /* pm pWORD40 pm_count 5 */
|
||||
typedef unsigned long long UWORD40; /* um UWORD40 um_count 5 */
|
||||
typedef unsigned long long* pUWORD40; /* pum pUWORD40 pum_count 5 */
|
||||
|
||||
typedef signed long long WORD64; /* h WORD64 h_count 8 */
|
||||
typedef signed long long* pWORD64; /* ph pWORD64 ph_count 8 */
|
||||
typedef unsigned long long UWORD64; /* uh UWORD64 uh_count 8 */
|
||||
typedef unsigned long long* pUWORD64; /* puh pUWORD64 puh_count 8 */
|
||||
|
||||
typedef float FLOAT32; /* f FLOAT32 f_count 4
|
||||
*/
|
||||
typedef float* pFLOAT32; /* pf pFLOAT32 pf_count 4 */
|
||||
typedef double FLOAT64; /* d UFLOAT64 d_count 8
|
||||
*/
|
||||
typedef double* pFlOAT64; /* pd pFLOAT64 pd_count 8 */
|
||||
|
||||
typedef void VOID; /* v VOID v_flag 4 */
|
||||
typedef void* pVOID; /* pv pVOID pv_flag 4 */
|
||||
|
||||
/* variable size types: platform optimized implementation */
|
||||
typedef signed int BOOL; /* bool BOOL bool_true */
|
||||
typedef unsigned int UBOOL; /* ubool BOOL ubool_true */
|
||||
typedef signed int FLAG; /* flag FLAG flag_false */
|
||||
typedef unsigned int UFLAG; /* uflag FLAG uflag_false */
|
||||
typedef signed int LOOPIDX; /* lp LOOPIDX lp_index */
|
||||
typedef unsigned int ULOOPIDX; /* ulp SLOOPIDX ulp_index */
|
||||
typedef signed int WORD; /* lp LOOPIDX lp_index */
|
||||
typedef unsigned int UWORD; /* ulp SLOOPIDX ulp_index */
|
||||
|
||||
typedef LOOPIDX LOOPINDEX; /* lp LOOPIDX lp_index */
|
||||
typedef ULOOPIDX ULOOPINDEX; /* ulp SLOOPIDX ulp_index */
|
||||
|
||||
typedef WORD32 IA_ERRORCODE;
|
||||
#define PLATFORM_INLINE __inline
|
||||
|
||||
#endif /* IXHEAAC_TYPE_DEF_H */
|
||||
|
|
@ -185,7 +185,7 @@ RADIX4_BFLY:
|
|||
LDR r1, [sp, #0x14]
|
||||
LDR r2, [sp, #0x10]
|
||||
|
||||
SMULL r3, r4, r6, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r3, r4, r6, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r6, r6, r1 @mult32x16hin32(x1r,W1h)
|
||||
|
|
@ -194,7 +194,7 @@ RADIX4_BFLY:
|
|||
SMULL r3, r5, r7, r1 @mult32x16hin32(x1i,W1h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r7, r7, r2 @ixheaacd_mac32(ixheaacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r7, r7, r2 @ixheaac_mac32(ixheaac_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r7, r3, r7, LSL#1
|
||||
ADD r7, r7, r6
|
||||
|
|
@ -203,7 +203,7 @@ RADIX4_BFLY:
|
|||
LDR r1, [sp, #0x0c]
|
||||
LDR r2, [sp, #0x08]
|
||||
|
||||
SMULL r3, r4, r8, r2 @ixheaacd_mult32(x2r,w2l)
|
||||
SMULL r3, r4, r8, r2 @ixheaac_mult32(x2r,w2l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r8, r8, r1 @mult32x16hin32(x2r,W2h)
|
||||
|
|
@ -212,7 +212,7 @@ RADIX4_BFLY:
|
|||
SMULL r3, r5, r9, r1 @mult32x16hin32(x2i,W2h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r9, r3, r9, LSL#1
|
||||
ADD r9, r9, r8
|
||||
|
|
@ -221,7 +221,7 @@ RADIX4_BFLY:
|
|||
LDR r1, [sp, #0x04]
|
||||
LDR r2, [sp]
|
||||
|
||||
SMULL r3, r4, r10, r2 @ixheaacd_mult32(x3r,w3l)
|
||||
SMULL r3, r4, r10, r2 @ixheaac_mult32(x3r,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r10, r10, r1 @mult32x16hin32(x3r,W3h)
|
||||
|
|
@ -230,7 +230,7 @@ RADIX4_BFLY:
|
|||
SMULL r3, r5, r11, r1 @mult32x16hin32(x3i,W3h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r11, r11, r2 @ixheaacd_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
SMULL r3, r11, r11, r2 @ixheaac_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r11, r3, r11, LSL#1
|
||||
ADD r11, r11, r10
|
||||
|
|
@ -313,7 +313,7 @@ RADIX4_BFLY_2:
|
|||
LDR r1, [sp, #0x14]
|
||||
LDR r2, [sp, #0x10]
|
||||
|
||||
SMULL r3, r4, r6, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r3, r4, r6, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r6, r6, r1 @mult32x16hin32(x1r,W1h)
|
||||
|
|
@ -322,7 +322,7 @@ RADIX4_BFLY_2:
|
|||
SMULL r3, r5, r7, r1 @mult32x16hin32(x1i,W1h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r7, r7, r2 @ixheaacd_mac32(ixheaacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r7, r7, r2 @ixheaac_mac32(ixheaac_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r7, r3, r7, LSL#1
|
||||
ADD r7, r7, r6
|
||||
|
|
@ -331,7 +331,7 @@ RADIX4_BFLY_2:
|
|||
LDR r1, [sp, #0x0c]
|
||||
LDR r2, [sp, #0x08]
|
||||
|
||||
SMULL r3, r4, r8, r2 @ixheaacd_mult32(x2r,w2l)
|
||||
SMULL r3, r4, r8, r2 @ixheaac_mult32(x2r,w2l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r8, r8, r1 @mult32x16hin32(x2r,W2h)
|
||||
|
|
@ -340,7 +340,7 @@ RADIX4_BFLY_2:
|
|||
SMULL r3, r5, r9, r1 @mult32x16hin32(x2i,W2h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r9, r3, r9, LSL#1
|
||||
ADD r9, r9, r8
|
||||
|
|
@ -349,7 +349,7 @@ RADIX4_BFLY_2:
|
|||
LDR r1, [sp, #0x04]
|
||||
LDR r2, [sp]
|
||||
|
||||
SMULL r3, r4, r10, r2 @ixheaacd_mult32(x3r,w3l)
|
||||
SMULL r3, r4, r10, r2 @ixheaac_mult32(x3r,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r10, r10, r1 @mult32x16hin32(x3r,W3h)
|
||||
|
|
@ -358,7 +358,7 @@ RADIX4_BFLY_2:
|
|||
SMULL r3, r5, r11, r1 @mult32x16hin32(x3i,W3h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r11, r11, r2 @ixheaacd_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
SMULL r3, r11, r11, r2 @ixheaac_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r11, r3, r11, LSL#1
|
||||
ADD r10, r11, r10
|
||||
|
|
@ -445,7 +445,7 @@ RADIX4_BFLY_3:
|
|||
LDR r1, [sp, #0x14]
|
||||
LDR r2, [sp, #0x10]
|
||||
|
||||
SMULL r3, r4, r6, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r3, r4, r6, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r6, r6, r1 @mult32x16hin32(x1r,W1h)
|
||||
|
|
@ -454,7 +454,7 @@ RADIX4_BFLY_3:
|
|||
SMULL r3, r5, r7, r1 @mult32x16hin32(x1i,W1h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r7, r7, r2 @ixheaacd_mac32(ixheaacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r7, r7, r2 @ixheaac_mac32(ixheaac_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r7, r3, r7, LSL#1
|
||||
ADD r7, r7, r6
|
||||
|
|
@ -463,7 +463,7 @@ RADIX4_BFLY_3:
|
|||
LDR r1, [sp, #0x0c]
|
||||
LDR r2, [sp, #0x08]
|
||||
|
||||
SMULL r3, r4, r8, r2 @ixheaacd_mult32(x2r,w2l)
|
||||
SMULL r3, r4, r8, r2 @ixheaac_mult32(x2r,w2l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r8, r8, r1 @mult32x16hin32(x2r,W2h)
|
||||
|
|
@ -472,7 +472,7 @@ RADIX4_BFLY_3:
|
|||
SMULL r3, r5, r9, r1 @mult32x16hin32(x2i,W2h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r9, r3, r9, LSL#1
|
||||
ADD r8, r9, r8
|
||||
|
|
@ -481,7 +481,7 @@ RADIX4_BFLY_3:
|
|||
LDR r1, [sp, #0x04]
|
||||
LDR r2, [sp]
|
||||
|
||||
SMULL r3, r4, r10, r2 @ixheaacd_mult32(x3r,w3l)
|
||||
SMULL r3, r4, r10, r2 @ixheaac_mult32(x3r,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r10, r10, r1 @mult32x16hin32(x3r,W3h)
|
||||
|
|
@ -490,7 +490,7 @@ RADIX4_BFLY_3:
|
|||
SMULL r3, r5, r11, r1 @mult32x16hin32(x3i,W3h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r11, r11, r2 @ixheaacd_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
SMULL r3, r11, r11, r2 @ixheaac_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r11, r3, r11, LSL#1
|
||||
ADD r10, r11, r10
|
||||
|
|
@ -575,7 +575,7 @@ RADIX4_BFLY_4:
|
|||
LDR r1, [sp, #0x14]
|
||||
LDR r2, [sp, #0x10]
|
||||
|
||||
SMULL r3, r4, r6, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r3, r4, r6, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r6, r6, r1 @mult32x16hin32(x1r,W1h)
|
||||
|
|
@ -584,7 +584,7 @@ RADIX4_BFLY_4:
|
|||
SMULL r3, r5, r7, r1 @mult32x16hin32(x1i,W1h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r7, r7, r2 @ixheaacd_mac32(ixheaacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r7, r7, r2 @ixheaac_mac32(ixheaac_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r7, r3, r7, LSL#1
|
||||
ADD r7, r7, r6
|
||||
|
|
@ -593,7 +593,7 @@ RADIX4_BFLY_4:
|
|||
LDR r1, [sp, #0x0c]
|
||||
LDR r2, [sp, #0x08]
|
||||
|
||||
SMULL r3, r4, r8, r2 @ixheaacd_mult32(x2r,w2l)
|
||||
SMULL r3, r4, r8, r2 @ixheaac_mult32(x2r,w2l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r8, r8, r1 @mult32x16hin32(x2r,W2h)
|
||||
|
|
@ -602,7 +602,7 @@ RADIX4_BFLY_4:
|
|||
SMULL r3, r5, r9, r1 @mult32x16hin32(x2i,W2h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r9, r3, r9, LSL#1
|
||||
ADD r8, r9, r8
|
||||
|
|
@ -611,7 +611,7 @@ RADIX4_BFLY_4:
|
|||
LDR r1, [sp, #0x04]
|
||||
LDR r2, [sp]
|
||||
|
||||
SMULL r3, r4, r10, r2 @ixheaacd_mult32(x3r,w3l)
|
||||
SMULL r3, r4, r10, r2 @ixheaac_mult32(x3r,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r10, r10, r1 @mult32x16hin32(x3r,W3h)
|
||||
|
|
@ -620,7 +620,7 @@ RADIX4_BFLY_4:
|
|||
SMULL r3, r5, r11, r1 @mult32x16hin32(x3i,W3h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r11, r11, r2 @ixheaacd_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
SMULL r3, r11, r11, r2 @ixheaac_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r11, r3, r11, LSL#1
|
||||
ADD r11, r11, r10
|
||||
|
|
@ -724,10 +724,10 @@ RADIX2_BFLY:
|
|||
ADD r1, r1, r4, LSL #3
|
||||
STR r1, [sp, #0x18]
|
||||
|
||||
SMULL r1, r8, r8, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r1, r8, r8, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r1, r1, #31
|
||||
ORR r8, r1, r8, LSL#1
|
||||
SMULL r1, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r1, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r1, r1, #31
|
||||
ORR r9, r1, r9, LSL#1
|
||||
|
||||
|
|
@ -777,10 +777,10 @@ RADIX2_BFLY_2:
|
|||
ADD r1, r1, r4, LSL #3
|
||||
STR r1, [sp, #0x18]
|
||||
|
||||
SMULL r1, r8, r8, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r1, r8, r8, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r1, r1, #31
|
||||
ORR r8, r1, r8, LSL#1
|
||||
SMULL r1, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r1, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r1, r1, #31
|
||||
ORR r9, r1, r9, LSL#1
|
||||
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ RADIX4_BFLY:
|
|||
LDR r1, [sp, #0x14]
|
||||
LDR r2, [sp, #0x10]
|
||||
|
||||
SMULL r3, r4, r6, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r3, r4, r6, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r6, r6, r1 @mult32x16hin32(x1r,W1h)
|
||||
|
|
@ -194,7 +194,7 @@ RADIX4_BFLY:
|
|||
SMULL r3, r5, r7, r1 @mult32x16hin32(x1i,W1h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r7, r7, r2 @ixheaacd_mac32(ixheaacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r7, r7, r2 @ixheaac_mac32(ixheaac_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r7, r3, r7, LSL#1
|
||||
SUB r7, r7, r6
|
||||
|
|
@ -203,7 +203,7 @@ RADIX4_BFLY:
|
|||
LDR r1, [sp, #0x0c]
|
||||
LDR r2, [sp, #0x08]
|
||||
|
||||
SMULL r3, r4, r8, r2 @ixheaacd_mult32(x2r,w2l)
|
||||
SMULL r3, r4, r8, r2 @ixheaac_mult32(x2r,w2l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r8, r8, r1 @mult32x16hin32(x2r,W2h)
|
||||
|
|
@ -212,7 +212,7 @@ RADIX4_BFLY:
|
|||
SMULL r3, r5, r9, r1 @mult32x16hin32(x2i,W2h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r9, r3, r9, LSL#1
|
||||
SUB r9, r9, r8
|
||||
|
|
@ -221,7 +221,7 @@ RADIX4_BFLY:
|
|||
LDR r1, [sp, #0x04]
|
||||
LDR r2, [sp]
|
||||
|
||||
SMULL r3, r4, r10, r2 @ixheaacd_mult32(x3r,w3l)
|
||||
SMULL r3, r4, r10, r2 @ixheaac_mult32(x3r,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r10, r10, r1 @mult32x16hin32(x3r,W3h)
|
||||
|
|
@ -230,7 +230,7 @@ RADIX4_BFLY:
|
|||
SMULL r3, r5, r11, r1 @mult32x16hin32(x3i,W3h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r11, r11, r2 @ixheaacd_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
SMULL r3, r11, r11, r2 @ixheaac_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r11, r3, r11, LSL#1
|
||||
SUB r11, r11, r10
|
||||
|
|
@ -313,7 +313,7 @@ RADIX4_BFLY_2:
|
|||
LDR r1, [sp, #0x14]
|
||||
LDR r2, [sp, #0x10]
|
||||
|
||||
SMULL r3, r4, r6, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r3, r4, r6, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r6, r6, r1 @mult32x16hin32(x1r,W1h)
|
||||
|
|
@ -322,7 +322,7 @@ RADIX4_BFLY_2:
|
|||
SMULL r3, r5, r7, r1 @mult32x16hin32(x1i,W1h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r7, r7, r2 @ixheaacd_mac32(ixheaacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r7, r7, r2 @ixheaac_mac32(ixheaac_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r7, r3, r7, LSL#1
|
||||
SUB r7, r7, r6
|
||||
|
|
@ -331,7 +331,7 @@ RADIX4_BFLY_2:
|
|||
LDR r1, [sp, #0x0c]
|
||||
LDR r2, [sp, #0x08]
|
||||
|
||||
SMULL r3, r4, r8, r2 @ixheaacd_mult32(x2r,w2l)
|
||||
SMULL r3, r4, r8, r2 @ixheaac_mult32(x2r,w2l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r8, r8, r1 @mult32x16hin32(x2r,W2h)
|
||||
|
|
@ -340,7 +340,7 @@ RADIX4_BFLY_2:
|
|||
SMULL r3, r5, r9, r1 @mult32x16hin32(x2i,W2h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r9, r3, r9, LSL#1
|
||||
SUB r9, r9, r8
|
||||
|
|
@ -349,7 +349,7 @@ RADIX4_BFLY_2:
|
|||
LDR r1, [sp, #0x04]
|
||||
LDR r2, [sp]
|
||||
|
||||
SMULL r3, r4, r10, r2 @ixheaacd_mult32(x3r,w3l)
|
||||
SMULL r3, r4, r10, r2 @ixheaac_mult32(x3r,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r10, r10, r1 @mult32x16hin32(x3r,W3h)
|
||||
|
|
@ -358,7 +358,7 @@ RADIX4_BFLY_2:
|
|||
SMULL r3, r5, r11, r1 @mult32x16hin32(x3i,W3h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r11, r11, r2 @ixheaacd_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
SMULL r3, r11, r11, r2 @ixheaac_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r11, r3, r11, LSL#1
|
||||
SUB r10, r10, r11
|
||||
|
|
@ -445,7 +445,7 @@ RADIX4_BFLY_3:
|
|||
LDR r1, [sp, #0x14]
|
||||
LDR r2, [sp, #0x10]
|
||||
|
||||
SMULL r3, r4, r6, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r3, r4, r6, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r6, r6, r1 @mult32x16hin32(x1r,W1h)
|
||||
|
|
@ -454,7 +454,7 @@ RADIX4_BFLY_3:
|
|||
SMULL r3, r5, r7, r1 @mult32x16hin32(x1i,W1h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r7, r7, r2 @ixheaacd_mac32(ixheaacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r7, r7, r2 @ixheaac_mac32(ixheaac_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r7, r3, r7, LSL#1
|
||||
SUB r7, r7, r6
|
||||
|
|
@ -463,7 +463,7 @@ RADIX4_BFLY_3:
|
|||
LDR r1, [sp, #0x0c]
|
||||
LDR r2, [sp, #0x08]
|
||||
|
||||
SMULL r3, r4, r8, r2 @ixheaacd_mult32(x2r,w2l)
|
||||
SMULL r3, r4, r8, r2 @ixheaac_mult32(x2r,w2l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r8, r8, r1 @mult32x16hin32(x2r,W2h)
|
||||
|
|
@ -472,7 +472,7 @@ RADIX4_BFLY_3:
|
|||
SMULL r3, r5, r9, r1 @mult32x16hin32(x2i,W2h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r9, r3, r9, LSL#1
|
||||
SUB r8, r8, r9
|
||||
|
|
@ -481,7 +481,7 @@ RADIX4_BFLY_3:
|
|||
LDR r1, [sp, #0x04]
|
||||
LDR r2, [sp]
|
||||
|
||||
SMULL r3, r4, r10, r2 @ixheaacd_mult32(x3r,w3l)
|
||||
SMULL r3, r4, r10, r2 @ixheaac_mult32(x3r,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r10, r10, r1 @mult32x16hin32(x3r,W3h)
|
||||
|
|
@ -490,7 +490,7 @@ RADIX4_BFLY_3:
|
|||
SMULL r3, r5, r11, r1 @mult32x16hin32(x3i,W3h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r11, r11, r2 @ixheaacd_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
SMULL r3, r11, r11, r2 @ixheaac_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r11, r3, r11, LSL#1
|
||||
SUB r10, r10, r11
|
||||
|
|
@ -575,7 +575,7 @@ RADIX4_BFLY_4:
|
|||
LDR r1, [sp, #0x14]
|
||||
LDR r2, [sp, #0x10]
|
||||
|
||||
SMULL r3, r4, r6, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r3, r4, r6, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r6, r6, r1 @mult32x16hin32(x1r,W1h)
|
||||
|
|
@ -584,7 +584,7 @@ RADIX4_BFLY_4:
|
|||
SMULL r3, r5, r7, r1 @mult32x16hin32(x1i,W1h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r7, r7, r2 @ixheaacd_mac32(ixheaacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r7, r7, r2 @ixheaac_mac32(ixheaac_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r7, r3, r7, LSL#1
|
||||
SUB r7, r7, r6
|
||||
|
|
@ -593,7 +593,7 @@ RADIX4_BFLY_4:
|
|||
LDR r1, [sp, #0x0c]
|
||||
LDR r2, [sp, #0x08]
|
||||
|
||||
SMULL r3, r4, r8, r2 @ixheaacd_mult32(x2r,w2l)
|
||||
SMULL r3, r4, r8, r2 @ixheaac_mult32(x2r,w2l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r8, r8, r1 @mult32x16hin32(x2r,W2h)
|
||||
|
|
@ -602,7 +602,7 @@ RADIX4_BFLY_4:
|
|||
SMULL r3, r5, r9, r1 @mult32x16hin32(x2i,W2h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r9, r3, r9, LSL#1
|
||||
SUB r8, r8, r9
|
||||
|
|
@ -611,7 +611,7 @@ RADIX4_BFLY_4:
|
|||
LDR r1, [sp, #0x04]
|
||||
LDR r2, [sp]
|
||||
|
||||
SMULL r3, r4, r10, r2 @ixheaacd_mult32(x3r,w3l)
|
||||
SMULL r3, r4, r10, r2 @ixheaac_mult32(x3r,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r10, r10, r1 @mult32x16hin32(x3r,W3h)
|
||||
|
|
@ -620,7 +620,7 @@ RADIX4_BFLY_4:
|
|||
SMULL r3, r5, r11, r1 @mult32x16hin32(x3i,W3h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r11, r11, r2 @ixheaacd_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
SMULL r3, r11, r11, r2 @ixheaac_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r11, r3, r11, LSL#1
|
||||
SUB r11, r11, r10
|
||||
|
|
@ -725,10 +725,10 @@ RADIX2_BFLY:
|
|||
ADD r1, r1, r4, LSL #3
|
||||
STR r1, [sp, #0x18]
|
||||
|
||||
SMULL r1, r8, r8, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r1, r8, r8, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r1, r1, #31
|
||||
ORR r8, r1, r8, LSL#1
|
||||
SMULL r1, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r1, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r1, r1, #31
|
||||
ORR r9, r1, r9, LSL#1
|
||||
|
||||
|
|
@ -777,10 +777,10 @@ RADIX2_BFLY_2:
|
|||
ADD r1, r1, r4, LSL #3
|
||||
STR r1, [sp, #0x18]
|
||||
|
||||
SMULL r1, r8, r8, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r1, r8, r8, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r1, r1, #31
|
||||
ORR r8, r1, r8, LSL#1
|
||||
SMULL r1, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r1, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r1, r1, #31
|
||||
ORR r9, r1, r9, LSL#1
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ ixheaacd_esbr_cos_sin_mod_loop2:
|
|||
SUB R11, R11, #4
|
||||
MOV R8, #-4
|
||||
LDR R6, [R0]
|
||||
MOV R4, R2, ASR #1 @M_2 = ixheaacd_shr32(M, 1);
|
||||
MOV R4, R2, ASR #1 @M_2 = ixheaac_shr32(M, 1);
|
||||
SUB R4, R4, #1
|
||||
|
||||
ASR R6, R6, #1 @*psubband = *psubband >> 1;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_interface.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaacd_function_selector.h"
|
||||
|
||||
extern const WORD32 ixheaacd_twiddle_table_fft_32x32[514];
|
||||
|
|
@ -21,8 +21,8 @@ VOID ixheaacd_complex_fft_p2_armv7(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
WORD32 npoints = nlength;
|
||||
WORD32 n = 0;
|
||||
WORD32 *ptr_y = y;
|
||||
dig_rev_shift = ixheaacd_norm32(npoints) + 1 - 16;
|
||||
n_stages = 30 - ixheaacd_norm32(npoints); // log2(npoints), if npoints=2^m
|
||||
dig_rev_shift = ixheaac_norm32(npoints) + 1 - 16;
|
||||
n_stages = 30 - ixheaac_norm32(npoints); // log2(npoints), if npoints=2^m
|
||||
not_power_4 = n_stages & 1;
|
||||
|
||||
n_stages = n_stages >> 1;
|
||||
|
|
@ -71,7 +71,7 @@ VOID ixheaacd_mps_complex_fft_64_armv7(WORD32 *ptr_x, WORD32 *fin_re,
|
|||
WORD32 npoints = nlength;
|
||||
WORD32 *ptr_y = y;
|
||||
const WORD32 *ptr_w;
|
||||
n_stages = 30 - ixheaacd_norm32(npoints); // log2(npoints), if npoints=2^m
|
||||
n_stages = 30 - ixheaac_norm32(npoints); // log2(npoints), if npoints=2^m
|
||||
|
||||
n_stages = n_stages >> 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,15 +20,15 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_sbrdecsettings.h"
|
||||
|
|
|
|||
|
|
@ -20,15 +20,15 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_sbrdecsettings.h"
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ RADIX4_BFLY:
|
|||
LDR r1, [sp, #0x14]
|
||||
LDR r2, [sp, #0x10]
|
||||
|
||||
SMULL r3, r4, r6, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r3, r4, r6, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r6, r6, r1 @mult32x16hin32(x1r,W1h)
|
||||
|
|
@ -179,7 +179,7 @@ RADIX4_BFLY:
|
|||
SMULL r3, r5, r7, r1 @mult32x16hin32(x1i,W1h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r7, r7, r2 @ixheaacd_mac32(ixheaacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r7, r7, r2 @ixheaac_mac32(ixheaac_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r7, r3, r7, LSL#1
|
||||
ADD r7, r7, r6
|
||||
|
|
@ -188,7 +188,7 @@ RADIX4_BFLY:
|
|||
LDR r1, [sp, #0x0c]
|
||||
LDR r2, [sp, #0x08]
|
||||
|
||||
SMULL r3, r4, r8, r2 @ixheaacd_mult32(x2r,w2l)
|
||||
SMULL r3, r4, r8, r2 @ixheaac_mult32(x2r,w2l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r8, r8, r1 @mult32x16hin32(x2r,W2h)
|
||||
|
|
@ -197,7 +197,7 @@ RADIX4_BFLY:
|
|||
SMULL r3, r5, r9, r1 @mult32x16hin32(x2i,W2h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r9, r3, r9, LSL#1
|
||||
ADD r9, r9, r8
|
||||
|
|
@ -206,7 +206,7 @@ RADIX4_BFLY:
|
|||
LDR r1, [sp, #0x04]
|
||||
LDR r2, [sp]
|
||||
|
||||
SMULL r3, r4, r10, r2 @ixheaacd_mult32(x3r,w3l)
|
||||
SMULL r3, r4, r10, r2 @ixheaac_mult32(x3r,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r10, r10, r1 @mult32x16hin32(x3r,W3h)
|
||||
|
|
@ -215,7 +215,7 @@ RADIX4_BFLY:
|
|||
SMULL r3, r5, r11, r1 @mult32x16hin32(x3i,W3h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r11, r11, r2 @ixheaacd_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
SMULL r3, r11, r11, r2 @ixheaac_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r11, r3, r11, LSL#1
|
||||
ADD r11, r11, r10
|
||||
|
|
@ -298,7 +298,7 @@ RADIX4_BFLY_2:
|
|||
LDR r1, [sp, #0x14]
|
||||
LDR r2, [sp, #0x10]
|
||||
|
||||
SMULL r3, r4, r6, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r3, r4, r6, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r6, r6, r1 @mult32x16hin32(x1r,W1h)
|
||||
|
|
@ -307,7 +307,7 @@ RADIX4_BFLY_2:
|
|||
SMULL r3, r5, r7, r1 @mult32x16hin32(x1i,W1h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r7, r7, r2 @ixheaacd_mac32(ixheaacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r7, r7, r2 @ixheaac_mac32(ixheaac_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r7, r3, r7, LSL#1
|
||||
ADD r7, r7, r6
|
||||
|
|
@ -316,7 +316,7 @@ RADIX4_BFLY_2:
|
|||
LDR r1, [sp, #0x0c]
|
||||
LDR r2, [sp, #0x08]
|
||||
|
||||
SMULL r3, r4, r8, r2 @ixheaacd_mult32(x2r,w2l)
|
||||
SMULL r3, r4, r8, r2 @ixheaac_mult32(x2r,w2l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r8, r8, r1 @mult32x16hin32(x2r,W2h)
|
||||
|
|
@ -325,7 +325,7 @@ RADIX4_BFLY_2:
|
|||
SMULL r3, r5, r9, r1 @mult32x16hin32(x2i,W2h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r9, r3, r9, LSL#1
|
||||
ADD r9, r9, r8
|
||||
|
|
@ -334,7 +334,7 @@ RADIX4_BFLY_2:
|
|||
LDR r1, [sp, #0x04]
|
||||
LDR r2, [sp]
|
||||
|
||||
SMULL r3, r4, r10, r2 @ixheaacd_mult32(x3r,w3l)
|
||||
SMULL r3, r4, r10, r2 @ixheaac_mult32(x3r,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r10, r10, r1 @mult32x16hin32(x3r,W3h)
|
||||
|
|
@ -343,7 +343,7 @@ RADIX4_BFLY_2:
|
|||
SMULL r3, r5, r11, r1 @mult32x16hin32(x3i,W3h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r11, r11, r2 @ixheaacd_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
SMULL r3, r11, r11, r2 @ixheaac_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r11, r3, r11, LSL#1
|
||||
ADD r10, r11, r10
|
||||
|
|
@ -430,7 +430,7 @@ RADIX4_BFLY_3:
|
|||
LDR r1, [sp, #0x14]
|
||||
LDR r2, [sp, #0x10]
|
||||
|
||||
SMULL r3, r4, r6, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r3, r4, r6, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r6, r6, r1 @mult32x16hin32(x1r,W1h)
|
||||
|
|
@ -439,7 +439,7 @@ RADIX4_BFLY_3:
|
|||
SMULL r3, r5, r7, r1 @mult32x16hin32(x1i,W1h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r7, r7, r2 @ixheaacd_mac32(ixheaacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r7, r7, r2 @ixheaac_mac32(ixheaac_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r7, r3, r7, LSL#1
|
||||
ADD r7, r7, r6
|
||||
|
|
@ -448,7 +448,7 @@ RADIX4_BFLY_3:
|
|||
LDR r1, [sp, #0x0c]
|
||||
LDR r2, [sp, #0x08]
|
||||
|
||||
SMULL r3, r4, r8, r2 @ixheaacd_mult32(x2r,w2l)
|
||||
SMULL r3, r4, r8, r2 @ixheaac_mult32(x2r,w2l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r8, r8, r1 @mult32x16hin32(x2r,W2h)
|
||||
|
|
@ -457,7 +457,7 @@ RADIX4_BFLY_3:
|
|||
SMULL r3, r5, r9, r1 @mult32x16hin32(x2i,W2h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r9, r3, r9, LSL#1
|
||||
ADD r8, r9, r8
|
||||
|
|
@ -466,7 +466,7 @@ RADIX4_BFLY_3:
|
|||
LDR r1, [sp, #0x04]
|
||||
LDR r2, [sp]
|
||||
|
||||
SMULL r3, r4, r10, r2 @ixheaacd_mult32(x3r,w3l)
|
||||
SMULL r3, r4, r10, r2 @ixheaac_mult32(x3r,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r10, r10, r1 @mult32x16hin32(x3r,W3h)
|
||||
|
|
@ -475,7 +475,7 @@ RADIX4_BFLY_3:
|
|||
SMULL r3, r5, r11, r1 @mult32x16hin32(x3i,W3h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r11, r11, r2 @ixheaacd_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
SMULL r3, r11, r11, r2 @ixheaac_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r11, r3, r11, LSL#1
|
||||
ADD r10, r11, r10
|
||||
|
|
@ -560,7 +560,7 @@ RADIX4_BFLY_4:
|
|||
LDR r1, [sp, #0x14]
|
||||
LDR r2, [sp, #0x10]
|
||||
|
||||
SMULL r3, r4, r6, r2 @ixheaacd_mult32(x1r,w1l)
|
||||
SMULL r3, r4, r6, r2 @ixheaac_mult32(x1r,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r6, r6, r1 @mult32x16hin32(x1r,W1h)
|
||||
|
|
@ -569,7 +569,7 @@ RADIX4_BFLY_4:
|
|||
SMULL r3, r5, r7, r1 @mult32x16hin32(x1i,W1h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r7, r7, r2 @ixheaacd_mac32(ixheaacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r7, r7, r2 @ixheaac_mac32(ixheaac_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r7, r3, r7, LSL#1
|
||||
ADD r7, r7, r6
|
||||
|
|
@ -578,7 +578,7 @@ RADIX4_BFLY_4:
|
|||
LDR r1, [sp, #0x0c]
|
||||
LDR r2, [sp, #0x08]
|
||||
|
||||
SMULL r3, r4, r8, r2 @ixheaacd_mult32(x2r,w2l)
|
||||
SMULL r3, r4, r8, r2 @ixheaac_mult32(x2r,w2l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r8, r8, r1 @mult32x16hin32(x2r,W2h)
|
||||
|
|
@ -587,7 +587,7 @@ RADIX4_BFLY_4:
|
|||
SMULL r3, r5, r9, r1 @mult32x16hin32(x2i,W2h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r9, r9, r2 @ixheaacd_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
SMULL r3, r9, r9, r2 @ixheaac_mac32(ixheacd_mult32(x1r,w1h) ,x1i,w1l)
|
||||
LSR r3, r3, #31
|
||||
ORR r9, r3, r9, LSL#1
|
||||
ADD r8, r9, r8
|
||||
|
|
@ -596,7 +596,7 @@ RADIX4_BFLY_4:
|
|||
LDR r1, [sp, #0x04]
|
||||
LDR r2, [sp]
|
||||
|
||||
SMULL r3, r4, r10, r2 @ixheaacd_mult32(x3r,w3l)
|
||||
SMULL r3, r4, r10, r2 @ixheaac_mult32(x3r,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r4, r3, r4, LSL#1
|
||||
SMULL r3, r10, r10, r1 @mult32x16hin32(x3r,W3h)
|
||||
|
|
@ -605,7 +605,7 @@ RADIX4_BFLY_4:
|
|||
SMULL r3, r5, r11, r1 @mult32x16hin32(x3i,W3h)
|
||||
LSR r3, r3, #31
|
||||
ORR r5, r3, r5, LSL#1
|
||||
SMULL r3, r11, r11, r2 @ixheaacd_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
SMULL r3, r11, r11, r2 @ixheaac_mac32(ixheacd_mult32(x3r,w3h) ,x3i,w3l)
|
||||
LSR r3, r3, #31
|
||||
ORR r11, r3, r11, LSL#1
|
||||
ADD r11, r11, r10
|
||||
|
|
|
|||
|
|
@ -20,13 +20,13 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
#include "ixheaacd_env_extr.h"
|
||||
#include "ixheaacd_qmf_dec.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_env_calc.h"
|
||||
|
||||
#include "ixheaacd_interface.h"
|
||||
|
|
@ -367,7 +367,7 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
WORD32 scaleshift = 0;
|
||||
|
||||
WORD32 M_2;
|
||||
WORD32 M = ixheaacd_shr32(qmf_bank->no_channels, 1);
|
||||
WORD32 M = ixheaac_shr32(qmf_bank->no_channels, 1);
|
||||
|
||||
const WORD32 *p_sin;
|
||||
const WORD32 *p_sin_cos;
|
||||
|
|
@ -377,7 +377,7 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
p_sin_cos = qmf_bank->esbr_cos_twiddle;
|
||||
ixheaacd_esbr_cos_sin_mod_loop1(subband, M, p_sin_cos, subband_tmp);
|
||||
|
||||
M_2 = ixheaacd_shr32(M, 1);
|
||||
M_2 = ixheaac_shr32(M, 1);
|
||||
if (M == 32) {
|
||||
ixheaacd_esbr_radix4bfly(p_twiddle, subband_tmp, 1, 8);
|
||||
ixheaacd_esbr_radix4bfly(p_twiddle + 48, subband_tmp, 4, 2);
|
||||
|
|
@ -464,26 +464,26 @@ VOID ixheaacd_esbr_qmfsyn32_winadd(WORD32 *tmp1, WORD32 *tmp2, WORD32 *inp1,
|
|||
WORD64 syn_out = 0;
|
||||
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[0 + k], inp1[2 * (k + 0)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp1[0 + k], inp1[2 * (k + 0)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[128 + k], inp1[2 * (k + 64)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp1[128 + k], inp1[2 * (k + 64)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[256 + k], inp1[2 * (k + 128)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp1[256 + k], inp1[2 * (k + 128)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[384 + k], inp1[2 * (k + 192)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp1[384 + k], inp1[2 * (k + 192)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[512 + k], inp1[2 * (k + 256)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp1[512 + k], inp1[2 * (k + 256)]));
|
||||
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[64 + k], inp1[2 * (k + 32)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp2[64 + k], inp1[2 * (k + 32)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[192 + k], inp1[2 * (k + 96)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp2[192 + k], inp1[2 * (k + 96)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[320 + k], inp1[2 * (k + 160)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp2[320 + k], inp1[2 * (k + 160)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[448 + k], inp1[2 * (k + 224)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp2[448 + k], inp1[2 * (k + 224)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[576 + k], inp1[2 * (k + 288)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp2[576 + k], inp1[2 * (k + 288)]));
|
||||
|
||||
sample_buffer[ch_fac * k] = (WORD32)(syn_out >> 31);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,15 +20,15 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_sbrdecsettings.h"
|
||||
|
|
|
|||
|
|
@ -19,13 +19,13 @@
|
|||
*/
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
#include "ixheaacd_env_extr.h"
|
||||
#include "ixheaacd_qmf_dec.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_env_calc.h"
|
||||
|
||||
#include "ixheaacd_interface.h"
|
||||
|
|
@ -82,22 +82,22 @@ VOID ixheaacd_dct3_32(WORD32 *input, WORD32 *output,
|
|||
for (n = 1; n < DCT3_LEN / 2; n++) {
|
||||
temp1[0] = *ptr_forward++;
|
||||
temp1[1] = *ptr_reverse--;
|
||||
temp1[0] = ixheaacd_add32_sat(ixheaacd_shr32(temp1[0], LP_SHIFT_VAL),
|
||||
ixheaacd_shr32(temp1[1], LP_SHIFT_VAL));
|
||||
temp1[0] = ixheaac_add32_sat(ixheaac_shr32(temp1[0], LP_SHIFT_VAL),
|
||||
ixheaac_shr32(temp1[1], LP_SHIFT_VAL));
|
||||
|
||||
temp1[2] = *(ptr_forward - 33);
|
||||
temp1[3] = *(ptr_reverse - 31);
|
||||
temp1[1] = ixheaacd_sub32_sat(ixheaacd_shr32(temp1[2], LP_SHIFT_VAL),
|
||||
ixheaacd_shr32(temp1[3], LP_SHIFT_VAL));
|
||||
temp1[1] = ixheaac_sub32_sat(ixheaac_shr32(temp1[2], LP_SHIFT_VAL),
|
||||
ixheaac_shr32(temp1[3], LP_SHIFT_VAL));
|
||||
twid_re = *twidle_fwd++;
|
||||
|
||||
twid_im = *twidle_fwd;
|
||||
twidle_fwd += 3;
|
||||
|
||||
*p_out++ = ixheaacd_add32_sat(ixheaacd_mult32x16in32(temp1[0], twid_re),
|
||||
ixheaacd_mult32x16in32(temp1[1], twid_im));
|
||||
*p_out++ = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(temp1[0], twid_im),
|
||||
ixheaacd_mult32x16in32(temp1[1], twid_re));
|
||||
*p_out++ = ixheaac_add32_sat(ixheaac_mult32x16in32(temp1[0], twid_re),
|
||||
ixheaac_mult32x16in32(temp1[1], twid_im));
|
||||
*p_out++ = ixheaac_sub32_sat(ixheaac_mult32x16in32(temp1[0], twid_im),
|
||||
ixheaac_mult32x16in32(temp1[1], twid_re));
|
||||
}
|
||||
|
||||
twid_re = *twidle_fwd++;
|
||||
|
|
@ -107,15 +107,15 @@ VOID ixheaacd_dct3_32(WORD32 *input, WORD32 *output,
|
|||
|
||||
temp1[1] = *ptr_reverse--;
|
||||
temp1[0] = *(ptr_reverse - 31);
|
||||
temp1[1] = ixheaacd_sub32_sat(ixheaacd_shr32(temp1[1], LP_SHIFT_VAL),
|
||||
ixheaacd_shr32(temp1[0], LP_SHIFT_VAL));
|
||||
temp1[1] = ixheaac_sub32_sat(ixheaac_shr32(temp1[1], LP_SHIFT_VAL),
|
||||
ixheaac_shr32(temp1[0], LP_SHIFT_VAL));
|
||||
|
||||
temp1[0] = temp1[1];
|
||||
|
||||
temp2[2] = ixheaacd_add32_sat(ixheaacd_mult32x16in32(temp1[0], twid_re),
|
||||
ixheaacd_mult32x16in32(temp1[1], twid_im));
|
||||
temp2[3] = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(temp1[0], twid_im),
|
||||
ixheaacd_mult32x16in32(temp1[1], twid_re));
|
||||
temp2[2] = ixheaac_add32_sat(ixheaac_mult32x16in32(temp1[0], twid_re),
|
||||
ixheaac_mult32x16in32(temp1[1], twid_im));
|
||||
temp2[3] = ixheaac_sub32_sat(ixheaac_mult32x16in32(temp1[0], twid_im),
|
||||
ixheaac_mult32x16in32(temp1[1], twid_re));
|
||||
|
||||
ptr_forward = output;
|
||||
ptr_reverse = &output[DCT3_LEN - 1];
|
||||
|
|
@ -123,12 +123,12 @@ VOID ixheaacd_dct3_32(WORD32 *input, WORD32 *output,
|
|||
temp2[0] = *ptr_forward++;
|
||||
temp2[1] = *ptr_forward--;
|
||||
|
||||
temp1[0] = ixheaacd_negate32_sat(ixheaacd_add32_sat(temp2[1], temp2[3]));
|
||||
temp1[1] = ixheaacd_sub32_sat(temp2[0], temp2[2]);
|
||||
temp1[0] = ixheaac_negate32_sat(ixheaac_add32_sat(temp2[1], temp2[3]));
|
||||
temp1[1] = ixheaac_sub32_sat(temp2[0], temp2[2]);
|
||||
temp2[0] =
|
||||
ixheaacd_add32_sat(ixheaacd_add32_sat(temp2[0], temp2[2]), temp1[0]);
|
||||
ixheaac_add32_sat(ixheaac_add32_sat(temp2[0], temp2[2]), temp1[0]);
|
||||
temp2[1] =
|
||||
ixheaacd_add32_sat(ixheaacd_sub32_sat(temp2[1], temp2[3]), temp1[1]);
|
||||
ixheaac_add32_sat(ixheaac_sub32_sat(temp2[1], temp2[3]), temp1[1]);
|
||||
|
||||
temp2[0] >>= 1;
|
||||
temp2[1] >>= 1;
|
||||
|
|
@ -150,25 +150,25 @@ VOID ixheaacd_dct3_32(WORD32 *input, WORD32 *output,
|
|||
twid_im = *twidle_fwd;
|
||||
twidle_fwd += 2;
|
||||
|
||||
temp1[0] = ixheaacd_sub32_sat(temp2[0], temp2[2]);
|
||||
temp1[1] = ixheaacd_add32_sat(temp2[0], temp2[2]);
|
||||
temp1[0] = ixheaac_sub32_sat(temp2[0], temp2[2]);
|
||||
temp1[1] = ixheaac_add32_sat(temp2[0], temp2[2]);
|
||||
|
||||
temp1[2] = ixheaacd_add32_sat(temp2[1], temp2[3]);
|
||||
temp1[3] = ixheaacd_sub32_sat(temp2[1], temp2[3]);
|
||||
temp1[2] = ixheaac_add32_sat(temp2[1], temp2[3]);
|
||||
temp1[3] = ixheaac_sub32_sat(temp2[1], temp2[3]);
|
||||
|
||||
temp1[4] = ixheaacd_add32_sat(ixheaacd_mult32x16in32(temp1[0], twid_re),
|
||||
ixheaacd_mult32x16in32(temp1[2], twid_im));
|
||||
temp1[5] = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(temp1[0], twid_im),
|
||||
ixheaacd_mult32x16in32(temp1[2], twid_re));
|
||||
temp1[4] = ixheaac_add32_sat(ixheaac_mult32x16in32(temp1[0], twid_re),
|
||||
ixheaac_mult32x16in32(temp1[2], twid_im));
|
||||
temp1[5] = ixheaac_sub32_sat(ixheaac_mult32x16in32(temp1[0], twid_im),
|
||||
ixheaac_mult32x16in32(temp1[2], twid_re));
|
||||
|
||||
temp1[1] >>= 1;
|
||||
temp1[3] >>= 1;
|
||||
|
||||
*ptr_forward++ = ixheaacd_sub32_sat(temp1[1], temp1[4]);
|
||||
*ptr_forward++ = ixheaacd_add32_sat(temp1[3], temp1[5]);
|
||||
*ptr_forward++ = ixheaac_sub32_sat(temp1[1], temp1[4]);
|
||||
*ptr_forward++ = ixheaac_add32_sat(temp1[3], temp1[5]);
|
||||
|
||||
*ptr_reverse-- = ixheaacd_sub32_sat(temp1[5], temp1[3]);
|
||||
*ptr_reverse-- = ixheaacd_add32_sat(temp1[1], temp1[4]);
|
||||
*ptr_reverse-- = ixheaac_sub32_sat(temp1[5], temp1[3]);
|
||||
*ptr_reverse-- = ixheaac_add32_sat(temp1[1], temp1[4]);
|
||||
}
|
||||
temp2[0] = *ptr_forward++;
|
||||
temp2[1] = *ptr_forward--;
|
||||
|
|
@ -180,21 +180,21 @@ VOID ixheaacd_dct3_32(WORD32 *input, WORD32 *output,
|
|||
twid_im = *twidle_fwd;
|
||||
twidle_fwd += 2;
|
||||
|
||||
temp1[0] = ixheaacd_sub32_sat(temp2[0], temp2[2]);
|
||||
temp1[1] = ixheaacd_add32_sat(temp2[0], temp2[2]);
|
||||
temp1[0] = ixheaac_sub32_sat(temp2[0], temp2[2]);
|
||||
temp1[1] = ixheaac_add32_sat(temp2[0], temp2[2]);
|
||||
|
||||
temp1[2] = ixheaacd_add32_sat(temp2[1], temp2[3]);
|
||||
temp1[3] = ixheaacd_sub32_sat(temp2[1], temp2[3]);
|
||||
temp1[2] = ixheaac_add32_sat(temp2[1], temp2[3]);
|
||||
temp1[3] = ixheaac_sub32_sat(temp2[1], temp2[3]);
|
||||
|
||||
temp1[4] = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(temp1[0], twid_re),
|
||||
ixheaacd_mult32x16in32(temp1[2], twid_im));
|
||||
temp1[5] = ixheaacd_add32_sat(ixheaacd_mult32x16in32(temp1[2], twid_re),
|
||||
ixheaacd_mult32x16in32(temp1[0], twid_im));
|
||||
temp1[4] = ixheaac_sub32_sat(ixheaac_mult32x16in32(temp1[0], twid_re),
|
||||
ixheaac_mult32x16in32(temp1[2], twid_im));
|
||||
temp1[5] = ixheaac_add32_sat(ixheaac_mult32x16in32(temp1[2], twid_re),
|
||||
ixheaac_mult32x16in32(temp1[0], twid_im));
|
||||
|
||||
temp1[1] >>= 1;
|
||||
temp1[3] >>= 1;
|
||||
*ptr_forward++ = ixheaacd_add32_sat(temp1[1], temp1[4]);
|
||||
*ptr_forward++ = ixheaacd_add32_sat(temp1[3], temp1[5]);
|
||||
*ptr_forward++ = ixheaac_add32_sat(temp1[1], temp1[4]);
|
||||
*ptr_forward++ = ixheaac_add32_sat(temp1[3], temp1[5]);
|
||||
|
||||
ixheaacd_radix4bfly(w_16, output, 1, 4);
|
||||
ixheaacd_postradixcompute4(input, output, p_table, 16);
|
||||
|
|
@ -258,7 +258,7 @@ VOID ixheaacd_dct2_64(WORD32 *x, WORD32 *X,
|
|||
VOID ixheaacd_cos_sin_mod(WORD32 *subband,
|
||||
ia_sbr_qmf_filter_bank_struct *qmf_bank,
|
||||
WORD16 *p_twiddle, WORD32 *p_dig_rev_tbl) {
|
||||
WORD32 M = ixheaacd_shr32(qmf_bank->no_channels, 1);
|
||||
WORD32 M = ixheaac_shr32(qmf_bank->no_channels, 1);
|
||||
|
||||
const WORD16 *p_sin;
|
||||
const WORD16 *p_sin_cos = &qmf_bank->cos_twiddle[0];
|
||||
|
|
@ -306,12 +306,12 @@ VOID ixheaacd_fwd_modulation(const WORD32 *p_time_in1, WORD32 *real_subband,
|
|||
const WORD16 *tcos;
|
||||
|
||||
for (i = qmf_bank->no_channels - 1; i >= 0; i--) {
|
||||
temp1 = ixheaacd_shr32(*p_time_in1++, HQ_SHIFT_VAL);
|
||||
temp2 = ixheaacd_shr32(*p_time_in2--, HQ_SHIFT_VAL);
|
||||
temp1 = ixheaac_shr32(*p_time_in1++, HQ_SHIFT_VAL);
|
||||
temp2 = ixheaac_shr32(*p_time_in2--, HQ_SHIFT_VAL);
|
||||
|
||||
*t_real_subband++ = ixheaacd_sub32_sat(temp1, temp2);
|
||||
*t_real_subband++ = ixheaac_sub32_sat(temp1, temp2);
|
||||
;
|
||||
*t_imag_subband++ = ixheaacd_add32_sat(temp1, temp2);
|
||||
*t_imag_subband++ = ixheaac_add32_sat(temp1, temp2);
|
||||
;
|
||||
}
|
||||
|
||||
|
|
@ -331,11 +331,11 @@ VOID ixheaacd_fwd_modulation(const WORD32 *p_time_in1, WORD32 *real_subband,
|
|||
cosh = *tcos++;
|
||||
sinh = *tcos++;
|
||||
*real_subband++ =
|
||||
ixheaacd_add32_sat(ixheaacd_mult32x16in32_shl(re, cosh),
|
||||
ixheaacd_mult32x16in32_shl(im, sinh));
|
||||
ixheaac_add32_sat(ixheaac_mult32x16in32_shl(re, cosh),
|
||||
ixheaac_mult32x16in32_shl(im, sinh));
|
||||
*imag_subband++ =
|
||||
ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(im, cosh),
|
||||
ixheaacd_mult32x16in32_shl(re, sinh));
|
||||
ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(im, cosh),
|
||||
ixheaac_mult32x16in32_shl(re, sinh));
|
||||
}
|
||||
} else {
|
||||
WORD32 i_band;
|
||||
|
|
@ -676,7 +676,7 @@ VOID ixheaacd_esbr_radix4bfly(const WORD32 *w, WORD32 *x, WORD32 index1,
|
|||
xh20_0 = (WORD64)x_h2_0 + (WORD64)x_l2_0;
|
||||
xl20_0 = (WORD64)x_h2_0 - (WORD64)x_l2_0;
|
||||
|
||||
x[0] = (WORD32)ixheaacd_add64_sat(xh0_0, xh20_0);
|
||||
x[0] = (WORD32)ixheaac_add64_sat(xh0_0, xh20_0);
|
||||
xt0_0 = (WORD64)xh0_0 - (WORD64)xh20_0;
|
||||
|
||||
x_1 = x[1];
|
||||
|
|
@ -690,7 +690,7 @@ VOID ixheaacd_esbr_radix4bfly(const WORD32 *w, WORD32 *x, WORD32 index1,
|
|||
xh21_0 = (WORD64)x_h2_1 + (WORD64)x_l2_1;
|
||||
xl21_0 = (WORD64)x_h2_1 - (WORD64)x_l2_1;
|
||||
|
||||
x[1] = (WORD32)ixheaacd_add64_sat(xh1_0, xh21_0);
|
||||
x[1] = (WORD32)ixheaac_add64_sat(xh1_0, xh21_0);
|
||||
yt0_0 = (WORD64)xh1_0 - (WORD64)xh21_0;
|
||||
|
||||
xt1_0 = (WORD64)xl0_0 + (WORD64)xl21_0;
|
||||
|
|
@ -699,29 +699,29 @@ VOID ixheaacd_esbr_radix4bfly(const WORD32 *w, WORD32 *x, WORD32 index1,
|
|||
yt2_0 = (WORD64)xl1_0 + (WORD64)xl20_0;
|
||||
yt1_0 = (WORD64)xl1_0 - (WORD64)xl20_0;
|
||||
|
||||
mul_11 = ixheaacd_mult64(xt2_0, co30);
|
||||
mul_3 = ixheaacd_mult64(yt2_0, si30);
|
||||
x[l2] = ixheaacd_sat64_32(((mul_3 + mul_11) >> 32) << RADIXSHIFT);
|
||||
mul_11 = ixheaac_mult64(xt2_0, co30);
|
||||
mul_3 = ixheaac_mult64(yt2_0, si30);
|
||||
x[l2] = ixheaac_sat64_32(((mul_3 + mul_11) >> 32) << RADIXSHIFT);
|
||||
|
||||
mul_5 = ixheaacd_mult64(xt2_0, si30);
|
||||
mul_9 = ixheaacd_mult64(yt2_0, co30);
|
||||
x[l2 + 1] = ixheaacd_sat64_32(((mul_9 - mul_5) >> 32) << RADIXSHIFT);
|
||||
mul_5 = ixheaac_mult64(xt2_0, si30);
|
||||
mul_9 = ixheaac_mult64(yt2_0, co30);
|
||||
x[l2 + 1] = ixheaac_sat64_32(((mul_9 - mul_5) >> 32) << RADIXSHIFT);
|
||||
|
||||
mul_12 = ixheaacd_mult64(xt0_0, co20);
|
||||
mul_2 = ixheaacd_mult64(yt0_0, si20);
|
||||
x[l1] = ixheaacd_sat64_32(((mul_2 + mul_12) >> 32) << RADIXSHIFT);
|
||||
mul_12 = ixheaac_mult64(xt0_0, co20);
|
||||
mul_2 = ixheaac_mult64(yt0_0, si20);
|
||||
x[l1] = ixheaac_sat64_32(((mul_2 + mul_12) >> 32) << RADIXSHIFT);
|
||||
|
||||
mul_6 = ixheaacd_mult64(xt0_0, si20);
|
||||
mul_8 = ixheaacd_mult64(yt0_0, co20);
|
||||
x[l1 + 1] = ixheaacd_sat64_32(((mul_8 - mul_6) >> 32) << RADIXSHIFT);
|
||||
mul_6 = ixheaac_mult64(xt0_0, si20);
|
||||
mul_8 = ixheaac_mult64(yt0_0, co20);
|
||||
x[l1 + 1] = ixheaac_sat64_32(((mul_8 - mul_6) >> 32) << RADIXSHIFT);
|
||||
|
||||
mul_4 = ixheaacd_mult64(xt1_0, co10);
|
||||
mul_1 = ixheaacd_mult64(yt1_0, si10);
|
||||
x[h2] = ixheaacd_sat64_32(((mul_1 + mul_4) >> 32) << RADIXSHIFT);
|
||||
mul_4 = ixheaac_mult64(xt1_0, co10);
|
||||
mul_1 = ixheaac_mult64(yt1_0, si10);
|
||||
x[h2] = ixheaac_sat64_32(((mul_1 + mul_4) >> 32) << RADIXSHIFT);
|
||||
|
||||
mul_10 = ixheaacd_mult64(xt1_0, si10);
|
||||
mul_7 = ixheaacd_mult64(yt1_0, co10);
|
||||
x[h2 + 1] = ixheaacd_sat64_32(((mul_7 - mul_10) >> 32) << RADIXSHIFT);
|
||||
mul_10 = ixheaac_mult64(xt1_0, si10);
|
||||
mul_7 = ixheaac_mult64(yt1_0, co10);
|
||||
x[h2 + 1] = ixheaac_sat64_32(((mul_7 - mul_10) >> 32) << RADIXSHIFT);
|
||||
|
||||
x += 2;
|
||||
}
|
||||
|
|
@ -765,14 +765,14 @@ VOID ixheaacd_esbr_postradixcompute2(WORD32 *ptr_y, WORD32 *ptr_x,
|
|||
x_6 = *x0++;
|
||||
x_7 = *x0++;
|
||||
|
||||
y0[h2] = ixheaacd_add32_sat(x_0, x_2);
|
||||
y0[h2 + 1] = ixheaacd_add32_sat(x_1, x_3);
|
||||
y1[h2] = ixheaacd_add32_sat(x_4, x_6);
|
||||
y1[h2 + 1] = ixheaacd_add32_sat(x_5, x_7);
|
||||
y2[h2] = ixheaacd_sub32_sat(x_0, x_2);
|
||||
y2[h2 + 1] = ixheaacd_sub32_sat(x_1, x_3);
|
||||
y3[h2] = ixheaacd_sub32_sat(x_4, x_6);
|
||||
y3[h2 + 1] = ixheaacd_sub32_sat(x_5, x_7);
|
||||
y0[h2] = ixheaac_add32_sat(x_0, x_2);
|
||||
y0[h2 + 1] = ixheaac_add32_sat(x_1, x_3);
|
||||
y1[h2] = ixheaac_add32_sat(x_4, x_6);
|
||||
y1[h2 + 1] = ixheaac_add32_sat(x_5, x_7);
|
||||
y2[h2] = ixheaac_sub32_sat(x_0, x_2);
|
||||
y2[h2 + 1] = ixheaac_sub32_sat(x_1, x_3);
|
||||
y3[h2] = ixheaac_sub32_sat(x_4, x_6);
|
||||
y3[h2 + 1] = ixheaac_sub32_sat(x_5, x_7);
|
||||
|
||||
x_8 = *x2++;
|
||||
x_9 = *x2++;
|
||||
|
|
@ -783,14 +783,14 @@ VOID ixheaacd_esbr_postradixcompute2(WORD32 *ptr_y, WORD32 *ptr_x,
|
|||
x_e = *x2++;
|
||||
x_f = *x2++;
|
||||
|
||||
y0[h2 + 2] = ixheaacd_add32_sat(x_8, x_a);
|
||||
y0[h2 + 3] = ixheaacd_add32_sat(x_9, x_b);
|
||||
y1[h2 + 2] = ixheaacd_add32_sat(x_c, x_e);
|
||||
y1[h2 + 3] = ixheaacd_add32_sat(x_d, x_f);
|
||||
y2[h2 + 2] = ixheaacd_sub32_sat(x_8, x_a);
|
||||
y2[h2 + 3] = ixheaacd_sub32_sat(x_9, x_b);
|
||||
y3[h2 + 2] = ixheaacd_sub32_sat(x_c, x_e);
|
||||
y3[h2 + 3] = ixheaacd_sub32_sat(x_d, x_f);
|
||||
y0[h2 + 2] = ixheaac_add32_sat(x_8, x_a);
|
||||
y0[h2 + 3] = ixheaac_add32_sat(x_9, x_b);
|
||||
y1[h2 + 2] = ixheaac_add32_sat(x_c, x_e);
|
||||
y1[h2 + 3] = ixheaac_add32_sat(x_d, x_f);
|
||||
y2[h2 + 2] = ixheaac_sub32_sat(x_8, x_a);
|
||||
y2[h2 + 3] = ixheaac_sub32_sat(x_9, x_b);
|
||||
y3[h2 + 2] = ixheaac_sub32_sat(x_c, x_e);
|
||||
y3[h2 + 3] = ixheaac_sub32_sat(x_d, x_f);
|
||||
}
|
||||
x0 += (WORD32)npoints >> 1;
|
||||
x2 += (WORD32)npoints >> 1;
|
||||
|
|
@ -837,23 +837,23 @@ VOID ixheaacd_esbr_postradixcompute4(WORD32 *ptr_y, WORD32 *ptr_x,
|
|||
x_6 = *x0++;
|
||||
x_7 = *x0++;
|
||||
|
||||
xh0_0 = ixheaacd_add32_sat(x_0, x_4);
|
||||
xh1_0 = ixheaacd_add32_sat(x_1, x_5);
|
||||
xl0_0 = ixheaacd_sub32_sat(x_0, x_4);
|
||||
xl1_0 = ixheaacd_sub32_sat(x_1, x_5);
|
||||
xh0_1 = ixheaacd_add32_sat(x_2, x_6);
|
||||
xh1_1 = ixheaacd_add32_sat(x_3, x_7);
|
||||
xl0_1 = ixheaacd_sub32_sat(x_2, x_6);
|
||||
xl1_1 = ixheaacd_sub32_sat(x_3, x_7);
|
||||
xh0_0 = ixheaac_add32_sat(x_0, x_4);
|
||||
xh1_0 = ixheaac_add32_sat(x_1, x_5);
|
||||
xl0_0 = ixheaac_sub32_sat(x_0, x_4);
|
||||
xl1_0 = ixheaac_sub32_sat(x_1, x_5);
|
||||
xh0_1 = ixheaac_add32_sat(x_2, x_6);
|
||||
xh1_1 = ixheaac_add32_sat(x_3, x_7);
|
||||
xl0_1 = ixheaac_sub32_sat(x_2, x_6);
|
||||
xl1_1 = ixheaac_sub32_sat(x_3, x_7);
|
||||
|
||||
n00 = ixheaacd_add32_sat(xh0_0, xh0_1);
|
||||
n01 = ixheaacd_add32_sat(xh1_0, xh1_1);
|
||||
n10 = ixheaacd_add32_sat(xl0_0, xl1_1);
|
||||
n11 = ixheaacd_sub32_sat(xl1_0, xl0_1);
|
||||
n20 = ixheaacd_sub32_sat(xh0_0, xh0_1);
|
||||
n21 = ixheaacd_sub32_sat(xh1_0, xh1_1);
|
||||
n30 = ixheaacd_sub32_sat(xl0_0, xl1_1);
|
||||
n31 = ixheaacd_add32_sat(xl1_0, xl0_1);
|
||||
n00 = ixheaac_add32_sat(xh0_0, xh0_1);
|
||||
n01 = ixheaac_add32_sat(xh1_0, xh1_1);
|
||||
n10 = ixheaac_add32_sat(xl0_0, xl1_1);
|
||||
n11 = ixheaac_sub32_sat(xl1_0, xl0_1);
|
||||
n20 = ixheaac_sub32_sat(xh0_0, xh0_1);
|
||||
n21 = ixheaac_sub32_sat(xh1_0, xh1_1);
|
||||
n30 = ixheaac_sub32_sat(xl0_0, xl1_1);
|
||||
n31 = ixheaac_add32_sat(xl1_0, xl0_1);
|
||||
|
||||
y0[h2] = n00;
|
||||
y0[h2 + 1] = n01;
|
||||
|
|
@ -873,23 +873,23 @@ VOID ixheaacd_esbr_postradixcompute4(WORD32 *ptr_y, WORD32 *ptr_x,
|
|||
x_e = *x2++;
|
||||
x_f = *x2++;
|
||||
|
||||
xh0_2 = ixheaacd_add32_sat(x_8, x_c);
|
||||
xh1_2 = ixheaacd_add32_sat(x_9, x_d);
|
||||
xl0_2 = ixheaacd_sub32_sat(x_8, x_c);
|
||||
xl1_2 = ixheaacd_sub32_sat(x_9, x_d);
|
||||
xh0_3 = ixheaacd_add32_sat(x_a, x_e);
|
||||
xh1_3 = ixheaacd_add32_sat(x_b, x_f);
|
||||
xl0_3 = ixheaacd_sub32_sat(x_a, x_e);
|
||||
xl1_3 = ixheaacd_sub32_sat(x_b, x_f);
|
||||
xh0_2 = ixheaac_add32_sat(x_8, x_c);
|
||||
xh1_2 = ixheaac_add32_sat(x_9, x_d);
|
||||
xl0_2 = ixheaac_sub32_sat(x_8, x_c);
|
||||
xl1_2 = ixheaac_sub32_sat(x_9, x_d);
|
||||
xh0_3 = ixheaac_add32_sat(x_a, x_e);
|
||||
xh1_3 = ixheaac_add32_sat(x_b, x_f);
|
||||
xl0_3 = ixheaac_sub32_sat(x_a, x_e);
|
||||
xl1_3 = ixheaac_sub32_sat(x_b, x_f);
|
||||
|
||||
n02 = ixheaacd_add32_sat(xh0_2, xh0_3);
|
||||
n03 = ixheaacd_add32_sat(xh1_2, xh1_3);
|
||||
n12 = ixheaacd_add32_sat(xl0_2, xl1_3);
|
||||
n13 = ixheaacd_sub32_sat(xl1_2, xl0_3);
|
||||
n22 = ixheaacd_sub32_sat(xh0_2, xh0_3);
|
||||
n23 = ixheaacd_sub32_sat(xh1_2, xh1_3);
|
||||
n32 = ixheaacd_sub32_sat(xl0_2, xl1_3);
|
||||
n33 = ixheaacd_add32_sat(xl1_2, xl0_3);
|
||||
n02 = ixheaac_add32_sat(xh0_2, xh0_3);
|
||||
n03 = ixheaac_add32_sat(xh1_2, xh1_3);
|
||||
n12 = ixheaac_add32_sat(xl0_2, xl1_3);
|
||||
n13 = ixheaac_sub32_sat(xl1_2, xl0_3);
|
||||
n22 = ixheaac_sub32_sat(xh0_2, xh0_3);
|
||||
n23 = ixheaac_sub32_sat(xh1_2, xh1_3);
|
||||
n32 = ixheaac_sub32_sat(xl0_2, xl1_3);
|
||||
n33 = ixheaac_add32_sat(xl1_2, xl0_3);
|
||||
|
||||
y0[h2 + 2] = n02;
|
||||
y0[h2 + 3] = n03;
|
||||
|
|
@ -916,7 +916,7 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
WORD32 wim, wre;
|
||||
|
||||
WORD32 i, M_2;
|
||||
WORD32 M = ixheaacd_shr32(qmf_bank->no_channels, 1);
|
||||
WORD32 M = ixheaac_shr32(qmf_bank->no_channels, 1);
|
||||
|
||||
const WORD32 *p_sin;
|
||||
const WORD32 *p_sin_cos;
|
||||
|
|
@ -929,7 +929,7 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
WORD32 *psubband2, *psubband12;
|
||||
WORD32 *psubband_t2, *psubband1_t2;
|
||||
|
||||
M_2 = ixheaacd_shr32(M, 1);
|
||||
M_2 = ixheaac_shr32(M, 1);
|
||||
|
||||
p_sin_cos = qmf_bank->esbr_cos_twiddle;
|
||||
|
||||
|
|
@ -951,20 +951,20 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
wre = *p_sin_cos++;
|
||||
|
||||
*psubband_t++ = (WORD32)(
|
||||
(ixheaacd_add64(ixheaacd_mult64(re, wre), ixheaacd_mult64(im, wim))) >>
|
||||
(ixheaac_add64(ixheaac_mult64(re, wre), ixheaac_mult64(im, wim))) >>
|
||||
32);
|
||||
*psubband_t++ = (WORD32)((ixheaacd_sub64_sat(ixheaacd_mult64(im, wre),
|
||||
ixheaacd_mult64(re, wim))) >>
|
||||
*psubband_t++ = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wre),
|
||||
ixheaac_mult64(re, wim))) >>
|
||||
32);
|
||||
|
||||
re = *psubband2++;
|
||||
im = *psubband12--;
|
||||
|
||||
*psubband_t2++ = (WORD32)((ixheaacd_sub64_sat(ixheaacd_mult64(im, wim),
|
||||
ixheaacd_mult64(re, wre))) >>
|
||||
*psubband_t2++ = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wim),
|
||||
ixheaac_mult64(re, wre))) >>
|
||||
32);
|
||||
*psubband_t2++ = (WORD32)(
|
||||
(ixheaacd_add64(ixheaacd_mult64(re, wim), ixheaacd_mult64(im, wre))) >>
|
||||
(ixheaac_add64(ixheaac_mult64(re, wim), ixheaac_mult64(im, wre))) >>
|
||||
32);
|
||||
|
||||
re = *psubband1--;
|
||||
|
|
@ -973,21 +973,21 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
wim = *p_sin_cos++;
|
||||
wre = *p_sin_cos++;
|
||||
|
||||
*psubband1_t-- = (WORD32)((ixheaacd_sub64_sat(ixheaacd_mult64(im, wre),
|
||||
ixheaacd_mult64(re, wim))) >>
|
||||
*psubband1_t-- = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wre),
|
||||
ixheaac_mult64(re, wim))) >>
|
||||
32);
|
||||
*psubband1_t-- = (WORD32)(
|
||||
(ixheaacd_add64(ixheaacd_mult64(re, wre), ixheaacd_mult64(im, wim))) >>
|
||||
(ixheaac_add64(ixheaac_mult64(re, wre), ixheaac_mult64(im, wim))) >>
|
||||
32);
|
||||
|
||||
re = *psubband12--;
|
||||
im = *psubband2++;
|
||||
|
||||
*psubband1_t2-- = (WORD32)(
|
||||
(ixheaacd_add64(ixheaacd_mult64(re, wim), ixheaacd_mult64(im, wre))) >>
|
||||
(ixheaac_add64(ixheaac_mult64(re, wim), ixheaac_mult64(im, wre))) >>
|
||||
32);
|
||||
*psubband1_t2-- = (WORD32)((ixheaacd_sub64_sat(ixheaacd_mult64(im, wim),
|
||||
ixheaacd_mult64(re, wre))) >>
|
||||
*psubband1_t2-- = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wim),
|
||||
ixheaac_mult64(re, wre))) >>
|
||||
32);
|
||||
|
||||
re = *psubband++;
|
||||
|
|
@ -997,20 +997,20 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
wre = *p_sin_cos++;
|
||||
|
||||
*psubband_t++ = (WORD32)(
|
||||
(ixheaacd_add64(ixheaacd_mult64(re, wre), ixheaacd_mult64(im, wim))) >>
|
||||
(ixheaac_add64(ixheaac_mult64(re, wre), ixheaac_mult64(im, wim))) >>
|
||||
32);
|
||||
*psubband_t++ = (WORD32)((ixheaacd_sub64_sat(ixheaacd_mult64(im, wre),
|
||||
ixheaacd_mult64(re, wim))) >>
|
||||
*psubband_t++ = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wre),
|
||||
ixheaac_mult64(re, wim))) >>
|
||||
32);
|
||||
|
||||
re = *psubband2++;
|
||||
im = *psubband12--;
|
||||
|
||||
*psubband_t2++ = (WORD32)((ixheaacd_sub64_sat(ixheaacd_mult64(im, wim),
|
||||
ixheaacd_mult64(re, wre))) >>
|
||||
*psubband_t2++ = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wim),
|
||||
ixheaac_mult64(re, wre))) >>
|
||||
32);
|
||||
*psubband_t2++ = (WORD32)(
|
||||
(ixheaacd_add64(ixheaacd_mult64(re, wim), ixheaacd_mult64(im, wre))) >>
|
||||
(ixheaac_add64(ixheaac_mult64(re, wim), ixheaac_mult64(im, wre))) >>
|
||||
32);
|
||||
|
||||
re = *psubband1--;
|
||||
|
|
@ -1020,11 +1020,11 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
wim = *p_sin_cos++;
|
||||
wre = *p_sin_cos++;
|
||||
|
||||
*psubband1_t-- = (WORD32)((ixheaacd_sub64_sat(ixheaacd_mult64(im, wre),
|
||||
ixheaacd_mult64(re, wim))) >>
|
||||
*psubband1_t-- = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wre),
|
||||
ixheaac_mult64(re, wim))) >>
|
||||
32);
|
||||
*psubband1_t-- = (WORD32)(
|
||||
(ixheaacd_add64(ixheaacd_mult64(re, wre), ixheaacd_mult64(im, wim))) >>
|
||||
(ixheaac_add64(ixheaac_mult64(re, wre), ixheaac_mult64(im, wim))) >>
|
||||
32);
|
||||
|
||||
re = *psubband12--;
|
||||
|
|
@ -1032,10 +1032,10 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
;
|
||||
|
||||
*psubband1_t2-- = (WORD32)(
|
||||
(ixheaacd_add64(ixheaacd_mult64(re, wim), ixheaacd_mult64(im, wre))) >>
|
||||
(ixheaac_add64(ixheaac_mult64(re, wim), ixheaac_mult64(im, wre))) >>
|
||||
32);
|
||||
*psubband1_t2-- = (WORD32)((ixheaacd_sub64_sat(ixheaacd_mult64(im, wim),
|
||||
ixheaacd_mult64(re, wre))) >>
|
||||
*psubband1_t2-- = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wim),
|
||||
ixheaac_mult64(re, wre))) >>
|
||||
32);
|
||||
}
|
||||
|
||||
|
|
@ -1097,8 +1097,8 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
(*ixheaacd_complex_fft_p2)(temp, &temp[8], 8, -1, &scaleshift);
|
||||
|
||||
for (z = 0; z < (qmf_bank->no_channels >> 1); z++) {
|
||||
subband[2 * z] = ixheaacd_shl32_sat(temp[z], scaleshift);
|
||||
subband[2 * z + 1] = ixheaacd_shl32_sat(temp[z + 8], scaleshift);
|
||||
subband[2 * z] = ixheaac_shl32_sat(temp[z], scaleshift);
|
||||
subband[2 * z + 1] = ixheaac_shl32_sat(temp[z + 8], scaleshift);
|
||||
}
|
||||
scaleshift = 0;
|
||||
for (z = 0; z < (qmf_bank->no_channels >> 1); z++) {
|
||||
|
|
@ -1109,8 +1109,8 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
(*ixheaacd_complex_fft_p2)(temp, &temp[8], 8, -1, &scaleshift);
|
||||
|
||||
for (z = 0; z < (qmf_bank->no_channels >> 1); z++) {
|
||||
subband[64 + 2 * z] = ixheaacd_shl32_sat(temp[z], scaleshift);
|
||||
subband[64 + 2 * z + 1] = ixheaacd_shl32_sat(temp[8 + z], scaleshift);
|
||||
subband[64 + 2 * z] = ixheaac_shl32_sat(temp[z], scaleshift);
|
||||
subband[64 + 2 * z + 1] = ixheaac_shl32_sat(temp[8 + z], scaleshift);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1121,7 +1121,7 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
|
||||
*psubband = *psubband >> 1;
|
||||
psubband++;
|
||||
*psubband1 = ixheaacd_negate32(*psubband >> 1);
|
||||
*psubband1 = ixheaac_negate32(*psubband >> 1);
|
||||
psubband1--;
|
||||
|
||||
p_sin = qmf_bank->esbr_alt_sin_twiddle;
|
||||
|
|
@ -1133,10 +1133,10 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
;
|
||||
|
||||
*psubband1-- = (WORD32)(
|
||||
(ixheaacd_add64(ixheaacd_mult64(re, wre), ixheaacd_mult64(im, wim))) >>
|
||||
(ixheaac_add64(ixheaac_mult64(re, wre), ixheaac_mult64(im, wim))) >>
|
||||
32);
|
||||
*psubband++ = (WORD32)((ixheaacd_sub64_sat(ixheaacd_mult64(im, wre),
|
||||
ixheaacd_mult64(re, wim))) >>
|
||||
*psubband++ = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wre),
|
||||
ixheaac_mult64(re, wim))) >>
|
||||
32);
|
||||
|
||||
psubband2 = &subband[64];
|
||||
|
|
@ -1145,7 +1145,7 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
re = *psubband12;
|
||||
;
|
||||
|
||||
*psubband12-- = ixheaacd_negate32_sat(*psubband2 >> 1);
|
||||
*psubband12-- = ixheaac_negate32_sat(*psubband2 >> 1);
|
||||
;
|
||||
*psubband2 = psubband2[1] >> 1;
|
||||
;
|
||||
|
|
@ -1154,11 +1154,11 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
im = *psubband12;
|
||||
;
|
||||
|
||||
*psubband2++ = ixheaacd_negate32_sat((WORD32)(
|
||||
(ixheaacd_add64(ixheaacd_mult64(re, wre), ixheaacd_mult64(im, wim))) >>
|
||||
*psubband2++ = ixheaac_negate32_sat((WORD32)(
|
||||
(ixheaac_add64(ixheaac_mult64(re, wre), ixheaac_mult64(im, wim))) >>
|
||||
32));
|
||||
*psubband12-- = (WORD32)((ixheaacd_sub64_sat(ixheaacd_mult64(re, wim),
|
||||
ixheaacd_mult64(im, wre))) >>
|
||||
*psubband12-- = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(re, wim),
|
||||
ixheaac_mult64(im, wre))) >>
|
||||
32);
|
||||
|
||||
for (i = (M_2 - 2); i >= 0; i--) {
|
||||
|
|
@ -1170,10 +1170,10 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
;
|
||||
|
||||
*psubband++ = (WORD32)(
|
||||
(ixheaacd_add64(ixheaacd_mult64(re, wim), ixheaacd_mult64(im, wre))) >>
|
||||
(ixheaac_add64(ixheaac_mult64(re, wim), ixheaac_mult64(im, wre))) >>
|
||||
32);
|
||||
*psubband1-- = (WORD32)((ixheaacd_sub64_sat(ixheaacd_mult64(im, wim),
|
||||
ixheaacd_mult64(re, wre))) >>
|
||||
*psubband1-- = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wim),
|
||||
ixheaac_mult64(re, wre))) >>
|
||||
32);
|
||||
|
||||
im = psubband2[0];
|
||||
|
|
@ -1183,11 +1183,11 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
re3 = *psubband12;
|
||||
;
|
||||
|
||||
*psubband12-- = ixheaacd_negate32_sat((WORD32)(
|
||||
(ixheaacd_add64(ixheaacd_mult64(re, wim), ixheaacd_mult64(im, wre))) >>
|
||||
*psubband12-- = ixheaac_negate32_sat((WORD32)(
|
||||
(ixheaac_add64(ixheaac_mult64(re, wim), ixheaac_mult64(im, wre))) >>
|
||||
32));
|
||||
*psubband2++ = (WORD32)((ixheaacd_sub64_sat(ixheaacd_mult64(re, wre),
|
||||
ixheaacd_mult64(im, wim))) >>
|
||||
*psubband2++ = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(re, wre),
|
||||
ixheaac_mult64(im, wim))) >>
|
||||
32);
|
||||
|
||||
wim = *p_sin++;
|
||||
|
|
@ -1196,20 +1196,20 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband,
|
|||
;
|
||||
|
||||
*psubband1-- = (WORD32)(
|
||||
(ixheaacd_add64(ixheaacd_mult64(re2, wre), ixheaacd_mult64(im, wim))) >>
|
||||
(ixheaac_add64(ixheaac_mult64(re2, wre), ixheaac_mult64(im, wim))) >>
|
||||
32);
|
||||
*psubband++ = (WORD32)((ixheaacd_sub64_sat(ixheaacd_mult64(im, wre),
|
||||
ixheaacd_mult64(re2, wim))) >>
|
||||
*psubband++ = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, wre),
|
||||
ixheaac_mult64(re2, wim))) >>
|
||||
32);
|
||||
|
||||
im = psubband12[0];
|
||||
;
|
||||
|
||||
*psubband2++ = ixheaacd_negate32_sat((WORD32)(
|
||||
(ixheaacd_add64(ixheaacd_mult64(re3, wre), ixheaacd_mult64(im, wim))) >>
|
||||
*psubband2++ = ixheaac_negate32_sat((WORD32)(
|
||||
(ixheaac_add64(ixheaac_mult64(re3, wre), ixheaac_mult64(im, wim))) >>
|
||||
32));
|
||||
*psubband12-- = (WORD32)((ixheaacd_sub64_sat(ixheaacd_mult64(re3, wim),
|
||||
ixheaacd_mult64(im, wre))) >>
|
||||
*psubband12-- = (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(re3, wim),
|
||||
ixheaac_mult64(im, wre))) >>
|
||||
32);
|
||||
}
|
||||
}
|
||||
|
|
@ -1227,12 +1227,12 @@ VOID ixheaacd_esbr_fwd_modulation(
|
|||
const WORD32 *tcos;
|
||||
|
||||
for (i = qmf_bank->no_channels - 1; i >= 0; i--) {
|
||||
temp1 = ixheaacd_shr32(*time_sample_buf++, HQ_SHIFT_64);
|
||||
temp2 = ixheaacd_shr32(*time_sample_buf1--, HQ_SHIFT_64);
|
||||
temp1 = ixheaac_shr32(*time_sample_buf++, HQ_SHIFT_64);
|
||||
temp2 = ixheaac_shr32(*time_sample_buf1--, HQ_SHIFT_64);
|
||||
|
||||
*t_real_subband++ = ixheaacd_sub32_sat(temp1, temp2);
|
||||
*t_real_subband++ = ixheaac_sub32_sat(temp1, temp2);
|
||||
;
|
||||
*t_imag_subband++ = ixheaacd_add32_sat(temp1, temp2);
|
||||
*t_imag_subband++ = ixheaac_add32_sat(temp1, temp2);
|
||||
;
|
||||
}
|
||||
|
||||
|
|
@ -1251,12 +1251,12 @@ VOID ixheaacd_esbr_fwd_modulation(
|
|||
cosh = *tcos++;
|
||||
sinh = *tcos++;
|
||||
*real_subband++ =
|
||||
ixheaacd_sat64_32((ixheaacd_add64(ixheaacd_mult64(re, cosh),
|
||||
ixheaacd_mult64(im, sinh))) >>
|
||||
ixheaac_sat64_32((ixheaac_add64(ixheaac_mult64(re, cosh),
|
||||
ixheaac_mult64(im, sinh))) >>
|
||||
31);
|
||||
*imag_subband++ =
|
||||
ixheaacd_sat64_32((ixheaacd_sub64_sat(ixheaacd_mult64(im, cosh),
|
||||
ixheaacd_mult64(re, sinh))) >>
|
||||
ixheaac_sat64_32((ixheaac_sub64_sat(ixheaac_mult64(im, cosh),
|
||||
ixheaac_mult64(re, sinh))) >>
|
||||
31);
|
||||
}
|
||||
}
|
||||
|
|
@ -1269,28 +1269,28 @@ VOID ixheaacd_esbr_qmfsyn64_winadd(WORD32 *tmp1, WORD32 *tmp2, WORD32 *inp1,
|
|||
WORD64 syn_out = 0;
|
||||
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[0 + k], inp1[k + 0]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp1[0 + k], inp1[k + 0]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[256 + k], inp1[k + 128]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp1[256 + k], inp1[k + 128]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[512 + k], inp1[k + 256]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp1[512 + k], inp1[k + 256]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[768 + k], inp1[k + 384]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp1[768 + k], inp1[k + 384]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[1024 + k], inp1[k + 512]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp1[1024 + k], inp1[k + 512]));
|
||||
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[128 + k], inp1[k + 64]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp2[128 + k], inp1[k + 64]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[384 + k], inp1[k + 192]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp2[384 + k], inp1[k + 192]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[640 + k], inp1[k + 320]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp2[640 + k], inp1[k + 320]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[896 + k], inp1[k + 448]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp2[896 + k], inp1[k + 448]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[1152 + k], inp1[k + 576]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp2[1152 + k], inp1[k + 576]));
|
||||
|
||||
sample_buffer[ch_fac * k] = ixheaacd_sat64_32(syn_out >> 31);
|
||||
sample_buffer[ch_fac * k] = ixheaac_sat64_32(syn_out >> 31);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1302,26 +1302,26 @@ VOID ixheaacd_esbr_qmfsyn32_winadd(WORD32 *tmp1, WORD32 *tmp2, WORD32 *inp1,
|
|||
WORD64 syn_out = 0;
|
||||
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[0 + k], inp1[2 * (k + 0)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp1[0 + k], inp1[2 * (k + 0)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[128 + k], inp1[2 * (k + 64)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp1[128 + k], inp1[2 * (k + 64)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[256 + k], inp1[2 * (k + 128)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp1[256 + k], inp1[2 * (k + 128)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[384 + k], inp1[2 * (k + 192)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp1[384 + k], inp1[2 * (k + 192)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp1[512 + k], inp1[2 * (k + 256)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp1[512 + k], inp1[2 * (k + 256)]));
|
||||
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[64 + k], inp1[2 * (k + 32)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp2[64 + k], inp1[2 * (k + 32)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[192 + k], inp1[2 * (k + 96)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp2[192 + k], inp1[2 * (k + 96)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[320 + k], inp1[2 * (k + 160)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp2[320 + k], inp1[2 * (k + 160)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[448 + k], inp1[2 * (k + 224)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp2[448 + k], inp1[2 * (k + 224)]));
|
||||
syn_out =
|
||||
ixheaacd_add64(syn_out, ixheaacd_mult64(tmp2[576 + k], inp1[2 * (k + 288)]));
|
||||
ixheaac_add64(syn_out, ixheaac_mult64(tmp2[576 + k], inp1[2 * (k + 288)]));
|
||||
|
||||
sample_buffer[ch_fac * k] = (WORD32)(syn_out >> 31);
|
||||
}
|
||||
|
|
@ -1334,21 +1334,21 @@ VOID ixheaacd_shiftrountine(WORD32 *qmf_real, WORD32 *qmf_imag, WORD32 len,
|
|||
|
||||
if (common_shift < 0) {
|
||||
WORD32 cshift = -common_shift;
|
||||
cshift = ixheaacd_min32(cshift, 31);
|
||||
cshift = ixheaac_min32(cshift, 31);
|
||||
for (j = len - 1; j >= 0; j--) {
|
||||
treal = *qmf_real;
|
||||
timag = *qmf_imag;
|
||||
|
||||
treal = (ixheaacd_shr32(treal, cshift));
|
||||
timag = (ixheaacd_shr32(timag, cshift));
|
||||
treal = (ixheaac_shr32(treal, cshift));
|
||||
timag = (ixheaac_shr32(timag, cshift));
|
||||
|
||||
*qmf_real++ = treal;
|
||||
*qmf_imag++ = timag;
|
||||
}
|
||||
} else {
|
||||
for (j = len - 1; j >= 0; j--) {
|
||||
treal = (ixheaacd_shl32_sat(*qmf_real, common_shift));
|
||||
timag = (ixheaacd_shl32_sat(*qmf_imag, common_shift));
|
||||
treal = (ixheaac_shl32_sat(*qmf_real, common_shift));
|
||||
timag = (ixheaac_shl32_sat(*qmf_imag, common_shift));
|
||||
*qmf_real++ = treal;
|
||||
*qmf_imag++ = timag;
|
||||
}
|
||||
|
|
@ -1369,20 +1369,20 @@ VOID ixheaacd_shiftrountine_with_rnd_hq(WORD32 *qmf_real, WORD32 *qmf_imag,
|
|||
r1 = *qmf_real++;
|
||||
i1 = *qmf_imag++;
|
||||
|
||||
timag = ixheaacd_add32_sat(i1, r1);
|
||||
timag = (ixheaacd_shl32_sat(timag, shift));
|
||||
timag = ixheaac_add32_sat(i1, r1);
|
||||
timag = (ixheaac_shl32_sat(timag, shift));
|
||||
filter_states_rev[j] = timag;
|
||||
|
||||
treal = ixheaacd_sub32_sat(i2, r2);
|
||||
treal = (ixheaacd_shl32_sat(treal, shift));
|
||||
treal = ixheaac_sub32_sat(i2, r2);
|
||||
treal = (ixheaac_shl32_sat(treal, shift));
|
||||
filter_states[j] = treal;
|
||||
|
||||
treal = ixheaacd_sub32_sat(i1, r1);
|
||||
treal = (ixheaacd_shl32_sat(treal, shift));
|
||||
treal = ixheaac_sub32_sat(i1, r1);
|
||||
treal = (ixheaac_shl32_sat(treal, shift));
|
||||
*filter_states++ = treal;
|
||||
|
||||
timag = ixheaacd_add32_sat(i2, r2);
|
||||
timag = (ixheaacd_shl32_sat(timag, shift));
|
||||
timag = ixheaac_add32_sat(i2, r2);
|
||||
timag = (ixheaac_shl32_sat(timag, shift));
|
||||
*filter_states_rev++ = timag;
|
||||
}
|
||||
}
|
||||
|
|
@ -1429,58 +1429,58 @@ VOID ixheaacd_radix4bfly(const WORD16 *w, WORD32 *x, WORD32 index1,
|
|||
x_l1_0 = x[l1];
|
||||
x_l2_0 = x[l2];
|
||||
|
||||
xh0_0 = ixheaacd_add32_sat(x_0, x_l1_0);
|
||||
xl0_0 = ixheaacd_sub32_sat(x_0, x_l1_0);
|
||||
xh0_0 = ixheaac_add32_sat(x_0, x_l1_0);
|
||||
xl0_0 = ixheaac_sub32_sat(x_0, x_l1_0);
|
||||
|
||||
xh20_0 = ixheaacd_add32_sat(x_h2_0, x_l2_0);
|
||||
xl20_0 = ixheaacd_sub32_sat(x_h2_0, x_l2_0);
|
||||
xh20_0 = ixheaac_add32_sat(x_h2_0, x_l2_0);
|
||||
xl20_0 = ixheaac_sub32_sat(x_h2_0, x_l2_0);
|
||||
|
||||
x[0] = ixheaacd_add32_sat(xh0_0, xh20_0);
|
||||
xt0_0 = ixheaacd_sub32_sat(xh0_0, xh20_0);
|
||||
x[0] = ixheaac_add32_sat(xh0_0, xh20_0);
|
||||
xt0_0 = ixheaac_sub32_sat(xh0_0, xh20_0);
|
||||
|
||||
x_1 = x[1];
|
||||
x_h2_1 = x[h2 + 1];
|
||||
x_l1_1 = x[l1 + 1];
|
||||
x_l2_1 = x[l2 + 1];
|
||||
|
||||
xh1_0 = ixheaacd_add32_sat(x_1, x_l1_1);
|
||||
xl1_0 = ixheaacd_sub32_sat(x_1, x_l1_1);
|
||||
xh1_0 = ixheaac_add32_sat(x_1, x_l1_1);
|
||||
xl1_0 = ixheaac_sub32_sat(x_1, x_l1_1);
|
||||
|
||||
xh21_0 = ixheaacd_add32_sat(x_h2_1, x_l2_1);
|
||||
xl21_0 = ixheaacd_sub32_sat(x_h2_1, x_l2_1);
|
||||
xh21_0 = ixheaac_add32_sat(x_h2_1, x_l2_1);
|
||||
xl21_0 = ixheaac_sub32_sat(x_h2_1, x_l2_1);
|
||||
|
||||
x[1] = ixheaacd_add32_sat(xh1_0, xh21_0);
|
||||
yt0_0 = ixheaacd_sub32_sat(xh1_0, xh21_0);
|
||||
x[1] = ixheaac_add32_sat(xh1_0, xh21_0);
|
||||
yt0_0 = ixheaac_sub32_sat(xh1_0, xh21_0);
|
||||
|
||||
xt1_0 = ixheaacd_add32_sat(xl0_0, xl21_0);
|
||||
xt2_0 = ixheaacd_sub32_sat(xl0_0, xl21_0);
|
||||
xt1_0 = ixheaac_add32_sat(xl0_0, xl21_0);
|
||||
xt2_0 = ixheaac_sub32_sat(xl0_0, xl21_0);
|
||||
|
||||
yt2_0 = ixheaacd_add32_sat(xl1_0, xl20_0);
|
||||
yt1_0 = ixheaacd_sub32_sat(xl1_0, xl20_0);
|
||||
yt2_0 = ixheaac_add32_sat(xl1_0, xl20_0);
|
||||
yt1_0 = ixheaac_sub32_sat(xl1_0, xl20_0);
|
||||
|
||||
mul_11 = ixheaacd_mult32x16in32(xt2_0, co30);
|
||||
mul_3 = ixheaacd_mult32x16in32(yt2_0, si30);
|
||||
x[l2] = ixheaacd_shl32_sat((mul_3 + mul_11), RADIXSHIFT);
|
||||
mul_11 = ixheaac_mult32x16in32(xt2_0, co30);
|
||||
mul_3 = ixheaac_mult32x16in32(yt2_0, si30);
|
||||
x[l2] = ixheaac_shl32_sat((mul_3 + mul_11), RADIXSHIFT);
|
||||
|
||||
mul_5 = ixheaacd_mult32x16in32(xt2_0, si30);
|
||||
mul_9 = ixheaacd_mult32x16in32(yt2_0, co30);
|
||||
x[l2 + 1] = ixheaacd_shl32_sat((mul_9 - mul_5), RADIXSHIFT);
|
||||
mul_5 = ixheaac_mult32x16in32(xt2_0, si30);
|
||||
mul_9 = ixheaac_mult32x16in32(yt2_0, co30);
|
||||
x[l2 + 1] = ixheaac_shl32_sat((mul_9 - mul_5), RADIXSHIFT);
|
||||
|
||||
mul_12 = ixheaacd_mult32x16in32(xt0_0, co20);
|
||||
mul_2 = ixheaacd_mult32x16in32(yt0_0, si20);
|
||||
x[l1] = ixheaacd_shl32_sat((mul_2 + mul_12), RADIXSHIFT);
|
||||
mul_12 = ixheaac_mult32x16in32(xt0_0, co20);
|
||||
mul_2 = ixheaac_mult32x16in32(yt0_0, si20);
|
||||
x[l1] = ixheaac_shl32_sat((mul_2 + mul_12), RADIXSHIFT);
|
||||
|
||||
mul_6 = ixheaacd_mult32x16in32(xt0_0, si20);
|
||||
mul_8 = ixheaacd_mult32x16in32(yt0_0, co20);
|
||||
x[l1 + 1] = ixheaacd_shl32_sat((mul_8 - mul_6), RADIXSHIFT);
|
||||
mul_6 = ixheaac_mult32x16in32(xt0_0, si20);
|
||||
mul_8 = ixheaac_mult32x16in32(yt0_0, co20);
|
||||
x[l1 + 1] = ixheaac_shl32_sat((mul_8 - mul_6), RADIXSHIFT);
|
||||
|
||||
mul_4 = ixheaacd_mult32x16in32(xt1_0, co10);
|
||||
mul_1 = ixheaacd_mult32x16in32(yt1_0, si10);
|
||||
x[h2] = ixheaacd_shl32_sat((mul_1 + mul_4), RADIXSHIFT);
|
||||
mul_4 = ixheaac_mult32x16in32(xt1_0, co10);
|
||||
mul_1 = ixheaac_mult32x16in32(yt1_0, si10);
|
||||
x[h2] = ixheaac_shl32_sat((mul_1 + mul_4), RADIXSHIFT);
|
||||
|
||||
mul_10 = ixheaacd_mult32x16in32(xt1_0, si10);
|
||||
mul_7 = ixheaacd_mult32x16in32(yt1_0, co10);
|
||||
x[h2 + 1] = ixheaacd_shl32_sat((mul_7 - mul_10), RADIXSHIFT);
|
||||
mul_10 = ixheaac_mult32x16in32(xt1_0, si10);
|
||||
mul_7 = ixheaac_mult32x16in32(yt1_0, co10);
|
||||
x[h2 + 1] = ixheaac_shl32_sat((mul_7 - mul_10), RADIXSHIFT);
|
||||
|
||||
x += 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,15 +20,15 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_sbrdecsettings.h"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -19,10 +19,10 @@
|
|||
*/
|
||||
#include "ixheaacd_cnst.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
|
||||
#include "ixheaacd_windows.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -21,17 +21,17 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
|
||||
#include <ixheaacd_cnst.h>
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_sbrdecsettings.h"
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
#include "ixheaacd_ec_rom.h"
|
||||
#include "ixheaacd_ec_struct_def.h"
|
||||
#include "ixheaacd_channelinfo.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
|
||||
#include "ixheaacd_aac_rom.h"
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ static VOID ixheaacd_aac_ec_flip_spec_sign(WORD32 *ptr_spec_coeff, WORD32 num_sa
|
|||
for (idx = 0; idx < num_samples; idx++) {
|
||||
random_value = ptr_spec_coeff[idx] ^ idx;
|
||||
if ((random_value & 1) == 0) {
|
||||
ptr_spec_coeff[idx] = ixheaacd_negate32_sat(ptr_spec_coeff[idx]);
|
||||
ptr_spec_coeff[idx] = ixheaac_negate32_sat(ptr_spec_coeff[idx]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -126,18 +126,18 @@ static VOID ixheaacd_aac_ec_calc_sfb_nrg(WORD32 *ptr_spec_coeff,
|
|||
WORD32 accu = 1;
|
||||
WORD32 q_nrg;
|
||||
if (sfb == 0) {
|
||||
q_nrg = (sizeof(accu) << 3) - ixheaacd_norm32(ptr_sfb_offset[sfb] - 0);
|
||||
q_nrg = (sizeof(accu) << 3) - ixheaac_norm32(ptr_sfb_offset[sfb] - 0);
|
||||
for (; line < ptr_sfb_offset[sfb]; line++) {
|
||||
accu += ixheaacd_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg;
|
||||
accu += ixheaac_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg;
|
||||
}
|
||||
ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
|
||||
ptr_sfb_energy[sfb] = ixheaac_norm32(accu);
|
||||
}
|
||||
q_nrg = (sizeof(accu) << 3) -
|
||||
ixheaacd_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
|
||||
ixheaac_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
|
||||
for (; line < ptr_sfb_offset[sfb + 1]; line++) {
|
||||
accu += ixheaacd_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg;
|
||||
accu += ixheaac_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg;
|
||||
}
|
||||
ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
|
||||
ptr_sfb_energy[sfb] = ixheaac_norm32(accu);
|
||||
}
|
||||
} else {
|
||||
total_scale_factor_bands = pstr_samp_rate_info->num_sfb_1024 - 1;
|
||||
|
|
@ -147,20 +147,20 @@ static VOID ixheaacd_aac_ec_calc_sfb_nrg(WORD32 *ptr_spec_coeff,
|
|||
WORD32 accu = 1;
|
||||
WORD32 q_nrg;
|
||||
if (sfb == 0) {
|
||||
q_nrg = (sizeof(accu) << 3) - ixheaacd_norm32(ptr_sfb_offset[sfb] - 0);
|
||||
q_nrg = (sizeof(accu) << 3) - ixheaac_norm32(ptr_sfb_offset[sfb] - 0);
|
||||
for (; line < ptr_sfb_offset[sfb]; line++) {
|
||||
accu +=
|
||||
ixheaacd_mult32(ptr_spec_coeff[line >> 3], ptr_spec_coeff[line >> 3]) >> q_nrg;
|
||||
ixheaac_mult32(ptr_spec_coeff[line >> 3], ptr_spec_coeff[line >> 3]) >> q_nrg;
|
||||
}
|
||||
ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
|
||||
ptr_sfb_energy[sfb] = ixheaac_norm32(accu);
|
||||
}
|
||||
q_nrg = (sizeof(accu) << 3) -
|
||||
ixheaacd_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
|
||||
ixheaac_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
|
||||
for (; line < ptr_sfb_offset[sfb + 1]; line++) {
|
||||
accu +=
|
||||
ixheaacd_mult32(ptr_spec_coeff[line >> 3], ptr_spec_coeff[line >> 3]) >> q_nrg;
|
||||
ixheaac_mult32(ptr_spec_coeff[line >> 3], ptr_spec_coeff[line >> 3]) >> q_nrg;
|
||||
}
|
||||
ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
|
||||
ptr_sfb_energy[sfb] = ixheaac_norm32(accu);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -177,18 +177,18 @@ static VOID ixheaacd_aac_ec_calc_sfb_nrg(WORD32 *ptr_spec_coeff,
|
|||
WORD32 accu = 1;
|
||||
WORD32 q_nrg;
|
||||
if (sfb == 0) {
|
||||
q_nrg = (sizeof(accu) << 3) - ixheaacd_norm32(ptr_sfb_offset[sfb] - 0);
|
||||
q_nrg = (sizeof(accu) << 3) - ixheaac_norm32(ptr_sfb_offset[sfb] - 0);
|
||||
for (; line < ptr_sfb_offset[sfb]; line++) {
|
||||
accu += ixheaacd_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg;
|
||||
accu += ixheaac_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg;
|
||||
}
|
||||
ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
|
||||
ptr_sfb_energy[sfb] = ixheaac_norm32(accu);
|
||||
}
|
||||
q_nrg = (sizeof(accu) << 3) -
|
||||
ixheaacd_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
|
||||
ixheaac_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
|
||||
for (; line < ptr_sfb_offset[sfb + 1]; line++) {
|
||||
accu += ixheaacd_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg;
|
||||
accu += ixheaac_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg;
|
||||
}
|
||||
ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
|
||||
ptr_sfb_energy[sfb] = ixheaac_norm32(accu);
|
||||
}
|
||||
} else {
|
||||
total_scale_factor_bands = pstr_samp_rate_info->num_sfb_128 - 1;
|
||||
|
|
@ -198,22 +198,22 @@ static VOID ixheaacd_aac_ec_calc_sfb_nrg(WORD32 *ptr_spec_coeff,
|
|||
WORD32 accu = 1;
|
||||
WORD32 q_nrg;
|
||||
if (sfb == 0) {
|
||||
q_nrg = (sizeof(accu) << 3) - ixheaacd_norm32(ptr_sfb_offset[sfb] - 0);
|
||||
q_nrg = (sizeof(accu) << 3) - ixheaac_norm32(ptr_sfb_offset[sfb] - 0);
|
||||
for (; line < ptr_sfb_offset[sfb] << 3; line++) {
|
||||
accu += (accu +
|
||||
(ixheaacd_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg)) >>
|
||||
(ixheaac_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg)) >>
|
||||
3;
|
||||
}
|
||||
ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
|
||||
ptr_sfb_energy[sfb] = ixheaac_norm32(accu);
|
||||
}
|
||||
q_nrg = (sizeof(accu) << 3) -
|
||||
ixheaacd_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
|
||||
ixheaac_norm32(ptr_sfb_offset[sfb + 1] - ptr_sfb_offset[sfb]);
|
||||
for (; line < ptr_sfb_offset[sfb + 1] << 3; line++) {
|
||||
accu +=
|
||||
(accu + (ixheaacd_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg)) >>
|
||||
(accu + (ixheaac_mult32(ptr_spec_coeff[line], ptr_spec_coeff[line]) >> q_nrg)) >>
|
||||
3;
|
||||
}
|
||||
ptr_sfb_energy[sfb] = ixheaacd_norm32(accu);
|
||||
ptr_sfb_energy[sfb] = ixheaac_norm32(accu);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -238,8 +238,8 @@ static VOID ixheaacd_aac_ec_interpolate(WORD32 *ptr_spec_coeff, WORD16 *ptr_spec
|
|||
|
||||
for (; line < ptr_sfb_offset[sfb]; line++) {
|
||||
WORD32 accu =
|
||||
ixheaacd_mult32x16in32_shl(ptr_spec_coeff[line], ia_ec_interpolation_fac[fac_mod]);
|
||||
ptr_spec_coeff[line] = ixheaacd_shl32_dir_sat(accu, fac_shift);
|
||||
ixheaac_mult32x16in32_shl(ptr_spec_coeff[line], ia_ec_interpolation_fac[fac_mod]);
|
||||
ptr_spec_coeff[line] = ixheaac_shl32_dir_sat(accu, fac_shift);
|
||||
}
|
||||
}
|
||||
*ptr_spec_scale_out = max(*ptr_spec_scale_prev, *ptr_spec_scale_act);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -18,7 +18,7 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_defines.h"
|
||||
#include "ixheaacd_aac_rom.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_defines.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
|
@ -62,7 +62,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_mac32_tns_sat(WORD32 a, WORD32 b,
|
|||
|
||||
temp_result = (WORD64)a * (WORD64)b;
|
||||
result = (WORD32)(temp_result >> 32);
|
||||
result = ixheaacd_add32_sat(c, result);
|
||||
result = ixheaac_add32_sat(c, result);
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
|
@ -119,16 +119,16 @@ VOID ixheaacd_tns_parcor_to_lpc(WORD32 *parcor, WORD32 *lpc, WORD16 *scale,
|
|||
for (j = 0; j < order; j++) {
|
||||
w[j] = (accu1);
|
||||
|
||||
accu1 = ixheaacd_add32_sat(accu1,
|
||||
ixheaacd_mult32_shl_sat(parcor[j], (z[j])));
|
||||
if (ixheaacd_abs32_sat(accu1) == 0x7fffffff) status = 1;
|
||||
accu1 = ixheaac_add32_sat(accu1,
|
||||
ixheaac_mult32_shl_sat(parcor[j], (z[j])));
|
||||
if (ixheaac_abs32_sat(accu1) == 0x7fffffff) status = 1;
|
||||
}
|
||||
for (j = (order - 1); j >= 0; j--) {
|
||||
accu2 = (z[j]);
|
||||
accu2 = ixheaacd_add32_sat(accu2,
|
||||
ixheaacd_mult32_shl_sat(parcor[j], (w[j])));
|
||||
accu2 = ixheaac_add32_sat(accu2,
|
||||
ixheaac_mult32_shl_sat(parcor[j], (w[j])));
|
||||
z[j + 1] = (accu2);
|
||||
if (ixheaacd_abs32_sat(accu2) == 0x7fffffff) status = 1;
|
||||
if (ixheaac_abs32_sat(accu2) == 0x7fffffff) status = 1;
|
||||
}
|
||||
|
||||
z[0] = (z1);
|
||||
|
|
@ -171,25 +171,25 @@ VOID ixheaacd_tns_parcor_lpc_convert_dec(WORD16 *parcor, WORD16 *lpc,
|
|||
accu = accu1;
|
||||
|
||||
for (j = 0; j < order; j++) {
|
||||
temp_buf2[j] = ixheaacd_round16(accu1);
|
||||
accu1 = ixheaacd_mac16x16in32_shl_sat(accu1, parcor[j], temp_buf1[j]);
|
||||
temp_buf2[j] = ixheaac_round16(accu1);
|
||||
accu1 = ixheaac_mac16x16in32_shl_sat(accu1, parcor[j], temp_buf1[j]);
|
||||
|
||||
if (ixheaacd_abs32_sat(accu1) == 0x7fffffff) {
|
||||
if (ixheaac_abs32_sat(accu1) == 0x7fffffff) {
|
||||
status = 1;
|
||||
}
|
||||
}
|
||||
|
||||
for (j = (order - 1); j >= 0; j--) {
|
||||
accu2 = ixheaacd_deposit16h_in32(temp_buf1[j]);
|
||||
accu2 = ixheaacd_mac16x16in32_shl_sat(accu2, parcor[j], temp_buf2[j]);
|
||||
temp_buf1[j + 1] = ixheaacd_round16(accu2);
|
||||
if (ixheaacd_abs32_sat(accu2) == 0x7fffffff) {
|
||||
accu2 = ixheaac_deposit16h_in32(temp_buf1[j]);
|
||||
accu2 = ixheaac_mac16x16in32_shl_sat(accu2, parcor[j], temp_buf2[j]);
|
||||
temp_buf1[j + 1] = ixheaac_round16(accu2);
|
||||
if (ixheaac_abs32_sat(accu2) == 0x7fffffff) {
|
||||
status = 1;
|
||||
}
|
||||
}
|
||||
|
||||
temp_buf1[0] = ixheaacd_round16(accu);
|
||||
lpc[i] = ixheaacd_round16(accu1);
|
||||
temp_buf1[0] = ixheaac_round16(accu);
|
||||
lpc[i] = ixheaac_round16(accu1);
|
||||
accu1 = 0;
|
||||
}
|
||||
|
||||
|
|
@ -220,28 +220,28 @@ VOID ixheaacd_tns_ar_filter_fixed_dec(WORD32 *spectrum, WORD32 size, WORD32 inc,
|
|||
}
|
||||
{
|
||||
for (i = 0; i < order; i++) {
|
||||
y = ixheaacd_shl32_sat((*spectrum), scale_spec);
|
||||
y = ixheaac_shl32_sat((*spectrum), scale_spec);
|
||||
acc = 0;
|
||||
|
||||
for (j = i; j > 0; j--) {
|
||||
acc = ixheaacd_mac32_tns_sat(state[j - 1], lpc[j], acc);
|
||||
state[j] = state[j - 1];
|
||||
}
|
||||
y = ixheaacd_sub32_sat(y, ixheaacd_shl32_sat(acc, 1));
|
||||
state[0] = ixheaacd_shl32_sat(y, shift_value);
|
||||
y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
|
||||
state[0] = ixheaac_shl32_sat(y, shift_value);
|
||||
|
||||
*spectrum = y >> scale_spec;
|
||||
spectrum += inc;
|
||||
}
|
||||
for (i = order; i < size; i++) {
|
||||
y = ixheaacd_shl32_sat((*spectrum), scale_spec);
|
||||
y = ixheaac_shl32_sat((*spectrum), scale_spec);
|
||||
acc = 0;
|
||||
for (j = order; j > 0; j--) {
|
||||
acc = ixheaacd_mac32_tns_sat(state[j - 1], lpc[j], acc);
|
||||
state[j] = state[j - 1];
|
||||
}
|
||||
y = ixheaacd_sub32_sat(y, ixheaacd_shl32_sat(acc, 1));
|
||||
state[0] = ixheaacd_shl32_sat(y, shift_value);
|
||||
y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
|
||||
state[0] = ixheaac_shl32_sat(y, shift_value);
|
||||
|
||||
*spectrum = y >> scale_spec;
|
||||
spectrum += inc;
|
||||
|
|
@ -267,15 +267,15 @@ VOID ixheaacd_tns_ar_filter_fixed_non_neon_armv7(WORD32 *spectrum, WORD32 size,
|
|||
}
|
||||
{
|
||||
for (i = 0; i < order; i++) {
|
||||
y = ixheaacd_shl32_sat((*spectrum), scale_spec);
|
||||
y = ixheaac_shl32_sat((*spectrum), scale_spec);
|
||||
acc = 0;
|
||||
|
||||
for (j = i; j > 0; j--) {
|
||||
acc = ixheaacd_mac32_tns_sat(state[j - 1], lpc[j], acc);
|
||||
state[j] = state[j - 1];
|
||||
}
|
||||
y = ixheaacd_sub32_sat(y, ixheaacd_shl32_sat(acc, 1));
|
||||
state[0] = ixheaacd_shl32_sat(y, shift_value);
|
||||
y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
|
||||
state[0] = ixheaac_shl32_sat(y, shift_value);
|
||||
|
||||
*spectrum = y >> scale_spec;
|
||||
spectrum += inc;
|
||||
|
|
@ -283,15 +283,15 @@ VOID ixheaacd_tns_ar_filter_fixed_non_neon_armv7(WORD32 *spectrum, WORD32 size,
|
|||
for (i = order; i < size; i++) {
|
||||
WORD64 acc = 0;
|
||||
WORD32 acc1;
|
||||
y = ixheaacd_shl32_sat((*spectrum), scale_spec);
|
||||
y = ixheaac_shl32_sat((*spectrum), scale_spec);
|
||||
for (j = order; j > 0; j--) {
|
||||
acc = ixheaacd_mac32x32in64_dual(state[j - 1], lpc[j], acc);
|
||||
acc = ixheaac_mac32x32in64_dual(state[j - 1], lpc[j], acc);
|
||||
state[j] = state[j - 1];
|
||||
}
|
||||
acc1 = (WORD32)(acc >> 32);
|
||||
|
||||
y = ixheaacd_sub32_sat(y, ixheaacd_shl32_sat(acc1, 1));
|
||||
state[0] = ixheaacd_shl32_sat(y, shift_value);
|
||||
y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc1, 1));
|
||||
state[0] = ixheaac_shl32_sat(y, shift_value);
|
||||
|
||||
*spectrum = y >> scale_spec;
|
||||
spectrum += inc;
|
||||
|
|
@ -315,15 +315,15 @@ VOID ixheaacd_tns_ar_filter_fixed_armv8(WORD32 *spectrum, WORD32 size,
|
|||
}
|
||||
{
|
||||
for (i = 0; i < order; i++) {
|
||||
y = ixheaacd_shl32_sat((*spectrum), scale_spec);
|
||||
y = ixheaac_shl32_sat((*spectrum), scale_spec);
|
||||
acc = 0;
|
||||
|
||||
for (j = i; j > 0; j--) {
|
||||
acc = ixheaacd_mac32_tns_sat(state[j - 1], lpc[j], acc);
|
||||
state[j] = state[j - 1];
|
||||
}
|
||||
y = ixheaacd_sub32_sat(y, ixheaacd_shl32_sat(acc, 1));
|
||||
state[0] = ixheaacd_shl32_sat(y, shift_value);
|
||||
y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
|
||||
state[0] = ixheaac_shl32_sat(y, shift_value);
|
||||
|
||||
*spectrum = y >> scale_spec;
|
||||
spectrum += inc;
|
||||
|
|
@ -331,15 +331,15 @@ VOID ixheaacd_tns_ar_filter_fixed_armv8(WORD32 *spectrum, WORD32 size,
|
|||
for (i = order; i < size; i++) {
|
||||
WORD64 acc = 0;
|
||||
WORD32 acc1;
|
||||
y = ixheaacd_shl32_sat((*spectrum), scale_spec);
|
||||
y = ixheaac_shl32_sat((*spectrum), scale_spec);
|
||||
for (j = order; j > 0; j--) {
|
||||
acc = ixheaacd_mac32x32in64_dual(state[j - 1], lpc[j], acc);
|
||||
acc = ixheaac_mac32x32in64_dual(state[j - 1], lpc[j], acc);
|
||||
state[j] = state[j - 1];
|
||||
}
|
||||
acc1 = (WORD32)(acc >> 32);
|
||||
|
||||
y = ixheaacd_sub32_sat(y, ixheaacd_shl32_sat(acc1, 1));
|
||||
state[0] = ixheaacd_shl32_sat(y, shift_value);
|
||||
y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc1, 1));
|
||||
state[0] = ixheaac_shl32_sat(y, shift_value);
|
||||
|
||||
*spectrum = y >> scale_spec;
|
||||
spectrum += inc;
|
||||
|
|
@ -358,11 +358,11 @@ void ixheaacd_tns_ma_filter_fixed_ld(WORD32 *spectrum, WORD32 size, WORD32 inc,
|
|||
for (i = 0; i < size; i++) {
|
||||
y = *spectrum;
|
||||
|
||||
for (j = 0; j < order; j++) y += ixheaacd_mult32_shl(state[j], lpc[j + 1]);
|
||||
for (j = 0; j < order; j++) y += ixheaac_mult32_shl(state[j], lpc[j + 1]);
|
||||
|
||||
for (j = order - 1; j > 0; j--) state[j] = state[j - 1];
|
||||
|
||||
state[0] = ixheaacd_shl32_dir_sat(*spectrum, shift_value);
|
||||
state[0] = ixheaac_shl32_dir_sat(*spectrum, shift_value);
|
||||
*spectrum = y;
|
||||
spectrum += inc;
|
||||
}
|
||||
|
|
@ -388,32 +388,32 @@ VOID ixheaacd_tns_ar_filter_dec(WORD32 *spectrum, WORD32 size, WORD32 inc,
|
|||
}
|
||||
|
||||
for (i = 0; i < order; i++) {
|
||||
y = ixheaacd_shl32_sat((*spectrum), scale_spec);
|
||||
y = ixheaac_shl32_sat((*spectrum), scale_spec);
|
||||
acc = 0;
|
||||
|
||||
for (j = i; j > 0; j--) {
|
||||
acc = ixheaacd_add32_sat(
|
||||
acc, ixheaacd_mult32x16in32(ptr_filter_state[j - 1], lpc[j]));
|
||||
acc = ixheaac_add32_sat(
|
||||
acc, ixheaac_mult32x16in32(ptr_filter_state[j - 1], lpc[j]));
|
||||
ptr_filter_state[j] = ptr_filter_state[j - 1];
|
||||
}
|
||||
|
||||
y = ixheaacd_sub32_sat(y, ixheaacd_shl32_sat(acc, 1));
|
||||
ptr_filter_state[0] = ixheaacd_shl32_sat(y, shift_value);
|
||||
y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
|
||||
ptr_filter_state[0] = ixheaac_shl32_sat(y, shift_value);
|
||||
*spectrum = y >> scale_spec;
|
||||
spectrum += inc;
|
||||
}
|
||||
|
||||
for (i = order; i < size; i++) {
|
||||
y = ixheaacd_shl32_sat((*spectrum), scale_spec);
|
||||
y = ixheaac_shl32_sat((*spectrum), scale_spec);
|
||||
acc = 0;
|
||||
for (j = order; j > 0; j--) {
|
||||
acc = ixheaacd_add32_sat(
|
||||
acc, ixheaacd_mult32x16in32(ptr_filter_state[j - 1], lpc[j]));
|
||||
acc = ixheaac_add32_sat(
|
||||
acc, ixheaac_mult32x16in32(ptr_filter_state[j - 1], lpc[j]));
|
||||
ptr_filter_state[j] = ptr_filter_state[j - 1];
|
||||
}
|
||||
|
||||
y = ixheaacd_sub32_sat(y, ixheaacd_shl32_sat(acc, 1));
|
||||
ptr_filter_state[0] = ixheaacd_shl32_sat(y, shift_value);
|
||||
y = ixheaac_sub32_sat(y, ixheaac_shl32_sat(acc, 1));
|
||||
ptr_filter_state[0] = ixheaac_shl32_sat(y, shift_value);
|
||||
*spectrum = y >> scale_spec;
|
||||
spectrum += inc;
|
||||
}
|
||||
|
|
@ -425,24 +425,24 @@ WORD32 ixheaacd_calc_max_spectral_line_dec(WORD32 *ptr_tmp, WORD32 size) {
|
|||
|
||||
unroll_cnt = size >> 3;
|
||||
for (i = unroll_cnt; i--;) {
|
||||
max_spec_line = ixheaacd_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
max_spec_line = ixheaacd_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
max_spec_line = ixheaacd_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
max_spec_line = ixheaacd_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
|
||||
max_spec_line = ixheaacd_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
max_spec_line = ixheaacd_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
max_spec_line = ixheaacd_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
max_spec_line = ixheaacd_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
}
|
||||
|
||||
rem = size - (unroll_cnt << 3);
|
||||
|
||||
if (rem) {
|
||||
for (i = rem; i--;) {
|
||||
max_spec_line = ixheaacd_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
max_spec_line = ixheaac_abs32_nrm(*ptr_tmp++) | max_spec_line;
|
||||
}
|
||||
}
|
||||
|
||||
return ixheaacd_norm32(max_spec_line);
|
||||
return ixheaac_norm32(max_spec_line);
|
||||
}
|
||||
|
|
@ -20,13 +20,13 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
||||
#include "ixheaacd_defines.h"
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
#include "ixheaacd_mps_res_rom.h"
|
||||
#include "ixheaacd_mps_aac_struct.h"
|
||||
#include "ixheaacd_mps_dec.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
#include "ixheaacd_acelp_info.h"
|
||||
#include "ixheaacd_tns_usac.h"
|
||||
|
|
@ -1026,7 +1026,7 @@ WORD32 ixheaacd_aacdec_decodeframe(
|
|||
if (pstr_ec_state->fade_idx < MAX_FADE_FRAMES) {
|
||||
WORD32 fade_fac = ia_ec_fade_factors_fix[pstr_ec_state->fade_idx];
|
||||
for (k = 0; k < str_ics_info[ch].frame_length; k++) {
|
||||
time_data[k] = ixheaacd_mul32_sh(time_data[k], fade_fac, 30);
|
||||
time_data[k] = ixheaac_mul32_sh(time_data[k], fade_fac, 30);
|
||||
}
|
||||
} else {
|
||||
memset(time_data, 0, str_ics_info[ch].frame_length * sizeof(time_data[0]));
|
||||
|
|
@ -1057,7 +1057,7 @@ WORD32 ixheaacd_aacdec_decodeframe(
|
|||
*type = ele_type;
|
||||
|
||||
aac_dec_handle->block_number =
|
||||
ixheaacd_add32(aac_dec_handle->block_number, 1);
|
||||
ixheaac_add32(aac_dec_handle->block_number, 1);
|
||||
if (p_obj_exhaacplus_dec->aac_config.ui_err_conceal && !is_init) {
|
||||
p_obj_exhaacplus_dec->aac_config.frame_status = aac_dec_handle->frame_status;
|
||||
return IA_NO_ERROR;
|
||||
|
|
|
|||
|
|
@ -20,15 +20,15 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_defines.h"
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include <string.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_acelp_com.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
#include "ixheaacd_aac_rom.h"
|
||||
#include "ixheaacd_pulsedata.h"
|
||||
#include "ixheaacd_pns.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaacd_sbrdecsettings.h"
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
#include "ixheaacd_acelp_info.h"
|
||||
|
|
@ -44,8 +44,8 @@
|
|||
#include "ixheaacd_ec.h"
|
||||
#include "ixheaacd_arith_dec.h"
|
||||
#include "ixheaacd_func_def.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
#include "ixheaacd_error_codes.h"
|
||||
|
||||
extern const ia_usac_samp_rate_info ixheaacd_samp_rate_info[];
|
||||
|
|
@ -570,8 +570,8 @@ VOID ixheaacd_td_frm_dec(ia_usac_data_struct *usac_data, WORD32 k, WORD32 mod0)
|
|||
for (i = 0; i < nlong / 2; i++) {
|
||||
p_out_idata[i] = p_ioverlap[i] << 1;
|
||||
p_out_idata[i + nlong / 2] =
|
||||
ixheaacd_add32_sat(p_ioverlap[i + nlong / 2] << 1, p_in_idata[i]);
|
||||
p_ioverlap[i] = ixheaacd_add32_sat(p_in_idata[i + (nlong / 2)] >> 1, p_ioverlap[i + nlong]);
|
||||
ixheaac_add32_sat(p_ioverlap[i + nlong / 2] << 1, p_in_idata[i]);
|
||||
p_ioverlap[i] = ixheaac_add32_sat(p_in_idata[i + (nlong / 2)] >> 1, p_ioverlap[i + nlong]);
|
||||
p_ioverlap[i + (nlong / 2)] = 0;
|
||||
p_ioverlap[i + nlong] = 0;
|
||||
p_ioverlap[i + nlong + (nlong / 2)] = 0;
|
||||
|
|
@ -587,7 +587,7 @@ VOID ixheaacd_td_frm_dec(ia_usac_data_struct *usac_data, WORD32 k, WORD32 mod0)
|
|||
}
|
||||
}
|
||||
for (i = 0; i < nlong; i++) {
|
||||
p_out_idata[i] = ixheaacd_add32_sat(p_ioverlap[i] << 1, p_in_idata[i]);
|
||||
p_out_idata[i] = ixheaac_add32_sat(p_ioverlap[i] << 1, p_in_idata[i]);
|
||||
p_ioverlap[i] = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
#include "ixheaacd_drc_dec.h"
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
#include "ixheaacd_mps_polyphase.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
#include "ixheaacd_ec_defines.h"
|
||||
#include "ixheaacd_ec_struct_def.h"
|
||||
#include "ixheaacd_main.h"
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_interface.h"
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
#include "ixheaacd_drc_dec.h"
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
#include "ixheaacd_mps_polyphase.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
|
||||
#include "ixheaacd_ec_defines.h"
|
||||
#include "ixheaacd_ec_struct_def.h"
|
||||
|
|
@ -47,9 +47,9 @@
|
|||
#include "ixheaacd_arith_dec.h"
|
||||
|
||||
#include "ixheaacd_func_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
|
||||
extern const WORD32 ixheaacd_pre_post_twid_cos_sin_512[4][512];
|
||||
extern const WORD32 ixheaacd_pre_post_twid_cos_sin_384[4][384];
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@
|
|||
*/
|
||||
#include <math.h>
|
||||
#include <memory.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_cnst.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
|
||||
const FLOAT32 ixheaacd_gamma_table[17] = {
|
||||
1.0f, 0.92f, 0.8464f, 0.778688f, 0.716393f, 0.659082f,
|
||||
|
|
@ -40,9 +40,9 @@ VOID ixheaacd_preemphsis_tool(WORD32 *signal, WORD32 mu, WORD32 len,
|
|||
WORD32 mem) {
|
||||
WORD32 i;
|
||||
for (i = len - 1; i > 0; i--) {
|
||||
signal[i] -= (WORD32)ixheaacd_mul32_sh(mu, signal[i - 1], 16);
|
||||
signal[i] -= (WORD32)ixheaac_mul32_sh(mu, signal[i - 1], 16);
|
||||
}
|
||||
signal[0] -= (WORD32)ixheaacd_mul32_sh(mu, mem, 16);
|
||||
signal[0] -= (WORD32)ixheaac_mul32_sh(mu, mem, 16);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ VOID ixheaacd_residual_tool(WORD32 *a, WORD32 *x, WORD32 *y, WORD32 l,
|
|||
for (i = 0; i < n; i++) {
|
||||
s = x[i];
|
||||
for (j = 1; j <= 16; j++)
|
||||
s += (WORD32)ixheaacd_mul32_sh(a[j], x[i - j], 24);
|
||||
s += (WORD32)ixheaac_mul32_sh(a[j], x[i - j], 24);
|
||||
y[i] = s;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@
|
|||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaacd_memory_standards.h"
|
||||
#include "ixheaacd_mps_struct_def.h"
|
||||
#include "ixheaacd_mps_res_rom.h"
|
||||
|
|
|
|||
|
|
@ -21,18 +21,18 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_memory_standards.h"
|
||||
#include "ixheaacd_mps_struct_def.h"
|
||||
#include "ixheaacd_mps_res_rom.h"
|
||||
#include "ixheaacd_mps_aac_struct.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
#include "ixheaacd_apicmd_standards.h"
|
||||
#include "ixheaacd_aac_config.h"
|
||||
#include "ixheaacd_api_defs.h"
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
|
||||
#include "ixheaacd_channelinfo.h"
|
||||
#include "ixheaacd_drc_dec.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
#include "ixheaacd_env_extr.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
|
|
@ -327,7 +327,7 @@ VOID ixheaacd_allocate_sbr_scr(ia_sbr_scr_struct *sbr_scratch_struct,
|
|||
for (j = 0; j < num_ch; j++) {
|
||||
for (i = 0; i < 1024; i++) {
|
||||
*((WORD16 *)tmp_buf + slot_pos + total_channels * i + j) =
|
||||
ixheaacd_round16(ixheaacd_shl32_sat(
|
||||
ixheaac_round16(ixheaac_shl32_sat(
|
||||
*(tmp_buf + slot_pos + total_channels * i + j),
|
||||
*(p_qshift_arr + j)));
|
||||
}
|
||||
|
|
@ -336,7 +336,7 @@ VOID ixheaacd_allocate_sbr_scr(ia_sbr_scr_struct *sbr_scratch_struct,
|
|||
for (j = 0; j < num_ch; j++) {
|
||||
for (i = 0; i < 1024; i++) {
|
||||
*((WORD16 *)tmp_buf + total_channels * i + j) =
|
||||
ixheaacd_round16(ixheaacd_shl32_sat(
|
||||
ixheaac_round16(ixheaac_shl32_sat(
|
||||
*(tmp_buf + total_channels * i + j), *(p_qshift_arr + j)));
|
||||
}
|
||||
}
|
||||
|
|
@ -2789,7 +2789,7 @@ IA_ERRORCODE ixheaacd_dec_execute(
|
|||
i < (p_state_enhaacplus_dec->peak_limiter.attack_time_samples -
|
||||
p_state_enhaacplus_dec->peak_limiter.delayed_input_index);
|
||||
i++) {
|
||||
*(time_data + total_channels * i + j) = ixheaacd_round16(
|
||||
*(time_data + total_channels * i + j) = ixheaac_round16(
|
||||
(WORD32)*(p_state_enhaacplus_dec->peak_limiter.delayed_input +
|
||||
(p_state_enhaacplus_dec->peak_limiter.delayed_input_index) *
|
||||
total_channels +
|
||||
|
|
@ -2806,7 +2806,7 @@ IA_ERRORCODE ixheaacd_dec_execute(
|
|||
p_state_enhaacplus_dec->peak_limiter.delayed_input_index) *
|
||||
total_channels +
|
||||
total_channels * i + j) =
|
||||
ixheaacd_round16(
|
||||
ixheaac_round16(
|
||||
(WORD32)*(p_state_enhaacplus_dec->peak_limiter.delayed_input +
|
||||
total_channels * i + j));
|
||||
}
|
||||
|
|
@ -3600,7 +3600,7 @@ IA_ERRORCODE ixheaacd_dec_execute(
|
|||
for (i = 0; i < frame_size * 2; i++) {
|
||||
for (j = 0; j < total_channels; j++) {
|
||||
*((WORD16 *)time_data + total_channels * i + j) =
|
||||
ixheaacd_round16(*((WORD32 *)time_data + total_channels * i + j));
|
||||
ixheaac_round16(*((WORD32 *)time_data + total_channels * i + j));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@
|
|||
*/
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_interface.h"
|
||||
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
#include "ixheaacd_drc_dec.h"
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
#include "ixheaacd_mps_polyphase.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
#include "ixheaacd_ec_defines.h"
|
||||
#include "ixheaacd_ec_struct_def.h"
|
||||
#include "ixheaacd_main.h"
|
||||
|
|
@ -1982,7 +1982,7 @@ static VOID ixheaacd_esc_iquant(WORD32 *q, WORD32 *coef, WORD32 noise_level,
|
|||
|
||||
coef[i] = flag * (coef[i] << 1);
|
||||
}
|
||||
temp = ixheaacd_mult64_sat(fac_fix, (WORD64)coef[i]);
|
||||
temp = ixheaac_mult64_sat(fac_fix, (WORD64)coef[i]);
|
||||
|
||||
coef[i] = (WORD32)(temp >> 22);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@
|
|||
#include <math.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaacd_acelp_com.h"
|
||||
|
||||
extern const WORD32 ixheaacd_factorial_7[8];
|
||||
|
|
@ -50,19 +50,19 @@ static VOID ixheaacd_nearest_neighbor_2d(WORD32 x[], WORD32 y[], WORD32 count,
|
|||
sum = 0;
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (x[i] < 0) {
|
||||
y[i] = ixheaacd_negate32_sat(
|
||||
ixheaacd_shl32_sat((ixheaacd_sub32_sat(1, x[i]) >> 1), 1));
|
||||
y[i] = ixheaac_negate32_sat(
|
||||
ixheaac_shl32_sat((ixheaac_sub32_sat(1, x[i]) >> 1), 1));
|
||||
} else {
|
||||
y[i] = ixheaacd_shl32_sat((ixheaacd_add32_sat(1, x[i]) >> 1), 1);
|
||||
y[i] = ixheaac_shl32_sat((ixheaac_add32_sat(1, x[i]) >> 1), 1);
|
||||
}
|
||||
sum = ixheaacd_add32_sat(sum, y[i]);
|
||||
sum = ixheaac_add32_sat(sum, y[i]);
|
||||
|
||||
if (x[i] % 2 != 0) {
|
||||
if (x[i] < 0) {
|
||||
rem_temp[i] = ixheaacd_negate32_sat(
|
||||
ixheaacd_sub32_sat(rem_temp[i], (1 << count)));
|
||||
rem_temp[i] = ixheaac_negate32_sat(
|
||||
ixheaac_sub32_sat(rem_temp[i], (1 << count)));
|
||||
} else {
|
||||
rem_temp[i] = ixheaacd_sub32_sat(rem_temp[i], (1 << count));
|
||||
rem_temp[i] = ixheaac_sub32_sat(rem_temp[i], (1 << count));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -88,10 +88,10 @@ static VOID ixheaacd_nearest_neighbor_2d(WORD32 x[], WORD32 y[], WORD32 count,
|
|||
|
||||
if (e[j] < 0) {
|
||||
y[j] -= 2;
|
||||
rem_temp[j] = ixheaacd_add32_sat(rem_temp[j], (2 << count));
|
||||
rem_temp[j] = ixheaac_add32_sat(rem_temp[j], (2 << count));
|
||||
} else {
|
||||
y[j] = ixheaacd_add32_sat(y[j], 2);
|
||||
rem_temp[j] = ixheaacd_sub32_sat(rem_temp[j], (2 << count));
|
||||
y[j] = ixheaac_add32_sat(y[j], 2);
|
||||
rem_temp[j] = ixheaac_sub32_sat(rem_temp[j], (2 << count));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -112,25 +112,25 @@ VOID ixheaacd_voronoi_search(WORD32 x[], WORD32 y[], WORD32 count, WORD32 *rem1,
|
|||
x1[i] = x[i] - 1;
|
||||
} else {
|
||||
x1[i] = 0;
|
||||
rem2[i] = ixheaacd_sub32_sat(rem2[i], (1 << count));
|
||||
rem2[i] = ixheaac_sub32_sat(rem2[i], (1 << count));
|
||||
}
|
||||
} else {
|
||||
x1[i] = ixheaacd_sub32_sat(x[i], 1);
|
||||
x1[i] = ixheaac_sub32_sat(x[i], 1);
|
||||
}
|
||||
}
|
||||
|
||||
ixheaacd_nearest_neighbor_2d(x1, y1, count, rem2);
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
y1[i] = ixheaacd_add32_sat(y1[i], 1);
|
||||
y1[i] = ixheaac_add32_sat(y1[i], 1);
|
||||
}
|
||||
|
||||
e0 = e1 = 0;
|
||||
for (i = 0; i < 8; i++) {
|
||||
tmp = rem1[i];
|
||||
e0 = ixheaacd_add32_sat(ixheaacd_sat64_32((WORD64)tmp * (WORD64)tmp), e0);
|
||||
e0 = ixheaac_add32_sat(ixheaac_sat64_32((WORD64)tmp * (WORD64)tmp), e0);
|
||||
tmp = rem2[i];
|
||||
e1 = ixheaacd_add32_sat(ixheaacd_sat64_32((WORD64)tmp * (WORD64)tmp), e1);
|
||||
e1 = ixheaac_add32_sat(ixheaac_sat64_32((WORD64)tmp * (WORD64)tmp), e1);
|
||||
}
|
||||
|
||||
if (e0 < e1) {
|
||||
|
|
@ -156,20 +156,20 @@ VOID ixheaacd_voronoi_idx_dec(WORD32 *kv, WORD32 m, WORD32 *y, WORD32 count) {
|
|||
rem1[7] = y[7] & (m - 1);
|
||||
sum = 0;
|
||||
for (i = 6; i >= 1; i--) {
|
||||
tmp = ixheaacd_shl32_sat(kv[i], 1);
|
||||
sum = ixheaacd_add32_sat(sum, tmp);
|
||||
y[i] = ixheaacd_add32_sat(y[i], tmp);
|
||||
tmp = ixheaac_shl32_sat(kv[i], 1);
|
||||
sum = ixheaac_add32_sat(sum, tmp);
|
||||
y[i] = ixheaac_add32_sat(y[i], tmp);
|
||||
z[i] = y[i] >> count;
|
||||
rem1[i] = y[i] & (m - 1);
|
||||
}
|
||||
y[0] = ixheaacd_add32_sat(
|
||||
y[0] = ixheaac_add32_sat(
|
||||
y[0],
|
||||
ixheaacd_add32_sat(ixheaacd_sat64_32((WORD64)4 * (WORD64)kv[0]), sum));
|
||||
z[0] = (ixheaacd_sub32_sat(y[0], 2)) >> count;
|
||||
ixheaac_add32_sat(ixheaac_sat64_32((WORD64)4 * (WORD64)kv[0]), sum));
|
||||
z[0] = (ixheaac_sub32_sat(y[0], 2)) >> count;
|
||||
if (m != 0)
|
||||
rem1[0] = (ixheaacd_sub32_sat(y[0], 2)) % m;
|
||||
rem1[0] = (ixheaac_sub32_sat(y[0], 2)) % m;
|
||||
else
|
||||
rem1[0] = ixheaacd_sub32_sat(y[0], 2);
|
||||
rem1[0] = ixheaac_sub32_sat(y[0], 2);
|
||||
|
||||
memcpy(rem2, rem1, 8 * sizeof(WORD32));
|
||||
|
||||
|
|
@ -178,8 +178,8 @@ VOID ixheaacd_voronoi_idx_dec(WORD32 *kv, WORD32 m, WORD32 *y, WORD32 count) {
|
|||
ptr1 = y;
|
||||
ptr2 = v;
|
||||
for (i = 0; i < 8; i++) {
|
||||
*ptr1 = ixheaacd_sub32_sat(*ptr1,
|
||||
ixheaacd_sat64_32((WORD64)m * (WORD64)*ptr2++));
|
||||
*ptr1 = ixheaac_sub32_sat(*ptr1,
|
||||
ixheaac_sat64_32((WORD64)m * (WORD64)*ptr2++));
|
||||
ptr1++;
|
||||
}
|
||||
}
|
||||
|
|
@ -305,7 +305,7 @@ VOID ixheaacd_rotated_gosset_mtx_dec(WORD32 qn, WORD32 code_book_idx,
|
|||
|
||||
for (i = 0; i < 8; i++) {
|
||||
b[i] =
|
||||
ixheaacd_add32_sat(ixheaacd_sat64_32((WORD64)m * (WORD64)b[i]), c[i]);
|
||||
ixheaac_add32_sat(ixheaac_sat64_32((WORD64)m * (WORD64)b[i]), c[i]);
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_acelp_com.h"
|
||||
#include "ixheaacd_cnst.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -18,19 +18,19 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_basic_funcs.h"
|
||||
|
||||
#define sat16_m(a) ixheaacd_sat16(a)
|
||||
#define sat16_m(a) ixheaac_sat16(a)
|
||||
|
||||
VOID ixheaacd_fix_mant_exp_add(WORD16 op1_mant, WORD16 op1_exp, WORD16 op2_mant,
|
||||
WORD16 op2_exp, WORD16 *ptr_result_mant,
|
||||
|
|
@ -48,7 +48,7 @@ VOID ixheaacd_fix_mant_exp_add(WORD16 op1_mant, WORD16 op1_exp, WORD16 op2_mant,
|
|||
|
||||
new_mant = op1_mant + op2_mant;
|
||||
|
||||
if (ixheaacd_abs32(new_mant) >= 0x8000) {
|
||||
if (ixheaac_abs32(new_mant) >= 0x8000) {
|
||||
new_mant = new_mant >> 1;
|
||||
new_exp++;
|
||||
}
|
||||
|
|
@ -66,14 +66,14 @@ WORD32 ixheaacd_fix_mant_div(WORD16 op1_mant, WORD16 op2_mant,
|
|||
WORD32 index;
|
||||
WORD16 one_by_op2_mant;
|
||||
|
||||
pre_shift_val = ixheaacd_norm32(op2_mant) - 16;
|
||||
pre_shift_val = ixheaac_norm32(op2_mant) - 16;
|
||||
|
||||
index = (op2_mant << pre_shift_val) >> (SHORT_BITS - 3 - 8);
|
||||
|
||||
index &= (1 << (8 + 1)) - 1;
|
||||
|
||||
if (index == 0) {
|
||||
post_shift_val = ixheaacd_norm32(op1_mant) - 16;
|
||||
post_shift_val = ixheaac_norm32(op1_mant) - 16;
|
||||
|
||||
*ptr_result_mant = (op1_mant << post_shift_val);
|
||||
} else {
|
||||
|
|
@ -83,9 +83,9 @@ WORD32 ixheaacd_fix_mant_div(WORD16 op1_mant, WORD16 op2_mant,
|
|||
|
||||
one_by_op2_mant = pstr_common_tables->inv_table[index];
|
||||
|
||||
ratio_m = ixheaacd_mult16x16in32(one_by_op2_mant, op1_mant);
|
||||
ratio_m = ixheaac_mult16x16in32(one_by_op2_mant, op1_mant);
|
||||
|
||||
post_shift_val = ixheaacd_norm32(ratio_m) - 1;
|
||||
post_shift_val = ixheaac_norm32(ratio_m) - 1;
|
||||
|
||||
*ptr_result_mant = (WORD16)((ratio_m << post_shift_val) >> 15);
|
||||
}
|
||||
|
|
@ -101,7 +101,7 @@ VOID ixheaacd_fix_mant_exp_sqrt(WORD16 *ptr_in_out, WORD16 *sqrt_table) {
|
|||
WORD32 result_e;
|
||||
|
||||
if (op_mant > 0) {
|
||||
pre_shift_val = (ixheaacd_norm32((WORD16)op_mant) - 16);
|
||||
pre_shift_val = (ixheaac_norm32((WORD16)op_mant) - 16);
|
||||
op_exp = (op_exp - pre_shift_val);
|
||||
index = (op_mant << pre_shift_val) >> (SHORT_BITS - 3 - 8);
|
||||
index &= (1 << (8 + 1)) - 1;
|
||||
|
|
@ -127,8 +127,8 @@ WORD32 ixheaacd_fix_div_dec(WORD32 op1, WORD32 op2) {
|
|||
WORD32 k;
|
||||
WORD32 sign;
|
||||
|
||||
abs_num = ixheaacd_abs32(op1 >> 1);
|
||||
abs_den = ixheaacd_abs32(op2 >> 1);
|
||||
abs_num = ixheaac_abs32(op1 >> 1);
|
||||
abs_den = ixheaac_abs32(op2 >> 1);
|
||||
sign = op1 ^ op2;
|
||||
|
||||
if (abs_num != 0) {
|
||||
|
|
@ -149,27 +149,27 @@ WORD32 ixheaacd_fix_div_dec(WORD32 op1, WORD32 op2) {
|
|||
#define ONE_IN_Q30 0x40000000
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_one_by_sqrt_calc(WORD32 op) {
|
||||
WORD32 a = ixheaacd_add32_sat(0x900ebee0,
|
||||
ixheaacd_mult32x16in32_shl_sat(op, 0x39d9));
|
||||
WORD32 a = ixheaac_add32_sat(0x900ebee0,
|
||||
ixheaac_mult32x16in32_shl_sat(op, 0x39d9));
|
||||
WORD32 iy =
|
||||
ixheaacd_add32_sat(0x573b645a, ixheaacd_mult32x16h_in32_shl_sat(op, a));
|
||||
ixheaac_add32_sat(0x573b645a, ixheaac_mult32x16h_in32_shl_sat(op, a));
|
||||
|
||||
iy = ixheaacd_shl32_dir_sat_limit(iy, 1);
|
||||
iy = ixheaac_shl32_dir_sat_limit(iy, 1);
|
||||
|
||||
a = ixheaacd_mult32_shl_sat(op, iy);
|
||||
a = ixheaacd_sub32_sat(ONE_IN_Q30, ixheaacd_shl32_dir_sat_limit(
|
||||
ixheaacd_mult32_shl_sat(a, iy), 1));
|
||||
iy = ixheaacd_add32_sat(iy, ixheaacd_mult32_shl_sat(a, iy));
|
||||
a = ixheaac_mult32_shl_sat(op, iy);
|
||||
a = ixheaac_sub32_sat(ONE_IN_Q30, ixheaac_shl32_dir_sat_limit(
|
||||
ixheaac_mult32_shl_sat(a, iy), 1));
|
||||
iy = ixheaac_add32_sat(iy, ixheaac_mult32_shl_sat(a, iy));
|
||||
|
||||
a = ixheaacd_mult32_shl_sat(op, iy);
|
||||
a = ixheaacd_sub32_sat(ONE_IN_Q30, ixheaacd_shl32_dir_sat_limit(
|
||||
ixheaacd_mult32_shl_sat(a, iy), 1));
|
||||
iy = ixheaacd_add32_sat(iy, ixheaacd_mult32_shl_sat(a, iy));
|
||||
a = ixheaac_mult32_shl_sat(op, iy);
|
||||
a = ixheaac_sub32_sat(ONE_IN_Q30, ixheaac_shl32_dir_sat_limit(
|
||||
ixheaac_mult32_shl_sat(a, iy), 1));
|
||||
iy = ixheaac_add32_sat(iy, ixheaac_mult32_shl_sat(a, iy));
|
||||
|
||||
a = ixheaacd_mult32_shl_sat(op, iy);
|
||||
a = ixheaacd_sub32_sat(ONE_IN_Q30, ixheaacd_shl32_dir_sat_limit(
|
||||
ixheaacd_mult32_shl_sat(a, iy), 1));
|
||||
iy = ixheaacd_add32_sat(iy, ixheaacd_mult32_shl_sat(a, iy));
|
||||
a = ixheaac_mult32_shl_sat(op, iy);
|
||||
a = ixheaac_sub32_sat(ONE_IN_Q30, ixheaac_shl32_dir_sat_limit(
|
||||
ixheaac_mult32_shl_sat(a, iy), 1));
|
||||
iy = ixheaac_add32_sat(iy, ixheaac_mult32_shl_sat(a, iy));
|
||||
|
||||
return iy;
|
||||
}
|
||||
|
|
@ -179,11 +179,11 @@ WORD32 ixheaacd_sqrt(WORD32 op) {
|
|||
WORD16 shift;
|
||||
|
||||
if (op != 0) {
|
||||
shift = (WORD16)(ixheaacd_norm32(op) & ~1);
|
||||
op = ixheaacd_shl32_dir_sat_limit(op, shift);
|
||||
shift = ixheaacd_shr32_dir_sat_limit(shift, 1);
|
||||
op = ixheaacd_mult32_shl_sat(ixheaacd_one_by_sqrt_calc(op), op);
|
||||
result = ixheaacd_shr32_dir_sat_limit(op, ixheaacd_sat16(shift - 1));
|
||||
shift = (WORD16)(ixheaac_norm32(op) & ~1);
|
||||
op = ixheaac_shl32_dir_sat_limit(op, shift);
|
||||
shift = ixheaac_shr32_dir_sat_limit(shift, 1);
|
||||
op = ixheaac_mult32_shl_sat(ixheaacd_one_by_sqrt_calc(op), op);
|
||||
result = ixheaac_shr32_dir_sat_limit(op, ixheaac_sat16(shift - 1));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@
|
|||
WORD32 ixheaacd_sqrt(WORD32 op);
|
||||
|
||||
VOID ixheaacd_fix_mant_exp_add(WORD16 a_m, WORD16 a_e, WORD16 b_m, WORD16 b_e,
|
||||
WORD16 *ptr_sum_mant, WORD16 *ptr_sum_exp);
|
||||
WORD16 *ptr_sum_mant, WORD16 *ptr_sum_exp);
|
||||
|
||||
WORD32 ixheaacd_fix_mant_div(WORD16 a_m, WORD16 b_m, WORD16 *ptr_result,
|
||||
ixheaacd_misc_tables *pstr_common_tables);
|
||||
ixheaacd_misc_tables *pstr_common_tables);
|
||||
|
||||
VOID ixheaacd_fix_mant_exp_sqrt(WORD16 *mant, WORD16 *sqrt_table);
|
||||
|
||||
|
|
@ -38,9 +38,6 @@ WORD32 ixheaacd_fix_div_dec(WORD32 divident, WORD32 divisor);
|
|||
|
||||
WORD32 ixheaacd_fix_div_armv7(WORD32 divident, WORD32 divisor);
|
||||
|
||||
VOID ixheaacd_mantisa_mod(WORD32 b_m, WORD32 b_e, WORD32 *ptr_sum_mant,
|
||||
WORD32 *ptr_sum_exp);
|
||||
|
||||
extern VOID ixheaacd_scale_short_vec_left(WORD16 *word16_arr, WORD32 n,
|
||||
WORD16 shift);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include <string.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaac_constants.h"
|
||||
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaacd_windows.h"
|
||||
|
||||
static PLATFORM_INLINE WORD32 ixheaacd_mult32_sh1(WORD32 a, WORD32 b) {
|
||||
|
|
@ -58,15 +58,15 @@ VOID ixheaacd_combine_fac(WORD32 *src1, WORD32 *src2, WORD32 *dest, WORD32 len,
|
|||
WORD32 i;
|
||||
if (fac_q > output_q) {
|
||||
for (i = 0; i < len; i++) {
|
||||
*dest = ixheaacd_add32_sat(*src1, ((*src2) >> (fac_q - output_q)));
|
||||
*dest = ixheaac_add32_sat(*src1, ((*src2) >> (fac_q - output_q)));
|
||||
dest++;
|
||||
src1++;
|
||||
src2++;
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < len; i++) {
|
||||
*dest = ixheaacd_add32_sat(
|
||||
*src1, ixheaacd_shl32_sat((*src2), (output_q - fac_q)));
|
||||
*dest = ixheaac_add32_sat(
|
||||
*src1, ixheaac_shl32_sat((*src2), (output_q - fac_q)));
|
||||
dest++;
|
||||
src1++;
|
||||
src2++;
|
||||
|
|
@ -83,11 +83,11 @@ WORD8 ixheaacd_windowing_long1(WORD32 *src1, WORD32 *src2,
|
|||
|
||||
if (shift1 > shift2) {
|
||||
for (i = 0; i < vlen / 2; i++) {
|
||||
*dest = ixheaacd_add32_sat(
|
||||
*dest = ixheaac_add32_sat(
|
||||
((ixheaacd_mult32_sh1(*src1, *win_fwd)) >> (shift1 - shift2)),
|
||||
ixheaacd_mult32_sh1(*src2, *win_rev));
|
||||
*(dest + (vlen - (2 * i)) - 1) = ixheaacd_add32_sat(
|
||||
((ixheaacd_mult32_sh1(ixheaacd_negate32_sat(*src1), *win_rev)) >>
|
||||
*(dest + (vlen - (2 * i)) - 1) = ixheaac_add32_sat(
|
||||
((ixheaacd_mult32_sh1(ixheaac_negate32_sat(*src1), *win_rev)) >>
|
||||
(shift1 - shift2)),
|
||||
ixheaacd_mult32_sh1(*rsrc2, *win_fwd));
|
||||
|
||||
|
|
@ -101,12 +101,12 @@ WORD8 ixheaacd_windowing_long1(WORD32 *src1, WORD32 *src2,
|
|||
return (shift2);
|
||||
} else {
|
||||
for (i = 0; i < vlen / 2; i++) {
|
||||
*dest = ixheaacd_add32_sat(
|
||||
*dest = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(*src1, *win_fwd),
|
||||
((ixheaacd_mult32_sh1(*src2, *win_rev)) >> (shift2 - shift1)));
|
||||
|
||||
*(dest + (vlen - (2 * i)) - 1) = ixheaacd_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaacd_negate32_sat(*src1), *win_rev),
|
||||
*(dest + (vlen - (2 * i)) - 1) = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaac_negate32_sat(*src1), *win_rev),
|
||||
((ixheaacd_mult32_sh1(*rsrc2, *win_fwd)) >> (shift2 - shift1)));
|
||||
src1++;
|
||||
src2++;
|
||||
|
|
@ -140,9 +140,9 @@ WORD8 ixheaacd_windowing_long2(WORD32 *src1, const WORD32 *win_fwd,
|
|||
for (i = ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
|
||||
i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
|
||||
i++) {
|
||||
dest[i] = ixheaacd_add32_sat(
|
||||
dest[i] = ixheaac_add32_sat(
|
||||
(ixheaacd_mult32_sh1(
|
||||
ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaacd_drc_offset->n_flat_ls +
|
||||
ixheaacd_drc_offset->lfac - i - 1]),
|
||||
*win_fwd) >>
|
||||
|
|
@ -155,8 +155,8 @@ WORD8 ixheaacd_windowing_long2(WORD32 *src1, const WORD32 *win_fwd,
|
|||
for (;
|
||||
i < ixheaacd_drc_offset->n_flat_ls + (ixheaacd_drc_offset->lfac * 3);
|
||||
i++) {
|
||||
dest[i] = ixheaacd_add32_sat(
|
||||
(ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
dest[i] = ixheaac_add32_sat(
|
||||
(ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaacd_drc_offset->n_flat_ls +
|
||||
ixheaacd_drc_offset->lfac - i - 1]) >>
|
||||
(shiftp - fac_q)),
|
||||
|
|
@ -166,7 +166,7 @@ WORD8 ixheaacd_windowing_long2(WORD32 *src1, const WORD32 *win_fwd,
|
|||
|
||||
for (; i < ixheaacd_drc_offset->n_long; i++) {
|
||||
dest[i] =
|
||||
ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaacd_drc_offset->n_flat_ls +
|
||||
ixheaacd_drc_offset->lfac - i - 1]) >>
|
||||
(shiftp - fac_q);
|
||||
|
|
@ -179,9 +179,9 @@ WORD8 ixheaacd_windowing_long2(WORD32 *src1, const WORD32 *win_fwd,
|
|||
for (i = ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
|
||||
i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
|
||||
i++) {
|
||||
dest[i] = ixheaacd_add32_sat(
|
||||
dest[i] = ixheaac_add32_sat(
|
||||
(ixheaacd_mult32_sh1(
|
||||
ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaacd_drc_offset->n_flat_ls +
|
||||
ixheaacd_drc_offset->lfac - i - 1]),
|
||||
*win_fwd) >>
|
||||
|
|
@ -194,8 +194,8 @@ WORD8 ixheaacd_windowing_long2(WORD32 *src1, const WORD32 *win_fwd,
|
|||
for (;
|
||||
i < ixheaacd_drc_offset->n_flat_ls + (ixheaacd_drc_offset->lfac * 3);
|
||||
i++) {
|
||||
dest[i] = ixheaacd_add32_sat(
|
||||
(ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
dest[i] = ixheaac_add32_sat(
|
||||
(ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaacd_drc_offset->n_flat_ls +
|
||||
ixheaacd_drc_offset->lfac - i - 1]) >>
|
||||
(shiftp - shift_olap)),
|
||||
|
|
@ -205,7 +205,7 @@ WORD8 ixheaacd_windowing_long2(WORD32 *src1, const WORD32 *win_fwd,
|
|||
|
||||
for (; i < ixheaacd_drc_offset->n_long; i++) {
|
||||
dest[i] =
|
||||
ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaacd_drc_offset->n_flat_ls +
|
||||
ixheaacd_drc_offset->lfac - i - 1]) >>
|
||||
(shiftp - shift_olap);
|
||||
|
|
@ -223,9 +223,9 @@ WORD8 ixheaacd_windowing_long2(WORD32 *src1, const WORD32 *win_fwd,
|
|||
for (i = ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
|
||||
i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
|
||||
i++) {
|
||||
dest[i] = ixheaacd_add32_sat(
|
||||
dest[i] = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(
|
||||
ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaacd_drc_offset->n_flat_ls +
|
||||
ixheaacd_drc_offset->lfac - i - 1]),
|
||||
*win_fwd),
|
||||
|
|
@ -237,8 +237,8 @@ WORD8 ixheaacd_windowing_long2(WORD32 *src1, const WORD32 *win_fwd,
|
|||
for (;
|
||||
i < ixheaacd_drc_offset->n_flat_ls + (ixheaacd_drc_offset->lfac * 3);
|
||||
i++) {
|
||||
dest[i] = ixheaacd_add32_sat(
|
||||
ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
dest[i] = ixheaac_add32_sat(
|
||||
ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaacd_drc_offset->n_flat_ls +
|
||||
ixheaacd_drc_offset->lfac - i - 1]),
|
||||
(*fac_data_out) >> (fac_q - shiftp));
|
||||
|
|
@ -247,7 +247,7 @@ WORD8 ixheaacd_windowing_long2(WORD32 *src1, const WORD32 *win_fwd,
|
|||
|
||||
for (; i < ixheaacd_drc_offset->n_long; i++) {
|
||||
dest[i] =
|
||||
ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaacd_drc_offset->n_flat_ls +
|
||||
ixheaacd_drc_offset->lfac - i - 1]);
|
||||
}
|
||||
|
|
@ -259,9 +259,9 @@ WORD8 ixheaacd_windowing_long2(WORD32 *src1, const WORD32 *win_fwd,
|
|||
for (i = ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->lfac;
|
||||
i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
|
||||
i++) {
|
||||
dest[i] = ixheaacd_add32_sat(
|
||||
dest[i] = ixheaac_add32_sat(
|
||||
(ixheaacd_mult32_sh1(
|
||||
ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaacd_drc_offset->n_flat_ls +
|
||||
ixheaacd_drc_offset->lfac - i - 1]),
|
||||
*win_fwd) >>
|
||||
|
|
@ -274,8 +274,8 @@ WORD8 ixheaacd_windowing_long2(WORD32 *src1, const WORD32 *win_fwd,
|
|||
for (;
|
||||
i < ixheaacd_drc_offset->n_flat_ls + (ixheaacd_drc_offset->lfac * 3);
|
||||
i++) {
|
||||
dest[i] = ixheaacd_add32_sat(
|
||||
(ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
dest[i] = ixheaac_add32_sat(
|
||||
(ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaacd_drc_offset->n_flat_ls +
|
||||
ixheaacd_drc_offset->lfac - i - 1]) >>
|
||||
(shiftp - shift_olap)),
|
||||
|
|
@ -285,7 +285,7 @@ WORD8 ixheaacd_windowing_long2(WORD32 *src1, const WORD32 *win_fwd,
|
|||
|
||||
for (; i < ixheaacd_drc_offset->n_long; i++) {
|
||||
dest[i] =
|
||||
ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long / 2 +
|
||||
ixheaacd_drc_offset->n_flat_ls +
|
||||
ixheaacd_drc_offset->lfac - i - 1]) >>
|
||||
(shiftp - shift_olap);
|
||||
|
|
@ -308,7 +308,7 @@ WORD8 ixheaacd_windowing_long3(WORD32 *src1, const WORD32 *win_fwd,
|
|||
|
||||
for (i = ixheaacd_drc_offset->n_flat_ls;
|
||||
i < ixheaacd_drc_offset->n_long / 2; i++) {
|
||||
dest[i] = ixheaacd_add32_sat(
|
||||
dest[i] = ixheaac_add32_sat(
|
||||
(ixheaacd_mult32_sh1(src1[i], *win_fwd) >> (shiftp - shift_olap)),
|
||||
ixheaacd_mult32_sh1(over_lap[i], *win_rev));
|
||||
win_fwd++;
|
||||
|
|
@ -318,9 +318,9 @@ WORD8 ixheaacd_windowing_long3(WORD32 *src1, const WORD32 *win_fwd,
|
|||
for (i = ixheaacd_drc_offset->n_long / 2;
|
||||
i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
|
||||
i++) {
|
||||
dest[i] = ixheaacd_add32_sat(
|
||||
dest[i] = ixheaac_add32_sat(
|
||||
(ixheaacd_mult32_sh1(
|
||||
ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]),
|
||||
ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]),
|
||||
*win_fwd) >>
|
||||
(shiftp - shift_olap)),
|
||||
ixheaacd_mult32_sh1(over_lap[i], *win_rev));
|
||||
|
|
@ -330,7 +330,7 @@ WORD8 ixheaacd_windowing_long3(WORD32 *src1, const WORD32 *win_fwd,
|
|||
|
||||
for (; i < ixheaacd_drc_offset->n_long; i++) {
|
||||
dest[i] =
|
||||
ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]) >>
|
||||
ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]) >>
|
||||
(shiftp - shift_olap);
|
||||
}
|
||||
|
||||
|
|
@ -342,7 +342,7 @@ WORD8 ixheaacd_windowing_long3(WORD32 *src1, const WORD32 *win_fwd,
|
|||
|
||||
for (i = ixheaacd_drc_offset->n_flat_ls;
|
||||
i < ixheaacd_drc_offset->n_long / 2; i++) {
|
||||
dest[i] = ixheaacd_add32_sat(
|
||||
dest[i] = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(src1[i], *win_fwd),
|
||||
ixheaacd_mult32_sh1(over_lap[i], *win_rev) >> (shift_olap - shiftp));
|
||||
win_fwd++;
|
||||
|
|
@ -352,9 +352,9 @@ WORD8 ixheaacd_windowing_long3(WORD32 *src1, const WORD32 *win_fwd,
|
|||
for (i = ixheaacd_drc_offset->n_long / 2;
|
||||
i < ixheaacd_drc_offset->n_flat_ls + ixheaacd_drc_offset->n_trans_ls;
|
||||
i++) {
|
||||
dest[i] = ixheaacd_add32_sat(
|
||||
dest[i] = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(
|
||||
ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]),
|
||||
ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]),
|
||||
*win_fwd),
|
||||
ixheaacd_mult32_sh1(over_lap[i], *win_rev) >> (shift_olap - shiftp));
|
||||
win_fwd++;
|
||||
|
|
@ -363,7 +363,7 @@ WORD8 ixheaacd_windowing_long3(WORD32 *src1, const WORD32 *win_fwd,
|
|||
|
||||
for (; i < ixheaacd_drc_offset->n_long; i++) {
|
||||
dest[i] =
|
||||
ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]);
|
||||
ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_long - i - 1]);
|
||||
}
|
||||
|
||||
return (shiftp);
|
||||
|
|
@ -384,7 +384,7 @@ VOID ixheaacd_windowing_short1(WORD32 *src1, WORD32 *src2, WORD32 *fp,
|
|||
for (i = ixheaacd_drc_offset->lfac; i < ixheaacd_drc_offset->n_short;
|
||||
i++) {
|
||||
dest[i] = ixheaacd_mult32_sh1(
|
||||
ixheaacd_negate32_sat(src1[ixheaacd_drc_offset->n_short - i - 1]),
|
||||
ixheaac_negate32_sat(src1[ixheaacd_drc_offset->n_short - i - 1]),
|
||||
src2[i]);
|
||||
}
|
||||
|
||||
|
|
@ -407,7 +407,7 @@ VOID ixheaacd_windowing_short1(WORD32 *src1, WORD32 *src2, WORD32 *fp,
|
|||
for (i = ixheaacd_drc_offset->lfac; i < ixheaacd_drc_offset->n_short;
|
||||
i++) {
|
||||
dest[i] =
|
||||
ixheaacd_mult32_sh1(ixheaacd_negate32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaac_negate32_sat(
|
||||
src1[ixheaacd_drc_offset->n_short - i - 1]),
|
||||
src2[i]) >>
|
||||
(shiftp - shift_olap);
|
||||
|
|
@ -436,12 +436,12 @@ VOID ixheaacd_windowing_short2(WORD32 *src1, WORD32 *win_fwd, WORD32 *fp,
|
|||
|
||||
if (shift_olap > shiftp) {
|
||||
for (i = 0; i < ixheaacd_drc_offset->n_short / 2; i++) {
|
||||
fp[i] = ixheaacd_add32_sat(
|
||||
fp[i] = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(src1[i], *win_fwd),
|
||||
(ixheaacd_mult32_sh1(fp[i], *win_rev) >> (shift_olap - shiftp)));
|
||||
|
||||
fp[ixheaacd_drc_offset->n_short - i - 1] = ixheaacd_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaacd_negate32_sat(src1[i]), *win_rev),
|
||||
fp[ixheaacd_drc_offset->n_short - i - 1] = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[i]), *win_rev),
|
||||
(ixheaacd_mult32_sh1(fp[ixheaacd_drc_offset->n_short - i - 1],
|
||||
*win_fwd) >>
|
||||
(shift_olap - shiftp)));
|
||||
|
|
@ -456,12 +456,12 @@ VOID ixheaacd_windowing_short2(WORD32 *src1, WORD32 *win_fwd, WORD32 *fp,
|
|||
}
|
||||
} else {
|
||||
for (i = 0; i < ixheaacd_drc_offset->n_short / 2; i++) {
|
||||
fp[i] = ixheaacd_add32_sat(
|
||||
fp[i] = ixheaac_add32_sat(
|
||||
(ixheaacd_mult32_sh1(src1[i], *win_fwd) >> (shiftp - shift_olap)),
|
||||
ixheaacd_mult32_sh1(fp[i], *win_rev));
|
||||
|
||||
fp[ixheaacd_drc_offset->n_short - i - 1] = ixheaacd_add32_sat(
|
||||
(ixheaacd_mult32_sh1(ixheaacd_negate32_sat(src1[i]), *win_rev) >>
|
||||
fp[ixheaacd_drc_offset->n_short - i - 1] = ixheaac_add32_sat(
|
||||
(ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[i]), *win_rev) >>
|
||||
(shiftp - shift_olap)),
|
||||
ixheaacd_mult32_sh1(fp[ixheaacd_drc_offset->n_short - i - 1],
|
||||
*win_fwd));
|
||||
|
|
@ -485,13 +485,13 @@ WORD8 ixheaacd_windowing_short3(WORD32 *src1, WORD32 *win_rev, WORD32 *fp,
|
|||
const WORD32 *win_fwd = win_rev - n_short + 1;
|
||||
if (shift_olap > shiftp) {
|
||||
for (i = 0; i < n_short / 2; i++) {
|
||||
fp[i] = ixheaacd_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaacd_negate32_sat(src1[n_short / 2 - i - 1]),
|
||||
fp[i] = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 - i - 1]),
|
||||
*win_rev),
|
||||
(fp[i] >> (shift_olap - shiftp)));
|
||||
|
||||
fp[n_short - i - 1] = ixheaacd_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaacd_negate32_sat(src1[n_short / 2 - i - 1]),
|
||||
fp[n_short - i - 1] = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 - i - 1]),
|
||||
*win_fwd),
|
||||
(fp[n_short - i - 1] >> (shift_olap - shiftp)));
|
||||
win_rev--;
|
||||
|
|
@ -500,14 +500,14 @@ WORD8 ixheaacd_windowing_short3(WORD32 *src1, WORD32 *win_rev, WORD32 *fp,
|
|||
return (shiftp);
|
||||
} else {
|
||||
for (i = 0; i < n_short / 2; i++) {
|
||||
fp[i] = ixheaacd_add32_sat(
|
||||
(ixheaacd_mult32_sh1(ixheaacd_negate32_sat(src1[n_short / 2 - i - 1]),
|
||||
fp[i] = ixheaac_add32_sat(
|
||||
(ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 - i - 1]),
|
||||
*win_rev) >>
|
||||
(shiftp - shift_olap)),
|
||||
fp[i]);
|
||||
|
||||
fp[n_short - i - 1] = ixheaacd_add32_sat(
|
||||
(ixheaacd_mult32_sh1(ixheaacd_negate32_sat(src1[n_short / 2 - i - 1]),
|
||||
fp[n_short - i - 1] = ixheaac_add32_sat(
|
||||
(ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 - i - 1]),
|
||||
*win_fwd) >>
|
||||
(shiftp - shift_olap)),
|
||||
fp[n_short - i - 1]);
|
||||
|
|
@ -528,13 +528,13 @@ WORD8 ixheaacd_windowing_short4(WORD32 *src1, WORD32 *win_fwd, WORD32 *fp,
|
|||
const WORD32 *win_rev1 = win_fwd1 - n_short + 1;
|
||||
if (shift_olap > output_q) {
|
||||
for (i = 0; i < n_short / 2; i++) {
|
||||
fp[i] = ixheaacd_add32_sat(
|
||||
fp[i] = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(src1[n_short / 2 + i], *win_fwd) >>
|
||||
(shiftp - output_q),
|
||||
fp[i]);
|
||||
|
||||
fp[n_short - i - 1] = ixheaacd_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaacd_negate32_sat(src1[n_short / 2 + i]),
|
||||
fp[n_short - i - 1] = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 + i]),
|
||||
*win_rev) >>
|
||||
(shiftp - output_q),
|
||||
fp[n_short - i - 1]);
|
||||
|
|
@ -544,14 +544,14 @@ WORD8 ixheaacd_windowing_short4(WORD32 *src1, WORD32 *win_fwd, WORD32 *fp,
|
|||
}
|
||||
if (flag == 1) {
|
||||
for (; i < n_short; i++) {
|
||||
fp[i + n_short / 2] = ixheaacd_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaacd_negate32_sat(src1[n_short - i - 1]),
|
||||
fp[i + n_short / 2] = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short - i - 1]),
|
||||
*win_fwd1) >>
|
||||
(shiftp - output_q),
|
||||
(fp[i + n_short / 2] >> (shift_olap - output_q)));
|
||||
|
||||
fp[3 * n_short - n_short / 2 - i - 1] = ixheaacd_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaacd_negate32_sat(src1[n_short - i - 1]),
|
||||
fp[3 * n_short - n_short / 2 - i - 1] = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short - i - 1]),
|
||||
*win_rev1) >>
|
||||
(shiftp - output_q),
|
||||
(fp[3 * n_short - n_short / 2 - i - 1] >> (shift_olap - output_q)));
|
||||
|
|
@ -561,24 +561,24 @@ WORD8 ixheaacd_windowing_short4(WORD32 *src1, WORD32 *win_fwd, WORD32 *fp,
|
|||
}
|
||||
} else {
|
||||
for (; i < n_short; i++) {
|
||||
fp[i + n_short / 2] = ixheaacd_add32_sat(
|
||||
ixheaacd_negate32_sat(src1[n_short - i - 1]) >> (shiftp - output_q),
|
||||
fp[i + n_short / 2] = ixheaac_add32_sat(
|
||||
ixheaac_negate32_sat(src1[n_short - i - 1]) >> (shiftp - output_q),
|
||||
fp[i + n_short / 2] >> (shift_olap - output_q));
|
||||
fp[3 * n_short - n_short / 2 - i - 1] = ixheaacd_add32_sat(
|
||||
ixheaacd_negate32_sat(src1[n_short - i - 1]) >> (shiftp - output_q),
|
||||
fp[3 * n_short - n_short / 2 - i - 1] = ixheaac_add32_sat(
|
||||
ixheaac_negate32_sat(src1[n_short - i - 1]) >> (shiftp - output_q),
|
||||
fp[3 * n_short - n_short / 2 - i - 1] >> (shift_olap - output_q));
|
||||
}
|
||||
}
|
||||
return (output_q);
|
||||
} else {
|
||||
for (i = 0; i < n_short / 2; i++) {
|
||||
fp[i] = ixheaacd_add32_sat(
|
||||
fp[i] = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(src1[n_short / 2 + i], *win_fwd) >>
|
||||
(shiftp - shift_olap),
|
||||
fp[i] >> (output_q - shift_olap));
|
||||
|
||||
fp[n_short - i - 1] = ixheaacd_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaacd_negate32_sat(src1[n_short / 2 + i]),
|
||||
fp[n_short - i - 1] = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short / 2 + i]),
|
||||
*win_rev) >>
|
||||
(shiftp - shift_olap),
|
||||
fp[n_short - i - 1]);
|
||||
|
|
@ -588,14 +588,14 @@ WORD8 ixheaacd_windowing_short4(WORD32 *src1, WORD32 *win_fwd, WORD32 *fp,
|
|||
}
|
||||
if (flag == 1) {
|
||||
for (; i < n_short; i++) {
|
||||
fp[i + n_short / 2] = ixheaacd_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaacd_negate32_sat(src1[n_short - i - 1]),
|
||||
fp[i + n_short / 2] = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short - i - 1]),
|
||||
*win_fwd1) >>
|
||||
(shiftp - shift_olap),
|
||||
fp[i + n_short / 2]);
|
||||
|
||||
fp[3 * n_short - n_short / 2 - i - 1] = ixheaacd_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaacd_negate32_sat(src1[n_short - i - 1]),
|
||||
fp[3 * n_short - n_short / 2 - i - 1] = ixheaac_add32_sat(
|
||||
ixheaacd_mult32_sh1(ixheaac_negate32_sat(src1[n_short - i - 1]),
|
||||
*win_rev1) >>
|
||||
(shiftp - shift_olap),
|
||||
fp[3 * n_short - n_short / 2 - i - 1]);
|
||||
|
|
@ -606,11 +606,11 @@ WORD8 ixheaacd_windowing_short4(WORD32 *src1, WORD32 *win_fwd, WORD32 *fp,
|
|||
} else {
|
||||
for (; i < n_short; i++) {
|
||||
fp[i + n_short / 2] =
|
||||
ixheaacd_add32_sat(ixheaacd_negate32_sat(src1[n_short - i - 1]) >>
|
||||
ixheaac_add32_sat(ixheaac_negate32_sat(src1[n_short - i - 1]) >>
|
||||
(shiftp - shift_olap),
|
||||
fp[i + n_short / 2]);
|
||||
fp[3 * n_short - n_short / 2 - i - 1] =
|
||||
ixheaacd_add32_sat(ixheaacd_negate32_sat(src1[n_short - i - 1]) >>
|
||||
ixheaac_add32_sat(ixheaac_negate32_sat(src1[n_short - i - 1]) >>
|
||||
(shiftp - shift_olap),
|
||||
fp[3 * n_short - n_short / 2 - i - 1]);
|
||||
}
|
||||
|
|
@ -630,7 +630,7 @@ VOID ixheaacd_scale_down(WORD32 *dest, WORD32 *src, WORD32 len, WORD8 shift1,
|
|||
}
|
||||
} else {
|
||||
for (i = 0; i < len; i++) {
|
||||
*dest = ixheaacd_shl32_sat((*src), (shift2 - shift1));
|
||||
*dest = ixheaac_shl32_sat((*src), (shift2 - shift1));
|
||||
src++;
|
||||
dest++;
|
||||
}
|
||||
|
|
@ -642,13 +642,13 @@ VOID ixheaacd_scale_down_adj(WORD32 *dest, WORD32 *src, WORD32 len,
|
|||
WORD32 i;
|
||||
if (shift1 > shift2) {
|
||||
for (i = 0; i < len; i++) {
|
||||
*dest = ixheaacd_add32_sat((*src >> (shift1 - shift2)), ADJ_SCALE);
|
||||
*dest = ixheaac_add32_sat((*src >> (shift1 - shift2)), ADJ_SCALE);
|
||||
src++;
|
||||
dest++;
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < len; i++) {
|
||||
*dest = ixheaacd_add32_sat(ixheaacd_shl32_sat((*src), (shift2 - shift1)),
|
||||
*dest = ixheaac_add32_sat(ixheaac_shl32_sat((*src), (shift2 - shift1)),
|
||||
ADJ_SCALE);
|
||||
src++;
|
||||
dest++;
|
||||
|
|
|
|||
|
|
@ -1,425 +0,0 @@
|
|||
/******************************************************************************
|
||||
* *
|
||||
* Copyright (C) 2018 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#ifndef IXHEAACD_BASIC_OPS_ARR_H
|
||||
#define IXHEAACD_BASIC_OPS_ARR_H
|
||||
|
||||
static PLATFORM_INLINE WORD16 norm32_arr(WORD32 *word32_arr, WORD32 n) {
|
||||
WORD32 i;
|
||||
WORD32 max_bits = 0;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
max_bits = max_bits | ixheaacd_abs32_sat(word32_arr[i]);
|
||||
}
|
||||
|
||||
return (ixheaacd_norm32(max_bits));
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 norm16_arr(WORD16 *word16_arr, WORD32 n) {
|
||||
WORD32 i;
|
||||
WORD16 max_bits = 0;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
max_bits = max_bits | ixheaacd_abs16_sat(word16_arr[i]);
|
||||
}
|
||||
|
||||
return (ixheaacd_norm16(max_bits));
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID shl32_arr(WORD32 *word32_arr, WORD16 shift,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word32_arr[i] = ixheaacd_shl32(word32_arr[i], shift);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID ixheaacd_shr32_arr(WORD32 *word32_arr, WORD16 shift,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
*word32_arr = ixheaacd_shr32(*word32_arr, shift);
|
||||
word32_arr++;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID shl32_arr_dir(WORD32 *word32_arr, WORD16 shift,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word32_arr[i] = ixheaacd_shl32_dir(word32_arr[i], shift);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID shr32_arr_dir(WORD32 *word32_arr, WORD16 shift,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word32_arr[i] = ixheaacd_shr32_dir(word32_arr[i], shift);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID shl32_arr_dir_sat(WORD32 *word32_arr, WORD16 shift,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word32_arr[i] = ixheaacd_shl32_dir_sat(word32_arr[i], shift);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID shr32_arr_dir_sat(WORD32 *word32_arr, WORD16 shift,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word32_arr[i] = ixheaacd_shr32_dir_sat(word32_arr[i], shift);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID ixheaacd_shl32_arr_sat(WORD32 *word32_arr,
|
||||
WORD16 shift, WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
*word32_arr = ixheaacd_shl32_sat(*word32_arr, shift);
|
||||
word32_arr++;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID shl16_arr(WORD16 *word16_arr, WORD16 shift,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word16_arr[i] = ixheaacd_shl16(word16_arr[i], shift);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID ixheaacd_shr16_arr(WORD16 *word16_arr, WORD16 shift,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
*word16_arr = ixheaacd_shr16(*word16_arr, shift);
|
||||
word16_arr++;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID shl16_arr_dir(WORD16 *word16_arr, WORD16 shift,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word16_arr[i] = ixheaacd_shl16_dir(word16_arr[i], shift);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID shr16_arr_dir(WORD16 *word16_arr, WORD16 shift,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word16_arr[i] = ixheaacd_shr16_dir(word16_arr[i], shift);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID shl16_arr_dir_sat(WORD16 *word16_arr, WORD16 shift,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word16_arr[i] = ixheaacd_shl16_dir_sat(word16_arr[i], shift);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID shr16_arr_dir_sat(WORD16 *word16_arr, WORD16 shift,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word16_arr[i] = ixheaacd_shr16_dir_sat(word16_arr[i], shift);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID shl16_arr_sat(WORD16 *word16_arr, WORD16 shift,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word16_arr[i] = ixheaacd_shl16_sat(word16_arr[i], shift);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID shl3216_arr(WORD32 *word32_arr, WORD16 *word16_arr,
|
||||
WORD16 shift, WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word16_arr[i] = (WORD16)ixheaacd_shl32_dir(word32_arr[i], shift);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 max32_arr(WORD32 *word32_arr, WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
WORD32 max_value;
|
||||
|
||||
max_value = word32_arr[0];
|
||||
|
||||
for (i = 1; i < n; i++) {
|
||||
max_value = ixheaacd_max32(max_value, word32_arr[i]);
|
||||
}
|
||||
|
||||
return max_value;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD32 min32_arr(WORD32 *word32_arr, WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
WORD32 min_value;
|
||||
|
||||
min_value = word32_arr[0];
|
||||
|
||||
for (i = 1; i < n; i++) {
|
||||
min_value = ixheaacd_min32(min_value, word32_arr[i]);
|
||||
}
|
||||
|
||||
return min_value;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 max16_arr(WORD16 *word16_arr, WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
WORD16 max_value;
|
||||
|
||||
max_value = word16_arr[0];
|
||||
|
||||
for (i = 1; i < n; i++) {
|
||||
max_value = ixheaacd_max16(max_value, word16_arr[i]);
|
||||
}
|
||||
|
||||
return max_value;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE WORD16 min16_arr(WORD16 *word16_arr, WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
WORD16 min_value;
|
||||
|
||||
min_value = word16_arr[0];
|
||||
|
||||
for (i = 1; i < n; i++) {
|
||||
min_value = ixheaacd_min16(min_value, word16_arr[i]);
|
||||
}
|
||||
|
||||
return min_value;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID copy8(WORD8 *src, WORD8 *dst, WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
dst[i] = src[i];
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID copy16(WORD16 *src, WORD16 *dst, WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
dst[i] = src[i];
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID copy32(WORD32 *src, WORD32 *dst, WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
dst[i] = src[i];
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID delay8(WORD8 *word8_arr, WORD32 delay, WORD32 n) {
|
||||
WORD32 source_index;
|
||||
WORD32 destination_index;
|
||||
|
||||
source_index = (n - 1) - delay;
|
||||
destination_index = n - 1;
|
||||
|
||||
for (; source_index >= 0; source_index--, destination_index--) {
|
||||
word8_arr[destination_index] = word8_arr[source_index];
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID delay16(WORD16 *word16_arr, WORD32 delay,
|
||||
WORD32 n) {
|
||||
WORD32 source_index;
|
||||
WORD32 destination_index;
|
||||
|
||||
source_index = (n - 1) - delay;
|
||||
destination_index = n - 1;
|
||||
|
||||
for (; source_index >= 0; source_index--, destination_index--) {
|
||||
word16_arr[destination_index] = word16_arr[source_index];
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID delay32(WORD32 *word32_arr, WORD32 delay,
|
||||
WORD32 n) {
|
||||
WORD32 source_index;
|
||||
WORD32 destination_index;
|
||||
|
||||
source_index = (n - 1) - delay;
|
||||
destination_index = n - 1;
|
||||
|
||||
for (; source_index >= 0; source_index--, destination_index--) {
|
||||
word32_arr[destination_index] = word32_arr[source_index];
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID copy_reverse16(WORD16 *src, WORD16 *dst, WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
*dst++ = *src--;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID copy_reverse32(WORD32 *src, WORD32 *dst, WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
*dst++ = *src--;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID set_val8(WORD8 *word8_arr, WORD8 set_val,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word8_arr[i] = set_val;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID set_val16(WORD16 *word16_arr, WORD16 set_val,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word16_arr[i] = set_val;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID set_val32(WORD32 *word32_arr, WORD32 set_val,
|
||||
WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word32_arr[i] = set_val;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID set_zero8(WORD8 *word8_arr, WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word8_arr[i] = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID set_zero16(WORD16 *word16_arr, WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word16_arr[i] = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static PLATFORM_INLINE VOID set_zero32(WORD32 *word32_arr, WORD32 n) {
|
||||
WORD32 i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
word32_arr[i] = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -21,14 +21,14 @@
|
|||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -19,13 +19,13 @@
|
|||
*/
|
||||
#include <stdlib.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_basic_funcs.h"
|
||||
#include "ixheaacd_defines.h"
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
#include "ixheaacd_block.h"
|
||||
#include "ixheaacd_channel.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
|
||||
#include "ixheaacd_tns.h"
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
|
|
@ -63,9 +63,9 @@ static PLATFORM_INLINE WORD32 ixheaacd_mac32x16in32_sat(WORD32 a, WORD32 b,
|
|||
WORD16 c) {
|
||||
WORD32 acc;
|
||||
|
||||
acc = ixheaacd_mult32x16in32_sat(b, c);
|
||||
acc = ixheaac_mult32x16in32_sat(b, c);
|
||||
|
||||
acc = ixheaacd_add32_sat(a, acc);
|
||||
acc = ixheaac_add32_sat(a, acc);
|
||||
|
||||
return acc;
|
||||
}
|
||||
|
|
@ -193,16 +193,16 @@ static PLATFORM_INLINE WORD ixheaacd_huffman_dec_word1(
|
|||
|
||||
if (sp1 == 16) {
|
||||
i = 4;
|
||||
value = ixheaacd_extu(read_word, bit_pos, 23);
|
||||
value = ixheaac_extu(read_word, bit_pos, 23);
|
||||
value = value | 0xfffffe00;
|
||||
norm_val = ixheaacd_norm32(value);
|
||||
norm_val = ixheaac_norm32(value);
|
||||
|
||||
i += (norm_val - 22);
|
||||
bit_pos += (norm_val - 21);
|
||||
ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
|
||||
it_bit_buff->ptr_bit_buf_end);
|
||||
|
||||
off = ixheaacd_extu(read_word, bit_pos, 32 - i);
|
||||
off = ixheaac_extu(read_word, bit_pos, 32 - i);
|
||||
|
||||
bit_pos += i;
|
||||
|
||||
|
|
@ -238,9 +238,9 @@ static PLATFORM_INLINE WORD ixheaacd_huffman_dec_word1(
|
|||
|
||||
if (sp2 == 16) {
|
||||
i = 4;
|
||||
value = ixheaacd_extu(read_word, bit_pos, 23);
|
||||
value = ixheaac_extu(read_word, bit_pos, 23);
|
||||
value = value | 0xfffffe00;
|
||||
norm_val = ixheaacd_norm32(value);
|
||||
norm_val = ixheaac_norm32(value);
|
||||
|
||||
i += (norm_val - 22);
|
||||
|
||||
|
|
@ -248,7 +248,7 @@ static PLATFORM_INLINE WORD ixheaacd_huffman_dec_word1(
|
|||
ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
|
||||
it_bit_buff->ptr_bit_buf_end);
|
||||
|
||||
off = ixheaacd_extu(read_word, bit_pos, 32 - i);
|
||||
off = ixheaac_extu(read_word, bit_pos, 32 - i);
|
||||
|
||||
bit_pos += i;
|
||||
|
||||
|
|
@ -375,16 +375,16 @@ static PLATFORM_INLINE WORD ixheaacd_huffman_dec_word2_11(
|
|||
|
||||
if (sp1 == 16) {
|
||||
i = 4;
|
||||
value = ixheaacd_extu(read_word, bit_pos, 23);
|
||||
value = ixheaac_extu(read_word, bit_pos, 23);
|
||||
value = value | 0xfffffe00;
|
||||
norm_val = ixheaacd_norm32(value);
|
||||
norm_val = ixheaac_norm32(value);
|
||||
i += (norm_val - 22);
|
||||
bit_pos += (norm_val - 21);
|
||||
|
||||
ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
|
||||
it_bit_buff->ptr_bit_buf_end);
|
||||
|
||||
off = ixheaacd_extu(read_word, bit_pos, 32 - i);
|
||||
off = ixheaac_extu(read_word, bit_pos, 32 - i);
|
||||
|
||||
bit_pos += i;
|
||||
ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
|
||||
|
|
@ -421,9 +421,9 @@ static PLATFORM_INLINE WORD ixheaacd_huffman_dec_word2_11(
|
|||
|
||||
if (sp2 == 16) {
|
||||
i = 4;
|
||||
value = ixheaacd_extu(read_word, bit_pos, 23);
|
||||
value = ixheaac_extu(read_word, bit_pos, 23);
|
||||
value = value | 0xfffffe00;
|
||||
norm_val = ixheaacd_norm32(value);
|
||||
norm_val = ixheaac_norm32(value);
|
||||
|
||||
i += (norm_val - 22);
|
||||
|
||||
|
|
@ -431,7 +431,7 @@ static PLATFORM_INLINE WORD ixheaacd_huffman_dec_word2_11(
|
|||
ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
|
||||
it_bit_buff->ptr_bit_buf_end);
|
||||
|
||||
off = ixheaacd_extu(read_word, bit_pos, 32 - i);
|
||||
off = ixheaac_extu(read_word, bit_pos, 32 - i);
|
||||
|
||||
bit_pos += i;
|
||||
ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word,
|
||||
|
|
@ -1133,7 +1133,7 @@ VOID ixheaacd_dec_copy_outsample(WORD32 *out_samples, WORD32 *p_overlap_buffer,
|
|||
WORD32 i;
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
out_samples[stride*i] = (ixheaacd_shl16_sat((WORD16)(p_overlap_buffer[i]), 1) << 14);
|
||||
out_samples[stride*i] = (ixheaac_shl16_sat((WORD16)(p_overlap_buffer[i]), 1) << 14);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1167,25 +1167,25 @@ VOID ixheaacd_lap1_512_480(WORD32 *coef, WORD32 *prev, VOID *out_tmp,
|
|||
coeff = *pCoef--;
|
||||
win2 = *pwin2++;
|
||||
|
||||
accu = ixheaacd_sub32_sat(
|
||||
ixheaacd_shl32_dir_sat_limit(ixheaacd_mult32_shl(coeff, win1), q_shift),
|
||||
ixheaacd_mac32x16in32_shl(rounding_fac, win2, (WORD16)(prev_data)));
|
||||
accu = ixheaac_sub32_sat(
|
||||
ixheaac_shl32_dir_sat_limit(ixheaac_mult32_shl(coeff, win1), q_shift),
|
||||
ixheaac_mac32x16in32_shl(rounding_fac, win2, (WORD16)(prev_data)));
|
||||
|
||||
accu = ixheaacd_add32_sat(accu, accu);
|
||||
accu = ixheaacd_add32_sat(accu, accu);
|
||||
accu = ixheaac_add32_sat(accu, accu);
|
||||
accu = ixheaac_add32_sat(accu, accu);
|
||||
|
||||
*ptr_out1 = ixheaacd_shr32(accu, 16);
|
||||
*ptr_out1 = ixheaac_shr32(accu, 16);
|
||||
ptr_out1 -= stride;
|
||||
|
||||
accu = ixheaacd_sub32_sat(
|
||||
ixheaacd_shl32_dir_sat_limit(
|
||||
ixheaacd_mult32_shl(ixheaacd_negate32_sat(coeff), win2), q_shift),
|
||||
ixheaacd_mac32x16in32_shl(rounding_fac, win1, (WORD16)(prev_data)));
|
||||
accu = ixheaac_sub32_sat(
|
||||
ixheaac_shl32_dir_sat_limit(
|
||||
ixheaac_mult32_shl(ixheaac_negate32_sat(coeff), win2), q_shift),
|
||||
ixheaac_mac32x16in32_shl(rounding_fac, win1, (WORD16)(prev_data)));
|
||||
|
||||
accu = ixheaacd_add32_sat(accu, accu);
|
||||
accu = ixheaacd_add32_sat(accu, accu);
|
||||
accu = ixheaac_add32_sat(accu, accu);
|
||||
accu = ixheaac_add32_sat(accu, accu);
|
||||
|
||||
*ptr_out2 = ixheaacd_shr32(accu, 16);
|
||||
*ptr_out2 = ixheaac_shr32(accu, 16);
|
||||
ptr_out2 += stride;
|
||||
}
|
||||
}
|
||||
|
|
@ -1202,14 +1202,14 @@ VOID ixheaacd_over_lap_add1_dec(WORD32 *coef, WORD32 *prev, WORD32 *out,
|
|||
|
||||
window1 = window[2 * size - 2 * i - 1];
|
||||
window2 = window[2 * size - 2 * i - 2];
|
||||
accu = ixheaacd_sub32_sat(
|
||||
ixheaacd_shl32_dir_sat_limit(
|
||||
ixheaacd_mult32x16in32(coef[size * 2 - 1 - i], window2), q_shift),
|
||||
accu = ixheaac_sub32_sat(
|
||||
ixheaac_shl32_dir_sat_limit(
|
||||
ixheaac_mult32x16in32(coef[size * 2 - 1 - i], window2), q_shift),
|
||||
ixheaacd_mac32x16in32_sat(rounding_fac, prev[i], window1));
|
||||
out[ch_fac * (size - i - 1)] = accu;
|
||||
accu = ixheaacd_sub32_sat(
|
||||
ixheaacd_shl32_dir_sat_limit(
|
||||
ixheaacd_mult32x16in32(ixheaacd_negate32_sat(coef[size * 2 - 1 - i]),
|
||||
accu = ixheaac_sub32_sat(
|
||||
ixheaac_shl32_dir_sat_limit(
|
||||
ixheaac_mult32x16in32(ixheaac_negate32_sat(coef[size * 2 - 1 - i]),
|
||||
window1),
|
||||
q_shift),
|
||||
ixheaacd_mac32x16in32_sat(rounding_fac, prev[i], window2));
|
||||
|
|
@ -1224,18 +1224,18 @@ VOID ixheaacd_over_lap_add2_dec(WORD32 *coef, WORD32 *prev, WORD32 *out,
|
|||
WORD32 i;
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
accu = ixheaacd_sub32_sat(
|
||||
ixheaacd_mult32x16in32(coef[size + i], window[2 * i]),
|
||||
ixheaacd_mult32x16in32(prev[size - 1 - i], window[2 * i + 1]));
|
||||
out[ch_fac * i] = ixheaacd_shr32_sat(accu, 16 - (q_shift + 1));
|
||||
accu = ixheaac_sub32_sat(
|
||||
ixheaac_mult32x16in32(coef[size + i], window[2 * i]),
|
||||
ixheaac_mult32x16in32(prev[size - 1 - i], window[2 * i + 1]));
|
||||
out[ch_fac * i] = ixheaac_shr32_sat(accu, 16 - (q_shift + 1));
|
||||
}
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
accu = ixheaacd_sub32_sat(
|
||||
ixheaacd_mult32x16in32(ixheaacd_negate32_sat(coef[size * 2 - 1 - i]),
|
||||
accu = ixheaac_sub32_sat(
|
||||
ixheaac_mult32x16in32(ixheaac_negate32_sat(coef[size * 2 - 1 - i]),
|
||||
window[2 * size - 2 * i - 1]),
|
||||
ixheaacd_mult32x16in32(prev[i], window[2 * size - 2 * i - 2]));
|
||||
out[ch_fac * (i + size)] = ixheaacd_shr32_sat(accu, 16 - (q_shift + 1));
|
||||
ixheaac_mult32x16in32(prev[i], window[2 * size - 2 * i - 2]));
|
||||
out[ch_fac * (i + size)] = ixheaac_shr32_sat(accu, 16 - (q_shift + 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1271,15 +1271,15 @@ VOID ixheaacd_process_single_scf(WORD32 scale_factor, WORD32 *x_invquant,
|
|||
if (scale_short == (WORD16)0x8000) {
|
||||
for (j = width; j > 0; j--) {
|
||||
temp1 = *x_invquant;
|
||||
buffer1 = ixheaacd_mult32x16in32_shl_sat(temp1, scale_short);
|
||||
buffer1 = ixheaacd_shr32(buffer1, shift);
|
||||
buffer1 = ixheaac_mult32x16in32_shl_sat(temp1, scale_short);
|
||||
buffer1 = ixheaac_shr32(buffer1, shift);
|
||||
*x_invquant++ = buffer1;
|
||||
}
|
||||
} else {
|
||||
for (j = width; j > 0; j--) {
|
||||
temp1 = *x_invquant;
|
||||
buffer1 = ixheaacd_mult32x16in32_shl(temp1, scale_short);
|
||||
buffer1 = ixheaacd_shr32(buffer1, shift);
|
||||
buffer1 = ixheaac_mult32x16in32_shl(temp1, scale_short);
|
||||
buffer1 = ixheaac_shr32(buffer1, shift);
|
||||
*x_invquant++ = buffer1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1289,17 +1289,17 @@ VOID ixheaacd_process_single_scf(WORD32 scale_factor, WORD32 *x_invquant,
|
|||
if (scale_short == (WORD16)0x8000) {
|
||||
for (j = width; j > 0; j--) {
|
||||
temp1 = *x_invquant;
|
||||
temp1 = ixheaacd_shl32(temp1, shift - 1);
|
||||
buffer1 = ixheaacd_mult32x16in32_shl_sat(temp1, scale_short);
|
||||
buffer1 = ixheaacd_shl32(buffer1, 1);
|
||||
temp1 = ixheaac_shl32(temp1, shift - 1);
|
||||
buffer1 = ixheaac_mult32x16in32_shl_sat(temp1, scale_short);
|
||||
buffer1 = ixheaac_shl32(buffer1, 1);
|
||||
*x_invquant++ = buffer1;
|
||||
}
|
||||
} else {
|
||||
for (j = width; j > 0; j--) {
|
||||
temp1 = *x_invquant;
|
||||
temp1 = ixheaacd_shl32(temp1, shift - 1);
|
||||
buffer1 = ixheaacd_mult32x16in32_shl(temp1, scale_short);
|
||||
buffer1 = ixheaacd_shl32(buffer1, 1);
|
||||
temp1 = ixheaac_shl32(temp1, shift - 1);
|
||||
buffer1 = ixheaac_mult32x16in32_shl(temp1, scale_short);
|
||||
buffer1 = ixheaac_shl32(buffer1, 1);
|
||||
*x_invquant++ = buffer1;
|
||||
}
|
||||
}
|
||||
|
|
@ -1308,13 +1308,13 @@ VOID ixheaacd_process_single_scf(WORD32 scale_factor, WORD32 *x_invquant,
|
|||
if (scale_short == (WORD16)0x8000) {
|
||||
for (j = width; j > 0; j--) {
|
||||
temp1 = *x_invquant;
|
||||
buffer1 = ixheaacd_mult32x16in32_shl_sat(temp1, scale_short);
|
||||
buffer1 = ixheaac_mult32x16in32_shl_sat(temp1, scale_short);
|
||||
*x_invquant++ = buffer1;
|
||||
}
|
||||
} else {
|
||||
for (j = width; j > 0; j--) {
|
||||
temp1 = *x_invquant;
|
||||
buffer1 = ixheaacd_mult32x16in32_shl(temp1, scale_short);
|
||||
buffer1 = ixheaac_mult32x16in32_shl(temp1, scale_short);
|
||||
*x_invquant++ = buffer1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,13 +19,13 @@
|
|||
*/
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_error_codes.h"
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_basic_funcs.h"
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_stereo.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@
|
|||
*/
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_defines.h"
|
||||
#include "ixheaacd_aac_rom.h"
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
|
||||
#include "ixheaacd_multichannel.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_adts_crc_check.h"
|
||||
#include "ixheaacd_function_selector.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@
|
|||
*/
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_defines.h"
|
||||
#include "ixheaacd_aac_rom.h"
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
|
||||
#include "ixheaacd_multichannel.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
|
||||
static PLATFORM_INLINE UWORD32
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_basic_funcs.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
|
@ -52,7 +52,7 @@
|
|||
#include "ixheaacd_env_extr.h"
|
||||
#include "ixheaacd_env_calc.h"
|
||||
#include "ixheaacd_qmf_dec.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
|
||||
#include "ixheaacd_pvc_dec.h"
|
||||
#include "ixheaacd_sbr_dec.h"
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@
|
|||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaacd_cnst.h"
|
||||
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
#include "ixheaacd_ps_dec.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_qmf_dec.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
#include "ixheaacd_lpp_tran.h"
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
#include "ixheaacd_env_extr.h"
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@
|
|||
*/
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
#include "ixheaacd_memory_standards.h"
|
||||
#include "ixheaacd_sbrdecsettings.h"
|
||||
#include "ixheaacd_sbr_scale.h"
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
#include "ixheaacd_mps_struct_def.h"
|
||||
#include "ixheaacd_mps_res_rom.h"
|
||||
#include "ixheaacd_mps_aac_struct.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaacd_mps_dec.h"
|
||||
#include "ixheaacd_struct_def.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
|
@ -69,14 +69,14 @@
|
|||
#include "ixheaacd_info.h"
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
#include "ixheaacd_mps_polyphase.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
#include "ixheaacd_main.h"
|
||||
#include "ixheaacd_arith_dec.h"
|
||||
#include "ixheaacd_config.h"
|
||||
#include "ixheaacd_struct.h"
|
||||
#include "ixheaacd_create.h"
|
||||
#include "ixheaacd_dec_main.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
#include "ixheaacd_headerdecode.h"
|
||||
#include "ixheaacd_error_codes.h"
|
||||
VOID ixheaacd_samples_sat(WORD8 *outbuffer, WORD32 num_samples_out,
|
||||
|
|
|
|||
|
|
@ -20,18 +20,18 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
|
||||
#include "ixheaacd_cnst.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_defines.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -18,18 +18,18 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_dsp_fft32x32s.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
|
||||
VOID ixheaacd_inv_dit_fft_8pt_dec(WORD32 *y, WORD32 *real, WORD32 *imag) {
|
||||
WORD32 a0, a1, a2, a3, a00, a10, a20, a30;
|
||||
|
|
@ -37,81 +37,81 @@ VOID ixheaacd_inv_dit_fft_8pt_dec(WORD32 *y, WORD32 *real, WORD32 *imag) {
|
|||
|
||||
WORD32 x[16];
|
||||
|
||||
a00 = ixheaacd_add32_sat(y[0], y[8]);
|
||||
a0 = ixheaacd_sub32_sat(y[0], y[8]);
|
||||
a00 = ixheaac_add32_sat(y[0], y[8]);
|
||||
a0 = ixheaac_sub32_sat(y[0], y[8]);
|
||||
|
||||
a20 = ixheaacd_add32_sat(y[1], y[9]);
|
||||
a3 = ixheaacd_sub32_sat(y[1], y[9]);
|
||||
a20 = ixheaac_add32_sat(y[1], y[9]);
|
||||
a3 = ixheaac_sub32_sat(y[1], y[9]);
|
||||
|
||||
a10 = ixheaacd_add32_sat(y[4], y[12]);
|
||||
a2 = ixheaacd_sub32_sat(y[4], y[12]);
|
||||
a10 = ixheaac_add32_sat(y[4], y[12]);
|
||||
a2 = ixheaac_sub32_sat(y[4], y[12]);
|
||||
|
||||
a30 = ixheaacd_add32_sat(y[5], y[13]);
|
||||
a1 = ixheaacd_sub32_sat(y[5], y[13]);
|
||||
a30 = ixheaac_add32_sat(y[5], y[13]);
|
||||
a1 = ixheaac_sub32_sat(y[5], y[13]);
|
||||
|
||||
x[0] = ixheaacd_add32_sat(a00, a10);
|
||||
x[4] = ixheaacd_sub32_sat(a00, a10);
|
||||
x[1] = ixheaacd_add32_sat(a20, a30);
|
||||
x[5] = ixheaacd_sub32_sat(a20, a30);
|
||||
x[0] = ixheaac_add32_sat(a00, a10);
|
||||
x[4] = ixheaac_sub32_sat(a00, a10);
|
||||
x[1] = ixheaac_add32_sat(a20, a30);
|
||||
x[5] = ixheaac_sub32_sat(a20, a30);
|
||||
|
||||
x[2] = ixheaacd_sub32_sat(a0, a1);
|
||||
x[6] = ixheaacd_add32_sat(a0, a1);
|
||||
x[3] = ixheaacd_add32_sat(a3, a2);
|
||||
x[7] = ixheaacd_sub32_sat(a3, a2);
|
||||
x[2] = ixheaac_sub32_sat(a0, a1);
|
||||
x[6] = ixheaac_add32_sat(a0, a1);
|
||||
x[3] = ixheaac_add32_sat(a3, a2);
|
||||
x[7] = ixheaac_sub32_sat(a3, a2);
|
||||
|
||||
a00 = ixheaacd_add32_sat(y[2], y[10]);
|
||||
a0 = ixheaacd_sub32_sat(y[2], y[10]);
|
||||
a00 = ixheaac_add32_sat(y[2], y[10]);
|
||||
a0 = ixheaac_sub32_sat(y[2], y[10]);
|
||||
|
||||
a20 = ixheaacd_add32_sat(y[3], y[11]);
|
||||
a3 = ixheaacd_sub32_sat(y[3], y[11]);
|
||||
a20 = ixheaac_add32_sat(y[3], y[11]);
|
||||
a3 = ixheaac_sub32_sat(y[3], y[11]);
|
||||
|
||||
a10 = ixheaacd_add32_sat(y[6], y[14]);
|
||||
a2 = ixheaacd_sub32_sat(y[6], y[14]);
|
||||
a10 = ixheaac_add32_sat(y[6], y[14]);
|
||||
a2 = ixheaac_sub32_sat(y[6], y[14]);
|
||||
|
||||
a30 = ixheaacd_add32_sat(y[7], y[15]);
|
||||
a1 = ixheaacd_sub32_sat(y[7], y[15]);
|
||||
a30 = ixheaac_add32_sat(y[7], y[15]);
|
||||
a1 = ixheaac_sub32_sat(y[7], y[15]);
|
||||
|
||||
x[8] = ixheaacd_add32_sat(a00, a10);
|
||||
x[12] = ixheaacd_sub32_sat(a00, a10);
|
||||
x[9] = ixheaacd_add32_sat(a20, a30);
|
||||
x[13] = ixheaacd_sub32_sat(a20, a30);
|
||||
x[8] = ixheaac_add32_sat(a00, a10);
|
||||
x[12] = ixheaac_sub32_sat(a00, a10);
|
||||
x[9] = ixheaac_add32_sat(a20, a30);
|
||||
x[13] = ixheaac_sub32_sat(a20, a30);
|
||||
|
||||
x[10] = ixheaacd_sub32_sat(a0, a1);
|
||||
x[14] = ixheaacd_add32_sat(a0, a1);
|
||||
x[11] = ixheaacd_add32_sat(a3, a2);
|
||||
x[15] = ixheaacd_sub32_sat(a3, a2);
|
||||
x[10] = ixheaac_sub32_sat(a0, a1);
|
||||
x[14] = ixheaac_add32_sat(a0, a1);
|
||||
x[11] = ixheaac_add32_sat(a3, a2);
|
||||
x[15] = ixheaac_sub32_sat(a3, a2);
|
||||
|
||||
real[0] = ixheaacd_add32_sat(x[0], x[8]);
|
||||
imag[0] = ixheaacd_add32_sat(x[1], x[9]);
|
||||
a00 = ixheaacd_sub32_sat(x[0], x[8]);
|
||||
a10 = ixheaacd_sub32_sat(x[1], x[9]);
|
||||
real[0] = ixheaac_add32_sat(x[0], x[8]);
|
||||
imag[0] = ixheaac_add32_sat(x[1], x[9]);
|
||||
a00 = ixheaac_sub32_sat(x[0], x[8]);
|
||||
a10 = ixheaac_sub32_sat(x[1], x[9]);
|
||||
|
||||
a0 = ixheaacd_sub32_sat(x[4], x[13]);
|
||||
a1 = ixheaacd_add32_sat(x[5], x[12]);
|
||||
a0 = ixheaac_sub32_sat(x[4], x[13]);
|
||||
a1 = ixheaac_add32_sat(x[5], x[12]);
|
||||
|
||||
real[4] = ixheaacd_add32_sat(x[4], x[13]);
|
||||
imag[4] = ixheaacd_sub32_sat(x[5], x[12]);
|
||||
real[4] = ixheaac_add32_sat(x[4], x[13]);
|
||||
imag[4] = ixheaac_sub32_sat(x[5], x[12]);
|
||||
|
||||
vr = ixheaacd_mult32x16in32_shl_sat(ixheaacd_sub32_sat(x[10], x[11]), 0x5A82);
|
||||
vi = ixheaacd_mult32x16in32_shl_sat(ixheaacd_add32_sat(x[10], x[11]), 0x5A82);
|
||||
vr = ixheaac_mult32x16in32_shl_sat(ixheaac_sub32_sat(x[10], x[11]), 0x5A82);
|
||||
vi = ixheaac_mult32x16in32_shl_sat(ixheaac_add32_sat(x[10], x[11]), 0x5A82);
|
||||
|
||||
real[1] = ixheaacd_add32_sat(x[2], vr);
|
||||
imag[1] = ixheaacd_add32_sat(x[3], vi);
|
||||
real[1] = ixheaac_add32_sat(x[2], vr);
|
||||
imag[1] = ixheaac_add32_sat(x[3], vi);
|
||||
|
||||
a2 = ixheaacd_sub32_sat(x[2], vr);
|
||||
a3 = ixheaacd_sub32_sat(x[3], vi);
|
||||
a2 = ixheaac_sub32_sat(x[2], vr);
|
||||
a3 = ixheaac_sub32_sat(x[3], vi);
|
||||
|
||||
real[2] = ixheaacd_add32_sat(a0, a2);
|
||||
imag[2] = ixheaacd_add32_sat(a1, a3);
|
||||
vr = ixheaacd_mult32x16in32_shl_sat(ixheaacd_add32_sat(x[14], x[15]), 0x5A82);
|
||||
vi = ixheaacd_mult32x16in32_shl_sat(ixheaacd_sub32_sat(x[14], x[15]), 0x5A82);
|
||||
real[2] = ixheaac_add32_sat(a0, a2);
|
||||
imag[2] = ixheaac_add32_sat(a1, a3);
|
||||
vr = ixheaac_mult32x16in32_shl_sat(ixheaac_add32_sat(x[14], x[15]), 0x5A82);
|
||||
vi = ixheaac_mult32x16in32_shl_sat(ixheaac_sub32_sat(x[14], x[15]), 0x5A82);
|
||||
|
||||
a20 = ixheaacd_sub32_sat(x[6], vr);
|
||||
a30 = ixheaacd_add32_sat(x[7], vi);
|
||||
a20 = ixheaac_sub32_sat(x[6], vr);
|
||||
a30 = ixheaac_add32_sat(x[7], vi);
|
||||
|
||||
real[3] = ixheaacd_add32_sat(a00, a20);
|
||||
imag[3] = ixheaacd_add32_sat(a10, a30);
|
||||
real[3] = ixheaac_add32_sat(a00, a20);
|
||||
imag[3] = ixheaac_add32_sat(a10, a30);
|
||||
|
||||
real[5] = ixheaacd_add32_sat(x[6], vr);
|
||||
imag[5] = ixheaacd_sub32_sat(x[7], vi);
|
||||
real[5] = ixheaac_add32_sat(x[6], vr);
|
||||
imag[5] = ixheaac_sub32_sat(x[7], vi);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,4 +38,4 @@ VOID ixheaacd_inv_dit_fft_8pt_armv8(WORD32 *x, WORD32 *real, WORD32 *imag);
|
|||
im = (-(a * d) + (b * c)); \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
#endif /* IXHEAACD_DSP_FFT32X32S_H */
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
|
||||
#include <ixheaacd_type_def.h>
|
||||
#include <ixheaac_type_def.h>
|
||||
#include "ixheaacd_ec_defines.h"
|
||||
|
||||
const WORD16 ia_ec_interpolation_fac[4] = {(0x4000), (0x4c1b), (0x5a82), (0x6ba2)};
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
#include "ixheaacd_ps_dec.h"
|
||||
#include "ixheaacd_env_extr.h"
|
||||
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_freq_sca.h"
|
||||
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
#include "ixheaacd_env_extr.h"
|
||||
|
||||
#include "ixheaacd_env_calc.h"
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
|
||||
#include "ixheaacd_qmf_dec.h"
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ static VOID ixheaacd_alias_reduction(WORD16 *deg_patched, WORD16 *nrg_gain,
|
|||
WORD16 one_minus_alpha, alpha = deg_patched[k];
|
||||
|
||||
if (k < (num_sub_bands - 1)) {
|
||||
alpha = ixheaacd_max16(deg_patched[k + 1], alpha);
|
||||
alpha = ixheaac_max16(deg_patched[k + 1], alpha);
|
||||
}
|
||||
gain_m = (alpha * grp_gain_mant);
|
||||
one_minus_alpha = 0x7fff - alpha;
|
||||
|
|
@ -165,13 +165,13 @@ static VOID ixheaacd_alias_reduction(WORD16 *deg_patched, WORD16 *nrg_gain,
|
|||
|
||||
if (exp_diff >= 0) {
|
||||
tmp_gain_exp = grp_gain_exp;
|
||||
tmp_gain_mant = ixheaacd_shr32(tmp_gain_mant, exp_diff);
|
||||
tmp_gain_mant = ixheaac_shr32(tmp_gain_mant, exp_diff);
|
||||
|
||||
tmp_gain_mant = (gain_m >> 15) + tmp_gain_mant;
|
||||
|
||||
} else {
|
||||
tmp_gain_mant =
|
||||
(ixheaacd_shr32(gain_m, (15 - exp_diff))) + tmp_gain_mant;
|
||||
(ixheaac_shr32(gain_m, (15 - exp_diff))) + tmp_gain_mant;
|
||||
}
|
||||
}
|
||||
*ptr_nrg_gain_mant++ = tmp_gain_mant;
|
||||
|
|
@ -184,11 +184,11 @@ static VOID ixheaacd_alias_reduction(WORD16 *deg_patched, WORD16 *nrg_gain,
|
|||
WORD32 exp_diff;
|
||||
exp_diff = tmp_e - nrg_mod_exp;
|
||||
if (exp_diff >= 0) {
|
||||
nrg_mod_mant = tmp_mant + (ixheaacd_shr32(nrg_mod_mant, exp_diff));
|
||||
nrg_mod_mant = tmp_mant + (ixheaac_shr32(nrg_mod_mant, exp_diff));
|
||||
nrg_mod_exp = tmp_e;
|
||||
} else {
|
||||
exp_diff = -exp_diff;
|
||||
nrg_mod_mant = (ixheaacd_shr32(tmp_mant, exp_diff)) + nrg_mod_mant;
|
||||
nrg_mod_mant = (ixheaac_shr32(tmp_mant, exp_diff)) + nrg_mod_mant;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -196,7 +196,7 @@ static VOID ixheaacd_alias_reduction(WORD16 *deg_patched, WORD16 *nrg_gain,
|
|||
|
||||
{
|
||||
WORD32 norm_val;
|
||||
norm_val = 16 - ixheaacd_pnorm32(nrg_mod_mant);
|
||||
norm_val = 16 - ixheaac_pnorm32(nrg_mod_mant);
|
||||
if (norm_val > 0) {
|
||||
nrg_mod_mant >>= norm_val;
|
||||
nrg_mod_exp += norm_val;
|
||||
|
|
@ -257,10 +257,10 @@ VOID ixheaacd_noiselimiting(ia_freq_band_data_struct *pstr_freq_band_data,
|
|||
&sum_orig_mant, &sum_orig_exp, &max_gain_mant,
|
||||
&max_gain_exp, pstr_common_tables, 0);
|
||||
|
||||
max_temp = ixheaacd_mult16x16in32_shl(max_gain_mant, limit_gain_mant);
|
||||
max_temp = ixheaac_mult16x16in32_shl(max_gain_mant, limit_gain_mant);
|
||||
max_gain_exp = (max_gain_exp + limit_gain_exp);
|
||||
|
||||
temp_val = ixheaacd_norm32(max_temp);
|
||||
temp_val = ixheaac_norm32(max_temp);
|
||||
|
||||
max_gain_exp = (WORD16)(max_gain_exp - temp_val);
|
||||
max_gain_mant = (WORD16)((max_temp << temp_val) >> 16);
|
||||
|
|
@ -288,8 +288,8 @@ VOID ixheaacd_noiselimiting(ia_freq_band_data_struct *pstr_freq_band_data,
|
|||
&noise_amp_mant, pstr_common_tables);
|
||||
noise_amp_exp += (max_gain_exp - t_gain_exp) + 1;
|
||||
|
||||
*p_noise_level = ixheaacd_extract16h(ixheaacd_shl32_dir_sat_limit(
|
||||
ixheaacd_mult16x16in32_shl(*p_noise_level, noise_amp_mant),
|
||||
*p_noise_level = ixheaac_extract16h(ixheaac_shl32_dir_sat_limit(
|
||||
ixheaac_mult16x16in32_shl(*p_noise_level, noise_amp_mant),
|
||||
noise_amp_exp));
|
||||
|
||||
*ptr_nrg_gain = max_gain_mant;
|
||||
|
|
@ -327,22 +327,22 @@ VOID ixheaacd_noiselimiting(ia_freq_band_data_struct *pstr_freq_band_data,
|
|||
WORD32 exp_diff;
|
||||
exp_diff = tmp_e - accu_e_t;
|
||||
if (exp_diff >= 0) {
|
||||
accu_m_t = tmp_mant + ixheaacd_shr32(accu_m_t, exp_diff);
|
||||
accu_m_t = tmp_mant + ixheaac_shr32(accu_m_t, exp_diff);
|
||||
accu_e_t = tmp_e;
|
||||
} else {
|
||||
exp_diff = -exp_diff;
|
||||
accu_m_t = ixheaacd_shr32(tmp_mant, exp_diff) + accu_m_t;
|
||||
accu_m_t = ixheaac_shr32(tmp_mant, exp_diff) + accu_m_t;
|
||||
}
|
||||
}
|
||||
|
||||
if (p_nrg_sine[0] != 0) {
|
||||
WORD32 exp_diff = p_nrg_sine[1] - accu_e_t;
|
||||
if (exp_diff >= 0) {
|
||||
accu_m_t = p_nrg_sine[0] + ixheaacd_shr32(accu_m_t, exp_diff);
|
||||
accu_m_t = p_nrg_sine[0] + ixheaac_shr32(accu_m_t, exp_diff);
|
||||
accu_e_t = p_nrg_sine[1];
|
||||
} else {
|
||||
exp_diff = -exp_diff;
|
||||
accu_m_t = accu_m_t + ixheaacd_shr32(p_nrg_sine[0], exp_diff);
|
||||
accu_m_t = accu_m_t + ixheaac_shr32(p_nrg_sine[0], exp_diff);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
@ -350,12 +350,12 @@ VOID ixheaacd_noiselimiting(ia_freq_band_data_struct *pstr_freq_band_data,
|
|||
WORD32 exp_diff = p_noise_level[1] - accu_e_t;
|
||||
if (exp_diff >= 0) {
|
||||
accu_m_t =
|
||||
p_noise_level[0] + ixheaacd_shr32(accu_m_t, exp_diff);
|
||||
p_noise_level[0] + ixheaac_shr32(accu_m_t, exp_diff);
|
||||
accu_e_t = p_noise_level[1];
|
||||
} else {
|
||||
exp_diff = -exp_diff;
|
||||
accu_m_t =
|
||||
accu_m_t + ixheaacd_shr32(p_noise_level[0], exp_diff);
|
||||
accu_m_t + ixheaac_shr32(p_noise_level[0], exp_diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -365,7 +365,7 @@ VOID ixheaacd_noiselimiting(ia_freq_band_data_struct *pstr_freq_band_data,
|
|||
|
||||
{
|
||||
WORD32 norm_val;
|
||||
norm_val = 16 - ixheaacd_norm32(accu_m_t);
|
||||
norm_val = 16 - ixheaac_norm32(accu_m_t);
|
||||
if (norm_val > 0) {
|
||||
accu_m_t >>= norm_val;
|
||||
accu_e_t += norm_val;
|
||||
|
|
@ -397,9 +397,9 @@ VOID ixheaacd_noiselimiting(ia_freq_band_data_struct *pstr_freq_band_data,
|
|||
temp2 = *p_nrg_sine;
|
||||
temp3 = *p_noise_level;
|
||||
|
||||
temp1 = ixheaacd_mult16_shl(temp1, boost_gain_mant);
|
||||
temp2 = ixheaacd_mult16_shl(temp2, boost_gain_mant);
|
||||
temp3 = ixheaacd_mult16_shl(temp3, boost_gain_mant);
|
||||
temp1 = ixheaac_mult16_shl(temp1, boost_gain_mant);
|
||||
temp2 = ixheaac_mult16_shl(temp2, boost_gain_mant);
|
||||
temp3 = ixheaac_mult16_shl(temp3, boost_gain_mant);
|
||||
*ptr_nrg_gain++ = temp1;
|
||||
*p_nrg_sine++ = temp2;
|
||||
*p_noise_level++ = temp3;
|
||||
|
|
@ -441,9 +441,9 @@ VOID ixheaacd_conv_ergtoamplitudelp_dec(WORD32 bands, WORD16 noise_e,
|
|||
|
||||
shift = (nrg_sine[2 * k + 1] - noise_e);
|
||||
if (shift > 0)
|
||||
nrg_sine[2 * k] = ixheaacd_shl16_sat(nrg_sine[2 * k], (WORD16)shift);
|
||||
nrg_sine[2 * k] = ixheaac_shl16_sat(nrg_sine[2 * k], (WORD16)shift);
|
||||
else
|
||||
nrg_sine[2 * k] = ixheaacd_shr16(nrg_sine[2 * k], (WORD16)-shift);
|
||||
nrg_sine[2 * k] = ixheaac_shr16(nrg_sine[2 * k], (WORD16)-shift);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -779,7 +779,7 @@ IA_ERRORCODE ixheaacd_calc_sbrenvelope(
|
|||
max_noise = ptr_sbr_calc_env->filt_buf_noise_m[i];
|
||||
}
|
||||
}
|
||||
adj_e = ((ptr_sbr_calc_env->filt_buf_noise_e - ixheaacd_norm32(max_noise)) -
|
||||
adj_e = ((ptr_sbr_calc_env->filt_buf_noise_e - ixheaac_norm32(max_noise)) -
|
||||
16);
|
||||
}
|
||||
|
||||
|
|
@ -936,7 +936,7 @@ IA_ERRORCODE ixheaacd_calc_sbrenvelope(
|
|||
(WORD16 *)pstr_common_tables->sqrt_table);
|
||||
}
|
||||
|
||||
lb_scale = ixheaacd_sub16(15, ptr_sbr_scale_fac->lb_scale);
|
||||
lb_scale = ixheaac_sub16(15, ptr_sbr_scale_fac->lb_scale);
|
||||
|
||||
ixheaacd_adapt_noise_gain_calc(
|
||||
ptr_sbr_calc_env, noise_e, num_sub_bands, skip_bands, nrg_gain,
|
||||
|
|
@ -1027,7 +1027,7 @@ VOID ixheaacd_equalize_filt_buff_exp(WORD16 *ptr_filt_buf, WORD16 *nrg_gain,
|
|||
*ptr_filt_buf = (WORD16)(*ptr_filt_buf >> diff);
|
||||
} else {
|
||||
WORD32 reserve;
|
||||
reserve = (ixheaacd_norm32(filt_buf_mant) - 16);
|
||||
reserve = (ixheaac_norm32(filt_buf_mant) - 16);
|
||||
|
||||
if ((diff + reserve) >= 0) {
|
||||
*ptr_filt_buf = (WORD16)(filt_buf_mant << -diff);
|
||||
|
|
@ -1098,8 +1098,8 @@ VOID ixheaacd_adjust_scale_dec(WORD32 **re, WORD32 **im, WORD32 sub_band_start,
|
|||
if (shift != 0) {
|
||||
WORD32 num_sub_bands = (sub_band_end - sub_band_start);
|
||||
|
||||
shift = ixheaacd_min32(shift, 31);
|
||||
shift = ixheaacd_max32(shift, -31);
|
||||
shift = ixheaac_min32(shift, 31);
|
||||
shift = ixheaac_max32(shift, -31);
|
||||
|
||||
if (low_pow_flag) {
|
||||
if (shift > 0) {
|
||||
|
|
@ -1172,12 +1172,12 @@ WORD16 ixheaacd_expsubbandsamples_dec(WORD32 **re, WORD32 **im,
|
|||
ptr_real = re[l] + sub_band_start;
|
||||
temp_real = *ptr_real++;
|
||||
for (k = num_sub_bands; k > 0; k--) {
|
||||
value = ixheaacd_abs32_nrm(temp_real);
|
||||
value = ixheaac_abs32_nrm(temp_real);
|
||||
max_abs |= value;
|
||||
temp_real = *ptr_real++;
|
||||
}
|
||||
}
|
||||
max_shift = ixheaacd_pnorm32(max_abs);
|
||||
max_shift = ixheaac_pnorm32(max_abs);
|
||||
} else {
|
||||
for (l = start_pos; l < next_pos; l++) {
|
||||
ptr_real = re[l] + sub_band_start;
|
||||
|
|
@ -1187,13 +1187,13 @@ WORD16 ixheaacd_expsubbandsamples_dec(WORD32 **re, WORD32 **im,
|
|||
WORD32 temp_real = *ptr_real++;
|
||||
WORD32 tempIm = *ptr_imag++;
|
||||
|
||||
temp_real = ixheaacd_abs32_nrm(temp_real);
|
||||
temp_real = ixheaac_abs32_nrm(temp_real);
|
||||
max_abs |= temp_real;
|
||||
tempIm = ixheaacd_abs32_nrm(tempIm);
|
||||
tempIm = ixheaac_abs32_nrm(tempIm);
|
||||
max_abs |= tempIm;
|
||||
}
|
||||
}
|
||||
max_shift = ixheaacd_pnorm32(max_abs);
|
||||
max_shift = ixheaac_pnorm32(max_abs);
|
||||
}
|
||||
|
||||
return max_shift;
|
||||
|
|
@ -1239,14 +1239,14 @@ VOID ixheaacd_enery_calc_per_subband_dec(WORD32 start_pos, WORD32 next_pos,
|
|||
ptr = p_real;
|
||||
|
||||
for (l = num_cols; l != 0; l -= 2) {
|
||||
WORD32 value = ixheaacd_abs32_nrm(*ptr);
|
||||
WORD32 value = ixheaac_abs32_nrm(*ptr);
|
||||
ptr += 64;
|
||||
max_val = ixheaacd_max32(value, max_val);
|
||||
value = ixheaacd_abs32_nrm(*ptr);
|
||||
max_val = ixheaac_max32(value, max_val);
|
||||
value = ixheaac_abs32_nrm(*ptr);
|
||||
ptr += 64;
|
||||
max_val = ixheaacd_max32(value, max_val);
|
||||
max_val = ixheaac_max32(value, max_val);
|
||||
}
|
||||
pre_shift_val = (ixheaacd_pnorm32(max_val) - max_shift_gap);
|
||||
pre_shift_val = (ixheaac_pnorm32(max_val) - max_shift_gap);
|
||||
|
||||
accu = 0L;
|
||||
shift = 16 - pre_shift_val;
|
||||
|
|
@ -1272,9 +1272,9 @@ VOID ixheaacd_enery_calc_per_subband_dec(WORD32 start_pos, WORD32 next_pos,
|
|||
}
|
||||
|
||||
if (accu != 0L) {
|
||||
shift = -(ixheaacd_pnorm32(accu));
|
||||
sum_m = (WORD16)(ixheaacd_shr32_dir_sat_limit(accu, (16 + shift)));
|
||||
*nrg_est++ = ixheaacd_mult16_shl_sat(sum_m, inv_width);
|
||||
shift = -(ixheaac_pnorm32(accu));
|
||||
sum_m = (WORD16)(ixheaac_shr32_dir_sat_limit(accu, (16 + shift)));
|
||||
*nrg_est++ = ixheaac_mult16_shl_sat(sum_m, inv_width);
|
||||
shift = (shift - (pre_shift_val << 1));
|
||||
shift += extra_shift;
|
||||
*nrg_est++ = (WORD16)(frame_exp + shift + 1);
|
||||
|
|
@ -1336,26 +1336,26 @@ VOID ixheaacd_enery_calc_persfb(WORD32 **anal_buf_real, WORD32 **anal_buf_imag,
|
|||
WORD32 inc = !low_pow_flag;
|
||||
for (l = (next_pos - start_pos) << inc; l != 0; l--) {
|
||||
WORD16 temp;
|
||||
temp = ixheaacd_extract16l(ixheaacd_shr32_dir(*ptr, pre_shift1));
|
||||
temp = ixheaac_extract16l(ixheaac_shr32_dir(*ptr, pre_shift1));
|
||||
ptr += 64;
|
||||
accu_line = ixheaacd_mac16x16in32_sat(accu_line, temp, temp);
|
||||
accu_line = ixheaac_mac16x16in32_sat(accu_line, temp, temp);
|
||||
}
|
||||
}
|
||||
accumulate =
|
||||
ixheaacd_add32_sat(accumulate, ixheaacd_shr32(accu_line, 9));
|
||||
ixheaac_add32_sat(accumulate, ixheaac_shr32(accu_line, 9));
|
||||
}
|
||||
|
||||
shift = ixheaacd_pnorm32(accumulate);
|
||||
shift = ixheaac_pnorm32(accumulate);
|
||||
|
||||
sum_m = ixheaacd_extract16l(
|
||||
ixheaacd_shr32_dir_sat_limit(accumulate, (16 - shift)));
|
||||
sum_m = ixheaac_extract16l(
|
||||
ixheaac_shr32_dir_sat_limit(accumulate, (16 - shift)));
|
||||
|
||||
if (sum_m == 0) {
|
||||
sum_e = 0;
|
||||
} else {
|
||||
sum_m = ixheaacd_mult16_shl_sat(sum_m, inv_width);
|
||||
sum_m = ixheaac_mult16_shl_sat(sum_m, inv_width);
|
||||
|
||||
sum_m = ixheaacd_mult16_shl_sat(
|
||||
sum_m = ixheaac_mult16_shl_sat(
|
||||
sum_m,
|
||||
ptr_sbr_tables->env_calc_tables_ptr->sbr_inv_int_table[ui - li]);
|
||||
|
||||
|
|
@ -1393,7 +1393,7 @@ VOID ixheaacd_subbandgain_calc(WORD16 e_orig_mant_matrix, WORD16 tmp_noise_mant,
|
|||
nrg_est_exp = 1;
|
||||
}
|
||||
|
||||
var1_mant = ixheaacd_mult16_shl_sat(e_orig_mant_matrix, tmp_noise_mant);
|
||||
var1_mant = ixheaac_mult16_shl_sat(e_orig_mant_matrix, tmp_noise_mant);
|
||||
var1_exp = (nrg_ref_exp + tmp_noise_exp);
|
||||
|
||||
{
|
||||
|
|
@ -1402,14 +1402,14 @@ VOID ixheaacd_subbandgain_calc(WORD16 e_orig_mant_matrix, WORD16 tmp_noise_mant,
|
|||
exp_diff = tmp_noise_exp - 1;
|
||||
|
||||
if (exp_diff >= 0) {
|
||||
accu = tmp_noise_mant + ixheaacd_shr32(0x4000, exp_diff);
|
||||
accu = tmp_noise_mant + ixheaac_shr32(0x4000, exp_diff);
|
||||
var2_exp = tmp_noise_exp;
|
||||
} else {
|
||||
exp_diff = -exp_diff;
|
||||
accu = ixheaacd_shr32((WORD32)tmp_noise_mant, exp_diff) + 0x4000;
|
||||
accu = ixheaac_shr32((WORD32)tmp_noise_mant, exp_diff) + 0x4000;
|
||||
var2_exp = 1;
|
||||
}
|
||||
if (ixheaacd_abs32(accu) >= 0x8000) {
|
||||
if (ixheaac_abs32(accu) >= 0x8000) {
|
||||
accu = accu >> 1;
|
||||
var2_exp++;
|
||||
}
|
||||
|
|
@ -1421,7 +1421,7 @@ VOID ixheaacd_subbandgain_calc(WORD16 e_orig_mant_matrix, WORD16 tmp_noise_mant,
|
|||
*(ptr_noise_floor_mant + 1) = temp + (var1_exp - var2_exp) + 1;
|
||||
|
||||
if (sine_present_flag || !noise_absc_flag) {
|
||||
var3_mant = ixheaacd_mult16_shl_sat(var2_mant, nrg_est_mant);
|
||||
var3_mant = ixheaac_mult16_shl_sat(var2_mant, nrg_est_mant);
|
||||
var3_exp = (var2_exp + nrg_est_exp);
|
||||
} else {
|
||||
var3_mant = nrg_est_mant;
|
||||
|
|
@ -1488,12 +1488,12 @@ VOID ixheaacd_avggain_calc(WORD16 *ptr_enrg_orig, WORD16 *nrg_est,
|
|||
exp_diff = tmp_e - accu_sum_orig_exp;
|
||||
if (exp_diff >= 0) {
|
||||
accu_sum_orig_mant =
|
||||
tmp_mant + ixheaacd_shr32(accu_sum_orig_mant, exp_diff);
|
||||
tmp_mant + ixheaac_shr32(accu_sum_orig_mant, exp_diff);
|
||||
accu_sum_orig_exp = tmp_e;
|
||||
} else {
|
||||
exp_diff = -exp_diff;
|
||||
accu_sum_orig_mant =
|
||||
ixheaacd_shr32(tmp_mant, exp_diff) + accu_sum_orig_mant;
|
||||
ixheaac_shr32(tmp_mant, exp_diff) + accu_sum_orig_mant;
|
||||
}
|
||||
}
|
||||
if (flag) {
|
||||
|
|
@ -1510,23 +1510,23 @@ VOID ixheaacd_avggain_calc(WORD16 *ptr_enrg_orig, WORD16 *nrg_est,
|
|||
exp_diff = tmp_e - accu_sum_est_exp;
|
||||
if (exp_diff >= 0) {
|
||||
accu_sum_est_mant =
|
||||
tmp_mant + ixheaacd_shr32(accu_sum_est_mant, exp_diff);
|
||||
tmp_mant + ixheaac_shr32(accu_sum_est_mant, exp_diff);
|
||||
accu_sum_est_exp = tmp_e;
|
||||
} else {
|
||||
exp_diff = -exp_diff;
|
||||
accu_sum_est_mant =
|
||||
ixheaacd_shr32(tmp_mant, exp_diff) + accu_sum_est_mant;
|
||||
ixheaac_shr32(tmp_mant, exp_diff) + accu_sum_est_mant;
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
WORD32 norm_val;
|
||||
norm_val = 16 - ixheaacd_pnorm32(accu_sum_orig_mant);
|
||||
norm_val = 16 - ixheaac_pnorm32(accu_sum_orig_mant);
|
||||
if (norm_val > 0) {
|
||||
accu_sum_orig_mant >>= norm_val;
|
||||
accu_sum_orig_exp += norm_val;
|
||||
}
|
||||
norm_val = 16 - ixheaacd_pnorm32(accu_sum_est_mant);
|
||||
norm_val = 16 - ixheaac_pnorm32(accu_sum_est_mant);
|
||||
if (norm_val > 0) {
|
||||
accu_sum_est_mant >>= norm_val;
|
||||
accu_sum_est_exp += norm_val;
|
||||
|
|
@ -1568,7 +1568,7 @@ VOID ixheaacd_harm_idx_zerotwolp_dec(WORD32 *ptr_real_buf, WORD16 *ptr_gain_buf,
|
|||
scale_change = scale_change - 1;
|
||||
if (!noise_absc_flag) {
|
||||
for (k = 0; k < num_sub_bands; k++) {
|
||||
signal_real = ixheaacd_mult32x16in32(*ptr_real_buf, *ptr_gain_buf++);
|
||||
signal_real = ixheaac_mult32x16in32(*ptr_real_buf, *ptr_gain_buf++);
|
||||
shift = (*ptr_gain_buf++ - scale_change);
|
||||
|
||||
if (shift > 0)
|
||||
|
|
@ -1579,17 +1579,17 @@ VOID ixheaacd_harm_idx_zerotwolp_dec(WORD32 *ptr_real_buf, WORD16 *ptr_gain_buf,
|
|||
sine_level = (ptr_sine_level_buf[2 * k] << 16);
|
||||
|
||||
if (sine_level == 0) {
|
||||
*ptr_real_buf++ = ixheaacd_mac16x16in32_shl_sat(
|
||||
signal_real, ixheaacd_extract16h(ptr_rand_ph[k]),
|
||||
*ptr_real_buf++ = ixheaac_mac16x16in32_shl_sat(
|
||||
signal_real, ixheaac_extract16h(ptr_rand_ph[k]),
|
||||
noise_level_mant[2 * k]);
|
||||
} else if (harm_index == 0)
|
||||
*ptr_real_buf++ = ixheaacd_add32_sat(signal_real, sine_level);
|
||||
*ptr_real_buf++ = ixheaac_add32_sat(signal_real, sine_level);
|
||||
else
|
||||
*ptr_real_buf++ = ixheaacd_sub32_sat(signal_real, sine_level);
|
||||
*ptr_real_buf++ = ixheaac_sub32_sat(signal_real, sine_level);
|
||||
}
|
||||
} else {
|
||||
for (k = 0; k < num_sub_bands; k++) {
|
||||
signal_real = ixheaacd_mult32x16in32(*ptr_real_buf, *ptr_gain_buf++);
|
||||
signal_real = ixheaac_mult32x16in32(*ptr_real_buf, *ptr_gain_buf++);
|
||||
shift = (*ptr_gain_buf++ - scale_change);
|
||||
|
||||
if (shift > 0)
|
||||
|
|
@ -1600,9 +1600,9 @@ VOID ixheaacd_harm_idx_zerotwolp_dec(WORD32 *ptr_real_buf, WORD16 *ptr_gain_buf,
|
|||
sine_level = (ptr_sine_level_buf[2 * k] << 16);
|
||||
|
||||
if (harm_index == 0)
|
||||
*ptr_real_buf++ = ixheaacd_add32_sat(signal_real, sine_level);
|
||||
*ptr_real_buf++ = ixheaac_add32_sat(signal_real, sine_level);
|
||||
else
|
||||
*ptr_real_buf++ = ixheaacd_sub32_sat(signal_real, sine_level);
|
||||
*ptr_real_buf++ = ixheaac_sub32_sat(signal_real, sine_level);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1620,7 +1620,7 @@ VOID ixheaacd_harm_idx_onethreelp(
|
|||
|
||||
scale_change = scale_change - 1;
|
||||
|
||||
signal_real = ixheaacd_mult32x16in32(*ptr_real_buf, *ptr_gain_buf++);
|
||||
signal_real = ixheaac_mult32x16in32(*ptr_real_buf, *ptr_gain_buf++);
|
||||
shift = (*ptr_gain_buf++ - scale_change);
|
||||
|
||||
if (shift > 0)
|
||||
|
|
@ -1640,28 +1640,28 @@ VOID ixheaacd_harm_idx_onethreelp(
|
|||
tone_count++;
|
||||
} else {
|
||||
if (!noise_absc_flag) {
|
||||
signal_real = ixheaacd_mac16x16in32_shl_sat(
|
||||
signal_real, ixheaacd_extract16h(ptr_rand_ph[k]), *noise_level_mant);
|
||||
signal_real = ixheaac_mac16x16in32_shl_sat(
|
||||
signal_real, ixheaac_extract16h(ptr_rand_ph[k]), *noise_level_mant);
|
||||
}
|
||||
}
|
||||
|
||||
noise_level_mant += 2;
|
||||
temp_mult2 = ixheaacd_mult32x16in32(FACTOR, sine_level_next);
|
||||
temp_mult = ixheaacd_mult32x16in32(FACTOR, sine_level);
|
||||
temp_mult2 = ixheaac_mult32x16in32(FACTOR, sine_level_next);
|
||||
temp_mult = ixheaac_mult32x16in32(FACTOR, sine_level);
|
||||
tmp = noise_e;
|
||||
|
||||
if (tmp > 0) {
|
||||
temp_mult = ixheaacd_shl32(temp_mult, tmp);
|
||||
temp_mult = ixheaac_shl32(temp_mult, tmp);
|
||||
} else {
|
||||
temp_mult = ixheaacd_shr32(temp_mult, -tmp);
|
||||
temp_mult = ixheaac_shr32(temp_mult, -tmp);
|
||||
}
|
||||
|
||||
if (freq_inv_flag < 0) {
|
||||
*(ptr_real_buf - 1) = ixheaacd_add32_sat(*(ptr_real_buf - 1), temp_mult);
|
||||
signal_real = ixheaacd_sub32_sat(signal_real, temp_mult2);
|
||||
*(ptr_real_buf - 1) = ixheaac_add32_sat(*(ptr_real_buf - 1), temp_mult);
|
||||
signal_real = ixheaac_sub32_sat(signal_real, temp_mult2);
|
||||
} else {
|
||||
*(ptr_real_buf - 1) = ixheaacd_sub32_sat(*(ptr_real_buf - 1), temp_mult);
|
||||
signal_real = ixheaacd_add32_sat(signal_real, temp_mult2);
|
||||
*(ptr_real_buf - 1) = ixheaac_sub32_sat(*(ptr_real_buf - 1), temp_mult);
|
||||
signal_real = ixheaac_add32_sat(signal_real, temp_mult2);
|
||||
}
|
||||
*ptr_real_buf++ = signal_real;
|
||||
|
||||
|
|
@ -1671,7 +1671,7 @@ VOID ixheaacd_harm_idx_onethreelp(
|
|||
WORD16 gain_e = *ptr_gain_buf++;
|
||||
WORD32 q_real = *ptr_real_buf;
|
||||
|
||||
signal_real = ixheaacd_mult32x16in32(q_real, gain_m);
|
||||
signal_real = ixheaac_mult32x16in32(q_real, gain_m);
|
||||
|
||||
if ((shift = (gain_e - scale_change)) >= 0)
|
||||
signal_real = (signal_real << shift);
|
||||
|
|
@ -1686,17 +1686,17 @@ VOID ixheaacd_harm_idx_onethreelp(
|
|||
sine_level_next = (ptr_sine_level_buf[2 * (k + 1)]);
|
||||
|
||||
if ((!noise_absc_flag) && (sine_level == 0)) {
|
||||
signal_real = ixheaacd_mac16x16in32_shl_sat(
|
||||
signal_real, ixheaacd_extract16h(ptr_rand_ph[k]), *noise_level_mant);
|
||||
signal_real = ixheaac_mac16x16in32_shl_sat(
|
||||
signal_real, ixheaac_extract16h(ptr_rand_ph[k]), *noise_level_mant);
|
||||
}
|
||||
noise_level_mant += 2;
|
||||
|
||||
if (tone_count <= 16) {
|
||||
WORD32 temp_mult;
|
||||
WORD32 add_sine = ixheaacd_mult32x16in32(
|
||||
FACTOR, ixheaacd_sub16(sine_level_prev, sine_level_next));
|
||||
WORD32 add_sine = ixheaac_mult32x16in32(
|
||||
FACTOR, ixheaac_sub16(sine_level_prev, sine_level_next));
|
||||
temp_mult = add_sine * freq_inv_flag;
|
||||
signal_real = ixheaacd_add32_sat(signal_real, temp_mult);
|
||||
signal_real = ixheaac_add32_sat(signal_real, temp_mult);
|
||||
}
|
||||
*ptr_real_buf++ = signal_real;
|
||||
freq_inv_flag = -(freq_inv_flag);
|
||||
|
|
@ -1706,7 +1706,7 @@ VOID ixheaacd_harm_idx_onethreelp(
|
|||
|
||||
if (num_sub_bands > 0) {
|
||||
WORD32 temp_mult_sine;
|
||||
signal_real = ixheaacd_mult32x16in32(*ptr_real_buf, *ptr_gain_buf++);
|
||||
signal_real = ixheaac_mult32x16in32(*ptr_real_buf, *ptr_gain_buf++);
|
||||
shift = (*ptr_gain_buf - scale_change);
|
||||
|
||||
if (shift > 0)
|
||||
|
|
@ -1714,33 +1714,33 @@ VOID ixheaacd_harm_idx_onethreelp(
|
|||
else
|
||||
signal_real = (signal_real >> -(shift));
|
||||
|
||||
temp_mult_sine = ixheaacd_mult32x16in32(FACTOR, sine_level);
|
||||
temp_mult_sine = ixheaac_mult32x16in32(FACTOR, sine_level);
|
||||
sine_level = sine_level_next;
|
||||
|
||||
if (sine_level != 0) {
|
||||
tone_count++;
|
||||
} else {
|
||||
if (!noise_absc_flag) {
|
||||
signal_real = ixheaacd_mac16x16in32_shl_sat(
|
||||
signal_real, ixheaacd_extract16h(ptr_rand_ph[k]),
|
||||
signal_real = ixheaac_mac16x16in32_shl_sat(
|
||||
signal_real, ixheaac_extract16h(ptr_rand_ph[k]),
|
||||
*noise_level_mant);
|
||||
}
|
||||
}
|
||||
|
||||
if (tone_count <= 16) {
|
||||
temp_mult2 = ixheaacd_mult32x16in32(FACTOR, sine_level);
|
||||
temp_mult2 = ixheaac_mult32x16in32(FACTOR, sine_level);
|
||||
|
||||
if (freq_inv_flag) {
|
||||
*ptr_real_buf++ = ixheaacd_add32_sat(signal_real, temp_mult_sine);
|
||||
*ptr_real_buf++ = ixheaac_add32_sat(signal_real, temp_mult_sine);
|
||||
|
||||
if ((k + sub_band_start) < 62) {
|
||||
*ptr_real_buf = ixheaacd_sub32_sat(*ptr_real_buf, temp_mult2);
|
||||
*ptr_real_buf = ixheaac_sub32_sat(*ptr_real_buf, temp_mult2);
|
||||
}
|
||||
} else {
|
||||
*ptr_real_buf++ = ixheaacd_sub32_sat(signal_real, temp_mult_sine);
|
||||
*ptr_real_buf++ = ixheaac_sub32_sat(signal_real, temp_mult_sine);
|
||||
|
||||
if ((k + sub_band_start) < 62) {
|
||||
*ptr_real_buf = ixheaacd_add32_sat(*ptr_real_buf, temp_mult2);
|
||||
*ptr_real_buf = ixheaac_add32_sat(*ptr_real_buf, temp_mult2);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1763,35 +1763,35 @@ VOID ixheaacd_harm_idx_zerotwo(FLAG noise_absc_flag, WORD16 num_sub_bands,
|
|||
ptr_gain_buf++;
|
||||
|
||||
for (k = 0; k < num_sub_bands; k++) {
|
||||
signal_real = ixheaacd_mult32x16in32(*ptr_real_buf, smoothed_gain[0]);
|
||||
sig_imag = ixheaacd_mult32x16in32(*ptr_imag, smoothed_gain[0]);
|
||||
signal_real = ixheaac_mult32x16in32(*ptr_real_buf, smoothed_gain[0]);
|
||||
sig_imag = ixheaac_mult32x16in32(*ptr_imag, smoothed_gain[0]);
|
||||
|
||||
shift = ixheaacd_sub16(*ptr_gain_buf, scale_change);
|
||||
shift = ixheaac_sub16(*ptr_gain_buf, scale_change);
|
||||
ptr_gain_buf += 2;
|
||||
|
||||
if (shift > 0) {
|
||||
signal_real = ixheaacd_shl32(signal_real, shift);
|
||||
sig_imag = ixheaacd_shl32(sig_imag, shift);
|
||||
signal_real = ixheaac_shl32(signal_real, shift);
|
||||
sig_imag = ixheaac_shl32(sig_imag, shift);
|
||||
} else {
|
||||
shift = -shift;
|
||||
signal_real = ixheaacd_shr32(signal_real, shift);
|
||||
sig_imag = ixheaacd_shr32(sig_imag, shift);
|
||||
signal_real = ixheaac_shr32(signal_real, shift);
|
||||
sig_imag = ixheaac_shr32(sig_imag, shift);
|
||||
}
|
||||
|
||||
ptr_rand_ph++;
|
||||
|
||||
if (*ptr_sine_level_buf != 0) {
|
||||
WORD32 tmp = ixheaacd_sub16(ptr_sine_level_buf[1], noise_e);
|
||||
WORD32 tmp = ixheaac_sub16(ptr_sine_level_buf[1], noise_e);
|
||||
|
||||
if (tmp > 0)
|
||||
sine_level = ixheaacd_shl32(ptr_sine_level_buf[0], tmp);
|
||||
sine_level = ixheaac_shl32(ptr_sine_level_buf[0], tmp);
|
||||
else
|
||||
sine_level = ixheaacd_shr32(ptr_sine_level_buf[0], tmp);
|
||||
sine_level = ixheaac_shr32(ptr_sine_level_buf[0], tmp);
|
||||
|
||||
if (harm_index == 0)
|
||||
*ptr_real_buf = ixheaacd_add32_sat(signal_real, sine_level);
|
||||
*ptr_real_buf = ixheaac_add32_sat(signal_real, sine_level);
|
||||
else
|
||||
*ptr_real_buf = ixheaacd_sub32_sat(signal_real, sine_level);
|
||||
*ptr_real_buf = ixheaac_sub32_sat(signal_real, sine_level);
|
||||
|
||||
*ptr_imag = sig_imag;
|
||||
} else {
|
||||
|
|
@ -1799,10 +1799,10 @@ VOID ixheaacd_harm_idx_zerotwo(FLAG noise_absc_flag, WORD16 num_sub_bands,
|
|||
WORD32 random = *ptr_rand_ph;
|
||||
WORD16 noise = smoothed_noise[0];
|
||||
|
||||
*ptr_real_buf = ixheaacd_mac16x16in32_shl_sat(
|
||||
signal_real, ixheaacd_extract16h(random), noise);
|
||||
*ptr_imag = ixheaacd_mac16x16in32_shl_sat(
|
||||
sig_imag, ixheaacd_extract16l(random), noise);
|
||||
*ptr_real_buf = ixheaac_mac16x16in32_shl_sat(
|
||||
signal_real, ixheaac_extract16h(random), noise);
|
||||
*ptr_imag = ixheaac_mac16x16in32_shl_sat(
|
||||
sig_imag, ixheaac_extract16l(random), noise);
|
||||
} else {
|
||||
*ptr_real_buf = signal_real;
|
||||
*ptr_imag = sig_imag;
|
||||
|
|
@ -1834,37 +1834,37 @@ VOID ixheaacd_harm_idx_onethree(FLAG noise_absc_flag, WORD16 num_sub_bands,
|
|||
if (harm_index == 1) freq_inv_flag = !freq_inv_flag;
|
||||
|
||||
for (k = 0; k < num_sub_bands; k++) {
|
||||
signal_real = ixheaacd_mult32x16in32(*ptr_real_buf, smoothed_gain[0]);
|
||||
sig_imag = ixheaacd_mult32x16in32(*ptr_imag, smoothed_gain[0]);
|
||||
signal_real = ixheaac_mult32x16in32(*ptr_real_buf, smoothed_gain[0]);
|
||||
sig_imag = ixheaac_mult32x16in32(*ptr_imag, smoothed_gain[0]);
|
||||
|
||||
shift = ixheaacd_sub16(*ptr_gain_buf, scale_change);
|
||||
shift = ixheaac_sub16(*ptr_gain_buf, scale_change);
|
||||
ptr_gain_buf += 2;
|
||||
|
||||
if (shift > 0) {
|
||||
signal_real = ixheaacd_shl32(signal_real, shift);
|
||||
sig_imag = ixheaacd_shl32(sig_imag, shift);
|
||||
signal_real = ixheaac_shl32(signal_real, shift);
|
||||
sig_imag = ixheaac_shl32(sig_imag, shift);
|
||||
} else {
|
||||
shift = -shift;
|
||||
signal_real = ixheaacd_shr32(signal_real, shift);
|
||||
sig_imag = ixheaacd_shr32(sig_imag, shift);
|
||||
signal_real = ixheaac_shr32(signal_real, shift);
|
||||
sig_imag = ixheaac_shr32(sig_imag, shift);
|
||||
}
|
||||
|
||||
ptr_rand_ph++;
|
||||
|
||||
if (*ptr_sine_level_buf != 0) {
|
||||
WORD32 tmp = ixheaacd_sub16(ptr_sine_level_buf[1], noise_e);
|
||||
WORD32 tmp = ixheaac_sub16(ptr_sine_level_buf[1], noise_e);
|
||||
|
||||
if (tmp > 0)
|
||||
sine_level = ixheaacd_shl32(ptr_sine_level_buf[0], tmp);
|
||||
sine_level = ixheaac_shl32(ptr_sine_level_buf[0], tmp);
|
||||
else
|
||||
sine_level = ixheaacd_shr32(ptr_sine_level_buf[0], -tmp);
|
||||
sine_level = ixheaac_shr32(ptr_sine_level_buf[0], -tmp);
|
||||
|
||||
*ptr_real_buf = signal_real;
|
||||
|
||||
if (freq_inv_flag) {
|
||||
*ptr_imag = ixheaacd_add32_sat(sig_imag, sine_level);
|
||||
*ptr_imag = ixheaac_add32_sat(sig_imag, sine_level);
|
||||
} else {
|
||||
*ptr_imag = ixheaacd_sub32_sat(sig_imag, sine_level);
|
||||
*ptr_imag = ixheaac_sub32_sat(sig_imag, sine_level);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
|
@ -1872,10 +1872,10 @@ VOID ixheaacd_harm_idx_onethree(FLAG noise_absc_flag, WORD16 num_sub_bands,
|
|||
WORD32 random = *ptr_rand_ph;
|
||||
WORD16 noise = smoothed_noise[0];
|
||||
|
||||
*ptr_real_buf = ixheaacd_mac16x16in32_shl_sat(
|
||||
signal_real, ixheaacd_extract16h(random), noise);
|
||||
*ptr_imag = ixheaacd_mac16x16in32_shl_sat(
|
||||
sig_imag, ixheaacd_extract16l(random), noise);
|
||||
*ptr_real_buf = ixheaac_mac16x16in32_shl_sat(
|
||||
signal_real, ixheaac_extract16h(random), noise);
|
||||
*ptr_imag = ixheaac_mac16x16in32_shl_sat(
|
||||
sig_imag, ixheaac_extract16l(random), noise);
|
||||
} else {
|
||||
*ptr_real_buf = signal_real;
|
||||
*ptr_imag = sig_imag;
|
||||
|
|
|
|||
|
|
@ -20,14 +20,14 @@
|
|||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_sbrdecsettings.h"
|
||||
|
|
@ -40,14 +40,14 @@
|
|||
#include "ixheaacd_env_extr.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_env_dec.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
#include "ixheaacd_basic_funcs.h"
|
||||
#include "ixheaacd_audioobjtypes.h"
|
||||
|
||||
#define add16_m(a, b) ((a) + (b))
|
||||
#define sub16_m(a, b) ((a) - (b))
|
||||
|
||||
#define mult16x16_16(a, b) ixheaacd_mult16((a), (b))
|
||||
#define mult16x16_16(a, b) ixheaac_mult16((a), (b))
|
||||
|
||||
static VOID ixheaacd_dequant_esbr_env_data(FLOAT32 *ptr_env_sf,
|
||||
WORD32 num_env_sf,
|
||||
|
|
@ -166,7 +166,7 @@ VOID ixheaacd_process_del_cod_env_data(
|
|||
if (ixheaacd_drc_offset < 0) {
|
||||
WORD32 tar, index_3;
|
||||
ixheaacd_drc_offset = -ixheaacd_drc_offset;
|
||||
tar = ixheaacd_min32(ixheaacd_drc_offset, band);
|
||||
tar = ixheaac_min32(ixheaacd_drc_offset, band);
|
||||
|
||||
for (band = 0; band < tar; band++) {
|
||||
index_3 = ((band + band) + band);
|
||||
|
|
@ -193,7 +193,7 @@ VOID ixheaacd_process_del_cod_env_data(
|
|||
} else {
|
||||
WORD32 tar, index_2;
|
||||
WORD16 *ptr2 = ptr_prev_env_sf;
|
||||
tar = ixheaacd_min32(ixheaacd_drc_offset, band);
|
||||
tar = ixheaac_min32(ixheaacd_drc_offset, band);
|
||||
for (band = 0; band < tar; band++) {
|
||||
*ptr_env_sf = add16_m(*ptr_env_sf, *ptr2);
|
||||
*ptr2 = *ptr_env_sf;
|
||||
|
|
@ -263,7 +263,7 @@ ixheaacd_wrong_timing_compensate(ia_sbr_header_data_struct *ptr_header_data,
|
|||
delta_exp -= pstr_common_tables->log_dual_is_table[new_len];
|
||||
|
||||
shift = (SHORT_BITS - ENV_EXP_FRACT - 3 - ptr_sbr_data->amp_res);
|
||||
delta_exp = ixheaacd_shr16(delta_exp, (WORD16)shift);
|
||||
delta_exp = ixheaac_shr16(delta_exp, (WORD16)shift);
|
||||
p_frame_info->border_vec[0] = start_pos_est;
|
||||
p_frame_info->noise_border_vec[0] = start_pos_est;
|
||||
|
||||
|
|
@ -546,7 +546,7 @@ VOID ixheaacd_sbr_env_dequant_coup_fix(
|
|||
|
||||
new_right_exp += temp_left_exp - temp_rightplus1_exp + 2;
|
||||
|
||||
new_left_mant = ixheaacd_mult16_shl(temp_right_mant, new_right_mant);
|
||||
new_left_mant = ixheaac_mult16_shl(temp_right_mant, new_right_mant);
|
||||
|
||||
new_left_exp = add16_m(temp_right_exp, new_right_exp);
|
||||
|
||||
|
|
@ -566,7 +566,7 @@ VOID ixheaacd_sbr_env_dequant_coup_fix(
|
|||
sub16_m((WORD16)(*l_data & (WORD16)MASK_FOR_EXP), NOISE_EXP_OFFSET);
|
||||
temp_right_exp = sub16_m(*r_data, 12);
|
||||
|
||||
ixheaacd_fix_mant_exp_add(0x4000, ixheaacd_add16(1, temp_right_exp), 0x4000,
|
||||
ixheaacd_fix_mant_exp_add(0x4000, ixheaac_add16(1, temp_right_exp), 0x4000,
|
||||
1, &temp_right_plus1_mant, &temp_rightplus1_exp);
|
||||
|
||||
new_right_exp = ixheaacd_fix_mant_div(0x4000, temp_right_plus1_mant,
|
||||
|
|
@ -860,7 +860,7 @@ VOID ixheaacd_adj_timeslot(WORD32 *ptr_buf_real, WORD32 *ptr_buf_imag,
|
|||
const WORD32 *ptr_rand_ph_buf;
|
||||
WORD32 factor = 0;
|
||||
|
||||
direct_ratio = ixheaacd_sub16_sat(0x7fff, smooth_ratio);
|
||||
direct_ratio = ixheaac_sub16_sat(0x7fff, smooth_ratio);
|
||||
freq_inv_flag = (sub_band_start & 1);
|
||||
|
||||
scale_change = scale_change - 1;
|
||||
|
|
|
|||
|
|
@ -20,15 +20,15 @@
|
|||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_basic_funcs.h"
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
#include "ixheaacd_ps_dec.h"
|
||||
#include "ixheaacd_env_extr.h"
|
||||
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
|
||||
#include "ixheaacd_pvc_dec.h"
|
||||
|
|
@ -55,6 +55,24 @@
|
|||
|
||||
#include "ixheaacd_audioobjtypes.h"
|
||||
|
||||
|
||||
static const int ixheaacd_ld_env_table_512[LD_ENV_TBL_512][LD_ENV_TBL_SIZE] = {
|
||||
{2, 4, -1, 0}, {2, 5, -1, 0}, {3, 2, 6, 1}, {3, 3, 7, 1},
|
||||
{3, 4, 8, 1}, {3, 5, 9, 1}, {3, 6, 10, 1}, {3, 7, 11, 1},
|
||||
{3, 8, 12, 1}, {3, 9, 13, 1}, {3, 10, 14, 1}, {2, 11, -1, 1},
|
||||
{2, 12, -1, 1}, {2, 13, -1, 1}, {2, 14, -1, 1}, {2, 15, -1, 1},
|
||||
};
|
||||
|
||||
static const int ixheaacd_ld_env_table_480[LD_ENV_TBL_480][LD_ENV_TBL_SIZE] = {
|
||||
{2, 4, -1, 0}, {2, 5, -1, 0}, {3, 2, 6, 1}, {3, 3, 7, 1},
|
||||
{3, 4, 8, 1}, {3, 5, 9, 1}, {3, 6, 10, 1}, {3, 7, 11, 1},
|
||||
{3, 8, 12, 1}, {3, 9, 13, 1}, {2, 10, -1, 1}, {2, 11, -1, 1},
|
||||
{2, 12, -1, 1}, {2, 13, -1, 1}, {2, 14, -1, 1},
|
||||
};
|
||||
|
||||
static const int ixheaacd_ld_env_table_time_slot[LD_ENV_TIME_SLOT] = {
|
||||
8, 5, 0, 0, 0, 0, 0};
|
||||
|
||||
WORD32 ixheaacd_cnt_leading_ones(WORD32 a) {
|
||||
WORD32 count = 0;
|
||||
|
||||
|
|
@ -1436,7 +1454,7 @@ WORD16 ixheaacd_read_sbr_env_data(
|
|||
for (i = 0; i < num_env; i++) {
|
||||
no_band[i] = p_num_sf_bands[*p_freq_res++];
|
||||
ptr_frame_data->num_env_sfac =
|
||||
ixheaacd_add16(ptr_frame_data->num_env_sfac, no_band[i]);
|
||||
ixheaac_add16(ptr_frame_data->num_env_sfac, no_band[i]);
|
||||
}
|
||||
|
||||
if (ptr_frame_data->num_env_sfac > MAX_NUM_ENVELOPE_VALUES) return 0;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
#ifndef IXHEAACD_ENV_EXTR_H
|
||||
#define IXHEAACD_ENV_EXTR_H
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
#define ENV_EXP_FRACT 0
|
||||
|
||||
#define EXP_BITS 6
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@
|
|||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
#include "ixheaacd_sbrdecsettings.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
#include "ixheaacd_lpp_tran.h"
|
||||
#include "ixheaacd_env_extr.h"
|
||||
|
||||
#include "ixheaacd_esbr_rom.h"
|
||||
#include "ixheaac_esbr_rom.h"
|
||||
|
||||
#define ABS(A) fabs(A)
|
||||
|
||||
|
|
@ -293,7 +293,7 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data, FLOAT32
|
|||
if (prev_sbr_mode == ORIG_SBR) noise_absc_flag = 0;
|
||||
|
||||
smooth_length = (noise_absc_flag ? 0 : smoothing_length);
|
||||
smooth_filt = *ixheaacd_fir_table[smooth_length];
|
||||
smooth_filt = *ixheaac_fir_table[smooth_length];
|
||||
|
||||
for (t = start_pos; t < frame_data->sin_len_for_cur_top; t++) {
|
||||
band_loop_end =
|
||||
|
|
@ -394,7 +394,7 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data, FLOAT32
|
|||
p_est += nrg_est_pvc[k][t];
|
||||
}
|
||||
avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
|
||||
g_max = avg_gain * ixheaacd_g_lim_gains[limiter_gains];
|
||||
g_max = avg_gain * ixheaac_g_lim_gains[limiter_gains];
|
||||
g_max > 1.0e5f ? g_max = 1.0e5f : 0;
|
||||
for (k = (*lim_table)[limiter_band][c];
|
||||
k < (*lim_table)[limiter_band][c + 1]; k++) {
|
||||
|
|
@ -510,7 +510,7 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data, FLOAT32
|
|||
p_est += nrg_est_pvc[k][t];
|
||||
}
|
||||
avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
|
||||
g_max = avg_gain * ixheaacd_g_lim_gains[limiter_gains];
|
||||
g_max = avg_gain * ixheaac_g_lim_gains[limiter_gains];
|
||||
g_max > 1.0e5f ? g_max = 1.0e5f : 0;
|
||||
|
||||
for (k = (*lim_table)[limiter_band][c];
|
||||
|
|
@ -580,12 +580,12 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data, FLOAT32
|
|||
|
||||
*ptr_real_buf =
|
||||
*ptr_real_buf * sb_gain +
|
||||
sb_noise * ixheaacd_random_phase[phase_index][0] +
|
||||
nrg_tone_pvc[k][slot_idx] * ixheaacd_hphase_tbl[0][harm_index];
|
||||
sb_noise * ixheaac_random_phase[phase_index][0] +
|
||||
nrg_tone_pvc[k][slot_idx] * ixheaac_hphase_tbl[0][harm_index];
|
||||
*ptr_imag_buf = *ptr_imag_buf * sb_gain +
|
||||
sb_noise * ixheaacd_random_phase[phase_index][1] +
|
||||
sb_noise * ixheaac_random_phase[phase_index][1] +
|
||||
nrg_tone_pvc[k][slot_idx] * freq_inv *
|
||||
ixheaacd_hphase_tbl[1][harm_index];
|
||||
ixheaac_hphase_tbl[1][harm_index];
|
||||
|
||||
ptr_real_buf++;
|
||||
ptr_imag_buf++;
|
||||
|
|
@ -634,7 +634,7 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data, FLOAT32
|
|||
(i == trans_env || i == frame_data->env_short_flag_prev) ? 1 : 0;
|
||||
|
||||
smooth_length = (noise_absc_flag ? 0 : smoothing_length);
|
||||
smooth_filt = *ixheaacd_fir_table[smooth_length];
|
||||
smooth_filt = *ixheaac_fir_table[smooth_length];
|
||||
|
||||
if (sbr_mode == ORIG_SBR) {
|
||||
for (c = 0, o = 0, j = 0; j < num_sf_bands[p_frame_info->freq_res[i]];
|
||||
|
|
@ -712,7 +712,7 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data, FLOAT32
|
|||
p_est += nrg_est[k];
|
||||
}
|
||||
avg_gain = (FLOAT32)sqrt((p_ref + EPS) / (p_est + EPS));
|
||||
g_max = avg_gain * ixheaacd_g_lim_gains[limiter_gains];
|
||||
g_max = avg_gain * ixheaac_g_lim_gains[limiter_gains];
|
||||
g_max > 1.0e5f ? g_max = 1.0e5f : 0;
|
||||
for (k = (*lim_table)[limiter_band][c];
|
||||
k < (*lim_table)[limiter_band][c + 1]; k++) {
|
||||
|
|
@ -772,19 +772,19 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data, FLOAT32
|
|||
|
||||
if (ldmps_present == 1) {
|
||||
*ptr_real_buf = *ptr_real_buf * sb_gain +
|
||||
sb_noise * ixheaacd_random_phase[phase_index][0] +
|
||||
nrg_tone[k] * ixheaacd_hphase_tbl[0][harm_index];
|
||||
sb_noise * ixheaac_random_phase[phase_index][0] +
|
||||
nrg_tone[k] * ixheaac_hphase_tbl[0][harm_index];
|
||||
*ptr_imag_buf =
|
||||
*ptr_imag_buf * sb_gain +
|
||||
sb_noise * ixheaacd_random_phase[phase_index][1] +
|
||||
nrg_tone[k] * freq_inv * ixheaacd_hphase_tbl[1][harm_index];
|
||||
sb_noise * ixheaac_random_phase[phase_index][1] +
|
||||
nrg_tone[k] * freq_inv * ixheaac_hphase_tbl[1][harm_index];
|
||||
|
||||
freq_inv = -freq_inv;
|
||||
} else {
|
||||
*ptr_real_buf = *ptr_real_buf * sb_gain +
|
||||
sb_noise * ixheaacd_random_phase[phase_index][0];
|
||||
sb_noise * ixheaac_random_phase[phase_index][0];
|
||||
*ptr_imag_buf = *ptr_imag_buf * sb_gain +
|
||||
sb_noise * ixheaacd_random_phase[phase_index][1];
|
||||
sb_noise * ixheaac_random_phase[phase_index][1];
|
||||
}
|
||||
|
||||
ptr_real_buf++;
|
||||
|
|
@ -824,9 +824,9 @@ WORD32 ixheaacd_sbr_env_calc(ia_sbr_frame_info_data_struct *frame_data, FLOAT32
|
|||
freq_inv = 1;
|
||||
}
|
||||
for (k = 0; k < num_subbands; k++) {
|
||||
*ptr_real_buf += nrg_tone[k] * ixheaacd_hphase_tbl[0][harm_index];
|
||||
*ptr_real_buf += nrg_tone[k] * ixheaac_hphase_tbl[0][harm_index];
|
||||
*ptr_imag_buf +=
|
||||
nrg_tone[k] * freq_inv * ixheaacd_hphase_tbl[1][harm_index];
|
||||
nrg_tone[k] * freq_inv * ixheaac_hphase_tbl[1][harm_index];
|
||||
|
||||
ptr_real_buf++;
|
||||
ptr_imag_buf++;
|
||||
|
|
@ -1010,7 +1010,7 @@ WORD32 ixheaacd_apply_inter_tes(FLOAT32 *qmf_real1, FLOAT32 *qmf_imag1,
|
|||
FLOAT32 total_power_low = 0.0f, total_power_high_after = 1.0e-6f;
|
||||
FLOAT32 gain[TIMESLOT_BUFFER_SIZE];
|
||||
FLOAT32 gain_adj, gain_adj_2;
|
||||
FLOAT32 gamma = ixheaacd_q_gamma_table[gamma_idx];
|
||||
FLOAT32 gamma = ixheaac_q_gamma_table[gamma_idx];
|
||||
WORD32 i, j;
|
||||
|
||||
if (num_sample > TIMESLOT_BUFFER_SIZE)
|
||||
|
|
|
|||
|
|
@ -18,14 +18,14 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include <string.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_interface.h"
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_drc_data_struct.h"
|
||||
#include "ixheaacd_drc_dec.h"
|
||||
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
#include "ixheaacd_sbrdecsettings.h"
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
#include "ixheaacd_env_extr_part.h"
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
#include "ixheaacd_pvc_dec.h"
|
||||
#include "ixheaacd_sbr_dec.h"
|
||||
#include "ixheaacd_qmf_poly.h"
|
||||
#include "ixheaacd_esbr_rom.h"
|
||||
#include "ixheaac_esbr_rom.h"
|
||||
|
||||
WORD32 ixheaacd_complex_anal_filt(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer) {
|
||||
WORD32 idx;
|
||||
|
|
@ -164,7 +164,7 @@ WORD32 ixheaacd_real_synth_filt(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
FLOAT32 accu_r;
|
||||
WORD32 synth_size = ptr_hbe_txposer->synth_size;
|
||||
FLOAT32 *ptr_cos_tab_trans_qmf =
|
||||
(FLOAT32 *)&ixheaacd_cos_table_trans_qmf[0][0] +
|
||||
(FLOAT32 *)&ixheaac_cos_table_trans_qmf[0][0] +
|
||||
ptr_hbe_txposer->k_start * 32;
|
||||
FLOAT32 *buffer = ptr_hbe_txposer->synth_buf;
|
||||
FLOAT32 *ptr_inp_buf = ptr_hbe_txposer->ptr_input_buf + ptr_hbe_txposer->ana_fft_size[0];
|
||||
|
|
|
|||
|
|
@ -1,83 +0,0 @@
|
|||
/******************************************************************************
|
||||
* *
|
||||
* Copyright (C) 2018 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#ifndef IXHEAACD_ESBR_ROM_H
|
||||
#define IXHEAACD_ESBR_ROM_H
|
||||
|
||||
extern const FLOAT32 ixheaacd_sub_samp_qmf_window_coeff[40 + 80 + 120 + 160 +
|
||||
200 + 240 + 320 + 400 + 440];
|
||||
extern const FLOAT32 ixheaacd_random_phase[512][2];
|
||||
extern const FLOAT32 ixheaacd_hphase_tbl[2][8];
|
||||
|
||||
extern const FLOAT32 ixheaacd_g_lim_gains[4];
|
||||
|
||||
typedef FLOAT32 ia_fir_table_struct[5];
|
||||
extern const ia_fir_table_struct ixheaacd_fir_0;
|
||||
extern const ia_fir_table_struct ixheaacd_fir_1;
|
||||
extern const ia_fir_table_struct ixheaacd_fir_2;
|
||||
extern const ia_fir_table_struct ixheaacd_fir_3;
|
||||
extern const ia_fir_table_struct ixheaacd_fir_4;
|
||||
extern const ia_fir_table_struct *ixheaacd_fir_table[5];
|
||||
extern const FLOAT32 ixheaacd_q_gamma_table[4];
|
||||
extern const WORD32 ixheaacd_start_subband2kL_tbl[33];
|
||||
extern const FLOAT32 ixheaacd_cos_table_trans_qmf[7][32 * 2];
|
||||
|
||||
extern const FLOAT32 ixheaacd_phase_vocoder_cos_table[64];
|
||||
extern const FLOAT32 ixheaacd_phase_vocoder_sin_table[64];
|
||||
extern const FLOAT32 ixheaacd_hbe_post_anal_proc_interp_coeff[4][2];
|
||||
|
||||
extern const FLOAT32 ixheaacd_hbe_x_prod_cos_table_trans_2[2 * (128 + 128)];
|
||||
extern const FLOAT32 ixheaacd_hbe_x_prod_cos_table_trans_3[2 * (128 + 128)];
|
||||
extern const FLOAT32 ixheaacd_hbe_x_prod_cos_table_trans_4[2 * (128 + 128)];
|
||||
extern const FLOAT32 ixheaacd_hbe_x_prod_cos_table_trans_4_1[2 * (128 + 128)];
|
||||
|
||||
extern const FLOAT32 ixheaacd_synth_cos_table_kl_4[16];
|
||||
extern const FLOAT32 ixheaacd_synth_cos_table_kl_8[32];
|
||||
extern const FLOAT32 ixheaacd_synth_cos_table_kl_12[48];
|
||||
extern const FLOAT32 ixheaacd_synth_cos_table_kl_16[64];
|
||||
extern const FLOAT32 ixheaacd_synth_cos_table_kl_20[40 * 20];
|
||||
extern const FLOAT32 ixheaacd_analy_cos_sin_table_kl_8[32];
|
||||
extern const FLOAT32 ixheaacd_analy_cos_sin_table_kl_16[64];
|
||||
extern const FLOAT32 ixheaacd_analy_cos_sin_table_kl_24[96];
|
||||
extern const FLOAT32 ixheaacd_analy_cos_sin_table_kl_32[128];
|
||||
extern const FLOAT32 ixheaacd_analy_cos_sin_table_kl_40[40 * 40 * 2];
|
||||
|
||||
extern const FLOAT32 ixheaacd_dft_hbe_window_ts_12[13];
|
||||
extern const FLOAT32 ixheaacd_dft_hbe_window_ts_18[19];
|
||||
|
||||
extern const FLOAT32 ixheaacd_sine_pi_n_by_1024[1024];
|
||||
extern const FLOAT32 ixheaacd_sine_pi_n_by_960[960];
|
||||
extern const FLOAT32 ixheaacd_sine_pi_n_by_896[896];
|
||||
extern const FLOAT32 ixheaacd_sine_pi_n_by_832[832];
|
||||
extern const FLOAT32 ixheaacd_sine_pi_n_by_768[768];
|
||||
extern const FLOAT32 ixheaacd_sine_pi_n_by_704[704];
|
||||
extern const FLOAT32 ixheaacd_sine_pi_n_by_640[640];
|
||||
extern const FLOAT32 ixheaacd_sine_pi_n_by_576[576];
|
||||
extern const FLOAT32 ixheaacd_sine_pi_by_2_N[];
|
||||
extern const FLOAT32 ixheaacd_sin_cos_448[];
|
||||
extern const FLOAT32 ixheaacd_sin_cos_672[];
|
||||
extern const FLOAT32 ixheaacd_sin_cos_512[];
|
||||
extern const FLOAT32 ixheaacd_sin_cos_576[];
|
||||
extern const FLOAT32 ixheaacd_sin_cos_384[];
|
||||
extern const FLOAT32 ixheaacd_sin_cos_768[];
|
||||
|
||||
extern const FLOAT32 ixheaacd_sel_case[5][8];
|
||||
extern const FLOAT32 ixheaacd_sub_samp_qmf_window_coeff_28_36[280 + 360];
|
||||
extern const FLOAT32 ixheaacd_analy_cos_sin_table_kl_56[56 * 56 * 2];
|
||||
#endif
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_cnst.h"
|
||||
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
#include "ixheaacd_mps_polyphase.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
|
||||
#include "ixheaacd_ec_defines.h"
|
||||
#include "ixheaacd_ec_rom.h"
|
||||
|
|
@ -53,9 +53,9 @@
|
|||
|
||||
#include "ixheaacd_bit_extract.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
|
||||
#include "ixheaacd_func_def.h"
|
||||
|
||||
|
|
@ -333,8 +333,8 @@ VOID ixheaacd_ms_stereo(ia_usac_data_struct *usac_data, WORD32 *r_spec,
|
|||
for (k = 0; k < ptr_sfb_info->sfb_width[sfb]; k++) {
|
||||
temp_r = *r_spec;
|
||||
temp_l = *l_spec;
|
||||
*l_spec = ixheaacd_add32_sat(temp_r, temp_l);
|
||||
*r_spec = ixheaacd_sub32_sat(temp_l, temp_r);
|
||||
*l_spec = ixheaac_add32_sat(temp_r, temp_l);
|
||||
*r_spec = ixheaac_sub32_sat(temp_l, temp_r);
|
||||
r_spec++;
|
||||
l_spec++;
|
||||
}
|
||||
|
|
@ -359,67 +359,67 @@ static VOID ixheaacd_filter_and_add(const WORD32 *in, const WORD32 length,
|
|||
WORD32 i;
|
||||
WORD64 sum;
|
||||
|
||||
sum = ixheaacd_mult32x32in64(in[2], filter[0]);
|
||||
sum = ixheaacd_mac32x32in64(sum, in[1], filter[1]);
|
||||
sum = ixheaacd_mac32x32in64(sum, in[0], filter[2]);
|
||||
sum = ixheaacd_mac32x32in64_n(sum, &in[0], &filter[3], 4);
|
||||
*out = ixheaacd_add32_sat(
|
||||
*out, ixheaacd_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
|
||||
sum = ixheaac_mult32x32in64(in[2], filter[0]);
|
||||
sum = ixheaac_mac32x32in64(sum, in[1], filter[1]);
|
||||
sum = ixheaac_mac32x32in64(sum, in[0], filter[2]);
|
||||
sum = ixheaac_mac32x32in64_n(sum, &in[0], &filter[3], 4);
|
||||
*out = ixheaac_add32_sat(
|
||||
*out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
|
||||
out++;
|
||||
|
||||
sum = ixheaacd_mult32x32in64(in[1], filter[0]);
|
||||
sum = ixheaacd_mac32x32in64(sum, in[0], filter[1]);
|
||||
sum = ixheaacd_mac32x32in64_n(sum, &in[0], &filter[2], 5);
|
||||
*out = ixheaacd_add32_sat(
|
||||
*out, ixheaacd_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
|
||||
sum = ixheaac_mult32x32in64(in[1], filter[0]);
|
||||
sum = ixheaac_mac32x32in64(sum, in[0], filter[1]);
|
||||
sum = ixheaac_mac32x32in64_n(sum, &in[0], &filter[2], 5);
|
||||
*out = ixheaac_add32_sat(
|
||||
*out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
|
||||
out++;
|
||||
|
||||
sum = ixheaacd_mult32x32in64(in[0], filter[0]);
|
||||
sum = ixheaacd_mac32x32in64_n(sum, &in[0], &filter[1], 6);
|
||||
*out = ixheaacd_add32_sat(
|
||||
*out, ixheaacd_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
|
||||
sum = ixheaac_mult32x32in64(in[0], filter[0]);
|
||||
sum = ixheaac_mac32x32in64_n(sum, &in[0], &filter[1], 6);
|
||||
*out = ixheaac_add32_sat(
|
||||
*out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
|
||||
out++;
|
||||
|
||||
for (i = 3; i < length - 4; i += 2) {
|
||||
sum = 0;
|
||||
sum = ixheaacd_mac32x32in64_7(&in[i - 3], filter);
|
||||
*out = ixheaacd_add32_sat(
|
||||
*out, ixheaacd_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
|
||||
sum = ixheaac_mac32x32in64_7(&in[i - 3], filter);
|
||||
*out = ixheaac_add32_sat(
|
||||
*out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
|
||||
out++;
|
||||
|
||||
sum = 0;
|
||||
sum = ixheaacd_mac32x32in64_7(&in[i - 2], filter);
|
||||
*out = ixheaacd_add32_sat(
|
||||
*out, ixheaacd_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
|
||||
sum = ixheaac_mac32x32in64_7(&in[i - 2], filter);
|
||||
*out = ixheaac_add32_sat(
|
||||
*out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
|
||||
out++;
|
||||
}
|
||||
i = length - 3;
|
||||
sum = 0;
|
||||
sum = ixheaacd_mac32x32in64_n(sum, &in[i - 3], filter, 6);
|
||||
sum = ixheaacd_mac32x32in64(sum, in[i + 2], filter[6]);
|
||||
*out = ixheaacd_add32_sat(
|
||||
*out, ixheaacd_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
|
||||
sum = ixheaac_mac32x32in64_n(sum, &in[i - 3], filter, 6);
|
||||
sum = ixheaac_mac32x32in64(sum, in[i + 2], filter[6]);
|
||||
*out = ixheaac_add32_sat(
|
||||
*out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
|
||||
|
||||
out++;
|
||||
i = length - 2;
|
||||
sum = 0;
|
||||
sum = ixheaacd_mac32x32in64_n(sum, &in[i - 3], filter, 5);
|
||||
sum = ixheaacd_mac32x32in64(sum, in[i + 1], filter[5]);
|
||||
sum = ixheaacd_mac32x32in64(sum, in[i], filter[6]);
|
||||
sum = ixheaac_mac32x32in64_n(sum, &in[i - 3], filter, 5);
|
||||
sum = ixheaac_mac32x32in64(sum, in[i + 1], filter[5]);
|
||||
sum = ixheaac_mac32x32in64(sum, in[i], filter[6]);
|
||||
|
||||
*out = ixheaacd_add32_sat(
|
||||
*out, ixheaacd_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
|
||||
*out = ixheaac_add32_sat(
|
||||
*out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_even) >> 15)));
|
||||
out++;
|
||||
|
||||
i = length - 1;
|
||||
sum = 0;
|
||||
sum = ixheaacd_mac32x32in64_n(sum, &in[i - 3], filter, 4);
|
||||
sum = ixheaacd_mac32x32in64(sum, in[i], filter[4]);
|
||||
sum = ixheaacd_mac32x32in64(sum, in[i - 1], filter[5]);
|
||||
sum = ixheaacd_mac32x32in64(sum, in[i - 2], filter[6]);
|
||||
sum = ixheaac_mac32x32in64_n(sum, &in[i - 3], filter, 4);
|
||||
sum = ixheaac_mac32x32in64(sum, in[i], filter[4]);
|
||||
sum = ixheaac_mac32x32in64(sum, in[i - 1], filter[5]);
|
||||
sum = ixheaac_mac32x32in64(sum, in[i - 2], filter[6]);
|
||||
|
||||
*out = ixheaacd_add32_sat(
|
||||
*out, ixheaacd_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
|
||||
*out = ixheaac_add32_sat(
|
||||
*out, ixheaac_sat64_32((((WORD64)sum * (WORD64)factor_odd) >> 15)));
|
||||
}
|
||||
|
||||
static VOID ixheaacd_estimate_dmx_im(const WORD32 *dmx_re,
|
||||
|
|
@ -528,21 +528,21 @@ static VOID ixheaacd_cplx_pred_upmixing(
|
|||
for (grp = 0, i = 0; grp < pstr_sfb_info->num_groups; grp++) {
|
||||
for (grp_len = 0; grp_len < pstr_sfb_info->group_len[grp]; grp_len++) {
|
||||
for (sfb = 0; sfb < pstr_sfb_info->sfb_per_sbk; sfb++) {
|
||||
alpha_q_re_temp = ixheaacd_sat64_32(ixheaacd_mult32x32in64(alpha_q_re[grp][sfb], 1677722));
|
||||
alpha_q_im_temp = ixheaacd_sat64_32(ixheaacd_mult32x32in64(alpha_q_im[grp][sfb], 1677722));
|
||||
alpha_q_re_temp = ixheaac_sat64_32(ixheaac_mult32x32in64(alpha_q_re[grp][sfb], 1677722));
|
||||
alpha_q_im_temp = ixheaac_sat64_32(ixheaac_mult32x32in64(alpha_q_im[grp][sfb], 1677722));
|
||||
if (cplx_pred_used[grp][sfb]) {
|
||||
for (k = 0; k < pstr_sfb_info->sfb_width[sfb]; k++, i++) {
|
||||
WORD32 mid_side = ixheaacd_sub32_sat(
|
||||
ixheaacd_sub32_sat(r_spec[i],
|
||||
(WORD32)((WORD64)ixheaacd_mult32x32in64(
|
||||
WORD32 mid_side = ixheaac_sub32_sat(
|
||||
ixheaac_sub32_sat(r_spec[i],
|
||||
(WORD32)((WORD64)ixheaac_mult32x32in64(
|
||||
alpha_q_re_temp, l_spec[i]) >>
|
||||
24)),
|
||||
(WORD32)((WORD64)ixheaacd_mult32x32in64(alpha_q_im_temp,
|
||||
(WORD32)((WORD64)ixheaac_mult32x32in64(alpha_q_im_temp,
|
||||
dmx_im[i]) >>
|
||||
24));
|
||||
r_spec[i] = ixheaacd_sat64_32((WORD64)factor) *
|
||||
(WORD64)(ixheaacd_sub32_sat(l_spec[i], mid_side));
|
||||
l_spec[i] = ixheaacd_add32_sat(l_spec[i], mid_side);
|
||||
r_spec[i] = ixheaac_sat64_32((WORD64)factor) *
|
||||
(WORD64)(ixheaac_sub32_sat(l_spec[i], mid_side));
|
||||
l_spec[i] = ixheaac_add32_sat(l_spec[i], mid_side);
|
||||
}
|
||||
} else {
|
||||
i += pstr_sfb_info->sfb_width[sfb];
|
||||
|
|
@ -554,17 +554,17 @@ static VOID ixheaacd_cplx_pred_upmixing(
|
|||
for (grp = 0, i = 0; grp < pstr_sfb_info->num_groups; grp++) {
|
||||
for (grp_len = 0; grp_len < pstr_sfb_info->group_len[grp]; grp_len++) {
|
||||
for (sfb = 0; sfb < pstr_sfb_info->sfb_per_sbk; sfb++) {
|
||||
alpha_q_re_temp = ixheaacd_sat64_32(ixheaacd_mult32x32in64(alpha_q_re[grp][sfb], 1677722));
|
||||
alpha_q_re_temp = ixheaac_sat64_32(ixheaac_mult32x32in64(alpha_q_re[grp][sfb], 1677722));
|
||||
if (cplx_pred_used[grp][sfb]) {
|
||||
for (k = 0; k < pstr_sfb_info->sfb_width[sfb]; k++, i++) {
|
||||
WORD32 mid_side = ixheaacd_sub32_sat(
|
||||
r_spec[i], (WORD32)((WORD64)ixheaacd_mult32x32in64(
|
||||
WORD32 mid_side = ixheaac_sub32_sat(
|
||||
r_spec[i], (WORD32)((WORD64)ixheaac_mult32x32in64(
|
||||
alpha_q_re_temp, l_spec[i]) >>
|
||||
24));
|
||||
|
||||
r_spec[i] = ixheaacd_sat64_32((WORD64)factor) *
|
||||
(WORD64)(ixheaacd_sub32_sat(l_spec[i], mid_side));
|
||||
l_spec[i] = ixheaacd_add32_sat(l_spec[i], mid_side);
|
||||
r_spec[i] = ixheaac_sat64_32((WORD64)factor) *
|
||||
(WORD64)(ixheaac_sub32_sat(l_spec[i], mid_side));
|
||||
l_spec[i] = ixheaac_add32_sat(l_spec[i], mid_side);
|
||||
}
|
||||
} else {
|
||||
i += pstr_sfb_info->sfb_width[sfb];
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_interface.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaacd_function_selector.h"
|
||||
|
||||
extern const WORD32 ixheaacd_twiddle_table_fft_32x32[514];
|
||||
|
|
@ -50,7 +50,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_mult32_sat(WORD32 a, WORD32 b) {
|
|||
WORD64 temp_result;
|
||||
|
||||
temp_result = (WORD64)a * (WORD64)b;
|
||||
result = ixheaacd_sat64_32(temp_result >> 31);
|
||||
result = ixheaac_sat64_32(temp_result >> 31);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_mult32_sat(WORD32 a, WORD32 b) {
|
|||
static PLATFORM_INLINE WORD32 ixheaacd_mac32_sat(WORD32 a, WORD32 b, WORD32 c) {
|
||||
WORD32 result;
|
||||
|
||||
result = ixheaacd_add32_sat(a, ixheaacd_mult32_sat(b, c));
|
||||
result = ixheaac_add32_sat(a, ixheaacd_mult32_sat(b, c));
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -876,8 +876,8 @@ VOID ixheaacd_mps_complex_fft(FLOAT32 *xr, FLOAT32 *xi, WORD32 nlength) {
|
|||
WORD32 npoints = nlength;
|
||||
FLOAT32 *ptr_y = y;
|
||||
const FLOAT32 *ptr_w;
|
||||
dig_rev_shift = ixheaacd_norm32(npoints) + 1 - 16;
|
||||
n_stages = 30 - ixheaacd_norm32(npoints);
|
||||
dig_rev_shift = ixheaac_norm32(npoints) + 1 - 16;
|
||||
n_stages = 30 - ixheaac_norm32(npoints);
|
||||
not_power_4 = n_stages & 1;
|
||||
|
||||
n_stages = n_stages >> 1;
|
||||
|
|
@ -1423,8 +1423,8 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
WORD32 n = 0;
|
||||
WORD32 *ptr_y = y;
|
||||
const WORD32 *ptr_w;
|
||||
dig_rev_shift = ixheaacd_norm32(npoints) + 1 - 16;
|
||||
n_stages = 30 - ixheaacd_norm32(npoints);
|
||||
dig_rev_shift = ixheaac_norm32(npoints) + 1 - 16;
|
||||
n_stages = 30 - ixheaac_norm32(npoints);
|
||||
not_power_4 = n_stages & 1;
|
||||
|
||||
n_stages = n_stages >> 1;
|
||||
|
|
@ -1473,23 +1473,23 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x3r = *inp;
|
||||
x3i = *(inp + 1);
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x2r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x2i);
|
||||
x2r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x2r, 1));
|
||||
x2i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x2i, 1));
|
||||
x1r = ixheaacd_add32_sat(x1r, x3r);
|
||||
x1i = ixheaacd_add32_sat(x1i, x3i);
|
||||
x3r = ixheaacd_sub32_sat(x1r, ixheaacd_shl32_sat(x3r, 1));
|
||||
x3i = ixheaacd_sub32_sat(x1i, ixheaacd_shl32_sat(x3i, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x2r);
|
||||
x0i = ixheaac_add32_sat(x0i, x2i);
|
||||
x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
|
||||
x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
|
||||
x1r = ixheaac_add32_sat(x1r, x3r);
|
||||
x1i = ixheaac_add32_sat(x1i, x3i);
|
||||
x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
|
||||
x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x1r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x1i);
|
||||
x1r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x1r, 1));
|
||||
x1i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x1i, 1));
|
||||
x2r = ixheaacd_add32_sat(x2r, x3i);
|
||||
x2i = ixheaacd_sub32_sat(x2i, x3r);
|
||||
x3i = ixheaacd_sub32_sat(x2r, ixheaacd_shl32_sat(x3i, 1));
|
||||
x3r = ixheaacd_add32_sat(x2i, ixheaacd_shl32_sat(x3r, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x1r);
|
||||
x0i = ixheaac_add32_sat(x0i, x1i);
|
||||
x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
|
||||
x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
|
||||
x2r = ixheaac_add32_sat(x2r, x3i);
|
||||
x2i = ixheaac_sub32_sat(x2i, x3r);
|
||||
x3i = ixheaac_sub32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
|
||||
x3r = ixheaac_add32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
|
||||
|
||||
*ptr_y++ = x0r;
|
||||
*ptr_y++ = x0i;
|
||||
|
|
@ -1527,23 +1527,23 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x3i = (*(data + 1));
|
||||
data -= 3 * (del << 1);
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x2r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x2i);
|
||||
x2r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x2r, 1));
|
||||
x2i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x2i, 1));
|
||||
x1r = ixheaacd_add32_sat(x1r, x3r);
|
||||
x1i = ixheaacd_add32_sat(x1i, x3i);
|
||||
x3r = ixheaacd_sub32_sat(x1r, ixheaacd_shl32_sat(x3r, 1));
|
||||
x3i = ixheaacd_sub32_sat(x1i, ixheaacd_shl32_sat(x3i, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x2r);
|
||||
x0i = ixheaac_add32_sat(x0i, x2i);
|
||||
x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
|
||||
x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
|
||||
x1r = ixheaac_add32_sat(x1r, x3r);
|
||||
x1i = ixheaac_add32_sat(x1i, x3i);
|
||||
x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
|
||||
x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x1r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x1i);
|
||||
x1r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x1r, 1));
|
||||
x1i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x1i, 1));
|
||||
x2r = ixheaacd_add32_sat(x2r, x3i);
|
||||
x2i = ixheaacd_sub32_sat(x2i, x3r);
|
||||
x3i = ixheaacd_sub32_sat(x2r, ixheaacd_shl32_sat(x3i, 1));
|
||||
x3r = ixheaacd_add32_sat(x2i, ixheaacd_shl32_sat(x3r, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x1r);
|
||||
x0i = ixheaac_add32_sat(x0i, x1i);
|
||||
x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
|
||||
x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
|
||||
x2r = ixheaac_add32_sat(x2r, x3i);
|
||||
x2i = ixheaac_sub32_sat(x2i, x3r);
|
||||
x3i = ixheaac_sub32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
|
||||
x3r = ixheaac_add32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
|
||||
|
||||
*data = x0r;
|
||||
*(data + 1) = x0i;
|
||||
|
|
@ -1596,17 +1596,17 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x3i = *(data + 1);
|
||||
data -= 3 * (del << 1);
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
ixheaacd_mult32_sat(x1i, w1h));
|
||||
x1i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
|
||||
x1r = tmp;
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x2r, w2l),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x2r, w2l),
|
||||
ixheaacd_mult32_sat(x2i, w2h));
|
||||
x2i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x2r, w2h), x2i, w2l);
|
||||
x2r = tmp;
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x3r, w3l),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x3r, w3l),
|
||||
ixheaacd_mult32_sat(x3i, w3h));
|
||||
x3i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x3r, w3h), x3i, w3l);
|
||||
x3r = tmp;
|
||||
|
|
@ -1614,23 +1614,23 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x0r = (*data);
|
||||
x0i = (*(data + 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x2r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x2i);
|
||||
x2r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x2r, 1));
|
||||
x2i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x2i, 1));
|
||||
x1r = ixheaacd_add32_sat(x1r, x3r);
|
||||
x1i = ixheaacd_add32_sat(x1i, x3i);
|
||||
x3r = ixheaacd_sub32_sat(x1r, ixheaacd_shl32_sat(x3r, 1));
|
||||
x3i = ixheaacd_sub32_sat(x1i, ixheaacd_shl32_sat(x3i, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x2r);
|
||||
x0i = ixheaac_add32_sat(x0i, x2i);
|
||||
x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
|
||||
x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
|
||||
x1r = ixheaac_add32_sat(x1r, x3r);
|
||||
x1i = ixheaac_add32_sat(x1i, x3i);
|
||||
x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
|
||||
x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x1r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x1i);
|
||||
x1r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x1r, 1));
|
||||
x1i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x1i, 1));
|
||||
x2r = ixheaacd_add32_sat(x2r, x3i);
|
||||
x2i = ixheaacd_sub32_sat(x2i, x3r);
|
||||
x3i = ixheaacd_sub32_sat(x2r, ixheaacd_shl32_sat(x3i, 1));
|
||||
x3r = ixheaacd_add32_sat(x2i, ixheaacd_shl32_sat(x3r, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x1r);
|
||||
x0i = ixheaac_add32_sat(x0i, x1i);
|
||||
x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
|
||||
x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
|
||||
x2r = ixheaac_add32_sat(x2r, x3i);
|
||||
x2i = ixheaac_sub32_sat(x2i, x3r);
|
||||
x3i = ixheaac_sub32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
|
||||
x3r = ixheaac_add32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
|
||||
|
||||
*data = x0r;
|
||||
*(data + 1) = x0i;
|
||||
|
|
@ -1676,42 +1676,42 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x3i = *(data + 1);
|
||||
data -= 3 * (del << 1);
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
ixheaacd_mult32_sat(x1i, w1h));
|
||||
x1i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
|
||||
x1r = tmp;
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x2r, w2l),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x2r, w2l),
|
||||
ixheaacd_mult32_sat(x2i, w2h));
|
||||
x2i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x2r, w2h), x2i, w2l);
|
||||
x2r = tmp;
|
||||
|
||||
tmp = ixheaacd_add32_sat(ixheaacd_mult32_sat(x3r, w3h),
|
||||
tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x3r, w3h),
|
||||
ixheaacd_mult32_sat(x3i, w3l));
|
||||
x3i = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x3i, w3h),
|
||||
x3i = ixheaac_sub32_sat(ixheaacd_mult32_sat(x3i, w3h),
|
||||
ixheaacd_mult32_sat(x3r, w3l));
|
||||
x3r = tmp;
|
||||
|
||||
x0r = (*data);
|
||||
x0i = (*(data + 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x2r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x2i);
|
||||
x2r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x2r, 1));
|
||||
x2i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x2i, 1));
|
||||
x1r = ixheaacd_add32_sat(x1r, x3r);
|
||||
x1i = ixheaacd_add32_sat(x1i, x3i);
|
||||
x3r = ixheaacd_sub32_sat(x1r, ixheaacd_shl32_sat(x3r, 1));
|
||||
x3i = ixheaacd_sub32_sat(x1i, ixheaacd_shl32_sat(x3i, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x2r);
|
||||
x0i = ixheaac_add32_sat(x0i, x2i);
|
||||
x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
|
||||
x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
|
||||
x1r = ixheaac_add32_sat(x1r, x3r);
|
||||
x1i = ixheaac_add32_sat(x1i, x3i);
|
||||
x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
|
||||
x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x1r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x1i);
|
||||
x1r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x1r, 1));
|
||||
x1i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x1i, 1));
|
||||
x2r = ixheaacd_add32_sat(x2r, x3i);
|
||||
x2i = ixheaacd_sub32_sat(x2i, x3r);
|
||||
x3i = ixheaacd_sub32_sat(x2r, ixheaacd_shl32_sat(x3i, 1));
|
||||
x3r = ixheaacd_add32_sat(x2i, ixheaacd_shl32_sat(x3r, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x1r);
|
||||
x0i = ixheaac_add32_sat(x0i, x1i);
|
||||
x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
|
||||
x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
|
||||
x2r = ixheaac_add32_sat(x2r, x3i);
|
||||
x2i = ixheaac_sub32_sat(x2i, x3r);
|
||||
x3i = ixheaac_sub32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
|
||||
x3r = ixheaac_add32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
|
||||
|
||||
*data = x0r;
|
||||
*(data + 1) = x0i;
|
||||
|
|
@ -1758,43 +1758,43 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x3i = *(data + 1);
|
||||
data -= 3 * (del << 1);
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
ixheaacd_mult32_sat(x1i, w1h));
|
||||
x1i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
|
||||
x1r = tmp;
|
||||
|
||||
tmp = ixheaacd_add32_sat(ixheaacd_mult32_sat(x2r, w2h),
|
||||
tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x2r, w2h),
|
||||
ixheaacd_mult32_sat(x2i, w2l));
|
||||
x2i = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x2i, w2h),
|
||||
x2i = ixheaac_sub32_sat(ixheaacd_mult32_sat(x2i, w2h),
|
||||
ixheaacd_mult32_sat(x2r, w2l));
|
||||
x2r = tmp;
|
||||
|
||||
tmp = ixheaacd_add32_sat(ixheaacd_mult32_sat(x3r, w3h),
|
||||
tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x3r, w3h),
|
||||
ixheaacd_mult32_sat(x3i, w3l));
|
||||
x3i = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x3i, w3h),
|
||||
x3i = ixheaac_sub32_sat(ixheaacd_mult32_sat(x3i, w3h),
|
||||
ixheaacd_mult32_sat(x3r, w3l));
|
||||
x3r = tmp;
|
||||
|
||||
x0r = (*data);
|
||||
x0i = (*(data + 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x2r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x2i);
|
||||
x2r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x2r, 1));
|
||||
x2i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x2i, 1));
|
||||
x1r = ixheaacd_add32_sat(x1r, x3r);
|
||||
x1i = ixheaacd_add32_sat(x1i, x3i);
|
||||
x3r = ixheaacd_sub32_sat(x1r, ixheaacd_shl32_sat(x3r, 1));
|
||||
x3i = ixheaacd_sub32_sat(x1i, ixheaacd_shl32_sat(x3i, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x2r);
|
||||
x0i = ixheaac_add32_sat(x0i, x2i);
|
||||
x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
|
||||
x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
|
||||
x1r = ixheaac_add32_sat(x1r, x3r);
|
||||
x1i = ixheaac_add32_sat(x1i, x3i);
|
||||
x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
|
||||
x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x1r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x1i);
|
||||
x1r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x1r, 1));
|
||||
x1i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x1i, 1));
|
||||
x2r = ixheaacd_add32_sat(x2r, x3i);
|
||||
x2i = ixheaacd_sub32_sat(x2i, x3r);
|
||||
x3i = ixheaacd_sub32_sat(x2r, ixheaacd_shl32_sat(x3i, 1));
|
||||
x3r = ixheaacd_add32_sat(x2i, ixheaacd_shl32_sat(x3r, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x1r);
|
||||
x0i = ixheaac_add32_sat(x0i, x1i);
|
||||
x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
|
||||
x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
|
||||
x2r = ixheaac_add32_sat(x2r, x3i);
|
||||
x2i = ixheaac_sub32_sat(x2i, x3r);
|
||||
x3i = ixheaac_sub32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
|
||||
x3r = ixheaac_add32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
|
||||
|
||||
*data = x0r;
|
||||
*(data + 1) = x0i;
|
||||
|
|
@ -1841,18 +1841,18 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x3i = *(data + 1);
|
||||
data -= 3 * (del << 1);
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
ixheaacd_mult32_sat(x1i, w1h));
|
||||
x1i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
|
||||
x1r = tmp;
|
||||
|
||||
tmp = ixheaacd_add32_sat(ixheaacd_mult32_sat(x2r, w2h),
|
||||
tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x2r, w2h),
|
||||
ixheaacd_mult32_sat(x2i, w2l));
|
||||
x2i = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x2i, w2h),
|
||||
x2i = ixheaac_sub32_sat(ixheaacd_mult32_sat(x2i, w2h),
|
||||
ixheaacd_mult32_sat(x2r, w2l));
|
||||
x2r = tmp;
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x3i, w3h),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x3i, w3h),
|
||||
ixheaacd_mult32_sat(x3r, w3l));
|
||||
x3i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x3r, w3h), x3i, w3l);
|
||||
x3r = tmp;
|
||||
|
|
@ -1860,23 +1860,23 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x0r = (*data);
|
||||
x0i = (*(data + 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x2r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x2i);
|
||||
x2r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x2r, 1));
|
||||
x2i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x2i, 1));
|
||||
x1r = ixheaacd_add32_sat(x1r, x3r);
|
||||
x1i = ixheaacd_sub32_sat(x1i, x3i);
|
||||
x3r = ixheaacd_sub32_sat(x1r, ixheaacd_shl32_sat(x3r, 1));
|
||||
x3i = ixheaacd_add32_sat(x1i, ixheaacd_shl32_sat(x3i, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x2r);
|
||||
x0i = ixheaac_add32_sat(x0i, x2i);
|
||||
x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
|
||||
x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
|
||||
x1r = ixheaac_add32_sat(x1r, x3r);
|
||||
x1i = ixheaac_sub32_sat(x1i, x3i);
|
||||
x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
|
||||
x3i = ixheaac_add32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x1r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x1i);
|
||||
x1r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x1r, 1));
|
||||
x1i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x1i, 1));
|
||||
x2r = ixheaacd_add32_sat(x2r, x3i);
|
||||
x2i = ixheaacd_sub32_sat(x2i, x3r);
|
||||
x3i = ixheaacd_sub32_sat(x2r, ixheaacd_shl32_sat(x3i, 1));
|
||||
x3r = ixheaacd_add32_sat(x2i, ixheaacd_shl32_sat(x3r, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x1r);
|
||||
x0i = ixheaac_add32_sat(x0i, x1i);
|
||||
x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
|
||||
x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
|
||||
x2r = ixheaac_add32_sat(x2r, x3i);
|
||||
x2i = ixheaac_sub32_sat(x2i, x3r);
|
||||
x3i = ixheaac_sub32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
|
||||
x3r = ixheaac_add32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
|
||||
|
||||
*data = x0r;
|
||||
*(data + 1) = x0i;
|
||||
|
|
@ -1919,7 +1919,7 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x1r = *ptr_y;
|
||||
x1i = *(ptr_y + 1);
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
ixheaacd_mult32_sat(x1i, w1h));
|
||||
x1i = ixheaacd_mac32_sat(ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
|
||||
x1r = tmp;
|
||||
|
|
@ -1946,9 +1946,9 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x1r = *ptr_y;
|
||||
x1i = *(ptr_y + 1);
|
||||
|
||||
tmp = ixheaacd_add32_sat(ixheaacd_mult32_sat(x1r, w1h),
|
||||
tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x1r, w1h),
|
||||
ixheaacd_mult32_sat(x1i, w1l));
|
||||
x1i = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x1i, w1h),
|
||||
x1i = ixheaac_sub32_sat(ixheaacd_mult32_sat(x1i, w1h),
|
||||
ixheaacd_mult32_sat(x1r, w1l));
|
||||
x1r = tmp;
|
||||
|
||||
|
|
@ -1991,23 +1991,23 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x3r = *inp;
|
||||
x3i = *(inp + 1);
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x2r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x2i);
|
||||
x2r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x2r, 1));
|
||||
x2i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x2i, 1));
|
||||
x1r = ixheaacd_add32_sat(x1r, x3r);
|
||||
x1i = ixheaacd_add32_sat(x1i, x3i);
|
||||
x3r = ixheaacd_sub32_sat(x1r, ixheaacd_shl32_sat(x3r, 1));
|
||||
x3i = ixheaacd_sub32_sat(x1i, ixheaacd_shl32_sat(x3i, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x2r);
|
||||
x0i = ixheaac_add32_sat(x0i, x2i);
|
||||
x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
|
||||
x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
|
||||
x1r = ixheaac_add32_sat(x1r, x3r);
|
||||
x1i = ixheaac_add32_sat(x1i, x3i);
|
||||
x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
|
||||
x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x1r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x1i);
|
||||
x1r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x1r, 1));
|
||||
x1i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x1i, 1));
|
||||
x2r = ixheaacd_sub32_sat(x2r, x3i);
|
||||
x2i = ixheaacd_add32_sat(x2i, x3r);
|
||||
x3i = ixheaacd_add32_sat(x2r, ixheaacd_shl32_sat(x3i, 1));
|
||||
x3r = ixheaacd_sub32_sat(x2i, ixheaacd_shl32_sat(x3r, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x1r);
|
||||
x0i = ixheaac_add32_sat(x0i, x1i);
|
||||
x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
|
||||
x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
|
||||
x2r = ixheaac_sub32_sat(x2r, x3i);
|
||||
x2i = ixheaac_add32_sat(x2i, x3r);
|
||||
x3i = ixheaac_add32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
|
||||
x3r = ixheaac_sub32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
|
||||
|
||||
*ptr_y++ = x0r;
|
||||
*ptr_y++ = x0i;
|
||||
|
|
@ -2045,23 +2045,23 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x3i = (*(data + 1));
|
||||
data -= 3 * (del << 1);
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x2r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x2i);
|
||||
x2r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x2r, 1));
|
||||
x2i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x2i, 1));
|
||||
x1r = ixheaacd_add32_sat(x1r, x3r);
|
||||
x1i = ixheaacd_add32_sat(x1i, x3i);
|
||||
x3r = ixheaacd_sub32_sat(x1r, ixheaacd_shl32_sat(x3r, 1));
|
||||
x3i = ixheaacd_sub32_sat(x1i, ixheaacd_shl32_sat(x3i, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x2r);
|
||||
x0i = ixheaac_add32_sat(x0i, x2i);
|
||||
x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
|
||||
x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
|
||||
x1r = ixheaac_add32_sat(x1r, x3r);
|
||||
x1i = ixheaac_add32_sat(x1i, x3i);
|
||||
x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
|
||||
x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x1r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x1i);
|
||||
x1r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x1r, 1));
|
||||
x1i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x1i, 1));
|
||||
x2r = ixheaacd_sub32_sat(x2r, x3i);
|
||||
x2i = ixheaacd_add32_sat(x2i, x3r);
|
||||
x3i = ixheaacd_add32_sat(x2r, ixheaacd_shl32_sat(x3i, 1));
|
||||
x3r = ixheaacd_sub32_sat(x2i, ixheaacd_shl32_sat(x3r, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x1r);
|
||||
x0i = ixheaac_add32_sat(x0i, x1i);
|
||||
x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
|
||||
x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
|
||||
x2r = ixheaac_sub32_sat(x2r, x3i);
|
||||
x2i = ixheaac_add32_sat(x2i, x3r);
|
||||
x3i = ixheaac_add32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
|
||||
x3r = ixheaac_sub32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
|
||||
|
||||
*data = x0r;
|
||||
*(data + 1) = x0i;
|
||||
|
|
@ -2114,17 +2114,17 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x3i = *(data + 1);
|
||||
data -= 3 * (del << 1);
|
||||
|
||||
tmp = ixheaacd_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
ixheaacd_mult32_sat(x1i, w1h));
|
||||
x1i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
|
||||
x1r = tmp;
|
||||
|
||||
tmp = ixheaacd_add32_sat(ixheaacd_mult32_sat(x2r, w2l),
|
||||
tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x2r, w2l),
|
||||
ixheaacd_mult32_sat(x2i, w2h));
|
||||
x2i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x2r, w2h), x2i, w2l);
|
||||
x2r = tmp;
|
||||
|
||||
tmp = ixheaacd_add32_sat(ixheaacd_mult32_sat(x3r, w3l),
|
||||
tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x3r, w3l),
|
||||
ixheaacd_mult32_sat(x3i, w3h));
|
||||
x3i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x3r, w3h), x3i, w3l);
|
||||
x3r = tmp;
|
||||
|
|
@ -2132,23 +2132,23 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x0r = (*data);
|
||||
x0i = (*(data + 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x2r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x2i);
|
||||
x2r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x2r, 1));
|
||||
x2i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x2i, 1));
|
||||
x1r = ixheaacd_add32_sat(x1r, x3r);
|
||||
x1i = ixheaacd_add32_sat(x1i, x3i);
|
||||
x3r = ixheaacd_sub32_sat(x1r, ixheaacd_shl32_sat(x3r, 1));
|
||||
x3i = ixheaacd_sub32_sat(x1i, ixheaacd_shl32_sat(x3i, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x2r);
|
||||
x0i = ixheaac_add32_sat(x0i, x2i);
|
||||
x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
|
||||
x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
|
||||
x1r = ixheaac_add32_sat(x1r, x3r);
|
||||
x1i = ixheaac_add32_sat(x1i, x3i);
|
||||
x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
|
||||
x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x1r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x1i);
|
||||
x1r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x1r, 1));
|
||||
x1i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x1i, 1));
|
||||
x2r = ixheaacd_sub32_sat(x2r, x3i);
|
||||
x2i = ixheaacd_add32_sat(x2i, x3r);
|
||||
x3i = ixheaacd_add32_sat(x2r, ixheaacd_shl32_sat(x3i, 1));
|
||||
x3r = ixheaacd_sub32_sat(x2i, ixheaacd_shl32_sat(x3r, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x1r);
|
||||
x0i = ixheaac_add32_sat(x0i, x1i);
|
||||
x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
|
||||
x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
|
||||
x2r = ixheaac_sub32_sat(x2r, x3i);
|
||||
x2i = ixheaac_add32_sat(x2i, x3r);
|
||||
x3i = ixheaac_add32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
|
||||
x3r = ixheaac_sub32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
|
||||
|
||||
*data = x0r;
|
||||
*(data + 1) = x0i;
|
||||
|
|
@ -2195,42 +2195,42 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x3i = *(data + 1);
|
||||
data -= 3 * (del << 1);
|
||||
|
||||
tmp = ixheaacd_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
ixheaacd_mult32_sat(x1i, w1h));
|
||||
x1i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
|
||||
x1r = tmp;
|
||||
|
||||
tmp = ixheaacd_add32_sat(ixheaacd_mult32_sat(x2r, w2l),
|
||||
tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x2r, w2l),
|
||||
ixheaacd_mult32_sat(x2i, w2h));
|
||||
x2i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x2r, w2h), x2i, w2l);
|
||||
x2r = tmp;
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x3r, w3h),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x3r, w3h),
|
||||
ixheaacd_mult32_sat(x3i, w3l));
|
||||
x3i = ixheaacd_add32_sat(ixheaacd_mult32_sat(x3r, w3l),
|
||||
x3i = ixheaac_add32_sat(ixheaacd_mult32_sat(x3r, w3l),
|
||||
ixheaacd_mult32_sat(x3i, w3h));
|
||||
x3r = tmp;
|
||||
|
||||
x0r = (*data);
|
||||
x0i = (*(data + 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x2r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x2i);
|
||||
x2r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x2r, 1));
|
||||
x2i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x2i, 1));
|
||||
x1r = ixheaacd_add32_sat(x1r, x3r);
|
||||
x1i = ixheaacd_add32_sat(x1i, x3i);
|
||||
x3r = ixheaacd_sub32_sat(x1r, ixheaacd_shl32_sat(x3r, 1));
|
||||
x3i = ixheaacd_sub32_sat(x1i, ixheaacd_shl32_sat(x3i, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x2r);
|
||||
x0i = ixheaac_add32_sat(x0i, x2i);
|
||||
x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
|
||||
x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
|
||||
x1r = ixheaac_add32_sat(x1r, x3r);
|
||||
x1i = ixheaac_add32_sat(x1i, x3i);
|
||||
x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
|
||||
x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x1r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x1i);
|
||||
x1r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x1r, 1));
|
||||
x1i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x1i, 1));
|
||||
x2r = ixheaacd_sub32_sat(x2r, x3i);
|
||||
x2i = ixheaacd_add32_sat(x2i, x3r);
|
||||
x3i = ixheaacd_add32_sat(x2r, ixheaacd_shl32_sat(x3i, 1));
|
||||
x3r = ixheaacd_sub32_sat(x2i, ixheaacd_shl32_sat(x3r, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x1r);
|
||||
x0i = ixheaac_add32_sat(x0i, x1i);
|
||||
x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
|
||||
x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
|
||||
x2r = ixheaac_sub32_sat(x2r, x3i);
|
||||
x2i = ixheaac_add32_sat(x2i, x3r);
|
||||
x3i = ixheaac_add32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
|
||||
x3r = ixheaac_sub32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
|
||||
|
||||
*data = x0r;
|
||||
*(data + 1) = x0i;
|
||||
|
|
@ -2277,43 +2277,43 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x3i = *(data + 1);
|
||||
data -= 3 * (del << 1);
|
||||
|
||||
tmp = ixheaacd_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
ixheaacd_mult32_sat(x1i, w1h));
|
||||
x1i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
|
||||
x1r = tmp;
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x2r, w2h),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x2r, w2h),
|
||||
ixheaacd_mult32_sat(x2i, w2l));
|
||||
x2i = ixheaacd_add32_sat(ixheaacd_mult32_sat(x2r, w2l),
|
||||
x2i = ixheaac_add32_sat(ixheaacd_mult32_sat(x2r, w2l),
|
||||
ixheaacd_mult32_sat(x2i, w2h));
|
||||
x2r = tmp;
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x3r, w3h),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x3r, w3h),
|
||||
ixheaacd_mult32_sat(x3i, w3l));
|
||||
x3i = ixheaacd_add32_sat(ixheaacd_mult32_sat(x3r, w3l),
|
||||
x3i = ixheaac_add32_sat(ixheaacd_mult32_sat(x3r, w3l),
|
||||
ixheaacd_mult32_sat(x3i, w3h));
|
||||
x3r = tmp;
|
||||
|
||||
x0r = (*data);
|
||||
x0i = (*(data + 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x2r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x2i);
|
||||
x2r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x2r, 1));
|
||||
x2i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x2i, 1));
|
||||
x1r = ixheaacd_add32_sat(x1r, x3r);
|
||||
x1i = ixheaacd_add32_sat(x1i, x3i);
|
||||
x3r = ixheaacd_sub32_sat(x1r, ixheaacd_shl32_sat(x3r, 1));
|
||||
x3i = ixheaacd_sub32_sat(x1i, ixheaacd_shl32_sat(x3i, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x2r);
|
||||
x0i = ixheaac_add32_sat(x0i, x2i);
|
||||
x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
|
||||
x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
|
||||
x1r = ixheaac_add32_sat(x1r, x3r);
|
||||
x1i = ixheaac_add32_sat(x1i, x3i);
|
||||
x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
|
||||
x3i = ixheaac_sub32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x1r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x1i);
|
||||
x1r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x1r, 1));
|
||||
x1i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x1i, 1));
|
||||
x2r = ixheaacd_sub32_sat(x2r, x3i);
|
||||
x2i = ixheaacd_add32_sat(x2i, x3r);
|
||||
x3i = ixheaacd_add32_sat(x2r, ixheaacd_shl32_sat(x3i, 1));
|
||||
x3r = ixheaacd_sub32_sat(x2i, ixheaacd_shl32_sat(x3r, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x1r);
|
||||
x0i = ixheaac_add32_sat(x0i, x1i);
|
||||
x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
|
||||
x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
|
||||
x2r = ixheaac_sub32_sat(x2r, x3i);
|
||||
x2i = ixheaac_add32_sat(x2i, x3r);
|
||||
x3i = ixheaac_add32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
|
||||
x3r = ixheaac_sub32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
|
||||
|
||||
*data = x0r;
|
||||
*(data + 1) = x0i;
|
||||
|
|
@ -2360,18 +2360,18 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x3i = *(data + 1);
|
||||
data -= 3 * (del << 1);
|
||||
|
||||
tmp = ixheaacd_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
ixheaacd_mult32_sat(x1i, w1h));
|
||||
x1i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
|
||||
x1r = tmp;
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x2r, w2h),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x2r, w2h),
|
||||
ixheaacd_mult32_sat(x2i, w2l));
|
||||
x2i = ixheaacd_add32_sat(ixheaacd_mult32_sat(x2r, w2l),
|
||||
x2i = ixheaac_add32_sat(ixheaacd_mult32_sat(x2r, w2l),
|
||||
ixheaacd_mult32_sat(x2i, w2h));
|
||||
x2r = tmp;
|
||||
|
||||
tmp = -ixheaacd_add32_sat(ixheaacd_mult32_sat(x3r, w3l),
|
||||
tmp = -ixheaac_add32_sat(ixheaacd_mult32_sat(x3r, w3l),
|
||||
ixheaacd_mult32_sat(x3i, w3h));
|
||||
x3i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x3r, w3h), x3i, w3l);
|
||||
x3r = tmp;
|
||||
|
|
@ -2379,23 +2379,23 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x0r = (*data);
|
||||
x0i = (*(data + 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x2r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x2i);
|
||||
x2r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x2r, 1));
|
||||
x2i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x2i, 1));
|
||||
x1r = ixheaacd_add32_sat(x1r, x3r);
|
||||
x1i = ixheaacd_sub32_sat(x1i, x3i);
|
||||
x3r = ixheaacd_sub32_sat(x1r, ixheaacd_shl32_sat(x3r, 1));
|
||||
x3i = ixheaacd_add32_sat(x1i, ixheaacd_shl32_sat(x3i, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x2r);
|
||||
x0i = ixheaac_add32_sat(x0i, x2i);
|
||||
x2r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x2r, 1));
|
||||
x2i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x2i, 1));
|
||||
x1r = ixheaac_add32_sat(x1r, x3r);
|
||||
x1i = ixheaac_sub32_sat(x1i, x3i);
|
||||
x3r = ixheaac_sub32_sat(x1r, ixheaac_shl32_sat(x3r, 1));
|
||||
x3i = ixheaac_add32_sat(x1i, ixheaac_shl32_sat(x3i, 1));
|
||||
|
||||
x0r = ixheaacd_add32_sat(x0r, x1r);
|
||||
x0i = ixheaacd_add32_sat(x0i, x1i);
|
||||
x1r = ixheaacd_sub32_sat(x0r, ixheaacd_shl32_sat(x1r, 1));
|
||||
x1i = ixheaacd_sub32_sat(x0i, ixheaacd_shl32_sat(x1i, 1));
|
||||
x2r = ixheaacd_sub32_sat(x2r, x3i);
|
||||
x2i = ixheaacd_add32_sat(x2i, x3r);
|
||||
x3i = ixheaacd_add32_sat(x2r, ixheaacd_shl32_sat(x3i, 1));
|
||||
x3r = ixheaacd_sub32_sat(x2i, ixheaacd_shl32_sat(x3r, 1));
|
||||
x0r = ixheaac_add32_sat(x0r, x1r);
|
||||
x0i = ixheaac_add32_sat(x0i, x1i);
|
||||
x1r = ixheaac_sub32_sat(x0r, ixheaac_shl32_sat(x1r, 1));
|
||||
x1i = ixheaac_sub32_sat(x0i, ixheaac_shl32_sat(x1i, 1));
|
||||
x2r = ixheaac_sub32_sat(x2r, x3i);
|
||||
x2i = ixheaac_add32_sat(x2i, x3r);
|
||||
x3i = ixheaac_add32_sat(x2r, ixheaac_shl32_sat(x3i, 1));
|
||||
x3r = ixheaac_sub32_sat(x2i, ixheaac_shl32_sat(x3r, 1));
|
||||
|
||||
*data = x0r;
|
||||
*(data + 1) = x0i;
|
||||
|
|
@ -2438,7 +2438,7 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x1r = *ptr_y;
|
||||
x1i = *(ptr_y + 1);
|
||||
|
||||
tmp = ixheaacd_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
ixheaacd_mult32_sat(x1i, w1h));
|
||||
x1i = ixheaacd_mac32_sat(-ixheaacd_mult32_sat(x1r, w1h), x1i, w1l);
|
||||
x1r = tmp;
|
||||
|
|
@ -2465,9 +2465,9 @@ VOID ixheaacd_complex_fft_p2_dec(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
x1r = *ptr_y;
|
||||
x1i = *(ptr_y + 1);
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(x1r, w1h),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(x1r, w1h),
|
||||
ixheaacd_mult32_sat(x1i, w1l));
|
||||
x1i = ixheaacd_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
x1i = ixheaac_add32_sat(ixheaacd_mult32_sat(x1r, w1l),
|
||||
ixheaacd_mult32_sat(x1i, w1h));
|
||||
x1r = tmp;
|
||||
|
||||
|
|
@ -2502,28 +2502,28 @@ static PLATFORM_INLINE void ixheaacd_complex_3point_fft(WORD32 *inp, WORD32 *op,
|
|||
WORD32 sinmu;
|
||||
sinmu = -1859775393 * sign_dir;
|
||||
|
||||
temp_real = ixheaacd_add32_sat(inp[0], inp[2]);
|
||||
temp_imag = ixheaacd_add32_sat(inp[1], inp[3]);
|
||||
temp_real = ixheaac_add32_sat(inp[0], inp[2]);
|
||||
temp_imag = ixheaac_add32_sat(inp[1], inp[3]);
|
||||
|
||||
add_r = ixheaacd_add32_sat(inp[2], inp[4]);
|
||||
add_i = ixheaacd_add32_sat(inp[3], inp[5]);
|
||||
add_r = ixheaac_add32_sat(inp[2], inp[4]);
|
||||
add_i = ixheaac_add32_sat(inp[3], inp[5]);
|
||||
|
||||
sub_r = ixheaacd_sub32_sat(inp[2], inp[4]);
|
||||
sub_i = ixheaacd_sub32_sat(inp[3], inp[5]);
|
||||
sub_r = ixheaac_sub32_sat(inp[2], inp[4]);
|
||||
sub_i = ixheaac_sub32_sat(inp[3], inp[5]);
|
||||
|
||||
p1 = add_r >> 1;
|
||||
p4 = add_i >> 1;
|
||||
p2 = ixheaacd_mult32_shl(sub_i, sinmu);
|
||||
p3 = ixheaacd_mult32_shl(sub_r, sinmu);
|
||||
p2 = ixheaac_mult32_shl(sub_i, sinmu);
|
||||
p3 = ixheaac_mult32_shl(sub_r, sinmu);
|
||||
|
||||
temp = ixheaacd_sub32(inp[0], p1);
|
||||
temp = ixheaac_sub32(inp[0], p1);
|
||||
|
||||
op[0] = ixheaacd_add32_sat(temp_real, inp[4]);
|
||||
op[1] = ixheaacd_add32_sat(temp_imag, inp[5]);
|
||||
op[2] = ixheaacd_add32_sat(temp, p2);
|
||||
op[3] = ixheaacd_sub32_sat(ixheaacd_sub32_sat(inp[1], p3), p4);
|
||||
op[4] = ixheaacd_sub32_sat(temp, p2);
|
||||
op[5] = ixheaacd_sub32_sat(ixheaacd_add32_sat(inp[1], p3), p4);
|
||||
op[0] = ixheaac_add32_sat(temp_real, inp[4]);
|
||||
op[1] = ixheaac_add32_sat(temp_imag, inp[5]);
|
||||
op[2] = ixheaac_add32_sat(temp, p2);
|
||||
op[3] = ixheaac_sub32_sat(ixheaac_sub32_sat(inp[1], p3), p4);
|
||||
op[4] = ixheaac_sub32_sat(temp, p2);
|
||||
op[5] = ixheaac_sub32_sat(ixheaac_add32_sat(inp[1], p3), p4);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -2591,20 +2591,20 @@ VOID ixheaacd_complex_fft_p3(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
w1r++;
|
||||
w1i++;
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 2], (*w1r)),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 2], (*w1r)),
|
||||
ixheaacd_mult32_sat(ptr_x[2 * i + 3], (*w1i)));
|
||||
ptr_x[2 * i + 3] =
|
||||
ixheaacd_add32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 2], (*w1i)),
|
||||
ixheaac_add32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 2], (*w1i)),
|
||||
ixheaacd_mult32_sat(ptr_x[2 * i + 3], (*w1r)));
|
||||
ptr_x[2 * i + 2] = tmp;
|
||||
|
||||
w1r++;
|
||||
w1i++;
|
||||
|
||||
tmp = ixheaacd_sub32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 4], (*w1r)),
|
||||
tmp = ixheaac_sub32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 4], (*w1r)),
|
||||
ixheaacd_mult32_sat(ptr_x[2 * i + 5], (*w1i)));
|
||||
ptr_x[2 * i + 5] =
|
||||
ixheaacd_add32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 4], (*w1i)),
|
||||
ixheaac_add32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 4], (*w1i)),
|
||||
ixheaacd_mult32_sat(ptr_x[2 * i + 5], (*w1r)));
|
||||
ptr_x[2 * i + 4] = tmp;
|
||||
|
||||
|
|
@ -2618,20 +2618,20 @@ VOID ixheaacd_complex_fft_p3(WORD32 *xr, WORD32 *xi, WORD32 nlength,
|
|||
w1r++;
|
||||
w1i++;
|
||||
|
||||
tmp = ixheaacd_add32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 2], (*w1r)),
|
||||
tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 2], (*w1r)),
|
||||
ixheaacd_mult32_sat(ptr_x[2 * i + 3], (*w1i)));
|
||||
ptr_x[2 * i + 3] =
|
||||
ixheaacd_sub32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 3], (*w1r)),
|
||||
ixheaac_sub32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 3], (*w1r)),
|
||||
ixheaacd_mult32_sat(ptr_x[2 * i + 2], (*w1i)));
|
||||
ptr_x[2 * i + 2] = tmp;
|
||||
|
||||
w1r++;
|
||||
w1i++;
|
||||
|
||||
tmp = ixheaacd_add32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 4], (*w1r)),
|
||||
tmp = ixheaac_add32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 4], (*w1r)),
|
||||
ixheaacd_mult32_sat(ptr_x[2 * i + 5], (*w1i)));
|
||||
ptr_x[2 * i + 5] =
|
||||
ixheaacd_sub32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 5], (*w1r)),
|
||||
ixheaac_sub32_sat(ixheaacd_mult32_sat(ptr_x[2 * i + 5], (*w1r)),
|
||||
ixheaacd_mult32_sat(ptr_x[2 * i + 4], (*w1i)));
|
||||
ptr_x[2 * i + 4] = tmp;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@
|
|||
*/
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_fft_ifft_rom.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_fft_ifft_rom.h"
|
||||
#include "ixheaacd_dsp_fft32x32s.h"
|
||||
|
||||
#define DIG_REV(i, m, j) \
|
||||
|
|
@ -262,13 +262,13 @@ VOID ixheaacd_hbe_apply_cfftn(FLOAT32 re[], FLOAT32 *scratch, WORD32 n_pass, WOR
|
|||
FLOAT32 *y = scratch + (2 * n_pass);
|
||||
FLOAT32 *ptr_y = y;
|
||||
|
||||
dig_rev_shift = ixheaacd_norm32(mpass) + 1 - 16;
|
||||
n_stages = 30 - ixheaacd_norm32(mpass);
|
||||
dig_rev_shift = ixheaac_norm32(mpass) + 1 - 16;
|
||||
n_stages = 30 - ixheaac_norm32(mpass);
|
||||
not_power_4 = n_stages & 1;
|
||||
|
||||
n_stages = n_stages >> 1;
|
||||
|
||||
ptr_w = ixheaacd_twid_tbl_fft_double;
|
||||
ptr_w = ixheaac_twid_tbl_fft_double;
|
||||
ptr_x = re;
|
||||
|
||||
if (i_sign == -1) {
|
||||
|
|
@ -1347,8 +1347,8 @@ VOID ixheaacd_hbe_apply_cfftn_gen(FLOAT32 re[], FLOAT32 *scratch, WORD32 n_pass,
|
|||
{
|
||||
FLOAT64 *w1r, *w1i;
|
||||
FLOAT32 tmp;
|
||||
w1r = (FLOAT64 *)ixheaacd_twid_tbl_fft_ntwt3r;
|
||||
w1i = (FLOAT64 *)ixheaacd_twid_tbl_fft_ntwt3i;
|
||||
w1r = (FLOAT64 *)ixheaac_twid_tbl_fft_ntwt3r;
|
||||
w1i = (FLOAT64 *)ixheaac_twid_tbl_fft_ntwt3i;
|
||||
|
||||
if (i_sign < 0) {
|
||||
|
||||
|
|
@ -1457,7 +1457,7 @@ VOID ixheaacd_hbe_apply_fft_288(FLOAT32 *inp, FLOAT32 *scratch, WORD32 len, WORD
|
|||
}
|
||||
}
|
||||
|
||||
ixheaacd_hbe_apply_tw_mult_fft(inp, op, fpoints, mpoints, ixheaacd_twid_tbl_fft_288);
|
||||
ixheaacd_hbe_apply_tw_mult_fft(inp, op, fpoints, mpoints, ixheaac_twid_tbl_fft_288);
|
||||
|
||||
for (ii = 0; ii < fpoints; ii++) {
|
||||
ixheaacd_hbe_apply_fft_3(op, scratch, i_sign);
|
||||
|
|
@ -1505,7 +1505,7 @@ VOID ixheaacd_hbe_apply_ifft_224(FLOAT32 *inp, FLOAT32 *scratch, WORD32 len, WOR
|
|||
}
|
||||
}
|
||||
|
||||
ixheaacd_hbe_apply_tw_mult_ifft(inp, op, fpoints, mpoints, ixheaacd_twid_tbl_fft_224);
|
||||
ixheaacd_hbe_apply_tw_mult_ifft(inp, op, fpoints, mpoints, ixheaac_twid_tbl_fft_224);
|
||||
|
||||
for (ii = 0; ii < fpoints; ii++) {
|
||||
ixheaacd_hbe_apply_ifft_7(op, scratch);
|
||||
|
|
@ -1559,10 +1559,10 @@ VOID ixheaacd_hbe_apply_ifft_336(FLOAT32 *inp, FLOAT32 *ptr_scratch, WORD32 len,
|
|||
|
||||
if (m_points == 48)
|
||||
ixheaacd_hbe_apply_tw_mult_ifft(inp, p_scratch, n_points, m_points,
|
||||
ixheaacd_twid_tbl_fft_336);
|
||||
ixheaac_twid_tbl_fft_336);
|
||||
else
|
||||
ixheaacd_hbe_apply_tw_mult_ifft(inp, p_scratch, n_points, m_points,
|
||||
ixheaacd_twid_tbl_fft_168);
|
||||
ixheaac_twid_tbl_fft_168);
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
ptr_real[2 * i + 0] = p_scratch[2 * i + 0];
|
||||
|
|
|
|||
|
|
@ -22,15 +22,15 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_basic_funcs.h"
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
#include "ixheaacd_ps_dec.h"
|
||||
#include "ixheaacd_env_extr.h"
|
||||
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
#include "ixheaacd_env_extr.h"
|
||||
#include "ixheaacd_freq_sca.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
|
|
@ -224,7 +224,7 @@ ixheaacd_calc_stop_band(WORD32 fs, const WORD32 stop_freq, FLOAT32 upsamp_fac) {
|
|||
|
||||
result = k1_min;
|
||||
for (i = 0; i < stop_freq; i++) {
|
||||
result = ixheaacd_add32_sat(result, arr_diff_stop_freq[i]);
|
||||
result = ixheaac_add32_sat(result, arr_diff_stop_freq[i]);
|
||||
}
|
||||
|
||||
return (result);
|
||||
|
|
@ -514,8 +514,8 @@ static WORD16 ixheaacd_calc_freq_ratio(WORD16 k_start, WORD16 k_stop,
|
|||
bandfactor = 0x3f000000L;
|
||||
step = 0x20000000L;
|
||||
direction = 1;
|
||||
start = ixheaacd_shl32(ixheaacd_deposit16l_in32(k_start), INT_BITS - 8);
|
||||
stop = ixheaacd_shl32(ixheaacd_deposit16l_in32(k_stop), INT_BITS - 8);
|
||||
start = ixheaac_shl32(ixheaac_deposit16l_in32(k_start), INT_BITS - 8);
|
||||
stop = ixheaac_shl32(ixheaac_deposit16l_in32(k_stop), INT_BITS - 8);
|
||||
|
||||
i = 0;
|
||||
|
||||
|
|
@ -524,17 +524,17 @@ static WORD16 ixheaacd_calc_freq_ratio(WORD16 k_start, WORD16 k_stop,
|
|||
temp = stop;
|
||||
|
||||
for (j = 0; j < num_bands; j++)
|
||||
temp = ixheaacd_mult16x16in32_shl(ixheaacd_extract16h(temp),
|
||||
ixheaacd_extract16h(bandfactor));
|
||||
temp = ixheaac_mult16x16in32_shl(ixheaac_extract16h(temp),
|
||||
ixheaac_extract16h(bandfactor));
|
||||
|
||||
if (temp < start) {
|
||||
if (direction == 0) step = ixheaacd_shr32(step, 1);
|
||||
if (direction == 0) step = ixheaac_shr32(step, 1);
|
||||
direction = 1;
|
||||
bandfactor = ixheaacd_add32_sat(bandfactor, step);
|
||||
bandfactor = ixheaac_add32_sat(bandfactor, step);
|
||||
} else {
|
||||
if (direction == 1) step = ixheaacd_shr32(step, 1);
|
||||
if (direction == 1) step = ixheaac_shr32(step, 1);
|
||||
direction = 0;
|
||||
bandfactor = ixheaacd_sub32_sat(bandfactor, step);
|
||||
bandfactor = ixheaac_sub32_sat(bandfactor, step);
|
||||
}
|
||||
|
||||
if (i > 100) {
|
||||
|
|
@ -542,7 +542,7 @@ static WORD16 ixheaacd_calc_freq_ratio(WORD16 k_start, WORD16 k_stop,
|
|||
}
|
||||
} while (step > 0);
|
||||
|
||||
return ixheaacd_extract16h(bandfactor);
|
||||
return ixheaac_extract16h(bandfactor);
|
||||
}
|
||||
|
||||
VOID ixheaacd_calc_bands(WORD16 *diff, WORD16 start, WORD16 stop,
|
||||
|
|
@ -554,15 +554,15 @@ VOID ixheaacd_calc_bands(WORD16 *diff, WORD16 start, WORD16 stop,
|
|||
WORD16 bandfactor = ixheaacd_calc_freq_ratio(start, stop, num_bands);
|
||||
|
||||
previous = stop;
|
||||
exact = ixheaacd_shl32_sat(ixheaacd_deposit16l_in32(stop), INT_BITS - 8);
|
||||
exact = ixheaac_shl32_sat(ixheaac_deposit16l_in32(stop), INT_BITS - 8);
|
||||
|
||||
for (i = num_bands - 1; i >= 0; i--) {
|
||||
exact = ixheaacd_mult16x16in32(ixheaacd_extract16h(exact), bandfactor);
|
||||
exact = ixheaac_mult16x16in32(ixheaac_extract16h(exact), bandfactor);
|
||||
|
||||
temp = ixheaacd_add32_sat(exact, 0x00400000);
|
||||
temp = ixheaac_add32_sat(exact, 0x00400000);
|
||||
exact = exact << 1;
|
||||
|
||||
current = ixheaacd_extract16l(ixheaacd_shr32(temp, (INT_BITS - 9)));
|
||||
current = ixheaac_extract16l(ixheaac_shr32(temp, (INT_BITS - 9)));
|
||||
|
||||
diff[i] = sub_d(previous, current);
|
||||
previous = current;
|
||||
|
|
@ -685,7 +685,7 @@ WORD32 ixheaacd_calc_frq_bnd_tbls(ia_sbr_header_data_struct *ptr_header_data,
|
|||
num_lf_bands = pstr_freq_band_data->num_sf_bands[LOW];
|
||||
|
||||
if ((num_lf_bands <= 0) ||
|
||||
(num_lf_bands > ixheaacd_shr16(MAX_FREQ_COEFFS, 1))) {
|
||||
(num_lf_bands > ixheaac_shr16(MAX_FREQ_COEFFS, 1))) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,9 +23,9 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_sbrdecsettings.h"
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_interface.h"
|
||||
#include "ixheaacd_tns_usac.h"
|
||||
|
|
@ -35,15 +35,15 @@
|
|||
#include "ixheaacd_drc_dec.h"
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
#include "ixheaacd_mps_polyphase.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
#include "ixheaacd_ec_defines.h"
|
||||
#include "ixheaacd_ec_struct_def.h"
|
||||
#include "ixheaacd_main.h"
|
||||
#include "ixheaacd_arith_dec.h"
|
||||
#include "ixheaacd_windows.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaacd_func_def.h"
|
||||
#include "ixheaacd_acelp_com.h"
|
||||
|
||||
|
|
@ -77,14 +77,14 @@ static VOID ixheaacd_synthesis_tool(WORD32 a[], WORD32 x[], WORD32 l,
|
|||
for (i = 0; i < l; i++) {
|
||||
s = x[i];
|
||||
for (j = 1; j <= ORDER; j += 4) {
|
||||
s = ixheaacd_sub32_sat(
|
||||
s, ixheaacd_mul32_sh(a[j], x[i - j], (WORD8)(qshift)));
|
||||
s = ixheaacd_sub32_sat(
|
||||
s, ixheaacd_mul32_sh(a[j + 1], x[i - (j + 1)], (WORD8)(qshift)));
|
||||
s = ixheaacd_sub32_sat(
|
||||
s, ixheaacd_mul32_sh(a[j + 2], x[i - (j + 2)], (WORD8)(qshift)));
|
||||
s = ixheaacd_sub32_sat(
|
||||
s, ixheaacd_mul32_sh(a[j + 3], x[i - (j + 3)], (WORD8)(qshift)));
|
||||
s = ixheaac_sub32_sat(
|
||||
s, ixheaac_mul32_sh(a[j], x[i - j], (WORD8)(qshift)));
|
||||
s = ixheaac_sub32_sat(
|
||||
s, ixheaac_mul32_sh(a[j + 1], x[i - (j + 1)], (WORD8)(qshift)));
|
||||
s = ixheaac_sub32_sat(
|
||||
s, ixheaac_mul32_sh(a[j + 2], x[i - (j + 2)], (WORD8)(qshift)));
|
||||
s = ixheaac_sub32_sat(
|
||||
s, ixheaac_mul32_sh(a[j + 3], x[i - (j + 3)], (WORD8)(qshift)));
|
||||
}
|
||||
x[i] = s;
|
||||
}
|
||||
|
|
@ -128,9 +128,9 @@ VOID ixheaacd_fwd_alias_cancel_tool(
|
|||
fac_signal[i] = (WORD32)(ptr_fac_signal_flt[i] * (1 << (16 - qshift)));
|
||||
|
||||
for (i = 0; i < fac_length; i++)
|
||||
ptr_overlap_buf[i] = ixheaacd_add32_sat(
|
||||
ptr_overlap_buf[i] = ixheaac_add32_sat(
|
||||
ptr_overlap_buf[i],
|
||||
(WORD32)ixheaacd_mul32_sh(fac_signal[i], gain, (WORD8)(16 - qshift)));
|
||||
(WORD32)ixheaac_mul32_sh(fac_signal[i], gain, (WORD8)(16 - qshift)));
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -179,16 +179,16 @@ VOID ixheaacd_fr_alias_cnx_fix(WORD32 *x_in, WORD32 len, WORD32 fac_length,
|
|||
WORD32 temp1;
|
||||
WORD32 temp2;
|
||||
|
||||
temp1 = ixheaacd_mul32_sh(
|
||||
temp1 = ixheaac_mul32_sh(
|
||||
izir[1 + (len / 2) + i], fac_window[fac_length + i],
|
||||
(char)((qshift3 - *qshift1 + 31 + (WORD8)(*preshift))));
|
||||
|
||||
temp2 = ixheaacd_mul32_sh(
|
||||
temp2 = ixheaac_mul32_sh(
|
||||
izir[1 + (len / 2) - 1 - i], fac_window[fac_length - 1 - i],
|
||||
(char)((qshift3 - *qshift1 + 31 + (WORD8)(*preshift))));
|
||||
|
||||
fac_data_out[i] =
|
||||
ixheaacd_add32_sat3((fac_data_out[i] / 2), temp1, temp2);
|
||||
ixheaac_add32_sat3((fac_data_out[i] / 2), temp1, temp2);
|
||||
|
||||
fac_data_out[fac_length + i] = (fac_data_out[fac_length + i] / 2);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
#include "ixheaacd_drc_dec.h"
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
#include "ixheaacd_mps_polyphase.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
|
||||
#include "ixheaacd_env_extr_part.h"
|
||||
#include "ixheaacd_sbr_rom.h"
|
||||
|
|
@ -56,53 +56,53 @@
|
|||
#include "ixheaacd_pvc_dec.h"
|
||||
|
||||
#include "ixheaacd_sbr_dec.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
#include "ixheaacd_sbrqmftrans.h"
|
||||
#include "ixheaacd_qmf_poly.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
|
||||
#include "ixheaacd_esbr_rom.h"
|
||||
#include "ixheaac_esbr_rom.h"
|
||||
|
||||
static FLOAT32 *ixheaacd_map_prot_filter(WORD32 filt_length) {
|
||||
switch (filt_length) {
|
||||
case 4:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[0];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[0];
|
||||
break;
|
||||
case 8:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[40];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[40];
|
||||
break;
|
||||
case 12:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[120];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[120];
|
||||
break;
|
||||
case 16:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[240];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[240];
|
||||
break;
|
||||
case 20:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[400];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[400];
|
||||
break;
|
||||
case 24:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[600];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[600];
|
||||
break;
|
||||
case 28:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff_28_36[0];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff_28_36[0];
|
||||
break;
|
||||
case 32:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[840];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[840];
|
||||
break;
|
||||
case 36:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff_28_36[280];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff_28_36[280];
|
||||
break;
|
||||
case 40:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[1160];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[1160];
|
||||
break;
|
||||
case 44:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[1560];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[1560];
|
||||
break;
|
||||
default:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[0];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -112,9 +112,9 @@ static VOID ixheaacd_create_dft_hbe_window(FLOAT32 *win, WORD32 x_over_bin1,
|
|||
const FLOAT32 *ptr_freq_domain_win = NULL;
|
||||
WORD32 n;
|
||||
if (ts == 12) {
|
||||
ptr_freq_domain_win = &ixheaacd_dft_hbe_window_ts_12[0];
|
||||
ptr_freq_domain_win = &ixheaac_dft_hbe_window_ts_12[0];
|
||||
} else {
|
||||
ptr_freq_domain_win = &ixheaacd_dft_hbe_window_ts_18[0];
|
||||
ptr_freq_domain_win = &ixheaac_dft_hbe_window_ts_18[0];
|
||||
}
|
||||
for (n = 0; n < (x_over_bin1 - ts / 2); n++) {
|
||||
win[n] = 0;
|
||||
|
|
@ -147,114 +147,114 @@ static WORD32 ixheaacd_calc_anal_synth_window(WORD32 fft_size, FLOAT32 *ptr_wind
|
|||
switch (fft_size) {
|
||||
case 64:
|
||||
hop_stride = 16;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_1024[0];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_1024[0];
|
||||
sin_pi_2_N = ptr_sin_pi_n_by_N[hop_stride >> 1];
|
||||
cos_pi_2_N = ptr_sin_pi_n_by_N[512 + (hop_stride >> 1)];
|
||||
l_fft_stride = 512;
|
||||
break;
|
||||
case 128:
|
||||
hop_stride = 8;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_1024[0];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_1024[0];
|
||||
sin_pi_2_N = ptr_sin_pi_n_by_N[hop_stride >> 1];
|
||||
cos_pi_2_N = ptr_sin_pi_n_by_N[512 + (hop_stride >> 1)];
|
||||
l_fft_stride = 512;
|
||||
break;
|
||||
case 256:
|
||||
hop_stride = 4;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_1024[0];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_1024[0];
|
||||
sin_pi_2_N = ptr_sin_pi_n_by_N[hop_stride >> 1];
|
||||
cos_pi_2_N = ptr_sin_pi_n_by_N[512 + (hop_stride >> 1)];
|
||||
l_fft_stride = 512;
|
||||
break;
|
||||
case 512:
|
||||
hop_stride = 2;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_1024[0];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_1024[0];
|
||||
sin_pi_2_N = ptr_sin_pi_n_by_N[1];
|
||||
cos_pi_2_N = ptr_sin_pi_n_by_N[512 + 1];
|
||||
l_fft_stride = 512;
|
||||
break;
|
||||
case 1024:
|
||||
hop_stride = 1;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_1024[0];
|
||||
sin_pi_2_N = ixheaacd_sine_pi_by_2_N[0];
|
||||
cos_pi_2_N = ixheaacd_sine_pi_by_2_N[1];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_1024[0];
|
||||
sin_pi_2_N = ixheaac_sine_pi_by_2_N[0];
|
||||
cos_pi_2_N = ixheaac_sine_pi_by_2_N[1];
|
||||
l_fft_stride = 512;
|
||||
break;
|
||||
case 192:
|
||||
hop_stride = 4;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_768[0];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_768[0];
|
||||
sin_pi_2_N = ptr_sin_pi_n_by_N[hop_stride >> 1];
|
||||
cos_pi_2_N = ptr_sin_pi_n_by_N[384 + (hop_stride >> 1)];
|
||||
l_fft_stride = 384;
|
||||
break;
|
||||
case 384:
|
||||
hop_stride = 2;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_768[0];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_768[0];
|
||||
sin_pi_2_N = ptr_sin_pi_n_by_N[1];
|
||||
cos_pi_2_N = ptr_sin_pi_n_by_N[384 + 1];
|
||||
l_fft_stride = 384;
|
||||
break;
|
||||
case 768:
|
||||
hop_stride = 1;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_768[0];
|
||||
sin_pi_2_N = ixheaacd_sine_pi_by_2_N[8];
|
||||
cos_pi_2_N = ixheaacd_sine_pi_by_2_N[9];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_768[0];
|
||||
sin_pi_2_N = ixheaac_sine_pi_by_2_N[8];
|
||||
cos_pi_2_N = ixheaac_sine_pi_by_2_N[9];
|
||||
l_fft_stride = 384;
|
||||
break;
|
||||
case 320:
|
||||
hop_stride = 3;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_960[0];
|
||||
sin_pi_2_N = ixheaacd_sine_pi_by_2_N[16];
|
||||
cos_pi_2_N = ixheaacd_sine_pi_by_2_N[17];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_960[0];
|
||||
sin_pi_2_N = ixheaac_sine_pi_by_2_N[16];
|
||||
cos_pi_2_N = ixheaac_sine_pi_by_2_N[17];
|
||||
l_fft_stride = 480;
|
||||
break;
|
||||
case 960:
|
||||
hop_stride = 1;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_960[0];
|
||||
sin_pi_2_N = ixheaacd_sine_pi_by_2_N[2];
|
||||
cos_pi_2_N = ixheaacd_sine_pi_by_2_N[3];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_960[0];
|
||||
sin_pi_2_N = ixheaac_sine_pi_by_2_N[2];
|
||||
cos_pi_2_N = ixheaac_sine_pi_by_2_N[3];
|
||||
l_fft_stride = 480;
|
||||
break;
|
||||
case 448:
|
||||
hop_stride = 2;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_896[0];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_896[0];
|
||||
sin_pi_2_N = ptr_sin_pi_n_by_N[1];
|
||||
cos_pi_2_N = ptr_sin_pi_n_by_N[448 + 1];
|
||||
l_fft_stride = 448;
|
||||
break;
|
||||
case 896:
|
||||
hop_stride = 1;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_896[0];
|
||||
sin_pi_2_N = ixheaacd_sine_pi_by_2_N[4];
|
||||
cos_pi_2_N = ixheaacd_sine_pi_by_2_N[5];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_896[0];
|
||||
sin_pi_2_N = ixheaac_sine_pi_by_2_N[4];
|
||||
cos_pi_2_N = ixheaac_sine_pi_by_2_N[5];
|
||||
l_fft_stride = 448;
|
||||
break;
|
||||
case 576:
|
||||
hop_stride = 1;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_576[0];
|
||||
sin_pi_2_N = ixheaacd_sine_pi_by_2_N[14];
|
||||
cos_pi_2_N = ixheaacd_sine_pi_by_2_N[15];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_576[0];
|
||||
sin_pi_2_N = ixheaac_sine_pi_by_2_N[14];
|
||||
cos_pi_2_N = ixheaac_sine_pi_by_2_N[15];
|
||||
l_fft_stride = 288;
|
||||
break;
|
||||
case 640:
|
||||
hop_stride = 1;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_640[0];
|
||||
sin_pi_2_N = ixheaacd_sine_pi_by_2_N[12];
|
||||
cos_pi_2_N = ixheaacd_sine_pi_by_2_N[13];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_640[0];
|
||||
sin_pi_2_N = ixheaac_sine_pi_by_2_N[12];
|
||||
cos_pi_2_N = ixheaac_sine_pi_by_2_N[13];
|
||||
l_fft_stride = 320;
|
||||
break;
|
||||
case 704:
|
||||
hop_stride = 1;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_704[0];
|
||||
sin_pi_2_N = ixheaacd_sine_pi_by_2_N[10];
|
||||
cos_pi_2_N = ixheaacd_sine_pi_by_2_N[11];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_704[0];
|
||||
sin_pi_2_N = ixheaac_sine_pi_by_2_N[10];
|
||||
cos_pi_2_N = ixheaac_sine_pi_by_2_N[11];
|
||||
l_fft_stride = 352;
|
||||
break;
|
||||
case 832:
|
||||
hop_stride = 1;
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaacd_sine_pi_n_by_832[0];
|
||||
sin_pi_2_N = ixheaacd_sine_pi_by_2_N[6];
|
||||
cos_pi_2_N = ixheaacd_sine_pi_by_2_N[7];
|
||||
ptr_sin_pi_n_by_N = (FLOAT32 *)&ixheaac_sine_pi_n_by_832[0];
|
||||
sin_pi_2_N = ixheaac_sine_pi_by_2_N[6];
|
||||
cos_pi_2_N = ixheaac_sine_pi_by_2_N[7];
|
||||
l_fft_stride = 416;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -292,7 +292,7 @@ WORD32 ixheaacd_dft_hbe_data_reinit(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
ptr_hbe_txposer->esbr_hq = 1;
|
||||
|
||||
ptr_hbe_txposer->synth_size = 4 * ((ptr_hbe_txposer->start_band + 4) / 8 + 1);
|
||||
ptr_hbe_txposer->k_start = ixheaacd_start_subband2kL_tbl[ptr_hbe_txposer->start_band];
|
||||
ptr_hbe_txposer->k_start = ixheaac_start_subband2kL_tbl[ptr_hbe_txposer->start_band];
|
||||
|
||||
fb_ratio = ptr_hbe_txposer->synth_size / 32.0f;
|
||||
|
||||
|
|
@ -345,30 +345,30 @@ WORD32 ixheaacd_dft_hbe_data_reinit(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
|
||||
switch (ptr_hbe_txposer->synth_size) {
|
||||
case 4:
|
||||
ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaacd_synth_cos_table_kl_4;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaacd_real_synth_fft_p2;
|
||||
ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaac_synth_cos_table_kl_4;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p2;
|
||||
break;
|
||||
case 8:
|
||||
ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaacd_synth_cos_table_kl_8;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaacd_real_synth_fft_p2;
|
||||
ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaac_synth_cos_table_kl_8;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p2;
|
||||
break;
|
||||
case 12:
|
||||
ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaacd_synth_cos_table_kl_12;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaacd_real_synth_fft_p3;
|
||||
ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaac_synth_cos_table_kl_12;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p3;
|
||||
break;
|
||||
case 16:
|
||||
ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaacd_synth_cos_table_kl_16;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaacd_real_synth_fft_p2;
|
||||
ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaac_synth_cos_table_kl_16;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p2;
|
||||
break;
|
||||
case 20:
|
||||
ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaacd_synth_cos_table_kl_20;
|
||||
ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaac_synth_cos_table_kl_20;
|
||||
break;
|
||||
case 28:
|
||||
ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaacd_synth_cos_table_kl_20;
|
||||
ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaac_synth_cos_table_kl_20;
|
||||
break;
|
||||
default:
|
||||
ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaacd_synth_cos_table_kl_4;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaacd_real_synth_fft_p2;
|
||||
ptr_hbe_txposer->synth_cos_tab = (FLOAT32 *)ixheaac_synth_cos_table_kl_4;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p2;
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -488,16 +488,16 @@ VOID ixheaacd_hbe_fft_table(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer) {
|
|||
|
||||
switch (ana_fft_size) {
|
||||
case 576:
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_576;
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_576;
|
||||
break;
|
||||
case 384:
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_384;
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_384;
|
||||
break;
|
||||
case 512:
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_512;
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_512;
|
||||
break;
|
||||
case 768:
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_768;
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_768;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -505,16 +505,16 @@ VOID ixheaacd_hbe_fft_table(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer) {
|
|||
|
||||
switch (syn_fft_size) {
|
||||
case 448:
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_448;
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_448;
|
||||
break;
|
||||
case 512:
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_512;
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_512;
|
||||
break;
|
||||
case 768:
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_768;
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_768;
|
||||
break;
|
||||
case 672:
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_672;
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_672;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -528,19 +528,19 @@ IA_ERRORCODE ixheaacd_hbe_fft_map(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer) {
|
|||
|
||||
switch (ana_fft_size) {
|
||||
case 576:
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_576;
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_576;
|
||||
ptr_hbe_txposer->ixheaacd_hbe_anal_fft = &ixheaacd_hbe_apply_fft_288;
|
||||
break;
|
||||
case 384:
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_384;
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_384;
|
||||
ptr_hbe_txposer->ixheaacd_hbe_anal_fft = &ixheaacd_hbe_apply_cfftn_gen;
|
||||
break;
|
||||
case 512:
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_512;
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_512;
|
||||
ptr_hbe_txposer->ixheaacd_hbe_anal_fft = &ixheaacd_hbe_apply_cfftn;
|
||||
break;
|
||||
case 768:
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_768;
|
||||
ptr_hbe_txposer->ana_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_768;
|
||||
ptr_hbe_txposer->ixheaacd_hbe_anal_fft = &ixheaacd_hbe_apply_cfftn_gen;
|
||||
break;
|
||||
default:
|
||||
|
|
@ -550,19 +550,19 @@ IA_ERRORCODE ixheaacd_hbe_fft_map(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer) {
|
|||
|
||||
switch (syn_fft_size) {
|
||||
case 448:
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_448;
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_448;
|
||||
ptr_hbe_txposer->ixheaacd_hbe_synth_ifft = &ixheaacd_hbe_apply_ifft_224;
|
||||
break;
|
||||
case 512:
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_512;
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_512;
|
||||
ptr_hbe_txposer->ixheaacd_hbe_synth_ifft = &ixheaacd_hbe_apply_cfftn;
|
||||
break;
|
||||
case 768:
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_768;
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_768;
|
||||
ptr_hbe_txposer->ixheaacd_hbe_synth_ifft = &ixheaacd_hbe_apply_cfftn_gen;
|
||||
break;
|
||||
case 672:
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaacd_sin_cos_672;
|
||||
ptr_hbe_txposer->syn_cos_sin_tab = (FLOAT32 *)ixheaac_sin_cos_672;
|
||||
ptr_hbe_txposer->ixheaacd_hbe_synth_ifft = &ixheaacd_hbe_apply_ifft_336;
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
#include "ixheaacd_drc_dec.h"
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
#include "ixheaacd_mps_polyphase.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
|
||||
#include "ixheaacd_env_extr_part.h"
|
||||
#include "ixheaacd_sbr_rom.h"
|
||||
|
|
@ -56,46 +56,46 @@
|
|||
#include "ixheaacd_pvc_dec.h"
|
||||
|
||||
#include "ixheaacd_sbr_dec.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
#include "ixheaacd_sbrqmftrans.h"
|
||||
#include "ixheaacd_qmf_poly.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
|
||||
#include "ixheaacd_esbr_rom.h"
|
||||
#include "ixheaac_esbr_rom.h"
|
||||
|
||||
#define SBR_CONST_PMIN 1.0f
|
||||
|
||||
static FLOAT32 *ixheaacd_map_prot_filter(WORD32 filt_length) {
|
||||
switch (filt_length) {
|
||||
case 4:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[0];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[0];
|
||||
break;
|
||||
case 8:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[40];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[40];
|
||||
break;
|
||||
case 12:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[120];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[120];
|
||||
break;
|
||||
case 16:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[240];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[240];
|
||||
break;
|
||||
case 20:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[400];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[400];
|
||||
break;
|
||||
case 24:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[600];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[600];
|
||||
break;
|
||||
case 32:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[840];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[840];
|
||||
break;
|
||||
case 40:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[1160];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[1160];
|
||||
break;
|
||||
default:
|
||||
return (FLOAT32 *)&ixheaacd_sub_samp_qmf_window_coeff[0];
|
||||
return (FLOAT32 *)&ixheaac_sub_samp_qmf_window_coeff[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ WORD32 ixheaacd_qmf_hbe_data_reinit(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
ptr_hbe_txposer->synth_size =
|
||||
4 * ((ptr_hbe_txposer->start_band + 4) / 8 + 1);
|
||||
ptr_hbe_txposer->k_start =
|
||||
ixheaacd_start_subband2kL_tbl[ptr_hbe_txposer->start_band];
|
||||
ixheaac_start_subband2kL_tbl[ptr_hbe_txposer->start_band];
|
||||
|
||||
ptr_hbe_txposer->upsamp_4_flag = upsamp_4_flag;
|
||||
ptr_hbe_txposer->esbr_hq = 0;
|
||||
|
|
@ -130,49 +130,49 @@ WORD32 ixheaacd_qmf_hbe_data_reinit(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
switch (synth_size) {
|
||||
case 4:
|
||||
ptr_hbe_txposer->synth_cos_tab =
|
||||
(FLOAT32 *)ixheaacd_synth_cos_table_kl_4;
|
||||
(FLOAT32 *)ixheaac_synth_cos_table_kl_4;
|
||||
ptr_hbe_txposer->analy_cos_sin_tab =
|
||||
(FLOAT32 *)ixheaacd_analy_cos_sin_table_kl_8;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaacd_real_synth_fft_p2;
|
||||
ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaacd_cmplx_anal_fft_p2;
|
||||
(FLOAT32 *)ixheaac_analy_cos_sin_table_kl_8;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p2;
|
||||
ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaac_cmplx_anal_fft_p2;
|
||||
break;
|
||||
case 8:
|
||||
ptr_hbe_txposer->synth_cos_tab =
|
||||
(FLOAT32 *)ixheaacd_synth_cos_table_kl_8;
|
||||
(FLOAT32 *)ixheaac_synth_cos_table_kl_8;
|
||||
ptr_hbe_txposer->analy_cos_sin_tab =
|
||||
(FLOAT32 *)ixheaacd_analy_cos_sin_table_kl_16;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaacd_real_synth_fft_p2;
|
||||
ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaacd_cmplx_anal_fft_p2;
|
||||
(FLOAT32 *)ixheaac_analy_cos_sin_table_kl_16;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p2;
|
||||
ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaac_cmplx_anal_fft_p2;
|
||||
break;
|
||||
case 12:
|
||||
ptr_hbe_txposer->synth_cos_tab =
|
||||
(FLOAT32 *)ixheaacd_synth_cos_table_kl_12;
|
||||
(FLOAT32 *)ixheaac_synth_cos_table_kl_12;
|
||||
ptr_hbe_txposer->analy_cos_sin_tab =
|
||||
(FLOAT32 *)ixheaacd_analy_cos_sin_table_kl_24;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaacd_real_synth_fft_p3;
|
||||
ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaacd_cmplx_anal_fft_p3;
|
||||
(FLOAT32 *)ixheaac_analy_cos_sin_table_kl_24;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p3;
|
||||
ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaac_cmplx_anal_fft_p3;
|
||||
break;
|
||||
case 16:
|
||||
ptr_hbe_txposer->synth_cos_tab =
|
||||
(FLOAT32 *)ixheaacd_synth_cos_table_kl_16;
|
||||
(FLOAT32 *)ixheaac_synth_cos_table_kl_16;
|
||||
ptr_hbe_txposer->analy_cos_sin_tab =
|
||||
(FLOAT32 *)ixheaacd_analy_cos_sin_table_kl_32;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaacd_real_synth_fft_p2;
|
||||
ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaacd_cmplx_anal_fft_p2;
|
||||
(FLOAT32 *)ixheaac_analy_cos_sin_table_kl_32;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p2;
|
||||
ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaac_cmplx_anal_fft_p2;
|
||||
break;
|
||||
case 20:
|
||||
ptr_hbe_txposer->synth_cos_tab =
|
||||
(FLOAT32 *)ixheaacd_synth_cos_table_kl_20;
|
||||
(FLOAT32 *)ixheaac_synth_cos_table_kl_20;
|
||||
ptr_hbe_txposer->analy_cos_sin_tab =
|
||||
(FLOAT32 *)ixheaacd_analy_cos_sin_table_kl_40;
|
||||
(FLOAT32 *)ixheaac_analy_cos_sin_table_kl_40;
|
||||
break;
|
||||
default:
|
||||
ptr_hbe_txposer->synth_cos_tab =
|
||||
(FLOAT32 *)ixheaacd_synth_cos_table_kl_4;
|
||||
(FLOAT32 *)ixheaac_synth_cos_table_kl_4;
|
||||
ptr_hbe_txposer->analy_cos_sin_tab =
|
||||
(FLOAT32 *)ixheaacd_analy_cos_sin_table_kl_8;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaacd_real_synth_fft_p2;
|
||||
ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaacd_cmplx_anal_fft_p2;
|
||||
(FLOAT32 *)ixheaac_analy_cos_sin_table_kl_8;
|
||||
ptr_hbe_txposer->ixheaacd_real_synth_fft = &ixheaac_real_synth_fft_p2;
|
||||
ptr_hbe_txposer->ixheaacd_cmplx_anal_fft = &ixheaac_cmplx_anal_fft_p2;
|
||||
}
|
||||
|
||||
ptr_hbe_txposer->synth_wind_coeff = ixheaacd_map_prot_filter(synth_size);
|
||||
|
|
@ -281,15 +281,15 @@ WORD32 ixheaacd_qmf_hbe_apply(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
qmf_band_idx < ptr_hbe_txposer->end_band; qmf_band_idx++) {
|
||||
pv_qmf_buf_real[i][qmf_band_idx] =
|
||||
(FLOAT32)(ptr_hbe_txposer->qmf_out_buf[i][2 * qmf_band_idx] *
|
||||
ixheaacd_phase_vocoder_cos_table[qmf_band_idx] -
|
||||
ixheaac_phase_vocoder_cos_table[qmf_band_idx] -
|
||||
ptr_hbe_txposer->qmf_out_buf[i][2 * qmf_band_idx + 1] *
|
||||
ixheaacd_phase_vocoder_sin_table[qmf_band_idx]);
|
||||
ixheaac_phase_vocoder_sin_table[qmf_band_idx]);
|
||||
|
||||
pv_qmf_buf_imag[i][qmf_band_idx] =
|
||||
(FLOAT32)(ptr_hbe_txposer->qmf_out_buf[i][2 * qmf_band_idx] *
|
||||
ixheaacd_phase_vocoder_sin_table[qmf_band_idx] +
|
||||
ixheaac_phase_vocoder_sin_table[qmf_band_idx] +
|
||||
ptr_hbe_txposer->qmf_out_buf[i][2 * qmf_band_idx + 1] *
|
||||
ixheaacd_phase_vocoder_cos_table[qmf_band_idx]);
|
||||
ixheaac_phase_vocoder_cos_table[qmf_band_idx]);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -436,8 +436,8 @@ VOID ixheaacd_hbe_xprod_proc_3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
|
||||
idx = max_n2 & 3;
|
||||
idx = (idx + 1) & 3;
|
||||
coeff_real[0] = ixheaacd_hbe_post_anal_proc_interp_coeff[idx][0];
|
||||
coeff_imag[0] = ixheaacd_hbe_post_anal_proc_interp_coeff[idx][1];
|
||||
coeff_real[0] = ixheaac_hbe_post_anal_proc_interp_coeff[idx][0];
|
||||
coeff_imag[0] = ixheaac_hbe_post_anal_proc_interp_coeff[idx][1];
|
||||
|
||||
coeff_real[1] = coeff_real[0];
|
||||
coeff_imag[1] = -coeff_imag[0];
|
||||
|
|
@ -474,8 +474,8 @@ VOID ixheaacd_hbe_xprod_proc_3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
|
||||
idx = (max_n1 & 3);
|
||||
idx = (idx + 1) & 3;
|
||||
coeff_real[0] = ixheaacd_hbe_post_anal_proc_interp_coeff[idx][0];
|
||||
coeff_imag[0] = ixheaacd_hbe_post_anal_proc_interp_coeff[idx][1];
|
||||
coeff_real[0] = ixheaac_hbe_post_anal_proc_interp_coeff[idx][0];
|
||||
coeff_imag[0] = ixheaac_hbe_post_anal_proc_interp_coeff[idx][1];
|
||||
|
||||
coeff_real[1] = coeff_real[0];
|
||||
coeff_imag[1] = -coeff_imag[0];
|
||||
|
|
@ -505,14 +505,14 @@ VOID ixheaacd_hbe_xprod_proc_3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
base = 1e-17;
|
||||
base = base + x_zero_band_r * x_zero_band_r;
|
||||
base = base + x_zero_band_i * x_zero_band_i;
|
||||
mag_scaling_fac = (FLOAT32)(ixheaacd_cbrt_calc((FLOAT32)base));
|
||||
mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base));
|
||||
x_zero_band_r *= mag_scaling_fac;
|
||||
x_zero_band_i *= mag_scaling_fac;
|
||||
for (k = 0; k < 2; k++) {
|
||||
base = 1e-17;
|
||||
base = base + vec_y_r[k] * vec_y_r[k];
|
||||
base = base + vec_y_i[k] * vec_y_i[k];
|
||||
mag_scaling_fac = (FLOAT32)(ixheaacd_cbrt_calc((FLOAT32)base));
|
||||
mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base));
|
||||
vec_y_r[k] *= mag_scaling_fac;
|
||||
vec_y_i[k] *= mag_scaling_fac;
|
||||
}
|
||||
|
|
@ -542,9 +542,9 @@ VOID ixheaacd_hbe_xprod_proc_3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
|
||||
{
|
||||
FLOAT32 cos_theta =
|
||||
ixheaacd_hbe_x_prod_cos_table_trans_3[(pitch_in_bins_idx << 1) + 0];
|
||||
ixheaac_hbe_x_prod_cos_table_trans_3[(pitch_in_bins_idx << 1) + 0];
|
||||
FLOAT32 sin_theta =
|
||||
ixheaacd_hbe_x_prod_cos_table_trans_3[(pitch_in_bins_idx << 1) + 1];
|
||||
ixheaac_hbe_x_prod_cos_table_trans_3[(pitch_in_bins_idx << 1) + 1];
|
||||
if (d2 < d1) {
|
||||
sin_theta = -sin_theta;
|
||||
}
|
||||
|
|
@ -718,16 +718,16 @@ VOID ixheaacd_hbe_xprod_proc_4(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
|
||||
if (d2 == 1) {
|
||||
cos_theta =
|
||||
ixheaacd_hbe_x_prod_cos_table_trans_4_1[(pitch_in_bins_idx << 1) +
|
||||
ixheaac_hbe_x_prod_cos_table_trans_4_1[(pitch_in_bins_idx << 1) +
|
||||
0];
|
||||
sin_theta =
|
||||
ixheaacd_hbe_x_prod_cos_table_trans_4_1[(pitch_in_bins_idx << 1) +
|
||||
ixheaac_hbe_x_prod_cos_table_trans_4_1[(pitch_in_bins_idx << 1) +
|
||||
1];
|
||||
} else {
|
||||
cos_theta =
|
||||
ixheaacd_hbe_x_prod_cos_table_trans_4[(pitch_in_bins_idx << 1) + 0];
|
||||
ixheaac_hbe_x_prod_cos_table_trans_4[(pitch_in_bins_idx << 1) + 0];
|
||||
sin_theta =
|
||||
ixheaacd_hbe_x_prod_cos_table_trans_4[(pitch_in_bins_idx << 1) + 1];
|
||||
ixheaac_hbe_x_prod_cos_table_trans_4[(pitch_in_bins_idx << 1) + 1];
|
||||
if (d2 < d1) {
|
||||
sin_theta = -sin_theta;
|
||||
}
|
||||
|
|
@ -805,8 +805,8 @@ VOID ixheaacd_hbe_post_anal_prod3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
const FLOAT32 *ptr_sel, *ptr_sel1;
|
||||
|
||||
inp_band_idx = (2 * qmf_band_idx) / 3;
|
||||
ptr_sel = &ixheaacd_sel_case[(inp_band_idx + 1) & 3][0];
|
||||
ptr_sel1 = &ixheaacd_sel_case[((inp_band_idx + 1) & 3) + 1][0];
|
||||
ptr_sel = &ixheaac_sel_case[(inp_band_idx + 1) & 3][0];
|
||||
ptr_sel1 = &ixheaac_sel_case[((inp_band_idx + 1) & 3) + 1][0];
|
||||
rem = 2 * qmf_band_idx - 3 * inp_band_idx;
|
||||
|
||||
if (rem == 0 || rem == 1) {
|
||||
|
|
@ -832,7 +832,7 @@ VOID ixheaacd_hbe_post_anal_prod3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
base1 = base + temp_r * temp_r;
|
||||
base1 = base1 + temp_i * temp_i;
|
||||
|
||||
mag_scaling_fac = (FLOAT32)(ixheaacd_cbrt_calc((FLOAT32)base1));
|
||||
mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
|
||||
|
||||
ptr_vec_x[0] = temp_r * mag_scaling_fac;
|
||||
ptr_vec_x[1] = temp_i * mag_scaling_fac;
|
||||
|
|
@ -856,7 +856,7 @@ VOID ixheaacd_hbe_post_anal_prod3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
|
||||
base1 = base + temp_r1 * temp_r1;
|
||||
base1 = base1 + temp_i1 * temp_i1;
|
||||
mag_scaling_fac = (FLOAT32)(ixheaacd_cbrt_calc((FLOAT32)base1));
|
||||
mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
|
||||
|
||||
ptr_vec_x[2] = temp_r1 * mag_scaling_fac;
|
||||
ptr_vec_x[3] = temp_i1 * mag_scaling_fac;
|
||||
|
|
@ -915,7 +915,7 @@ VOID ixheaacd_hbe_post_anal_prod3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
base1 = base + temp_r * temp_r;
|
||||
base1 = base1 + temp_i * temp_i;
|
||||
|
||||
mag_scaling_fac = (FLOAT32)(ixheaacd_cbrt_calc((FLOAT32)base1));
|
||||
mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
|
||||
|
||||
ptr_vec_x[0] = temp_r * mag_scaling_fac;
|
||||
ptr_vec_x[1] = temp_i * mag_scaling_fac;
|
||||
|
|
@ -923,7 +923,7 @@ VOID ixheaacd_hbe_post_anal_prod3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
base1 = base + temp_r1 * temp_r1;
|
||||
base1 = base1 + temp_i1 * temp_i1;
|
||||
|
||||
mag_scaling_fac = (FLOAT32)(ixheaacd_cbrt_calc((FLOAT32)base1));
|
||||
mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
|
||||
|
||||
ptr_vec_x_cap[0] = temp_r1 * mag_scaling_fac;
|
||||
ptr_vec_x_cap[1] = temp_i1 * mag_scaling_fac;
|
||||
|
|
@ -969,7 +969,7 @@ VOID ixheaacd_hbe_post_anal_prod3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
base1 = base + tmp_vr * tmp_vr;
|
||||
base1 = base1 + tmp_vi * tmp_vi;
|
||||
|
||||
mag_scaling_fac = (FLOAT32)(ixheaacd_cbrt_calc((FLOAT32)base1));
|
||||
mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
|
||||
|
||||
ptr_vec_x[2] = tmp_vr * mag_scaling_fac;
|
||||
ptr_vec_x[3] = tmp_vi * mag_scaling_fac;
|
||||
|
|
@ -977,7 +977,7 @@ VOID ixheaacd_hbe_post_anal_prod3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
base1 = base + tmp_cr * tmp_cr;
|
||||
base1 = base1 + tmp_ci * tmp_ci;
|
||||
|
||||
mag_scaling_fac = (FLOAT32)(ixheaacd_cbrt_calc((FLOAT32)base1));
|
||||
mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
|
||||
|
||||
ptr_vec_x_cap[2] = tmp_cr * mag_scaling_fac;
|
||||
ptr_vec_x_cap[3] = tmp_ci * mag_scaling_fac;
|
||||
|
|
@ -1260,8 +1260,8 @@ VOID ixheaacd_hbe_post_anal_xprod3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
const FLOAT32 *ptr_sel, *ptr_sel1;
|
||||
|
||||
inp_band_idx = (2 * qmf_band_idx) / 3;
|
||||
ptr_sel = &ixheaacd_sel_case[(inp_band_idx + 1) & 3][0];
|
||||
ptr_sel1 = &ixheaacd_sel_case[((inp_band_idx + 1) & 3) + 1][0];
|
||||
ptr_sel = &ixheaac_sel_case[(inp_band_idx + 1) & 3][0];
|
||||
ptr_sel1 = &ixheaac_sel_case[((inp_band_idx + 1) & 3) + 1][0];
|
||||
rem = 2 * qmf_band_idx - 3 * inp_band_idx;
|
||||
|
||||
if (rem == 0 || rem == 1) {
|
||||
|
|
@ -1287,7 +1287,7 @@ VOID ixheaacd_hbe_post_anal_xprod3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
base1 = base + temp_r * temp_r;
|
||||
base1 = base1 + temp_i * temp_i;
|
||||
|
||||
mag_scaling_fac = (FLOAT32)(ixheaacd_cbrt_calc((FLOAT32)base1));
|
||||
mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
|
||||
|
||||
ptr_vec_x[0] = temp_r * mag_scaling_fac;
|
||||
ptr_vec_x[1] = temp_i * mag_scaling_fac;
|
||||
|
|
@ -1311,7 +1311,7 @@ VOID ixheaacd_hbe_post_anal_xprod3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
|
||||
base1 = base + temp_r1 * temp_r1;
|
||||
base1 = base1 + temp_i1 * temp_i1;
|
||||
mag_scaling_fac = (FLOAT32)(ixheaacd_cbrt_calc((FLOAT32)base1));
|
||||
mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
|
||||
|
||||
ptr_vec_x[2] = temp_r1 * mag_scaling_fac;
|
||||
ptr_vec_x[3] = temp_i1 * mag_scaling_fac;
|
||||
|
|
@ -1373,7 +1373,7 @@ VOID ixheaacd_hbe_post_anal_xprod3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
base1 = base + temp_r * temp_r;
|
||||
base1 = base1 + temp_i * temp_i;
|
||||
|
||||
mag_scaling_fac = (FLOAT32)(ixheaacd_cbrt_calc((FLOAT32)base1));
|
||||
mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
|
||||
|
||||
ptr_vec_x[0] = temp_r * mag_scaling_fac;
|
||||
ptr_vec_x[1] = temp_i * mag_scaling_fac;
|
||||
|
|
@ -1381,7 +1381,7 @@ VOID ixheaacd_hbe_post_anal_xprod3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
base1 = base + temp_r1 * temp_r1;
|
||||
base1 = base1 + temp_i1 * temp_i1;
|
||||
|
||||
mag_scaling_fac = (FLOAT32)(ixheaacd_cbrt_calc((FLOAT32)base1));
|
||||
mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
|
||||
|
||||
ptr_vec_x_cap[0] = temp_r1 * mag_scaling_fac;
|
||||
ptr_vec_x_cap[1] = temp_i1 * mag_scaling_fac;
|
||||
|
|
@ -1427,7 +1427,7 @@ VOID ixheaacd_hbe_post_anal_xprod3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
base1 = base + tmp_vr * tmp_vr;
|
||||
base1 = base1 + tmp_vi * tmp_vi;
|
||||
|
||||
mag_scaling_fac = (FLOAT32)(ixheaacd_cbrt_calc((FLOAT32)base1));
|
||||
mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
|
||||
|
||||
ptr_vec_x[2] = tmp_vr * mag_scaling_fac;
|
||||
ptr_vec_x[3] = tmp_vi * mag_scaling_fac;
|
||||
|
|
@ -1435,7 +1435,7 @@ VOID ixheaacd_hbe_post_anal_xprod3(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer,
|
|||
base1 = base + tmp_cr * tmp_cr;
|
||||
base1 = base1 + tmp_ci * tmp_ci;
|
||||
|
||||
mag_scaling_fac = (FLOAT32)(ixheaacd_cbrt_calc((FLOAT32)base1));
|
||||
mag_scaling_fac = (FLOAT32)(ixheaac_cbrt_calc((FLOAT32)base1));
|
||||
|
||||
ptr_vec_x_cap[2] = tmp_cr * mag_scaling_fac;
|
||||
ptr_vec_x_cap[3] = tmp_ci * mag_scaling_fac;
|
||||
|
|
@ -1578,9 +1578,9 @@ IA_ERRORCODE ixheaacd_hbe_post_anal_process(
|
|||
} else {
|
||||
trans_fac = 2;
|
||||
if (trans_fac <= ptr_hbe_txposer->max_stretch) {
|
||||
cos_sin_theta[0] = ixheaacd_hbe_x_prod_cos_table_trans_2
|
||||
cos_sin_theta[0] = ixheaac_hbe_x_prod_cos_table_trans_2
|
||||
[((pitch_in_bins + sbr_upsamp_4_flg * 128) << 1) + 0];
|
||||
cos_sin_theta[1] = ixheaacd_hbe_x_prod_cos_table_trans_2
|
||||
cos_sin_theta[1] = ixheaac_hbe_x_prod_cos_table_trans_2
|
||||
[((pitch_in_bins + sbr_upsamp_4_flg * 128) << 1) + 1];
|
||||
|
||||
ixheaacd_hbe_post_anal_xprod2(ptr_hbe_txposer, qmf_voc_columns,
|
||||
|
|
|
|||
|
|
@ -18,12 +18,12 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
#include "ixheaacd_function_selector.h"
|
||||
#include "ixheaacd_ld_mps_dec.h"
|
||||
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
|
||||
#define ELDEXT_SAOC 1
|
||||
#define ELDEXT_TERM 0
|
||||
|
|
@ -832,11 +832,11 @@ WORD32 ixheaacd_check_if_adts(ia_adts_header_struct *adts,
|
|||
|
||||
result = ixheaacd_adtsframe(adts, it_bit_buff);
|
||||
|
||||
max_frm_len_per_ch = ixheaacd_mult32(768, (adts->no_raw_data_blocks + 1));
|
||||
max_frm_len_per_ch = ixheaac_mult32(768, (adts->no_raw_data_blocks + 1));
|
||||
|
||||
if (adts->channel_configuration != 0)
|
||||
max_frm_len_per_ch =
|
||||
ixheaacd_mult32(max_frm_len_per_ch, adts->channel_configuration);
|
||||
ixheaac_mult32(max_frm_len_per_ch, adts->channel_configuration);
|
||||
else
|
||||
max_frm_len_per_ch = max_frm_len_per_ch * usr_max_ch;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,13 +19,13 @@
|
|||
*/
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_defines.h"
|
||||
|
|
@ -991,9 +991,9 @@ static UWORD16 *ixheaacd_huff_dec_word_hcr_pcw(
|
|||
|
||||
if (sp1 == 16) {
|
||||
i = 4;
|
||||
value = ixheaacd_extu(*read_word, *bit_pos, 23);
|
||||
value = ixheaac_extu(*read_word, *bit_pos, 23);
|
||||
value = value | 0xfffffe00;
|
||||
norm_val = ixheaacd_norm32(value);
|
||||
norm_val = ixheaac_norm32(value);
|
||||
|
||||
i += (norm_val - 22);
|
||||
*bit_pos += (norm_val - 21);
|
||||
|
|
@ -1005,7 +1005,7 @@ static UWORD16 *ixheaacd_huff_dec_word_hcr_pcw(
|
|||
ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
|
||||
it_bit_buff->ptr_bit_buf_end);
|
||||
|
||||
off = ixheaacd_extu(*read_word, *bit_pos, 32 - i);
|
||||
off = ixheaac_extu(*read_word, *bit_pos, 32 - i);
|
||||
|
||||
*bit_pos += i;
|
||||
*p_remaining_bits_in_seg -= i;
|
||||
|
|
@ -1032,9 +1032,9 @@ static UWORD16 *ixheaacd_huff_dec_word_hcr_pcw(
|
|||
|
||||
if (sp2 == 16) {
|
||||
i = 4;
|
||||
value = ixheaacd_extu(*read_word, *bit_pos, 23);
|
||||
value = ixheaac_extu(*read_word, *bit_pos, 23);
|
||||
value = value | 0xfffffe00;
|
||||
norm_val = ixheaacd_norm32(value);
|
||||
norm_val = ixheaac_norm32(value);
|
||||
|
||||
i += (norm_val - 22);
|
||||
|
||||
|
|
@ -1046,7 +1046,7 @@ static UWORD16 *ixheaacd_huff_dec_word_hcr_pcw(
|
|||
ixheaacd_aac_read_byte_corr(&ptr_read_next, bit_pos, read_word,
|
||||
it_bit_buff->ptr_bit_buf_end);
|
||||
|
||||
off = ixheaacd_extu(*read_word, *bit_pos, 32 - i);
|
||||
off = ixheaac_extu(*read_word, *bit_pos, 32 - i);
|
||||
|
||||
*bit_pos += i;
|
||||
*p_remaining_bits_in_seg -= i;
|
||||
|
|
@ -1414,9 +1414,9 @@ static PLATFORM_INLINE UWORD16 ixheaacd_huff_dec_word_hcr_non_pcw(
|
|||
|
||||
if (sp1 == 16) {
|
||||
i = 4;
|
||||
value = ixheaacd_extu(read_word, length, 23);
|
||||
value = ixheaac_extu(read_word, length, 23);
|
||||
value = value | 0xfffffe00;
|
||||
norm_val = ixheaacd_norm32(value);
|
||||
norm_val = ixheaac_norm32(value);
|
||||
|
||||
i += (norm_val - 22);
|
||||
length += (norm_val - 21);
|
||||
|
|
@ -1424,7 +1424,7 @@ static PLATFORM_INLINE UWORD16 ixheaacd_huff_dec_word_hcr_non_pcw(
|
|||
|
||||
ixheaacd_aac_read_byte_corr1(&ptr_read_next, &length, &read_word, NULL);
|
||||
|
||||
off = ixheaacd_extu(read_word, length, 32 - i);
|
||||
off = ixheaac_extu(read_word, length, 32 - i);
|
||||
length += i;
|
||||
cw_len += i;
|
||||
|
||||
|
|
@ -1442,9 +1442,9 @@ static PLATFORM_INLINE UWORD16 ixheaacd_huff_dec_word_hcr_non_pcw(
|
|||
|
||||
if (sp2 == 16) {
|
||||
i = 4;
|
||||
value = ixheaacd_extu(read_word, length, 23);
|
||||
value = ixheaac_extu(read_word, length, 23);
|
||||
value = value | 0xfffffe00;
|
||||
norm_val = ixheaacd_norm32(value);
|
||||
norm_val = ixheaac_norm32(value);
|
||||
|
||||
i += (norm_val - 22);
|
||||
length += (norm_val - 21);
|
||||
|
|
@ -1452,7 +1452,7 @@ static PLATFORM_INLINE UWORD16 ixheaacd_huff_dec_word_hcr_non_pcw(
|
|||
|
||||
ixheaacd_aac_read_byte_corr1(&ptr_read_next, &length, &read_word, NULL);
|
||||
|
||||
off = ixheaacd_extu(read_word, length, 32 - i);
|
||||
off = ixheaac_extu(read_word, length, 32 - i);
|
||||
length += i;
|
||||
cw_len += i;
|
||||
|
||||
|
|
@ -1779,7 +1779,7 @@ static VOID ixheaacd_hcr_reorder_quantized_spec_coeff(
|
|||
ptr_teva = &arr_temp_values[*ptr_reorder_offset++];
|
||||
for (j = num_spec_val_sect; j != 0; j--) {
|
||||
qsc = *ptr_quant_spec_coeff++;
|
||||
abs_qsc = ixheaacd_abs32(qsc);
|
||||
abs_qsc = ixheaac_abs32(qsc);
|
||||
if (abs_qsc <= ptr_lav_tbl[*ptr_sorted_cb]) {
|
||||
*ptr_teva++ = (WORD32)qsc;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_interface.h"
|
||||
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
#include <limits.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_interface.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_info.h"
|
||||
|
|
|
|||
|
|
@ -19,15 +19,15 @@
|
|||
*/
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_basic_funcs.h"
|
||||
|
|
@ -59,38 +59,38 @@ static VOID ixheaacd_filt_2_ch(const WORD32 *ptr_qmf, WORD32 *ptr_hybrid,
|
|||
cum11 = 0L;
|
||||
|
||||
{
|
||||
cum1 = ixheaacd_add32_sat(cum1, ixheaacd_mult32x16in32(ptr_qmf[1], *p2_6));
|
||||
cum1 = ixheaac_add32_sat(cum1, ixheaac_mult32x16in32(ptr_qmf[1], *p2_6));
|
||||
cum11 =
|
||||
ixheaacd_add32_sat(cum11, ixheaacd_mult32x16in32(ptr_qmf[17], *p2_6++));
|
||||
ixheaac_add32_sat(cum11, ixheaac_mult32x16in32(ptr_qmf[17], *p2_6++));
|
||||
|
||||
cum1 = ixheaacd_add32_sat(cum1, ixheaacd_mult32x16in32(ptr_qmf[3], *p2_6));
|
||||
cum1 = ixheaac_add32_sat(cum1, ixheaac_mult32x16in32(ptr_qmf[3], *p2_6));
|
||||
cum11 =
|
||||
ixheaacd_add32_sat(cum11, ixheaacd_mult32x16in32(ptr_qmf[19], *p2_6++));
|
||||
ixheaac_add32_sat(cum11, ixheaac_mult32x16in32(ptr_qmf[19], *p2_6++));
|
||||
|
||||
cum1 = ixheaacd_add32_sat(cum1, ixheaacd_mult32x16in32(ptr_qmf[5], *p2_6));
|
||||
cum1 = ixheaac_add32_sat(cum1, ixheaac_mult32x16in32(ptr_qmf[5], *p2_6));
|
||||
cum11 =
|
||||
ixheaacd_add32_sat(cum11, ixheaacd_mult32x16in32(ptr_qmf[21], *p2_6++));
|
||||
ixheaac_add32_sat(cum11, ixheaac_mult32x16in32(ptr_qmf[21], *p2_6++));
|
||||
|
||||
cum1 = ixheaacd_add32_sat(cum1, ixheaacd_mult32x16in32(ptr_qmf[7], *p2_6));
|
||||
cum1 = ixheaac_add32_sat(cum1, ixheaac_mult32x16in32(ptr_qmf[7], *p2_6));
|
||||
cum11 =
|
||||
ixheaacd_add32_sat(cum11, ixheaacd_mult32x16in32(ptr_qmf[23], *p2_6++));
|
||||
ixheaac_add32_sat(cum11, ixheaac_mult32x16in32(ptr_qmf[23], *p2_6++));
|
||||
|
||||
cum1 = ixheaacd_add32_sat(cum1, ixheaacd_mult32x16in32(ptr_qmf[9], *p2_6));
|
||||
cum1 = ixheaac_add32_sat(cum1, ixheaac_mult32x16in32(ptr_qmf[9], *p2_6));
|
||||
cum11 =
|
||||
ixheaacd_add32_sat(cum11, ixheaacd_mult32x16in32(ptr_qmf[25], *p2_6++));
|
||||
ixheaac_add32_sat(cum11, ixheaac_mult32x16in32(ptr_qmf[25], *p2_6++));
|
||||
|
||||
cum1 = ixheaacd_add32_sat(cum1, ixheaacd_mult32x16in32(ptr_qmf[11], *p2_6));
|
||||
cum1 = ixheaac_add32_sat(cum1, ixheaac_mult32x16in32(ptr_qmf[11], *p2_6));
|
||||
cum11 =
|
||||
ixheaacd_add32_sat(cum11, ixheaacd_mult32x16in32(ptr_qmf[27], *p2_6++));
|
||||
ixheaac_add32_sat(cum11, ixheaac_mult32x16in32(ptr_qmf[27], *p2_6++));
|
||||
}
|
||||
cum1 = ixheaacd_shl32(cum1, 1);
|
||||
cum11 = ixheaacd_shl32(cum11, 1);
|
||||
cum1 = ixheaac_shl32(cum1, 1);
|
||||
cum11 = ixheaac_shl32(cum11, 1);
|
||||
|
||||
ptr_hybrid[0] = ixheaacd_add32_sat(cum0, cum1);
|
||||
ptr_hybrid[1] = ixheaacd_sub32_sat(cum0, cum1);
|
||||
ptr_hybrid[0] = ixheaac_add32_sat(cum0, cum1);
|
||||
ptr_hybrid[1] = ixheaac_sub32_sat(cum0, cum1);
|
||||
|
||||
ptr_hybrid[16] = ixheaacd_add32_sat(cum00, cum11);
|
||||
ptr_hybrid[17] = ixheaacd_sub32_sat(cum00, cum11);
|
||||
ptr_hybrid[16] = ixheaac_add32_sat(cum00, cum11);
|
||||
ptr_hybrid[17] = ixheaac_sub32_sat(cum00, cum11);
|
||||
}
|
||||
|
||||
static VOID ixheaacd_filt_8_ch(const WORD32 *ptr_qmf_real,
|
||||
|
|
@ -105,107 +105,107 @@ static VOID ixheaacd_filt_8_ch(const WORD32 *ptr_qmf_real,
|
|||
const WORD16 *p8_13 = ptr_sbr_tables->ps_tables_ptr->p8_13;
|
||||
const WORD16 *p8_13_8 = ptr_sbr_tables->ps_tables_ptr->p8_13 + 8;
|
||||
|
||||
real = ixheaacd_shl32(
|
||||
ixheaacd_add32_sat(ixheaacd_mult32x16in32(ptr_qmf_real[0], *p8_13),
|
||||
ixheaacd_mult32x16in32(ptr_qmf_real[8], *p8_13_8)),
|
||||
real = ixheaac_shl32(
|
||||
ixheaac_add32_sat(ixheaac_mult32x16in32(ptr_qmf_real[0], *p8_13),
|
||||
ixheaac_mult32x16in32(ptr_qmf_real[8], *p8_13_8)),
|
||||
1);
|
||||
imag = ixheaacd_shl32(
|
||||
ixheaacd_add32_sat(ixheaacd_mult32x16in32(ptr_qmf_imag[0], *p8_13++),
|
||||
ixheaacd_mult32x16in32(ptr_qmf_imag[8], *p8_13_8++)),
|
||||
imag = ixheaac_shl32(
|
||||
ixheaac_add32_sat(ixheaac_mult32x16in32(ptr_qmf_imag[0], *p8_13++),
|
||||
ixheaac_mult32x16in32(ptr_qmf_imag[8], *p8_13_8++)),
|
||||
1);
|
||||
|
||||
cum[12] = ixheaacd_shl32(
|
||||
ixheaacd_mult32x16in32(ixheaacd_add32_sat(imag, real), tcom), 1);
|
||||
cum[13] = ixheaacd_shl32(
|
||||
ixheaacd_mult32x16in32(ixheaacd_sub32_sat(imag, real), tcom), 1);
|
||||
cum[12] = ixheaac_shl32(
|
||||
ixheaac_mult32x16in32(ixheaac_add32_sat(imag, real), tcom), 1);
|
||||
cum[13] = ixheaac_shl32(
|
||||
ixheaac_mult32x16in32(ixheaac_sub32_sat(imag, real), tcom), 1);
|
||||
|
||||
real = ixheaacd_shl32(
|
||||
ixheaacd_add32_sat(ixheaacd_mult32x16in32(ptr_qmf_real[1], *p8_13),
|
||||
ixheaacd_mult32x16in32(ptr_qmf_real[9], *p8_13_8)),
|
||||
real = ixheaac_shl32(
|
||||
ixheaac_add32_sat(ixheaac_mult32x16in32(ptr_qmf_real[1], *p8_13),
|
||||
ixheaac_mult32x16in32(ptr_qmf_real[9], *p8_13_8)),
|
||||
1);
|
||||
imag = ixheaacd_shl32(
|
||||
ixheaacd_add32_sat(ixheaacd_mult32x16in32(ptr_qmf_imag[1], *p8_13++),
|
||||
ixheaacd_mult32x16in32(ptr_qmf_imag[9], *p8_13_8++)),
|
||||
imag = ixheaac_shl32(
|
||||
ixheaac_add32_sat(ixheaac_mult32x16in32(ptr_qmf_imag[1], *p8_13++),
|
||||
ixheaac_mult32x16in32(ptr_qmf_imag[9], *p8_13_8++)),
|
||||
1);
|
||||
|
||||
cum[10] =
|
||||
ixheaacd_shl32(ixheaacd_add32_sat(ixheaacd_mult32x16in32(imag, tcos),
|
||||
ixheaacd_mult32x16in32(real, tsin)),
|
||||
ixheaac_shl32(ixheaac_add32_sat(ixheaac_mult32x16in32(imag, tcos),
|
||||
ixheaac_mult32x16in32(real, tsin)),
|
||||
1);
|
||||
cum[11] =
|
||||
ixheaacd_shl32(ixheaacd_sub32_sat(ixheaacd_mult32x16in32(imag, tsin),
|
||||
ixheaacd_mult32x16in32(real, tcos)),
|
||||
ixheaac_shl32(ixheaac_sub32_sat(ixheaac_mult32x16in32(imag, tsin),
|
||||
ixheaac_mult32x16in32(real, tcos)),
|
||||
1);
|
||||
cum[9] = ixheaacd_shl32(
|
||||
ixheaacd_mult32x16in32(
|
||||
ixheaacd_sub32_sat(ptr_qmf_real[2], ptr_qmf_real[10]), *p8_13_8++),
|
||||
cum[9] = ixheaac_shl32(
|
||||
ixheaac_mult32x16in32(
|
||||
ixheaac_sub32_sat(ptr_qmf_real[2], ptr_qmf_real[10]), *p8_13_8++),
|
||||
1);
|
||||
cum[8] = ixheaacd_shl32(
|
||||
ixheaacd_mult32x16in32(
|
||||
ixheaacd_sub32_sat(ptr_qmf_imag[2], ptr_qmf_imag[10]), *p8_13++),
|
||||
cum[8] = ixheaac_shl32(
|
||||
ixheaac_mult32x16in32(
|
||||
ixheaac_sub32_sat(ptr_qmf_imag[2], ptr_qmf_imag[10]), *p8_13++),
|
||||
1);
|
||||
|
||||
real = ixheaacd_shl32(
|
||||
ixheaacd_add32_sat(ixheaacd_mult32x16in32(ptr_qmf_real[3], *p8_13),
|
||||
ixheaacd_mult32x16in32(ptr_qmf_real[11], *p8_13_8)),
|
||||
real = ixheaac_shl32(
|
||||
ixheaac_add32_sat(ixheaac_mult32x16in32(ptr_qmf_real[3], *p8_13),
|
||||
ixheaac_mult32x16in32(ptr_qmf_real[11], *p8_13_8)),
|
||||
1);
|
||||
imag = ixheaacd_shl32(
|
||||
ixheaacd_add32_sat(ixheaacd_mult32x16in32(ptr_qmf_imag[3], *p8_13++),
|
||||
ixheaacd_mult32x16in32(ptr_qmf_imag[11], *p8_13_8++)),
|
||||
imag = ixheaac_shl32(
|
||||
ixheaac_add32_sat(ixheaac_mult32x16in32(ptr_qmf_imag[3], *p8_13++),
|
||||
ixheaac_mult32x16in32(ptr_qmf_imag[11], *p8_13_8++)),
|
||||
1);
|
||||
|
||||
cum[6] =
|
||||
ixheaacd_shl32(ixheaacd_sub32_sat(ixheaacd_mult32x16in32(imag, tcos),
|
||||
ixheaacd_mult32x16in32(real, tsin)),
|
||||
ixheaac_shl32(ixheaac_sub32_sat(ixheaac_mult32x16in32(imag, tcos),
|
||||
ixheaac_mult32x16in32(real, tsin)),
|
||||
1);
|
||||
cum[7] = ixheaacd_shl32(ixheaacd_negate32_sat(ixheaacd_add32_sat(
|
||||
ixheaacd_mult32x16in32(imag, tsin),
|
||||
ixheaacd_mult32x16in32(real, tcos))),
|
||||
cum[7] = ixheaac_shl32(ixheaac_negate32_sat(ixheaac_add32_sat(
|
||||
ixheaac_mult32x16in32(imag, tsin),
|
||||
ixheaac_mult32x16in32(real, tcos))),
|
||||
1);
|
||||
|
||||
real = ixheaacd_shl32(
|
||||
ixheaacd_add32_sat(ixheaacd_mult32x16in32(ptr_qmf_real[4], *p8_13),
|
||||
ixheaacd_mult32x16in32(ptr_qmf_real[12], *p8_13_8)),
|
||||
real = ixheaac_shl32(
|
||||
ixheaac_add32_sat(ixheaac_mult32x16in32(ptr_qmf_real[4], *p8_13),
|
||||
ixheaac_mult32x16in32(ptr_qmf_real[12], *p8_13_8)),
|
||||
1);
|
||||
imag = ixheaacd_shl32(
|
||||
ixheaacd_add32_sat(ixheaacd_mult32x16in32(ptr_qmf_imag[4], *p8_13++),
|
||||
ixheaacd_mult32x16in32(ptr_qmf_imag[12], *p8_13_8++)),
|
||||
imag = ixheaac_shl32(
|
||||
ixheaac_add32_sat(ixheaac_mult32x16in32(ptr_qmf_imag[4], *p8_13++),
|
||||
ixheaac_mult32x16in32(ptr_qmf_imag[12], *p8_13_8++)),
|
||||
1);
|
||||
|
||||
cum[4] = ixheaacd_shl32(
|
||||
ixheaacd_mult32x16in32(ixheaacd_sub32_sat(imag, real), tcom), 1);
|
||||
cum[5] = ixheaacd_shl32(
|
||||
ixheaacd_mult32x16in32(
|
||||
ixheaacd_negate32_sat(ixheaacd_add32_sat(imag, real)), tcom),
|
||||
cum[4] = ixheaac_shl32(
|
||||
ixheaac_mult32x16in32(ixheaac_sub32_sat(imag, real), tcom), 1);
|
||||
cum[5] = ixheaac_shl32(
|
||||
ixheaac_mult32x16in32(
|
||||
ixheaac_negate32_sat(ixheaac_add32_sat(imag, real)), tcom),
|
||||
1);
|
||||
|
||||
real = ixheaacd_shl32(ixheaacd_mult32x16in32(ptr_qmf_real[5], *p8_13), 1);
|
||||
imag = ixheaacd_shl32(ixheaacd_mult32x16in32(ptr_qmf_imag[5], *p8_13++), 1);
|
||||
real = ixheaac_shl32(ixheaac_mult32x16in32(ptr_qmf_real[5], *p8_13), 1);
|
||||
imag = ixheaac_shl32(ixheaac_mult32x16in32(ptr_qmf_imag[5], *p8_13++), 1);
|
||||
|
||||
cum[2] =
|
||||
ixheaacd_shl32(ixheaacd_sub32_sat(ixheaacd_mult32x16in32(real, tcos),
|
||||
ixheaacd_mult32x16in32(imag, tsin)),
|
||||
ixheaac_shl32(ixheaac_sub32_sat(ixheaac_mult32x16in32(real, tcos),
|
||||
ixheaac_mult32x16in32(imag, tsin)),
|
||||
1);
|
||||
cum[3] =
|
||||
ixheaacd_shl32(ixheaacd_add32_sat(ixheaacd_mult32x16in32(real, tsin),
|
||||
ixheaacd_mult32x16in32(imag, tcos)),
|
||||
ixheaac_shl32(ixheaac_add32_sat(ixheaac_mult32x16in32(real, tsin),
|
||||
ixheaac_mult32x16in32(imag, tcos)),
|
||||
1);
|
||||
|
||||
cum[0] = ixheaacd_shl32(
|
||||
ixheaacd_mult32x16in32(ptr_qmf_real[HYBRID_FILTER_DELAY], *p8_13), 1);
|
||||
cum[1] = ixheaacd_shl32(
|
||||
ixheaacd_mult32x16in32(ptr_qmf_imag[HYBRID_FILTER_DELAY], *p8_13++), 1);
|
||||
cum[0] = ixheaac_shl32(
|
||||
ixheaac_mult32x16in32(ptr_qmf_real[HYBRID_FILTER_DELAY], *p8_13), 1);
|
||||
cum[1] = ixheaac_shl32(
|
||||
ixheaac_mult32x16in32(ptr_qmf_imag[HYBRID_FILTER_DELAY], *p8_13++), 1);
|
||||
|
||||
real = ixheaacd_shl32(ixheaacd_mult32x16in32(ptr_qmf_real[7], *p8_13), 1);
|
||||
imag = ixheaacd_shl32(ixheaacd_mult32x16in32(ptr_qmf_imag[7], *p8_13++), 1);
|
||||
real = ixheaac_shl32(ixheaac_mult32x16in32(ptr_qmf_real[7], *p8_13), 1);
|
||||
imag = ixheaac_shl32(ixheaac_mult32x16in32(ptr_qmf_imag[7], *p8_13++), 1);
|
||||
|
||||
cum[14] =
|
||||
ixheaacd_shl32(ixheaacd_add32_sat(ixheaacd_mult32x16in32(imag, tsin),
|
||||
ixheaacd_mult32x16in32(real, tcos)),
|
||||
ixheaac_shl32(ixheaac_add32_sat(ixheaac_mult32x16in32(imag, tsin),
|
||||
ixheaac_mult32x16in32(real, tcos)),
|
||||
1);
|
||||
cum[15] =
|
||||
ixheaacd_shl32(ixheaacd_sub32_sat(ixheaacd_mult32x16in32(imag, tcos),
|
||||
ixheaacd_mult32x16in32(real, tsin)),
|
||||
ixheaac_shl32(ixheaac_sub32_sat(ixheaac_mult32x16in32(imag, tcos),
|
||||
ixheaac_mult32x16in32(real, tsin)),
|
||||
1);
|
||||
|
||||
(*ixheaacd_inv_dit_fft_8pt)(cum, ptr_hyb_real, ptr_hyb_imag);
|
||||
|
|
@ -251,11 +251,11 @@ VOID ixheaacd_hybrid_analysis(const WORD32 *ptr_qmf_real, WORD32 *ptr_hyb_real,
|
|||
WORD32 temp_im = ptr_qmf_real[band + 0x40];
|
||||
|
||||
if (scale < 0) {
|
||||
temp_re = ixheaacd_shl32(temp_re, -scale);
|
||||
temp_im = ixheaacd_shl32(temp_im, -scale);
|
||||
temp_re = ixheaac_shl32(temp_re, -scale);
|
||||
temp_im = ixheaac_shl32(temp_im, -scale);
|
||||
} else {
|
||||
temp_re = ixheaacd_shr32(temp_re, scale);
|
||||
temp_im = ixheaacd_shr32(temp_im, scale);
|
||||
temp_re = ixheaac_shr32(temp_re, scale);
|
||||
temp_im = ixheaac_shr32(temp_im, scale);
|
||||
}
|
||||
*ptr_temp_real = temp_re;
|
||||
*--ptr_re = temp_re;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_interface.h"
|
||||
|
||||
#include "ixheaacd_defines.h"
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
#include "ixheaacd_drc_dec.h"
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
#include "ixheaacd_mps_polyphase.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
|
||||
#include "ixheaacd_pulsedata.h"
|
||||
#include "ixheaacd_pns.h"
|
||||
|
|
@ -57,10 +57,10 @@
|
|||
#include "ixheaacd_windows.h"
|
||||
|
||||
#include "ixheaacd_vec_baisc_ops.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaacd_function_selector.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
|
||||
#include "ixheaacd_func_def.h"
|
||||
|
||||
|
|
@ -82,11 +82,11 @@ extern const ia_usac_samp_rate_info ixheaacd_samp_rate_info[];
|
|||
static WORD32 ixheaacd_calc_max_spectralline(WORD32 *p_in_ibuffer, WORD32 n) {
|
||||
WORD32 k, shiftp, itemp = 0;
|
||||
for (k = 0; k < n; k++) {
|
||||
if (ixheaacd_abs32_sat(p_in_ibuffer[k]) > itemp)
|
||||
itemp = ixheaacd_abs32_sat(p_in_ibuffer[k]);
|
||||
if (ixheaac_abs32_sat(p_in_ibuffer[k]) > itemp)
|
||||
itemp = ixheaac_abs32_sat(p_in_ibuffer[k]);
|
||||
}
|
||||
|
||||
shiftp = ixheaacd_norm32(itemp);
|
||||
shiftp = ixheaac_norm32(itemp);
|
||||
|
||||
return (shiftp);
|
||||
}
|
||||
|
|
@ -117,10 +117,10 @@ void ixheaacd_calc_pre_twid_dec(WORD32 *ptr_x, WORD32 *r_ptr, WORD32 *i_ptr,
|
|||
ptr_y = &ptr_x[2 * nlength - 1];
|
||||
|
||||
for (i = 0; i < nlength; i++) {
|
||||
*r_ptr++ = ((ixheaacd_mult32(ixheaacd_negate32_sat(*ptr_x), (*cos_ptr)) -
|
||||
ixheaacd_mult32((*ptr_y), (*sin_ptr))));
|
||||
*i_ptr++ = ((ixheaacd_mult32((*ptr_y), (*cos_ptr++)) -
|
||||
ixheaacd_mult32((*ptr_x), (*sin_ptr++))));
|
||||
*r_ptr++ = ((ixheaac_mult32(ixheaac_negate32_sat(*ptr_x), (*cos_ptr)) -
|
||||
ixheaac_mult32((*ptr_y), (*sin_ptr))));
|
||||
*i_ptr++ = ((ixheaac_mult32((*ptr_y), (*cos_ptr++)) -
|
||||
ixheaac_mult32((*ptr_x), (*sin_ptr++))));
|
||||
ptr_x += 2;
|
||||
ptr_y -= 2;
|
||||
}
|
||||
|
|
@ -137,10 +137,10 @@ void ixheaacd_calc_post_twid_dec(WORD32 *xptr, WORD32 *r_ptr, WORD32 *i_ptr,
|
|||
yptr = &xptr[2 * nlength - 1];
|
||||
|
||||
for (i = 0; i < nlength; i++) {
|
||||
*xptr = (-(ixheaacd_mult32((r_ptr[i]), (*cos_ptr)) -
|
||||
ixheaacd_mult32((i_ptr[i]), (*sin_ptr))));
|
||||
*yptr = (-(ixheaacd_mult32((i_ptr[i]), (*cos_ptr++)) +
|
||||
ixheaacd_mult32((r_ptr[i]), (*sin_ptr++))));
|
||||
*xptr = (-(ixheaac_mult32((r_ptr[i]), (*cos_ptr)) -
|
||||
ixheaac_mult32((i_ptr[i]), (*sin_ptr))));
|
||||
*yptr = (-(ixheaac_mult32((i_ptr[i]), (*cos_ptr++)) +
|
||||
ixheaac_mult32((r_ptr[i]), (*sin_ptr++))));
|
||||
xptr += 2;
|
||||
yptr -= 2;
|
||||
}
|
||||
|
|
@ -232,7 +232,7 @@ IA_ERRORCODE ixheaacd_cal_fac_data(ia_usac_data_struct *usac_data, WORD32 i_ch,
|
|||
rem10 = (FLOAT32)ixheaacd_power_10_table[rem];
|
||||
|
||||
gain = pow10 * rem10;
|
||||
scale = (WORD32)(ixheaacd_norm32((WORD32)((ABS(gain) + 1))));
|
||||
scale = (WORD32)(ixheaac_norm32((WORD32)((ABS(gain) + 1))));
|
||||
gain_fac = (WORD32)(gain * (FLOAT32)((WORD64)1 << scale));
|
||||
scale += 4;
|
||||
qfac1 = 1.0f / (gain);
|
||||
|
|
@ -246,7 +246,7 @@ IA_ERRORCODE ixheaacd_cal_fac_data(ia_usac_data_struct *usac_data, WORD32 i_ch,
|
|||
}
|
||||
|
||||
itemp = (WORD32)(ftemp);
|
||||
qshift3 = ixheaacd_norm32(itemp);
|
||||
qshift3 = ixheaac_norm32(itemp);
|
||||
|
||||
for (k = 0; k < n_long / 4; k++) {
|
||||
izir[k] =
|
||||
|
|
@ -263,7 +263,7 @@ IA_ERRORCODE ixheaacd_cal_fac_data(ia_usac_data_struct *usac_data, WORD32 i_ch,
|
|||
}
|
||||
|
||||
itemp = (WORD32)(ftemp);
|
||||
qshift2 = ixheaacd_norm32(itemp);
|
||||
qshift2 = ixheaac_norm32(itemp);
|
||||
|
||||
for (k = 0; k < ORDER + 1; k++) {
|
||||
i_aq[k] = (WORD32)(last_lpc[k] * (FLOAT32)((WORD64)1 << qshift2));
|
||||
|
|
@ -272,11 +272,11 @@ IA_ERRORCODE ixheaacd_cal_fac_data(ia_usac_data_struct *usac_data, WORD32 i_ch,
|
|||
i_aq = NULL;
|
||||
|
||||
for (k = 0; k < lfac; k++) {
|
||||
if (ixheaacd_abs32_sat(fac_data[k + 1]) > itemp)
|
||||
itemp = ixheaacd_abs32_sat(fac_data[k + 1]);
|
||||
if (ixheaac_abs32_sat(fac_data[k + 1]) > itemp)
|
||||
itemp = ixheaac_abs32_sat(fac_data[k + 1]);
|
||||
}
|
||||
|
||||
qshift1 = ixheaacd_norm32(itemp);
|
||||
qshift1 = ixheaac_norm32(itemp);
|
||||
|
||||
for (k = 0; k < lfac; k++) {
|
||||
fac_data[k + 1] =
|
||||
|
|
@ -327,7 +327,7 @@ IA_ERRORCODE ixheaacd_cal_fac_data(ia_usac_data_struct *usac_data, WORD32 i_ch,
|
|||
if (acelp_in != NULL) {
|
||||
for (k = 0; k < 2 * lfac; k++) {
|
||||
fac_idata[k] =
|
||||
ixheaacd_mul32_sh(fac_idata[k + 16], gain_fac, (WORD8)(scale));
|
||||
ixheaac_mul32_sh(fac_idata[k + 16], gain_fac, (WORD8)(scale));
|
||||
}
|
||||
}
|
||||
return IA_NO_ERROR;
|
||||
|
|
@ -554,9 +554,9 @@ static IA_ERRORCODE ixheaacd_fd_imdct_long(ia_usac_data_struct *usac_data,
|
|||
|
||||
for (i = 0; i < ixheaacd_drc_offset->n_long / 2; i++) {
|
||||
p_overlap_ibuffer[ixheaacd_drc_offset->n_long / 2 + i] =
|
||||
ixheaacd_negate32_sat(p_in_ibuffer[i]) >> (shiftp - shift_olap);
|
||||
ixheaac_negate32_sat(p_in_ibuffer[i]) >> (shiftp - shift_olap);
|
||||
p_overlap_ibuffer[ixheaacd_drc_offset->n_long / 2 - i - 1] =
|
||||
ixheaacd_negate32_sat(p_in_ibuffer[i]) >> (shiftp - shift_olap);
|
||||
ixheaac_negate32_sat(p_in_ibuffer[i]) >> (shiftp - shift_olap);
|
||||
}
|
||||
|
||||
ixheaacd_scale_down_adj(p_out_ibuffer, p_out_ibuffer,
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@
|
|||
#include <stdarg.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
||||
#include "ixheaacd_defines.h"
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
#include "ixheaacd_interface.h"
|
||||
#include "ixheaacd_info.h"
|
||||
#include "ixheaacd_struct.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
|
||||
#include "ixheaacd_error_codes.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -18,18 +18,18 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include <string.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
|
||||
#include "ixheaacd_defines.h"
|
||||
|
|
|
|||
|
|
@ -19,15 +19,15 @@
|
|||
*/
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
|
||||
#include "ixheaacd_defines.h"
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
|
||||
#include "ixheaacd_multichannel.h"
|
||||
#include "ixheaacd_headerdecode.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
|
||||
WORD32 ixheaacd_latm_au_chunk_length_info(
|
||||
struct ia_bit_buf_struct *it_bit_buff) {
|
||||
|
|
@ -151,7 +151,7 @@ static UWORD32 ixheaacd_latm_get_value(ia_bit_buf_struct *it_bit_buff) {
|
|||
if (bytes_read <= 3)
|
||||
return ixheaacd_read_bits_buf(it_bit_buff, 8 * bytes_read);
|
||||
else
|
||||
return ixheaacd_add32_sat(ixheaacd_shl32_sat(ixheaacd_read_bits_buf(it_bit_buff, 24), 8),
|
||||
return ixheaac_add32_sat(ixheaac_shl32_sat(ixheaacd_read_bits_buf(it_bit_buff, 24), 8),
|
||||
ixheaacd_read_bits_buf(it_bit_buff, 8));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@
|
|||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_config.h"
|
||||
|
|
|
|||
|
|
@ -23,18 +23,18 @@
|
|||
#include <math.h>
|
||||
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
|
||||
#include "ixheaacd_defines.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -18,18 +18,18 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_defines.h"
|
||||
#include "ixheaacd_aac_rom.h"
|
||||
#include "ixheaacd_aac_imdct.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
|
||||
#include "ixheaacd_pulsedata.h"
|
||||
|
|
@ -255,7 +255,7 @@ VOID ixheaacd_read_scale_factor_data(
|
|||
*ptr_scale_fact_short++ = factor;
|
||||
} else {
|
||||
ptr_pns_info->noise_energy =
|
||||
ixheaacd_add16_sat(ptr_pns_info->noise_energy, norm_value);
|
||||
ixheaac_add16_sat(ptr_pns_info->noise_energy, norm_value);
|
||||
|
||||
pns_band = (num_win_group << 4) +
|
||||
ptr_aac_dec_channel_info->str_ics_info.max_sfb - sfb -
|
||||
|
|
@ -272,7 +272,7 @@ VOID ixheaacd_read_scale_factor_data(
|
|||
*ptr_scale_fact_short++ = -position;
|
||||
} else if (sfb_cb == NOISE_HCB) {
|
||||
ptr_pns_info->noise_energy =
|
||||
ixheaacd_add16_sat(ptr_pns_info->noise_energy, norm_value);
|
||||
ixheaac_add16_sat(ptr_pns_info->noise_energy, norm_value);
|
||||
|
||||
pns_band = (num_win_group << 4) +
|
||||
ptr_aac_dec_channel_info->str_ics_info.max_sfb - sfb -
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_interface.h"
|
||||
#include "ixheaacd_defines.h"
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
#include "ixheaacd_drc_dec.h"
|
||||
#include "ixheaacd_sbrdecoder.h"
|
||||
#include "ixheaacd_mps_polyphase.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
|
||||
#include "ixheaacd_pulsedata.h"
|
||||
#include "ixheaacd_pns.h"
|
||||
|
|
@ -55,9 +55,9 @@
|
|||
#include "ixheaacd_func_def.h"
|
||||
#include "ixheaacd_windows.h"
|
||||
#include "ixheaacd_acelp_com.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
|
||||
#define LSF_GAP_F 50.0f
|
||||
#define FREQ_MAX_F 6400.0f
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include <math.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_interface.h"
|
||||
#include "ixheaacd_tns_usac.h"
|
||||
|
|
@ -38,10 +38,10 @@
|
|||
#include "ixheaacd_func_def.h"
|
||||
#include "ixheaacd_acelp_com.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
|
||||
#define LSF_GAP 50.0f
|
||||
#define FREQ_MAX 6400.0f
|
||||
|
|
|
|||
|
|
@ -19,16 +19,16 @@
|
|||
*/
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
|
||||
#include "ixheaacd_defines.h"
|
||||
|
|
@ -109,15 +109,15 @@ VOID ixheaacd_process_win_seq(WORD32 *coef, WORD32 *prev, WORD32 *out,
|
|||
|
||||
if (flag == 1) {
|
||||
for (i = 0; i < size_07; i++) {
|
||||
WORD32 temp1 = ixheaacd_shl32_dir_sat_limit(
|
||||
ixheaacd_mult32x16in32(coef[size_08 + i], window_long[2 * i]),
|
||||
WORD32 temp1 = ixheaac_shl32_dir_sat_limit(
|
||||
ixheaac_mult32x16in32(coef[size_08 + i], window_long[2 * i]),
|
||||
(q_shift + 1));
|
||||
|
||||
accu = ixheaacd_add32_sat(temp1, ((WORD32)prev[i] << 16));
|
||||
accu = ixheaac_add32_sat(temp1, ((WORD32)prev[i] << 16));
|
||||
out[ch_fac * i] = accu;
|
||||
|
||||
accu = ixheaacd_shl32_dir_sat_limit(
|
||||
ixheaacd_mult32x16in32(-(coef[size_15 - 1 - i]),
|
||||
accu = ixheaac_shl32_dir_sat_limit(
|
||||
ixheaac_mult32x16in32(-(coef[size_15 - 1 - i]),
|
||||
window_long[2 * (size_07 - i) - 1]),
|
||||
q_shift);
|
||||
out[ch_fac * (i + size_09)] = (accu << 1);
|
||||
|
|
@ -132,14 +132,14 @@ VOID ixheaacd_process_win_seq(WORD32 *coef, WORD32 *prev, WORD32 *out,
|
|||
|
||||
} else {
|
||||
for (i = 0; i < size_07; i++) {
|
||||
accu = ixheaacd_mult32x16in32_sat(
|
||||
prev[size_08 - 1 - i], ixheaacd_negate16(window_long[2 * i + 1]));
|
||||
accu = ixheaac_mult32x16in32_sat(
|
||||
prev[size_08 - 1 - i], ixheaac_negate16(window_long[2 * i + 1]));
|
||||
|
||||
out[ch_fac * i] = accu;
|
||||
|
||||
accu = ixheaacd_sub32_sat(
|
||||
ixheaacd_shl32_dir_sat_limit(-(coef[size_15 - 1 - i]), (q_shift - 1)),
|
||||
ixheaacd_mult32x16in32_sat(prev[i + size_01],
|
||||
accu = ixheaac_sub32_sat(
|
||||
ixheaac_shl32_dir_sat_limit(-(coef[size_15 - 1 - i]), (q_shift - 1)),
|
||||
ixheaac_mult32x16in32_sat(prev[i + size_01],
|
||||
window_long[2 * size_07 - 2 - 2 * i]));
|
||||
|
||||
out[ch_fac * (size_09 + i)] = accu;
|
||||
|
|
@ -160,18 +160,18 @@ VOID ixheaacd_process_win_seq(WORD32 *coef, WORD32 *prev, WORD32 *out,
|
|||
WORD32 prev1 = *temp_prev--;
|
||||
WORD16 win4 = *temp_win_sh++;
|
||||
WORD16 win3 = *temp_win_sh++;
|
||||
accu = ixheaacd_sub32_sat(
|
||||
ixheaacd_shl32_dir_sat_limit(ixheaacd_mult32x16in32(temp_coef, win1),
|
||||
accu = ixheaac_sub32_sat(
|
||||
ixheaac_shl32_dir_sat_limit(ixheaac_mult32x16in32(temp_coef, win1),
|
||||
q_shift),
|
||||
ixheaacd_mult32x16in32_sat(prev1, win3));
|
||||
ixheaac_mult32x16in32_sat(prev1, win3));
|
||||
*out1 = accu << flag;
|
||||
out1 += ch_fac;
|
||||
|
||||
accu = ixheaacd_sub32_sat(
|
||||
ixheaacd_shl32_dir_sat_limit(
|
||||
ixheaacd_mult32x16in32(ixheaacd_negate32_sat(temp_coef), win2),
|
||||
accu = ixheaac_sub32_sat(
|
||||
ixheaac_shl32_dir_sat_limit(
|
||||
ixheaac_mult32x16in32(ixheaac_negate32_sat(temp_coef), win2),
|
||||
q_shift),
|
||||
ixheaacd_mult32x16in32_sat(prev1, win4));
|
||||
ixheaac_mult32x16in32_sat(prev1, win4));
|
||||
*out2 = accu << flag;
|
||||
out2 -= ch_fac;
|
||||
}
|
||||
|
|
@ -195,20 +195,20 @@ static PLATFORM_INLINE VOID ixheaacd_long_short_win_process(
|
|||
WORD32 tmp2_cur = *current_tmp2++;
|
||||
WORD16 short1 = *short_ptr--;
|
||||
WORD16 short2 = *short_ptr--;
|
||||
accu = ixheaacd_sub32_sat(
|
||||
ixheaacd_shl32_dir_sat_limit((ixheaacd_mult32x16in32(tmp1_cur, short2) -
|
||||
ixheaacd_mult32x16in32(tmp2_cur, short1)),
|
||||
accu = ixheaac_sub32_sat(
|
||||
ixheaac_shl32_dir_sat_limit((ixheaac_mult32x16in32(tmp1_cur, short2) -
|
||||
ixheaac_mult32x16in32(tmp2_cur, short1)),
|
||||
q_shift),
|
||||
ixheaacd_mult32x16in32_sat(prev[i], long_window_prev[0 - 2 - 2 * i]));
|
||||
ixheaac_mult32x16in32_sat(prev[i], long_window_prev[0 - 2 - 2 * i]));
|
||||
out[ch_fac * (0 + i)] = accu;
|
||||
|
||||
if (flag) {
|
||||
accu = ixheaacd_sub32_sat(
|
||||
ixheaacd_shl32_dir_sat_limit(
|
||||
(ixheaacd_mult32x16in32(ixheaacd_negate32_sat(tmp1_cur), short1) -
|
||||
ixheaacd_mult32x16in32(tmp2_cur, short2)),
|
||||
accu = ixheaac_sub32_sat(
|
||||
ixheaac_shl32_dir_sat_limit(
|
||||
(ixheaac_mult32x16in32(ixheaac_negate32_sat(tmp1_cur), short1) -
|
||||
ixheaac_mult32x16in32(tmp2_cur, short2)),
|
||||
q_shift),
|
||||
ixheaacd_mult32x16in32_sat(prev[size_02 - 1 - i],
|
||||
ixheaac_mult32x16in32_sat(prev[size_02 - 1 - i],
|
||||
long_window_prev[-2 * size_02 + 2 * i]));
|
||||
out[ch_fac * (size_02 - 1 - i)] = accu;
|
||||
}
|
||||
|
|
@ -232,29 +232,29 @@ VOID ixheaacd_long_short_win_seq(WORD32 *current, WORD32 *prev, WORD32 *out,
|
|||
WORD32 i, flag;
|
||||
WORD32 accu;
|
||||
for (i = 0; i < size_07; i++) {
|
||||
accu = ixheaacd_mult32x16in32_sat(
|
||||
prev[size_08 - 1 - i], ixheaacd_negate16(long_window_prev[2 * i + 1]));
|
||||
accu = ixheaac_mult32x16in32_sat(
|
||||
prev[size_08 - 1 - i], ixheaac_negate16(long_window_prev[2 * i + 1]));
|
||||
out[ch_fac * i] = accu;
|
||||
}
|
||||
|
||||
for (i = 0; i < size_01; i++) {
|
||||
accu = ixheaacd_sub32_sat(
|
||||
ixheaacd_shl32_dir_sat_limit(
|
||||
ixheaacd_mult32x16in32(current[size_01 + i],
|
||||
accu = ixheaac_sub32_sat(
|
||||
ixheaac_shl32_dir_sat_limit(
|
||||
ixheaac_mult32x16in32(current[size_01 + i],
|
||||
short_window_prev[2 * i]),
|
||||
q_shift),
|
||||
ixheaacd_mult32x16in32_sat(prev[size_01 - 1 - i],
|
||||
ixheaac_mult32x16in32_sat(prev[size_01 - 1 - i],
|
||||
long_window_prev[2 * size_07 + 1 + 2 * i]));
|
||||
out[ch_fac * (size_07 + i)] = accu;
|
||||
}
|
||||
|
||||
for (i = 0; i < size_01; i++) {
|
||||
accu = ixheaacd_sub32_sat(
|
||||
ixheaacd_shl32_dir_sat_limit(
|
||||
ixheaacd_mult32x16in32(ixheaacd_negate32_sat(current[size_02 - 1 - i]),
|
||||
accu = ixheaac_sub32_sat(
|
||||
ixheaac_shl32_dir_sat_limit(
|
||||
ixheaac_mult32x16in32(ixheaac_negate32_sat(current[size_02 - 1 - i]),
|
||||
short_window_prev[size_02 - 2 * i - 1]),
|
||||
q_shift),
|
||||
ixheaacd_mult32x16in32_sat(prev[i],
|
||||
ixheaac_mult32x16in32_sat(prev[i],
|
||||
long_window_prev[size_16 - 2 - (2 * i)]));
|
||||
out[ch_fac * (size_08 + i)] = accu;
|
||||
}
|
||||
|
|
@ -274,12 +274,12 @@ VOID ixheaacd_long_short_win_seq(WORD32 *current, WORD32 *prev, WORD32 *out,
|
|||
}
|
||||
|
||||
for (i = 0; i < size_01; i++) {
|
||||
accu = (ixheaacd_mult32x16in32(-(current[size_10 - 1 - i]),
|
||||
accu = (ixheaac_mult32x16in32(-(current[size_10 - 1 - i]),
|
||||
short_window[size_02 - 2 * i - 1]) -
|
||||
ixheaacd_mult32x16in32(current[size_06 + i],
|
||||
ixheaac_mult32x16in32(current[size_06 + i],
|
||||
short_window[size_02 - 2 * i - 2]));
|
||||
prev[i] =
|
||||
ixheaacd_round16(ixheaacd_shl32_dir_sat_limit(accu, (q_shift + 1)));
|
||||
ixheaac_round16(ixheaac_shl32_dir_sat_limit(accu, (q_shift + 1)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -289,8 +289,8 @@ VOID ixheaacd_nolap1_32(WORD32 *coef, WORD32 *out, WORD16 q_shift,
|
|||
WORD32 i;
|
||||
|
||||
for (i = 0; i < size_07; i++) {
|
||||
out[ch_fac * i] = ixheaacd_shr32_sat(
|
||||
ixheaacd_negate32_sat(coef[size_07 - 1 - i]), 16 - q_shift);
|
||||
out[ch_fac * i] = ixheaac_shr32_sat(
|
||||
ixheaac_negate32_sat(coef[size_07 - 1 - i]), 16 - q_shift);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -298,8 +298,8 @@ VOID ixheaacd_neg_shift_spec_dec(WORD32 *coef, WORD32 *out, WORD16 q_shift,
|
|||
WORD16 ch_fac) {
|
||||
WORD32 i;
|
||||
for (i = 0; i < SIZE07; i++) {
|
||||
out[ch_fac * i] = (ixheaacd_shl32_dir_sat_limit(
|
||||
ixheaacd_negate32_sat(coef[SIZE07 - 1 - i]), q_shift));
|
||||
out[ch_fac * i] = (ixheaac_shl32_dir_sat_limit(
|
||||
ixheaac_negate32_sat(coef[SIZE07 - 1 - i]), q_shift));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -308,8 +308,8 @@ VOID ixheaacd_Nolap_dec(WORD32 *coef, WORD32 *out, WORD16 q_shift,
|
|||
WORD16 size_07 = 7 * size_01;
|
||||
WORD32 i;
|
||||
for (i = 0; i < size_07; i++) {
|
||||
out[ch_fac * i] = ixheaacd_shl32_dir_sat_limit(
|
||||
ixheaacd_negate32_sat(coef[size_07 - 1 - i]), q_shift);
|
||||
out[ch_fac * i] = ixheaac_shl32_dir_sat_limit(
|
||||
ixheaac_negate32_sat(coef[size_07 - 1 - i]), q_shift);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -318,7 +318,7 @@ VOID ixheaacd_spec_to_overlapbuf_dec(WORD32 *ptr_overlap_buf,
|
|||
WORD32 size) {
|
||||
WORD32 i;
|
||||
for (i = 0; i < size; i++) {
|
||||
ptr_overlap_buf[i] = ixheaacd_shr32_sat(ptr_spec_coeff[i], 16 - q_shift);
|
||||
ptr_overlap_buf[i] = ixheaac_shr32_sat(ptr_spec_coeff[i], 16 - q_shift);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -328,7 +328,7 @@ VOID ixheaacd_overlap_buf_out_dec(WORD32 *out_samples, WORD32 *ptr_overlap_buf,
|
|||
|
||||
for (i = 0; i < size; i++) {
|
||||
out_samples[ch_fac * i] =
|
||||
(ixheaacd_shl32_sat((WORD16)ptr_overlap_buf[i], 15));
|
||||
(ixheaac_shl32_sat((WORD16)ptr_overlap_buf[i], 15));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -339,7 +339,7 @@ VOID ixheaacd_overlap_out_copy_dec(WORD32 *out_samples, WORD32 *ptr_overlap_buf,
|
|||
|
||||
for (i = 0; i < size_01; i++) {
|
||||
out_samples[ch_fac * i] =
|
||||
ixheaacd_shl32_sat((WORD16)ptr_overlap_buf[i], 15);
|
||||
ixheaac_shl32_sat((WORD16)ptr_overlap_buf[i], 15);
|
||||
ptr_overlap_buf[i] = ptr_overlap_buf1[i];
|
||||
}
|
||||
}
|
||||
|
|
@ -829,41 +829,41 @@ void ixheaacd_eld_dec_windowing(WORD32 *ptr_spect_coeff, const WORD16 *p_win,
|
|||
|
||||
win_val = *p_win++;
|
||||
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
win_ovadd_op =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
*out_samples = ixheaacd_round16(ixheaacd_shl32_sat(win_ovadd_op, 1));
|
||||
*out_samples = ixheaac_round16(ixheaac_shl32_sat(win_ovadd_op, 1));
|
||||
out_samples += stride;
|
||||
|
||||
win_val = *p_win++;
|
||||
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
win_ovadd_op =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
*out_samples = ixheaacd_round16(ixheaacd_shl32_sat(win_ovadd_op, 1));
|
||||
*out_samples = ixheaac_round16(ixheaac_shl32_sat(win_ovadd_op, 1));
|
||||
out_samples += stride;
|
||||
win_val = *p_win++;
|
||||
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
win_ovadd_op =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
*out_samples = ixheaacd_round16(ixheaacd_shl32_sat(win_ovadd_op, 1));
|
||||
*out_samples = ixheaac_round16(ixheaac_shl32_sat(win_ovadd_op, 1));
|
||||
out_samples += stride;
|
||||
|
||||
win_val = *p_win++;
|
||||
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
win_ovadd_op =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
*out_samples = ixheaacd_round16(ixheaacd_shl32_sat(win_ovadd_op, 1));
|
||||
*out_samples = ixheaac_round16(ixheaac_shl32_sat(win_ovadd_op, 1));
|
||||
out_samples += stride;
|
||||
}
|
||||
|
||||
|
|
@ -874,24 +874,24 @@ void ixheaacd_eld_dec_windowing(WORD32 *ptr_spect_coeff, const WORD16 *p_win,
|
|||
WORD32 win_op;
|
||||
WORD16 win_val;
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
}
|
||||
|
||||
loop_size = ((((framesize << 2) - delay) - (framesize * 3)) >> 2) - 1;
|
||||
|
|
@ -900,20 +900,20 @@ void ixheaacd_eld_dec_windowing(WORD32 *ptr_spect_coeff, const WORD16 *p_win,
|
|||
WORD16 win_val;
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shl32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shl32(win_op, q_shift);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shl32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shl32(win_op, q_shift);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shl32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shl32(win_op, q_shift);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shl32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shl32(win_op, q_shift);
|
||||
}
|
||||
} else {
|
||||
q_shift = -q_shift;
|
||||
|
|
@ -924,39 +924,39 @@ void ixheaacd_eld_dec_windowing(WORD32 *ptr_spect_coeff, const WORD16 *p_win,
|
|||
WORD16 win_val;
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
win_ovadd_op =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
*out_samples = ixheaacd_round16(ixheaacd_shl32(win_ovadd_op, 1));
|
||||
*out_samples = ixheaac_round16(ixheaac_shl32(win_ovadd_op, 1));
|
||||
out_samples += stride;
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
win_ovadd_op =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
*out_samples = ixheaacd_round16(ixheaacd_shl32(win_ovadd_op, 1));
|
||||
*out_samples = ixheaac_round16(ixheaac_shl32(win_ovadd_op, 1));
|
||||
out_samples += stride;
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
win_ovadd_op =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
*out_samples = ixheaacd_round16(ixheaacd_shl32(win_ovadd_op, 1));
|
||||
*out_samples = ixheaac_round16(ixheaac_shl32(win_ovadd_op, 1));
|
||||
out_samples += stride;
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
win_ovadd_op =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
*out_samples = ixheaacd_round16(ixheaacd_shl32(win_ovadd_op, 1));
|
||||
*out_samples = ixheaac_round16(ixheaac_shl32(win_ovadd_op, 1));
|
||||
out_samples += stride;
|
||||
}
|
||||
|
||||
|
|
@ -967,44 +967,44 @@ void ixheaacd_eld_dec_windowing(WORD32 *ptr_spect_coeff, const WORD16 *p_win,
|
|||
WORD32 win_op;
|
||||
WORD16 win_val;
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
}
|
||||
loop_size = ((((framesize << 2) - delay) - (framesize * 3)) >> 2) - 1;
|
||||
for (i = loop_size; i >= 0; i--) {
|
||||
WORD32 win_op;
|
||||
WORD16 win_val;
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shr32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shr32(win_op, q_shift);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shr32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shr32(win_op, q_shift);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shr32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shr32(win_op, q_shift);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shr32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shr32(win_op, q_shift);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1036,36 +1036,36 @@ void ixheaacd_eld_dec_windowing_32bit(WORD32 *ptr_spect_coeff,
|
|||
|
||||
win_val = *p_win++;
|
||||
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
*out_samples =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
out_samples += stride;
|
||||
|
||||
win_val = *p_win++;
|
||||
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
*out_samples =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
out_samples += stride;
|
||||
win_val = *p_win++;
|
||||
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
*out_samples =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
out_samples += stride;
|
||||
|
||||
win_val = *p_win++;
|
||||
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
*out_samples =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
out_samples += stride;
|
||||
}
|
||||
|
|
@ -1077,24 +1077,24 @@ void ixheaacd_eld_dec_windowing_32bit(WORD32 *ptr_spect_coeff,
|
|||
WORD32 win_op;
|
||||
WORD16 win_val;
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shl32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shl32(win_op, q_shift), *ptr_out++);
|
||||
}
|
||||
|
||||
loop_size = ((((framesize << 2) - delay) - (framesize * 3)) >> 2) - 1;
|
||||
|
|
@ -1103,20 +1103,20 @@ void ixheaacd_eld_dec_windowing_32bit(WORD32 *ptr_spect_coeff,
|
|||
WORD16 win_val;
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shl32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shl32(win_op, q_shift);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shl32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shl32(win_op, q_shift);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shl32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shl32(win_op, q_shift);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shl32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shl32(win_op, q_shift);
|
||||
}
|
||||
} else {
|
||||
q_shift = -q_shift;
|
||||
|
|
@ -1126,34 +1126,34 @@ void ixheaacd_eld_dec_windowing_32bit(WORD32 *ptr_spect_coeff,
|
|||
WORD16 win_val;
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
*out_samples =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
out_samples += stride;
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
*out_samples =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
out_samples += stride;
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
*out_samples =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
out_samples += stride;
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
|
||||
*out_samples =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
out_samples += stride;
|
||||
}
|
||||
|
|
@ -1165,44 +1165,44 @@ void ixheaacd_eld_dec_windowing_32bit(WORD32 *ptr_spect_coeff,
|
|||
WORD32 win_op;
|
||||
WORD16 win_val;
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ =
|
||||
ixheaacd_add32_sat(ixheaacd_shr32(win_op, q_shift), *ptr_out++);
|
||||
ixheaac_add32_sat(ixheaac_shr32(win_op, q_shift), *ptr_out++);
|
||||
}
|
||||
loop_size = ((((framesize << 2) - delay) - (framesize * 3)) >> 2) - 1;
|
||||
for (i = loop_size; i >= 0; i--) {
|
||||
WORD32 win_op;
|
||||
WORD16 win_val;
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shr32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shr32(win_op, q_shift);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shr32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shr32(win_op, q_shift);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shr32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shr32(win_op, q_shift);
|
||||
|
||||
win_val = *p_win++;
|
||||
win_op = ixheaacd_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaacd_shr32(win_op, q_shift);
|
||||
win_op = ixheaac_mult32x16in32(*ptr_z++, (win_val));
|
||||
*p_out2++ = ixheaac_shr32(win_op, q_shift);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,15 +20,15 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "ixheaacd_sbr_common.h"
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaacd_basic_ops.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaac_basic_ops.h"
|
||||
|
||||
#include "ixheaacd_basic_op.h"
|
||||
#include "ixheaac_basic_op.h"
|
||||
#include "ixheaacd_intrinsics.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_basic_funcs.h"
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
|
||||
#include "ixheaacd_qmf_dec.h"
|
||||
#include "ixheaacd_env_calc.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
|
||||
#include "ixheaacd_pvc_dec.h"
|
||||
#include "ixheaacd_sbr_dec.h"
|
||||
|
|
@ -85,7 +85,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_mac32x16hin32(WORD32 a, WORD32 b,
|
|||
WORD32 c) {
|
||||
WORD32 result;
|
||||
|
||||
result = a + ixheaacd_mult32x16hin32(b, c);
|
||||
result = a + ixheaac_mult32x16hin32(b, c);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -94,7 +94,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_macn32x16hin32(WORD32 a, WORD32 b,
|
|||
WORD32 c) {
|
||||
WORD32 result;
|
||||
|
||||
result = a - ixheaacd_mult32x16hin32(b, c);
|
||||
result = a - ixheaac_mult32x16hin32(b, c);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -140,23 +140,23 @@ VOID ixheaacd_filterstep3(WORD16 a0r, WORD16 a0i, WORD16 a1r, WORD16 a1i,
|
|||
qmf_real = (curr >> LPC_SCALE_FACTOR);
|
||||
qmf_imag = (curi >> LPC_SCALE_FACTOR);
|
||||
|
||||
accu = ixheaacd_sub32(
|
||||
ixheaacd_add32(ixheaacd_sub32(ixheaacd_mult32x16in32(prev1r, coef1r),
|
||||
ixheaacd_mult32x16in32(prev1i, coef1i)),
|
||||
ixheaacd_mult32x16in32(prev2r, coef2r)),
|
||||
ixheaacd_mult32x16in32(prev2i, coef2i));
|
||||
accu = ixheaac_sub32(
|
||||
ixheaac_add32(ixheaac_sub32(ixheaac_mult32x16in32(prev1r, coef1r),
|
||||
ixheaac_mult32x16in32(prev1i, coef1i)),
|
||||
ixheaac_mult32x16in32(prev2r, coef2r)),
|
||||
ixheaac_mult32x16in32(prev2i, coef2i));
|
||||
|
||||
*p_dst = ixheaacd_add32(qmf_real, (accu << 1));
|
||||
*p_dst = ixheaac_add32(qmf_real, (accu << 1));
|
||||
p_dst += 64;
|
||||
|
||||
accu = ixheaacd_add32(
|
||||
ixheaacd_add32_sat(
|
||||
ixheaacd_add32_sat(ixheaacd_mult32x16in32(prev1r, coef1i),
|
||||
ixheaacd_mult32x16in32(prev1i, coef1r)),
|
||||
ixheaacd_mult32x16in32(prev2r, coef2i)),
|
||||
ixheaacd_mult32x16in32(prev2i, coef2r));
|
||||
accu = ixheaac_add32(
|
||||
ixheaac_add32_sat(
|
||||
ixheaac_add32_sat(ixheaac_mult32x16in32(prev1r, coef1i),
|
||||
ixheaac_mult32x16in32(prev1i, coef1r)),
|
||||
ixheaac_mult32x16in32(prev2r, coef2i)),
|
||||
ixheaac_mult32x16in32(prev2i, coef2r));
|
||||
|
||||
*p_dst = ixheaacd_add32(qmf_imag, (accu << 1));
|
||||
*p_dst = ixheaac_add32(qmf_imag, (accu << 1));
|
||||
p_dst += 64;
|
||||
|
||||
prev2r = prev1r;
|
||||
|
|
@ -185,72 +185,72 @@ VOID ixheaacd_covariance_matrix_calc_dec_960(
|
|||
j = ixheaacd_drc_offset;
|
||||
sub_sign_xlow = temp_buf_ptr;
|
||||
|
||||
temp1 = ixheaacd_shl32_dir(*sub_sign_xlow, factor);
|
||||
temp1 = ixheaac_shl32_dir(*sub_sign_xlow, factor);
|
||||
sub_sign_xlow += 64;
|
||||
|
||||
temp2 = ixheaacd_shl32_dir(*sub_sign_xlow, factor);
|
||||
temp2 = ixheaac_shl32_dir(*sub_sign_xlow, factor);
|
||||
sub_sign_xlow += 64;
|
||||
|
||||
for (; (j = j + 3) <= ixheaacd_drc_offset + len;) {
|
||||
temp3 = ixheaacd_shl32_dir(*sub_sign_xlow, factor);
|
||||
temp3 = ixheaac_shl32_dir(*sub_sign_xlow, factor);
|
||||
sub_sign_xlow += 64;
|
||||
|
||||
t_phi_01 += ixheaacd_mult32x16hin32(temp3, temp2);
|
||||
t_phi_02 += ixheaacd_mult32x16hin32(temp3, temp1);
|
||||
t_phi_11 += ixheaacd_mult32x16hin32(temp2, temp2);
|
||||
t_phi_01 += ixheaac_mult32x16hin32(temp3, temp2);
|
||||
t_phi_02 += ixheaac_mult32x16hin32(temp3, temp1);
|
||||
t_phi_11 += ixheaac_mult32x16hin32(temp2, temp2);
|
||||
|
||||
temp1 = ixheaacd_shl32_dir(*sub_sign_xlow, factor);
|
||||
temp1 = ixheaac_shl32_dir(*sub_sign_xlow, factor);
|
||||
sub_sign_xlow += 64;
|
||||
|
||||
t_phi_01 += ixheaacd_mult32x16hin32(temp1, temp3);
|
||||
t_phi_02 += ixheaacd_mult32x16hin32(temp1, temp2);
|
||||
t_phi_11 += ixheaacd_mult32x16hin32(temp3, temp3);
|
||||
t_phi_01 += ixheaac_mult32x16hin32(temp1, temp3);
|
||||
t_phi_02 += ixheaac_mult32x16hin32(temp1, temp2);
|
||||
t_phi_11 += ixheaac_mult32x16hin32(temp3, temp3);
|
||||
|
||||
temp2 = ixheaacd_shl32_dir(*sub_sign_xlow, factor);
|
||||
temp2 = ixheaac_shl32_dir(*sub_sign_xlow, factor);
|
||||
sub_sign_xlow += 64;
|
||||
|
||||
t_phi_01 += ixheaacd_mult32x16hin32(temp2, temp1);
|
||||
t_phi_02 += ixheaacd_mult32x16hin32(temp2, temp3);
|
||||
t_phi_11 += ixheaacd_mult32x16hin32(temp1, temp1);
|
||||
t_phi_01 += ixheaac_mult32x16hin32(temp2, temp1);
|
||||
t_phi_02 += ixheaac_mult32x16hin32(temp2, temp3);
|
||||
t_phi_11 += ixheaac_mult32x16hin32(temp1, temp1);
|
||||
}
|
||||
|
||||
if (AUTO_CORR_LEN_1024 == len) {
|
||||
temp3 = ixheaacd_shl32_dir(*sub_sign_xlow, factor);
|
||||
temp3 = ixheaac_shl32_dir(*sub_sign_xlow, factor);
|
||||
sub_sign_xlow += 64;
|
||||
|
||||
t_phi_01 += ixheaacd_mult32x16hin32(temp3, temp2);
|
||||
t_phi_02 += ixheaacd_mult32x16hin32(temp3, temp1);
|
||||
t_phi_11 += ixheaacd_mult32x16hin32(temp2, temp2);
|
||||
t_phi_01 += ixheaac_mult32x16hin32(temp3, temp2);
|
||||
t_phi_02 += ixheaac_mult32x16hin32(temp3, temp1);
|
||||
t_phi_11 += ixheaac_mult32x16hin32(temp2, temp2);
|
||||
|
||||
temp1 = ixheaacd_shl32_dir(*sub_sign_xlow, factor);
|
||||
temp1 = ixheaac_shl32_dir(*sub_sign_xlow, factor);
|
||||
sub_sign_xlow += 64;
|
||||
|
||||
t_phi_01 += ixheaacd_mult32x16hin32(temp1, temp3);
|
||||
t_phi_02 += ixheaacd_mult32x16hin32(temp1, temp2);
|
||||
t_phi_11 += ixheaacd_mult32x16hin32(temp3, temp3);
|
||||
t_phi_01 += ixheaac_mult32x16hin32(temp1, temp3);
|
||||
t_phi_02 += ixheaac_mult32x16hin32(temp1, temp2);
|
||||
t_phi_11 += ixheaac_mult32x16hin32(temp3, temp3);
|
||||
}
|
||||
|
||||
temp2 = ixheaacd_shl32_dir(*temp_buf_ptr, factor);
|
||||
temp4 = ixheaacd_shl32_dir(*(temp_buf_ptr + 64), factor);
|
||||
temp2 = ixheaac_shl32_dir(*temp_buf_ptr, factor);
|
||||
temp4 = ixheaac_shl32_dir(*(temp_buf_ptr + 64), factor);
|
||||
|
||||
if (AUTO_CORR_LEN_960 == len) {
|
||||
temp3 = ixheaacd_shl32_dir(sub_sign_xlow[-128], factor);
|
||||
temp1 = ixheaacd_shl32_dir(sub_sign_xlow[-64], factor);
|
||||
temp3 = ixheaac_shl32_dir(sub_sign_xlow[-128], factor);
|
||||
temp1 = ixheaac_shl32_dir(sub_sign_xlow[-64], factor);
|
||||
}
|
||||
|
||||
t_phi_12 = (t_phi_01 - ixheaacd_mult32x16hin32(temp1, temp3) +
|
||||
ixheaacd_mult32x16hin32(temp4, temp2));
|
||||
t_phi_12 = (t_phi_01 - ixheaac_mult32x16hin32(temp1, temp3) +
|
||||
ixheaac_mult32x16hin32(temp4, temp2));
|
||||
|
||||
t_phi_22 = (t_phi_11 - ixheaacd_mult32x16hin32(temp3, temp3) +
|
||||
ixheaacd_mult32x16hin32(temp2, temp2));
|
||||
t_phi_22 = (t_phi_11 - ixheaac_mult32x16hin32(temp3, temp3) +
|
||||
ixheaac_mult32x16hin32(temp2, temp2));
|
||||
|
||||
max_val = ixheaacd_abs32_nrm(t_phi_01);
|
||||
max_val = max_val | ixheaacd_abs32_nrm(t_phi_02);
|
||||
max_val = max_val | ixheaacd_abs32_nrm(t_phi_12);
|
||||
max_val = ixheaac_abs32_nrm(t_phi_01);
|
||||
max_val = max_val | ixheaac_abs32_nrm(t_phi_02);
|
||||
max_val = max_val | ixheaac_abs32_nrm(t_phi_12);
|
||||
max_val = max_val | (t_phi_11);
|
||||
max_val = max_val | (t_phi_22);
|
||||
|
||||
q_factor = ixheaacd_pnorm32(max_val);
|
||||
q_factor = ixheaac_pnorm32(max_val);
|
||||
|
||||
cov_matrix->phi_11 = (t_phi_11 << q_factor);
|
||||
cov_matrix->phi_22 = (t_phi_22 << q_factor);
|
||||
|
|
@ -258,9 +258,9 @@ VOID ixheaacd_covariance_matrix_calc_dec_960(
|
|||
cov_matrix->phi_02 = (t_phi_02 << q_factor);
|
||||
cov_matrix->phi_12 = (t_phi_12 << q_factor);
|
||||
|
||||
cov_matrix->d = ixheaacd_sub32_sat(
|
||||
ixheaacd_mult32(cov_matrix->phi_22, cov_matrix->phi_11),
|
||||
ixheaacd_mult32(cov_matrix->phi_12, cov_matrix->phi_12));
|
||||
cov_matrix->d = ixheaac_sub32_sat(
|
||||
ixheaac_mult32(cov_matrix->phi_22, cov_matrix->phi_11),
|
||||
ixheaac_mult32(cov_matrix->phi_12, cov_matrix->phi_12));
|
||||
|
||||
cov_matrix++;
|
||||
temp_buf_ptr++;
|
||||
|
|
@ -286,73 +286,73 @@ VOID ixheaacd_covariance_matrix_calc_dec(
|
|||
j = ixheaacd_drc_offset;
|
||||
sub_sign_xlow = temp_buf_ptr;
|
||||
|
||||
temp1 = ixheaacd_shl32_dir(*sub_sign_xlow, factor);
|
||||
temp1 = ixheaac_shl32_dir(*sub_sign_xlow, factor);
|
||||
sub_sign_xlow += 64;
|
||||
|
||||
temp2 = ixheaacd_shl32_dir(*sub_sign_xlow, factor);
|
||||
temp2 = ixheaac_shl32_dir(*sub_sign_xlow, factor);
|
||||
sub_sign_xlow += 64;
|
||||
|
||||
for (; (j = j + 3) <= ixheaacd_drc_offset + len;) {
|
||||
temp3 = ixheaacd_shl32_dir(*sub_sign_xlow, factor);
|
||||
temp3 = ixheaac_shl32_dir(*sub_sign_xlow, factor);
|
||||
sub_sign_xlow += 64;
|
||||
|
||||
t_phi_01 += ixheaacd_mult32x16hin32(temp3, temp2);
|
||||
t_phi_02 += ixheaacd_mult32x16hin32(temp3, temp1);
|
||||
t_phi_11 += ixheaacd_mult32x16hin32(temp2, temp2);
|
||||
t_phi_01 += ixheaac_mult32x16hin32(temp3, temp2);
|
||||
t_phi_02 += ixheaac_mult32x16hin32(temp3, temp1);
|
||||
t_phi_11 += ixheaac_mult32x16hin32(temp2, temp2);
|
||||
|
||||
temp1 = ixheaacd_shl32_dir(*sub_sign_xlow, factor);
|
||||
temp1 = ixheaac_shl32_dir(*sub_sign_xlow, factor);
|
||||
sub_sign_xlow += 64;
|
||||
|
||||
t_phi_01 += ixheaacd_mult32x16hin32(temp1, temp3);
|
||||
t_phi_02 += ixheaacd_mult32x16hin32(temp1, temp2);
|
||||
t_phi_11 += ixheaacd_mult32x16hin32(temp3, temp3);
|
||||
t_phi_01 += ixheaac_mult32x16hin32(temp1, temp3);
|
||||
t_phi_02 += ixheaac_mult32x16hin32(temp1, temp2);
|
||||
t_phi_11 += ixheaac_mult32x16hin32(temp3, temp3);
|
||||
|
||||
temp2 = ixheaacd_shl32_dir(*sub_sign_xlow, factor);
|
||||
temp2 = ixheaac_shl32_dir(*sub_sign_xlow, factor);
|
||||
sub_sign_xlow += 64;
|
||||
|
||||
t_phi_01 += ixheaacd_mult32x16hin32(temp2, temp1);
|
||||
t_phi_02 += ixheaacd_mult32x16hin32(temp2, temp3);
|
||||
t_phi_11 += ixheaacd_mult32x16hin32(temp1, temp1);
|
||||
t_phi_01 += ixheaac_mult32x16hin32(temp2, temp1);
|
||||
t_phi_02 += ixheaac_mult32x16hin32(temp2, temp3);
|
||||
t_phi_11 += ixheaac_mult32x16hin32(temp1, temp1);
|
||||
}
|
||||
|
||||
if (AUTO_CORR_LEN_960 != len) {
|
||||
temp3 = ixheaacd_shl32_dir(*sub_sign_xlow, factor);
|
||||
temp3 = ixheaac_shl32_dir(*sub_sign_xlow, factor);
|
||||
sub_sign_xlow += 64;
|
||||
|
||||
t_phi_01 += ixheaacd_mult32x16hin32(temp3, temp2);
|
||||
t_phi_02 += ixheaacd_mult32x16hin32(temp3, temp1);
|
||||
t_phi_11 += ixheaacd_mult32x16hin32(temp2, temp2);
|
||||
t_phi_01 += ixheaac_mult32x16hin32(temp3, temp2);
|
||||
t_phi_02 += ixheaac_mult32x16hin32(temp3, temp1);
|
||||
t_phi_11 += ixheaac_mult32x16hin32(temp2, temp2);
|
||||
|
||||
temp1 = ixheaacd_shl32_dir(*sub_sign_xlow, factor);
|
||||
temp1 = ixheaac_shl32_dir(*sub_sign_xlow, factor);
|
||||
sub_sign_xlow += 64;
|
||||
|
||||
t_phi_01 += ixheaacd_mult32x16hin32(temp1, temp3);
|
||||
t_phi_02 += ixheaacd_mult32x16hin32(temp1, temp2);
|
||||
t_phi_11 += ixheaacd_mult32x16hin32(temp3, temp3);
|
||||
t_phi_01 += ixheaac_mult32x16hin32(temp1, temp3);
|
||||
t_phi_02 += ixheaac_mult32x16hin32(temp1, temp2);
|
||||
t_phi_11 += ixheaac_mult32x16hin32(temp3, temp3);
|
||||
}
|
||||
if (AUTO_CORR_LEN_960 == len) {
|
||||
temp3 = ixheaacd_shl32_dir(sub_sign_xlow[-128], factor);
|
||||
temp3 = ixheaac_shl32_dir(sub_sign_xlow[-128], factor);
|
||||
|
||||
temp3 = ixheaacd_shl32_dir(sub_sign_xlow[-64], factor);
|
||||
temp3 = ixheaac_shl32_dir(sub_sign_xlow[-64], factor);
|
||||
|
||||
}
|
||||
|
||||
temp2 = ixheaacd_shl32_dir(*temp_buf_ptr, factor);
|
||||
temp4 = ixheaacd_shl32_dir(*(temp_buf_ptr + 64), factor);
|
||||
temp2 = ixheaac_shl32_dir(*temp_buf_ptr, factor);
|
||||
temp4 = ixheaac_shl32_dir(*(temp_buf_ptr + 64), factor);
|
||||
|
||||
t_phi_12 = (t_phi_01 - ixheaacd_mult32x16hin32(temp1, temp3) +
|
||||
ixheaacd_mult32x16hin32(temp4, temp2));
|
||||
t_phi_12 = (t_phi_01 - ixheaac_mult32x16hin32(temp1, temp3) +
|
||||
ixheaac_mult32x16hin32(temp4, temp2));
|
||||
|
||||
t_phi_22 = (t_phi_11 - ixheaacd_mult32x16hin32(temp3, temp3) +
|
||||
ixheaacd_mult32x16hin32(temp2, temp2));
|
||||
t_phi_22 = (t_phi_11 - ixheaac_mult32x16hin32(temp3, temp3) +
|
||||
ixheaac_mult32x16hin32(temp2, temp2));
|
||||
|
||||
max_val = ixheaacd_abs32_nrm(t_phi_01);
|
||||
max_val = max_val | ixheaacd_abs32_nrm(t_phi_02);
|
||||
max_val = max_val | ixheaacd_abs32_nrm(t_phi_12);
|
||||
max_val = ixheaac_abs32_nrm(t_phi_01);
|
||||
max_val = max_val | ixheaac_abs32_nrm(t_phi_02);
|
||||
max_val = max_val | ixheaac_abs32_nrm(t_phi_12);
|
||||
max_val = max_val | (t_phi_11);
|
||||
max_val = max_val | (t_phi_22);
|
||||
|
||||
q_factor = ixheaacd_pnorm32(max_val);
|
||||
q_factor = ixheaac_pnorm32(max_val);
|
||||
|
||||
cov_matrix->phi_11 = (t_phi_11 << q_factor);
|
||||
cov_matrix->phi_22 = (t_phi_22 << q_factor);
|
||||
|
|
@ -360,9 +360,9 @@ VOID ixheaacd_covariance_matrix_calc_dec(
|
|||
cov_matrix->phi_02 = (t_phi_02 << q_factor);
|
||||
cov_matrix->phi_12 = (t_phi_12 << q_factor);
|
||||
|
||||
cov_matrix->d = ixheaacd_sub32_sat(
|
||||
ixheaacd_mult32(cov_matrix->phi_22, cov_matrix->phi_11),
|
||||
ixheaacd_mult32(cov_matrix->phi_12, cov_matrix->phi_12));
|
||||
cov_matrix->d = ixheaac_sub32_sat(
|
||||
ixheaac_mult32(cov_matrix->phi_22, cov_matrix->phi_11),
|
||||
ixheaac_mult32(cov_matrix->phi_12, cov_matrix->phi_12));
|
||||
|
||||
cov_matrix++;
|
||||
temp_buf_ptr++;
|
||||
|
|
@ -394,18 +394,18 @@ VOID ixheaacd_covariance_matrix_calc_2_dec(
|
|||
curr_real = real_buffer[0];
|
||||
curr_imag = img_buffer[0];
|
||||
|
||||
curr_real = ixheaacd_shr32(curr_real, 3);
|
||||
curr_imag = ixheaacd_shr32(curr_imag, 3);
|
||||
prev_real = ixheaacd_shr32(prev_real, 3);
|
||||
prev_imag = ixheaacd_shr32(prev_imag, 3);
|
||||
curr_real = ixheaac_shr32(curr_real, 3);
|
||||
curr_imag = ixheaac_shr32(curr_imag, 3);
|
||||
prev_real = ixheaac_shr32(prev_real, 3);
|
||||
prev_imag = ixheaac_shr32(prev_imag, 3);
|
||||
|
||||
t_phi_01 = ixheaacd_mult32x16hin32(curr_real, prev_real);
|
||||
t_phi_01 = ixheaac_mult32x16hin32(curr_real, prev_real);
|
||||
t_phi_01 = ixheaacd_mac32x16hin32(t_phi_01, curr_imag, prev_imag);
|
||||
|
||||
t_phi_01_i = ixheaacd_mult32x16hin32(curr_imag, prev_real);
|
||||
t_phi_01_i = ixheaac_mult32x16hin32(curr_imag, prev_real);
|
||||
t_phi_01_i = ixheaacd_macn32x16hin32(t_phi_01_i, curr_real, prev_imag);
|
||||
|
||||
t_phi_11 = ixheaacd_mult32x16hin32(prev_real, prev_real);
|
||||
t_phi_11 = ixheaac_mult32x16hin32(prev_real, prev_real);
|
||||
t_phi_11 = ixheaacd_mac32x16hin32(t_phi_11, prev_imag, prev_imag);
|
||||
|
||||
{
|
||||
|
|
@ -422,8 +422,8 @@ VOID ixheaacd_covariance_matrix_calc_2_dec(
|
|||
curr_imag = *imag1;
|
||||
imag1 += 128;
|
||||
|
||||
curr_real = ixheaacd_shr32(curr_real, 3);
|
||||
curr_imag = ixheaacd_shr32(curr_imag, 3);
|
||||
curr_real = ixheaac_shr32(curr_real, 3);
|
||||
curr_imag = ixheaac_shr32(curr_imag, 3);
|
||||
|
||||
t_phi_01 = ixheaacd_mac32x16hin32(t_phi_01, curr_real, prev_real);
|
||||
t_phi_01 = ixheaacd_mac32x16hin32(t_phi_01, curr_imag, prev_imag);
|
||||
|
|
@ -439,8 +439,8 @@ VOID ixheaacd_covariance_matrix_calc_2_dec(
|
|||
prev_imag = *imag1;
|
||||
imag1 += 128;
|
||||
|
||||
prev_real = ixheaacd_shr32(prev_real, 3);
|
||||
prev_imag = ixheaacd_shr32(prev_imag, 3);
|
||||
prev_real = ixheaac_shr32(prev_real, 3);
|
||||
prev_imag = ixheaac_shr32(prev_imag, 3);
|
||||
|
||||
t_phi_01 = ixheaacd_mac32x16hin32(t_phi_01, prev_real, curr_real);
|
||||
t_phi_01 = ixheaacd_mac32x16hin32(t_phi_01, prev_imag, curr_imag);
|
||||
|
|
@ -456,8 +456,8 @@ VOID ixheaacd_covariance_matrix_calc_2_dec(
|
|||
curr_real = *real1;
|
||||
curr_imag = *imag1;
|
||||
|
||||
curr_real = ixheaacd_shr32(curr_real, 3);
|
||||
curr_imag = ixheaacd_shr32(curr_imag, 3);
|
||||
curr_real = ixheaac_shr32(curr_real, 3);
|
||||
curr_imag = ixheaac_shr32(curr_imag, 3);
|
||||
|
||||
t_phi_01 = ixheaacd_mac32x16hin32(t_phi_01, curr_real, prev_real);
|
||||
t_phi_01 = ixheaacd_mac32x16hin32(t_phi_01, curr_imag, prev_imag);
|
||||
|
|
@ -475,8 +475,8 @@ VOID ixheaacd_covariance_matrix_calc_2_dec(
|
|||
WORD32 curr_real = real_buffer[-2 * 128];
|
||||
WORD32 curr_imag = img_buffer[-2 * 128];
|
||||
|
||||
curr_real = ixheaacd_shr32(curr_real, 3);
|
||||
curr_imag = ixheaacd_shr32(curr_imag, 3);
|
||||
curr_real = ixheaac_shr32(curr_real, 3);
|
||||
curr_imag = ixheaac_shr32(curr_imag, 3);
|
||||
|
||||
t_phi_22 = ixheaacd_mac32x16hin32(t_phi_22, curr_real, curr_real);
|
||||
t_phi_22 = ixheaacd_mac32x16hin32(t_phi_22, curr_imag, curr_imag);
|
||||
|
|
@ -484,8 +484,8 @@ VOID ixheaacd_covariance_matrix_calc_2_dec(
|
|||
curr_real = real_buffer[(slots - 2) * 128];
|
||||
curr_imag = img_buffer[(slots - 2) * 128];
|
||||
|
||||
curr_real = ixheaacd_shr32(curr_real, 3);
|
||||
curr_imag = ixheaacd_shr32(curr_imag, 3);
|
||||
curr_real = ixheaac_shr32(curr_real, 3);
|
||||
curr_imag = ixheaac_shr32(curr_imag, 3);
|
||||
|
||||
t_phi_11 = ixheaacd_mac32x16hin32(t_phi_11, curr_real, curr_real);
|
||||
t_phi_11 = ixheaacd_mac32x16hin32(t_phi_11, curr_imag, curr_imag);
|
||||
|
|
@ -543,10 +543,10 @@ VOID ixheaacd_covariance_matrix_calc_2_dec(
|
|||
imag1 = img_buffer[p * 128];
|
||||
imag2 = img_buffer[(p - 2) * 128];
|
||||
|
||||
real1 = ixheaacd_shr32(real1, 3);
|
||||
real2 = ixheaacd_shr32(real2, 3);
|
||||
imag1 = ixheaacd_shr32(imag1, 3);
|
||||
imag2 = ixheaacd_shr32(imag2, 3);
|
||||
real1 = ixheaac_shr32(real1, 3);
|
||||
real2 = ixheaac_shr32(real2, 3);
|
||||
imag1 = ixheaac_shr32(imag1, 3);
|
||||
imag2 = ixheaac_shr32(imag2, 3);
|
||||
|
||||
t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, real1, real2);
|
||||
t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, imag1, imag2);
|
||||
|
|
@ -558,10 +558,10 @@ VOID ixheaacd_covariance_matrix_calc_2_dec(
|
|||
imag1 = img_buffer[(p + 1) * 128];
|
||||
imag2 = img_buffer[(p - 1) * 128];
|
||||
|
||||
real1 = ixheaacd_shr32(real1, 3);
|
||||
real2 = ixheaacd_shr32(real2, 3);
|
||||
imag1 = ixheaacd_shr32(imag1, 3);
|
||||
imag2 = ixheaacd_shr32(imag2, 3);
|
||||
real1 = ixheaac_shr32(real1, 3);
|
||||
real2 = ixheaac_shr32(real2, 3);
|
||||
imag1 = ixheaac_shr32(imag1, 3);
|
||||
imag2 = ixheaac_shr32(imag2, 3);
|
||||
|
||||
t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, real1, real2);
|
||||
t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, imag1, imag2);
|
||||
|
|
@ -573,10 +573,10 @@ VOID ixheaacd_covariance_matrix_calc_2_dec(
|
|||
imag1 = img_buffer[(p + 2) * 128];
|
||||
imag2 = img_buffer[p * 128];
|
||||
|
||||
real1 = ixheaacd_shr32(real1, 3);
|
||||
real2 = ixheaacd_shr32(real2, 3);
|
||||
imag1 = ixheaacd_shr32(imag1, 3);
|
||||
imag2 = ixheaacd_shr32(imag2, 3);
|
||||
real1 = ixheaac_shr32(real1, 3);
|
||||
real2 = ixheaac_shr32(real2, 3);
|
||||
imag1 = ixheaac_shr32(imag1, 3);
|
||||
imag2 = ixheaac_shr32(imag2, 3);
|
||||
|
||||
t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, real1, real2);
|
||||
t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, imag1, imag2);
|
||||
|
|
@ -588,10 +588,10 @@ VOID ixheaacd_covariance_matrix_calc_2_dec(
|
|||
imag1 = img_buffer[(p + 3) * 128];
|
||||
imag2 = img_buffer[(p + 1) * 128];
|
||||
|
||||
real1 = ixheaacd_shr32(real1, 3);
|
||||
real2 = ixheaacd_shr32(real2, 3);
|
||||
imag1 = ixheaacd_shr32(imag1, 3);
|
||||
imag2 = ixheaacd_shr32(imag2, 3);
|
||||
real1 = ixheaac_shr32(real1, 3);
|
||||
real2 = ixheaac_shr32(real2, 3);
|
||||
imag1 = ixheaac_shr32(imag1, 3);
|
||||
imag2 = ixheaac_shr32(imag2, 3);
|
||||
|
||||
t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, real1, real2);
|
||||
t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, imag1, imag2);
|
||||
|
|
@ -599,7 +599,7 @@ VOID ixheaacd_covariance_matrix_calc_2_dec(
|
|||
t_phi_02_i = ixheaacd_macn32x16hin32(t_phi_02_i, real1, imag2);
|
||||
p += 4;
|
||||
}
|
||||
n = ixheaacd_shl16(len_by_4, 2);
|
||||
n = ixheaac_shl16(len_by_4, 2);
|
||||
for (; n < slots; n++) {
|
||||
WORD32 real1, real2, imag1, imag2;
|
||||
real1 = real_buffer[(n * 128)];
|
||||
|
|
@ -607,10 +607,10 @@ VOID ixheaacd_covariance_matrix_calc_2_dec(
|
|||
imag1 = img_buffer[n * 128];
|
||||
imag2 = img_buffer[(n - 2) * 128];
|
||||
|
||||
real1 = ixheaacd_shr32(real1, 3);
|
||||
real2 = ixheaacd_shr32(real2, 3);
|
||||
imag1 = ixheaacd_shr32(imag1, 3);
|
||||
imag2 = ixheaacd_shr32(imag2, 3);
|
||||
real1 = ixheaac_shr32(real1, 3);
|
||||
real2 = ixheaac_shr32(real2, 3);
|
||||
imag1 = ixheaac_shr32(imag1, 3);
|
||||
imag2 = ixheaac_shr32(imag2, 3);
|
||||
|
||||
t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, real1, real2);
|
||||
t_phi_02 = ixheaacd_mac32x16hin32(t_phi_02, imag1, imag2);
|
||||
|
|
@ -642,18 +642,18 @@ static PLATFORM_INLINE VOID ixheaacd_filt_step3_lp(WORD len, WORD32 coef1,
|
|||
|
||||
for (i = len; i >= 0; i -= 2) {
|
||||
WORD32 curr = *pqmf_real_low;
|
||||
WORD32 temp = ixheaacd_mult32x16hin32(prev2, coef2);
|
||||
WORD32 temp = ixheaac_mult32x16hin32(prev2, coef2);
|
||||
pqmf_real_low += 64;
|
||||
|
||||
*pqmf_real_high = ixheaacd_add32_sat((curr >> LPC_SCALE_FACTOR),
|
||||
*pqmf_real_high = ixheaac_add32_sat((curr >> LPC_SCALE_FACTOR),
|
||||
((ixheaacd_mac32x16hin32(temp, prev1, coef1)) << 1));
|
||||
pqmf_real_high += 64;
|
||||
|
||||
prev2 = *pqmf_real_low;
|
||||
temp = ixheaacd_mult32x16hin32(prev1, coef2);
|
||||
temp = ixheaac_mult32x16hin32(prev1, coef2);
|
||||
pqmf_real_low += 64;
|
||||
|
||||
*pqmf_real_high = ixheaacd_add32_sat((prev2 >> LPC_SCALE_FACTOR),
|
||||
*pqmf_real_high = ixheaac_add32_sat((prev2 >> LPC_SCALE_FACTOR),
|
||||
((ixheaacd_mac32x16hin32(temp, curr, coef1)) << 1));
|
||||
pqmf_real_high += 64;
|
||||
|
||||
|
|
@ -694,41 +694,41 @@ VOID ixheaacd_filter1_lp(ia_sbr_hf_generator_struct *hf_generator,
|
|||
WORD16 inverse_d;
|
||||
WORD32 norm_d;
|
||||
|
||||
norm_d = ixheaacd_norm32(p_cov_matrix->d);
|
||||
norm_d = ixheaac_norm32(p_cov_matrix->d);
|
||||
|
||||
inverse_d =
|
||||
(WORD16)(*ixheaacd_fix_div)(0x40000000, (p_cov_matrix->d << norm_d));
|
||||
modulus_d = ixheaacd_abs32(p_cov_matrix->d);
|
||||
modulus_d = ixheaac_abs32(p_cov_matrix->d);
|
||||
|
||||
tmp_r =
|
||||
(ixheaacd_sub32_sat(
|
||||
ixheaacd_mult32(p_cov_matrix->phi_01, p_cov_matrix->phi_12),
|
||||
ixheaacd_mult32(p_cov_matrix->phi_02, p_cov_matrix->phi_11)) >>
|
||||
(ixheaac_sub32_sat(
|
||||
ixheaac_mult32(p_cov_matrix->phi_01, p_cov_matrix->phi_12),
|
||||
ixheaac_mult32(p_cov_matrix->phi_02, p_cov_matrix->phi_11)) >>
|
||||
LPC_SCALE_FACTOR);
|
||||
temp_real = ixheaacd_abs32(tmp_r);
|
||||
temp_real = ixheaac_abs32(tmp_r);
|
||||
|
||||
if (temp_real < modulus_d) {
|
||||
alpha_real[1] = (WORD16)(
|
||||
(ixheaacd_mult32x16in32_shl_sat(tmp_r, inverse_d) << norm_d) >> 15);
|
||||
(ixheaac_mult32x16in32_shl_sat(tmp_r, inverse_d) << norm_d) >> 15);
|
||||
}
|
||||
|
||||
tmp_r =
|
||||
(ixheaacd_sub32_sat(
|
||||
ixheaacd_mult32(p_cov_matrix->phi_02, p_cov_matrix->phi_12),
|
||||
ixheaacd_mult32(p_cov_matrix->phi_01, p_cov_matrix->phi_22)) >>
|
||||
(ixheaac_sub32_sat(
|
||||
ixheaac_mult32(p_cov_matrix->phi_02, p_cov_matrix->phi_12),
|
||||
ixheaac_mult32(p_cov_matrix->phi_01, p_cov_matrix->phi_22)) >>
|
||||
LPC_SCALE_FACTOR);
|
||||
temp_real = ixheaacd_abs32(tmp_r);
|
||||
temp_real = ixheaac_abs32(tmp_r);
|
||||
|
||||
if (temp_real < modulus_d) {
|
||||
alpha_real[0] = (WORD16)(
|
||||
(ixheaacd_mult32x16in32_shl_sat(tmp_r, inverse_d) << norm_d) >> 15);
|
||||
(ixheaac_mult32x16in32_shl_sat(tmp_r, inverse_d) << norm_d) >> 15);
|
||||
}
|
||||
}
|
||||
|
||||
if (p_cov_matrix->phi_11 == 0) {
|
||||
k1 = 0;
|
||||
} else {
|
||||
if (ixheaacd_abs32_sat(p_cov_matrix->phi_01) >= p_cov_matrix->phi_11) {
|
||||
if (ixheaac_abs32_sat(p_cov_matrix->phi_01) >= p_cov_matrix->phi_11) {
|
||||
if (p_cov_matrix->phi_01 < 0) {
|
||||
k1 = 0x7fff;
|
||||
} else {
|
||||
|
|
@ -741,8 +741,8 @@ VOID ixheaacd_filter1_lp(ia_sbr_hf_generator_struct *hf_generator,
|
|||
}
|
||||
|
||||
if (low_band > 1) {
|
||||
WORD16 deg = ixheaacd_sub16_sat(
|
||||
0x7fff, ixheaacd_mult16_shl_sat(k1_below, k1_below));
|
||||
WORD16 deg = ixheaac_sub16_sat(
|
||||
0x7fff, ixheaac_mult16_shl_sat(k1_below, k1_below));
|
||||
degree_alias[low_band] = 0;
|
||||
|
||||
if (((low_band & 1) == 0) && (k1 < 0)) {
|
||||
|
|
@ -802,10 +802,10 @@ VOID ixheaacd_filter1_lp(ia_sbr_hf_generator_struct *hf_generator,
|
|||
alpha1 = alpha_real[0];
|
||||
alpha2 = alpha_real[1];
|
||||
|
||||
bw = ixheaacd_extract16h(bw_vec);
|
||||
a0r = ixheaacd_mult16x16in32_shl(bw, alpha1);
|
||||
bw = ixheaacd_mult16_shl_sat(bw, bw);
|
||||
a1r = ixheaacd_mult16x16in32_shl(bw, alpha2);
|
||||
bw = ixheaac_extract16h(bw_vec);
|
||||
a0r = ixheaac_mult16x16in32_shl(bw, alpha1);
|
||||
bw = ixheaac_mult16_shl_sat(bw, bw);
|
||||
a1r = ixheaac_mult16x16in32_shl(bw, alpha2);
|
||||
|
||||
{
|
||||
WORD32 *p_sub_signal_xlow = sub_sig_x + low_band + ((start_idx) << 6);
|
||||
|
|
@ -865,7 +865,7 @@ VOID ixheaacd_low_pow_hf_generator(ia_sbr_hf_generator_struct *hf_generator,
|
|||
sbr_invf_mode_prev, bw_array);
|
||||
|
||||
actual_stop_band =
|
||||
ixheaacd_add16(patch_param[num_patches - 1].dst_start_band,
|
||||
ixheaac_add16(patch_param[num_patches - 1].dst_start_band,
|
||||
patch_param[num_patches - 1].num_bands_in_patch);
|
||||
|
||||
{
|
||||
|
|
@ -887,8 +887,8 @@ VOID ixheaacd_low_pow_hf_generator(ia_sbr_hf_generator_struct *hf_generator,
|
|||
}
|
||||
}
|
||||
|
||||
start_patch = ixheaacd_max16(
|
||||
1, ixheaacd_sub16(hf_generator->pstr_settings->start_patch, 2));
|
||||
start_patch = ixheaac_max16(
|
||||
1, ixheaac_sub16(hf_generator->pstr_settings->start_patch, 2));
|
||||
stop_patch = patch_param[0].dst_start_band;
|
||||
|
||||
{
|
||||
|
|
@ -993,7 +993,7 @@ VOID ixheaacd_hf_generator(ia_sbr_hf_generator_struct *hf_generator,
|
|||
sbr_invf_mode_prev, bw_array);
|
||||
|
||||
actual_stop_band =
|
||||
ixheaacd_add16(patch_param[num_patches - 1].dst_start_band,
|
||||
ixheaac_add16(patch_param[num_patches - 1].dst_start_band,
|
||||
patch_param[num_patches - 1].num_bands_in_patch);
|
||||
|
||||
for (i = start_idx; i < stop_idx; i++) {
|
||||
|
|
@ -1009,7 +1009,7 @@ VOID ixheaacd_hf_generator(ia_sbr_hf_generator_struct *hf_generator,
|
|||
memset(bw_index, 0, sizeof(WORD32) * num_patches);
|
||||
|
||||
common_scale =
|
||||
ixheaacd_min32(scale_factor->ov_lb_scale, scale_factor->lb_scale);
|
||||
ixheaac_min32(scale_factor->ov_lb_scale, scale_factor->lb_scale);
|
||||
|
||||
start_patch = hf_generator->pstr_settings->start_patch;
|
||||
stop_patch = hf_generator->pstr_settings->stop_patch;
|
||||
|
|
@ -1057,17 +1057,17 @@ VOID ixheaacd_hf_generator(ia_sbr_hf_generator_struct *hf_generator,
|
|||
WORD32 max_val;
|
||||
WORD32 q_shift;
|
||||
WORD32 v;
|
||||
max_val = ixheaacd_abs32_nrm(cov_matrix_seq[low_band].phi_01);
|
||||
max_val = max_val | ixheaacd_abs32_nrm(cov_matrix_seq[low_band].phi_02);
|
||||
max_val = max_val | ixheaacd_abs32_nrm(cov_matrix_seq[low_band].phi_12);
|
||||
max_val = ixheaac_abs32_nrm(cov_matrix_seq[low_band].phi_01);
|
||||
max_val = max_val | ixheaac_abs32_nrm(cov_matrix_seq[low_band].phi_02);
|
||||
max_val = max_val | ixheaac_abs32_nrm(cov_matrix_seq[low_band].phi_12);
|
||||
|
||||
max_val = max_val | (cov_matrix_seq[low_band].phi_11);
|
||||
max_val = max_val | (cov_matrix_seq[low_band].phi_22);
|
||||
max_val = max_val | ixheaacd_abs32_nrm(cov_matrix_seq[low_band].phi_01_im);
|
||||
max_val = max_val | ixheaacd_abs32_nrm(cov_matrix_seq[low_band].phi_02_im);
|
||||
max_val = max_val | ixheaacd_abs32_nrm(cov_matrix_seq[low_band].phi_12_im);
|
||||
max_val = max_val | ixheaac_abs32_nrm(cov_matrix_seq[low_band].phi_01_im);
|
||||
max_val = max_val | ixheaac_abs32_nrm(cov_matrix_seq[low_band].phi_02_im);
|
||||
max_val = max_val | ixheaac_abs32_nrm(cov_matrix_seq[low_band].phi_12_im);
|
||||
|
||||
q_shift = ixheaacd_pnorm32(max_val);
|
||||
q_shift = ixheaac_pnorm32(max_val);
|
||||
|
||||
cov_matrix.phi_11 = (cov_matrix_seq[low_band].phi_11 << q_shift);
|
||||
cov_matrix.phi_22 = (cov_matrix_seq[low_band].phi_22 << q_shift);
|
||||
|
|
@ -1078,12 +1078,12 @@ VOID ixheaacd_hf_generator(ia_sbr_hf_generator_struct *hf_generator,
|
|||
cov_matrix.phi_02_im = (cov_matrix_seq[low_band].phi_02_im << q_shift);
|
||||
cov_matrix.phi_12_im = (cov_matrix_seq[low_band].phi_12_im << q_shift);
|
||||
|
||||
max_val = ixheaacd_mult32(cov_matrix.phi_12, cov_matrix.phi_12);
|
||||
max_val = ixheaacd_add32_sat(
|
||||
max_val, ixheaacd_mult32(cov_matrix.phi_12_im, cov_matrix.phi_12_im));
|
||||
max_val = ixheaac_mult32(cov_matrix.phi_12, cov_matrix.phi_12);
|
||||
max_val = ixheaac_add32_sat(
|
||||
max_val, ixheaac_mult32(cov_matrix.phi_12_im, cov_matrix.phi_12_im));
|
||||
|
||||
v = ixheaacd_sub32_sat(
|
||||
ixheaacd_mult32(cov_matrix.phi_11, cov_matrix.phi_22), max_val)
|
||||
v = ixheaac_sub32_sat(
|
||||
ixheaac_mult32(cov_matrix.phi_11, cov_matrix.phi_22), max_val)
|
||||
<< 1;
|
||||
cov_matrix.d = v;
|
||||
|
||||
|
|
@ -1096,40 +1096,40 @@ VOID ixheaacd_hf_generator(ia_sbr_hf_generator_struct *hf_generator,
|
|||
WORD16 inverse_d;
|
||||
WORD32 norm_d;
|
||||
|
||||
norm_d = ixheaacd_norm32(cov_matrix.d);
|
||||
norm_d = ixheaac_norm32(cov_matrix.d);
|
||||
|
||||
inverse_d =
|
||||
(WORD16)(*ixheaacd_fix_div)(0x40000000, (cov_matrix.d << norm_d));
|
||||
|
||||
modulus_d = ixheaacd_abs32_sat(cov_matrix.d);
|
||||
modulus_d = ixheaac_abs32_sat(cov_matrix.d);
|
||||
tmp_r =
|
||||
(ixheaacd_sub32_sat(
|
||||
ixheaacd_sub32_sat(
|
||||
ixheaacd_mult32(cov_matrix.phi_01, cov_matrix.phi_12),
|
||||
ixheaacd_mult32(cov_matrix.phi_01_im, cov_matrix.phi_12_im)),
|
||||
ixheaacd_mult32(cov_matrix.phi_02, cov_matrix.phi_11))) >>
|
||||
(ixheaac_sub32_sat(
|
||||
ixheaac_sub32_sat(
|
||||
ixheaac_mult32(cov_matrix.phi_01, cov_matrix.phi_12),
|
||||
ixheaac_mult32(cov_matrix.phi_01_im, cov_matrix.phi_12_im)),
|
||||
ixheaac_mult32(cov_matrix.phi_02, cov_matrix.phi_11))) >>
|
||||
(LPC_SCALE_FACTOR - 1);
|
||||
tmp_i = (ixheaacd_sub32_sat(
|
||||
ixheaacd_add32_sat(
|
||||
ixheaacd_mult32(cov_matrix.phi_01_im, cov_matrix.phi_12),
|
||||
ixheaacd_mult32(cov_matrix.phi_01, cov_matrix.phi_12_im)),
|
||||
ixheaacd_mult32(cov_matrix.phi_02_im, cov_matrix.phi_11))) >>
|
||||
tmp_i = (ixheaac_sub32_sat(
|
||||
ixheaac_add32_sat(
|
||||
ixheaac_mult32(cov_matrix.phi_01_im, cov_matrix.phi_12),
|
||||
ixheaac_mult32(cov_matrix.phi_01, cov_matrix.phi_12_im)),
|
||||
ixheaac_mult32(cov_matrix.phi_02_im, cov_matrix.phi_11))) >>
|
||||
(LPC_SCALE_FACTOR - 1);
|
||||
temp_imag = ixheaacd_abs32(tmp_i);
|
||||
temp_real = ixheaacd_abs32(tmp_r);
|
||||
temp_imag = ixheaac_abs32(tmp_i);
|
||||
temp_real = ixheaac_abs32(tmp_r);
|
||||
|
||||
if (temp_real >= modulus_d) {
|
||||
reset_lpc_coeff = 1;
|
||||
} else {
|
||||
alpha_real[1] = (WORD16)(
|
||||
(ixheaacd_mult32x16in32(tmp_r, inverse_d) << (norm_d + 1)) >> 15);
|
||||
(ixheaac_mult32x16in32(tmp_r, inverse_d) << (norm_d + 1)) >> 15);
|
||||
}
|
||||
|
||||
if (temp_imag >= modulus_d) {
|
||||
reset_lpc_coeff = 1;
|
||||
} else {
|
||||
alpha_imag[1] = (WORD16)(
|
||||
(ixheaacd_mult32x16in32(tmp_i, inverse_d) << (norm_d + 1)) >> 15);
|
||||
(ixheaac_mult32x16in32(tmp_i, inverse_d) << (norm_d + 1)) >> 15);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1142,33 +1142,33 @@ VOID ixheaacd_hf_generator(ia_sbr_hf_generator_struct *hf_generator,
|
|||
WORD16 inverse_r11;
|
||||
WORD32 norm_r11;
|
||||
|
||||
norm_r11 = ixheaacd_norm32(cov_matrix.phi_11);
|
||||
norm_r11 = ixheaac_norm32(cov_matrix.phi_11);
|
||||
|
||||
inverse_r11 = (WORD16)(*ixheaacd_fix_div)(
|
||||
0x40000000, (cov_matrix.phi_11 << norm_r11));
|
||||
|
||||
tmp_r = ixheaacd_add32_sat(
|
||||
ixheaacd_add32(
|
||||
tmp_r = ixheaac_add32_sat(
|
||||
ixheaac_add32(
|
||||
(cov_matrix.phi_01 >> (LPC_SCALE_FACTOR + 1)),
|
||||
ixheaacd_mult32x16in32(cov_matrix.phi_12, alpha_real[1])),
|
||||
ixheaacd_mult32x16in32(cov_matrix.phi_12_im, alpha_imag[1]));
|
||||
tmp_i = ixheaacd_sub32_sat(
|
||||
ixheaacd_add32(
|
||||
ixheaac_mult32x16in32(cov_matrix.phi_12, alpha_real[1])),
|
||||
ixheaac_mult32x16in32(cov_matrix.phi_12_im, alpha_imag[1]));
|
||||
tmp_i = ixheaac_sub32_sat(
|
||||
ixheaac_add32(
|
||||
(cov_matrix.phi_01_im >> (LPC_SCALE_FACTOR + 1)),
|
||||
ixheaacd_mult32x16in32(cov_matrix.phi_12, alpha_imag[1])),
|
||||
ixheaacd_mult32x16in32(cov_matrix.phi_12_im, alpha_real[1]));
|
||||
ixheaac_mult32x16in32(cov_matrix.phi_12, alpha_imag[1])),
|
||||
ixheaac_mult32x16in32(cov_matrix.phi_12_im, alpha_real[1]));
|
||||
|
||||
tmp_r = tmp_r << 1;
|
||||
tmp_i = tmp_i << 1;
|
||||
|
||||
temp_imag = ixheaacd_abs32(tmp_i);
|
||||
temp_real = ixheaacd_abs32(tmp_r);
|
||||
temp_imag = ixheaac_abs32(tmp_i);
|
||||
temp_real = ixheaac_abs32(tmp_r);
|
||||
|
||||
if (temp_real >= cov_matrix.phi_11) {
|
||||
reset_lpc_coeff = 1;
|
||||
} else {
|
||||
alpha_real[0] = (WORD16)(
|
||||
(ixheaacd_mult32x16in32(ixheaacd_sub32_sat(0, tmp_r), inverse_r11)
|
||||
(ixheaac_mult32x16in32(ixheaac_sub32_sat(0, tmp_r), inverse_r11)
|
||||
<< (norm_r11 + 1)) >>
|
||||
15);
|
||||
}
|
||||
|
|
@ -1177,18 +1177,18 @@ VOID ixheaacd_hf_generator(ia_sbr_hf_generator_struct *hf_generator,
|
|||
reset_lpc_coeff = 1;
|
||||
} else {
|
||||
alpha_imag[0] = (WORD16)(
|
||||
(ixheaacd_mult32x16in32(ixheaacd_sub32_sat(0, tmp_i), inverse_r11)
|
||||
(ixheaac_mult32x16in32(ixheaac_sub32_sat(0, tmp_i), inverse_r11)
|
||||
<< (norm_r11 + 1)) >>
|
||||
15);
|
||||
}
|
||||
}
|
||||
|
||||
if (ixheaacd_add32_sat((alpha_real[0] * alpha_real[0]),
|
||||
if (ixheaac_add32_sat((alpha_real[0] * alpha_real[0]),
|
||||
(alpha_imag[0] * alpha_imag[0])) >= 0x40000000L) {
|
||||
reset_lpc_coeff = 1;
|
||||
}
|
||||
|
||||
if (ixheaacd_add32_sat((alpha_real[1] * alpha_real[1]),
|
||||
if (ixheaac_add32_sat((alpha_real[1] * alpha_real[1]),
|
||||
(alpha_imag[1] * alpha_imag[1])) >= 0x40000000L) {
|
||||
reset_lpc_coeff = 1;
|
||||
}
|
||||
|
|
@ -1223,12 +1223,12 @@ VOID ixheaacd_hf_generator(ia_sbr_hf_generator_struct *hf_generator,
|
|||
bw_index[patch]++;
|
||||
}
|
||||
|
||||
bw = ixheaacd_extract16h(bw_array[bw_index[patch]]);
|
||||
a0r = ixheaacd_mult16_shl_sat(bw, alpha_real[0]);
|
||||
a0i = ixheaacd_mult16_shl_sat(bw, alpha_imag[0]);
|
||||
bw = ixheaacd_mult16_shl_sat(bw, bw);
|
||||
a1r = ixheaacd_mult16_shl_sat(bw, alpha_real[1]);
|
||||
a1i = ixheaacd_mult16_shl_sat(bw, alpha_imag[1]);
|
||||
bw = ixheaac_extract16h(bw_array[bw_index[patch]]);
|
||||
a0r = ixheaac_mult16_shl_sat(bw, alpha_real[0]);
|
||||
a0i = ixheaac_mult16_shl_sat(bw, alpha_imag[0]);
|
||||
bw = ixheaac_mult16_shl_sat(bw, bw);
|
||||
a1r = ixheaac_mult16_shl_sat(bw, alpha_real[1]);
|
||||
a1i = ixheaac_mult16_shl_sat(bw, alpha_imag[1]);
|
||||
|
||||
if (bw > 0) {
|
||||
ixheaacd_filterstep3(a0r, a0i, a1r, a1i, start_idx, stop_idx, low_band,
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops16.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops16.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
|
||||
#include "ixheaacd_defines.h"
|
||||
#include "ixheaacd_cnst.h"
|
||||
|
|
@ -76,7 +76,7 @@ VOID ixheaacd_lt_prediction(
|
|||
|
||||
for (i = 0; i < num_samples; i++) {
|
||||
in_data[i] =
|
||||
ixheaacd_shr32(ixheaacd_mult32x16in32_shl_sat(
|
||||
ixheaac_shr32(ixheaac_mult32x16in32_shl_sat(
|
||||
ixheaacd_codebook_Q30[ltp->coef],
|
||||
lt_pred_stat[num_samples + i - ltp->lag]),
|
||||
SHIFT_VAL);
|
||||
|
|
@ -95,8 +95,8 @@ VOID ixheaacd_lt_prediction(
|
|||
if (ltp->long_used[sfb]) {
|
||||
for (bin = sfb_width - 1; bin >= 0; bin--) {
|
||||
WORD32 temp = *ptr_spec;
|
||||
temp = ixheaacd_add32_sat(temp,
|
||||
ixheaacd_shr32(*ptr_x_est++, SHIFT_VAL1));
|
||||
temp = ixheaac_add32_sat(temp,
|
||||
ixheaac_shr32(*ptr_x_est++, SHIFT_VAL1));
|
||||
*ptr_spec++ = temp;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -205,17 +205,17 @@ VOID ixheaacd_filter_bank_ltp(ia_aac_dec_tables_struct *aac_tables_ptr,
|
|||
if ((512 != nlong) && (480 != nlong)) {
|
||||
for (i = 0; i<nlong>> 1; i++) {
|
||||
in_data[i] =
|
||||
ixheaacd_mult32x16in32_shl(in_data[i], window_long_prev[2 * i]);
|
||||
ixheaac_mult32x16in32_shl(in_data[i], window_long_prev[2 * i]);
|
||||
|
||||
in_data[i + nlong] = ixheaacd_mult32x16in32_shl(
|
||||
in_data[i + nlong] = ixheaac_mult32x16in32_shl(
|
||||
in_data[i + nlong], window_long[2 * i + 1]);
|
||||
}
|
||||
for (i = 0; i<nlong>> 1; i++) {
|
||||
in_data[i + (nlong >> 1)] = ixheaacd_mult32x16in32_shl(
|
||||
in_data[i + (nlong >> 1)] = ixheaac_mult32x16in32_shl(
|
||||
in_data[i + (nlong >> 1)], window_long_prev[nlong - 1 - 2 * i]);
|
||||
|
||||
in_data[i + nlong + (nlong >> 1)] =
|
||||
ixheaacd_mult32x16in32_shl(in_data[i + nlong + (nlong >> 1)],
|
||||
ixheaac_mult32x16in32_shl(in_data[i + nlong + (nlong >> 1)],
|
||||
window_long[nlong - 1 - 2 * i - 1]);
|
||||
}
|
||||
|
||||
|
|
@ -228,8 +228,8 @@ VOID ixheaacd_filter_bank_ltp(ia_aac_dec_tables_struct *aac_tables_ptr,
|
|||
ptr_in2 = &in_data[nlong];
|
||||
|
||||
for (i = nlong - 1; i >= 0; i--) {
|
||||
WORD32 temp1 = ixheaacd_mult32_shl(*ptr_in1, *win1++);
|
||||
WORD32 temp2 = ixheaacd_mult32_shl(*ptr_in2, win2[i]);
|
||||
WORD32 temp1 = ixheaac_mult32_shl(*ptr_in1, *win1++);
|
||||
WORD32 temp2 = ixheaac_mult32_shl(*ptr_in2, win2[i]);
|
||||
|
||||
*ptr_in1++ = temp1;
|
||||
*ptr_in2++ = temp2;
|
||||
|
|
@ -238,8 +238,8 @@ VOID ixheaacd_filter_bank_ltp(ia_aac_dec_tables_struct *aac_tables_ptr,
|
|||
|
||||
for (i = 0; i < nlong / 2; i++) {
|
||||
out_mdct[nlong / 2 + i] =
|
||||
ixheaacd_sub32(in_data[i], in_data[nlong - 1 - i]);
|
||||
out_mdct[i] = (-ixheaacd_add32(in_data[nlong + i + nlong / 2],
|
||||
ixheaac_sub32(in_data[i], in_data[nlong - 1 - i]);
|
||||
out_mdct[i] = (-ixheaac_add32(in_data[nlong + i + nlong / 2],
|
||||
in_data[nlong2 - nlong / 2 - 1 - i]));
|
||||
}
|
||||
|
||||
|
|
@ -260,26 +260,26 @@ VOID ixheaacd_filter_bank_ltp(ia_aac_dec_tables_struct *aac_tables_ptr,
|
|||
WORD32 *ptr_out_mdct = &out_mdct[0];
|
||||
|
||||
for (i = nlong - 1; i >= 0; i -= 4) {
|
||||
*ptr_out_mdct = ixheaacd_shl32(*ptr_out_mdct, imdct_scale);
|
||||
*ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
|
||||
ptr_out_mdct++;
|
||||
*ptr_out_mdct = ixheaacd_shl32(*ptr_out_mdct, imdct_scale);
|
||||
*ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
|
||||
ptr_out_mdct++;
|
||||
*ptr_out_mdct = ixheaacd_shl32(*ptr_out_mdct, imdct_scale);
|
||||
*ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
|
||||
ptr_out_mdct++;
|
||||
*ptr_out_mdct = ixheaacd_shl32(*ptr_out_mdct, imdct_scale);
|
||||
*ptr_out_mdct = ixheaac_shl32(*ptr_out_mdct, imdct_scale);
|
||||
ptr_out_mdct++;
|
||||
}
|
||||
} else if (imdct_scale < 0) {
|
||||
WORD32 *ptr_out_mdct = &out_mdct[0];
|
||||
imdct_scale = -imdct_scale;
|
||||
for (i = nlong - 1; i >= 0; i -= 4) {
|
||||
*ptr_out_mdct = ixheaacd_shr32(*ptr_out_mdct, imdct_scale);
|
||||
*ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
|
||||
ptr_out_mdct++;
|
||||
*ptr_out_mdct = ixheaacd_shr32(*ptr_out_mdct, imdct_scale);
|
||||
*ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
|
||||
ptr_out_mdct++;
|
||||
*ptr_out_mdct = ixheaacd_shr32(*ptr_out_mdct, imdct_scale);
|
||||
*ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
|
||||
ptr_out_mdct++;
|
||||
*ptr_out_mdct = ixheaacd_shr32(*ptr_out_mdct, imdct_scale);
|
||||
*ptr_out_mdct = ixheaac_shr32(*ptr_out_mdct, imdct_scale);
|
||||
ptr_out_mdct++;
|
||||
}
|
||||
}
|
||||
|
|
@ -299,7 +299,7 @@ VOID ixheaacd_filter_bank_ltp(ia_aac_dec_tables_struct *aac_tables_ptr,
|
|||
imdct_scale += 1;
|
||||
|
||||
for (i = 0; i < nlong; i++) {
|
||||
out_mdct[i] = ixheaacd_shl32_dir(in_data[i], imdct_scale);
|
||||
out_mdct[i] = ixheaac_shl32_dir(in_data[i], imdct_scale);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -309,15 +309,15 @@ VOID ixheaacd_filter_bank_ltp(ia_aac_dec_tables_struct *aac_tables_ptr,
|
|||
|
||||
for (i = 0; i<nlong>> 1; i++)
|
||||
in_data[i] =
|
||||
ixheaacd_mult32x16in32_shl(in_data[i], window_long_prev[2 * i]);
|
||||
ixheaac_mult32x16in32_shl(in_data[i], window_long_prev[2 * i]);
|
||||
|
||||
for (i = 0; i<nlong>> 1; i++)
|
||||
in_data[i + (nlong >> 1)] = ixheaacd_mult32x16in32_shl(
|
||||
in_data[i + (nlong >> 1)] = ixheaac_mult32x16in32_shl(
|
||||
in_data[i + (nlong >> 1)], window_long_prev[nlong - 1 - 2 * i - 1]);
|
||||
|
||||
for (i = 0; i<nshort>> 1; i++)
|
||||
in_data[i + nlong + nflat_ls + (nshort >> 1)] =
|
||||
ixheaacd_mult32x16in32_shl(
|
||||
ixheaac_mult32x16in32_shl(
|
||||
in_data[i + nlong + nflat_ls + (nshort >> 1)],
|
||||
window_short[nshort - 1 - 2 * i - 1]);
|
||||
|
||||
|
|
@ -325,9 +325,9 @@ VOID ixheaacd_filter_bank_ltp(ia_aac_dec_tables_struct *aac_tables_ptr,
|
|||
|
||||
for (i = 0; i < nlong / 2; i++) {
|
||||
out_mdct[nlong / 2 + i] =
|
||||
ixheaacd_sub32(in_data[i], in_data[nlong - 1 - i]);
|
||||
ixheaac_sub32(in_data[i], in_data[nlong - 1 - i]);
|
||||
out_mdct[nlong / 2 - 1 - i] =
|
||||
-ixheaacd_add32(in_data[nlong + i], in_data[nlong2 - 1 - i]);
|
||||
-ixheaac_add32(in_data[nlong + i], in_data[nlong2 - 1 - i]);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -344,7 +344,7 @@ VOID ixheaacd_filter_bank_ltp(ia_aac_dec_tables_struct *aac_tables_ptr,
|
|||
imdct_scale += 1;
|
||||
|
||||
for (i = 0; i < nlong; i++) {
|
||||
out_mdct[i] = ixheaacd_shl32_dir(in_data[i], imdct_scale);
|
||||
out_mdct[i] = ixheaac_shl32_dir(in_data[i], imdct_scale);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -352,28 +352,28 @@ VOID ixheaacd_filter_bank_ltp(ia_aac_dec_tables_struct *aac_tables_ptr,
|
|||
for (i = 0; i < nflat_ls; i++) in_data[i] = 0;
|
||||
|
||||
for (i = 0; i<nshort>> 1; i++)
|
||||
in_data[i + nflat_ls] = ixheaacd_mult32x16in32_shl(
|
||||
in_data[i + nflat_ls] = ixheaac_mult32x16in32_shl(
|
||||
in_data[i + nflat_ls], window_short_prev[2 * i]);
|
||||
|
||||
for (i = 0; i<nshort>> 1; i++)
|
||||
in_data[i + nflat_ls + (nshort >> 1)] =
|
||||
ixheaacd_mult32x16in32_shl(in_data[i + nflat_ls + (nshort >> 1)],
|
||||
ixheaac_mult32x16in32_shl(in_data[i + nflat_ls + (nshort >> 1)],
|
||||
window_short_prev[127 - 2 * i]);
|
||||
|
||||
for (i = 0; i<nlong>> 1; i++)
|
||||
in_data[i + nlong] = ixheaacd_mult32x16in32_shl(in_data[i + nlong],
|
||||
in_data[i + nlong] = ixheaac_mult32x16in32_shl(in_data[i + nlong],
|
||||
window_long[2 * i + 1]);
|
||||
|
||||
for (i = 0; i<nlong>> 1; i++)
|
||||
in_data[i + nlong + (nlong >> 1)] =
|
||||
ixheaacd_mult32x16in32_shl(in_data[i + nlong + (nlong >> 1)],
|
||||
ixheaac_mult32x16in32_shl(in_data[i + nlong + (nlong >> 1)],
|
||||
window_long[nlong - 1 - 2 * i - 1]);
|
||||
|
||||
for (i = 0; i < nlong / 2; i++) {
|
||||
out_mdct[nlong / 2 + i] =
|
||||
ixheaacd_sub32(in_data[i], in_data[nlong - 1 - i]);
|
||||
ixheaac_sub32(in_data[i], in_data[nlong - 1 - i]);
|
||||
out_mdct[nlong / 2 - 1 - i] =
|
||||
-ixheaacd_add32(in_data[nlong + i], in_data[nlong2 - 1 - i]);
|
||||
-ixheaac_add32(in_data[nlong + i], in_data[nlong2 - 1 - i]);
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -390,7 +390,7 @@ VOID ixheaacd_filter_bank_ltp(ia_aac_dec_tables_struct *aac_tables_ptr,
|
|||
imdct_scale += 1;
|
||||
|
||||
for (i = 0; i < nlong; i++) {
|
||||
out_mdct[i] = ixheaacd_shl32_dir(in_data[i], imdct_scale);
|
||||
out_mdct[i] = ixheaac_shl32_dir(in_data[i], imdct_scale);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
@ -429,7 +429,7 @@ VOID ixheaacd_lt_update_state(WORD16 *lt_pred_stat, VOID *time_t,
|
|||
for (i = 0; i < frame_len; i++) {
|
||||
*ptr_ltp_state0++ = *ptr_ltp_state_fl;
|
||||
*ptr_ltp_state_fl++ =
|
||||
ixheaacd_round16(ixheaacd_shl32_sat(*ptr_time_in, 2));
|
||||
ixheaac_round16(ixheaac_shl32_sat(*ptr_time_in, 2));
|
||||
ptr_time_in += stride;
|
||||
}
|
||||
}
|
||||
|
|
@ -441,42 +441,42 @@ VOID ixheaacd_lt_update_state(WORD16 *lt_pred_stat, VOID *time_t,
|
|||
|
||||
for (i = 0; i < 256; i++) {
|
||||
lt_pred_stat[(frame_len * 3) + i] =
|
||||
ixheaacd_round16(ixheaacd_mult16x16in32_shl(
|
||||
(WORD16)ixheaacd_shl16(
|
||||
(WORD16)-ixheaacd_sat16(overlap[255 - i]), 1),
|
||||
(WORD16)ixheaacd_shr32(window[511 - i], 15)));
|
||||
ixheaac_round16(ixheaac_mult16x16in32_shl(
|
||||
(WORD16)ixheaac_shl16(
|
||||
(WORD16)-ixheaac_sat16(overlap[255 - i]), 1),
|
||||
(WORD16)ixheaac_shr32(window[511 - i], 15)));
|
||||
|
||||
lt_pred_stat[(frame_len * 3) + 256 + i] =
|
||||
ixheaacd_round16(ixheaacd_mult16x16in32_shl(
|
||||
(WORD16)ixheaacd_shl16((WORD16)-ixheaacd_sat16(overlap[i]), 1),
|
||||
(WORD16)ixheaacd_shr32(window[255 - i], 15)));
|
||||
ixheaac_round16(ixheaac_mult16x16in32_shl(
|
||||
(WORD16)ixheaac_shl16((WORD16)-ixheaac_sat16(overlap[i]), 1),
|
||||
(WORD16)ixheaac_shr32(window[255 - i], 15)));
|
||||
}
|
||||
} else if (480 == frame_len) {
|
||||
WORD32 *window = (WORD32 *)p_window_next;
|
||||
|
||||
for (i = 0; i < 240; i++) {
|
||||
lt_pred_stat[(frame_len * 3) + i] =
|
||||
ixheaacd_round16(ixheaacd_mult16x16in32_shl(
|
||||
(WORD16)ixheaacd_shl16(
|
||||
(WORD16)-ixheaacd_sat16(overlap[239 - i]), 1),
|
||||
(WORD16)ixheaacd_shr32(window[479 - i], 15)));
|
||||
ixheaac_round16(ixheaac_mult16x16in32_shl(
|
||||
(WORD16)ixheaac_shl16(
|
||||
(WORD16)-ixheaac_sat16(overlap[239 - i]), 1),
|
||||
(WORD16)ixheaac_shr32(window[479 - i], 15)));
|
||||
|
||||
lt_pred_stat[(frame_len * 3) + 240 + i] =
|
||||
ixheaacd_round16(ixheaacd_mult16x16in32_shl(
|
||||
(WORD16)ixheaacd_shl16((WORD16)-ixheaacd_sat16(overlap[i]), 1),
|
||||
(WORD16)ixheaacd_shr32(window[239 - i], 15)));
|
||||
ixheaac_round16(ixheaac_mult16x16in32_shl(
|
||||
(WORD16)ixheaac_shl16((WORD16)-ixheaac_sat16(overlap[i]), 1),
|
||||
(WORD16)ixheaac_shr32(window[239 - i], 15)));
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < 512; i++) {
|
||||
lt_pred_stat[(frame_len * 2) + i] = ixheaacd_round16(
|
||||
ixheaacd_shl32_sat(ixheaacd_mult16x16in32_shl(
|
||||
(WORD16)-ixheaacd_sat16(overlap[511 - i]),
|
||||
lt_pred_stat[(frame_len * 2) + i] = ixheaac_round16(
|
||||
ixheaac_shl32_sat(ixheaac_mult16x16in32_shl(
|
||||
(WORD16)-ixheaac_sat16(overlap[511 - i]),
|
||||
p_window_next[2 * i + 1]),
|
||||
1));
|
||||
|
||||
lt_pred_stat[(frame_len * 2) + 512 + i] =
|
||||
ixheaacd_round16(ixheaacd_shl32_sat(
|
||||
ixheaacd_mult16x16in32_shl((WORD16)-ixheaacd_sat16(overlap[i]),
|
||||
ixheaac_round16(ixheaac_shl32_sat(
|
||||
ixheaac_mult16x16in32_shl((WORD16)-ixheaac_sat16(overlap[i]),
|
||||
p_window_next[1023 - 2 * i - 1]),
|
||||
1));
|
||||
}
|
||||
|
|
@ -485,20 +485,20 @@ VOID ixheaacd_lt_update_state(WORD16 *lt_pred_stat, VOID *time_t,
|
|||
} else if (window_sequence == LONG_START_SEQUENCE) {
|
||||
for (i = 0; i < 448; i++) {
|
||||
lt_pred_stat[(frame_len * 2) + i] =
|
||||
ixheaacd_shl16((WORD16)-ixheaacd_sat16(overlap[511 - i]), 1);
|
||||
ixheaac_shl16((WORD16)-ixheaac_sat16(overlap[511 - i]), 1);
|
||||
}
|
||||
for (i = 0; i < 64; i++) {
|
||||
lt_pred_stat[(frame_len * 2) + 448 + i] =
|
||||
ixheaacd_round16(ixheaacd_shl32_sat(
|
||||
ixheaacd_mult16x16in32_shl(
|
||||
(WORD16)-ixheaacd_sat16(overlap[511 - 448 - i]),
|
||||
ixheaac_round16(ixheaac_shl32_sat(
|
||||
ixheaac_mult16x16in32_shl(
|
||||
(WORD16)-ixheaac_sat16(overlap[511 - 448 - i]),
|
||||
p_window_next[2 * i + 1]),
|
||||
1));
|
||||
}
|
||||
for (i = 0; i < 64; i++) {
|
||||
lt_pred_stat[(frame_len * 2) + 512 + i] =
|
||||
ixheaacd_round16(ixheaacd_shl32_sat(
|
||||
ixheaacd_mult16x16in32_shl((WORD16)-ixheaacd_sat16(overlap[i]),
|
||||
ixheaac_round16(ixheaac_shl32_sat(
|
||||
ixheaac_mult16x16in32_shl((WORD16)-ixheaac_sat16(overlap[i]),
|
||||
p_window_next[127 - 2 * i - 1]),
|
||||
1));
|
||||
}
|
||||
|
|
@ -508,19 +508,19 @@ VOID ixheaacd_lt_update_state(WORD16 *lt_pred_stat, VOID *time_t,
|
|||
} else {
|
||||
for (i = 0; i < 448; i++) {
|
||||
lt_pred_stat[(frame_len * 2) + i] =
|
||||
ixheaacd_shl16(ixheaacd_sat16(overlap[i]), 1);
|
||||
ixheaac_shl16(ixheaac_sat16(overlap[i]), 1);
|
||||
}
|
||||
for (i = 0; i < 64; i++) {
|
||||
lt_pred_stat[(frame_len * 2) + 448 + i] = ixheaacd_round16(
|
||||
ixheaacd_shl32_sat(ixheaacd_mult16x16in32_shl(
|
||||
(WORD16)-ixheaacd_sat16(overlap[511 - i]),
|
||||
lt_pred_stat[(frame_len * 2) + 448 + i] = ixheaac_round16(
|
||||
ixheaac_shl32_sat(ixheaac_mult16x16in32_shl(
|
||||
(WORD16)-ixheaac_sat16(overlap[511 - i]),
|
||||
p_window_next[2 * i + 1]),
|
||||
1));
|
||||
}
|
||||
for (i = 0; i < 64; i++) {
|
||||
lt_pred_stat[(frame_len * 2) + 512 + i] = ixheaacd_round16(
|
||||
ixheaacd_shl32_sat(ixheaacd_mult16x16in32_shl(
|
||||
(WORD16)-ixheaacd_sat16(overlap[448 + i]),
|
||||
lt_pred_stat[(frame_len * 2) + 512 + i] = ixheaac_round16(
|
||||
ixheaac_shl32_sat(ixheaac_mult16x16in32_shl(
|
||||
(WORD16)-ixheaac_sat16(overlap[448 + i]),
|
||||
p_window_next[127 - 2 * i - 1]),
|
||||
1));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@
|
|||
*****************************************************************************
|
||||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_mps_struct_def.h"
|
||||
#include "ixheaacd_mps_res_rom.h"
|
||||
#include "ixheaacd_mps_aac_struct.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_sbrdecsettings.h"
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include <string.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_mps_struct_def.h"
|
||||
#include "ixheaacd_mps_res_rom.h"
|
||||
#include "ixheaacd_mps_aac_struct.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_sbrdecsettings.h"
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include <string.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_mps_struct_def.h"
|
||||
#include "ixheaacd_mps_res_rom.h"
|
||||
#include "ixheaacd_mps_aac_struct.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaacd_basic_ops32.h"
|
||||
#include "ixheaacd_basic_ops40.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaac_basic_ops32.h"
|
||||
#include "ixheaac_basic_ops40.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_sbrdecsettings.h"
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
static PLATFORM_INLINE WORD32 ixheaacd_mps_get_rshift_bits(WORD64 a) {
|
||||
WORD32 temp_1, temp_2;
|
||||
temp_1 = (WORD32)(a >> 32);
|
||||
temp_2 = ixheaacd_norm32(temp_1);
|
||||
temp_2 = ixheaac_norm32(temp_1);
|
||||
if (temp_2 < 31) {
|
||||
return (32 - temp_2);
|
||||
} else {
|
||||
|
|
@ -60,14 +60,14 @@ static PLATFORM_INLINE WORD32 ixheaacd_mps_sqrt(WORD32 num, WORD16 *q, const WOR
|
|||
|
||||
if (num == 0) return 0;
|
||||
|
||||
k = ixheaacd_norm32(num);
|
||||
temp = ixheaacd_shr32(ixheaacd_shl32(num, k), 21);
|
||||
k = ixheaac_norm32(num);
|
||||
temp = ixheaac_shr32(ixheaac_shl32(num, k), 21);
|
||||
*q += k;
|
||||
index = temp & 0x1FF;
|
||||
answer = sqrt_tab[index];
|
||||
if (*q & 1) {
|
||||
*q -= 1;
|
||||
answer = ixheaacd_mult32_shl(answer, INV_SQRT_2_Q31);
|
||||
answer = ixheaac_mult32_shl(answer, INV_SQRT_2_Q31);
|
||||
}
|
||||
*q = *q >> 1;
|
||||
*q += Q_SQRT_TAB;
|
||||
|
|
@ -254,9 +254,9 @@ static PLATFORM_INLINE WORD32 ixheaacd_mps_div_32(WORD32 a, WORD32 b, WORD16 *q_
|
|||
|
||||
quotient = 0;
|
||||
|
||||
q_nr = ixheaacd_norm32(a);
|
||||
q_nr = ixheaac_norm32(a);
|
||||
mantissa_nr = (UWORD32)a << (q_nr);
|
||||
q_dr = ixheaacd_norm32(b);
|
||||
q_dr = ixheaac_norm32(b);
|
||||
mantissa_dr = (UWORD32)b << (q_dr);
|
||||
*q_format = (WORD)(30 + q_nr - q_dr);
|
||||
|
||||
|
|
@ -307,7 +307,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_mps_log10(WORD32 a, WORD16 q_a) {
|
|||
WORD16 q_x;
|
||||
WORD32 j, k, temp;
|
||||
WORD16 q_num;
|
||||
q_num = ixheaacd_norm32(a);
|
||||
q_num = ixheaac_norm32(a);
|
||||
a = a << q_num;
|
||||
x = ixheaacd_mps_div_32(a, NORM32, &q_x);
|
||||
|
||||
|
|
|
|||
|
|
@ -18,14 +18,14 @@
|
|||
* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
|
||||
*/
|
||||
#include <string.h>
|
||||
#include "ixheaacd_type_def.h"
|
||||
#include "ixheaac_type_def.h"
|
||||
#include "ixheaacd_mps_struct_def.h"
|
||||
#include "ixheaacd_error_codes.h"
|
||||
#include "ixheaacd_bitbuffer.h"
|
||||
#include "ixheaacd_mps_res_rom.h"
|
||||
#include "ixheaacd_mps_aac_struct.h"
|
||||
#include "ixheaacd_mps_res_channel.h"
|
||||
#include "ixheaacd_constants.h"
|
||||
#include "ixheaac_constants.h"
|
||||
#include "ixheaacd_cnst.h"
|
||||
#include "ixheaacd_common_rom.h"
|
||||
#include "ixheaacd_sbrdecsettings.h"
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
#include "ixheaacd_hybrid.h"
|
||||
#include "ixheaacd_ps_dec.h"
|
||||
#include "ixheaacd_mps_polyphase.h"
|
||||
#include "ixheaacd_error_standards.h"
|
||||
#include "ixheaac_error_standards.h"
|
||||
#include "ixheaacd_config.h"
|
||||
#include "ixheaacd_qmf_dec.h"
|
||||
#include "ixheaacd_mps_dec.h"
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
#include "ixheaacd_mps_bitdec.h"
|
||||
#include "ixheaacd_mps_res_tns.h"
|
||||
#include "ixheaacd_mps_mdct_2_qmf.h"
|
||||
#include "ixheaacd_sbr_const.h"
|
||||
#include "ixheaac_sbr_const.h"
|
||||
|
||||
static IA_ERRORCODE ixheaacd_parse_extension_config(
|
||||
ia_mps_spatial_bs_config_struct *config, WORD32 num_ott_boxes, WORD32 num_ttt_boxes,
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue