diff --git a/Android.bp b/Android.bp index 4558978..7c8464e 100644 --- a/Android.bp +++ b/Android.bp @@ -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", diff --git a/CMakeLists.txt b/CMakeLists.txt index f21a1ce..884be08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/README.md b/README.md index 75069a5..166cb90 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/common/common.cmake b/common/common.cmake new file mode 100644 index 0000000..ebd8d88 --- /dev/null +++ b/common/common.cmake @@ -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) \ No newline at end of file diff --git a/decoder/ixheaacd_basic_op.h b/common/ixheaac_basic_op.h similarity index 88% rename from decoder/ixheaacd_basic_op.h rename to common/ixheaac_basic_op.h index 7a6f0ff..50ed273 100644 --- a/decoder/ixheaacd_basic_op.h +++ b/common/ixheaac_basic_op.h @@ -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 */ diff --git a/decoder/ixheaacd_basic_ops.h b/common/ixheaac_basic_ops.h similarity index 67% rename from decoder/ixheaacd_basic_ops.h rename to common/ixheaac_basic_ops.h index e22538b..8527795 100644 --- a/decoder/ixheaacd_basic_ops.h +++ b/common/ixheaac_basic_ops.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 */ diff --git a/decoder/ixheaacd_basic_ops16.h b/common/ixheaac_basic_ops16.h similarity index 60% rename from decoder/ixheaacd_basic_ops16.h rename to common/ixheaac_basic_ops16.h index 1503d31..d614e6a 100644 --- a/decoder/ixheaacd_basic_ops16.h +++ b/common/ixheaac_basic_ops16.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 */ diff --git a/decoder/ixheaacd_basic_ops32.h b/common/ixheaac_basic_ops32.h similarity index 64% rename from decoder/ixheaacd_basic_ops32.h rename to common/ixheaac_basic_ops32.h index af605f4..5258a09 100644 --- a/decoder/ixheaacd_basic_ops32.h +++ b/common/ixheaac_basic_ops32.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 */ diff --git a/decoder/ixheaacd_basic_ops40.h b/common/ixheaac_basic_ops40.h similarity index 68% rename from decoder/ixheaacd_basic_ops40.h rename to common/ixheaac_basic_ops40.h index e78b8e1..d4d2b75 100644 --- a/decoder/ixheaacd_basic_ops40.h +++ b/common/ixheaac_basic_ops40.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 */ diff --git a/common/ixheaac_basic_ops_arr.h b/common/ixheaac_basic_ops_arr.h new file mode 100644 index 0000000..91c73d2 --- /dev/null +++ b/common/ixheaac_basic_ops_arr.h @@ -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 */ diff --git a/decoder/ixheaacd_constants.h b/common/ixheaac_constants.h similarity index 96% rename from decoder/ixheaacd_constants.h rename to common/ixheaac_constants.h index 931fb61..f9f8c31 100644 --- a/decoder/ixheaacd_constants.h +++ b/common/ixheaac_constants.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 */ diff --git a/decoder/ixheaacd_fft_ifft_rom.h b/common/ixheaac_error_standards.h similarity index 65% rename from decoder/ixheaacd_fft_ifft_rom.h rename to common/ixheaac_error_standards.h index 8a67d61..ec1e55d 100644 --- a/decoder/ixheaacd_fft_ifft_rom.h +++ b/common/ixheaac_error_standards.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 */ diff --git a/decoder/ixheaacd_esbr_fft.c b/common/ixheaac_esbr_fft.c similarity index 96% rename from decoder/ixheaacd_esbr_fft.c rename to common/ixheaac_esbr_fft.c index 97a6eff..a382a1f 100644 --- a/decoder/ixheaacd_esbr_fft.c +++ b/common/ixheaac_esbr_fft.c @@ -20,9 +20,9 @@ #include #include -#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; diff --git a/decoder/ixheaacd_esbr_rom.c b/common/ixheaac_esbr_rom.c similarity index 99% rename from decoder/ixheaacd_esbr_rom.c rename to common/ixheaac_esbr_rom.c index fc0748e..d4881ce 100644 --- a/decoder/ixheaacd_esbr_rom.c +++ b/common/ixheaac_esbr_rom.c @@ -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, diff --git a/common/ixheaac_esbr_rom.h b/common/ixheaac_esbr_rom.h new file mode 100644 index 0000000..575eeb2 --- /dev/null +++ b/common/ixheaac_esbr_rom.h @@ -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 */ diff --git a/decoder/ixheaacd_fft_ifft_32x32_rom.c b/common/ixheaac_fft_ifft_32x32_rom.c similarity index 99% rename from decoder/ixheaacd_fft_ifft_32x32_rom.c rename to common/ixheaac_fft_ifft_32x32_rom.c index 411aae4..92d4711 100644 --- a/decoder/ixheaacd_fft_ifft_32x32_rom.c +++ b/common/ixheaac_fft_ifft_32x32_rom.c @@ -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, diff --git a/common/ixheaac_fft_ifft_rom.h b/common/ixheaac_fft_ifft_rom.h new file mode 100644 index 0000000..40e5bba --- /dev/null +++ b/common/ixheaac_fft_ifft_rom.h @@ -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 */ diff --git a/decoder/ixheaacd_sbr_const.h b/common/ixheaac_sbr_const.h similarity index 88% rename from decoder/ixheaacd_sbr_const.h rename to common/ixheaac_sbr_const.h index b09c3c2..b91d204 100644 --- a/decoder/ixheaacd_sbr_const.h +++ b/common/ixheaac_sbr_const.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 */ diff --git a/common/ixheaac_type_def.h b/common/ixheaac_type_def.h new file mode 100644 index 0000000..8fe6b80 --- /dev/null +++ b/common/ixheaac_type_def.h @@ -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 */ diff --git a/decoder/armv7/ixheaacd_complex_fft_p2.s b/decoder/armv7/ixheaacd_complex_fft_p2.s index 007b513..e4e56f0 100644 --- a/decoder/armv7/ixheaacd_complex_fft_p2.s +++ b/decoder/armv7/ixheaacd_complex_fft_p2.s @@ -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 diff --git a/decoder/armv7/ixheaacd_complex_ifft_p2.s b/decoder/armv7/ixheaacd_complex_ifft_p2.s index ef0e8cb..a3f02cd 100644 --- a/decoder/armv7/ixheaacd_complex_ifft_p2.s +++ b/decoder/armv7/ixheaacd_complex_ifft_p2.s @@ -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 diff --git a/decoder/armv7/ixheaacd_esbr_cos_sin_mod_loop2.s b/decoder/armv7/ixheaacd_esbr_cos_sin_mod_loop2.s index 42bf6cc..3220078 100644 --- a/decoder/armv7/ixheaacd_esbr_cos_sin_mod_loop2.s +++ b/decoder/armv7/ixheaacd_esbr_cos_sin_mod_loop2.s @@ -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; diff --git a/decoder/armv7/ixheaacd_fft_armv7.c b/decoder/armv7/ixheaacd_fft_armv7.c index cf6e1b5..37ea498 100644 --- a/decoder/armv7/ixheaacd_fft_armv7.c +++ b/decoder/armv7/ixheaacd_fft_armv7.c @@ -1,10 +1,10 @@ #include #include -#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; diff --git a/decoder/armv7/ixheaacd_function_selector_arm_non_neon.c b/decoder/armv7/ixheaacd_function_selector_arm_non_neon.c index ac633bf..97f69e5 100644 --- a/decoder/armv7/ixheaacd_function_selector_arm_non_neon.c +++ b/decoder/armv7/ixheaacd_function_selector_arm_non_neon.c @@ -20,15 +20,15 @@ #include #include #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" diff --git a/decoder/armv7/ixheaacd_function_selector_armv7.c b/decoder/armv7/ixheaacd_function_selector_armv7.c index 08691ab..5ace29b 100644 --- a/decoder/armv7/ixheaacd_function_selector_armv7.c +++ b/decoder/armv7/ixheaacd_function_selector_armv7.c @@ -20,15 +20,15 @@ #include #include #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" diff --git a/decoder/armv7/ixheaacd_mps_complex_fft_64_asm.s b/decoder/armv7/ixheaacd_mps_complex_fft_64_asm.s index 71af360..b522289 100644 --- a/decoder/armv7/ixheaacd_mps_complex_fft_64_asm.s +++ b/decoder/armv7/ixheaacd_mps_complex_fft_64_asm.s @@ -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 diff --git a/decoder/armv7/ixheaacd_qmf_dec_armv7.c b/decoder/armv7/ixheaacd_qmf_dec_armv7.c index d249fd7..3a18da4 100644 --- a/decoder/armv7/ixheaacd_qmf_dec_armv7.c +++ b/decoder/armv7/ixheaacd_qmf_dec_armv7.c @@ -20,13 +20,13 @@ #include #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); } diff --git a/decoder/armv8/ixheaacd_function_selector_armv8.c b/decoder/armv8/ixheaacd_function_selector_armv8.c index 4454579..9b39d67 100644 --- a/decoder/armv8/ixheaacd_function_selector_armv8.c +++ b/decoder/armv8/ixheaacd_function_selector_armv8.c @@ -20,15 +20,15 @@ #include #include #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" diff --git a/decoder/armv8/ixheaacd_qmf_dec_armv8.c b/decoder/armv8/ixheaacd_qmf_dec_armv8.c index 16c19da..ebd34d5 100644 --- a/decoder/armv8/ixheaacd_qmf_dec_armv8.c +++ b/decoder/armv8/ixheaacd_qmf_dec_armv8.c @@ -19,13 +19,13 @@ */ #include #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; } diff --git a/decoder/generic/ixheaacd_function_selector_generic.c b/decoder/generic/ixheaacd_function_selector_generic.c index 4a57944..36eedb0 100644 --- a/decoder/generic/ixheaacd_function_selector_generic.c +++ b/decoder/generic/ixheaacd_function_selector_generic.c @@ -20,15 +20,15 @@ #include #include #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" diff --git a/decoder/generic/ixheaacd_qmf_dec_generic.c b/decoder/generic/ixheaacd_qmf_dec_generic.c index a92aad9..ff1e958 100644 --- a/decoder/generic/ixheaacd_qmf_dec_generic.c +++ b/decoder/generic/ixheaacd_qmf_dec_generic.c @@ -20,13 +20,13 @@ #include #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" @@ -84,22 +84,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_mult32x16in32(temp1[0], twid_re) + - ixheaacd_mult32x16in32(temp1[1], twid_im); - *p_out++ = -ixheaacd_mult32x16in32(temp1[1], twid_re) + - ixheaacd_mult32x16in32(temp1[0], twid_im); + *p_out++ = ixheaac_mult32x16in32(temp1[0], twid_re) + + ixheaac_mult32x16in32(temp1[1], twid_im); + *p_out++ = -ixheaac_mult32x16in32(temp1[1], twid_re) + + ixheaac_mult32x16in32(temp1[0], twid_im); } twid_re = *twidle_fwd++; @@ -109,15 +109,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_mult32x16in32(temp1[0], twid_re) + - ixheaacd_mult32x16in32(temp1[1], twid_im); - temp2[3] = -ixheaacd_mult32x16in32(temp1[1], twid_re) + - ixheaacd_mult32x16in32(temp1[0], twid_im); + temp2[2] = ixheaac_mult32x16in32(temp1[0], twid_re) + + ixheaac_mult32x16in32(temp1[1], twid_im); + temp2[3] = -ixheaac_mult32x16in32(temp1[1], twid_re) + + ixheaac_mult32x16in32(temp1[0], twid_im); ptr_forward = output; ptr_reverse = &output[DCT3_LEN - 1]; @@ -156,10 +156,10 @@ VOID ixheaacd_dct3_32(WORD32 *input, WORD32 *output, temp1[2] = temp2[1] + temp2[3]; temp1[3] = (temp2[1] - temp2[3]); - temp1[4] = ixheaacd_mult32x16in32(temp1[0], twid_re) + - ixheaacd_mult32x16in32(temp1[2], twid_im); - temp1[5] = -ixheaacd_mult32x16in32(temp1[2], twid_re) + - ixheaacd_mult32x16in32(temp1[0], twid_im); + temp1[4] = ixheaac_mult32x16in32(temp1[0], twid_re) + + ixheaac_mult32x16in32(temp1[2], twid_im); + temp1[5] = -ixheaac_mult32x16in32(temp1[2], twid_re) + + ixheaac_mult32x16in32(temp1[0], twid_im); temp1[1] >>= 1; temp1[3] >>= 1; @@ -186,10 +186,10 @@ VOID ixheaacd_dct3_32(WORD32 *input, WORD32 *output, temp1[2] = temp2[1] + temp2[3]; temp1[3] = (temp2[1] - temp2[3]); - temp1[4] = ixheaacd_mult32x16in32(temp1[0], twid_re) - - ixheaacd_mult32x16in32(temp1[2], twid_im); - temp1[5] = ixheaacd_mult32x16in32(temp1[2], twid_re) + - ixheaacd_mult32x16in32(temp1[0], twid_im); + temp1[4] = ixheaac_mult32x16in32(temp1[0], twid_re) - + ixheaac_mult32x16in32(temp1[2], twid_im); + temp1[5] = ixheaac_mult32x16in32(temp1[2], twid_re) + + ixheaac_mult32x16in32(temp1[0], twid_im); temp1[1] >>= 1; temp1[3] >>= 1; @@ -263,7 +263,7 @@ VOID ixheaacd_cos_sin_mod(WORD32 *subband, WORD16 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 WORD16 *p_sin; const WORD16 *p_sin_cos = &qmf_bank->cos_twiddle[0]; @@ -275,7 +275,7 @@ VOID ixheaacd_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); psubband = &subband[0]; psubband1 = &subband[2 * M - 1]; @@ -294,18 +294,18 @@ VOID ixheaacd_cos_sin_mod(WORD32 *subband, wim = *p_sin_cos++; wre = *p_sin_cos++; - *psubband_t++ = ixheaacd_add32_sat(ixheaacd_mult32x16in32(re, wre), - ixheaacd_mult32x16in32(im, wim)); - *psubband_t++ = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(im, wre), - ixheaacd_mult32x16in32(re, wim)); + *psubband_t++ = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wre), + ixheaac_mult32x16in32(im, wim)); + *psubband_t++ = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wre), + ixheaac_mult32x16in32(re, wim)); re = *psubband2++; im = *psubband12--; - *psubband_t2++ = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(im, wim), - ixheaacd_mult32x16in32(re, wre)); - *psubband_t2++ = ixheaacd_add32_sat(ixheaacd_mult32x16in32(re, wim), - ixheaacd_mult32x16in32(im, wre)); + *psubband_t2++ = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wim), + ixheaac_mult32x16in32(re, wre)); + *psubband_t2++ = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wim), + ixheaac_mult32x16in32(im, wre)); re = *psubband1--; im = *psubband++; @@ -313,18 +313,18 @@ VOID ixheaacd_cos_sin_mod(WORD32 *subband, wim = *p_sin_cos++; wre = *p_sin_cos++; - *psubband1_t-- = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(im, wre), - ixheaacd_mult32x16in32(re, wim)); - *psubband1_t-- = ixheaacd_add32_sat(ixheaacd_mult32x16in32(re, wre), - ixheaacd_mult32x16in32(im, wim)); + *psubband1_t-- = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wre), + ixheaac_mult32x16in32(re, wim)); + *psubband1_t-- = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wre), + ixheaac_mult32x16in32(im, wim)); re = *psubband12--; im = *psubband2++; - *psubband1_t2-- = ixheaacd_add32_sat(ixheaacd_mult32x16in32(re, wim), - ixheaacd_mult32x16in32(im, wre)); - *psubband1_t2-- = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(im, wim), - ixheaacd_mult32x16in32(re, wre)); + *psubband1_t2-- = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wim), + ixheaac_mult32x16in32(im, wre)); + *psubband1_t2-- = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wim), + ixheaac_mult32x16in32(re, wre)); re = *psubband++; im = *psubband1--; @@ -332,18 +332,18 @@ VOID ixheaacd_cos_sin_mod(WORD32 *subband, wim = *p_sin_cos++; wre = *p_sin_cos++; - *psubband_t++ = ixheaacd_add32_sat(ixheaacd_mult32x16in32(re, wre), - ixheaacd_mult32x16in32(im, wim)); - *psubband_t++ = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(im, wre), - ixheaacd_mult32x16in32(re, wim)); + *psubband_t++ = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wre), + ixheaac_mult32x16in32(im, wim)); + *psubband_t++ = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wre), + ixheaac_mult32x16in32(re, wim)); re = *psubband2++; im = *psubband12--; - *psubband_t2++ = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(im, wim), - ixheaacd_mult32x16in32(re, wre)); - *psubband_t2++ = ixheaacd_add32_sat(ixheaacd_mult32x16in32(re, wim), - ixheaacd_mult32x16in32(im, wre)); + *psubband_t2++ = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wim), + ixheaac_mult32x16in32(re, wre)); + *psubband_t2++ = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wim), + ixheaac_mult32x16in32(im, wre)); re = *psubband1--; im = *psubband++; @@ -351,19 +351,19 @@ VOID ixheaacd_cos_sin_mod(WORD32 *subband, wim = *p_sin_cos++; wre = *p_sin_cos++; - *psubband1_t-- = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(im, wre), - ixheaacd_mult32x16in32(re, wim)); - *psubband1_t-- = ixheaacd_add32_sat(ixheaacd_mult32x16in32(re, wre), - ixheaacd_mult32x16in32(im, wim)); + *psubband1_t-- = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wre), + ixheaac_mult32x16in32(re, wim)); + *psubband1_t-- = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wre), + ixheaac_mult32x16in32(im, wim)); re = *psubband12--; im = *psubband2++; ; - *psubband1_t2-- = ixheaacd_add32_sat(ixheaacd_mult32x16in32(re, wim), - ixheaacd_mult32x16in32(im, wre)); - *psubband1_t2-- = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(im, wim), - ixheaacd_mult32x16in32(re, wre)); + *psubband1_t2-- = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wim), + ixheaac_mult32x16in32(im, wre)); + *psubband1_t2-- = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wim), + ixheaac_mult32x16in32(re, wre)); } if (M == 32) { @@ -392,7 +392,7 @@ VOID ixheaacd_cos_sin_mod(WORD32 *subband, *psubband = *psubband >> 1; psubband++; - *psubband1 = ixheaacd_negate32_sat(*psubband >> 1); + *psubband1 = ixheaac_negate32_sat(*psubband >> 1); psubband1--; p_sin = &qmf_bank->alt_sin_twiddle[0]; @@ -401,17 +401,17 @@ VOID ixheaacd_cos_sin_mod(WORD32 *subband, im = *psubband1; - *psubband1-- = ixheaacd_add32_sat(ixheaacd_mult32x16in32(re, wre), - ixheaacd_mult32x16in32(im, wim)); - *psubband++ = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(im, wre), - ixheaacd_mult32x16in32(re, wim)); + *psubband1-- = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wre), + ixheaac_mult32x16in32(im, wim)); + *psubband++ = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wre), + ixheaac_mult32x16in32(re, wim)); psubband2 = &subband[64]; psubband12 = &subband[2 * M - 1 + 64]; re = *psubband12; - *psubband12-- = ixheaacd_negate32_sat(*psubband2 >> 1); + *psubband12-- = ixheaac_negate32_sat(*psubband2 >> 1); *psubband2 = psubband2[1] >> 1; @@ -419,10 +419,10 @@ VOID ixheaacd_cos_sin_mod(WORD32 *subband, im = *psubband12; - *psubband2++ = ixheaacd_negate32_sat(ixheaacd_add32_sat( - ixheaacd_mult32x16in32(re, wre), ixheaacd_mult32x16in32(im, wim))); - *psubband12-- = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(re, wim), - ixheaacd_mult32x16in32(im, wre)); + *psubband2++ = ixheaac_negate32_sat(ixheaac_add32_sat( + ixheaac_mult32x16in32(re, wre), ixheaac_mult32x16in32(im, wim))); + *psubband12-- = ixheaac_sub32_sat(ixheaac_mult32x16in32(re, wim), + ixheaac_mult32x16in32(im, wre)); for (i = (M_2 - 2); i >= 0; i--) { im = psubband[0]; @@ -431,10 +431,10 @@ VOID ixheaacd_cos_sin_mod(WORD32 *subband, re2 = *psubband1; - *psubband++ = ixheaacd_add32_sat(ixheaacd_mult32x16in32(re, wim), - ixheaacd_mult32x16in32(im, wre)); - *psubband1-- = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(im, wim), - ixheaacd_mult32x16in32(re, wre)); + *psubband++ = ixheaac_add32_sat(ixheaac_mult32x16in32(re, wim), + ixheaac_mult32x16in32(im, wre)); + *psubband1-- = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wim), + ixheaac_mult32x16in32(re, wre)); im = psubband2[0]; @@ -442,26 +442,26 @@ VOID ixheaacd_cos_sin_mod(WORD32 *subband, re3 = *psubband12; - *psubband12-- = ixheaacd_negate32_sat(ixheaacd_add32_sat( - ixheaacd_mult32x16in32(re, wim), ixheaacd_mult32x16in32(im, wre))); - *psubband2++ = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(re, wre), - ixheaacd_mult32x16in32(im, wim)); + *psubband12-- = ixheaac_negate32_sat(ixheaac_add32_sat( + ixheaac_mult32x16in32(re, wim), ixheaac_mult32x16in32(im, wre))); + *psubband2++ = ixheaac_sub32_sat(ixheaac_mult32x16in32(re, wre), + ixheaac_mult32x16in32(im, wim)); wim = *p_sin++; wre = *p_sin++; im = psubband1[0]; - *psubband1-- = ixheaacd_add32_sat(ixheaacd_mult32x16in32(re2, wre), - ixheaacd_mult32x16in32(im, wim)); - *psubband++ = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(im, wre), - ixheaacd_mult32x16in32(re2, wim)); + *psubband1-- = ixheaac_add32_sat(ixheaac_mult32x16in32(re2, wre), + ixheaac_mult32x16in32(im, wim)); + *psubband++ = ixheaac_sub32_sat(ixheaac_mult32x16in32(im, wre), + ixheaac_mult32x16in32(re2, wim)); im = psubband12[0]; - *psubband2++ = ixheaacd_negate32_sat(ixheaacd_add32_sat( - ixheaacd_mult32x16in32(re3, wre), ixheaacd_mult32x16in32(im, wim))); - *psubband12-- = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(re3, wim), - ixheaacd_mult32x16in32(im, wre)); + *psubband2++ = ixheaac_negate32_sat(ixheaac_add32_sat( + ixheaac_mult32x16in32(re3, wre), ixheaac_mult32x16in32(im, wim))); + *psubband12-- = ixheaac_sub32_sat(ixheaac_mult32x16in32(re3, wim), + ixheaac_mult32x16in32(im, wre)); } } @@ -478,12 +478,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); } if (qmf_bank->no_channels != 64) @@ -505,11 +505,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; @@ -533,56 +533,56 @@ VOID ixheaacd_sbr_qmfanal32_winadd(WORD16 *inp1, WORD16 *inp2, for (n = 0; n < 32; n += 2) { WORD32 accu; - accu = ixheaacd_mult16x16in32(inp1[n + 0], p_qmf1[2 * (n + 0)]); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp1[n + 64], p_qmf1[2 * (n + 64)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp1[n + 128], p_qmf1[2 * (n + 128)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp1[n + 192], p_qmf1[2 * (n + 192)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp1[n + 256], p_qmf1[2 * (n + 256)])); + accu = ixheaac_mult16x16in32(inp1[n + 0], p_qmf1[2 * (n + 0)]); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp1[n + 64], p_qmf1[2 * (n + 64)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp1[n + 128], p_qmf1[2 * (n + 128)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp1[n + 192], p_qmf1[2 * (n + 192)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp1[n + 256], p_qmf1[2 * (n + 256)])); p_out[n] = accu; - accu = ixheaacd_mult16x16in32(inp1[n + 1 + 0], p_qmf1[2 * (n + 1 + 0)]); - accu = ixheaacd_add32_sat( + accu = ixheaac_mult16x16in32(inp1[n + 1 + 0], p_qmf1[2 * (n + 1 + 0)]); + accu = ixheaac_add32_sat( accu, - ixheaacd_mult16x16in32(inp1[n + 1 + 64], p_qmf1[2 * (n + 1 + 64)])); - accu = ixheaacd_add32_sat( + ixheaac_mult16x16in32(inp1[n + 1 + 64], p_qmf1[2 * (n + 1 + 64)])); + accu = ixheaac_add32_sat( accu, - ixheaacd_mult16x16in32(inp1[n + 1 + 128], p_qmf1[2 * (n + 1 + 128)])); - accu = ixheaacd_add32_sat( + ixheaac_mult16x16in32(inp1[n + 1 + 128], p_qmf1[2 * (n + 1 + 128)])); + accu = ixheaac_add32_sat( accu, - ixheaacd_mult16x16in32(inp1[n + 1 + 192], p_qmf1[2 * (n + 1 + 192)])); - accu = ixheaacd_add32_sat( + ixheaac_mult16x16in32(inp1[n + 1 + 192], p_qmf1[2 * (n + 1 + 192)])); + accu = ixheaac_add32_sat( accu, - ixheaacd_mult16x16in32(inp1[n + 1 + 256], p_qmf1[2 * (n + 1 + 256)])); + ixheaac_mult16x16in32(inp1[n + 1 + 256], p_qmf1[2 * (n + 1 + 256)])); p_out[n + 1] = accu; - accu = ixheaacd_mult16x16in32(inp2[n + 0], p_qmf2[2 * (n + 0)]); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp2[n + 64], p_qmf2[2 * (n + 64)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp2[n + 128], p_qmf2[2 * (n + 128)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp2[n + 192], p_qmf2[2 * (n + 192)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp2[n + 256], p_qmf2[2 * (n + 256)])); + accu = ixheaac_mult16x16in32(inp2[n + 0], p_qmf2[2 * (n + 0)]); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp2[n + 64], p_qmf2[2 * (n + 64)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp2[n + 128], p_qmf2[2 * (n + 128)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp2[n + 192], p_qmf2[2 * (n + 192)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp2[n + 256], p_qmf2[2 * (n + 256)])); p_out[n + 32] = accu; - accu = ixheaacd_mult16x16in32(inp2[n + 1 + 0], p_qmf2[2 * (n + 1 + 0)]); - accu = ixheaacd_add32_sat( + accu = ixheaac_mult16x16in32(inp2[n + 1 + 0], p_qmf2[2 * (n + 1 + 0)]); + accu = ixheaac_add32_sat( accu, - ixheaacd_mult16x16in32(inp2[n + 1 + 64], p_qmf2[2 * (n + 1 + 64)])); - accu = ixheaacd_add32_sat( + ixheaac_mult16x16in32(inp2[n + 1 + 64], p_qmf2[2 * (n + 1 + 64)])); + accu = ixheaac_add32_sat( accu, - ixheaacd_mult16x16in32(inp2[n + 1 + 128], p_qmf2[2 * (n + 1 + 128)])); - accu = ixheaacd_add32_sat( + ixheaac_mult16x16in32(inp2[n + 1 + 128], p_qmf2[2 * (n + 1 + 128)])); + accu = ixheaac_add32_sat( accu, - ixheaacd_mult16x16in32(inp2[n + 1 + 192], p_qmf2[2 * (n + 1 + 192)])); - accu = ixheaacd_add32_sat( + ixheaac_mult16x16in32(inp2[n + 1 + 192], p_qmf2[2 * (n + 1 + 192)])); + accu = ixheaac_add32_sat( accu, - ixheaacd_mult16x16in32(inp2[n + 1 + 256], p_qmf2[2 * (n + 1 + 256)])); + ixheaac_mult16x16in32(inp2[n + 1 + 256], p_qmf2[2 * (n + 1 + 256)])); p_out[n + 1 + 32] = accu; } } @@ -912,57 +912,57 @@ VOID ixheaacd_esbr_radix4bfly(const WORD32 *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_mult64(xt2_0, co30); - mul_3 = ixheaacd_mult64(yt2_0, si30); + mul_11 = ixheaac_mult64(xt2_0, co30); + mul_3 = ixheaac_mult64(yt2_0, si30); x[l2] = (WORD32)((mul_3 + mul_11) >> 32) << RADIXSHIFT; - mul_5 = ixheaacd_mult64(xt2_0, si30); - mul_9 = ixheaacd_mult64(yt2_0, co30); + mul_5 = ixheaac_mult64(xt2_0, si30); + mul_9 = ixheaac_mult64(yt2_0, co30); x[l2 + 1] = (WORD32)((mul_9 - mul_5) >> 32) << RADIXSHIFT; - mul_12 = ixheaacd_mult64(xt0_0, co20); - mul_2 = ixheaacd_mult64(yt0_0, si20); + mul_12 = ixheaac_mult64(xt0_0, co20); + mul_2 = ixheaac_mult64(yt0_0, si20); x[l1] = (WORD32)((mul_2 + mul_12) >> 32) << RADIXSHIFT; - mul_6 = ixheaacd_mult64(xt0_0, si20); - mul_8 = ixheaacd_mult64(yt0_0, co20); + mul_6 = ixheaac_mult64(xt0_0, si20); + mul_8 = ixheaac_mult64(yt0_0, co20); x[l1 + 1] = (WORD32)((mul_8 - mul_6) >> 32) << RADIXSHIFT; - mul_4 = ixheaacd_mult64(xt1_0, co10); - mul_1 = ixheaacd_mult64(yt1_0, si10); + mul_4 = ixheaac_mult64(xt1_0, co10); + mul_1 = ixheaac_mult64(yt1_0, si10); x[h2] = (WORD32)((mul_1 + mul_4) >> 32) << RADIXSHIFT; - mul_10 = ixheaacd_mult64(xt1_0, si10); - mul_7 = ixheaacd_mult64(yt1_0, co10); + mul_10 = ixheaac_mult64(xt1_0, si10); + mul_7 = ixheaac_mult64(yt1_0, co10); x[h2 + 1] = (WORD32)((mul_7 - mul_10) >> 32) << RADIXSHIFT; x += 2; @@ -1006,14 +1006,14 @@ VOID ixheaacd_esbr_postradixcompute2(WORD32 *ptr_y, WORD32 *ptr_x, x_6 = *x0++; x_7 = *x0++; - n00 = ixheaacd_add32_sat(x_0, x_2); - n01 = ixheaacd_add32_sat(x_1, x_3); - n20 = ixheaacd_sub32_sat(x_0, x_2); - n21 = ixheaacd_sub32_sat(x_1, x_3); - n10 = ixheaacd_add32_sat(x_4, x_6); - n11 = ixheaacd_add32_sat(x_5, x_7); - n30 = ixheaacd_sub32_sat(x_4, x_6); - n31 = ixheaacd_sub32_sat(x_5, x_7); + n00 = ixheaac_add32_sat(x_0, x_2); + n01 = ixheaac_add32_sat(x_1, x_3); + n20 = ixheaac_sub32_sat(x_0, x_2); + n21 = ixheaac_sub32_sat(x_1, x_3); + n10 = ixheaac_add32_sat(x_4, x_6); + n11 = ixheaac_add32_sat(x_5, x_7); + n30 = ixheaac_sub32_sat(x_4, x_6); + n31 = ixheaac_sub32_sat(x_5, x_7); y0[h2] = n00; y0[h2 + 1] = n01; @@ -1033,14 +1033,14 @@ VOID ixheaacd_esbr_postradixcompute2(WORD32 *ptr_y, WORD32 *ptr_x, x_e = *x2++; x_f = *x2++; - n02 = ixheaacd_add32_sat(x_8, x_a); - n03 = ixheaacd_add32_sat(x_9, x_b); - n22 = ixheaacd_sub32_sat(x_8, x_a); - n23 = ixheaacd_sub32_sat(x_9, x_b); - n12 = ixheaacd_add32_sat(x_c, x_e); - n13 = ixheaacd_add32_sat(x_d, x_f); - n32 = ixheaacd_sub32_sat(x_c, x_e); - n33 = ixheaacd_sub32_sat(x_d, x_f); + n02 = ixheaac_add32_sat(x_8, x_a); + n03 = ixheaac_add32_sat(x_9, x_b); + n22 = ixheaac_sub32_sat(x_8, x_a); + n23 = ixheaac_sub32_sat(x_9, x_b); + n12 = ixheaac_add32_sat(x_c, x_e); + n13 = ixheaac_add32_sat(x_d, x_f); + n32 = ixheaac_sub32_sat(x_c, x_e); + n33 = ixheaac_sub32_sat(x_d, x_f); y0[h2 + 2] = n02; y0[h2 + 3] = n03; @@ -1092,23 +1092,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; @@ -1128,23 +1128,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; @@ -1171,7 +1171,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; @@ -1184,7 +1184,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; @@ -1206,20 +1206,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--; @@ -1228,21 +1228,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++; @@ -1252,20 +1252,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--; @@ -1274,21 +1274,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); } @@ -1374,7 +1374,7 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband, *psubband = *psubband >> 1; psubband++; - *psubband1 = ixheaacd_negate32_sat(*psubband >> 1); + *psubband1 = ixheaac_negate32_sat(*psubband >> 1); psubband1--; p_sin = qmf_bank->esbr_alt_sin_twiddle; @@ -1385,10 +1385,10 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband, im = *psubband1; *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]; @@ -1396,7 +1396,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; @@ -1404,11 +1404,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--) { @@ -1419,10 +1419,10 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband, re2 = *psubband1; *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]; @@ -1431,11 +1431,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++; @@ -1443,19 +1443,19 @@ VOID ixheaacd_esbr_cos_sin_mod(WORD32 *subband, im = psubband1[0]; *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); } } @@ -1473,12 +1473,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); } ixheaacd_esbr_cos_sin_mod(real_subband, qmf_bank, @@ -1495,12 +1495,12 @@ VOID ixheaacd_esbr_fwd_modulation( im = *imag_subband; cosh = *tcos++; sinh = *tcos++; - *real_subband++ = (WORD32)((ixheaacd_add64(ixheaacd_mult64(re, cosh), - ixheaacd_mult64(im, sinh))) >> + *real_subband++ = (WORD32)((ixheaac_add64(ixheaac_mult64(re, cosh), + ixheaac_mult64(im, sinh))) >> 31); *imag_subband++ = - (WORD32)((ixheaacd_sub64_sat(ixheaacd_mult64(im, cosh), - ixheaacd_mult64(re, sinh))) >> + (WORD32)((ixheaac_sub64_sat(ixheaac_mult64(im, cosh), + ixheaac_mult64(re, sinh))) >> 31); } } @@ -1515,29 +1515,29 @@ VOID ixheaacd_sbr_qmfsyn64_winadd(WORD16 *tmp1, WORD16 *tmp2, WORD16 *inp1, for (k = 0; k < 64; k++) { WORD32 syn_out = rounding_fac; - syn_out = ixheaacd_add32_sat( - syn_out, ixheaacd_mult16x16in32(tmp1[0 + k], inp1[k + 0])); - syn_out = ixheaacd_add32_sat( - syn_out, ixheaacd_mult16x16in32(tmp1[256 + k], inp1[k + 128])); - syn_out = ixheaacd_add32_sat( - syn_out, ixheaacd_mult16x16in32(tmp1[512 + k], inp1[k + 256])); - syn_out = ixheaacd_add32_sat( - syn_out, ixheaacd_mult16x16in32(tmp1[768 + k], inp1[k + 384])); - syn_out = ixheaacd_add32_sat( - syn_out, ixheaacd_mult16x16in32(tmp1[1024 + k], inp1[k + 512])); + syn_out = ixheaac_add32_sat( + syn_out, ixheaac_mult16x16in32(tmp1[0 + k], inp1[k + 0])); + syn_out = ixheaac_add32_sat( + syn_out, ixheaac_mult16x16in32(tmp1[256 + k], inp1[k + 128])); + syn_out = ixheaac_add32_sat( + syn_out, ixheaac_mult16x16in32(tmp1[512 + k], inp1[k + 256])); + syn_out = ixheaac_add32_sat( + syn_out, ixheaac_mult16x16in32(tmp1[768 + k], inp1[k + 384])); + syn_out = ixheaac_add32_sat( + syn_out, ixheaac_mult16x16in32(tmp1[1024 + k], inp1[k + 512])); - syn_out = ixheaacd_add32_sat( - syn_out, ixheaacd_mult16x16in32(tmp2[128 + k], inp1[k + 64])); - syn_out = ixheaacd_add32_sat( - syn_out, ixheaacd_mult16x16in32(tmp2[384 + k], inp1[k + 192])); - syn_out = ixheaacd_add32_sat( - syn_out, ixheaacd_mult16x16in32(tmp2[640 + k], inp1[k + 320])); - syn_out = ixheaacd_add32_sat( - syn_out, ixheaacd_mult16x16in32(tmp2[896 + k], inp1[k + 448])); - syn_out = ixheaacd_add32_sat( - syn_out, ixheaacd_mult16x16in32(tmp2[1152 + k], inp1[k + 576])); + syn_out = ixheaac_add32_sat( + syn_out, ixheaac_mult16x16in32(tmp2[128 + k], inp1[k + 64])); + syn_out = ixheaac_add32_sat( + syn_out, ixheaac_mult16x16in32(tmp2[384 + k], inp1[k + 192])); + syn_out = ixheaac_add32_sat( + syn_out, ixheaac_mult16x16in32(tmp2[640 + k], inp1[k + 320])); + syn_out = ixheaac_add32_sat( + syn_out, ixheaac_mult16x16in32(tmp2[896 + k], inp1[k + 448])); + syn_out = ixheaac_add32_sat( + syn_out, ixheaac_mult16x16in32(tmp2[1152 + k], inp1[k + 576])); - sample_buffer[ch_fac * k] = (ixheaacd_shl32_sat(syn_out, shift) >> 16); + sample_buffer[ch_fac * k] = (ixheaac_shl32_sat(syn_out, shift) >> 16); } } @@ -1549,26 +1549,26 @@ 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] = (WORD32)(syn_out >> 31); } @@ -1582,26 +1582,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); } @@ -1614,21 +1614,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; } @@ -1650,22 +1650,22 @@ VOID ixheaacd_shiftrountine_with_rnd(WORD32 *qmf_real, WORD32 *qmf_imag, r1 = *qmf_real++; i1 = *qmf_imag++; - timag = ixheaacd_add32_sat(i1, r1); - timag = (ixheaacd_shl32_sat(timag, shift)); - filter_states_rev[j] = ixheaacd_round16(timag); + timag = ixheaac_add32_sat(i1, r1); + timag = (ixheaac_shl32_sat(timag, shift)); + filter_states_rev[j] = ixheaac_round16(timag); - treal = ixheaacd_sub32_sat(i2, r2); - treal = (ixheaacd_shl32_sat(treal, shift)); - filter_states[j] = ixheaacd_round16(treal); + treal = ixheaac_sub32_sat(i2, r2); + treal = (ixheaac_shl32_sat(treal, shift)); + filter_states[j] = ixheaac_round16(treal); - treal = ixheaacd_sub32_sat(i1, r1); - treal = (ixheaacd_shl32_sat(treal, shift)); - *filter_states++ = ixheaacd_round16(treal); + treal = ixheaac_sub32_sat(i1, r1); + treal = (ixheaac_shl32_sat(treal, shift)); + *filter_states++ = ixheaac_round16(treal); - timag = ixheaacd_add32_sat(i2, r2); + timag = ixheaac_add32_sat(i2, r2); ; - timag = (ixheaacd_shl32_sat(timag, shift)); - *filter_states_rev++ = ixheaacd_round16(timag); + timag = (ixheaac_shl32_sat(timag, shift)); + *filter_states_rev++ = ixheaac_round16(timag); } } @@ -1683,21 +1683,21 @@ VOID ixheaacd_shiftrountine_with_rnd_eld(WORD32 *qmf_real, WORD32 *qmf_imag, r1 = *qmf_real++; i1 = *qmf_imag++; - timag = ixheaacd_negate32_sat(ixheaacd_add32_sat(i1, r1)); - timag = (ixheaacd_shl32_sat(timag, shift)); - filter_states_rev[j] = ixheaacd_round16(timag); + timag = ixheaac_negate32_sat(ixheaac_add32_sat(i1, r1)); + timag = (ixheaac_shl32_sat(timag, shift)); + filter_states_rev[j] = ixheaac_round16(timag); - treal = ixheaacd_sub32_sat(r2, i2); - treal = (ixheaacd_shl32_sat(treal, shift)); - filter_states[j] = ixheaacd_round16(treal); + treal = ixheaac_sub32_sat(r2, i2); + treal = (ixheaac_shl32_sat(treal, shift)); + filter_states[j] = ixheaac_round16(treal); - treal = ixheaacd_sub32_sat(r1, i1); - treal = (ixheaacd_shl32_sat(treal, shift)); - *filter_states++ = ixheaacd_round16(treal); + treal = ixheaac_sub32_sat(r1, i1); + treal = (ixheaac_shl32_sat(treal, shift)); + *filter_states++ = ixheaac_round16(treal); - timag = ixheaacd_negate32_sat(ixheaacd_add32_sat(i2, r2)); - timag = (ixheaacd_shl32_sat(timag, shift)); - *filter_states_rev++ = ixheaacd_round16(timag); + timag = ixheaac_negate32_sat(ixheaac_add32_sat(i2, r2)); + timag = (ixheaac_shl32_sat(timag, shift)); + *filter_states_rev++ = ixheaac_round16(timag); } } @@ -1715,20 +1715,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; } } @@ -1768,57 +1768,57 @@ 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); + mul_11 = ixheaac_mult32x16in32(xt2_0, co30); + mul_3 = ixheaac_mult32x16in32(yt2_0, si30); x[l2] = (mul_3 + mul_11) << RADIXSHIFT; - mul_5 = ixheaacd_mult32x16in32(xt2_0, si30); - mul_9 = ixheaacd_mult32x16in32(yt2_0, co30); + mul_5 = ixheaac_mult32x16in32(xt2_0, si30); + mul_9 = ixheaac_mult32x16in32(yt2_0, co30); x[l2 + 1] = (mul_9 - mul_5) << RADIXSHIFT; - mul_12 = ixheaacd_mult32x16in32(xt0_0, co20); - mul_2 = ixheaacd_mult32x16in32(yt0_0, si20); + mul_12 = ixheaac_mult32x16in32(xt0_0, co20); + mul_2 = ixheaac_mult32x16in32(yt0_0, si20); x[l1] = (mul_2 + mul_12) << RADIXSHIFT; - mul_6 = ixheaacd_mult32x16in32(xt0_0, si20); - mul_8 = ixheaacd_mult32x16in32(yt0_0, co20); + mul_6 = ixheaac_mult32x16in32(xt0_0, si20); + mul_8 = ixheaac_mult32x16in32(yt0_0, co20); x[l1 + 1] = (mul_8 - mul_6) << RADIXSHIFT; - mul_4 = ixheaacd_mult32x16in32(xt1_0, co10); - mul_1 = ixheaacd_mult32x16in32(yt1_0, si10); + mul_4 = ixheaac_mult32x16in32(xt1_0, co10); + mul_1 = ixheaac_mult32x16in32(yt1_0, si10); x[h2] = (mul_1 + mul_4) << RADIXSHIFT; - mul_10 = ixheaacd_mult32x16in32(xt1_0, si10); - mul_7 = ixheaacd_mult32x16in32(yt1_0, co10); + mul_10 = ixheaac_mult32x16in32(xt1_0, si10); + mul_7 = ixheaac_mult32x16in32(yt1_0, co10); x[h2 + 1] = (mul_7 - mul_10) << RADIXSHIFT; x += 2; @@ -1863,23 +1863,23 @@ VOID ixheaacd_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; @@ -1899,23 +1899,23 @@ VOID ixheaacd_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; @@ -1964,14 +1964,14 @@ VOID ixheaacd_postradixcompute2(WORD32 *ptr_y, WORD32 *ptr_x, x_6 = *x0++; x_7 = *x0++; - n00 = ixheaacd_add32_sat(x_0, x_2); - n01 = ixheaacd_add32_sat(x_1, x_3); - n20 = ixheaacd_sub32_sat(x_0, x_2); - n21 = ixheaacd_sub32_sat(x_1, x_3); - n10 = ixheaacd_add32_sat(x_4, x_6); - n11 = ixheaacd_add32_sat(x_5, x_7); - n30 = ixheaacd_sub32_sat(x_4, x_6); - n31 = ixheaacd_sub32_sat(x_5, x_7); + n00 = ixheaac_add32_sat(x_0, x_2); + n01 = ixheaac_add32_sat(x_1, x_3); + n20 = ixheaac_sub32_sat(x_0, x_2); + n21 = ixheaac_sub32_sat(x_1, x_3); + n10 = ixheaac_add32_sat(x_4, x_6); + n11 = ixheaac_add32_sat(x_5, x_7); + n30 = ixheaac_sub32_sat(x_4, x_6); + n31 = ixheaac_sub32_sat(x_5, x_7); y0[h2] = n00; y0[h2 + 1] = n01; @@ -1991,14 +1991,14 @@ VOID ixheaacd_postradixcompute2(WORD32 *ptr_y, WORD32 *ptr_x, x_e = *x2++; x_f = *x2++; - n02 = ixheaacd_add32_sat(x_8, x_a); - n03 = ixheaacd_add32_sat(x_9, x_b); - n22 = ixheaacd_sub32_sat(x_8, x_a); - n23 = ixheaacd_sub32_sat(x_9, x_b); - n12 = ixheaacd_add32_sat(x_c, x_e); - n13 = ixheaacd_add32_sat(x_d, x_f); - n32 = ixheaacd_sub32_sat(x_c, x_e); - n33 = ixheaacd_sub32_sat(x_d, x_f); + n02 = ixheaac_add32_sat(x_8, x_a); + n03 = ixheaac_add32_sat(x_9, x_b); + n22 = ixheaac_sub32_sat(x_8, x_a); + n23 = ixheaac_sub32_sat(x_9, x_b); + n12 = ixheaac_add32_sat(x_c, x_e); + n13 = ixheaac_add32_sat(x_d, x_f); + n32 = ixheaac_sub32_sat(x_c, x_e); + n33 = ixheaac_sub32_sat(x_d, x_f); y0[h2 + 2] = n02; y0[h2 + 3] = n03; diff --git a/decoder/ixheaacd_Windowing.c b/decoder/ixheaacd_Windowing.c index 806d93f..5ca597b 100644 --- a/decoder/ixheaacd_Windowing.c +++ b/decoder/ixheaacd_Windowing.c @@ -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" diff --git a/decoder/ixheaacd_aac_ec.c b/decoder/ixheaacd_aac_ec.c index 469d062..899c592 100644 --- a/decoder/ixheaacd_aac_ec.c +++ b/decoder/ixheaacd_aac_ec.c @@ -21,17 +21,17 @@ #include #include #include -#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 -#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); diff --git a/decoder/ixheaacd_aac_imdct.c b/decoder/ixheaacd_aac_imdct.c index b52e8c5..b5f2aac 100644 --- a/decoder/ixheaacd_aac_imdct.c +++ b/decoder/ixheaacd_aac_imdct.c @@ -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_common_rom.h" @@ -33,7 +33,7 @@ #include "ixheaacd_aac_imdct.h" #include "ixheaacd_intrinsics.h" -#include "ixheaacd_basic_op.h" +#include "ixheaac_basic_op.h" #include "ixheaacd_function_selector.h" #include "ixheaacd_audioobjtypes.h" @@ -129,16 +129,16 @@ VOID ixheaacd_pretwiddle_compute_960_dec( tempi = *spec_data2--; *out_ptr = - ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr, c), tempi, s); + ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, c), tempi, s); - *out_ptr = ixheaacd_shl32(*out_ptr, neg_expo); + *out_ptr = ixheaac_shl32(*out_ptr, neg_expo); out_ptr++; - *out_ptr = ixheaacd_sub32(ixheaacd_mult32x16in32(tempi, c), - ixheaacd_mult32x16in32(tempr, s)); + *out_ptr = ixheaac_sub32(ixheaac_mult32x16in32(tempi, c), + ixheaac_mult32x16in32(tempr, s)); - *out_ptr = ixheaacd_shl32(*out_ptr, neg_expo); + *out_ptr = ixheaac_shl32(*out_ptr, neg_expo); out_ptr++; c1 = *cos_sin_ptr++; @@ -148,16 +148,16 @@ VOID ixheaacd_pretwiddle_compute_960_dec( tempr = *spec_data2--; - *out_ptr1 = ixheaacd_sub32(ixheaacd_mult32x16in32(tempi, c1), - ixheaacd_mult32x16in32(tempr, s1)); + *out_ptr1 = ixheaac_sub32(ixheaac_mult32x16in32(tempi, c1), + ixheaac_mult32x16in32(tempr, s1)); - *out_ptr1 = ixheaacd_shl32(*out_ptr1, neg_expo); + *out_ptr1 = ixheaac_shl32(*out_ptr1, neg_expo); out_ptr1--; *out_ptr1 = - ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr, c1), tempi, s1); + ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, c1), tempi, s1); - *out_ptr1 = ixheaacd_shl32(*out_ptr1, neg_expo); + *out_ptr1 = ixheaac_shl32(*out_ptr1, neg_expo); out_ptr1--; } } @@ -188,15 +188,15 @@ VOID ixheaacd_pretwiddle_compute_dec( tempi = *spec_data2--; *out_ptr = - ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr, cos), tempi, sin); + ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos), tempi, sin); - *out_ptr = ixheaacd_shl32(*out_ptr, neg_expo); + *out_ptr = ixheaac_shl32(*out_ptr, neg_expo); out_ptr++; - *out_ptr = ixheaacd_sub32(ixheaacd_mult32x16in32(tempi, cos), - ixheaacd_mult32x16in32(tempr, sin)); + *out_ptr = ixheaac_sub32(ixheaac_mult32x16in32(tempi, cos), + ixheaac_mult32x16in32(tempr, sin)); - *out_ptr = ixheaacd_shl32(*out_ptr, neg_expo); + *out_ptr = ixheaac_shl32(*out_ptr, neg_expo); out_ptr++; for (i = 0; i < npoints4 - 1; i++) { @@ -214,25 +214,25 @@ VOID ixheaacd_pretwiddle_compute_dec( tempr1 = *spec_data2--; tempi = *spec_data2--; - *out_ptr1 = ixheaacd_sub32(ixheaacd_mult32x16in32(tempi1, cos), - ixheaacd_mult32x16in32(tempr1, sin)); + *out_ptr1 = ixheaac_sub32(ixheaac_mult32x16in32(tempi1, cos), + ixheaac_mult32x16in32(tempr1, sin)); - *out_ptr1 = ixheaacd_shl32(*out_ptr1, neg_expo); + *out_ptr1 = ixheaac_shl32(*out_ptr1, neg_expo); out_ptr1--; - *out_ptr1 = ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr1, cos), + *out_ptr1 = ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr1, cos), tempi1, sin); - *out_ptr1 = ixheaacd_shl32(*out_ptr1, neg_expo); + *out_ptr1 = ixheaac_shl32(*out_ptr1, neg_expo); out_ptr1--; *out_ptr = - ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr, sin), tempi, cos); - *out_ptr = ixheaacd_shl32(*out_ptr, neg_expo); + ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, sin), tempi, cos); + *out_ptr = ixheaac_shl32(*out_ptr, neg_expo); out_ptr++; - *out_ptr = ixheaacd_sub32(ixheaacd_mult32x16in32(tempi, sin), - ixheaacd_mult32x16in32(tempr, cos)); - *out_ptr = ixheaacd_shl32(*out_ptr, neg_expo); + *out_ptr = ixheaac_sub32(ixheaac_mult32x16in32(tempi, sin), + ixheaac_mult32x16in32(tempr, cos)); + *out_ptr = ixheaac_shl32(*out_ptr, neg_expo); out_ptr++; } cos1 = *cos_sin_ptr++; @@ -241,14 +241,14 @@ VOID ixheaacd_pretwiddle_compute_dec( tempr1 = *spec_data2; tempi1 = *spec_data1; - *out_ptr1 = ixheaacd_sub32(ixheaacd_mult32x16in32(tempi1, cos1), - ixheaacd_mult32x16in32(tempr1, sin1)); - *out_ptr1 = ixheaacd_shl32(*out_ptr1, neg_expo); + *out_ptr1 = ixheaac_sub32(ixheaac_mult32x16in32(tempi1, cos1), + ixheaac_mult32x16in32(tempr1, sin1)); + *out_ptr1 = ixheaac_shl32(*out_ptr1, neg_expo); out_ptr1--; - *out_ptr1 = ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr1, cos1), + *out_ptr1 = ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr1, cos1), tempi1, sin1); - *out_ptr1 = ixheaacd_shl32(*out_ptr1, neg_expo); + *out_ptr1 = ixheaac_shl32(*out_ptr1, neg_expo); out_ptr1--; } else { @@ -265,14 +265,14 @@ VOID ixheaacd_pretwiddle_compute_dec( tempi = *spec_data2--; *out_ptr = - ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr, cos), tempi, sin); - *out_ptr = ixheaacd_shr32(*out_ptr, neg_expo); + ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos), tempi, sin); + *out_ptr = ixheaac_shr32(*out_ptr, neg_expo); out_ptr++; - *out_ptr = ixheaacd_sub32(ixheaacd_mult32x16in32(tempi, cos), - ixheaacd_mult32x16in32(tempr, sin)); + *out_ptr = ixheaac_sub32(ixheaac_mult32x16in32(tempi, cos), + ixheaac_mult32x16in32(tempr, sin)); - *out_ptr = ixheaacd_shr32(*out_ptr, neg_expo); + *out_ptr = ixheaac_shr32(*out_ptr, neg_expo); out_ptr++; for (i = 0; i < npoints4 - 1; i++) { @@ -290,24 +290,24 @@ VOID ixheaacd_pretwiddle_compute_dec( tempr1 = *spec_data2--; tempi = *spec_data2--; - *out_ptr1 = ixheaacd_sub32(ixheaacd_mult32x16in32(tempi1, cos), - ixheaacd_mult32x16in32(tempr1, sin)); - *out_ptr1 = ixheaacd_shr32(*out_ptr1, neg_expo); + *out_ptr1 = ixheaac_sub32(ixheaac_mult32x16in32(tempi1, cos), + ixheaac_mult32x16in32(tempr1, sin)); + *out_ptr1 = ixheaac_shr32(*out_ptr1, neg_expo); out_ptr1--; - *out_ptr1 = ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr1, cos), + *out_ptr1 = ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr1, cos), tempi1, sin); - *out_ptr1 = ixheaacd_shr32(*out_ptr1, neg_expo); + *out_ptr1 = ixheaac_shr32(*out_ptr1, neg_expo); out_ptr1--; *out_ptr = - ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr, sin), tempi, cos); - *out_ptr = ixheaacd_shr32(*out_ptr, neg_expo); + ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, sin), tempi, cos); + *out_ptr = ixheaac_shr32(*out_ptr, neg_expo); out_ptr++; - *out_ptr = ixheaacd_sub32(ixheaacd_mult32x16in32(tempi, sin), - ixheaacd_mult32x16in32(tempr, cos)); - *out_ptr = ixheaacd_shr32(*out_ptr, neg_expo); + *out_ptr = ixheaac_sub32(ixheaac_mult32x16in32(tempi, sin), + ixheaac_mult32x16in32(tempr, cos)); + *out_ptr = ixheaac_shr32(*out_ptr, neg_expo); out_ptr++; } cos1 = *cos_sin_ptr++; @@ -316,14 +316,14 @@ VOID ixheaacd_pretwiddle_compute_dec( tempr1 = *spec_data2; tempi1 = *spec_data1; - *out_ptr1 = ixheaacd_sub32(ixheaacd_mult32x16in32(tempi1, cos1), - ixheaacd_mult32x16in32(tempr1, sin1)); - *out_ptr1 = ixheaacd_shr32(*out_ptr1, neg_expo); + *out_ptr1 = ixheaac_sub32(ixheaac_mult32x16in32(tempi1, cos1), + ixheaac_mult32x16in32(tempr1, sin1)); + *out_ptr1 = ixheaac_shr32(*out_ptr1, neg_expo); out_ptr1--; - *out_ptr1 = ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr1, cos1), + *out_ptr1 = ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr1, cos1), tempi1, sin1); - *out_ptr1 = ixheaacd_shr32(*out_ptr1, neg_expo); + *out_ptr1 = ixheaac_shr32(*out_ptr1, neg_expo); out_ptr1--; } } @@ -348,13 +348,13 @@ VOID ixheaacd_post_twiddle_dec(WORD32 out_ptr[], WORD32 spec_data[], sin = *cos_sin_ptr; cos_sin_ptr++; - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, sin), - ixheaacd_mult32x16in32(tempi, cos)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin), + ixheaac_mult32x16in32(tempi, cos)); outr = - ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr, cos), tempi, sin); + ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos), tempi, sin); - temp1 = ixheaacd_mult32x16in32(outi, adjust1); - temp2 = ixheaacd_mult32x16in32(outr, adjust); + temp1 = ixheaac_mult32x16in32(outi, adjust1); + temp2 = ixheaac_mult32x16in32(outr, adjust); outr = outr + temp1; outi = outi + temp2; @@ -368,13 +368,13 @@ VOID ixheaacd_post_twiddle_dec(WORD32 out_ptr[], WORD32 spec_data[], tempi = *spec_data1--; tempr = *spec_data1--; - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, sin), - ixheaacd_mult32x16in32(tempi, cos)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin), + ixheaac_mult32x16in32(tempi, cos)); outr = - ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr, cos), tempi, sin); + ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos), tempi, sin); - temp1 = ixheaacd_mult32x16in32(outi, adjust1); - temp2 = ixheaacd_mult32x16in32(outr, adjust); + temp1 = ixheaac_mult32x16in32(outi, adjust1); + temp2 = ixheaac_mult32x16in32(outr, adjust); outr = outr + temp1; outi = outi + temp2; @@ -386,13 +386,13 @@ VOID ixheaacd_post_twiddle_dec(WORD32 out_ptr[], WORD32 spec_data[], tempr = *spec_data++; tempi = *spec_data++; - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, cos), - ixheaacd_mult32x16in32(tempi, sin)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, cos), + ixheaac_mult32x16in32(tempi, sin)); outr = - ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr, sin), tempi, cos); + ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, sin), tempi, cos); - temp1 = ixheaacd_mult32x16in32(outi, adjust1); - temp2 = ixheaacd_mult32x16in32(outr, adjust); + temp1 = ixheaac_mult32x16in32(outi, adjust1); + temp2 = ixheaac_mult32x16in32(outr, adjust); outr = outr + temp1; outi = outi + temp2; @@ -406,13 +406,13 @@ VOID ixheaacd_post_twiddle_dec(WORD32 out_ptr[], WORD32 spec_data[], tempi = *spec_data1--; tempr = *spec_data1--; - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, sin1), - ixheaacd_mult32x16in32(tempi, cos1)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin1), + ixheaac_mult32x16in32(tempi, cos1)); outr = - ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr, cos1), tempi, sin1); + ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos1), tempi, sin1); - temp1 = ixheaacd_mult32x16in32(outi, adjust1); - temp2 = ixheaacd_mult32x16in32(outr, adjust); + temp1 = ixheaac_mult32x16in32(outi, adjust1); + temp2 = ixheaac_mult32x16in32(outr, adjust); outr = outr + temp1; outi = outi + temp2; @@ -428,13 +428,13 @@ VOID ixheaacd_post_twiddle_dec(WORD32 out_ptr[], WORD32 spec_data[], sin = *cos_sin_ptr; cos_sin_ptr += 15; - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, sin), - ixheaacd_mult32x16in32(tempi, cos)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin), + ixheaac_mult32x16in32(tempi, cos)); outr = - ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr, cos), tempi, sin); + ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos), tempi, sin); - temp1 = ixheaacd_mult32x16in32(outi, -(201 << 1)); - temp2 = ixheaacd_mult32x16in32(outr, 201 << 1); + temp1 = ixheaac_mult32x16in32(outi, -(201 << 1)); + temp2 = ixheaac_mult32x16in32(outr, 201 << 1); outr = outr + temp1; outi = outi + temp2; @@ -449,13 +449,13 @@ VOID ixheaacd_post_twiddle_dec(WORD32 out_ptr[], WORD32 spec_data[], tempi = *spec_data1--; tempr = *spec_data1--; - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, sin), - ixheaacd_mult32x16in32(tempi, cos)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin), + ixheaac_mult32x16in32(tempi, cos)); outr = - ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr, cos), tempi, sin); + ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos), tempi, sin); - temp1 = ixheaacd_mult32x16in32(outi, -(201 << 1)); - temp2 = ixheaacd_mult32x16in32(outr, 201 << 1); + temp1 = ixheaac_mult32x16in32(outi, -(201 << 1)); + temp2 = ixheaac_mult32x16in32(outr, 201 << 1); outr = outr + temp1; outi = outi + temp2; @@ -467,13 +467,13 @@ VOID ixheaacd_post_twiddle_dec(WORD32 out_ptr[], WORD32 spec_data[], tempr = *spec_data++; tempi = *spec_data++; - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, cos), - ixheaacd_mult32x16in32(tempi, sin)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, cos), + ixheaac_mult32x16in32(tempi, sin)); outr = - ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr, sin), tempi, cos); + ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, sin), tempi, cos); - temp1 = ixheaacd_mult32x16in32(outi, -(201 << 1)); - temp2 = ixheaacd_mult32x16in32(outr, 201 << 1); + temp1 = ixheaac_mult32x16in32(outi, -(201 << 1)); + temp2 = ixheaac_mult32x16in32(outr, 201 << 1); outr = outr + temp1; outi = outi + temp2; @@ -487,13 +487,13 @@ VOID ixheaacd_post_twiddle_dec(WORD32 out_ptr[], WORD32 spec_data[], tempi = *spec_data1--; tempr = *spec_data1--; - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, sin1), - ixheaacd_mult32x16in32(tempi, cos1)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin1), + ixheaac_mult32x16in32(tempi, cos1)); outr = - ixheaacd_mac32x16in32(ixheaacd_mult32x16in32(tempr, cos1), tempi, sin1); + ixheaac_mac32x16in32(ixheaac_mult32x16in32(tempr, cos1), tempi, sin1); - temp1 = ixheaacd_mult32x16in32(outi, -(201 << 1)); - temp2 = ixheaacd_mult32x16in32(outr, 201 << 1); + temp1 = ixheaac_mult32x16in32(outi, -(201 << 1)); + temp2 = ixheaac_mult32x16in32(outr, 201 << 1); outr = outr + temp1; outi = outi + temp2; @@ -528,32 +528,32 @@ VOID ixheaacd_post_twid_overlap_add_dec( adjust1 = -50; cos = *cos_sin_ptr++; sin = *cos_sin_ptr++; - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, sin), - ixheaacd_mult32x16in32(tempi, cos)); - outr = ixheaacd_add32(ixheaacd_mult32x16in32(tempr, cos), - ixheaacd_mult32x16in32(tempi, sin)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin), + ixheaac_mult32x16in32(tempi, cos)); + outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, cos), + ixheaac_mult32x16in32(tempi, sin)); overlap_data = *ptr_overlap_buf; - temp1 = ixheaacd_mult32x16in32(outi, adjust1); - temp2 = ixheaacd_mult32x16in32(outr, adjust); + temp1 = ixheaac_mult32x16in32(outi, adjust1); + temp2 = ixheaac_mult32x16in32(outr, adjust); outr = outr + temp1; outi = outi + temp2; - *ptr_overlap_buf++ = ixheaacd_shr32_sat(outr, 16 - q_shift); + *ptr_overlap_buf++ = ixheaac_shr32_sat(outr, 16 - q_shift); win1 = *((WORD32 *)window + size - 1); - accu = ixheaacd_sub32_sat( - ixheaacd_shl32_sat(ixheaacd_mult32x16lin32(outi, win1), q_shift), + accu = ixheaac_sub32_sat( + ixheaac_shl32_sat(ixheaacd_mult32x16lin32(outi, win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16))); *pcm_out = accu; pcm_out -= ch_fac; - accu = ixheaacd_sub32_sat( - ixheaacd_shl32_sat( - ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outi), win1), + accu = ixheaac_sub32_sat( + ixheaac_shl32_sat( + ixheaac_mult32x16hin32(ixheaac_negate32_sat(outi), win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1))); @@ -568,31 +568,31 @@ VOID ixheaacd_post_twid_overlap_add_dec( tempr = *(spec_data + i); tempi = *(spec_data + i + 1); - outr = ixheaacd_add32(ixheaacd_mult32x16in32(tempr, cos), - ixheaacd_mult32x16in32(tempi, sin)); - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, sin), - ixheaacd_mult32x16in32(tempi, cos)); + outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, cos), + ixheaac_mult32x16in32(tempi, sin)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin), + ixheaac_mult32x16in32(tempi, cos)); - temp1 = ixheaacd_mult32x16in32(outi, adjust1); - temp2 = ixheaacd_mult32x16in32(outr, adjust); + temp1 = ixheaac_mult32x16in32(outi, adjust1); + temp2 = ixheaac_mult32x16in32(outr, adjust); outr = outr + temp1; outi = outi + temp2; overlap_data = *ptr_overlap_buf; - *ptr_overlap_buf++ = ixheaacd_shr32_sat(outi, 16 - q_shift); + *ptr_overlap_buf++ = ixheaac_shr32_sat(outi, 16 - q_shift); win1 = *((WORD32 *)window + i); - accu = ixheaacd_sub32_sat( - ixheaacd_shl32_sat(ixheaacd_mult32x16lin32(outr, win1), q_shift), + accu = ixheaac_sub32_sat( + ixheaac_shl32_sat(ixheaacd_mult32x16lin32(outr, win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16))); *pcm_out = accu; pcm_out -= ch_fac; - accu = ixheaacd_sub32_sat( - ixheaacd_shl32_sat( - ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outr), win1), + accu = ixheaac_sub32_sat( + ixheaac_shl32_sat( + ixheaac_mult32x16hin32(ixheaac_negate32_sat(outr), win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)win1)); @@ -604,32 +604,32 @@ VOID ixheaacd_post_twid_overlap_add_dec( i -= 2; - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, cos), - ixheaacd_mult32x16in32(tempi, sin)); - outr = ixheaacd_add32(ixheaacd_mult32x16in32(tempr, sin), - ixheaacd_mult32x16in32(tempi, cos)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, cos), + ixheaac_mult32x16in32(tempi, sin)); + outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, sin), + ixheaac_mult32x16in32(tempi, cos)); overlap_data = *ptr_overlap_buf; - temp1 = ixheaacd_mult32x16in32(outi, adjust1); + temp1 = ixheaac_mult32x16in32(outi, adjust1); - temp2 = ixheaacd_mult32x16in32(outr, adjust); + temp2 = ixheaac_mult32x16in32(outr, adjust); outr = outr + temp1; outi = outi + temp2; - *ptr_overlap_buf++ = ixheaacd_shr32_sat(outr, 16 - q_shift); + *ptr_overlap_buf++ = ixheaac_shr32_sat(outr, 16 - q_shift); win1 = *((WORD32 *)window + i + 1); - accu = ixheaacd_sub32_sat( - ixheaacd_shl32_sat(ixheaacd_mult32x16lin32(outi, win1), q_shift), + accu = ixheaac_sub32_sat( + ixheaac_shl32_sat(ixheaacd_mult32x16lin32(outi, win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16))); *pcm_out = accu; pcm_out -= ch_fac; - accu = ixheaacd_sub32_sat( - ixheaacd_shl32_sat( - ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outi), win1), + accu = ixheaac_sub32_sat( + ixheaac_shl32_sat( + ixheaac_mult32x16hin32(ixheaac_negate32_sat(outi), win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1))); *pcmout1 = accu; @@ -641,31 +641,31 @@ VOID ixheaacd_post_twid_overlap_add_dec( tempr = *(spec_data + i); tempi = *(spec_data + i + 1); - outr = ixheaacd_add32(ixheaacd_mult32x16in32(tempr, cos1), - ixheaacd_mult32x16in32(tempi, sin1)); - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, sin1), - ixheaacd_mult32x16in32(tempi, cos1)); + outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, cos1), + ixheaac_mult32x16in32(tempi, sin1)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin1), + ixheaac_mult32x16in32(tempi, cos1)); - temp1 = ixheaacd_mult32x16in32(outi, adjust1); + temp1 = ixheaac_mult32x16in32(outi, adjust1); - temp2 = ixheaacd_mult32x16in32(outr, adjust); + temp2 = ixheaac_mult32x16in32(outr, adjust); outr = outr + temp1; outi = outi + temp2; overlap_data = *ptr_overlap_buf; - *ptr_overlap_buf++ = ixheaacd_shr32_sat(outi, 16 - q_shift); + *ptr_overlap_buf++ = ixheaac_shr32_sat(outi, 16 - q_shift); win1 = *((WORD32 *)window + i); - accu = ixheaacd_sub32_sat( - ixheaacd_shl32_sat(ixheaacd_mult32x16lin32(outr, win1), q_shift), + accu = ixheaac_sub32_sat( + ixheaac_shl32_sat(ixheaacd_mult32x16lin32(outr, win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16))); *pcm_out = accu; pcm_out -= ch_fac; - accu = ixheaacd_sub32_sat( - ixheaacd_shl32_sat( - ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outr), win1), + accu = ixheaac_sub32_sat( + ixheaac_shl32_sat( + ixheaac_mult32x16hin32(ixheaac_negate32_sat(outr), win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)win1)); @@ -685,32 +685,32 @@ VOID ixheaacd_post_twid_overlap_add_dec( cos = *cos_sin_ptr++; sin = *cos_sin_ptr++; - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, sin), - ixheaacd_mult32x16in32(tempi, cos)); - outr = ixheaacd_add32(ixheaacd_mult32x16in32(tempr, cos), - ixheaacd_mult32x16in32(tempi, sin)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin), + ixheaac_mult32x16in32(tempi, cos)); + outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, cos), + ixheaac_mult32x16in32(tempi, sin)); overlap_data = *ptr_overlap_buf; - temp1 = ixheaacd_mult32x16in32(outi, adjust1); - temp2 = ixheaacd_mult32x16in32(outr, adjust); + temp1 = ixheaac_mult32x16in32(outi, adjust1); + temp2 = ixheaac_mult32x16in32(outr, adjust); outr = outr + temp1; outi = outi + temp2; - *ptr_overlap_buf++ = ixheaacd_shr32_sat(outr, 16 + q_shift); + *ptr_overlap_buf++ = ixheaac_shr32_sat(outr, 16 + q_shift); win1 = *((WORD32 *)window + size - 1); - accu = ixheaacd_sub32_sat( - ixheaacd_shr32(ixheaacd_mult32x16lin32(outi, win1), q_shift), + accu = ixheaac_sub32_sat( + ixheaac_shr32(ixheaacd_mult32x16lin32(outi, win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16))); *pcm_out = accu; pcm_out -= ch_fac; - accu = ixheaacd_sub32_sat( - ixheaacd_shr32( - ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outi), win1), + accu = ixheaac_sub32_sat( + ixheaac_shr32( + ixheaac_mult32x16hin32(ixheaac_negate32_sat(outi), win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1))); @@ -724,31 +724,31 @@ VOID ixheaacd_post_twid_overlap_add_dec( tempr = *(spec_data + i); tempi = *(spec_data + i + 1); - outr = ixheaacd_add32(ixheaacd_mult32x16in32(tempr, cos), - ixheaacd_mult32x16in32(tempi, sin)); - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, sin), - ixheaacd_mult32x16in32(tempi, cos)); + outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, cos), + ixheaac_mult32x16in32(tempi, sin)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin), + ixheaac_mult32x16in32(tempi, cos)); overlap_data = *ptr_overlap_buf; - temp1 = ixheaacd_mult32x16in32(outi, adjust1); + temp1 = ixheaac_mult32x16in32(outi, adjust1); - temp2 = ixheaacd_mult32x16in32(outr, adjust); + temp2 = ixheaac_mult32x16in32(outr, adjust); outr = outr + temp1; outi = outi + temp2; - *ptr_overlap_buf++ = ixheaacd_shr32_sat(outi, 16 + q_shift); + *ptr_overlap_buf++ = ixheaac_shr32_sat(outi, 16 + q_shift); win1 = *((WORD32 *)window + i); - accu = ixheaacd_sub32_sat( - ixheaacd_shr32(ixheaacd_mult32x16lin32(outr, win1), q_shift), + accu = ixheaac_sub32_sat( + ixheaac_shr32(ixheaacd_mult32x16lin32(outr, win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16))); *pcm_out = accu; pcm_out -= ch_fac; - accu = ixheaacd_sub32_sat( - ixheaacd_shr32( - ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outr), win1), + accu = ixheaac_sub32_sat( + ixheaac_shr32( + ixheaac_mult32x16hin32(ixheaac_negate32_sat(outr), win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)win1)); @@ -759,32 +759,32 @@ VOID ixheaacd_post_twid_overlap_add_dec( tempi = *(spec_data - i + 1); i -= 2; - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, cos), - ixheaacd_mult32x16in32(tempi, sin)); - outr = ixheaacd_add32(ixheaacd_mult32x16in32(tempr, sin), - ixheaacd_mult32x16in32(tempi, cos)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, cos), + ixheaac_mult32x16in32(tempi, sin)); + outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, sin), + ixheaac_mult32x16in32(tempi, cos)); overlap_data = *ptr_overlap_buf; - temp1 = ixheaacd_mult32x16in32(outi, adjust1); - temp2 = ixheaacd_mult32x16in32(outr, adjust); + temp1 = ixheaac_mult32x16in32(outi, adjust1); + temp2 = ixheaac_mult32x16in32(outr, adjust); outr = outr + temp1; outi = outi + temp2; - *ptr_overlap_buf++ = ixheaacd_shr32_sat(outr, 16 + q_shift); + *ptr_overlap_buf++ = ixheaac_shr32_sat(outr, 16 + q_shift); win1 = *((WORD32 *)window + i + 1); - accu = ixheaacd_sub32_sat( - ixheaacd_shr32(ixheaacd_mult32x16lin32(outi, win1), q_shift), + accu = ixheaac_sub32_sat( + ixheaac_shr32(ixheaacd_mult32x16lin32(outi, win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16))); *pcm_out = accu; pcm_out -= ch_fac; - accu = ixheaacd_sub32_sat( - ixheaacd_shr32( - ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outi), win1), + accu = ixheaac_sub32_sat( + ixheaac_shr32( + ixheaac_mult32x16hin32(ixheaac_negate32_sat(outi), win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1))); @@ -797,32 +797,32 @@ VOID ixheaacd_post_twid_overlap_add_dec( tempr = *(spec_data + i); tempi = *(spec_data + i + 1); - outr = ixheaacd_add32(ixheaacd_mult32x16in32(tempr, cos1), - ixheaacd_mult32x16in32(tempi, sin1)); - outi = ixheaacd_sub32(ixheaacd_mult32x16in32(tempr, sin1), - ixheaacd_mult32x16in32(tempi, cos1)); + outr = ixheaac_add32(ixheaac_mult32x16in32(tempr, cos1), + ixheaac_mult32x16in32(tempi, sin1)); + outi = ixheaac_sub32(ixheaac_mult32x16in32(tempr, sin1), + ixheaac_mult32x16in32(tempi, cos1)); overlap_data = *ptr_overlap_buf; - temp1 = ixheaacd_mult32x16in32(outi, adjust1); + temp1 = ixheaac_mult32x16in32(outi, adjust1); - temp2 = ixheaacd_mult32x16in32(outr, adjust); + temp2 = ixheaac_mult32x16in32(outr, adjust); outr = outr + temp1; outi = outi + temp2; - *ptr_overlap_buf++ = ixheaacd_shr32_sat(outi, 16 + q_shift); + *ptr_overlap_buf++ = ixheaac_shr32_sat(outi, 16 + q_shift); win1 = *((WORD32 *)window + i); - accu = ixheaacd_sub32_sat( - ixheaacd_shr32(ixheaacd_mult32x16lin32(outr, win1), q_shift), + accu = ixheaac_sub32_sat( + ixheaac_shr32(ixheaacd_mult32x16lin32(outr, win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)(win1 >> 16))); *pcm_out = accu; pcm_out -= ch_fac; - accu = ixheaacd_sub32_sat( - ixheaacd_shr32( - ixheaacd_mult32x16hin32(ixheaacd_negate32_sat(outr), win1), + accu = ixheaac_sub32_sat( + ixheaac_shr32( + ixheaac_mult32x16hin32(ixheaac_negate32_sat(outr), win1), q_shift), ixheaacd_mult32x16lin32_sat(overlap_data, (WORD16)win1)); *pcmout1 = accu; @@ -842,7 +842,7 @@ VOID ixheaacd_imdct_using_fft_dec( WORD32 del, nodespacing, in_loop_cnt, tmp, twiddle_val, *ptr_tmp; const WORD32 *ptr_twiddle; WORD8 *ptr_dig_rev_table; - n_stages = ixheaacd_norm32(npoints); + n_stages = ixheaac_norm32(npoints); n_stages = (30 - n_stages) / 3; @@ -1177,9 +1177,9 @@ VOID ixheaacd_imdct_using_fft_dec( twiddle_val = *(twiddles); tmp = (ixheaacd_mult32x16lin32(x2r, twiddle_val) - - ixheaacd_mult32x16hin32(x2i, twiddle_val)); + ixheaac_mult32x16hin32(x2i, twiddle_val)); x2i = (ixheaacd_mac32x16lin32( - ixheaacd_mult32x16hin32(x2r, twiddle_val), x2i, + ixheaac_mult32x16hin32(x2r, twiddle_val), x2i, twiddle_val)) << 1; x2r = tmp << 1; @@ -1188,9 +1188,9 @@ VOID ixheaacd_imdct_using_fft_dec( twiddle_val = *(twiddles); tmp = (ixheaacd_mult32x16lin32(x4r, twiddle_val) - - ixheaacd_mult32x16hin32(x4i, twiddle_val)); + ixheaac_mult32x16hin32(x4i, twiddle_val)); x4i = (ixheaacd_mac32x16lin32( - ixheaacd_mult32x16hin32(x4r, twiddle_val), x4i, + ixheaac_mult32x16hin32(x4r, twiddle_val), x4i, twiddle_val)) << 1; x4r = tmp << 1; @@ -1199,9 +1199,9 @@ VOID ixheaacd_imdct_using_fft_dec( twiddle_val = *(twiddles); tmp = (ixheaacd_mult32x16lin32(x6r, twiddle_val) - - ixheaacd_mult32x16hin32(x6i, twiddle_val)); + ixheaac_mult32x16hin32(x6i, twiddle_val)); x6i = (ixheaacd_mac32x16lin32( - ixheaacd_mult32x16hin32(x6r, twiddle_val), x6i, + ixheaac_mult32x16hin32(x6r, twiddle_val), x6i, twiddle_val)) << 1; x6r = tmp << 1; @@ -1239,9 +1239,9 @@ VOID ixheaacd_imdct_using_fft_dec( twiddle_val = *(twiddles); tmp = (ixheaacd_mult32x16lin32(x1r, twiddle_val) - - ixheaacd_mult32x16hin32(x1i, twiddle_val)); + ixheaac_mult32x16hin32(x1i, twiddle_val)); x1i = (ixheaacd_mac32x16lin32( - ixheaacd_mult32x16hin32(x1r, twiddle_val), x1i, + ixheaac_mult32x16hin32(x1r, twiddle_val), x1i, twiddle_val)) << 1; x1r = tmp << 1; @@ -1254,9 +1254,9 @@ VOID ixheaacd_imdct_using_fft_dec( twiddle_val = *(twiddles); tmp = (ixheaacd_mult32x16lin32(x3r, twiddle_val) - - ixheaacd_mult32x16hin32(x3i, twiddle_val)); + ixheaac_mult32x16hin32(x3i, twiddle_val)); x3i = (ixheaacd_mac32x16lin32( - ixheaacd_mult32x16hin32(x3r, twiddle_val), x3i, twiddle_val)); + ixheaac_mult32x16hin32(x3r, twiddle_val), x3i, twiddle_val)); x3r = tmp; x5r = *data; @@ -1267,9 +1267,9 @@ VOID ixheaacd_imdct_using_fft_dec( twiddle_val = *(twiddles); tmp = (ixheaacd_mult32x16lin32(x5r, twiddle_val) - - ixheaacd_mult32x16hin32(x5i, twiddle_val)); + ixheaac_mult32x16hin32(x5i, twiddle_val)); x5i = (ixheaacd_mac32x16lin32( - ixheaacd_mult32x16hin32(x5r, twiddle_val), x5i, twiddle_val)); + ixheaac_mult32x16hin32(x5r, twiddle_val), x5i, twiddle_val)); x5r = tmp; x7r = *data; @@ -1281,9 +1281,9 @@ VOID ixheaacd_imdct_using_fft_dec( twiddles -= 7 * (j >> 3); tmp = (ixheaacd_mult32x16lin32(x7r, twiddle_val) - - ixheaacd_mult32x16hin32(x7i, twiddle_val)); + ixheaac_mult32x16hin32(x7i, twiddle_val)); x7i = (ixheaacd_mac32x16lin32( - ixheaacd_mult32x16hin32(x7r, twiddle_val), x7i, twiddle_val)); + ixheaac_mult32x16hin32(x7r, twiddle_val), x7i, twiddle_val)); x7r = tmp; x1r = x1r + (x5r << 1); @@ -1413,9 +1413,9 @@ VOID ixheaacd_imdct_using_fft_dec( twiddle_val = *(twiddles); tmp = (ixheaacd_mult32x16lin32(x2r, twiddle_val) - - ixheaacd_mult32x16hin32(x2i, twiddle_val)); + ixheaac_mult32x16hin32(x2i, twiddle_val)); x2i = (ixheaacd_mac32x16lin32( - ixheaacd_mult32x16hin32(x2r, twiddle_val), x2i, + ixheaac_mult32x16hin32(x2r, twiddle_val), x2i, twiddle_val)) << 1; x2r = tmp << 1; @@ -1424,9 +1424,9 @@ VOID ixheaacd_imdct_using_fft_dec( twiddle_val = *(twiddles); tmp = (ixheaacd_mult32x16lin32(x4r, twiddle_val) - - ixheaacd_mult32x16hin32(x4i, twiddle_val)); + ixheaac_mult32x16hin32(x4i, twiddle_val)); x4i = (ixheaacd_mac32x16lin32( - ixheaacd_mult32x16hin32(x4r, twiddle_val), x4i, + ixheaac_mult32x16hin32(x4r, twiddle_val), x4i, twiddle_val)) << 1; x4r = tmp << 1; @@ -1435,9 +1435,9 @@ VOID ixheaacd_imdct_using_fft_dec( twiddle_val = *(twiddles); tmp = (ixheaacd_mult32x16lin32(x6r, twiddle_val) - - ixheaacd_mult32x16hin32(x6i, twiddle_val)); + ixheaac_mult32x16hin32(x6i, twiddle_val)); x6i = (ixheaacd_mac32x16lin32( - ixheaacd_mult32x16hin32(x6r, twiddle_val), x6i, + ixheaac_mult32x16hin32(x6r, twiddle_val), x6i, twiddle_val)) << 1; x6r = tmp << 1; @@ -1475,9 +1475,9 @@ VOID ixheaacd_imdct_using_fft_dec( twiddle_val = *(twiddles); tmp = (ixheaacd_mult32x16lin32(x1r, twiddle_val) - - ixheaacd_mult32x16hin32(x1i, twiddle_val)); + ixheaac_mult32x16hin32(x1i, twiddle_val)); x1i = (ixheaacd_mac32x16lin32( - ixheaacd_mult32x16hin32(x1r, twiddle_val), x1i, + ixheaac_mult32x16hin32(x1r, twiddle_val), x1i, twiddle_val)) << 1; x1r = tmp << 1; @@ -1490,9 +1490,9 @@ VOID ixheaacd_imdct_using_fft_dec( twiddle_val = *(twiddles); tmp = (ixheaacd_mult32x16lin32(x3r, twiddle_val) - - ixheaacd_mult32x16hin32(x3i, twiddle_val)); + ixheaac_mult32x16hin32(x3i, twiddle_val)); x3i = (ixheaacd_mac32x16lin32( - ixheaacd_mult32x16hin32(x3r, twiddle_val), x3i, twiddle_val)); + ixheaac_mult32x16hin32(x3r, twiddle_val), x3i, twiddle_val)); x3r = tmp; x5r = *data; @@ -1503,9 +1503,9 @@ VOID ixheaacd_imdct_using_fft_dec( twiddle_val = *(twiddles); tmp = (ixheaacd_mult32x16lin32(x5r, twiddle_val) - - ixheaacd_mult32x16hin32(x5i, twiddle_val)); + ixheaac_mult32x16hin32(x5i, twiddle_val)); x5i = (ixheaacd_mac32x16lin32( - ixheaacd_mult32x16hin32(x5r, twiddle_val), x5i, twiddle_val)); + ixheaac_mult32x16hin32(x5r, twiddle_val), x5i, twiddle_val)); x5r = tmp; x7r = *data; @@ -1517,9 +1517,9 @@ VOID ixheaacd_imdct_using_fft_dec( twiddles -= 7 * (j >> 3); tmp = (ixheaacd_mult32x16lin32(x7r, twiddle_val) - - ixheaacd_mult32x16hin32(x7i, twiddle_val)); + ixheaac_mult32x16hin32(x7i, twiddle_val)); x7i = (ixheaacd_mac32x16lin32( - ixheaacd_mult32x16hin32(x7r, twiddle_val), x7i, twiddle_val)); + ixheaac_mult32x16hin32(x7r, twiddle_val), x7i, twiddle_val)); x7r = tmp; x1r = x1r + (x5r << 1); @@ -1650,7 +1650,7 @@ VOID ixheaacd_inverse_transform_960( const_mltfac = 17476; for (i = 0; i < 120; i++) { - spec_data[i] = ixheaacd_mult32x16in32_shl(spec_data[i], const_mltfac); + spec_data[i] = ixheaac_mult32x16in32_shl(spec_data[i], const_mltfac); } } @@ -1695,9 +1695,9 @@ VOID ixheaacd_mdct_960(WORD32 *inp, WORD32 *scratch, WORD32 *mdct_scale, WORD32 *data = inp; for (k = MDCT_LEN_960 - 1; k >= 0; k -= 2) { - *data = ixheaacd_mult32x16in32_shl(*data, const_mltfac); + *data = ixheaac_mult32x16in32_shl(*data, const_mltfac); data++; - *data = ixheaacd_mult32x16in32_shl(*data, const_mltfac); + *data = ixheaac_mult32x16in32_shl(*data, const_mltfac); data++; } } @@ -1737,18 +1737,18 @@ VOID ixheaacd_mdct_480_ld(WORD32 *inp, WORD32 *scratch, WORD32 *mdct_scale, if (object_type != AOT_ER_AAC_ELD) { for (k = MDCT_LEN - 1; k >= 0; k -= 2) { - *data = ixheaacd_mult32_shl(*data, const_mltfac); + *data = ixheaac_mult32_shl(*data, const_mltfac); data++; - *data = ixheaacd_mult32_shl(*data, const_mltfac); + *data = ixheaac_mult32_shl(*data, const_mltfac); data++; } neg_expo += 1; } else { data = inp + 480; for (k = (MDCT_LEN << 1) - 1; k >= 0; k -= 2) { - *data = ixheaacd_mult32_shl(*data, const_mltfac); + *data = ixheaac_mult32_shl(*data, const_mltfac); data++; - *data = ixheaacd_mult32_shl(*data, const_mltfac); + *data = ixheaac_mult32_shl(*data, const_mltfac); data++; } neg_expo += 1; @@ -1864,14 +1864,14 @@ VOID ixheaacd_fft_32_points(WORD16 *ptr_w, WORD32 npoints, x_l2_0 = x[l2]; x_l2_1 = x[l2 + 1]; x_h2_0 = x[h2]; x_h2_1 = x[h2 + 1]; - xh0_0 = ixheaacd_add32_sat(x_0, x_l1_0); - xh1_0 = ixheaacd_add32_sat(x_1, x_l1_1); - xl0_0 = ixheaacd_sub32_sat(x_0, x_l1_0); - xl1_0 = ixheaacd_sub32_sat(x_1, x_l1_1); - xh20_0 = ixheaacd_add32_sat(x_h2_0, x_l2_0); - xh21_0 = ixheaacd_add32_sat(x_h2_1, x_l2_1); - xl20_0 = ixheaacd_sub32_sat(x_h2_0, x_l2_0); - xl21_0 = ixheaacd_sub32_sat(x_h2_1, x_l2_1); + xh0_0 = ixheaac_add32_sat(x_0, x_l1_0); + xh1_0 = ixheaac_add32_sat(x_1, x_l1_1); + xl0_0 = ixheaac_sub32_sat(x_0, x_l1_0); + xl1_0 = ixheaac_sub32_sat(x_1, x_l1_1); + xh20_0 = ixheaac_add32_sat(x_h2_0, x_l2_0); + xh21_0 = ixheaac_add32_sat(x_h2_1, x_l2_1); + xl20_0 = ixheaac_sub32_sat(x_h2_0, x_l2_0); + xl21_0 = ixheaac_sub32_sat(x_h2_1, x_l2_1); x0 = x; x2 = x0; @@ -1882,27 +1882,27 @@ VOID ixheaacd_fft_32_points(WORD16 *ptr_w, WORD32 npoints, if (!predj) x += fft_jmp; if (!predj) j = 0; - x0[0] = ixheaacd_add32_sat(xh0_0, xh20_0); - x0[1] = ixheaacd_add32_sat(xh1_0, xh21_0); - xt0_0 = ixheaacd_sub32_sat(xh0_0, xh20_0); - yt0_0 = ixheaacd_sub32_sat(xh1_0, xh21_0); - xt1_0 = ixheaacd_add32_sat(xl0_0, xl21_0); - yt2_0 = ixheaacd_add32_sat(xl1_0, xl20_0); - xt2_0 = ixheaacd_sub32_sat(xl0_0, xl21_0); - yt1_0 = ixheaacd_sub32_sat(xl1_0, xl20_0); + x0[0] = ixheaac_add32_sat(xh0_0, xh20_0); + x0[1] = ixheaac_add32_sat(xh1_0, xh21_0); + xt0_0 = ixheaac_sub32_sat(xh0_0, xh20_0); + yt0_0 = ixheaac_sub32_sat(xh1_0, xh21_0); + xt1_0 = ixheaac_add32_sat(xl0_0, xl21_0); + yt2_0 = ixheaac_add32_sat(xl1_0, xl20_0); + xt2_0 = ixheaac_sub32_sat(xl0_0, xl21_0); + yt1_0 = ixheaac_sub32_sat(xl1_0, xl20_0); - x2[h2] = ixheaacd_add32_sat(MPYLIRC(si10, yt1_0), MPYLIRC(co10, xt1_0)); + x2[h2] = ixheaac_add32_sat(MPYLIRC(si10, yt1_0), MPYLIRC(co10, xt1_0)); - x2[h2 + 1] = ixheaacd_sub32_sat(MPYLIRC(co10, yt1_0), MPYLIRC(si10, xt1_0)); + x2[h2 + 1] = ixheaac_sub32_sat(MPYLIRC(co10, yt1_0), MPYLIRC(si10, xt1_0)); - x2[l1] = ixheaacd_add32_sat(MPYLIRC(si20, yt0_0), MPYLIRC(co20, xt0_0)); + x2[l1] = ixheaac_add32_sat(MPYLIRC(si20, yt0_0), MPYLIRC(co20, xt0_0)); - x2[l1 + 1] = ixheaacd_sub32_sat(MPYLIRC(co20, yt0_0), MPYLIRC(si20, xt0_0)); + x2[l1 + 1] = ixheaac_sub32_sat(MPYLIRC(co20, yt0_0), MPYLIRC(si20, xt0_0)); yt0_0 = MPYLIRC(si20, yt0_0); - x2[l2] = ixheaacd_add32_sat(MPYLIRC(si30, yt2_0), MPYLIRC(co30, xt2_0)); + x2[l2] = ixheaac_add32_sat(MPYLIRC(si30, yt2_0), MPYLIRC(co30, xt2_0)); - x2[l2 + 1] = ixheaacd_sub32_sat(MPYLIRC(co30, yt2_0), MPYLIRC(si30, xt2_0)); + x2[l2 + 1] = ixheaac_sub32_sat(MPYLIRC(co30, yt2_0), MPYLIRC(si30, xt2_0)); yt2_0 = MPYLIRC(si30, yt2_0); } @@ -1928,27 +1928,27 @@ VOID ixheaacd_fft_32_points(WORD16 *ptr_w, WORD32 npoints, t1 = h2 << 1; t2 = t1 + 1; - y0[t1] = ixheaacd_add32_sat(x0[0], x0[2]); - y2[t1] = ixheaacd_sub32_sat(x0[0], x0[2]); - y0[t2] = ixheaacd_add32_sat(x0[1], x0[3]); - y2[t2] = ixheaacd_sub32_sat(x0[1], x0[3]); - y1[t1] = ixheaacd_add32_sat(x0[4], x0[6]); - y3[t1] = ixheaacd_sub32_sat(x0[4], x0[6]); - y1[t2] = ixheaacd_add32_sat(x0[5], x0[7]); - y3[t2] = ixheaacd_sub32_sat(x0[5], x0[7]); + y0[t1] = ixheaac_add32_sat(x0[0], x0[2]); + y2[t1] = ixheaac_sub32_sat(x0[0], x0[2]); + y0[t2] = ixheaac_add32_sat(x0[1], x0[3]); + y2[t2] = ixheaac_sub32_sat(x0[1], x0[3]); + y1[t1] = ixheaac_add32_sat(x0[4], x0[6]); + y3[t1] = ixheaac_sub32_sat(x0[4], x0[6]); + y1[t2] = ixheaac_add32_sat(x0[5], x0[7]); + y3[t2] = ixheaac_sub32_sat(x0[5], x0[7]); x0 += 8; t1 += 2; t2 += 2; - y0[t1] = ixheaacd_add32_sat(x2[0], x2[2]); - y2[t1] = ixheaacd_sub32_sat(x2[0], x2[2]); - y0[t2] = ixheaacd_add32_sat(x2[1], x2[3]); - y2[t2] = ixheaacd_sub32_sat(x2[1], x2[3]); - y1[t1] = ixheaacd_add32_sat(x2[4], x2[6]); - y3[t1] = ixheaacd_sub32_sat(x2[4], x2[6]); - y1[t2] = ixheaacd_add32_sat(x2[5], x2[7]); - y3[t2] = ixheaacd_sub32_sat(x2[5], x2[7]); + y0[t1] = ixheaac_add32_sat(x2[0], x2[2]); + y2[t1] = ixheaac_sub32_sat(x2[0], x2[2]); + y0[t2] = ixheaac_add32_sat(x2[1], x2[3]); + y2[t2] = ixheaac_sub32_sat(x2[1], x2[3]); + y1[t1] = ixheaac_add32_sat(x2[4], x2[6]); + y3[t1] = ixheaac_sub32_sat(x2[4], x2[6]); + y1[t2] = ixheaac_add32_sat(x2[5], x2[7]); + y3[t2] = ixheaac_sub32_sat(x2[5], x2[7]); x2 += 8; j += j0; @@ -2015,57 +2015,57 @@ VOID ixheaacd_ld_dec_fft_15_opt(WORD32 *inp, WORD32 *op, WORD32 *fft3out, *buf1++ = inp[768]; *buf1++ = inp[769]; - r1 = ixheaacd_add32_sat(buf1a[2], buf1a[8]); - r4 = ixheaacd_sub32_sat(buf1a[2], buf1a[8]); - r3 = ixheaacd_add32_sat(buf1a[4], buf1a[6]); - r2 = ixheaacd_sub32_sat(buf1a[4], buf1a[6]); + r1 = ixheaac_add32_sat(buf1a[2], buf1a[8]); + r4 = ixheaac_sub32_sat(buf1a[2], buf1a[8]); + r3 = ixheaac_add32_sat(buf1a[4], buf1a[6]); + r2 = ixheaac_sub32_sat(buf1a[4], buf1a[6]); - t = ixheaacd_mult32_shl(ixheaacd_sub32_sat(r1, r3), c_54); + t = ixheaac_mult32_shl(ixheaac_sub32_sat(r1, r3), c_54); - r1 = ixheaacd_add32_sat(r1, r3); + r1 = ixheaac_add32_sat(r1, r3); - temp1 = ixheaacd_add32_sat(buf1a[0], r1); + temp1 = ixheaac_add32_sat(buf1a[0], r1); - r1 = ixheaacd_add32_sat(temp1, (ixheaacd_mult32_shl(r1, c_55) << 1)); + r1 = ixheaac_add32_sat(temp1, (ixheaac_mult32_shl(r1, c_55) << 1)); - r3 = ixheaacd_sub32_sat(r1, t); - r1 = ixheaacd_add32_sat(r1, t); + r3 = ixheaac_sub32_sat(r1, t); + r1 = ixheaac_add32_sat(r1, t); - t = ixheaacd_mult32_shl(ixheaacd_add32_sat(r4, r2), c_51); - r4 = ixheaacd_add32_sat(t, (ixheaacd_mult32_shl(r4, c_52) << 1)); - r2 = ixheaacd_add32_sat(t, ixheaacd_mult32_shl(r2, c_53)); + t = ixheaac_mult32_shl(ixheaac_add32_sat(r4, r2), c_51); + r4 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(r4, c_52) << 1)); + r2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r2, c_53)); - s1 = ixheaacd_add32_sat(buf1a[3], buf1a[9]); - s4 = ixheaacd_sub32_sat(buf1a[3], buf1a[9]); - s3 = ixheaacd_add32_sat(buf1a[5], buf1a[7]); - s2 = ixheaacd_sub32_sat(buf1a[5], buf1a[7]); + s1 = ixheaac_add32_sat(buf1a[3], buf1a[9]); + s4 = ixheaac_sub32_sat(buf1a[3], buf1a[9]); + s3 = ixheaac_add32_sat(buf1a[5], buf1a[7]); + s2 = ixheaac_sub32_sat(buf1a[5], buf1a[7]); - t = ixheaacd_mult32_shl(ixheaacd_sub32_sat(s1, s3), c_54); + t = ixheaac_mult32_shl(ixheaac_sub32_sat(s1, s3), c_54); - s1 = ixheaacd_add32_sat(s1, s3); + s1 = ixheaac_add32_sat(s1, s3); - temp2 = ixheaacd_add32_sat(buf1a[1], s1); + temp2 = ixheaac_add32_sat(buf1a[1], s1); - s1 = ixheaacd_add32_sat(temp2, (ixheaacd_mult32_shl(s1, c_55) << 1)); + s1 = ixheaac_add32_sat(temp2, (ixheaac_mult32_shl(s1, c_55) << 1)); - s3 = ixheaacd_sub32_sat(s1, t); - s1 = ixheaacd_add32_sat(s1, t); + s3 = ixheaac_sub32_sat(s1, t); + s1 = ixheaac_add32_sat(s1, t); - t = ixheaacd_mult32_shl(ixheaacd_add32_sat(s4, s2), c_51); - s4 = ixheaacd_add32_sat(t, (ixheaacd_mult32_shl(s4, c_52) << 1)); - s2 = ixheaacd_add32_sat(t, (ixheaacd_mult32_shl(s2, c_53))); + t = ixheaac_mult32_shl(ixheaac_add32_sat(s4, s2), c_51); + s4 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s4, c_52) << 1)); + s2 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s2, c_53))); *buf2++ = temp1; *buf2++ = temp2; - *buf2++ = ixheaacd_add32_sat(r1, s2); - *buf2++ = ixheaacd_sub32_sat(s1, r2); - *buf2++ = ixheaacd_sub32_sat(r3, s4); - *buf2++ = ixheaacd_add32_sat(s3, r4); - *buf2++ = ixheaacd_add32_sat(r3, s4); - *buf2++ = ixheaacd_sub32_sat(s3, r4); - *buf2++ = ixheaacd_sub32_sat(r1, s2); - *buf2++ = ixheaacd_add32_sat(s1, r2); + *buf2++ = ixheaac_add32_sat(r1, s2); + *buf2++ = ixheaac_sub32_sat(s1, r2); + *buf2++ = ixheaac_sub32_sat(r3, s4); + *buf2++ = ixheaac_add32_sat(s3, r4); + *buf2++ = ixheaac_add32_sat(r3, s4); + *buf2++ = ixheaac_sub32_sat(s3, r4); + *buf2++ = ixheaac_sub32_sat(r1, s2); + *buf2++ = ixheaac_add32_sat(s1, r2); buf1a = buf1; *buf1++ = inp[320]; @@ -2083,56 +2083,56 @@ VOID ixheaacd_ld_dec_fft_15_opt(WORD32 *inp, WORD32 *op, WORD32 *fft3out, *buf1++ = inp[128]; *buf1++ = inp[129]; - r1 = ixheaacd_add32_sat(buf1a[2], buf1a[8]); - r4 = ixheaacd_sub32_sat(buf1a[2], buf1a[8]); - r3 = ixheaacd_add32_sat(buf1a[4], buf1a[6]); - r2 = ixheaacd_sub32_sat(buf1a[4], buf1a[6]); + r1 = ixheaac_add32_sat(buf1a[2], buf1a[8]); + r4 = ixheaac_sub32_sat(buf1a[2], buf1a[8]); + r3 = ixheaac_add32_sat(buf1a[4], buf1a[6]); + r2 = ixheaac_sub32_sat(buf1a[4], buf1a[6]); - t = ixheaacd_mult32_shl(ixheaacd_sub32_sat(r1, r3), c_54); + t = ixheaac_mult32_shl(ixheaac_sub32_sat(r1, r3), c_54); - r1 = ixheaacd_add32_sat(r1, r3); + r1 = ixheaac_add32_sat(r1, r3); - temp1 = ixheaacd_add32_sat(buf1a[0], r1); + temp1 = ixheaac_add32_sat(buf1a[0], r1); - r1 = ixheaacd_add32_sat(temp1, (ixheaacd_mult32_shl(r1, c_55) << 1)); + r1 = ixheaac_add32_sat(temp1, (ixheaac_mult32_shl(r1, c_55) << 1)); - r3 = ixheaacd_sub32_sat(r1, t); - r1 = ixheaacd_add32_sat(r1, t); + r3 = ixheaac_sub32_sat(r1, t); + r1 = ixheaac_add32_sat(r1, t); - t = ixheaacd_mult32_shl(ixheaacd_add32_sat(r4, r2), c_51); - r4 = ixheaacd_add32_sat(t, (ixheaacd_mult32_shl(r4, c_52) << 1)); - r2 = ixheaacd_add32_sat(t, ixheaacd_mult32_shl(r2, c_53)); + t = ixheaac_mult32_shl(ixheaac_add32_sat(r4, r2), c_51); + r4 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(r4, c_52) << 1)); + r2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r2, c_53)); - s1 = ixheaacd_add32_sat(buf1a[3], buf1a[9]); - s4 = ixheaacd_sub32_sat(buf1a[3], buf1a[9]); - s3 = ixheaacd_add32_sat(buf1a[5], buf1a[7]); - s2 = ixheaacd_sub32_sat(buf1a[5], buf1a[7]); + s1 = ixheaac_add32_sat(buf1a[3], buf1a[9]); + s4 = ixheaac_sub32_sat(buf1a[3], buf1a[9]); + s3 = ixheaac_add32_sat(buf1a[5], buf1a[7]); + s2 = ixheaac_sub32_sat(buf1a[5], buf1a[7]); - t = ixheaacd_mult32_shl(ixheaacd_sub32_sat(s1, s3), c_54); + t = ixheaac_mult32_shl(ixheaac_sub32_sat(s1, s3), c_54); - s1 = ixheaacd_add32_sat(s1, s3); + s1 = ixheaac_add32_sat(s1, s3); - temp2 = ixheaacd_add32_sat(buf1a[1], s1); + temp2 = ixheaac_add32_sat(buf1a[1], s1); - s1 = ixheaacd_add32_sat(temp2, (ixheaacd_mult32_shl(s1, c_55) << 1)); + s1 = ixheaac_add32_sat(temp2, (ixheaac_mult32_shl(s1, c_55) << 1)); - s3 = ixheaacd_sub32_sat(s1, t); - s1 = ixheaacd_add32_sat(s1, t); + s3 = ixheaac_sub32_sat(s1, t); + s1 = ixheaac_add32_sat(s1, t); - t = ixheaacd_mult32_shl(ixheaacd_add32_sat(s4, s2), c_51); - s4 = ixheaacd_add32_sat(t, (ixheaacd_mult32_shl(s4, c_52) << 1)); - s2 = ixheaacd_add32_sat(t, ixheaacd_mult32_shl(s2, c_53)); + t = ixheaac_mult32_shl(ixheaac_add32_sat(s4, s2), c_51); + s4 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s4, c_52) << 1)); + s2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(s2, c_53)); *buf2++ = temp1; *buf2++ = temp2; - *buf2++ = ixheaacd_add32_sat(r1, s2); - *buf2++ = ixheaacd_sub32_sat(s1, r2); - *buf2++ = ixheaacd_sub32_sat(r3, s4); - *buf2++ = ixheaacd_add32_sat(s3, r4); - *buf2++ = ixheaacd_add32_sat(r3, s4); - *buf2++ = ixheaacd_sub32_sat(s3, r4); - *buf2++ = ixheaacd_sub32_sat(r1, s2); - *buf2++ = ixheaacd_add32_sat(s1, r2); + *buf2++ = ixheaac_add32_sat(r1, s2); + *buf2++ = ixheaac_sub32_sat(s1, r2); + *buf2++ = ixheaac_sub32_sat(r3, s4); + *buf2++ = ixheaac_add32_sat(s3, r4); + *buf2++ = ixheaac_add32_sat(r3, s4); + *buf2++ = ixheaac_sub32_sat(s3, r4); + *buf2++ = ixheaac_sub32_sat(r1, s2); + *buf2++ = ixheaac_add32_sat(s1, r2); buf1a = buf1; *buf1++ = inp[640]; @@ -2150,56 +2150,56 @@ VOID ixheaacd_ld_dec_fft_15_opt(WORD32 *inp, WORD32 *op, WORD32 *fft3out, *buf1++ = inp[448]; *buf1++ = inp[449]; - r1 = ixheaacd_add32_sat(buf1a[2], buf1a[8]); - r4 = ixheaacd_sub32_sat(buf1a[2], buf1a[8]); - r3 = ixheaacd_add32_sat(buf1a[4], buf1a[6]); - r2 = ixheaacd_sub32_sat(buf1a[4], buf1a[6]); + r1 = ixheaac_add32_sat(buf1a[2], buf1a[8]); + r4 = ixheaac_sub32_sat(buf1a[2], buf1a[8]); + r3 = ixheaac_add32_sat(buf1a[4], buf1a[6]); + r2 = ixheaac_sub32_sat(buf1a[4], buf1a[6]); - t = ixheaacd_mult32_shl(ixheaacd_sub32_sat(r1, r3), c_54); + t = ixheaac_mult32_shl(ixheaac_sub32_sat(r1, r3), c_54); - r1 = ixheaacd_add32_sat(r1, r3); + r1 = ixheaac_add32_sat(r1, r3); - temp1 = ixheaacd_add32_sat(buf1a[0], r1); + temp1 = ixheaac_add32_sat(buf1a[0], r1); - r1 = ixheaacd_add32_sat(temp1, (ixheaacd_mult32_shl(r1, c_55) << 1)); + r1 = ixheaac_add32_sat(temp1, (ixheaac_mult32_shl(r1, c_55) << 1)); - r3 = ixheaacd_sub32_sat(r1, t); - r1 = ixheaacd_add32_sat(r1, t); + r3 = ixheaac_sub32_sat(r1, t); + r1 = ixheaac_add32_sat(r1, t); - t = ixheaacd_mult32_shl(ixheaacd_add32_sat(r4, r2), c_51); - r4 = ixheaacd_add32_sat(t, ixheaacd_mult32_shl(r4, c_52) << 1); - r2 = ixheaacd_add32_sat(t, ixheaacd_mult32_shl(r2, c_53)); + t = ixheaac_mult32_shl(ixheaac_add32_sat(r4, r2), c_51); + r4 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r4, c_52) << 1); + r2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r2, c_53)); - s1 = ixheaacd_add32_sat(buf1a[3], buf1a[9]); - s4 = ixheaacd_sub32_sat(buf1a[3], buf1a[9]); - s3 = ixheaacd_add32_sat(buf1a[5], buf1a[7]); - s2 = ixheaacd_sub32_sat(buf1a[5], buf1a[7]); + s1 = ixheaac_add32_sat(buf1a[3], buf1a[9]); + s4 = ixheaac_sub32_sat(buf1a[3], buf1a[9]); + s3 = ixheaac_add32_sat(buf1a[5], buf1a[7]); + s2 = ixheaac_sub32_sat(buf1a[5], buf1a[7]); - t = ixheaacd_mult32_shl(ixheaacd_sub32_sat(s1, s3), c_54); + t = ixheaac_mult32_shl(ixheaac_sub32_sat(s1, s3), c_54); - s1 = ixheaacd_add32_sat(s1, s3); + s1 = ixheaac_add32_sat(s1, s3); - temp2 = ixheaacd_add32_sat(buf1a[1], s1); + temp2 = ixheaac_add32_sat(buf1a[1], s1); - s1 = ixheaacd_add32_sat(temp2, (ixheaacd_mult32_shl(s1, c_55) << 1)); + s1 = ixheaac_add32_sat(temp2, (ixheaac_mult32_shl(s1, c_55) << 1)); - s3 = ixheaacd_sub32_sat(s1, t); - s1 = ixheaacd_add32_sat(s1, t); + s3 = ixheaac_sub32_sat(s1, t); + s1 = ixheaac_add32_sat(s1, t); - t = ixheaacd_mult32_shl(ixheaacd_add32_sat(s4, s2), c_51); - s4 = ixheaacd_add32_sat(t, (ixheaacd_mult32_shl(s4, c_52) << 1)); - s2 = ixheaacd_add32_sat(t, ixheaacd_mult32_shl(s2, c_53)); + t = ixheaac_mult32_shl(ixheaac_add32_sat(s4, s2), c_51); + s4 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s4, c_52) << 1)); + s2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(s2, c_53)); *buf2++ = temp1; *buf2++ = temp2; - *buf2++ = ixheaacd_add32_sat(r1, s2); - *buf2++ = ixheaacd_sub32_sat(s1, r2); - *buf2++ = ixheaacd_sub32_sat(r3, s4); - *buf2++ = ixheaacd_add32_sat(s3, r4); - *buf2++ = ixheaacd_add32_sat(r3, s4); - *buf2++ = ixheaacd_sub32_sat(s3, r4); - *buf2++ = ixheaacd_sub32_sat(r1, s2); - *buf2++ = ixheaacd_add32_sat(s1, r2); + *buf2++ = ixheaac_add32_sat(r1, s2); + *buf2++ = ixheaac_sub32_sat(s1, r2); + *buf2++ = ixheaac_sub32_sat(r3, s4); + *buf2++ = ixheaac_add32_sat(s3, r4); + *buf2++ = ixheaac_add32_sat(r3, s4); + *buf2++ = ixheaac_sub32_sat(s3, r4); + *buf2++ = ixheaac_sub32_sat(r1, s2); + *buf2++ = ixheaac_add32_sat(s1, r2); buf1a = buf1; } @@ -2214,37 +2214,37 @@ VOID ixheaacd_ld_dec_fft_15_opt(WORD32 *inp, WORD32 *op, WORD32 *fft3out, xr_2 = fft3outptr[20]; xi_2 = fft3outptr[21]; - x_01_r = ixheaacd_add32_sat(xr_0, xr_1); - x_01_i = ixheaacd_add32_sat(xi_0, xi_1); + x_01_r = ixheaac_add32_sat(xr_0, xr_1); + x_01_i = ixheaac_add32_sat(xi_0, xi_1); - add_r = ixheaacd_add32_sat(xr_1, xr_2); - add_i = ixheaacd_add32_sat(xi_1, xi_2); + add_r = ixheaac_add32_sat(xr_1, xr_2); + add_i = ixheaac_add32_sat(xi_1, xi_2); - sub_r = ixheaacd_sub32_sat(xr_1, xr_2); - sub_i = ixheaacd_sub32_sat(xi_1, xi_2); + sub_r = ixheaac_sub32_sat(xr_1, xr_2); + sub_i = ixheaac_sub32_sat(xi_1, xi_2); p1 = add_r >> 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); p4 = add_i >> 1; - temp = ixheaacd_sub32_sat(xr_0, p1); - temp1 = ixheaacd_add32_sat(xi_0, p3); - temp2 = ixheaacd_sub32_sat(xi_0, p3); + temp = ixheaac_sub32_sat(xr_0, p1); + temp1 = ixheaac_add32_sat(xi_0, p3); + temp2 = ixheaac_sub32_sat(xi_0, p3); idx = ptr_re_arr_tab_sml_240[n++] << 1; - op[idx] = ixheaacd_add32_sat(x_01_r, xr_2); - op[idx + 1] = ixheaacd_add32_sat(x_01_i, xi_2); + op[idx] = ixheaac_add32_sat(x_01_r, xr_2); + op[idx + 1] = ixheaac_add32_sat(x_01_i, xi_2); idx = ptr_re_arr_tab_sml_240[n++] << 1; - op[idx] = ixheaacd_add32_sat(temp, p2); - op[idx + 1] = ixheaacd_sub32_sat(temp2, p4); + op[idx] = ixheaac_add32_sat(temp, p2); + op[idx + 1] = ixheaac_sub32_sat(temp2, p4); idx = ptr_re_arr_tab_sml_240[n++] << 1; - op[idx] = ixheaacd_sub32_sat(temp, p2); - op[idx + 1] = ixheaacd_sub32_sat(temp1, p4); + op[idx] = ixheaac_sub32_sat(temp, p2); + op[idx + 1] = ixheaac_sub32_sat(temp1, p4); fft3outptr += 2; } return; @@ -2290,23 +2290,23 @@ VOID ixheaacd_fft_120(ia_aac_dec_imdct_tables_struct *imdct_tables_ptr, x_6 = x0[6]; x_7 = x0[7]; x0 += 8; - 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[2 * h2] = n00; y0[2 * h2 + 1] = n01; y1[2 * h2] = n10; y1[2 * h2 + 1] = n11; @@ -2371,28 +2371,28 @@ VOID ixheaacd_fft_3(WORD32 *inp, WORD32 *op) { WORD32 p1, p2, p3, p4; WORD32 sinmu = 1859775393; - x_01_r = ixheaacd_add32_sat(inp[0], inp[2]); - x_01_i = ixheaacd_add32_sat(inp[1], inp[3]); + x_01_r = ixheaac_add32_sat(inp[0], inp[2]); + x_01_i = 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; - 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); p4 = add_i >> 1; - temp = ixheaacd_sub32_sat(inp[0], p1); + temp = ixheaac_sub32_sat(inp[0], p1); - op[0] = ixheaacd_add32_sat(x_01_r, inp[4]); - op[1] = ixheaacd_add32_sat(x_01_i, 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(x_01_r, inp[4]); + op[1] = ixheaac_add32_sat(x_01_i, 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); } VOID ixheaacd_fft_5(WORD32 *inp, WORD32 *op) { @@ -2405,57 +2405,57 @@ VOID ixheaacd_fft_5(WORD32 *inp, WORD32 *op) { WORD32 r1, r2, r3, r4; WORD32 s1, s2, s3, s4, t, temp1, temp2; - r1 = ixheaacd_add32_sat(inp[2], inp[8]); - r4 = ixheaacd_sub32_sat(inp[2], inp[8]); - r3 = ixheaacd_add32_sat(inp[4], inp[6]); - r2 = ixheaacd_sub32_sat(inp[4], inp[6]); + r1 = ixheaac_add32_sat(inp[2], inp[8]); + r4 = ixheaac_sub32_sat(inp[2], inp[8]); + r3 = ixheaac_add32_sat(inp[4], inp[6]); + r2 = ixheaac_sub32_sat(inp[4], inp[6]); - t = ixheaacd_mult32_shl(ixheaacd_sub32_sat(r1, r3), c_54); - r1 = ixheaacd_add32_sat(r1, r3); + t = ixheaac_mult32_shl(ixheaac_sub32_sat(r1, r3), c_54); + r1 = ixheaac_add32_sat(r1, r3); - temp1 = ixheaacd_add32_sat(inp[0], r1); - r1 = ixheaacd_add32_sat( - temp1, ixheaacd_shl32_sat((ixheaacd_mult32_shl(r1, c_55)), 1)); + temp1 = ixheaac_add32_sat(inp[0], r1); + r1 = ixheaac_add32_sat( + temp1, ixheaac_shl32_sat((ixheaac_mult32_shl(r1, c_55)), 1)); - r3 = ixheaacd_sub32_sat(r1, t); - r1 = ixheaacd_add32_sat(r1, t); + r3 = ixheaac_sub32_sat(r1, t); + r1 = ixheaac_add32_sat(r1, t); - t = ixheaacd_mult32_shl(ixheaacd_add32_sat(r4, r2), c_51); - r4 = ixheaacd_add32_sat( - t, ixheaacd_shl32_sat(ixheaacd_mult32_shl(r4, c_52), 1)); - r2 = ixheaacd_add32_sat(t, ixheaacd_mult32_shl(r2, c_53)); + t = ixheaac_mult32_shl(ixheaac_add32_sat(r4, r2), c_51); + r4 = ixheaac_add32_sat( + t, ixheaac_shl32_sat(ixheaac_mult32_shl(r4, c_52), 1)); + r2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r2, c_53)); - s1 = ixheaacd_add32_sat(inp[3], inp[9]); - s4 = ixheaacd_sub32_sat(inp[3], inp[9]); - s3 = ixheaacd_add32_sat(inp[5], inp[7]); - s2 = ixheaacd_sub32_sat(inp[5], inp[7]); + s1 = ixheaac_add32_sat(inp[3], inp[9]); + s4 = ixheaac_sub32_sat(inp[3], inp[9]); + s3 = ixheaac_add32_sat(inp[5], inp[7]); + s2 = ixheaac_sub32_sat(inp[5], inp[7]); - t = ixheaacd_mult32_shl(ixheaacd_sub32_sat(s1, s3), c_54); - s1 = ixheaacd_add32_sat(s1, s3); + t = ixheaac_mult32_shl(ixheaac_sub32_sat(s1, s3), c_54); + s1 = ixheaac_add32_sat(s1, s3); - temp2 = ixheaacd_add32_sat(inp[1], s1); + temp2 = ixheaac_add32_sat(inp[1], s1); - s1 = ixheaacd_add32_sat( - temp2, ixheaacd_shl32_sat((ixheaacd_mult32_shl(s1, c_55)), 1)); + s1 = ixheaac_add32_sat( + temp2, ixheaac_shl32_sat((ixheaac_mult32_shl(s1, c_55)), 1)); - s3 = ixheaacd_sub32_sat(s1, t); - s1 = ixheaacd_add32_sat(s1, t); + s3 = ixheaac_sub32_sat(s1, t); + s1 = ixheaac_add32_sat(s1, t); - t = ixheaacd_mult32_shl(ixheaacd_add32_sat(s4, s2), c_51); - s4 = ixheaacd_add32_sat( - t, ixheaacd_shl32_sat((ixheaacd_mult32_shl(s4, c_52)), 1)); - s2 = ixheaacd_add32_sat(t, (ixheaacd_mult32_shl(s2, c_53))); + t = ixheaac_mult32_shl(ixheaac_add32_sat(s4, s2), c_51); + s4 = ixheaac_add32_sat( + t, ixheaac_shl32_sat((ixheaac_mult32_shl(s4, c_52)), 1)); + s2 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s2, c_53))); op[0] = temp1; op[1] = temp2; - op[2] = ixheaacd_add32_sat(r1, s2); - op[3] = ixheaacd_sub32_sat(s1, r2); - op[4] = ixheaacd_sub32_sat(r3, s4); - op[5] = ixheaacd_add32_sat(s3, r4); - op[6] = ixheaacd_add32_sat(r3, s4); - op[7] = ixheaacd_sub32_sat(s3, r4); - op[8] = ixheaacd_sub32_sat(r1, s2); - op[9] = ixheaacd_add32_sat(s1, r2); + op[2] = ixheaac_add32_sat(r1, s2); + op[3] = ixheaac_sub32_sat(s1, r2); + op[4] = ixheaac_sub32_sat(r3, s4); + op[5] = ixheaac_add32_sat(s3, r4); + op[6] = ixheaac_add32_sat(r3, s4); + op[7] = ixheaac_sub32_sat(s3, r4); + op[8] = ixheaac_sub32_sat(r1, s2); + op[9] = ixheaac_add32_sat(s1, r2); } VOID ixheaacd_fft_480_ld(WORD32 *inp, WORD32 *op, @@ -2506,13 +2506,13 @@ VOID ixheaacd_pre_twiddle_960(WORD32 *xptr, WORD32 *data, WORD32 n, tempr = *in_ptr1++; tempi = *in_ptr2--; - temp = -ixheaacd_add32(ixheaacd_mult32x32in32(tempr, c), - ixheaacd_mult32x32in32(tempi, s)); - *xptr++ = ixheaacd_shr32_dir_sat(temp, neg_expo); + temp = -ixheaac_add32(ixheaac_mult32x32in32(tempr, c), + ixheaac_mult32x32in32(tempi, s)); + *xptr++ = ixheaac_shr32_dir_sat(temp, neg_expo); - temp = -ixheaacd_sub32(ixheaacd_mult32x32in32(tempi, c), - ixheaacd_mult32x32in32(tempr, s)); - *xptr++ = ixheaacd_shr32_dir_sat(temp, neg_expo); + temp = -ixheaac_sub32(ixheaac_mult32x32in32(tempi, c), + ixheaac_mult32x32in32(tempr, s)); + *xptr++ = ixheaac_shr32_dir_sat(temp, neg_expo); c1 = *cos_sin_ptr++; s1 = *cos_sin_ptr++; @@ -2520,13 +2520,13 @@ VOID ixheaacd_pre_twiddle_960(WORD32 *xptr, WORD32 *data, WORD32 n, tempi = *in_ptr1++; tempr = *in_ptr2--; - temp = -ixheaacd_sub32(ixheaacd_mult32x32in32(tempi, c1), - ixheaacd_mult32x32in32(tempr, s1)); - *xprt1-- = ixheaacd_shr32_dir_sat(temp, neg_expo); + temp = -ixheaac_sub32(ixheaac_mult32x32in32(tempi, c1), + ixheaac_mult32x32in32(tempr, s1)); + *xprt1-- = ixheaac_shr32_dir_sat(temp, neg_expo); - temp = -ixheaacd_add32(ixheaacd_mult32x32in32(tempr, c1), - ixheaacd_mult32x32in32(tempi, s1)); - *xprt1-- = ixheaacd_shr32_dir_sat(temp, neg_expo); + temp = -ixheaac_add32(ixheaac_mult32x32in32(tempr, c1), + ixheaac_mult32x32in32(tempi, s1)); + *xprt1-- = ixheaac_shr32_dir_sat(temp, neg_expo); } } @@ -2550,13 +2550,13 @@ VOID ixheaacd_pre_twiddle_120(WORD32 *xptr, WORD32 *data, WORD32 n, tempr = *in_ptr1++; tempi = *in_ptr2--; - temp = -ixheaacd_add32(ixheaacd_mult32x16in32(tempr, c), - ixheaacd_mult32x16in32(tempi, s)); - *xptr++ = ixheaacd_shr32_dir_sat(temp, neg_expo); + temp = -ixheaac_add32(ixheaac_mult32x16in32(tempr, c), + ixheaac_mult32x16in32(tempi, s)); + *xptr++ = ixheaac_shr32_dir_sat(temp, neg_expo); - temp = -ixheaacd_sub32(ixheaacd_mult32x16in32(tempi, c), - ixheaacd_mult32x16in32(tempr, s)); - *xptr++ = ixheaacd_shr32_dir_sat(temp, neg_expo); + temp = -ixheaac_sub32(ixheaac_mult32x16in32(tempi, c), + ixheaac_mult32x16in32(tempr, s)); + *xptr++ = ixheaac_shr32_dir_sat(temp, neg_expo); c1 = *cos_sin_ptr++; s1 = *cos_sin_ptr++; @@ -2564,13 +2564,13 @@ VOID ixheaacd_pre_twiddle_120(WORD32 *xptr, WORD32 *data, WORD32 n, tempi = *in_ptr1++; tempr = *in_ptr2--; - temp = -ixheaacd_sub32(ixheaacd_mult32x16in32(tempi, c1), - ixheaacd_mult32x16in32(tempr, s1)); - *xprt1-- = ixheaacd_shr32_dir_sat(temp, neg_expo); + temp = -ixheaac_sub32(ixheaac_mult32x16in32(tempi, c1), + ixheaac_mult32x16in32(tempr, s1)); + *xprt1-- = ixheaac_shr32_dir_sat(temp, neg_expo); - temp = -ixheaacd_add32(ixheaacd_mult32x16in32(tempr, c1), - ixheaacd_mult32x16in32(tempi, s1)); - *xprt1-- = ixheaacd_shr32_dir_sat(temp, neg_expo); + temp = -ixheaac_add32(ixheaac_mult32x16in32(tempr, c1), + ixheaac_mult32x16in32(tempi, s1)); + *xprt1-- = ixheaac_shr32_dir_sat(temp, neg_expo); } } @@ -2600,12 +2600,12 @@ VOID ixheaacd_pre_twiddle(WORD32 *xptr, WORD32 *data, WORD32 n, in_ptr2 -= 2; temp = - -ixheaacd_add32(ixheaacd_mult32(tempr, c), ixheaacd_mult32(tempi, s)); - *xptr++ = ixheaacd_shr32(temp, neg_expo); + -ixheaac_add32(ixheaac_mult32(tempr, c), ixheaac_mult32(tempi, s)); + *xptr++ = ixheaac_shr32(temp, neg_expo); temp = - ixheaacd_sub32(ixheaacd_mult32(tempr, s), ixheaacd_mult32(tempi, c)); - *xptr++ = ixheaacd_shr32(temp, neg_expo); + ixheaac_sub32(ixheaac_mult32(tempr, s), ixheaac_mult32(tempi, c)); + *xptr++ = ixheaac_shr32(temp, neg_expo); tempr = *in_ptr1; tempi = *in_ptr2; @@ -2613,13 +2613,13 @@ VOID ixheaacd_pre_twiddle(WORD32 *xptr, WORD32 *data, WORD32 n, in_ptr1 += 2; in_ptr2 -= 2; - temp = -ixheaacd_add32(ixheaacd_mult32(tempr, c1), - ixheaacd_mult32(tempi, s1)); - *xptr++ = ixheaacd_shr32(temp, neg_expo); + temp = -ixheaac_add32(ixheaac_mult32(tempr, c1), + ixheaac_mult32(tempi, s1)); + *xptr++ = ixheaac_shr32(temp, neg_expo); - temp = ixheaacd_sub32(ixheaacd_mult32(tempr, s1), - ixheaacd_mult32(tempi, c1)); - *xptr++ = ixheaacd_shr32(temp, neg_expo); + temp = ixheaac_sub32(ixheaac_mult32(tempr, s1), + ixheaac_mult32(tempi, c1)); + *xptr++ = ixheaac_shr32(temp, neg_expo); } } else { neg_expo = -neg_expo; @@ -2637,12 +2637,12 @@ VOID ixheaacd_pre_twiddle(WORD32 *xptr, WORD32 *data, WORD32 n, in_ptr2 -= 2; temp = - -ixheaacd_add32(ixheaacd_mult32(tempr, c), ixheaacd_mult32(tempi, s)); - *xptr++ = ixheaacd_shl32(temp, neg_expo); + -ixheaac_add32(ixheaac_mult32(tempr, c), ixheaac_mult32(tempi, s)); + *xptr++ = ixheaac_shl32(temp, neg_expo); temp = - ixheaacd_sub32(ixheaacd_mult32(tempr, s), ixheaacd_mult32(tempi, c)); - *xptr++ = ixheaacd_shl32(temp, neg_expo); + ixheaac_sub32(ixheaac_mult32(tempr, s), ixheaac_mult32(tempi, c)); + *xptr++ = ixheaac_shl32(temp, neg_expo); tempr = *in_ptr1; tempi = *in_ptr2; @@ -2650,13 +2650,13 @@ VOID ixheaacd_pre_twiddle(WORD32 *xptr, WORD32 *data, WORD32 n, in_ptr1 += 2; in_ptr2 -= 2; - temp = -ixheaacd_add32(ixheaacd_mult32(tempr, c1), - ixheaacd_mult32(tempi, s1)); - *xptr++ = ixheaacd_shl32(temp, neg_expo); + temp = -ixheaac_add32(ixheaac_mult32(tempr, c1), + ixheaac_mult32(tempi, s1)); + *xptr++ = ixheaac_shl32(temp, neg_expo); - temp = ixheaacd_sub32(ixheaacd_mult32(tempr, s1), - ixheaacd_mult32(tempi, c1)); - *xptr++ = ixheaacd_shl32(temp, neg_expo); + temp = ixheaac_sub32(ixheaac_mult32(tempr, s1), + ixheaac_mult32(tempi, c1)); + *xptr++ = ixheaac_shl32(temp, neg_expo); } } } @@ -2680,23 +2680,23 @@ VOID ixheaacd_post_twiddle_120(WORD32 out[], WORD32 x[], tempr = *in_ptr1++; tempi = *in_ptr1++; - temp = -ixheaacd_sub32_sat(ixheaacd_mult32x16in32(tempr, s), - ixheaacd_mult32x16in32(tempi, c)); + temp = -ixheaac_sub32_sat(ixheaac_mult32x16in32(tempr, s), + ixheaac_mult32x16in32(tempi, c)); *xptr1-- = temp; - temp = -ixheaacd_add32_sat(ixheaacd_mult32x16in32(tempr, c), - ixheaacd_mult32x16in32(tempi, s)); + temp = -ixheaac_add32_sat(ixheaac_mult32x16in32(tempr, c), + ixheaac_mult32x16in32(tempi, s)); *xptr++ = temp; tempi = *in_ptr2--; tempr = *in_ptr2--; - temp = -ixheaacd_sub32_sat(ixheaacd_mult32x16in32(tempr, s1), - ixheaacd_mult32x16in32(tempi, c1)); + temp = -ixheaac_sub32_sat(ixheaac_mult32x16in32(tempr, s1), + ixheaac_mult32x16in32(tempi, c1)); *xptr++ = temp; - temp = -ixheaacd_add32_sat(ixheaacd_mult32x16in32(tempr, c1), - ixheaacd_mult32x16in32(tempi, s1)); + temp = -ixheaac_add32_sat(ixheaac_mult32x16in32(tempr, c1), + ixheaac_mult32x16in32(tempi, s1)); *xptr1-- = temp; } } @@ -2720,23 +2720,23 @@ VOID ixheaacd_post_twiddle_960(WORD32 out[], WORD32 x[], tempr = *in_ptr1++; tempi = *in_ptr1++; - temp = -ixheaacd_sub32_sat(ixheaacd_mult32x32in32(tempr, s), - ixheaacd_mult32x32in32(tempi, c)); + temp = -ixheaac_sub32_sat(ixheaac_mult32x32in32(tempr, s), + ixheaac_mult32x32in32(tempi, c)); *xptr1-- = temp; - temp = -ixheaacd_add32_sat(ixheaacd_mult32x32in32(tempr, c), - ixheaacd_mult32x32in32(tempi, s)); + temp = -ixheaac_add32_sat(ixheaac_mult32x32in32(tempr, c), + ixheaac_mult32x32in32(tempi, s)); *xptr++ = temp; tempi = *in_ptr2--; tempr = *in_ptr2--; - temp = -ixheaacd_sub32_sat(ixheaacd_mult32x32in32(tempr, s1), - ixheaacd_mult32x32in32(tempi, c1)); + temp = -ixheaac_sub32_sat(ixheaac_mult32x32in32(tempr, s1), + ixheaac_mult32x32in32(tempi, c1)); *xptr++ = temp; - temp = -ixheaacd_add32_sat(ixheaacd_mult32x32in32(tempr, c1), - ixheaacd_mult32x32in32(tempi, s1)); + temp = -ixheaac_add32_sat(ixheaac_mult32x32in32(tempr, c1), + ixheaac_mult32x32in32(tempi, s1)); *xptr1-- = temp; } } @@ -2763,9 +2763,9 @@ VOID ixheaacd_post_twiddle_ld(WORD32 out[], WORD32 x[], re = *ptr_x++; im = *ptr_x++; - *ptr_out1 = ixheaacd_sub32(ixheaacd_mult32(im, c), ixheaacd_mult32(re, s)); + *ptr_out1 = ixheaac_sub32(ixheaac_mult32(im, c), ixheaac_mult32(re, s)); - *ptr_out = -ixheaacd_add32(ixheaacd_mult32(re, c), ixheaacd_mult32(im, s)); + *ptr_out = -ixheaac_add32(ixheaac_mult32(re, c), ixheaac_mult32(im, s)); ptr_out += 2; ptr_out1 -= 2; @@ -2774,9 +2774,9 @@ VOID ixheaacd_post_twiddle_ld(WORD32 out[], WORD32 x[], im = *ptr_x++; *ptr_out1 = - ixheaacd_sub32(ixheaacd_mult32(im, c1), ixheaacd_mult32(re, s1)); + ixheaac_sub32(ixheaac_mult32(im, c1), ixheaac_mult32(re, s1)); *ptr_out = - -ixheaacd_add32(ixheaacd_mult32(re, c1), ixheaacd_mult32(im, s1)); + -ixheaac_add32(ixheaac_mult32(re, c1), ixheaac_mult32(im, s1)); ptr_out += 2; ptr_out1 -= 2; @@ -2811,8 +2811,8 @@ VOID ixheaacd_post_twiddle_eld(WORD32 out[], WORD32 x[], re = *ptr_x++; im = *ptr_x++; - tempi = ixheaacd_sub32(ixheaacd_mult32(im, c), ixheaacd_mult32(re, s)); - tempr = -ixheaacd_add32(ixheaacd_mult32(re, c), ixheaacd_mult32(im, s)); + tempi = ixheaac_sub32(ixheaac_mult32(im, c), ixheaac_mult32(re, s)); + tempr = -ixheaac_add32(ixheaac_mult32(re, c), ixheaac_mult32(im, s)); *ptr_out_767 = tempr; *ptr_out_256 = tempi; @@ -2828,8 +2828,8 @@ VOID ixheaacd_post_twiddle_eld(WORD32 out[], WORD32 x[], re = *ptr_x++; im = *ptr_x++; - tempi = ixheaacd_sub32(ixheaacd_mult32(im, c1), ixheaacd_mult32(re, s1)); - tempr = -ixheaacd_add32(ixheaacd_mult32(re, c1), ixheaacd_mult32(im, s1)); + tempi = ixheaac_sub32(ixheaac_mult32(im, c1), ixheaac_mult32(re, s1)); + tempr = -ixheaac_add32(ixheaac_mult32(re, c1), ixheaac_mult32(im, s1)); *ptr_out_767 = tempr; *ptr_out_256 = tempi; @@ -2858,8 +2858,8 @@ VOID ixheaacd_post_twiddle_eld(WORD32 out[], WORD32 x[], re = *ptr_x++; im = *ptr_x++; - tempi = ixheaacd_sub32(ixheaacd_mult32(im, c), ixheaacd_mult32(re, s)); - tempr = -ixheaacd_add32(ixheaacd_mult32(re, c), ixheaacd_mult32(im, s)); + tempi = ixheaac_sub32(ixheaac_mult32(im, c), ixheaac_mult32(re, s)); + tempr = -ixheaac_add32(ixheaac_mult32(re, c), ixheaac_mult32(im, s)); *ptr_out_767 = tempr; *ptr_out_256 = tempi; @@ -2875,8 +2875,8 @@ VOID ixheaacd_post_twiddle_eld(WORD32 out[], WORD32 x[], re = *ptr_x++; im = *ptr_x++; - tempi = ixheaacd_sub32(ixheaacd_mult32(im, c1), ixheaacd_mult32(re, s1)); - tempr = -ixheaacd_add32(ixheaacd_mult32(re, c1), ixheaacd_mult32(im, s1)); + tempi = ixheaac_sub32(ixheaac_mult32(im, c1), ixheaac_mult32(re, s1)); + tempr = -ixheaac_add32(ixheaac_mult32(re, c1), ixheaac_mult32(im, s1)); *ptr_out_767 = tempr; *ptr_out_256 = tempi; @@ -2960,14 +2960,14 @@ VOID ixheaacd_fft32x32_ld_dec(ia_aac_dec_imdct_tables_struct *imdct_tables_ptr, x_h2_0 = x[h2]; x_h2_1 = x[h2 + 1]; - xh0_0 = ixheaacd_add32_sat(x_0, x_l1_0); - xh1_0 = ixheaacd_add32_sat(x_1, x_l1_1); - xl0_0 = ixheaacd_sub32_sat(x_0, x_l1_0); - xl1_0 = ixheaacd_sub32_sat(x_1, x_l1_1); - xh20_0 = ixheaacd_add32_sat(x_h2_0, x_l2_0); - xh21_0 = ixheaacd_add32_sat(x_h2_1, x_l2_1); - xl20_0 = ixheaacd_sub32_sat(x_h2_0, x_l2_0); - xl21_0 = ixheaacd_sub32_sat(x_h2_1, x_l2_1); + xh0_0 = ixheaac_add32_sat(x_0, x_l1_0); + xh1_0 = ixheaac_add32_sat(x_1, x_l1_1); + xl0_0 = ixheaac_sub32_sat(x_0, x_l1_0); + xl1_0 = ixheaac_sub32_sat(x_1, x_l1_1); + xh20_0 = ixheaac_add32_sat(x_h2_0, x_l2_0); + xh21_0 = ixheaac_add32_sat(x_h2_1, x_l2_1); + xl20_0 = ixheaac_sub32_sat(x_h2_0, x_l2_0); + xl21_0 = ixheaac_sub32_sat(x_h2_1, x_l2_1); x0 = x; x2 = x0; @@ -2978,14 +2978,14 @@ VOID ixheaacd_fft32x32_ld_dec(ia_aac_dec_imdct_tables_struct *imdct_tables_ptr, if (!predj) x += fft_jmp; if (!predj) j = 0; - x0[0] = ixheaacd_add32_sat(xh0_0, xh20_0); - x0[1] = ixheaacd_add32_sat(xh1_0, xh21_0); - xt0_0 = ixheaacd_sub32_sat(xh0_0, xh20_0); - yt0_0 = ixheaacd_sub32_sat(xh1_0, xh21_0); - xt1_0 = ixheaacd_add32_sat(xl0_0, xl21_0); - yt2_0 = ixheaacd_add32_sat(xl1_0, xl20_0); - xt2_0 = ixheaacd_sub32_sat(xl0_0, xl21_0); - yt1_0 = ixheaacd_sub32_sat(xl1_0, xl20_0); + x0[0] = ixheaac_add32_sat(xh0_0, xh20_0); + x0[1] = ixheaac_add32_sat(xh1_0, xh21_0); + xt0_0 = ixheaac_sub32_sat(xh0_0, xh20_0); + yt0_0 = ixheaac_sub32_sat(xh1_0, xh21_0); + xt1_0 = ixheaac_add32_sat(xl0_0, xl21_0); + yt2_0 = ixheaac_add32_sat(xl1_0, xl20_0); + xt2_0 = ixheaac_sub32_sat(xl0_0, xl21_0); + yt1_0 = ixheaac_sub32_sat(xl1_0, xl20_0); x2[h2] = MPYHIRC(si10, yt1_0) + MPYHIRC(co10, xt1_0) + @@ -3051,33 +3051,33 @@ VOID ixheaacd_fft32x32_ld_dec(ia_aac_dec_imdct_tables_struct *imdct_tables_ptr, x_7 = x0[7]; x0 += 8; - 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); if (radix == 2) { - n00 = ixheaacd_add32_sat(x_0, x_2); - n01 = ixheaacd_add32_sat(x_1, x_3); - n20 = ixheaacd_sub32_sat(x_0, x_2); - n21 = ixheaacd_sub32_sat(x_1, x_3); - n10 = ixheaacd_add32_sat(x_4, x_6); - n11 = ixheaacd_add32_sat(x_5, x_7); - n30 = ixheaacd_sub32_sat(x_4, x_6); - n31 = ixheaacd_sub32_sat(x_5, x_7); + n00 = ixheaac_add32_sat(x_0, x_2); + n01 = ixheaac_add32_sat(x_1, x_3); + n20 = ixheaac_sub32_sat(x_0, x_2); + n21 = ixheaac_sub32_sat(x_1, x_3); + n10 = ixheaac_add32_sat(x_4, x_6); + n11 = ixheaac_add32_sat(x_5, x_7); + n30 = ixheaac_sub32_sat(x_4, x_6); + n31 = ixheaac_sub32_sat(x_5, x_7); } y0[2 * h2] = n00; @@ -3099,33 +3099,33 @@ VOID ixheaacd_fft32x32_ld_dec(ia_aac_dec_imdct_tables_struct *imdct_tables_ptr, x_f = x2[7]; x2 += 8; - 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); if (radix == 2) { - n02 = ixheaacd_add32_sat(x_8, x_a); - n03 = ixheaacd_add32_sat(x_9, x_b); - n22 = ixheaacd_sub32_sat(x_8, x_a); - n23 = ixheaacd_sub32_sat(x_9, x_b); - n12 = ixheaacd_add32_sat(x_c, x_e); - n13 = ixheaacd_add32_sat(x_d, x_f); - n32 = ixheaacd_sub32_sat(x_c, x_e); - n33 = ixheaacd_sub32_sat(x_d, x_f); + n02 = ixheaac_add32_sat(x_8, x_a); + n03 = ixheaac_add32_sat(x_9, x_b); + n22 = ixheaac_sub32_sat(x_8, x_a); + n23 = ixheaac_sub32_sat(x_9, x_b); + n12 = ixheaac_add32_sat(x_c, x_e); + n13 = ixheaac_add32_sat(x_d, x_f); + n32 = ixheaac_sub32_sat(x_c, x_e); + n33 = ixheaac_sub32_sat(x_d, x_f); } y0[2 * h2 + 2] = n02; @@ -3202,59 +3202,59 @@ VOID ixheaacd_fft_15_ld_dec(WORD32 *inp, WORD32 *op, WORD32 *fft3out, *buf1++ = inp[384]; *buf1++ = inp[385]; - r1 = ixheaacd_add32_sat(buf1a[2], buf1a[8]); - r4 = ixheaacd_sub32_sat(buf1a[2], buf1a[8]); - r3 = ixheaacd_add32_sat(buf1a[4], buf1a[6]); - r2 = ixheaacd_sub32_sat(buf1a[4], buf1a[6]); + r1 = ixheaac_add32_sat(buf1a[2], buf1a[8]); + r4 = ixheaac_sub32_sat(buf1a[2], buf1a[8]); + r3 = ixheaac_add32_sat(buf1a[4], buf1a[6]); + r2 = ixheaac_sub32_sat(buf1a[4], buf1a[6]); - t = ixheaacd_mult32_shl(ixheaacd_sub32_sat(r1, r3), cos_54); + t = ixheaac_mult32_shl(ixheaac_sub32_sat(r1, r3), cos_54); - r1 = ixheaacd_add32_sat(r1, r3); + r1 = ixheaac_add32_sat(r1, r3); - temp1 = ixheaacd_add32_sat(buf1a[0], r1); + temp1 = ixheaac_add32_sat(buf1a[0], r1); - r1 = ixheaacd_add32_sat( - temp1, ixheaacd_shl32_sat((ixheaacd_mult32_shl(r1, cos_55)), 1)); + r1 = ixheaac_add32_sat( + temp1, ixheaac_shl32_sat((ixheaac_mult32_shl(r1, cos_55)), 1)); - r3 = ixheaacd_sub32_sat(r1, t); - r1 = ixheaacd_add32_sat(r1, t); + r3 = ixheaac_sub32_sat(r1, t); + r1 = ixheaac_add32_sat(r1, t); - t = ixheaacd_mult32_shl(ixheaacd_add32_sat(r4, r2), cos_51); - r4 = ixheaacd_add32_sat( - t, ixheaacd_shl32_sat(ixheaacd_mult32_shl(r4, cos_52), 1)); - r2 = ixheaacd_add32_sat(t, ixheaacd_mult32_shl(r2, cos_53)); + t = ixheaac_mult32_shl(ixheaac_add32_sat(r4, r2), cos_51); + r4 = ixheaac_add32_sat( + t, ixheaac_shl32_sat(ixheaac_mult32_shl(r4, cos_52), 1)); + r2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r2, cos_53)); - s1 = ixheaacd_add32_sat(buf1a[3], buf1a[9]); - s4 = ixheaacd_sub32_sat(buf1a[3], buf1a[9]); - s3 = ixheaacd_add32_sat(buf1a[5], buf1a[7]); - s2 = ixheaacd_sub32_sat(buf1a[5], buf1a[7]); + s1 = ixheaac_add32_sat(buf1a[3], buf1a[9]); + s4 = ixheaac_sub32_sat(buf1a[3], buf1a[9]); + s3 = ixheaac_add32_sat(buf1a[5], buf1a[7]); + s2 = ixheaac_sub32_sat(buf1a[5], buf1a[7]); - t = ixheaacd_mult32_shl(ixheaacd_sub32_sat(s1, s3), cos_54); - s1 = ixheaacd_add32_sat(s1, s3); + t = ixheaac_mult32_shl(ixheaac_sub32_sat(s1, s3), cos_54); + s1 = ixheaac_add32_sat(s1, s3); - temp2 = ixheaacd_add32_sat(buf1a[1], s1); + temp2 = ixheaac_add32_sat(buf1a[1], s1); - s1 = ixheaacd_add32_sat( - temp2, ixheaacd_shl32_sat((ixheaacd_mult32_shl(s1, cos_55)), 1)); + s1 = ixheaac_add32_sat( + temp2, ixheaac_shl32_sat((ixheaac_mult32_shl(s1, cos_55)), 1)); - s3 = ixheaacd_sub32_sat(s1, t); - s1 = ixheaacd_add32_sat(s1, t); + s3 = ixheaac_sub32_sat(s1, t); + s1 = ixheaac_add32_sat(s1, t); - t = ixheaacd_mult32_shl(ixheaacd_add32_sat(s4, s2), cos_51); - s4 = ixheaacd_add32_sat( - t, ixheaacd_shl32_sat((ixheaacd_mult32_shl(s4, cos_52)), 1)); - s2 = ixheaacd_add32_sat(t, (ixheaacd_mult32_shl(s2, cos_53))); + t = ixheaac_mult32_shl(ixheaac_add32_sat(s4, s2), cos_51); + s4 = ixheaac_add32_sat( + t, ixheaac_shl32_sat((ixheaac_mult32_shl(s4, cos_52)), 1)); + s2 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s2, cos_53))); *buf2++ = temp1; *buf2++ = temp2; - *buf2++ = ixheaacd_add32_sat(r1, s2); - *buf2++ = ixheaacd_sub32_sat(s1, r2); - *buf2++ = ixheaacd_sub32_sat(r3, s4); - *buf2++ = ixheaacd_add32_sat(s3, r4); - *buf2++ = ixheaacd_add32_sat(r3, s4); - *buf2++ = ixheaacd_sub32_sat(s3, r4); - *buf2++ = ixheaacd_sub32_sat(r1, s2); - *buf2++ = ixheaacd_add32_sat(s1, r2); + *buf2++ = ixheaac_add32_sat(r1, s2); + *buf2++ = ixheaac_sub32_sat(s1, r2); + *buf2++ = ixheaac_sub32_sat(r3, s4); + *buf2++ = ixheaac_add32_sat(s3, r4); + *buf2++ = ixheaac_add32_sat(r3, s4); + *buf2++ = ixheaac_sub32_sat(s3, r4); + *buf2++ = ixheaac_sub32_sat(r1, s2); + *buf2++ = ixheaac_add32_sat(s1, r2); buf1a = buf1; *buf1++ = inp[160]; @@ -3272,60 +3272,60 @@ VOID ixheaacd_fft_15_ld_dec(WORD32 *inp, WORD32 *op, WORD32 *fft3out, *buf1++ = inp[64]; *buf1++ = inp[65]; - r1 = ixheaacd_add32_sat(buf1a[2], buf1a[8]); - r4 = ixheaacd_sub32_sat(buf1a[2], buf1a[8]); - r3 = ixheaacd_add32_sat(buf1a[4], buf1a[6]); - r2 = ixheaacd_sub32_sat(buf1a[4], buf1a[6]); + r1 = ixheaac_add32_sat(buf1a[2], buf1a[8]); + r4 = ixheaac_sub32_sat(buf1a[2], buf1a[8]); + r3 = ixheaac_add32_sat(buf1a[4], buf1a[6]); + r2 = ixheaac_sub32_sat(buf1a[4], buf1a[6]); - t = ixheaacd_mult32_shl(ixheaacd_sub32_sat(r1, r3), cos_54); + t = ixheaac_mult32_shl(ixheaac_sub32_sat(r1, r3), cos_54); - r1 = ixheaacd_add32_sat(r1, r3); + r1 = ixheaac_add32_sat(r1, r3); - temp1 = ixheaacd_add32_sat(buf1a[0], r1); + temp1 = ixheaac_add32_sat(buf1a[0], r1); - r1 = ixheaacd_add32_sat( - temp1, ixheaacd_shl32_sat((ixheaacd_mult32_shl(r1, cos_55)), 1)); + r1 = ixheaac_add32_sat( + temp1, ixheaac_shl32_sat((ixheaac_mult32_shl(r1, cos_55)), 1)); - r3 = ixheaacd_sub32_sat(r1, t); - r1 = ixheaacd_add32_sat(r1, t); + r3 = ixheaac_sub32_sat(r1, t); + r1 = ixheaac_add32_sat(r1, t); - t = ixheaacd_mult32_shl(ixheaacd_add32_sat(r4, r2), cos_51); - r4 = ixheaacd_add32_sat( - t, ixheaacd_shl32_sat(ixheaacd_mult32_shl(r4, cos_52), 1)); - r2 = ixheaacd_add32_sat(t, ixheaacd_mult32_shl(r2, cos_53)); + t = ixheaac_mult32_shl(ixheaac_add32_sat(r4, r2), cos_51); + r4 = ixheaac_add32_sat( + t, ixheaac_shl32_sat(ixheaac_mult32_shl(r4, cos_52), 1)); + r2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r2, cos_53)); - s1 = ixheaacd_add32_sat(buf1a[3], buf1a[9]); - s4 = ixheaacd_sub32_sat(buf1a[3], buf1a[9]); - s3 = ixheaacd_add32_sat(buf1a[5], buf1a[7]); - s2 = ixheaacd_sub32_sat(buf1a[5], buf1a[7]); + s1 = ixheaac_add32_sat(buf1a[3], buf1a[9]); + s4 = ixheaac_sub32_sat(buf1a[3], buf1a[9]); + s3 = ixheaac_add32_sat(buf1a[5], buf1a[7]); + s2 = ixheaac_sub32_sat(buf1a[5], buf1a[7]); - t = ixheaacd_mult32_shl(ixheaacd_sub32_sat(s1, s3), cos_54); + t = ixheaac_mult32_shl(ixheaac_sub32_sat(s1, s3), cos_54); - s1 = ixheaacd_add32_sat(s1, s3); + s1 = ixheaac_add32_sat(s1, s3); - temp2 = ixheaacd_add32_sat(buf1a[1], s1); + temp2 = ixheaac_add32_sat(buf1a[1], s1); - s1 = ixheaacd_add32_sat( - temp2, ixheaacd_shl32_sat((ixheaacd_mult32_shl(s1, cos_55)), 1)); + s1 = ixheaac_add32_sat( + temp2, ixheaac_shl32_sat((ixheaac_mult32_shl(s1, cos_55)), 1)); - s3 = ixheaacd_sub32_sat(s1, t); - s1 = ixheaacd_add32_sat(s1, t); + s3 = ixheaac_sub32_sat(s1, t); + s1 = ixheaac_add32_sat(s1, t); - t = ixheaacd_mult32_shl(ixheaacd_add32_sat(s4, s2), cos_51); - s4 = ixheaacd_add32_sat( - t, ixheaacd_shl32_sat((ixheaacd_mult32_shl(s4, cos_52)), 1)); - s2 = ixheaacd_add32_sat(t, (ixheaacd_mult32_shl(s2, cos_53))); + t = ixheaac_mult32_shl(ixheaac_add32_sat(s4, s2), cos_51); + s4 = ixheaac_add32_sat( + t, ixheaac_shl32_sat((ixheaac_mult32_shl(s4, cos_52)), 1)); + s2 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s2, cos_53))); *buf2++ = temp1; *buf2++ = temp2; - *buf2++ = ixheaacd_add32_sat(r1, s2); - *buf2++ = ixheaacd_sub32_sat(s1, r2); - *buf2++ = ixheaacd_sub32_sat(r3, s4); - *buf2++ = ixheaacd_add32_sat(s3, r4); - *buf2++ = ixheaacd_add32_sat(r3, s4); - *buf2++ = ixheaacd_sub32_sat(s3, r4); - *buf2++ = ixheaacd_sub32_sat(r1, s2); - *buf2++ = ixheaacd_add32_sat(s1, r2); + *buf2++ = ixheaac_add32_sat(r1, s2); + *buf2++ = ixheaac_sub32_sat(s1, r2); + *buf2++ = ixheaac_sub32_sat(r3, s4); + *buf2++ = ixheaac_add32_sat(s3, r4); + *buf2++ = ixheaac_add32_sat(r3, s4); + *buf2++ = ixheaac_sub32_sat(s3, r4); + *buf2++ = ixheaac_sub32_sat(r1, s2); + *buf2++ = ixheaac_add32_sat(s1, r2); buf1a = buf1; ; @@ -3344,60 +3344,60 @@ VOID ixheaacd_fft_15_ld_dec(WORD32 *inp, WORD32 *op, WORD32 *fft3out, *buf1++ = inp[224]; *buf1++ = inp[225]; - r1 = ixheaacd_add32_sat(buf1a[2], buf1a[8]); - r4 = ixheaacd_sub32_sat(buf1a[2], buf1a[8]); - r3 = ixheaacd_add32_sat(buf1a[4], buf1a[6]); - r2 = ixheaacd_sub32_sat(buf1a[4], buf1a[6]); + r1 = ixheaac_add32_sat(buf1a[2], buf1a[8]); + r4 = ixheaac_sub32_sat(buf1a[2], buf1a[8]); + r3 = ixheaac_add32_sat(buf1a[4], buf1a[6]); + r2 = ixheaac_sub32_sat(buf1a[4], buf1a[6]); - t = ixheaacd_mult32_shl(ixheaacd_sub32_sat(r1, r3), cos_54); + t = ixheaac_mult32_shl(ixheaac_sub32_sat(r1, r3), cos_54); - r1 = ixheaacd_add32_sat(r1, r3); + r1 = ixheaac_add32_sat(r1, r3); - temp1 = ixheaacd_add32_sat(buf1a[0], r1); + temp1 = ixheaac_add32_sat(buf1a[0], r1); - r1 = ixheaacd_add32_sat( - temp1, ixheaacd_shl32_sat((ixheaacd_mult32_shl(r1, cos_55)), 1)); + r1 = ixheaac_add32_sat( + temp1, ixheaac_shl32_sat((ixheaac_mult32_shl(r1, cos_55)), 1)); - r3 = ixheaacd_sub32_sat(r1, t); - r1 = ixheaacd_add32_sat(r1, t); + r3 = ixheaac_sub32_sat(r1, t); + r1 = ixheaac_add32_sat(r1, t); - t = ixheaacd_mult32_shl(ixheaacd_add32_sat(r4, r2), cos_51); - r4 = ixheaacd_add32_sat( - t, ixheaacd_shl32_sat(ixheaacd_mult32_shl(r4, cos_52), 1)); - r2 = ixheaacd_add32_sat(t, ixheaacd_mult32_shl(r2, cos_53)); + t = ixheaac_mult32_shl(ixheaac_add32_sat(r4, r2), cos_51); + r4 = ixheaac_add32_sat( + t, ixheaac_shl32_sat(ixheaac_mult32_shl(r4, cos_52), 1)); + r2 = ixheaac_add32_sat(t, ixheaac_mult32_shl(r2, cos_53)); - s1 = ixheaacd_add32_sat(buf1a[3], buf1a[9]); - s4 = ixheaacd_sub32_sat(buf1a[3], buf1a[9]); - s3 = ixheaacd_add32_sat(buf1a[5], buf1a[7]); - s2 = ixheaacd_sub32_sat(buf1a[5], buf1a[7]); + s1 = ixheaac_add32_sat(buf1a[3], buf1a[9]); + s4 = ixheaac_sub32_sat(buf1a[3], buf1a[9]); + s3 = ixheaac_add32_sat(buf1a[5], buf1a[7]); + s2 = ixheaac_sub32_sat(buf1a[5], buf1a[7]); - t = ixheaacd_mult32_shl(ixheaacd_sub32_sat(s1, s3), cos_54); + t = ixheaac_mult32_shl(ixheaac_sub32_sat(s1, s3), cos_54); - s1 = ixheaacd_add32_sat(s1, s3); + s1 = ixheaac_add32_sat(s1, s3); - temp2 = ixheaacd_add32_sat(buf1a[1], s1); + temp2 = ixheaac_add32_sat(buf1a[1], s1); - s1 = ixheaacd_add32_sat( - temp2, ixheaacd_shl32_sat((ixheaacd_mult32_shl(s1, cos_55)), 1)); + s1 = ixheaac_add32_sat( + temp2, ixheaac_shl32_sat((ixheaac_mult32_shl(s1, cos_55)), 1)); - s3 = ixheaacd_sub32_sat(s1, t); - s1 = ixheaacd_add32_sat(s1, t); + s3 = ixheaac_sub32_sat(s1, t); + s1 = ixheaac_add32_sat(s1, t); - t = ixheaacd_mult32_shl(ixheaacd_add32_sat(s4, s2), cos_51); - s4 = ixheaacd_add32_sat( - t, ixheaacd_shl32_sat((ixheaacd_mult32_shl(s4, cos_52)), 1)); - s2 = ixheaacd_add32_sat(t, (ixheaacd_mult32_shl(s2, cos_53))); + t = ixheaac_mult32_shl(ixheaac_add32_sat(s4, s2), cos_51); + s4 = ixheaac_add32_sat( + t, ixheaac_shl32_sat((ixheaac_mult32_shl(s4, cos_52)), 1)); + s2 = ixheaac_add32_sat(t, (ixheaac_mult32_shl(s2, cos_53))); *buf2++ = temp1; *buf2++ = temp2; - *buf2++ = ixheaacd_add32_sat(r1, s2); - *buf2++ = ixheaacd_sub32_sat(s1, r2); - *buf2++ = ixheaacd_sub32_sat(r3, s4); - *buf2++ = ixheaacd_add32_sat(s3, r4); - *buf2++ = ixheaacd_add32_sat(r3, s4); - *buf2++ = ixheaacd_sub32_sat(s3, r4); - *buf2++ = ixheaacd_sub32_sat(r1, s2); - *buf2++ = ixheaacd_add32_sat(s1, r2); + *buf2++ = ixheaac_add32_sat(r1, s2); + *buf2++ = ixheaac_sub32_sat(s1, r2); + *buf2++ = ixheaac_sub32_sat(r3, s4); + *buf2++ = ixheaac_add32_sat(s3, r4); + *buf2++ = ixheaac_add32_sat(r3, s4); + *buf2++ = ixheaac_sub32_sat(s3, r4); + *buf2++ = ixheaac_sub32_sat(r1, s2); + *buf2++ = ixheaac_add32_sat(s1, r2); buf1a = buf1; ; } @@ -3413,37 +3413,37 @@ VOID ixheaacd_fft_15_ld_dec(WORD32 *inp, WORD32 *op, WORD32 *fft3out, xr_2 = fft3outptr[20]; xi_2 = fft3outptr[21]; - x01_real = ixheaacd_add32_sat(xr_0, xr_1); - x_01_imag = ixheaacd_add32_sat(xi_0, xi_1); + x01_real = ixheaac_add32_sat(xr_0, xr_1); + x_01_imag = ixheaac_add32_sat(xi_0, xi_1); - add_r = ixheaacd_add32_sat(xr_1, xr_2); - add_i = ixheaacd_add32_sat(xi_1, xi_2); + add_r = ixheaac_add32_sat(xr_1, xr_2); + add_i = ixheaac_add32_sat(xi_1, xi_2); - sub_r = ixheaacd_sub32_sat(xr_1, xr_2); - sub_i = ixheaacd_sub32_sat(xi_1, xi_2); + sub_r = ixheaac_sub32_sat(xr_1, xr_2); + sub_i = ixheaac_sub32_sat(xi_1, xi_2); p1 = add_r >> 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); p4 = add_i >> 1; - temp = ixheaacd_sub32_sat(xr_0, p1); - temp1 = ixheaacd_add32_sat(xi_0, p3); - temp2 = ixheaacd_sub32_sat(xi_0, p3); + temp = ixheaac_sub32_sat(xr_0, p1); + temp1 = ixheaac_add32_sat(xi_0, p3); + temp2 = ixheaac_sub32_sat(xi_0, p3); idx = re_arr_tab_sml_240_ptr[n++] << 1; - op[idx] = ixheaacd_add32_sat(x01_real, xr_2); - op[idx + 1] = ixheaacd_add32_sat(x_01_imag, xi_2); + op[idx] = ixheaac_add32_sat(x01_real, xr_2); + op[idx + 1] = ixheaac_add32_sat(x_01_imag, xi_2); idx = re_arr_tab_sml_240_ptr[n++] << 1; - op[idx] = ixheaacd_add32_sat(temp, p2); - op[idx + 1] = ixheaacd_sub32_sat(temp2, p4); + op[idx] = ixheaac_add32_sat(temp, p2); + op[idx + 1] = ixheaac_sub32_sat(temp2, p4); idx = re_arr_tab_sml_240_ptr[n++] << 1; - op[idx] = ixheaacd_sub32_sat(temp, p2); - op[idx + 1] = ixheaacd_sub32_sat(temp1, p4); + op[idx] = ixheaac_sub32_sat(temp, p2); + op[idx + 1] = ixheaac_sub32_sat(temp1, p4); fft3outptr += 2; } } \ No newline at end of file diff --git a/decoder/ixheaacd_aac_rom.c b/decoder/ixheaacd_aac_rom.c index 4a3cc19..bbeb9bf 100644 --- a/decoder/ixheaacd_aac_rom.c +++ b/decoder/ixheaacd_aac_rom.c @@ -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" diff --git a/decoder/ixheaacd_aac_tns.c b/decoder/ixheaacd_aac_tns.c index 34aad73..f5b9988 100644 --- a/decoder/ixheaacd_aac_tns.c +++ b/decoder/ixheaacd_aac_tns.c @@ -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); } \ No newline at end of file diff --git a/decoder/ixheaacd_aacdecoder.c b/decoder/ixheaacd_aacdecoder.c index e3e16dd..5d7e113 100644 --- a/decoder/ixheaacd_aacdecoder.c +++ b/decoder/ixheaacd_aacdecoder.c @@ -20,13 +20,13 @@ #include #include #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; diff --git a/decoder/ixheaacd_aacpluscheck.c b/decoder/ixheaacd_aacpluscheck.c index 821790e..13ad8b5 100644 --- a/decoder/ixheaacd_aacpluscheck.c +++ b/decoder/ixheaacd_aacpluscheck.c @@ -20,15 +20,15 @@ #include #include #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" diff --git a/decoder/ixheaacd_acelp_bitparse.c b/decoder/ixheaacd_acelp_bitparse.c index b71ac7f..1be89be 100644 --- a/decoder/ixheaacd_acelp_bitparse.c +++ b/decoder/ixheaacd_acelp_bitparse.c @@ -18,7 +18,7 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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; } } diff --git a/decoder/ixheaacd_acelp_decode.c b/decoder/ixheaacd_acelp_decode.c index 0d656ff..f805ebb 100644 --- a/decoder/ixheaacd_acelp_decode.c +++ b/decoder/ixheaacd_acelp_decode.c @@ -23,7 +23,7 @@ #include #include -#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" diff --git a/decoder/ixheaacd_acelp_mdct.c b/decoder/ixheaacd_acelp_mdct.c index d92ed25..36fac96 100644 --- a/decoder/ixheaacd_acelp_mdct.c +++ b/decoder/ixheaacd_acelp_mdct.c @@ -20,7 +20,7 @@ #include #include -#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]; diff --git a/decoder/ixheaacd_acelp_tools.c b/decoder/ixheaacd_acelp_tools.c index a7cf83e..38d92c5 100644 --- a/decoder/ixheaacd_acelp_tools.c +++ b/decoder/ixheaacd_acelp_tools.c @@ -19,12 +19,12 @@ */ #include #include -#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; } diff --git a/decoder/ixheaacd_adts_crc_check.c b/decoder/ixheaacd_adts_crc_check.c index 5799d37..ff33967 100644 --- a/decoder/ixheaacd_adts_crc_check.c +++ b/decoder/ixheaacd_adts_crc_check.c @@ -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" diff --git a/decoder/ixheaacd_api.c b/decoder/ixheaacd_api.c index 5ba4fcf..e1af20d 100644 --- a/decoder/ixheaacd_api.c +++ b/decoder/ixheaacd_api.c @@ -21,18 +21,18 @@ #include #include #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)); } } diff --git a/decoder/ixheaacd_arith_dec.c b/decoder/ixheaacd_arith_dec.c index b44ab64..d46b051 100644 --- a/decoder/ixheaacd_arith_dec.c +++ b/decoder/ixheaacd_arith_dec.c @@ -19,11 +19,11 @@ */ #include #include -#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); } diff --git a/decoder/ixheaacd_avq_dec.c b/decoder/ixheaacd_avq_dec.c index af11cef..af5e0d8 100644 --- a/decoder/ixheaacd_avq_dec.c +++ b/decoder/ixheaacd_avq_dec.c @@ -23,10 +23,10 @@ #include #include #include -#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; diff --git a/decoder/ixheaacd_avq_rom.c b/decoder/ixheaacd_avq_rom.c index 1251923..6364efe 100644 --- a/decoder/ixheaacd_avq_rom.c +++ b/decoder/ixheaacd_avq_rom.c @@ -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" diff --git a/decoder/ixheaacd_basic_funcs.c b/decoder/ixheaacd_basic_funcs.c index 6df28fc..a0f0c77 100644 --- a/decoder/ixheaacd_basic_funcs.c +++ b/decoder/ixheaacd_basic_funcs.c @@ -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; diff --git a/decoder/ixheaacd_basic_funcs.h b/decoder/ixheaacd_basic_funcs.h index 7a078b7..0d2b268 100644 --- a/decoder/ixheaacd_basic_funcs.h +++ b/decoder/ixheaacd_basic_funcs.h @@ -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); diff --git a/decoder/ixheaacd_basic_ops.c b/decoder/ixheaacd_basic_ops.c index 3887210..9a1088c 100644 --- a/decoder/ixheaacd_basic_ops.c +++ b/decoder/ixheaacd_basic_ops.c @@ -18,11 +18,11 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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++; diff --git a/decoder/ixheaacd_basic_ops_arr.h b/decoder/ixheaacd_basic_ops_arr.h deleted file mode 100644 index 69108a8..0000000 --- a/decoder/ixheaacd_basic_ops_arr.h +++ /dev/null @@ -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 diff --git a/decoder/ixheaacd_bitbuffer.c b/decoder/ixheaacd_bitbuffer.c index d76317f..762b102 100644 --- a/decoder/ixheaacd_bitbuffer.c +++ b/decoder/ixheaacd_bitbuffer.c @@ -21,14 +21,14 @@ #include #include #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" diff --git a/decoder/ixheaacd_block.c b/decoder/ixheaacd_block.c index 07aec63..acafa99 100644 --- a/decoder/ixheaacd_block.c +++ b/decoder/ixheaacd_block.c @@ -19,13 +19,13 @@ */ #include #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; } } diff --git a/decoder/ixheaacd_channel.c b/decoder/ixheaacd_channel.c index 6f0a8df..c53d487 100644 --- a/decoder/ixheaacd_channel.c +++ b/decoder/ixheaacd_channel.c @@ -19,13 +19,13 @@ */ #include #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" diff --git a/decoder/ixheaacd_common_initfuncs.c b/decoder/ixheaacd_common_initfuncs.c index f3d2ae6..47d0994 100644 --- a/decoder/ixheaacd_common_initfuncs.c +++ b/decoder/ixheaacd_common_initfuncs.c @@ -19,12 +19,12 @@ */ #include #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" diff --git a/decoder/ixheaacd_common_lpfuncs.c b/decoder/ixheaacd_common_lpfuncs.c index 80196b9..14a4bcc 100644 --- a/decoder/ixheaacd_common_lpfuncs.c +++ b/decoder/ixheaacd_common_lpfuncs.c @@ -19,11 +19,11 @@ */ #include #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 diff --git a/decoder/ixheaacd_common_rom.c b/decoder/ixheaacd_common_rom.c index 667b28a..fe761a2 100644 --- a/decoder/ixheaacd_common_rom.c +++ b/decoder/ixheaacd_common_rom.c @@ -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" diff --git a/decoder/ixheaacd_create.c b/decoder/ixheaacd_create.c index 0aef571..918d84f 100644 --- a/decoder/ixheaacd_create.c +++ b/decoder/ixheaacd_create.c @@ -22,8 +22,8 @@ #include #include -#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" diff --git a/decoder/ixheaacd_decode_main.c b/decoder/ixheaacd_decode_main.c index 802f7fa..4068209 100644 --- a/decoder/ixheaacd_decode_main.c +++ b/decoder/ixheaacd_decode_main.c @@ -19,8 +19,8 @@ */ #include #include -#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, diff --git a/decoder/ixheaacd_drc_freq_dec.c b/decoder/ixheaacd_drc_freq_dec.c index 5525678..32a31ce 100644 --- a/decoder/ixheaacd_drc_freq_dec.c +++ b/decoder/ixheaacd_drc_freq_dec.c @@ -20,18 +20,18 @@ #include #include #include -#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" diff --git a/decoder/ixheaacd_dsp_fft32x32s.c b/decoder/ixheaacd_dsp_fft32x32s.c index d13b053..d75f2f9 100644 --- a/decoder/ixheaacd_dsp_fft32x32s.c +++ b/decoder/ixheaacd_dsp_fft32x32s.c @@ -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); } diff --git a/decoder/ixheaacd_dsp_fft32x32s.h b/decoder/ixheaacd_dsp_fft32x32s.h index 3dbd5b3..cec5ef4 100644 --- a/decoder/ixheaacd_dsp_fft32x32s.h +++ b/decoder/ixheaacd_dsp_fft32x32s.h @@ -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 */ diff --git a/decoder/ixheaacd_ec_rom.c b/decoder/ixheaacd_ec_rom.c index cb95464..42399e1 100644 --- a/decoder/ixheaacd_ec_rom.c +++ b/decoder/ixheaacd_ec_rom.c @@ -18,7 +18,7 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ -#include +#include #include "ixheaacd_ec_defines.h" const WORD16 ia_ec_interpolation_fac[4] = {(0x4000), (0x4c1b), (0x5a82), (0x6ba2)}; diff --git a/decoder/ixheaacd_env_calc.c b/decoder/ixheaacd_env_calc.c index d1b23dd..6c02362 100644 --- a/decoder/ixheaacd_env_calc.c +++ b/decoder/ixheaacd_env_calc.c @@ -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; diff --git a/decoder/ixheaacd_env_dec.c b/decoder/ixheaacd_env_dec.c index 3249c79..862a2ab 100644 --- a/decoder/ixheaacd_env_dec.c +++ b/decoder/ixheaacd_env_dec.c @@ -20,14 +20,14 @@ #include #include #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; diff --git a/decoder/ixheaacd_env_extr.c b/decoder/ixheaacd_env_extr.c index 642a18d..2dab876 100644 --- a/decoder/ixheaacd_env_extr.c +++ b/decoder/ixheaacd_env_extr.c @@ -20,15 +20,15 @@ #include #include #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; diff --git a/decoder/ixheaacd_env_extr.h b/decoder/ixheaacd_env_extr.h index b7b98f6..01bddb7 100644 --- a/decoder/ixheaacd_env_extr.h +++ b/decoder/ixheaacd_env_extr.h @@ -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 diff --git a/decoder/ixheaacd_esbr_envcal.c b/decoder/ixheaacd_esbr_envcal.c index 7b9c2c2..ee9efc6 100644 --- a/decoder/ixheaacd_esbr_envcal.c +++ b/decoder/ixheaacd_esbr_envcal.c @@ -21,9 +21,9 @@ #include #include -#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) diff --git a/decoder/ixheaacd_esbr_polyphase.c b/decoder/ixheaacd_esbr_polyphase.c index 8a37ca7..767ce3a 100644 --- a/decoder/ixheaacd_esbr_polyphase.c +++ b/decoder/ixheaacd_esbr_polyphase.c @@ -18,14 +18,14 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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]; diff --git a/decoder/ixheaacd_esbr_rom.h b/decoder/ixheaacd_esbr_rom.h deleted file mode 100644 index 6f15971..0000000 --- a/decoder/ixheaacd_esbr_rom.h +++ /dev/null @@ -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 diff --git a/decoder/ixheaacd_ext_ch_ele.c b/decoder/ixheaacd_ext_ch_ele.c index aa70291..ce4b8c2 100644 --- a/decoder/ixheaacd_ext_ch_ele.c +++ b/decoder/ixheaacd_ext_ch_ele.c @@ -22,7 +22,7 @@ #include #include -#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]; diff --git a/decoder/ixheaacd_fft.c b/decoder/ixheaacd_fft.c index ecb88c1..8827001 100644 --- a/decoder/ixheaacd_fft.c +++ b/decoder/ixheaacd_fft.c @@ -20,11 +20,11 @@ #include #include -#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; diff --git a/decoder/ixheaacd_fft_ifft_32x32.c b/decoder/ixheaacd_fft_ifft_32x32.c index 33376b1..18ca490 100644 --- a/decoder/ixheaacd_fft_ifft_32x32.c +++ b/decoder/ixheaacd_fft_ifft_32x32.c @@ -19,10 +19,10 @@ */ #include #include -#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]; diff --git a/decoder/ixheaacd_freq_sca.c b/decoder/ixheaacd_freq_sca.c index 57dc68d..c59663c 100644 --- a/decoder/ixheaacd_freq_sca.c +++ b/decoder/ixheaacd_freq_sca.c @@ -22,15 +22,15 @@ #include #include #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; } diff --git a/decoder/ixheaacd_function_selector.h b/decoder/ixheaacd_function_selector.h index b83216a..362b570 100644 --- a/decoder/ixheaacd_function_selector.h +++ b/decoder/ixheaacd_function_selector.h @@ -23,9 +23,9 @@ #include #include #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" diff --git a/decoder/ixheaacd_fwd_alias_cnx.c b/decoder/ixheaacd_fwd_alias_cnx.c index f7d8f6c..225f3e0 100644 --- a/decoder/ixheaacd_fwd_alias_cnx.c +++ b/decoder/ixheaacd_fwd_alias_cnx.c @@ -21,7 +21,7 @@ #include #include -#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); } diff --git a/decoder/ixheaacd_hbe_dft_trans.c b/decoder/ixheaacd_hbe_dft_trans.c index 4ce6800..3999dd4 100644 --- a/decoder/ixheaacd_hbe_dft_trans.c +++ b/decoder/ixheaacd_hbe_dft_trans.c @@ -21,7 +21,7 @@ #include #include -#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: diff --git a/decoder/ixheaacd_hbe_trans.c b/decoder/ixheaacd_hbe_trans.c index 179349d..81a3850 100644 --- a/decoder/ixheaacd_hbe_trans.c +++ b/decoder/ixheaacd_hbe_trans.c @@ -21,7 +21,7 @@ #include #include -#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, diff --git a/decoder/ixheaacd_headerdecode.c b/decoder/ixheaacd_headerdecode.c index 4e07b8d..41c4594 100644 --- a/decoder/ixheaacd_headerdecode.c +++ b/decoder/ixheaacd_headerdecode.c @@ -18,12 +18,12 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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; diff --git a/decoder/ixheaacd_huff_code_reorder.c b/decoder/ixheaacd_huff_code_reorder.c index 08b2318..a9d6ffd 100644 --- a/decoder/ixheaacd_huff_code_reorder.c +++ b/decoder/ixheaacd_huff_code_reorder.c @@ -19,13 +19,13 @@ */ #include #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 { diff --git a/decoder/ixheaacd_huff_tools.c b/decoder/ixheaacd_huff_tools.c index e57bf34..31d61de 100644 --- a/decoder/ixheaacd_huff_tools.c +++ b/decoder/ixheaacd_huff_tools.c @@ -20,7 +20,7 @@ #include #include -#include "ixheaacd_type_def.h" +#include "ixheaac_type_def.h" #include "ixheaacd_interface.h" #include "ixheaacd_bitbuffer.h" diff --git a/decoder/ixheaacd_hufftables.c b/decoder/ixheaacd_hufftables.c index 6cf9e1e..1b974d7 100644 --- a/decoder/ixheaacd_hufftables.c +++ b/decoder/ixheaacd_hufftables.c @@ -19,7 +19,7 @@ */ #include -#include "ixheaacd_type_def.h" +#include "ixheaac_type_def.h" #include "ixheaacd_interface.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_info.h" diff --git a/decoder/ixheaacd_hybrid.c b/decoder/ixheaacd_hybrid.c index 49e846a..7c2f10d 100644 --- a/decoder/ixheaacd_hybrid.c +++ b/decoder/ixheaacd_hybrid.c @@ -19,15 +19,15 @@ */ #include #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; diff --git a/decoder/ixheaacd_imdct.c b/decoder/ixheaacd_imdct.c index 512cbc3..c8d17de 100644 --- a/decoder/ixheaacd_imdct.c +++ b/decoder/ixheaacd_imdct.c @@ -22,7 +22,7 @@ #include #include -#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, diff --git a/decoder/ixheaacd_init_config.c b/decoder/ixheaacd_init_config.c index 4285fab..d5373a8 100644 --- a/decoder/ixheaacd_init_config.c +++ b/decoder/ixheaacd_init_config.c @@ -22,8 +22,8 @@ #include #include -#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" diff --git a/decoder/ixheaacd_initfuncs.c b/decoder/ixheaacd_initfuncs.c index e1a0498..a96fb96 100644 --- a/decoder/ixheaacd_initfuncs.c +++ b/decoder/ixheaacd_initfuncs.c @@ -18,18 +18,18 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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" diff --git a/decoder/ixheaacd_latmdemux.c b/decoder/ixheaacd_latmdemux.c index 590d671..49f7d23 100644 --- a/decoder/ixheaacd_latmdemux.c +++ b/decoder/ixheaacd_latmdemux.c @@ -19,15 +19,15 @@ */ #include #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)); } diff --git a/decoder/ixheaacd_ld_mps_config.c b/decoder/ixheaacd_ld_mps_config.c index b378748..1da3472 100644 --- a/decoder/ixheaacd_ld_mps_config.c +++ b/decoder/ixheaacd_ld_mps_config.c @@ -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" diff --git a/decoder/ixheaacd_ld_mps_dec.c b/decoder/ixheaacd_ld_mps_dec.c index b12d1f8..48b1074 100644 --- a/decoder/ixheaacd_ld_mps_dec.c +++ b/decoder/ixheaacd_ld_mps_dec.c @@ -23,18 +23,18 @@ #include #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" diff --git a/decoder/ixheaacd_longblock.c b/decoder/ixheaacd_longblock.c index 0938389..6704e41 100644 --- a/decoder/ixheaacd_longblock.c +++ b/decoder/ixheaacd_longblock.c @@ -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 - diff --git a/decoder/ixheaacd_lpc.c b/decoder/ixheaacd_lpc.c index 3f76fd7..9e6c6c9 100644 --- a/decoder/ixheaacd_lpc.c +++ b/decoder/ixheaacd_lpc.c @@ -24,7 +24,7 @@ #include #include -#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 diff --git a/decoder/ixheaacd_lpc_dec.c b/decoder/ixheaacd_lpc_dec.c index 2794776..c43cef5 100644 --- a/decoder/ixheaacd_lpc_dec.c +++ b/decoder/ixheaacd_lpc_dec.c @@ -18,7 +18,7 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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 diff --git a/decoder/ixheaacd_lpfuncs.c b/decoder/ixheaacd_lpfuncs.c index a86c94d..b8a72a9 100644 --- a/decoder/ixheaacd_lpfuncs.c +++ b/decoder/ixheaacd_lpfuncs.c @@ -19,16 +19,16 @@ */ #include #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); } } } diff --git a/decoder/ixheaacd_lpp_tran.c b/decoder/ixheaacd_lpp_tran.c index 395206a..7917fcf 100644 --- a/decoder/ixheaacd_lpp_tran.c +++ b/decoder/ixheaacd_lpp_tran.c @@ -20,15 +20,15 @@ #include #include #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, diff --git a/decoder/ixheaacd_lt_predict.c b/decoder/ixheaacd_lt_predict.c index 0838741..6648d7b 100644 --- a/decoder/ixheaacd_lt_predict.c +++ b/decoder/ixheaacd_lt_predict.c @@ -22,11 +22,11 @@ #include #include -#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> 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> 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> 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> 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> 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> 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> 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> 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> 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)); } diff --git a/decoder/ixheaacd_mps_apply_common.c b/decoder/ixheaacd_mps_apply_common.c index 130e7c7..e440011 100644 --- a/decoder/ixheaacd_mps_apply_common.c +++ b/decoder/ixheaacd_mps_apply_common.c @@ -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" diff --git a/decoder/ixheaacd_mps_apply_m1.c b/decoder/ixheaacd_mps_apply_m1.c index e4d5e0d..c0bdfb1 100644 --- a/decoder/ixheaacd_mps_apply_m1.c +++ b/decoder/ixheaacd_mps_apply_m1.c @@ -18,13 +18,13 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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" diff --git a/decoder/ixheaacd_mps_apply_m2.c b/decoder/ixheaacd_mps_apply_m2.c index 6c989c3..ce109ba 100644 --- a/decoder/ixheaacd_mps_apply_m2.c +++ b/decoder/ixheaacd_mps_apply_m2.c @@ -18,13 +18,13 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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" diff --git a/decoder/ixheaacd_mps_basic_op.h b/decoder/ixheaacd_mps_basic_op.h index 65987b0..623e8b9 100644 --- a/decoder/ixheaacd_mps_basic_op.h +++ b/decoder/ixheaacd_mps_basic_op.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); diff --git a/decoder/ixheaacd_mps_bitdec.c b/decoder/ixheaacd_mps_bitdec.c index ed2b045..995728e 100644 --- a/decoder/ixheaacd_mps_bitdec.c +++ b/decoder/ixheaacd_mps_bitdec.c @@ -18,14 +18,14 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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, diff --git a/decoder/ixheaacd_mps_blind.c b/decoder/ixheaacd_mps_blind.c index 3aff243..ab4860a 100644 --- a/decoder/ixheaacd_mps_blind.c +++ b/decoder/ixheaacd_mps_blind.c @@ -18,14 +18,14 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#include "ixheaacd_type_def.h" +#include "ixheaac_type_def.h" #include "ixheaacd_mps_struct_def.h" #include "ixheaacd_error_codes.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 @@ #include "ixheaacd_sbr_rom.h" #include "ixheaacd_hybrid.h" #include "ixheaacd_ps_dec.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" #include "ixheaacd_mps_polyphase.h" #include "ixheaacd_config.h" #include "ixheaacd_qmf_dec.h" @@ -156,7 +156,7 @@ static VOID ixheaacd_signal_2_parameters(ia_heaac_mps_state_struct *pstr_mps_sta if (abs(cld) > THIRTY_IN_Q16) cld_delta = THIRTY_IN_Q16; else - cld_delta = ixheaacd_abs32(cld); + cld_delta = ixheaac_abs32(cld); q_icc_delta = q_icc; icc_delta = ixheaacd_mps_add32(icc, ONE_IN_Q15, &q_icc_delta, 15); diff --git a/decoder/ixheaacd_mps_calc_m1m2_common.c b/decoder/ixheaacd_mps_calc_m1m2_common.c index a1532d8..0199af4 100644 --- a/decoder/ixheaacd_mps_calc_m1m2_common.c +++ b/decoder/ixheaacd_mps_calc_m1m2_common.c @@ -17,13 +17,13 @@ ***************************************************************************** * 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 "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" @@ -32,7 +32,7 @@ #include "ixheaacd_sbr_rom.h" #include "ixheaacd_hybrid.h" #include "ixheaacd_ps_dec.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" #include "ixheaacd_mps_polyphase.h" #include "ixheaacd_config.h" #include "ixheaacd_qmf_dec.h" @@ -540,12 +540,12 @@ VOID ixheaacd_calculate_ttt(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps m_ttt[2][1] = ixheaacd_mps_mult32_shr_15(m_ttt[2][1], one_by_icc); } - m_ttt[0][0] = ixheaacd_mult32x16in32(m_ttt[0][0], TWO_BY_THREE_Q15); - m_ttt[0][1] = ixheaacd_mult32x16in32(m_ttt[0][1], TWO_BY_THREE_Q15); - m_ttt[1][0] = ixheaacd_mult32x16in32(m_ttt[1][0], TWO_BY_THREE_Q15); - m_ttt[1][1] = ixheaacd_mult32x16in32(m_ttt[1][1], TWO_BY_THREE_Q15); - m_ttt[2][0] = ixheaacd_mult32x16in32(m_ttt[2][0], TWO_BY_THREE_Q15); - m_ttt[2][1] = ixheaacd_mult32x16in32(m_ttt[2][1], TWO_BY_THREE_Q15); + m_ttt[0][0] = ixheaac_mult32x16in32(m_ttt[0][0], TWO_BY_THREE_Q15); + m_ttt[0][1] = ixheaac_mult32x16in32(m_ttt[0][1], TWO_BY_THREE_Q15); + m_ttt[1][0] = ixheaac_mult32x16in32(m_ttt[1][0], TWO_BY_THREE_Q15); + m_ttt[1][1] = ixheaac_mult32x16in32(m_ttt[1][1], TWO_BY_THREE_Q15); + m_ttt[2][0] = ixheaac_mult32x16in32(m_ttt[2][0], TWO_BY_THREE_Q15); + m_ttt[2][1] = ixheaac_mult32x16in32(m_ttt[2][1], TWO_BY_THREE_Q15); } else { WORD32 center_wiener; WORD32 center_subtraction; @@ -617,17 +617,17 @@ VOID ixheaacd_calculate_ttt(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab; prod = ixheaacd_mps_mult32_shr_15(c1d, c2d); - temporary = ixheaacd_add32_sat(ONE_IN_Q15, c2d); - temporary = ixheaacd_add32_sat(temporary, (WORD32)prod); + temporary = ixheaac_add32_sat(ONE_IN_Q15, c2d); + temporary = ixheaac_add32_sat(temporary, (WORD32)prod); w00 = ixheaacd_mps_div_32((WORD32)prod, temporary, &q_w00); - w11 = ixheaacd_mps_div_32(c1d, (ixheaacd_add32_sat3(c1d, c2d, ONE_IN_Q15)), &q_w11); + w11 = ixheaacd_mps_div_32(c1d, (ixheaac_add32_sat3(c1d, c2d, ONE_IN_Q15)), &q_w11); - w20 = ixheaacd_mps_div_32((ixheaacd_add32_sat(c2d, ONE_IN_Q15)), - ixheaacd_add32_sat3(ONE_IN_Q15, (WORD32)prod, c2d), &q_w20); + w20 = ixheaacd_mps_div_32((ixheaac_add32_sat(c2d, ONE_IN_Q15)), + ixheaac_add32_sat3(ONE_IN_Q15, (WORD32)prod, c2d), &q_w20); - w21 = ixheaacd_mps_div_32(ixheaacd_add32_sat(c2d, ONE_IN_Q15), - (ixheaacd_add32_sat3(c1d, c2d, ONE_IN_Q15)), &q_w21); + w21 = ixheaacd_mps_div_32(ixheaac_add32_sat(c2d, ONE_IN_Q15), + (ixheaac_add32_sat3(c1d, c2d, ONE_IN_Q15)), &q_w21); m_ttt[0][0] = ixheaacd_mps_sqrt(w00, &q_w00, sqrt_tab); m_ttt[0][0] = ixheaacd_mps_convert_to_qn(m_ttt[0][0], q_w00, 15); @@ -723,8 +723,8 @@ VOID ixheaacd_calculate_ttt(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps WORD32 l; const WORD32 *sqrt_tab = pstr_mps_state->ia_mps_dec_mps_table.common_table_ptr->sqrt_tab; - c = ixheaacd_mps_div_32(ONE_IN_Q15, (ixheaacd_add32_sat(c1d, ONE_IN_Q15)), &q_c); - r = ixheaacd_mps_div_32(c1d, (ixheaacd_add32_sat(c2d, ONE_IN_Q15)), &q_r); + c = ixheaacd_mps_div_32(ONE_IN_Q15, (ixheaac_add32_sat(c1d, ONE_IN_Q15)), &q_c); + r = ixheaacd_mps_div_32(c1d, (ixheaac_add32_sat(c2d, ONE_IN_Q15)), &q_r); r = ixheaacd_mps_mult32_shr_30(r, c); q_r = q_r + q_c - 30; @@ -741,7 +741,7 @@ VOID ixheaacd_calculate_ttt(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps temp += ((1 << q_temp) - 1); - temp = ixheaacd_add32_sat( + temp = ixheaac_add32_sat( ixheaacd_mps_mult32_shr_n(c, temp, (WORD16)(q_c + q_temp - q_r)), r); q_temp = q_r; @@ -753,15 +753,15 @@ VOID ixheaacd_calculate_ttt(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps q_temp1 = q_c; } - temp = ixheaacd_div32(temp_1, temp, &q_a); + temp = ixheaac_div32(temp_1, temp, &q_a); q_wl1 = q_a + q_temp1 - q_temp; wl1 = ixheaacd_mps_sqrt(temp, &q_wl1, sqrt_tab); m_ttt[0][0] = ixheaacd_mps_convert_to_qn(wl1, q_wl1, 15); - temp = ixheaacd_div32(wl1, temp_1, &q_a); + temp = ixheaac_div32(wl1, temp_1, &q_a); q_temp = q_a + (q_wl1 - q_temp1); wl2 = ixheaacd_mps_mult32_shr_n(c, temp, (WORD16)(q_c + q_temp - 15)); - m_ttt[0][1] = ixheaacd_negate32_sat(wl2); + m_ttt[0][1] = ixheaac_negate32_sat(wl2); temp = ixheaacd_mps_div_32(l, r, &q_temp); q_temp += (q_l - q_r); @@ -771,9 +771,9 @@ VOID ixheaacd_calculate_ttt(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps q_temp = 28; } - temp = ixheaacd_add32_sat((1 << q_temp) - 1, temp); + temp = ixheaac_add32_sat((1 << q_temp) - 1, temp); - temp = ixheaacd_add32_sat( + temp = ixheaac_add32_sat( ixheaacd_mps_mult32_shr_n(c, temp, (WORD16)(q_c + q_temp - q_l)), l); q_temp = q_l; @@ -786,15 +786,15 @@ VOID ixheaacd_calculate_ttt(ia_heaac_mps_state_struct *pstr_mps_state, WORD32 ps q_temp1 = q_c; } - temp = ixheaacd_div32(temp_1, temp, &q_a); + temp = ixheaac_div32(temp_1, temp, &q_a); q_wr1 = q_a + q_temp1 - q_temp; wr1 = ixheaacd_mps_sqrt(temp, &q_wr1, sqrt_tab); m_ttt[1][1] = ixheaacd_mps_convert_to_qn(wr1, q_wr1, 15); - temp = ixheaacd_div32(wr1, temp_1, &q_a); + temp = ixheaac_div32(wr1, temp_1, &q_a); q_temp = q_a + (q_wl1 - q_temp1); wr2 = ixheaacd_mps_mult32_shr_n(c, temp, (WORD16)(q_c + q_temp - 15)); - m_ttt[1][0] = ixheaacd_negate32_sat(wr2); + m_ttt[1][0] = ixheaac_negate32_sat(wr2); } } } diff --git a/decoder/ixheaacd_mps_calc_m1m2_emm.c b/decoder/ixheaacd_mps_calc_m1m2_emm.c index 276c149..fa8b0de 100644 --- a/decoder/ixheaacd_mps_calc_m1m2_emm.c +++ b/decoder/ixheaacd_mps_calc_m1m2_emm.c @@ -17,14 +17,14 @@ ***************************************************************************** * 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_sbr_common.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" @@ -33,7 +33,7 @@ #include "ixheaacd_sbr_rom.h" #include "ixheaacd_hybrid.h" #include "ixheaacd_ps_dec.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" #include "ixheaacd_mps_polyphase.h" #include "ixheaacd_config.h" #include "ixheaacd_qmf_dec.h" diff --git a/decoder/ixheaacd_mps_calc_m1m2_tree_515x.c b/decoder/ixheaacd_mps_calc_m1m2_tree_515x.c index 23875be..8144951 100644 --- a/decoder/ixheaacd_mps_calc_m1m2_tree_515x.c +++ b/decoder/ixheaacd_mps_calc_m1m2_tree_515x.c @@ -17,14 +17,14 @@ ***************************************************************************** * 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 "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_common_rom.h" #include "ixheaacd_sbrdecsettings.h" @@ -33,7 +33,7 @@ #include "ixheaacd_sbr_rom.h" #include "ixheaacd_hybrid.h" #include "ixheaacd_ps_dec.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" #include "ixheaacd_mps_polyphase.h" #include "ixheaacd_config.h" #include "ixheaacd_qmf_dec.h" @@ -136,7 +136,7 @@ VOID ixheaacd_calc_m1m2_5151(ia_heaac_mps_state_struct *pstr_mps_state) { m1_param->m1_param_real[0][0][ps][pb] = ONE_IN_Q15; m1_param->m1_param_real[1][0][ps][pb] = ONE_IN_Q15; m1_param->m1_param_real[2][0][ps][pb] = c_l_fs[pb]; - m1_param->m1_param_real[3][0][ps][pb] = ixheaacd_mult16_shl(c_l_fs[pb], c_l_c[pb]); + m1_param->m1_param_real[3][0][ps][pb] = ixheaac_mult16_shl(c_l_fs[pb], c_l_c[pb]); m1_param->m1_param_real[4][0][ps][pb] = c_r_fs[pb]; } @@ -339,8 +339,8 @@ VOID ixheaacd_calc_m1m2_5152(ia_heaac_mps_state_struct *pstr_mps_state) { m1_param->m1_param_real[0][0][ps][pb] = ONE_IN_Q15; m1_param->m1_param_real[1][0][ps][pb] = ONE_IN_Q15; m1_param->m1_param_real[2][0][ps][pb] = c_l_c[pb]; - m1_param->m1_param_real[3][0][ps][pb] = ixheaacd_mult16_shl(c_l_c[pb], c_l_lr[pb]); - m1_param->m1_param_real[4][0][ps][pb] = ixheaacd_mult16_shl(c_l_c[pb], c_r_lr[pb]); + m1_param->m1_param_real[3][0][ps][pb] = ixheaac_mult16_shl(c_l_c[pb], c_l_lr[pb]); + m1_param->m1_param_real[4][0][ps][pb] = ixheaac_mult16_shl(c_l_c[pb], c_r_lr[pb]); } for (pb = 0; pb < num_parameter_bands; pb++) { diff --git a/decoder/ixheaacd_mps_calc_m1m2_tree_51sx.c b/decoder/ixheaacd_mps_calc_m1m2_tree_51sx.c index 481eb9a..a2a7d58 100644 --- a/decoder/ixheaacd_mps_calc_m1m2_tree_51sx.c +++ b/decoder/ixheaacd_mps_calc_m1m2_tree_51sx.c @@ -18,13 +18,13 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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" @@ -33,7 +33,7 @@ #include "ixheaacd_sbr_rom.h" #include "ixheaacd_hybrid.h" #include "ixheaacd_ps_dec.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" #include "ixheaacd_mps_polyphase.h" #include "ixheaacd_config.h" #include "ixheaacd_qmf_dec.h" @@ -130,8 +130,8 @@ VOID ixheaacd_calc_m1m2_51s1(ia_heaac_mps_state_struct *pstr_mps_state) { temp_2 = ixheaacd_mps_mult32_shr_15(left_f, right_f); temp_2 = ixheaacd_mps_mult32_shr_15(temp_2, p_aux_struct->ott_icc[3][ps][pb]); - temp_1 = ixheaacd_add32_sat(temp_1, temp_2); - cross = ixheaacd_add32_sat(center, temp_1); + temp_1 = ixheaac_add32_sat(temp_1, temp_2); + cross = ixheaac_add32_sat(center, temp_1); temp_1 = ixheaacd_mps_div32_in_q15(left, right); qtemp1 = 15; @@ -243,30 +243,30 @@ VOID ixheaacd_calc_m1m2_51s2(ia_heaac_mps_state_struct *pstr_mps_state) { temp_1 = ixheaacd_mps_convert_to_qn(temp_1, qtemp1, 15); cross = ixheaacd_mps_mult32_shr_15(temp_1, p_aux_struct->ott_icc[1][ps][pb]); - temp_1 = ixheaacd_add32_sat((left + right), cross); + temp_1 = ixheaac_add32_sat((left + right), cross); temp_1 = ixheaacd_mps_mult32_shr_15(temp_1, center); qtemp1 = 15; temp_1 = ixheaacd_mps_sqrt(temp_1, &qtemp1, sqrt_tab); temp_1 = ixheaacd_mps_convert_to_qn(temp_1, qtemp1, 15); temp_1 = ixheaacd_mps_mult32_shr_15(temp_1, p_aux_struct->ott_icc[0][ps][pb]); - temp_1 = ixheaacd_add32_sat(temp_1, center); - cross = ixheaacd_add32_sat(cross, temp_1); + temp_1 = ixheaac_add32_sat(temp_1, center); + cross = ixheaac_add32_sat(cross, temp_1); temp_1 = ixheaacd_mps_mult32_shr_15(left, center); qtemp1 = 15; temp_1 = ixheaacd_mps_sqrt(temp_1, &qtemp1, sqrt_tab); temp_1 = ixheaacd_mps_convert_to_qn(2 * temp_1, qtemp1, 15); temp_1 = ixheaacd_mps_mult32_shr_15(temp_1, p_aux_struct->ott_icc[0][ps][pb]); - temp_1 = ixheaacd_add32_sat(temp_1, center); - left = ixheaacd_add32_sat(left, temp_1); + temp_1 = ixheaac_add32_sat(temp_1, center); + left = ixheaac_add32_sat(left, temp_1); temp_1 = ixheaacd_mps_mult32_shr_15(right, center); qtemp1 = 15; temp_1 = ixheaacd_mps_sqrt(temp_1, &qtemp1, sqrt_tab); temp_1 = ixheaacd_mps_convert_to_qn(2 * temp_1, qtemp1, 15); temp_1 = ixheaacd_mps_mult32_shr_15(temp_1, p_aux_struct->ott_icc[0][ps][pb]); - temp_1 = ixheaacd_add32_sat(temp_1, center); - right = ixheaacd_add32_sat(right, temp_1); + temp_1 = ixheaac_add32_sat(temp_1, center); + right = ixheaac_add32_sat(right, temp_1); temp_1 = ixheaacd_mps_div32_in_q15(left, right); qtemp1 = 15; @@ -282,7 +282,7 @@ VOID ixheaacd_calc_m1m2_51s2(ia_heaac_mps_state_struct *pstr_mps_state) { icc[pb] = ixheaacd_mps_div32_in_q15(cross, temp_1); - temp_1 = ixheaacd_add32_sat(left, right); + temp_1 = ixheaac_add32_sat(left, right); qtemp1 = 15; temp_1 = ixheaacd_mps_sqrt(temp_1, &qtemp1, sqrt_tab); g_s[pb] = ixheaacd_mps_convert_to_qn(temp_1, qtemp1, 15); diff --git a/decoder/ixheaacd_mps_calc_m1m2_tree_52xx.c b/decoder/ixheaacd_mps_calc_m1m2_tree_52xx.c index e9579c2..90341e3 100644 --- a/decoder/ixheaacd_mps_calc_m1m2_tree_52xx.c +++ b/decoder/ixheaacd_mps_calc_m1m2_tree_52xx.c @@ -18,13 +18,13 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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" @@ -33,7 +33,7 @@ #include "ixheaacd_sbr_rom.h" #include "ixheaacd_hybrid.h" #include "ixheaacd_ps_dec.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" #include "ixheaacd_mps_polyphase.h" #include "ixheaacd_config.h" #include "ixheaacd_qmf_dec.h" diff --git a/decoder/ixheaacd_mps_calc_m1m2_tree_727x.c b/decoder/ixheaacd_mps_calc_m1m2_tree_727x.c index 77072cf..cb35749 100644 --- a/decoder/ixheaacd_mps_calc_m1m2_tree_727x.c +++ b/decoder/ixheaacd_mps_calc_m1m2_tree_727x.c @@ -18,13 +18,13 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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" @@ -33,7 +33,7 @@ #include "ixheaacd_sbr_rom.h" #include "ixheaacd_hybrid.h" #include "ixheaacd_ps_dec.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" #include "ixheaacd_mps_polyphase.h" #include "ixheaacd_config.h" #include "ixheaacd_qmf_dec.h" diff --git a/decoder/ixheaacd_mps_calc_m1m2_tree_757x.c b/decoder/ixheaacd_mps_calc_m1m2_tree_757x.c index b118bf7..70de156 100644 --- a/decoder/ixheaacd_mps_calc_m1m2_tree_757x.c +++ b/decoder/ixheaacd_mps_calc_m1m2_tree_757x.c @@ -18,13 +18,13 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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" @@ -33,7 +33,7 @@ #include "ixheaacd_sbr_rom.h" #include "ixheaacd_hybrid.h" #include "ixheaacd_ps_dec.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" #include "ixheaacd_mps_polyphase.h" #include "ixheaacd_config.h" #include "ixheaacd_qmf_dec.h" diff --git a/decoder/ixheaacd_mps_dec.c b/decoder/ixheaacd_mps_dec.c index 715cd4c..33f48dc 100644 --- a/decoder/ixheaacd_mps_dec.c +++ b/decoder/ixheaacd_mps_dec.c @@ -19,13 +19,13 @@ */ #include #include -#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_bitbuffer.h" #include "ixheaacd_defines.h" -#include "ixheaacd_sbr_const.h" +#include "ixheaac_sbr_const.h" #include "ixheaacd_memory_standards.h" #include "ixheaacd_sbrdecsettings.h" #include "ixheaacd_env_extr_part.h" diff --git a/decoder/ixheaacd_mps_decorr.c b/decoder/ixheaacd_mps_decorr.c index fc53039..00a0271 100644 --- a/decoder/ixheaacd_mps_decorr.c +++ b/decoder/ixheaacd_mps_decorr.c @@ -19,7 +19,7 @@ */ #include #include -#include "ixheaacd_type_def.h" +#include "ixheaac_type_def.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_common_rom.h" #include "ixheaacd_sbrdecsettings.h" @@ -35,13 +35,13 @@ #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_mps_decor.h" #include "ixheaacd_mps_hybfilter.h" -#include "ixheaacd_error_standards.h" -#include "ixheaacd_basic_ops32.h" -#include "ixheaacd_basic_ops40.h" +#include "ixheaac_error_standards.h" +#include "ixheaac_basic_ops32.h" +#include "ixheaac_basic_ops40.h" #include "ixheaacd_mps_macro_def.h" #include "ixheaacd_mps_basic_op.h" @@ -412,12 +412,12 @@ static VOID ixheaacd_convert_lattice_coefs_complex(WORD32 const order, temp = (WORD64)((WORD64)rfc_real[i] * (WORD64)tmp_real[i - j - 1] + (WORD64)rfc_imag[i] * (WORD64)tmp_imag[i - j - 1]); temp >>= 15; - apar_real[j + 1] = ixheaacd_add32(tmp_real[j], (WORD32)temp); + apar_real[j + 1] = ixheaac_add32(tmp_real[j], (WORD32)temp); temp = (WORD64)((WORD64)rfc_real[i] * (WORD64)tmp_imag[i - j - 1] + (WORD64)rfc_imag[i] * (WORD64)tmp_real[i - j - 1]); temp >>= 15; - apar_imag[j + 1] = ixheaacd_sub32(tmp_imag[j], (WORD32)temp); + apar_imag[j + 1] = ixheaac_sub32(tmp_imag[j], (WORD32)temp); } for (j = 0; j <= i; j++) { tmp_real[j] = apar_real[j + 1]; diff --git a/decoder/ixheaacd_mps_get_index.c b/decoder/ixheaacd_mps_get_index.c index 4a9b079..088b8a4 100644 --- a/decoder/ixheaacd_mps_get_index.c +++ b/decoder/ixheaacd_mps_get_index.c @@ -17,12 +17,12 @@ ***************************************************************************** * 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_error_codes.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" @@ -32,7 +32,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" diff --git a/decoder/ixheaacd_mps_hybrid_filt.c b/decoder/ixheaacd_mps_hybrid_filt.c index 35d7995..023468c 100644 --- a/decoder/ixheaacd_mps_hybrid_filt.c +++ b/decoder/ixheaacd_mps_hybrid_filt.c @@ -18,7 +18,7 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#include "ixheaacd_type_def.h" +#include "ixheaac_type_def.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_common_rom.h" #include "ixheaacd_sbrdecsettings.h" @@ -30,13 +30,13 @@ #include "ixheaacd_config.h" #include "ixheaacd_qmf_dec.h" #include "ixheaacd_mps_polyphase.h" -#include "ixheaacd_constants.h" +#include "ixheaac_constants.h" #include "ixheaacd_mps_struct_def.h" #include "ixheaacd_mps_res_rom.h" #include "ixheaacd_mps_aac_struct.h" #include "ixheaacd_mps_dec.h" -#include "ixheaacd_basic_ops32.h" -#include "ixheaacd_basic_ops40.h" +#include "ixheaac_basic_ops32.h" +#include "ixheaac_basic_ops40.h" #include "ixheaacd_mps_macro_def.h" #include "ixheaacd_mps_basic_op.h" @@ -426,7 +426,7 @@ VOID ixheaacd_mps_fft(complex *out, LOOPINDEX idx, WORD32 nob, increment += 1; index = 11 - increment; - tab_modifier = ixheaacd_shl32(1, index); + tab_modifier = ixheaac_shl32(1, index); out1_w32 = (WORD32 *)&out[index_1]; out2_w32 = (WORD32 *)&out[index_1 + 1]; @@ -453,7 +453,7 @@ VOID ixheaacd_mps_fft(complex *out, LOOPINDEX idx, WORD32 nob, increment += 1; index = 11 - increment; - tab_modifier = ixheaacd_shl32(1, index); + tab_modifier = ixheaac_shl32(1, index); for (block_per_stage = 0; block_per_stage < len; block_per_stage++) { index_2 = index_1 + i; @@ -496,7 +496,7 @@ VOID ixheaacd_mps_fft(complex *out, LOOPINDEX idx, WORD32 nob, index1 += tab_modifier; } - index_1 += ixheaacd_shl32(1, increment); + index_1 += ixheaac_shl32(1, increment); } i <<= 1; } @@ -513,70 +513,70 @@ VOID ixheaacd_8ch_filtering(const WORD32 *p_qmf_real, const WORD32 *p_qmf_imag, WORD32 *p_complex; const WORD16 *p8_13 = hyb_tab->p8_13; - real = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_real[4], p8_13[4]) + - ixheaacd_mult32x16in32(p_qmf_real[12], p8_13[12])), + real = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_real[4], p8_13[4]) + + ixheaac_mult32x16in32(p_qmf_real[12], p8_13[12])), 1); - imag = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_imag[4], p8_13[4]) + - ixheaacd_mult32x16in32(p_qmf_imag[12], p8_13[12])), + imag = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_imag[4], p8_13[4]) + + ixheaac_mult32x16in32(p_qmf_imag[12], p8_13[12])), 1); cum[5] = imag - real; cum[4] = -(imag + real); - real = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_real[3], p8_13[3]) + - ixheaacd_mult32x16in32(p_qmf_real[11], p8_13[11])), + real = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_real[3], p8_13[3]) + + ixheaac_mult32x16in32(p_qmf_real[11], p8_13[11])), 1); - imag = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_imag[3], p8_13[3]) + - ixheaacd_mult32x16in32(p_qmf_imag[11], p8_13[11])), + imag = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_imag[3], p8_13[3]) + + ixheaac_mult32x16in32(p_qmf_imag[11], p8_13[11])), 1); - cum[13] = ixheaacd_shl32( - (ixheaacd_mult32x16in32(imag, tcos) - ixheaacd_mult32x16in32(real, tsin)), 1); - cum[12] = ixheaacd_shl32( - -((ixheaacd_mult32x16in32(imag, tsin) + ixheaacd_mult32x16in32(real, tcos))), 1); + cum[13] = ixheaac_shl32( + (ixheaac_mult32x16in32(imag, tcos) - ixheaac_mult32x16in32(real, tsin)), 1); + cum[12] = ixheaac_shl32( + -((ixheaac_mult32x16in32(imag, tsin) + ixheaac_mult32x16in32(real, tcos))), 1); - cum[2] = ixheaacd_shl32(ixheaacd_mult32x16in32((p_qmf_real[2] - p_qmf_real[10]), p8_13[10]), 1); - cum[3] = ixheaacd_shl32(ixheaacd_mult32x16in32((p_qmf_imag[2] - p_qmf_imag[10]), p8_13[2]), 1); + cum[2] = ixheaac_shl32(ixheaac_mult32x16in32((p_qmf_real[2] - p_qmf_real[10]), p8_13[10]), 1); + cum[3] = ixheaac_shl32(ixheaac_mult32x16in32((p_qmf_imag[2] - p_qmf_imag[10]), p8_13[2]), 1); - real = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_real[1], p8_13[1]) + - ixheaacd_mult32x16in32(p_qmf_real[9], p8_13[9])), + real = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_real[1], p8_13[1]) + + ixheaac_mult32x16in32(p_qmf_real[9], p8_13[9])), 1); - imag = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_imag[1], p8_13[1]) + - ixheaacd_mult32x16in32(p_qmf_imag[9], p8_13[9])), + imag = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_imag[1], p8_13[1]) + + ixheaac_mult32x16in32(p_qmf_imag[9], p8_13[9])), 1); - cum[11] = ixheaacd_shl32( - (ixheaacd_mult32x16in32(imag, tcos) + ixheaacd_mult32x16in32(real, tsin)), 1); - cum[10] = ixheaacd_shl32( - (ixheaacd_mult32x16in32(imag, tsin) - ixheaacd_mult32x16in32(real, tcos)), 1); + cum[11] = ixheaac_shl32( + (ixheaac_mult32x16in32(imag, tcos) + ixheaac_mult32x16in32(real, tsin)), 1); + cum[10] = ixheaac_shl32( + (ixheaac_mult32x16in32(imag, tsin) - ixheaac_mult32x16in32(real, tcos)), 1); - real = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_real[0], p8_13[0]) + - ixheaacd_mult32x16in32(p_qmf_real[8], p8_13[8])), + real = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_real[0], p8_13[0]) + + ixheaac_mult32x16in32(p_qmf_real[8], p8_13[8])), 1); - imag = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_imag[0], p8_13[0]) + - ixheaacd_mult32x16in32(p_qmf_imag[8], p8_13[8])), + imag = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_imag[0], p8_13[0]) + + ixheaac_mult32x16in32(p_qmf_imag[8], p8_13[8])), 1); cum[7] = imag + real; cum[6] = imag - real; - cum[15] = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_imag[7], p8_13[14]) + - ixheaacd_mult32x16in32(p_qmf_real[7], p8_13[13])), + cum[15] = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_imag[7], p8_13[14]) + + ixheaac_mult32x16in32(p_qmf_real[7], p8_13[13])), 1); - cum[14] = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_imag[7], p8_13[13]) - - ixheaacd_mult32x16in32(p_qmf_real[7], p8_13[14])), + cum[14] = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_imag[7], p8_13[13]) - + ixheaac_mult32x16in32(p_qmf_real[7], p8_13[14])), 1); - cum[1] = ixheaacd_shl32( - ixheaacd_mult32x16in32(p_qmf_real[HYBRID_FILTER_DELAY], p8_13[HYBRID_FILTER_DELAY]), 1); - cum[0] = ixheaacd_shl32( - ixheaacd_mult32x16in32(p_qmf_imag[HYBRID_FILTER_DELAY], p8_13[HYBRID_FILTER_DELAY]), 1); + cum[1] = ixheaac_shl32( + ixheaac_mult32x16in32(p_qmf_real[HYBRID_FILTER_DELAY], p8_13[HYBRID_FILTER_DELAY]), 1); + cum[0] = ixheaac_shl32( + ixheaac_mult32x16in32(p_qmf_imag[HYBRID_FILTER_DELAY], p8_13[HYBRID_FILTER_DELAY]), 1); - cum[9] = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_real[5], p8_13[13]) - - ixheaacd_mult32x16in32(p_qmf_imag[5], p8_13[14])), + cum[9] = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_real[5], p8_13[13]) - + ixheaac_mult32x16in32(p_qmf_imag[5], p8_13[14])), 1); - cum[8] = ixheaacd_shl32((ixheaacd_mult32x16in32(p_qmf_real[5], p8_13[14]) + - ixheaacd_mult32x16in32(p_qmf_imag[5], p8_13[13])), + cum[8] = ixheaac_shl32((ixheaac_mult32x16in32(p_qmf_real[5], p8_13[14]) + + ixheaac_mult32x16in32(p_qmf_imag[5], p8_13[13])), 1); ixheaacd_mps_fft((complex *)cum, 8, 3, hyb_tab); diff --git a/decoder/ixheaacd_mps_initfuncs.c b/decoder/ixheaacd_mps_initfuncs.c index 060a7f5..363284c 100644 --- a/decoder/ixheaacd_mps_initfuncs.c +++ b/decoder/ixheaacd_mps_initfuncs.c @@ -18,12 +18,12 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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_sbr_common.h" -#include "ixheaacd_constants.h" +#include "ixheaac_constants.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_aac_rom.h" #include "ixheaacd_error_codes.h" diff --git a/decoder/ixheaacd_mps_m1m2_common.c b/decoder/ixheaacd_mps_m1m2_common.c index 3febb98..7a2865e 100644 --- a/decoder/ixheaacd_mps_m1m2_common.c +++ b/decoder/ixheaacd_mps_m1m2_common.c @@ -17,14 +17,14 @@ ***************************************************************************** * 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_error_codes.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" @@ -33,7 +33,7 @@ #include "ixheaacd_sbr_rom.h" #include "ixheaacd_hybrid.h" #include "ixheaacd_ps_dec.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" #include "ixheaacd_mps_polyphase.h" #include "ixheaacd_config.h" #include "ixheaacd_qmf_dec.h" diff --git a/decoder/ixheaacd_mps_mdct_2_qmf.c b/decoder/ixheaacd_mps_mdct_2_qmf.c index aa7a555..b341209 100644 --- a/decoder/ixheaacd_mps_mdct_2_qmf.c +++ b/decoder/ixheaacd_mps_mdct_2_qmf.c @@ -18,14 +18,14 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#include "ixheaacd_type_def.h" +#include "ixheaac_type_def.h" #include "ixheaacd_mps_struct_def.h" #include "ixheaacd_error_codes.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_cnst.h" #include "ixheaacd_common_rom.h" @@ -35,7 +35,7 @@ #include "ixheaacd_sbr_rom.h" #include "ixheaacd_hybrid.h" #include "ixheaacd_ps_dec.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" #include "ixheaacd_mps_polyphase.h" #include "ixheaacd_config.h" #include "ixheaacd_qmf_dec.h" diff --git a/decoder/ixheaacd_mps_parse.c b/decoder/ixheaacd_mps_parse.c index 6b41088..398b88a 100644 --- a/decoder/ixheaacd_mps_parse.c +++ b/decoder/ixheaacd_mps_parse.c @@ -18,8 +18,8 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#include "ixheaacd_type_def.h" -#include "ixheaacd_constants.h" +#include "ixheaac_type_def.h" +#include "ixheaac_constants.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_common_rom.h" #include "ixheaacd_sbrdecsettings.h" @@ -38,7 +38,7 @@ #include "ixheaacd_mps_aac_struct.h" #include "ixheaacd_mps_dec.h" #include "ixheaacd_mps_nlc_dec.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" static const WORD32 ixheaacd_freq_res_table[] = {0, 28, 20, 14, 10, 7, 5, 4}; diff --git a/decoder/ixheaacd_mps_poly_filt.c b/decoder/ixheaacd_mps_poly_filt.c index c1db952..155e7bd 100644 --- a/decoder/ixheaacd_mps_poly_filt.c +++ b/decoder/ixheaacd_mps_poly_filt.c @@ -18,8 +18,8 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#include "ixheaacd_type_def.h" -#include "ixheaacd_constants.h" +#include "ixheaac_type_def.h" +#include "ixheaac_constants.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_interface.h" #include "ixheaacd_common_rom.h" diff --git a/decoder/ixheaacd_mps_polyphase.c b/decoder/ixheaacd_mps_polyphase.c index 62aae1d..ad309bb 100644 --- a/decoder/ixheaacd_mps_polyphase.c +++ b/decoder/ixheaacd_mps_polyphase.c @@ -18,14 +18,14 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#include "ixheaacd_type_def.h" +#include "ixheaac_type_def.h" #include "ixheaacd_mps_struct_def.h" #include "ixheaacd_error_codes.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" @@ -41,7 +41,7 @@ #include "ixheaacd_mps_defines.h" #include "ixheaacd_mps_macro_def.h" #include "ixheaacd_mps_basic_op.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" static VOID ixheaacd_fft32(WORD32 *vec, const WORD16 *fft_c) { WORD32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9, tmp10, tmp11, tmp12, tmp13, @@ -57,508 +57,508 @@ static VOID ixheaacd_fft32(WORD32 *vec, const WORD16 *fft_c) { WORD32 temp40, temp41, temp42, temp43, temp44, temp45, temp46, temp47, temp48, temp49, temp410, temp411, temp412, temp413, temp414, temp415; - temp20 = ixheaacd_sub32_sat(vec[2], vec[34]); - temp21 = ixheaacd_sub32_sat(vec[3], vec[35]); - temp30 = ixheaacd_add32_sat(vec[0], vec[32]); - temp31 = ixheaacd_add32_sat(vec[1], vec[33]); - temp32 = ixheaacd_add32_sat(vec[2], vec[34]); - temp33 = ixheaacd_add32_sat(vec[3], vec[35]); + temp20 = ixheaac_sub32_sat(vec[2], vec[34]); + temp21 = ixheaac_sub32_sat(vec[3], vec[35]); + temp30 = ixheaac_add32_sat(vec[0], vec[32]); + temp31 = ixheaac_add32_sat(vec[1], vec[33]); + temp32 = ixheaac_add32_sat(vec[2], vec[34]); + temp33 = ixheaac_add32_sat(vec[3], vec[35]); - temp22 = ixheaacd_sub32_sat(vec[6], vec[38]); - temp23 = ixheaacd_sub32_sat(vec[7], vec[39]); - temp34 = ixheaacd_add32_sat(vec[4], vec[36]); - temp35 = ixheaacd_add32_sat(vec[5], vec[37]); - temp36 = ixheaacd_add32_sat(vec[6], vec[38]); - temp37 = ixheaacd_add32_sat(vec[7], vec[39]); + temp22 = ixheaac_sub32_sat(vec[6], vec[38]); + temp23 = ixheaac_sub32_sat(vec[7], vec[39]); + temp34 = ixheaac_add32_sat(vec[4], vec[36]); + temp35 = ixheaac_add32_sat(vec[5], vec[37]); + temp36 = ixheaac_add32_sat(vec[6], vec[38]); + temp37 = ixheaac_add32_sat(vec[7], vec[39]); - temp24 = ixheaacd_sub32_sat(vec[10], vec[42]); - temp25 = ixheaacd_sub32_sat(vec[11], vec[43]); - temp38 = ixheaacd_add32_sat(vec[8], vec[40]); - temp39 = ixheaacd_add32_sat(vec[9], vec[41]); - temp310 = ixheaacd_add32_sat(vec[10], vec[42]); - temp311 = ixheaacd_add32_sat(vec[11], vec[43]); + temp24 = ixheaac_sub32_sat(vec[10], vec[42]); + temp25 = ixheaac_sub32_sat(vec[11], vec[43]); + temp38 = ixheaac_add32_sat(vec[8], vec[40]); + temp39 = ixheaac_add32_sat(vec[9], vec[41]); + temp310 = ixheaac_add32_sat(vec[10], vec[42]); + temp311 = ixheaac_add32_sat(vec[11], vec[43]); - temp26 = ixheaacd_sub32_sat(vec[14], vec[46]); - temp27 = ixheaacd_sub32_sat(vec[15], vec[47]); - temp312 = ixheaacd_add32_sat(vec[12], vec[44]); - temp313 = ixheaacd_add32_sat(vec[13], vec[45]); - temp314 = ixheaacd_add32_sat(vec[14], vec[46]); - temp315 = ixheaacd_add32_sat(vec[15], vec[47]); + temp26 = ixheaac_sub32_sat(vec[14], vec[46]); + temp27 = ixheaac_sub32_sat(vec[15], vec[47]); + temp312 = ixheaac_add32_sat(vec[12], vec[44]); + temp313 = ixheaac_add32_sat(vec[13], vec[45]); + temp314 = ixheaac_add32_sat(vec[14], vec[46]); + temp315 = ixheaac_add32_sat(vec[15], vec[47]); - temp28 = ixheaacd_sub32_sat(vec[18], vec[50]); - temp29 = ixheaacd_sub32_sat(vec[19], vec[51]); - temp316 = ixheaacd_add32_sat(vec[16], vec[48]); - temp317 = ixheaacd_add32_sat(vec[17], vec[49]); - temp318 = ixheaacd_add32_sat(vec[18], vec[50]); - temp319 = ixheaacd_add32_sat(vec[19], vec[51]); + temp28 = ixheaac_sub32_sat(vec[18], vec[50]); + temp29 = ixheaac_sub32_sat(vec[19], vec[51]); + temp316 = ixheaac_add32_sat(vec[16], vec[48]); + temp317 = ixheaac_add32_sat(vec[17], vec[49]); + temp318 = ixheaac_add32_sat(vec[18], vec[50]); + temp319 = ixheaac_add32_sat(vec[19], vec[51]); - temp210 = ixheaacd_sub32_sat(vec[22], vec[54]); - temp211 = ixheaacd_sub32_sat(vec[23], vec[55]); - temp320 = ixheaacd_add32_sat(vec[20], vec[52]); - temp321 = ixheaacd_add32_sat(vec[21], vec[53]); - temp322 = ixheaacd_add32_sat(vec[22], vec[54]); - temp323 = ixheaacd_add32_sat(vec[23], vec[55]); + temp210 = ixheaac_sub32_sat(vec[22], vec[54]); + temp211 = ixheaac_sub32_sat(vec[23], vec[55]); + temp320 = ixheaac_add32_sat(vec[20], vec[52]); + temp321 = ixheaac_add32_sat(vec[21], vec[53]); + temp322 = ixheaac_add32_sat(vec[22], vec[54]); + temp323 = ixheaac_add32_sat(vec[23], vec[55]); - temp212 = ixheaacd_sub32_sat(vec[26], vec[58]); - temp213 = ixheaacd_sub32_sat(vec[27], vec[59]); - temp324 = ixheaacd_add32_sat(vec[24], vec[56]); - temp325 = ixheaacd_add32_sat(vec[25], vec[57]); - temp326 = ixheaacd_add32_sat(vec[26], vec[58]); - temp327 = ixheaacd_add32_sat(vec[27], vec[59]); + temp212 = ixheaac_sub32_sat(vec[26], vec[58]); + temp213 = ixheaac_sub32_sat(vec[27], vec[59]); + temp324 = ixheaac_add32_sat(vec[24], vec[56]); + temp325 = ixheaac_add32_sat(vec[25], vec[57]); + temp326 = ixheaac_add32_sat(vec[26], vec[58]); + temp327 = ixheaac_add32_sat(vec[27], vec[59]); - temp214 = ixheaacd_sub32_sat(vec[30], vec[62]); - temp215 = ixheaacd_sub32_sat(vec[31], vec[63]); - temp328 = ixheaacd_add32_sat(vec[28], vec[60]); - temp329 = ixheaacd_add32_sat(vec[29], vec[61]); - temp330 = ixheaacd_add32_sat(vec[30], vec[62]); - temp331 = ixheaacd_add32_sat(vec[31], vec[63]); + temp214 = ixheaac_sub32_sat(vec[30], vec[62]); + temp215 = ixheaac_sub32_sat(vec[31], vec[63]); + temp328 = ixheaac_add32_sat(vec[28], vec[60]); + temp329 = ixheaac_add32_sat(vec[29], vec[61]); + temp330 = ixheaac_add32_sat(vec[30], vec[62]); + temp331 = ixheaac_add32_sat(vec[31], vec[63]); - temp41 = -ixheaacd_add32_sat(temp20, temp214); - temp42 = ixheaacd_sub32_sat(temp20, temp214); - temp40 = ixheaacd_add32_sat(temp21, temp215); - temp43 = ixheaacd_sub32_sat(temp21, temp215); - temp45 = -ixheaacd_add32_sat(temp22, temp212); - temp46 = ixheaacd_sub32_sat(temp22, temp212); - temp44 = ixheaacd_add32_sat(temp23, temp213); - temp47 = ixheaacd_sub32_sat(temp23, temp213); - temp49 = -ixheaacd_add32_sat(temp24, temp210); - temp410 = ixheaacd_sub32_sat(temp24, temp210); - temp48 = ixheaacd_add32_sat(temp25, temp211); - temp411 = ixheaacd_sub32_sat(temp25, temp211); - temp413 = -ixheaacd_add32_sat(temp26, temp28); - temp414 = ixheaacd_sub32_sat(temp26, temp28); - temp412 = ixheaacd_add32_sat(temp27, temp29); - temp415 = ixheaacd_sub32_sat(temp27, temp29); + temp41 = -ixheaac_add32_sat(temp20, temp214); + temp42 = ixheaac_sub32_sat(temp20, temp214); + temp40 = ixheaac_add32_sat(temp21, temp215); + temp43 = ixheaac_sub32_sat(temp21, temp215); + temp45 = -ixheaac_add32_sat(temp22, temp212); + temp46 = ixheaac_sub32_sat(temp22, temp212); + temp44 = ixheaac_add32_sat(temp23, temp213); + temp47 = ixheaac_sub32_sat(temp23, temp213); + temp49 = -ixheaac_add32_sat(temp24, temp210); + temp410 = ixheaac_sub32_sat(temp24, temp210); + temp48 = ixheaac_add32_sat(temp25, temp211); + temp411 = ixheaac_sub32_sat(temp25, temp211); + temp413 = -ixheaac_add32_sat(temp26, temp28); + temp414 = ixheaac_sub32_sat(temp26, temp28); + temp412 = ixheaac_add32_sat(temp27, temp29); + temp415 = ixheaac_sub32_sat(temp27, temp29); - temp20 = ixheaacd_add32_sat(ixheaacd_add32_sat(ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(temp40, fft_c[3]), - ixheaacd_mult32x16in32_shl(temp44, fft_c[2])), - ixheaacd_mult32x16in32_shl(temp48, fft_c[1])), - ixheaacd_mult32x16in32_shl(temp412, fft_c[0])); + temp20 = ixheaac_add32_sat(ixheaac_add32_sat(ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(temp40, fft_c[3]), + ixheaac_mult32x16in32_shl(temp44, fft_c[2])), + ixheaac_mult32x16in32_shl(temp48, fft_c[1])), + ixheaac_mult32x16in32_shl(temp412, fft_c[0])); - temp24 = ixheaacd_sub32_sat(ixheaacd_add32_sat(ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(temp40, fft_c[2]), - ixheaacd_mult32x16in32_shl(temp44, fft_c[0])), - ixheaacd_mult32x16in32_shl(temp48, fft_c[3])), - ixheaacd_mult32x16in32_shl(temp412, fft_c[1])); + temp24 = ixheaac_sub32_sat(ixheaac_add32_sat(ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(temp40, fft_c[2]), + ixheaac_mult32x16in32_shl(temp44, fft_c[0])), + ixheaac_mult32x16in32_shl(temp48, fft_c[3])), + ixheaac_mult32x16in32_shl(temp412, fft_c[1])); - temp28 = ixheaacd_add32_sat(ixheaacd_sub32_sat(ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(temp40, fft_c[1]), - ixheaacd_mult32x16in32_shl(temp44, fft_c[3])), - ixheaacd_mult32x16in32_shl(temp48, fft_c[0])), - ixheaacd_mult32x16in32_shl(temp412, fft_c[2])); + temp28 = ixheaac_add32_sat(ixheaac_sub32_sat(ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(temp40, fft_c[1]), + ixheaac_mult32x16in32_shl(temp44, fft_c[3])), + ixheaac_mult32x16in32_shl(temp48, fft_c[0])), + ixheaac_mult32x16in32_shl(temp412, fft_c[2])); - temp212 = ixheaacd_sub32_sat(ixheaacd_add32_sat(ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(temp40, fft_c[0]), - ixheaacd_mult32x16in32_shl(temp44, fft_c[1])), - ixheaacd_mult32x16in32_shl(temp48, fft_c[2])), - ixheaacd_mult32x16in32_shl(temp412, fft_c[3])); + temp212 = ixheaac_sub32_sat(ixheaac_add32_sat(ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(temp40, fft_c[0]), + ixheaac_mult32x16in32_shl(temp44, fft_c[1])), + ixheaac_mult32x16in32_shl(temp48, fft_c[2])), + ixheaac_mult32x16in32_shl(temp412, fft_c[3])); - temp21 = ixheaacd_add32_sat(ixheaacd_add32_sat(ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(temp41, fft_c[3]), - ixheaacd_mult32x16in32_shl(temp45, fft_c[2])), - ixheaacd_mult32x16in32_shl(temp49, fft_c[1])), - ixheaacd_mult32x16in32_shl(temp413, fft_c[0])); + temp21 = ixheaac_add32_sat(ixheaac_add32_sat(ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(temp41, fft_c[3]), + ixheaac_mult32x16in32_shl(temp45, fft_c[2])), + ixheaac_mult32x16in32_shl(temp49, fft_c[1])), + ixheaac_mult32x16in32_shl(temp413, fft_c[0])); - temp25 = ixheaacd_sub32_sat(ixheaacd_add32_sat(ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(temp41, fft_c[2]), - ixheaacd_mult32x16in32_shl(temp45, fft_c[0])), - ixheaacd_mult32x16in32_shl(temp49, fft_c[3])), - ixheaacd_mult32x16in32_shl(temp413, fft_c[1])); + temp25 = ixheaac_sub32_sat(ixheaac_add32_sat(ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(temp41, fft_c[2]), + ixheaac_mult32x16in32_shl(temp45, fft_c[0])), + ixheaac_mult32x16in32_shl(temp49, fft_c[3])), + ixheaac_mult32x16in32_shl(temp413, fft_c[1])); - temp29 = ixheaacd_add32_sat(ixheaacd_sub32_sat(ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(temp41, fft_c[1]), - ixheaacd_mult32x16in32_shl(temp45, fft_c[3])), - ixheaacd_mult32x16in32_shl(temp49, fft_c[0])), - ixheaacd_mult32x16in32_shl(temp413, fft_c[2])); + temp29 = ixheaac_add32_sat(ixheaac_sub32_sat(ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(temp41, fft_c[1]), + ixheaac_mult32x16in32_shl(temp45, fft_c[3])), + ixheaac_mult32x16in32_shl(temp49, fft_c[0])), + ixheaac_mult32x16in32_shl(temp413, fft_c[2])); - temp213 = ixheaacd_sub32_sat(ixheaacd_add32_sat(ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(temp41, fft_c[0]), - ixheaacd_mult32x16in32_shl(temp45, fft_c[1])), - ixheaacd_mult32x16in32_shl(temp49, fft_c[2])), - ixheaacd_mult32x16in32_shl(temp413, fft_c[3])); + temp213 = ixheaac_sub32_sat(ixheaac_add32_sat(ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(temp41, fft_c[0]), + ixheaac_mult32x16in32_shl(temp45, fft_c[1])), + ixheaac_mult32x16in32_shl(temp49, fft_c[2])), + ixheaac_mult32x16in32_shl(temp413, fft_c[3])); - temp22 = ixheaacd_add32_sat(ixheaacd_add32_sat(ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(temp42, fft_c[0]), - ixheaacd_mult32x16in32_shl(temp46, fft_c[1])), - ixheaacd_mult32x16in32_shl(temp410, fft_c[2])), - ixheaacd_mult32x16in32_shl(temp414, fft_c[3])); + temp22 = ixheaac_add32_sat(ixheaac_add32_sat(ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(temp42, fft_c[0]), + ixheaac_mult32x16in32_shl(temp46, fft_c[1])), + ixheaac_mult32x16in32_shl(temp410, fft_c[2])), + ixheaac_mult32x16in32_shl(temp414, fft_c[3])); - temp26 = ixheaacd_sub32_sat(ixheaacd_sub32_sat(ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(temp42, fft_c[1]), - ixheaacd_mult32x16in32_shl(temp46, fft_c[3])), - ixheaacd_mult32x16in32_shl(temp410, fft_c[0])), - ixheaacd_mult32x16in32_shl(temp414, fft_c[2])); + temp26 = ixheaac_sub32_sat(ixheaac_sub32_sat(ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(temp42, fft_c[1]), + ixheaac_mult32x16in32_shl(temp46, fft_c[3])), + ixheaac_mult32x16in32_shl(temp410, fft_c[0])), + ixheaac_mult32x16in32_shl(temp414, fft_c[2])); - temp210 = ixheaacd_add32_sat(ixheaacd_add32_sat(ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(temp42, fft_c[2]), - ixheaacd_mult32x16in32_shl(temp46, fft_c[0])), - ixheaacd_mult32x16in32_shl(temp410, fft_c[3])), - ixheaacd_mult32x16in32_shl(temp414, fft_c[1])); + temp210 = ixheaac_add32_sat(ixheaac_add32_sat(ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(temp42, fft_c[2]), + ixheaac_mult32x16in32_shl(temp46, fft_c[0])), + ixheaac_mult32x16in32_shl(temp410, fft_c[3])), + ixheaac_mult32x16in32_shl(temp414, fft_c[1])); - temp214 = ixheaacd_sub32_sat(ixheaacd_add32_sat(ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(temp42, fft_c[3]), - ixheaacd_mult32x16in32_shl(temp46, fft_c[2])), - ixheaacd_mult32x16in32_shl(temp410, fft_c[1])), - ixheaacd_mult32x16in32_shl(temp414, fft_c[0])); + temp214 = ixheaac_sub32_sat(ixheaac_add32_sat(ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(temp42, fft_c[3]), + ixheaac_mult32x16in32_shl(temp46, fft_c[2])), + ixheaac_mult32x16in32_shl(temp410, fft_c[1])), + ixheaac_mult32x16in32_shl(temp414, fft_c[0])); - temp23 = ixheaacd_add32_sat(ixheaacd_add32_sat(ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(temp43, fft_c[0]), - ixheaacd_mult32x16in32_shl(temp47, fft_c[1])), - ixheaacd_mult32x16in32_shl(temp411, fft_c[2])), - ixheaacd_mult32x16in32_shl(temp415, fft_c[3])); + temp23 = ixheaac_add32_sat(ixheaac_add32_sat(ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(temp43, fft_c[0]), + ixheaac_mult32x16in32_shl(temp47, fft_c[1])), + ixheaac_mult32x16in32_shl(temp411, fft_c[2])), + ixheaac_mult32x16in32_shl(temp415, fft_c[3])); - temp27 = ixheaacd_sub32_sat(ixheaacd_sub32_sat(ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(temp43, fft_c[1]), - ixheaacd_mult32x16in32_shl(temp47, fft_c[3])), - ixheaacd_mult32x16in32_shl(temp411, fft_c[0])), - ixheaacd_mult32x16in32_shl(temp415, fft_c[2])); + temp27 = ixheaac_sub32_sat(ixheaac_sub32_sat(ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(temp43, fft_c[1]), + ixheaac_mult32x16in32_shl(temp47, fft_c[3])), + ixheaac_mult32x16in32_shl(temp411, fft_c[0])), + ixheaac_mult32x16in32_shl(temp415, fft_c[2])); - temp211 = ixheaacd_add32_sat(ixheaacd_add32_sat(ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(temp43, fft_c[2]), - ixheaacd_mult32x16in32_shl(temp47, fft_c[0])), - ixheaacd_mult32x16in32_shl(temp411, fft_c[3])), - ixheaacd_mult32x16in32_shl(temp415, fft_c[1])); + temp211 = ixheaac_add32_sat(ixheaac_add32_sat(ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(temp43, fft_c[2]), + ixheaac_mult32x16in32_shl(temp47, fft_c[0])), + ixheaac_mult32x16in32_shl(temp411, fft_c[3])), + ixheaac_mult32x16in32_shl(temp415, fft_c[1])); - temp215 = ixheaacd_sub32_sat(ixheaacd_add32_sat(ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(temp43, fft_c[3]), - ixheaacd_mult32x16in32_shl(temp47, fft_c[2])), - ixheaacd_mult32x16in32_shl(temp411, fft_c[1])), - ixheaacd_mult32x16in32_shl(temp415, fft_c[0])); + temp215 = ixheaac_sub32_sat(ixheaac_add32_sat(ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(temp43, fft_c[3]), + ixheaac_mult32x16in32_shl(temp47, fft_c[2])), + ixheaac_mult32x16in32_shl(temp411, fft_c[1])), + ixheaac_mult32x16in32_shl(temp415, fft_c[0])); - temp40 = ixheaacd_add32_sat(temp20, temp22); - temp414 = ixheaacd_sub32_sat(temp20, temp22); - temp41 = ixheaacd_add32_sat(temp21, temp23); - temp415 = ixheaacd_sub32_sat(temp21, temp23); - temp42 = ixheaacd_add32_sat(temp24, temp26); - temp412 = ixheaacd_sub32_sat(temp24, temp26); - temp43 = ixheaacd_add32_sat(temp25, temp27); - temp413 = ixheaacd_sub32_sat(temp25, temp27); - temp44 = ixheaacd_add32_sat(temp28, temp210); - temp410 = ixheaacd_sub32_sat(temp28, temp210); - temp45 = ixheaacd_add32_sat(temp29, temp211); - temp411 = ixheaacd_sub32_sat(temp29, temp211); - temp46 = ixheaacd_add32_sat(temp212, temp214); - temp48 = ixheaacd_sub32_sat(temp212, temp214); - temp47 = ixheaacd_add32_sat(temp213, temp215); - temp49 = ixheaacd_sub32_sat(temp213, temp215); + temp40 = ixheaac_add32_sat(temp20, temp22); + temp414 = ixheaac_sub32_sat(temp20, temp22); + temp41 = ixheaac_add32_sat(temp21, temp23); + temp415 = ixheaac_sub32_sat(temp21, temp23); + temp42 = ixheaac_add32_sat(temp24, temp26); + temp412 = ixheaac_sub32_sat(temp24, temp26); + temp43 = ixheaac_add32_sat(temp25, temp27); + temp413 = ixheaac_sub32_sat(temp25, temp27); + temp44 = ixheaac_add32_sat(temp28, temp210); + temp410 = ixheaac_sub32_sat(temp28, temp210); + temp45 = ixheaac_add32_sat(temp29, temp211); + temp411 = ixheaac_sub32_sat(temp29, temp211); + temp46 = ixheaac_add32_sat(temp212, temp214); + temp48 = ixheaac_sub32_sat(temp212, temp214); + temp47 = ixheaac_add32_sat(temp213, temp215); + temp49 = ixheaac_sub32_sat(temp213, temp215); - temp10 = ixheaacd_add32_sat(temp30, temp316); - temp11 = ixheaacd_add32_sat(temp31, temp317); - temp12 = ixheaacd_add32_sat(temp32, temp318); - temp13 = ixheaacd_add32_sat(temp33, temp319); - temp14 = ixheaacd_add32_sat(temp34, temp320); - temp15 = ixheaacd_add32_sat(temp35, temp321); - temp16 = ixheaacd_add32_sat(temp36, temp322); - temp17 = ixheaacd_add32_sat(temp37, temp323); - temp18 = ixheaacd_add32_sat(temp38, temp324); - temp19 = ixheaacd_add32_sat(temp39, temp325); - temp110 = ixheaacd_add32_sat(temp310, temp326); - temp111 = ixheaacd_add32_sat(temp311, temp327); - temp112 = ixheaacd_add32_sat(temp312, temp328); - temp113 = ixheaacd_add32_sat(temp313, temp329); - temp114 = ixheaacd_add32_sat(temp314, temp330); - temp115 = ixheaacd_add32_sat(temp315, temp331); + temp10 = ixheaac_add32_sat(temp30, temp316); + temp11 = ixheaac_add32_sat(temp31, temp317); + temp12 = ixheaac_add32_sat(temp32, temp318); + temp13 = ixheaac_add32_sat(temp33, temp319); + temp14 = ixheaac_add32_sat(temp34, temp320); + temp15 = ixheaac_add32_sat(temp35, temp321); + temp16 = ixheaac_add32_sat(temp36, temp322); + temp17 = ixheaac_add32_sat(temp37, temp323); + temp18 = ixheaac_add32_sat(temp38, temp324); + temp19 = ixheaac_add32_sat(temp39, temp325); + temp110 = ixheaac_add32_sat(temp310, temp326); + temp111 = ixheaac_add32_sat(temp311, temp327); + temp112 = ixheaac_add32_sat(temp312, temp328); + temp113 = ixheaac_add32_sat(temp313, temp329); + temp114 = ixheaac_add32_sat(temp314, temp330); + temp115 = ixheaac_add32_sat(temp315, temp331); - tmp0 = ixheaacd_add32_sat(temp10, temp18); - tmp2 = ixheaacd_sub32_sat(temp10, temp18); - tmp1 = ixheaacd_add32_sat(temp11, temp19); - tmp3 = ixheaacd_sub32_sat(temp11, temp19); - tmp4 = ixheaacd_add32_sat(temp12, temp110); - tmp6 = ixheaacd_sub32_sat(temp12, temp110); - tmp5 = ixheaacd_add32_sat(temp13, temp111); - tmp7 = ixheaacd_sub32_sat(temp13, temp111); - tmp8 = ixheaacd_add32_sat(temp14, temp112); - tmp10 = ixheaacd_sub32_sat(temp14, temp112); - tmp9 = ixheaacd_add32_sat(temp15, temp113); - tmp11 = ixheaacd_sub32_sat(temp15, temp113); - tmp12 = ixheaacd_add32_sat(temp16, temp114); - tmp14 = ixheaacd_sub32_sat(temp16, temp114); - tmp13 = ixheaacd_add32_sat(temp17, temp115); - tmp15 = ixheaacd_sub32_sat(temp17, temp115); + tmp0 = ixheaac_add32_sat(temp10, temp18); + tmp2 = ixheaac_sub32_sat(temp10, temp18); + tmp1 = ixheaac_add32_sat(temp11, temp19); + tmp3 = ixheaac_sub32_sat(temp11, temp19); + tmp4 = ixheaac_add32_sat(temp12, temp110); + tmp6 = ixheaac_sub32_sat(temp12, temp110); + tmp5 = ixheaac_add32_sat(temp13, temp111); + tmp7 = ixheaac_sub32_sat(temp13, temp111); + tmp8 = ixheaac_add32_sat(temp14, temp112); + tmp10 = ixheaac_sub32_sat(temp14, temp112); + tmp9 = ixheaac_add32_sat(temp15, temp113); + tmp11 = ixheaac_sub32_sat(temp15, temp113); + tmp12 = ixheaac_add32_sat(temp16, temp114); + tmp14 = ixheaac_sub32_sat(temp16, temp114); + tmp13 = ixheaac_add32_sat(temp17, temp115); + tmp15 = ixheaac_sub32_sat(temp17, temp115); - temp20 = ixheaacd_add32_sat(tmp0, tmp8); - temp24 = ixheaacd_sub32_sat(tmp0, tmp8); - temp21 = ixheaacd_add32_sat(tmp1, tmp9); - temp25 = ixheaacd_sub32_sat(tmp1, tmp9); - temp28 = ixheaacd_sub32_sat(tmp2, tmp11); - temp210 = ixheaacd_add32_sat(tmp2, tmp11); - temp29 = ixheaacd_add32_sat(tmp3, tmp10); - temp211 = ixheaacd_sub32_sat(tmp3, tmp10); - temp22 = ixheaacd_add32_sat(tmp4, tmp12); - temp27 = ixheaacd_sub32_sat(tmp4, tmp12); - temp23 = ixheaacd_add32_sat(tmp5, tmp13); - temp26 = ixheaacd_sub32_sat(tmp13, tmp5); + temp20 = ixheaac_add32_sat(tmp0, tmp8); + temp24 = ixheaac_sub32_sat(tmp0, tmp8); + temp21 = ixheaac_add32_sat(tmp1, tmp9); + temp25 = ixheaac_sub32_sat(tmp1, tmp9); + temp28 = ixheaac_sub32_sat(tmp2, tmp11); + temp210 = ixheaac_add32_sat(tmp2, tmp11); + temp29 = ixheaac_add32_sat(tmp3, tmp10); + temp211 = ixheaac_sub32_sat(tmp3, tmp10); + temp22 = ixheaac_add32_sat(tmp4, tmp12); + temp27 = ixheaac_sub32_sat(tmp4, tmp12); + temp23 = ixheaac_add32_sat(tmp5, tmp13); + temp26 = ixheaac_sub32_sat(tmp13, tmp5); - tmp1 = ixheaacd_add32_sat(tmp6, tmp14); - tmp2 = ixheaacd_sub32_sat(tmp6, tmp14); - tmp0 = ixheaacd_add32_sat(tmp7, tmp15); - tmp3 = ixheaacd_sub32_sat(tmp7, tmp15); + tmp1 = ixheaac_add32_sat(tmp6, tmp14); + tmp2 = ixheaac_sub32_sat(tmp6, tmp14); + tmp0 = ixheaac_add32_sat(tmp7, tmp15); + tmp3 = ixheaac_sub32_sat(tmp7, tmp15); - temp212 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(tmp0, tmp2), INV_SQRT2_Q15); - temp214 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(tmp0, tmp2), INV_SQRT2_Q15); - temp213 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(tmp3, tmp1), INV_SQRT2_Q15); - temp215 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(tmp1, tmp3), -INV_SQRT2_Q15); + temp212 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(tmp0, tmp2), INV_SQRT2_Q15); + temp214 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(tmp0, tmp2), INV_SQRT2_Q15); + temp213 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(tmp3, tmp1), INV_SQRT2_Q15); + temp215 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(tmp1, tmp3), -INV_SQRT2_Q15); - temp10 = ixheaacd_sub32_sat(temp30, temp316); - temp11 = ixheaacd_sub32_sat(temp31, temp317); - temp12 = ixheaacd_sub32_sat(temp32, temp318); - temp13 = ixheaacd_sub32_sat(temp33, temp319); - temp14 = ixheaacd_sub32_sat(temp34, temp320); - temp15 = ixheaacd_sub32_sat(temp35, temp321); - temp16 = ixheaacd_sub32_sat(temp36, temp322); - temp17 = ixheaacd_sub32_sat(temp37, temp323); - temp18 = ixheaacd_sub32_sat(temp38, temp324); - temp19 = ixheaacd_sub32_sat(temp39, temp325); - temp110 = ixheaacd_sub32_sat(temp310, temp326); - temp111 = ixheaacd_sub32_sat(temp311, temp327); - temp112 = ixheaacd_sub32_sat(temp312, temp328); - temp113 = ixheaacd_sub32_sat(temp313, temp329); - temp114 = ixheaacd_sub32_sat(temp314, temp330); - temp115 = ixheaacd_sub32_sat(temp315, temp331); + temp10 = ixheaac_sub32_sat(temp30, temp316); + temp11 = ixheaac_sub32_sat(temp31, temp317); + temp12 = ixheaac_sub32_sat(temp32, temp318); + temp13 = ixheaac_sub32_sat(temp33, temp319); + temp14 = ixheaac_sub32_sat(temp34, temp320); + temp15 = ixheaac_sub32_sat(temp35, temp321); + temp16 = ixheaac_sub32_sat(temp36, temp322); + temp17 = ixheaac_sub32_sat(temp37, temp323); + temp18 = ixheaac_sub32_sat(temp38, temp324); + temp19 = ixheaac_sub32_sat(temp39, temp325); + temp110 = ixheaac_sub32_sat(temp310, temp326); + temp111 = ixheaac_sub32_sat(temp311, temp327); + temp112 = ixheaac_sub32_sat(temp312, temp328); + temp113 = ixheaac_sub32_sat(temp313, temp329); + temp114 = ixheaac_sub32_sat(temp314, temp330); + temp115 = ixheaac_sub32_sat(temp315, temp331); - temp30 = ixheaacd_add32_sat(temp20, temp22); - temp316 = ixheaacd_sub32_sat(temp20, temp22); - temp31 = ixheaacd_add32_sat(temp21, temp23); - temp317 = ixheaacd_sub32_sat(temp21, temp23); - temp38 = ixheaacd_sub32_sat(temp24, temp26); - temp324 = ixheaacd_add32_sat(temp24, temp26); - temp39 = ixheaacd_sub32_sat(temp25, temp27); - temp325 = ixheaacd_add32_sat(temp25, temp27); - temp312 = ixheaacd_add32_sat(temp28, temp214); - temp328 = ixheaacd_sub32_sat(temp28, temp214); - temp313 = ixheaacd_add32_sat(temp29, temp215); - temp329 = ixheaacd_sub32_sat(temp29, temp215); - temp34 = ixheaacd_add32_sat(temp210, temp212); - temp320 = ixheaacd_sub32_sat(temp210, temp212); - temp35 = ixheaacd_add32_sat(temp211, temp213); - temp321 = ixheaacd_sub32_sat(temp211, temp213); + temp30 = ixheaac_add32_sat(temp20, temp22); + temp316 = ixheaac_sub32_sat(temp20, temp22); + temp31 = ixheaac_add32_sat(temp21, temp23); + temp317 = ixheaac_sub32_sat(temp21, temp23); + temp38 = ixheaac_sub32_sat(temp24, temp26); + temp324 = ixheaac_add32_sat(temp24, temp26); + temp39 = ixheaac_sub32_sat(temp25, temp27); + temp325 = ixheaac_add32_sat(temp25, temp27); + temp312 = ixheaac_add32_sat(temp28, temp214); + temp328 = ixheaac_sub32_sat(temp28, temp214); + temp313 = ixheaac_add32_sat(temp29, temp215); + temp329 = ixheaac_sub32_sat(temp29, temp215); + temp34 = ixheaac_add32_sat(temp210, temp212); + temp320 = ixheaac_sub32_sat(temp210, temp212); + temp35 = ixheaac_add32_sat(temp211, temp213); + temp321 = ixheaac_sub32_sat(temp211, temp213); - tmp9 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp12, temp114), -COS_3PI_BY_8_Q15); - tmp10 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp12, temp114), COS_PI_BY_8_Q15); - tmp8 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp13, temp115), COS_3PI_BY_8_Q15); - tmp11 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp13, temp115), COS_PI_BY_8_Q15); - tmp5 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp14, temp112), -INV_SQRT2_Q15); - tmp6 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp14, temp112), INV_SQRT2_Q15); - tmp4 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp15, temp113), INV_SQRT2_Q15); - tmp7 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp15, temp113), INV_SQRT2_Q15); - tmp13 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp16, temp110), -COS_PI_BY_8_Q15); - tmp14 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp16, temp110), COS_3PI_BY_8_Q15); - tmp12 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp17, temp111), COS_PI_BY_8_Q15); - tmp15 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp17, temp111), COS_3PI_BY_8_Q15); + tmp9 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp12, temp114), -COS_3PI_BY_8_Q15); + tmp10 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp12, temp114), COS_PI_BY_8_Q15); + tmp8 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp13, temp115), COS_3PI_BY_8_Q15); + tmp11 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp13, temp115), COS_PI_BY_8_Q15); + tmp5 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp14, temp112), -INV_SQRT2_Q15); + tmp6 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp14, temp112), INV_SQRT2_Q15); + tmp4 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp15, temp113), INV_SQRT2_Q15); + tmp7 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp15, temp113), INV_SQRT2_Q15); + tmp13 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp16, temp110), -COS_PI_BY_8_Q15); + tmp14 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp16, temp110), COS_3PI_BY_8_Q15); + tmp12 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp17, temp111), COS_PI_BY_8_Q15); + tmp15 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp17, temp111), COS_3PI_BY_8_Q15); - temp12 = ixheaacd_sub32_sat(ixheaacd_shl32(ixheaacd_mult32x16in32(tmp8, SQRT2PLUS1_Q13), 3), - ixheaacd_mult32x16in32_shl(tmp12, SQRT2MINUS1_Q15)); - temp13 = ixheaacd_sub32_sat(ixheaacd_shl32(ixheaacd_mult32x16in32(tmp9, SQRT2PLUS1_Q13), 3), - ixheaacd_mult32x16in32_shl(tmp13, SQRT2MINUS1_Q15)); - temp14 = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(tmp10, SQRT2MINUS1_Q15), - ixheaacd_shl32(ixheaacd_mult32x16in32(tmp14, SQRT2PLUS1_Q13), 3)); - temp15 = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(tmp11, SQRT2MINUS1_Q15), - ixheaacd_shl32(ixheaacd_mult32x16in32(tmp15, SQRT2PLUS1_Q13), 3)); + temp12 = ixheaac_sub32_sat(ixheaac_shl32(ixheaac_mult32x16in32(tmp8, SQRT2PLUS1_Q13), 3), + ixheaac_mult32x16in32_shl(tmp12, SQRT2MINUS1_Q15)); + temp13 = ixheaac_sub32_sat(ixheaac_shl32(ixheaac_mult32x16in32(tmp9, SQRT2PLUS1_Q13), 3), + ixheaac_mult32x16in32_shl(tmp13, SQRT2MINUS1_Q15)); + temp14 = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(tmp10, SQRT2MINUS1_Q15), + ixheaac_shl32(ixheaac_mult32x16in32(tmp14, SQRT2PLUS1_Q13), 3)); + temp15 = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(tmp11, SQRT2MINUS1_Q15), + ixheaac_shl32(ixheaac_mult32x16in32(tmp15, SQRT2PLUS1_Q13), 3)); - tmp8 = ixheaacd_add32_sat(tmp8, tmp12); - tmp9 = ixheaacd_add32_sat(tmp9, tmp13); - tmp10 = ixheaacd_add32_sat(tmp10, tmp14); - tmp11 = ixheaacd_add32_sat(tmp11, tmp15); - temp16 = ixheaacd_add32_sat(temp10, tmp4); - temp110 = ixheaacd_sub32_sat(temp10, tmp4); - temp17 = ixheaacd_add32_sat(temp11, tmp5); - temp111 = ixheaacd_sub32_sat(temp11, tmp5); + tmp8 = ixheaac_add32_sat(tmp8, tmp12); + tmp9 = ixheaac_add32_sat(tmp9, tmp13); + tmp10 = ixheaac_add32_sat(tmp10, tmp14); + tmp11 = ixheaac_add32_sat(tmp11, tmp15); + temp16 = ixheaac_add32_sat(temp10, tmp4); + temp110 = ixheaac_sub32_sat(temp10, tmp4); + temp17 = ixheaac_add32_sat(temp11, tmp5); + temp111 = ixheaac_sub32_sat(temp11, tmp5); - temp112 = ixheaacd_sub32_sat(tmp6, temp19); - temp114 = ixheaacd_add32_sat(tmp6, temp19); - temp113 = ixheaacd_add32_sat(temp18, tmp7); - temp115 = ixheaacd_sub32_sat(temp18, tmp7); + temp112 = ixheaac_sub32_sat(tmp6, temp19); + temp114 = ixheaac_add32_sat(tmp6, temp19); + temp113 = ixheaac_add32_sat(temp18, tmp7); + temp115 = ixheaac_sub32_sat(temp18, tmp7); - tmp0 = ixheaacd_sub32_sat(temp16, temp114); - tmp2 = ixheaacd_add32_sat(temp16, temp114); - tmp1 = ixheaacd_add32_sat(temp17, temp115); - tmp3 = ixheaacd_sub32_sat(temp17, temp115); - tmp4 = ixheaacd_add32_sat(temp110, temp112); - tmp6 = ixheaacd_sub32_sat(temp110, temp112); - tmp5 = ixheaacd_add32_sat(temp111, temp113); - tmp7 = ixheaacd_sub32_sat(temp111, temp113); + tmp0 = ixheaac_sub32_sat(temp16, temp114); + tmp2 = ixheaac_add32_sat(temp16, temp114); + tmp1 = ixheaac_add32_sat(temp17, temp115); + tmp3 = ixheaac_sub32_sat(temp17, temp115); + tmp4 = ixheaac_add32_sat(temp110, temp112); + tmp6 = ixheaac_sub32_sat(temp110, temp112); + tmp5 = ixheaac_add32_sat(temp111, temp113); + tmp7 = ixheaac_sub32_sat(temp111, temp113); - temp110 = ixheaacd_add32_sat(tmp8, tmp10); - tmp10 = ixheaacd_sub32_sat(tmp8, tmp10); - temp111 = ixheaacd_add32_sat(tmp9, tmp11); - tmp11 = ixheaacd_sub32_sat(tmp9, tmp11); + temp110 = ixheaac_add32_sat(tmp8, tmp10); + tmp10 = ixheaac_sub32_sat(tmp8, tmp10); + temp111 = ixheaac_add32_sat(tmp9, tmp11); + tmp11 = ixheaac_sub32_sat(tmp9, tmp11); - tmp12 = ixheaacd_add32_sat(temp12, temp14); - tmp14 = ixheaacd_sub32_sat(temp12, temp14); - tmp13 = ixheaacd_add32_sat(temp13, temp15); - tmp15 = ixheaacd_sub32_sat(temp13, temp15); + tmp12 = ixheaac_add32_sat(temp12, temp14); + tmp14 = ixheaac_sub32_sat(temp12, temp14); + tmp13 = ixheaac_add32_sat(temp13, temp15); + tmp15 = ixheaac_sub32_sat(temp13, temp15); - temp32 = ixheaacd_add32_sat(tmp2, temp110); - temp318 = ixheaacd_sub32_sat(tmp2, temp110); - temp33 = ixheaacd_add32_sat(tmp3, temp111); - temp319 = ixheaacd_sub32_sat(tmp3, temp111); - temp36 = ixheaacd_add32_sat(tmp0, tmp12); - temp322 = ixheaacd_sub32_sat(tmp0, tmp12); - temp37 = ixheaacd_add32_sat(tmp1, tmp13); - temp323 = ixheaacd_sub32_sat(tmp1, tmp13); - temp314 = ixheaacd_add32_sat(tmp4, tmp10); - temp330 = ixheaacd_sub32_sat(tmp4, tmp10); - temp315 = ixheaacd_add32_sat(tmp5, tmp11); - temp331 = ixheaacd_sub32_sat(tmp5, tmp11); - temp310 = ixheaacd_add32_sat(tmp6, tmp14); - temp326 = ixheaacd_sub32_sat(tmp6, tmp14); - temp311 = ixheaacd_add32_sat(tmp7, tmp15); - temp327 = ixheaacd_sub32_sat(tmp7, tmp15); + temp32 = ixheaac_add32_sat(tmp2, temp110); + temp318 = ixheaac_sub32_sat(tmp2, temp110); + temp33 = ixheaac_add32_sat(tmp3, temp111); + temp319 = ixheaac_sub32_sat(tmp3, temp111); + temp36 = ixheaac_add32_sat(tmp0, tmp12); + temp322 = ixheaac_sub32_sat(tmp0, tmp12); + temp37 = ixheaac_add32_sat(tmp1, tmp13); + temp323 = ixheaac_sub32_sat(tmp1, tmp13); + temp314 = ixheaac_add32_sat(tmp4, tmp10); + temp330 = ixheaac_sub32_sat(tmp4, tmp10); + temp315 = ixheaac_add32_sat(tmp5, tmp11); + temp331 = ixheaac_sub32_sat(tmp5, tmp11); + temp310 = ixheaac_add32_sat(tmp6, tmp14); + temp326 = ixheaac_sub32_sat(tmp6, tmp14); + temp311 = ixheaac_add32_sat(tmp7, tmp15); + temp327 = ixheaac_sub32_sat(tmp7, tmp15); - temp10 = ixheaacd_sub32_sat(vec[0], vec[32]); - temp11 = ixheaacd_sub32_sat(vec[1], vec[33]); - temp12 = ixheaacd_sub32_sat(vec[4], vec[36]); - temp13 = ixheaacd_sub32_sat(vec[5], vec[37]); - temp14 = ixheaacd_sub32_sat(vec[8], vec[40]); - temp15 = ixheaacd_sub32_sat(vec[9], vec[41]); - temp16 = ixheaacd_sub32_sat(vec[12], vec[44]); - temp17 = ixheaacd_sub32_sat(vec[13], vec[45]); - temp18 = ixheaacd_sub32_sat(vec[16], vec[48]); - temp19 = ixheaacd_sub32_sat(vec[17], vec[49]); - temp110 = ixheaacd_sub32_sat(vec[20], vec[52]); - temp111 = ixheaacd_sub32_sat(vec[21], vec[53]); - temp112 = ixheaacd_sub32_sat(vec[24], vec[56]); - temp113 = ixheaacd_sub32_sat(vec[25], vec[57]); - temp114 = ixheaacd_sub32_sat(vec[28], vec[60]); - temp115 = ixheaacd_sub32_sat(vec[29], vec[61]); + temp10 = ixheaac_sub32_sat(vec[0], vec[32]); + temp11 = ixheaac_sub32_sat(vec[1], vec[33]); + temp12 = ixheaac_sub32_sat(vec[4], vec[36]); + temp13 = ixheaac_sub32_sat(vec[5], vec[37]); + temp14 = ixheaac_sub32_sat(vec[8], vec[40]); + temp15 = ixheaac_sub32_sat(vec[9], vec[41]); + temp16 = ixheaac_sub32_sat(vec[12], vec[44]); + temp17 = ixheaac_sub32_sat(vec[13], vec[45]); + temp18 = ixheaac_sub32_sat(vec[16], vec[48]); + temp19 = ixheaac_sub32_sat(vec[17], vec[49]); + temp110 = ixheaac_sub32_sat(vec[20], vec[52]); + temp111 = ixheaac_sub32_sat(vec[21], vec[53]); + temp112 = ixheaac_sub32_sat(vec[24], vec[56]); + temp113 = ixheaac_sub32_sat(vec[25], vec[57]); + temp114 = ixheaac_sub32_sat(vec[28], vec[60]); + temp115 = ixheaac_sub32_sat(vec[29], vec[61]); - tmp9 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp12, temp114), -COS_3PI_BY_8_Q15); - tmp10 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp12, temp114), COS_PI_BY_8_Q15); - tmp8 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp13, temp115), COS_3PI_BY_8_Q15); - tmp11 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp13, temp115), COS_PI_BY_8_Q15); - tmp5 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp14, temp112), -INV_SQRT2_Q15); - tmp6 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp14, temp112), INV_SQRT2_Q15); - tmp4 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp15, temp113), INV_SQRT2_Q15); - tmp7 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp15, temp113), INV_SQRT2_Q15); - tmp13 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp16, temp110), -COS_PI_BY_8_Q15); - tmp14 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp16, temp110), COS_3PI_BY_8_Q15); - tmp12 = ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(temp17, temp111), COS_PI_BY_8_Q15); - tmp15 = ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(temp17, temp111), COS_3PI_BY_8_Q15); + tmp9 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp12, temp114), -COS_3PI_BY_8_Q15); + tmp10 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp12, temp114), COS_PI_BY_8_Q15); + tmp8 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp13, temp115), COS_3PI_BY_8_Q15); + tmp11 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp13, temp115), COS_PI_BY_8_Q15); + tmp5 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp14, temp112), -INV_SQRT2_Q15); + tmp6 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp14, temp112), INV_SQRT2_Q15); + tmp4 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp15, temp113), INV_SQRT2_Q15); + tmp7 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp15, temp113), INV_SQRT2_Q15); + tmp13 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp16, temp110), -COS_PI_BY_8_Q15); + tmp14 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp16, temp110), COS_3PI_BY_8_Q15); + tmp12 = ixheaac_mult32x16in32_shl(ixheaac_add32_sat(temp17, temp111), COS_PI_BY_8_Q15); + tmp15 = ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(temp17, temp111), COS_3PI_BY_8_Q15); - temp12 = ixheaacd_sub32_sat(ixheaacd_shl32(ixheaacd_mult32x16in32(tmp8, SQRT2PLUS1_Q13), 3), - ixheaacd_mult32x16in32_shl(tmp12, SQRT2MINUS1_Q15)); - temp13 = ixheaacd_sub32_sat(ixheaacd_shl32(ixheaacd_mult32x16in32(tmp9, SQRT2PLUS1_Q13), 3), - ixheaacd_mult32x16in32_shl(tmp13, SQRT2MINUS1_Q15)); - temp14 = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(tmp10, SQRT2MINUS1_Q15), - ixheaacd_shl32(ixheaacd_mult32x16in32(tmp14, SQRT2PLUS1_Q13), 3)); - temp15 = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(tmp11, SQRT2MINUS1_Q15), - ixheaacd_shl32(ixheaacd_mult32x16in32(tmp15, SQRT2PLUS1_Q13), 3)); + temp12 = ixheaac_sub32_sat(ixheaac_shl32(ixheaac_mult32x16in32(tmp8, SQRT2PLUS1_Q13), 3), + ixheaac_mult32x16in32_shl(tmp12, SQRT2MINUS1_Q15)); + temp13 = ixheaac_sub32_sat(ixheaac_shl32(ixheaac_mult32x16in32(tmp9, SQRT2PLUS1_Q13), 3), + ixheaac_mult32x16in32_shl(tmp13, SQRT2MINUS1_Q15)); + temp14 = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(tmp10, SQRT2MINUS1_Q15), + ixheaac_shl32(ixheaac_mult32x16in32(tmp14, SQRT2PLUS1_Q13), 3)); + temp15 = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(tmp11, SQRT2MINUS1_Q15), + ixheaac_shl32(ixheaac_mult32x16in32(tmp15, SQRT2PLUS1_Q13), 3)); - tmp8 = ixheaacd_add32_sat(tmp8, tmp12); - tmp9 = ixheaacd_add32_sat(tmp9, tmp13); - tmp10 = ixheaacd_add32_sat(tmp10, tmp14); - tmp11 = ixheaacd_add32_sat(tmp11, tmp15); - temp16 = ixheaacd_add32_sat(temp10, tmp4); - temp110 = ixheaacd_sub32_sat(temp10, tmp4); - temp17 = ixheaacd_add32_sat(temp11, tmp5); - temp111 = ixheaacd_sub32_sat(temp11, tmp5); + tmp8 = ixheaac_add32_sat(tmp8, tmp12); + tmp9 = ixheaac_add32_sat(tmp9, tmp13); + tmp10 = ixheaac_add32_sat(tmp10, tmp14); + tmp11 = ixheaac_add32_sat(tmp11, tmp15); + temp16 = ixheaac_add32_sat(temp10, tmp4); + temp110 = ixheaac_sub32_sat(temp10, tmp4); + temp17 = ixheaac_add32_sat(temp11, tmp5); + temp111 = ixheaac_sub32_sat(temp11, tmp5); - temp112 = ixheaacd_sub32_sat(tmp6, temp19); - temp114 = ixheaacd_add32_sat(tmp6, temp19); - temp113 = ixheaacd_add32_sat(temp18, tmp7); - temp115 = ixheaacd_sub32_sat(temp18, tmp7); + temp112 = ixheaac_sub32_sat(tmp6, temp19); + temp114 = ixheaac_add32_sat(tmp6, temp19); + temp113 = ixheaac_add32_sat(temp18, tmp7); + temp115 = ixheaac_sub32_sat(temp18, tmp7); - tmp0 = ixheaacd_sub32_sat(temp16, temp114); - tmp2 = ixheaacd_add32_sat(temp16, temp114); - tmp1 = ixheaacd_add32_sat(temp17, temp115); - tmp3 = ixheaacd_sub32_sat(temp17, temp115); - tmp4 = ixheaacd_add32_sat(temp110, temp112); - tmp6 = ixheaacd_sub32_sat(temp110, temp112); - tmp5 = ixheaacd_add32_sat(temp111, temp113); - tmp7 = ixheaacd_sub32_sat(temp111, temp113); + tmp0 = ixheaac_sub32_sat(temp16, temp114); + tmp2 = ixheaac_add32_sat(temp16, temp114); + tmp1 = ixheaac_add32_sat(temp17, temp115); + tmp3 = ixheaac_sub32_sat(temp17, temp115); + tmp4 = ixheaac_add32_sat(temp110, temp112); + tmp6 = ixheaac_sub32_sat(temp110, temp112); + tmp5 = ixheaac_add32_sat(temp111, temp113); + tmp7 = ixheaac_sub32_sat(temp111, temp113); - temp110 = ixheaacd_add32_sat(tmp8, tmp10); - tmp10 = ixheaacd_sub32_sat(tmp8, tmp10); - temp111 = ixheaacd_add32_sat(tmp9, tmp11); - tmp11 = ixheaacd_sub32_sat(tmp9, tmp11); + temp110 = ixheaac_add32_sat(tmp8, tmp10); + tmp10 = ixheaac_sub32_sat(tmp8, tmp10); + temp111 = ixheaac_add32_sat(tmp9, tmp11); + tmp11 = ixheaac_sub32_sat(tmp9, tmp11); - tmp12 = ixheaacd_add32_sat(temp12, temp14); - tmp14 = ixheaacd_sub32_sat(temp12, temp14); - tmp13 = ixheaacd_add32_sat(temp13, temp15); - tmp15 = ixheaacd_sub32_sat(temp13, temp15); + tmp12 = ixheaac_add32_sat(temp12, temp14); + tmp14 = ixheaac_sub32_sat(temp12, temp14); + tmp13 = ixheaac_add32_sat(temp13, temp15); + tmp15 = ixheaac_sub32_sat(temp13, temp15); - temp10 = ixheaacd_add32_sat(tmp2, temp110); - temp18 = ixheaacd_sub32_sat(tmp2, temp110); - temp11 = ixheaacd_add32_sat(tmp3, temp111); - temp19 = ixheaacd_sub32_sat(tmp3, temp111); - temp12 = ixheaacd_add32_sat(tmp0, tmp12); - temp110 = ixheaacd_sub32_sat(tmp0, tmp12); - temp13 = ixheaacd_add32_sat(tmp1, tmp13); - temp111 = ixheaacd_sub32_sat(tmp1, tmp13); - temp16 = ixheaacd_add32_sat(tmp4, tmp10); - temp114 = ixheaacd_sub32_sat(tmp4, tmp10); - temp17 = ixheaacd_add32_sat(tmp5, tmp11); - temp115 = ixheaacd_sub32_sat(tmp5, tmp11); - temp14 = ixheaacd_add32_sat(tmp6, tmp14); - temp112 = ixheaacd_sub32_sat(tmp6, tmp14); - temp15 = ixheaacd_add32_sat(tmp7, tmp15); - temp113 = ixheaacd_sub32_sat(tmp7, tmp15); + temp10 = ixheaac_add32_sat(tmp2, temp110); + temp18 = ixheaac_sub32_sat(tmp2, temp110); + temp11 = ixheaac_add32_sat(tmp3, temp111); + temp19 = ixheaac_sub32_sat(tmp3, temp111); + temp12 = ixheaac_add32_sat(tmp0, tmp12); + temp110 = ixheaac_sub32_sat(tmp0, tmp12); + temp13 = ixheaac_add32_sat(tmp1, tmp13); + temp111 = ixheaac_sub32_sat(tmp1, tmp13); + temp16 = ixheaac_add32_sat(tmp4, tmp10); + temp114 = ixheaac_sub32_sat(tmp4, tmp10); + temp17 = ixheaac_add32_sat(tmp5, tmp11); + temp115 = ixheaac_sub32_sat(tmp5, tmp11); + temp14 = ixheaac_add32_sat(tmp6, tmp14); + temp112 = ixheaac_sub32_sat(tmp6, tmp14); + temp15 = ixheaac_add32_sat(tmp7, tmp15); + temp113 = ixheaac_sub32_sat(tmp7, tmp15); *vec++ = temp30; *vec++ = temp31; - *vec++ = ixheaacd_add32_sat(temp10, temp40); - *vec++ = ixheaacd_add32_sat(temp11, temp41); + *vec++ = ixheaac_add32_sat(temp10, temp40); + *vec++ = ixheaac_add32_sat(temp11, temp41); *vec++ = temp32; *vec++ = temp33; - *vec++ = ixheaacd_add32_sat(temp12, temp42); - *vec++ = ixheaacd_add32_sat(temp13, temp43); + *vec++ = ixheaac_add32_sat(temp12, temp42); + *vec++ = ixheaac_add32_sat(temp13, temp43); *vec++ = temp34; *vec++ = temp35; - *vec++ = ixheaacd_add32_sat(temp14, temp44); - *vec++ = ixheaacd_add32_sat(temp15, temp45); + *vec++ = ixheaac_add32_sat(temp14, temp44); + *vec++ = ixheaac_add32_sat(temp15, temp45); *vec++ = temp36; *vec++ = temp37; - *vec++ = ixheaacd_add32_sat(temp16, temp46); - *vec++ = ixheaacd_add32_sat(temp17, temp47); + *vec++ = ixheaac_add32_sat(temp16, temp46); + *vec++ = ixheaac_add32_sat(temp17, temp47); *vec++ = temp38; *vec++ = temp39; - *vec++ = ixheaacd_add32_sat(temp18, temp48); - *vec++ = ixheaacd_add32_sat(temp19, temp49); + *vec++ = ixheaac_add32_sat(temp18, temp48); + *vec++ = ixheaac_add32_sat(temp19, temp49); *vec++ = temp310; *vec++ = temp311; - *vec++ = ixheaacd_add32_sat(temp110, temp410); - *vec++ = ixheaacd_add32_sat(temp111, temp411); + *vec++ = ixheaac_add32_sat(temp110, temp410); + *vec++ = ixheaac_add32_sat(temp111, temp411); *vec++ = temp312; *vec++ = temp313; - *vec++ = ixheaacd_add32_sat(temp112, temp412); - *vec++ = ixheaacd_add32_sat(temp113, temp413); + *vec++ = ixheaac_add32_sat(temp112, temp412); + *vec++ = ixheaac_add32_sat(temp113, temp413); *vec++ = temp314; *vec++ = temp315; - *vec++ = ixheaacd_add32_sat(temp114, temp414); - *vec++ = ixheaacd_add32_sat(temp115, temp415); + *vec++ = ixheaac_add32_sat(temp114, temp414); + *vec++ = ixheaac_add32_sat(temp115, temp415); *vec++ = temp316; *vec++ = temp317; - *vec++ = ixheaacd_sub32_sat(temp10, temp40); - *vec++ = ixheaacd_sub32_sat(temp11, temp41); + *vec++ = ixheaac_sub32_sat(temp10, temp40); + *vec++ = ixheaac_sub32_sat(temp11, temp41); *vec++ = temp318; *vec++ = temp319; - *vec++ = ixheaacd_sub32_sat(temp12, temp42); - *vec++ = ixheaacd_sub32_sat(temp13, temp43); + *vec++ = ixheaac_sub32_sat(temp12, temp42); + *vec++ = ixheaac_sub32_sat(temp13, temp43); *vec++ = temp320; *vec++ = temp321; - *vec++ = ixheaacd_sub32_sat(temp14, temp44); - *vec++ = ixheaacd_sub32_sat(temp15, temp45); + *vec++ = ixheaac_sub32_sat(temp14, temp44); + *vec++ = ixheaac_sub32_sat(temp15, temp45); *vec++ = temp322; *vec++ = temp323; - *vec++ = ixheaacd_sub32_sat(temp16, temp46); - *vec++ = ixheaacd_sub32_sat(temp17, temp47); + *vec++ = ixheaac_sub32_sat(temp16, temp46); + *vec++ = ixheaac_sub32_sat(temp17, temp47); *vec++ = temp324; *vec++ = temp325; - *vec++ = ixheaacd_sub32_sat(temp18, temp48); - *vec++ = ixheaacd_sub32_sat(temp19, temp49); + *vec++ = ixheaac_sub32_sat(temp18, temp48); + *vec++ = ixheaac_sub32_sat(temp19, temp49); *vec++ = temp326; *vec++ = temp327; - *vec++ = ixheaacd_sub32_sat(temp110, temp410); - *vec++ = ixheaacd_sub32_sat(temp111, temp411); + *vec++ = ixheaac_sub32_sat(temp110, temp410); + *vec++ = ixheaac_sub32_sat(temp111, temp411); *vec++ = temp328; *vec++ = temp329; - *vec++ = ixheaacd_sub32_sat(temp112, temp412); - *vec++ = ixheaacd_sub32_sat(temp113, temp413); + *vec++ = ixheaac_sub32_sat(temp112, temp412); + *vec++ = ixheaac_sub32_sat(temp113, temp413); *vec++ = temp330; *vec++ = temp331; - *vec++ = ixheaacd_sub32_sat(temp114, temp414); - *vec++ = ixheaacd_sub32_sat(temp115, temp415); + *vec++ = ixheaac_sub32_sat(temp114, temp414); + *vec++ = ixheaac_sub32_sat(temp115, temp415); } static VOID ixheaacd_cos_mod(WORD32 *subband, ia_mps_dec_qmf_tables_struct *qmf_table_ptr) { @@ -583,18 +583,18 @@ static VOID ixheaacd_cos_mod(WORD32 *subband, ia_mps_dec_qmf_tables_struct *qmf_ wim = *ptr1++; wre = *ptr2++; - subband[temp_1] = ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(im1, wim), ixheaacd_mult32x16in32_shl(re1, wre)); - subband[temp_1 + 1] = ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(im1, wre), ixheaacd_mult32x16in32_shl(re1, wim)); + subband[temp_1] = ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(im1, wim), ixheaac_mult32x16in32_shl(re1, wre)); + subband[temp_1 + 1] = ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(im1, wre), ixheaac_mult32x16in32_shl(re1, wim)); wim = *ptr3--; wre = *ptr4--; - subband[62 - temp_1] = ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(im2, wim), ixheaacd_mult32x16in32_shl(re2, wre)); - subband[63 - temp_1] = ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(im2, wre), ixheaacd_mult32x16in32_shl(re2, wim)); + subband[62 - temp_1] = ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(im2, wim), ixheaac_mult32x16in32_shl(re2, wre)); + subband[63 - temp_1] = ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(im2, wre), ixheaac_mult32x16in32_shl(re2, wim)); } ixheaacd_fft32(subband, qmf_table_ptr->fft_c); @@ -611,18 +611,18 @@ static VOID ixheaacd_cos_mod(WORD32 *subband, ia_mps_dec_qmf_tables_struct *qmf_ re2 = subband[62 - temp_1]; im2 = subband[63 - temp_1]; - subband[temp_1] = ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(re1, wre), ixheaacd_mult32x16in32_shl(im1, wim)); - subband[63 - temp_1] = ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(re1, wim), ixheaacd_mult32x16in32_shl(im1, wre)); + subband[temp_1] = ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(re1, wre), ixheaac_mult32x16in32_shl(im1, wim)); + subband[63 - temp_1] = ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(re1, wim), ixheaac_mult32x16in32_shl(im1, wre)); wim = *ptr1++; wre = *ptr2--; - subband[62 - temp_1] = ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(re2, wim), ixheaacd_mult32x16in32_shl(im2, wre)); - subband[temp_1 + 1] = ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(re2, wre), ixheaacd_mult32x16in32_shl(im2, wim)); + subband[62 - temp_1] = ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(re2, wim), ixheaac_mult32x16in32_shl(im2, wre)); + subband[temp_1 + 1] = ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(re2, wre), ixheaac_mult32x16in32_shl(im2, wim)); } } @@ -651,18 +651,18 @@ static VOID ixheaacd_sin_mod(WORD32 *subband, ia_mps_dec_qmf_tables_struct *qmf_ wre = *ptr1++; wim = *ptr2++; - subband[temp_1 + 1] = ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(im1, wim), ixheaacd_mult32x16in32_shl(re1, wre)); - subband[temp_1] = ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(im1, wre), ixheaacd_mult32x16in32_shl(re1, wim)); + subband[temp_1 + 1] = ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(im1, wim), ixheaac_mult32x16in32_shl(re1, wre)); + subband[temp_1] = ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(im1, wre), ixheaac_mult32x16in32_shl(re1, wim)); wre = *ptr3--; wim = *ptr4--; - subband[63 - temp_1] = ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(im2, wim), ixheaacd_mult32x16in32_shl(re2, wre)); - subband[62 - temp_1] = ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(im2, wre), ixheaacd_mult32x16in32_shl(re2, wim)); + subband[63 - temp_1] = ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(im2, wim), ixheaac_mult32x16in32_shl(re2, wre)); + subband[62 - temp_1] = ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(im2, wre), ixheaac_mult32x16in32_shl(re2, wim)); } ixheaacd_fft32(subband, qmf_table_ptr->fft_c); @@ -680,18 +680,18 @@ static VOID ixheaacd_sin_mod(WORD32 *subband, ia_mps_dec_qmf_tables_struct *qmf_ re2 = subband[62 - temp_1]; im2 = subband[63 - temp_1]; - subband[63 - temp_1] = -ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(re1, wre), ixheaacd_mult32x16in32_shl(im1, wim)); - subband[temp_1] = -ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(re1, wim), ixheaacd_mult32x16in32_shl(im1, wre)); + subband[63 - temp_1] = -ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(re1, wre), ixheaac_mult32x16in32_shl(im1, wim)); + subband[temp_1] = -ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(re1, wim), ixheaac_mult32x16in32_shl(im1, wre)); wim = *ptr1++; wre = *ptr2--; - subband[temp_1 + 1] = -ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(re2, wim), ixheaacd_mult32x16in32_shl(im2, wre)); - subband[62 - temp_1] = -ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(re2, wre), ixheaacd_mult32x16in32_shl(im2, wim)); + subband[temp_1 + 1] = -ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(re2, wim), ixheaac_mult32x16in32_shl(im2, wre)); + subband[62 - temp_1] = -ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(re2, wre), ixheaac_mult32x16in32_shl(im2, wim)); } } @@ -720,42 +720,42 @@ static VOID ixheaacd_inverse_modulation(WORD32 *qmf_real, WORD32 *qmf_imag, wim = *ptr1++; wre = *ptr2++; - qmf_real[temp_1] = ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(im1, wim), ixheaacd_mult32x16in32_shl(re1, wre)); + qmf_real[temp_1] = ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(im1, wim), ixheaac_mult32x16in32_shl(re1, wre)); re12 = qmf_imag[temp_1]; im12 = qmf_imag[63 - temp_1]; - qmf_imag[temp_1] = ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(im12, wim), ixheaacd_mult32x16in32_shl(re12, wre)); + qmf_imag[temp_1] = ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(im12, wim), ixheaac_mult32x16in32_shl(re12, wre)); im2 = qmf_real[temp_1 + 1]; - qmf_real[temp_1 + 1] = ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(im1, wre), ixheaacd_mult32x16in32_shl(re1, wim)); + qmf_real[temp_1 + 1] = ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(im1, wre), ixheaac_mult32x16in32_shl(re1, wim)); im22 = qmf_imag[temp_1 + 1]; - qmf_imag[temp_1 + 1] = ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(im12, wre), ixheaacd_mult32x16in32_shl(re12, wim)); + qmf_imag[temp_1 + 1] = ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(im12, wre), ixheaac_mult32x16in32_shl(re12, wim)); wim = *ptr3--; wre = *ptr4--; re2 = qmf_real[62 - temp_1]; - qmf_real[62 - temp_1] = ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(im2, wim), ixheaacd_mult32x16in32_shl(re2, wre)); + qmf_real[62 - temp_1] = ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(im2, wim), ixheaac_mult32x16in32_shl(re2, wre)); re22 = qmf_imag[62 - temp_1]; - qmf_imag[62 - temp_1] = ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(im22, wim), ixheaacd_mult32x16in32_shl(re22, wre)); + qmf_imag[62 - temp_1] = ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(im22, wim), ixheaac_mult32x16in32_shl(re22, wre)); - qmf_real[63 - temp_1] = ixheaacd_sub32_sat( - ixheaacd_mult32x16in32_shl(im2, wre), ixheaacd_mult32x16in32_shl(re2, wim)); - qmf_imag[63 - temp_1] = ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(im22, wre), ixheaacd_mult32x16in32_shl(re22, wim)); + qmf_real[63 - temp_1] = ixheaac_sub32_sat( + ixheaac_mult32x16in32_shl(im2, wre), ixheaac_mult32x16in32_shl(re2, wim)); + qmf_imag[63 - temp_1] = ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(im22, wre), ixheaac_mult32x16in32_shl(re22, wim)); } ixheaacd_fft32(qmf_real, fft); @@ -773,33 +773,33 @@ static VOID ixheaacd_inverse_modulation(WORD32 *qmf_real, WORD32 *qmf_imag, re12 = qmf_imag[temp_1]; im12 = qmf_imag[temp_1 + 1]; - qmf_real[temp_1] = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat( - im12, re1), wre), ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(im1, re12), wim)); - qmf_imag[temp_1] = ixheaacd_add32_sat(ixheaacd_mult32x16in32_shl((ixheaacd_add32_sat( - im12, re1)), wre), ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(im1, re12), wim)); + qmf_real[temp_1] = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(ixheaac_sub32_sat( + im12, re1), wre), ixheaac_mult32x16in32_shl(ixheaac_add32_sat(im1, re12), wim)); + qmf_imag[temp_1] = ixheaac_add32_sat(ixheaac_mult32x16in32_shl((ixheaac_add32_sat( + im12, re1)), wre), ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(im1, re12), wim)); im2 = qmf_real[63 - temp_1]; im22 = qmf_imag[63 - temp_1]; - qmf_real[63 - temp_1] = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat( - im1, re12), wre), ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(im12, re1), wim)); - qmf_imag[63 - temp_1] = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat( - re1, im12), wim), ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(im1, re12), wre)); + qmf_real[63 - temp_1] = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(ixheaac_sub32_sat( + im1, re12), wre), ixheaac_mult32x16in32_shl(ixheaac_add32_sat(im12, re1), wim)); + qmf_imag[63 - temp_1] = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(ixheaac_sub32_sat( + re1, im12), wim), ixheaac_mult32x16in32_shl(ixheaac_add32_sat(im1, re12), wre)); wim = *ptr1++; wre = *ptr2--; re2 = qmf_real[62 - temp_1]; re22 = qmf_imag[62 - temp_1]; - qmf_real[temp_1 + 1] = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat( - im2, re22), wim), ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(im22, re2), wre)); - qmf_imag[temp_1 + 1] = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat( - re2, im22), wre), ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(im2, re22), wim)); + qmf_real[temp_1 + 1] = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(ixheaac_sub32_sat( + im2, re22), wim), ixheaac_mult32x16in32_shl(ixheaac_add32_sat(im22, re2), wre)); + qmf_imag[temp_1 + 1] = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(ixheaac_sub32_sat( + re2, im22), wre), ixheaac_mult32x16in32_shl(ixheaac_add32_sat(im2, re22), wim)); - qmf_real[62 - temp_1] = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat( - im22, re2), wim), ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat(im2, re22), wre)); - qmf_imag[62 - temp_1] = ixheaacd_add32_sat(ixheaacd_mult32x16in32_shl(ixheaacd_add32_sat( - re2, im22), wim), ixheaacd_mult32x16in32_shl(ixheaacd_sub32_sat(im2, re22), wre)); + qmf_real[62 - temp_1] = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(ixheaac_sub32_sat( + im22, re2), wim), ixheaac_mult32x16in32_shl(ixheaac_add32_sat(im2, re22), wre)); + qmf_imag[62 - temp_1] = ixheaac_add32_sat(ixheaac_mult32x16in32_shl(ixheaac_add32_sat( + re2, im22), wim), ixheaac_mult32x16in32_shl(ixheaac_sub32_sat(im2, re22), wre)); } } @@ -843,23 +843,23 @@ VOID ixheaacd_calculate_syn_filt_bank_res64(ia_mps_dec_qmf_syn_filter_bank *syn, WORD32 val1 = *(p_si + 63); syn_buf_p2 = &synth_buf[63]; - *time_sig++ = ixheaacd_add32_sat(syn_buf_p1[512], + *time_sig++ = ixheaac_add32_sat(syn_buf_p1[512], ixheaacd_mps_mult32_shr_30(*(p_filter_5 + 65), val)); - syn_buf_p1[512] = ixheaacd_add32_sat(syn_buf_p2[448], + syn_buf_p1[512] = ixheaac_add32_sat(syn_buf_p2[448], ixheaacd_mps_mult32_shr_30(*(p_filter_5 + 64), val1)); - syn_buf_p2[448] = ixheaacd_add32_sat(syn_buf_p1[384], + syn_buf_p2[448] = ixheaac_add32_sat(syn_buf_p1[384], ixheaacd_mps_mult32_shr_30(*p_filter_5++, val)); - syn_buf_p1[384] = ixheaacd_add32_sat(syn_buf_p2[320], + syn_buf_p1[384] = ixheaac_add32_sat(syn_buf_p2[320], ixheaacd_mps_mult32_shr_30(*(p_filter_4 + 64), val1)); - syn_buf_p2[320] = ixheaacd_add32_sat(syn_buf_p1[256], + syn_buf_p2[320] = ixheaac_add32_sat(syn_buf_p1[256], ixheaacd_mps_mult32_shr_30(*p_filter_4++, val)); - syn_buf_p1[256] = ixheaacd_add32_sat(syn_buf_p2[192], + syn_buf_p1[256] = ixheaac_add32_sat(syn_buf_p2[192], ixheaacd_mps_mult32_shr_30(*(p_filter_3 + 64), val1)); - syn_buf_p2[192] = ixheaacd_add32_sat(syn_buf_p1[128], + syn_buf_p2[192] = ixheaac_add32_sat(syn_buf_p1[128], ixheaacd_mps_mult32_shr_30(*p_filter_3++, val)); - syn_buf_p1[128] = ixheaacd_add32_sat(syn_buf_p2[64], + syn_buf_p1[128] = ixheaac_add32_sat(syn_buf_p2[64], ixheaacd_mps_mult32_shr_30(*(p_filter_2 + 64), val1)); - syn_buf_p2[64] = ixheaacd_add32_sat(syn_buf_p1[0], + syn_buf_p2[64] = ixheaac_add32_sat(syn_buf_p1[0], ixheaacd_mps_mult32_shr_30(*p_filter_2++, val)); syn_buf_p1[0] = ixheaacd_mps_mult32_shr_30(*(p_filter_1 + 63), val1); } @@ -875,23 +875,23 @@ VOID ixheaacd_calculate_syn_filt_bank_res64(ia_mps_dec_qmf_syn_filter_bank *syn, new_samp1 = p_sr + 1; new_samp2 = p_sr + 63; for (j = 0; j < resolution - 1; j++) { - *time_sig-- = ixheaacd_add32_sat(syn_buf_p3[512], + *time_sig-- = ixheaac_add32_sat(syn_buf_p3[512], ixheaacd_mps_mult32_shr_30(*p_filter_6--, (*new_samp2))); - syn_buf_p3[512] = ixheaacd_add32_sat(syn_buf_p2[448], + syn_buf_p3[512] = ixheaac_add32_sat(syn_buf_p2[448], ixheaacd_mps_mult32_shr_30(*p_filter_5++, (*new_samp))); - syn_buf_p2[448] = ixheaacd_add32_sat(syn_buf_p3[384], + syn_buf_p2[448] = ixheaac_add32_sat(syn_buf_p3[384], ixheaacd_mps_mult32_shr_30(*p_filter_7--, (*new_samp2))); - syn_buf_p3[384] = ixheaacd_add32_sat(syn_buf_p2[320], + syn_buf_p3[384] = ixheaac_add32_sat(syn_buf_p2[320], ixheaacd_mps_mult32_shr_30(*p_filter_4++, (*new_samp))); - syn_buf_p2[320] = ixheaacd_add32_sat(syn_buf_p3[256], + syn_buf_p2[320] = ixheaac_add32_sat(syn_buf_p3[256], ixheaacd_mps_mult32_shr_30(*p_filter_8--, (*new_samp2))); - syn_buf_p3[256] = ixheaacd_add32_sat(syn_buf_p2[192], + syn_buf_p3[256] = ixheaac_add32_sat(syn_buf_p2[192], ixheaacd_mps_mult32_shr_30(*p_filter_3++, (*new_samp))); - syn_buf_p2[192] = ixheaacd_add32_sat(syn_buf_p3[128], + syn_buf_p2[192] = ixheaac_add32_sat(syn_buf_p3[128], ixheaacd_mps_mult32_shr_30(*p_filter_9--, (*new_samp2))); - syn_buf_p3[128] = ixheaacd_add32_sat(syn_buf_p2[64], + syn_buf_p3[128] = ixheaac_add32_sat(syn_buf_p2[64], ixheaacd_mps_mult32_shr_30(*p_filter_2++, (*new_samp))); - syn_buf_p2[64] = ixheaacd_add32_sat(syn_buf_p3[0], + syn_buf_p2[64] = ixheaac_add32_sat(syn_buf_p3[0], ixheaacd_mps_mult32_shr_30(*p_filter_10--, (*new_samp2))); syn_buf_p3[0] = ixheaacd_mps_mult32_shr_30(*p_filter_1++, (*new_samp)); @@ -938,27 +938,27 @@ VOID ixheaacd_calculate_syn_filt_bank(ia_mps_dec_qmf_syn_filter_bank *syn, WORD3 for (j = 0; j < resolution; j++) { synth_buf[j] = ixheaacd_mps_mult32_shr_30(*p_filter_1++, (*new_samp)); - synth_buf[resx2 + j] = ixheaacd_add32_sat(synth_buf[resx2 + j], + synth_buf[resx2 + j] = ixheaac_add32_sat(synth_buf[resx2 + j], ixheaacd_mps_mult32_shr_30(*p_filter_2++, (*new_samp))); - synth_buf[resx2 * 2 + j] = ixheaacd_add32_sat(synth_buf[resx2 * 2 + j], + synth_buf[resx2 * 2 + j] = ixheaac_add32_sat(synth_buf[resx2 * 2 + j], ixheaacd_mps_mult32_shr_30(*p_filter_3++, (*new_samp))); - synth_buf[resx2 * 3 + j] = ixheaacd_add32_sat(synth_buf[resx2 * 3 + j], + synth_buf[resx2 * 3 + j] = ixheaac_add32_sat(synth_buf[resx2 * 3 + j], ixheaacd_mps_mult32_shr_30(*p_filter_4++, (*new_samp))); - synth_buf[resx2 * 4 + j] = ixheaacd_add32_sat(synth_buf[resx2 * 4 + j], + synth_buf[resx2 * 4 + j] = ixheaac_add32_sat(synth_buf[resx2 * 4 + j], ixheaacd_mps_mult32_shr_30(*p_filter_5++, (*new_samp))); new_samp--; } - synth_buf[resx2 - 1] = ixheaacd_add32_sat(synth_buf[resx2 - 1], + synth_buf[resx2 - 1] = ixheaac_add32_sat(synth_buf[resx2 - 1], ixheaacd_mps_mult32_shr_30(*p_filter_1++, *p_sr)); - synth_buf[resx2 * 2 - 1] = ixheaacd_add32_sat(synth_buf[resx2 * 2 - 1], + synth_buf[resx2 * 2 - 1] = ixheaac_add32_sat(synth_buf[resx2 * 2 - 1], ixheaacd_mps_mult32_shr_30(*p_filter_2++, *p_sr)); - synth_buf[3 * resx2 - 1] = ixheaacd_add32_sat(synth_buf[3 * resx2 - 1], + synth_buf[3 * resx2 - 1] = ixheaac_add32_sat(synth_buf[3 * resx2 - 1], ixheaacd_mps_mult32_shr_30(*p_filter_3++, *p_sr)); - synth_buf[4 * resx2 - 1] = ixheaacd_add32_sat(synth_buf[4 * resx2 - 1], + synth_buf[4 * resx2 - 1] = ixheaac_add32_sat(synth_buf[4 * resx2 - 1], ixheaacd_mps_mult32_shr_30(*p_filter_4++, *p_sr)); - *time_sig++ = ixheaacd_add32_sat(synth_buf[5 * resx2 - 1], + *time_sig++ = ixheaac_add32_sat(synth_buf[5 * resx2 - 1], ixheaacd_mps_mult32_shr_30(*p_filter_5++, *p_sr)); p_filter_1 -= 2; @@ -970,19 +970,19 @@ VOID ixheaacd_calculate_syn_filt_bank(ia_mps_dec_qmf_syn_filter_bank *syn, WORD3 new_samp = p_sr + resolution - 1; for (j = 0; j < resolution - 1; j++) { - synth_buf[resolution + j] = ixheaacd_add32_sat(synth_buf[resolution + j], + synth_buf[resolution + j] = ixheaac_add32_sat(synth_buf[resolution + j], ixheaacd_mps_mult32_shr_30(*--p_filter_5, (*new_samp))); synth_buf[resolution * (3) + j] = - ixheaacd_add32_sat(synth_buf[resolution * (3) + j], + ixheaac_add32_sat(synth_buf[resolution * (3) + j], ixheaacd_mps_mult32_shr_30(*--p_filter_4, (*new_samp))); synth_buf[resolution * (5) + j] = - ixheaacd_add32_sat(synth_buf[resolution * (5) + j], + ixheaac_add32_sat(synth_buf[resolution * (5) + j], ixheaacd_mps_mult32_shr_30(*--p_filter_3, (*new_samp))); synth_buf[resolution * (7) + j] = - ixheaacd_add32_sat(synth_buf[resolution * (7) + j], + ixheaac_add32_sat(synth_buf[resolution * (7) + j], ixheaacd_mps_mult32_shr_30(*--p_filter_2, (*new_samp))); synth_buf[resolution * (9) + j] = - ixheaacd_add32_sat(synth_buf[resolution * (9) + j], + ixheaac_add32_sat(synth_buf[resolution * (9) + j], ixheaacd_mps_mult32_shr_30(*--p_filter_1, (*new_samp))); new_samp--; } @@ -1145,20 +1145,20 @@ VOID ixheaacd_calc_ana_filt_bank(ia_heaac_mps_state_struct *pstr_mps_state, WORD WORD16 coz = *pcoz++, sin = *psin++; - a_cos = ixheaacd_mult32x16in32(p_ana_re[m], coz); - b_sin = ixheaacd_mult32x16in32(p_ana_im[m], sin); - b_cos = ixheaacd_mult32x16in32(p_ana_im[m], coz); - a_sin = ixheaacd_mult32x16in32(p_ana_re[m], sin); + a_cos = ixheaac_mult32x16in32(p_ana_re[m], coz); + b_sin = ixheaac_mult32x16in32(p_ana_im[m], sin); + b_cos = ixheaac_mult32x16in32(p_ana_im[m], coz); + a_sin = ixheaac_mult32x16in32(p_ana_re[m], sin); p_ana_re[m] = ((a_cos + b_sin) << 1); p_ana_im[m] = ((b_cos - a_sin) << 1); - a_cos1 = ixheaacd_mult32x16in32(p_ana_re[qmf_bands - 1 - m], coz); - b_sin1 = ixheaacd_mult32x16in32(p_ana_im[qmf_bands - 1 - m], sin); + a_cos1 = ixheaac_mult32x16in32(p_ana_re[qmf_bands - 1 - m], coz); + b_sin1 = ixheaac_mult32x16in32(p_ana_im[qmf_bands - 1 - m], sin); - a_sin1 = ixheaacd_mult32x16in32(p_ana_re[qmf_bands - 1 - m], sin); + a_sin1 = ixheaac_mult32x16in32(p_ana_re[qmf_bands - 1 - m], sin); p_ana_re[qmf_bands - 1 - m] = ((-a_cos1 + b_sin1) << 1); - b_cos1 = ixheaacd_mult32x16in32(p_ana_im[qmf_bands - 1 - m], coz); + b_cos1 = ixheaac_mult32x16in32(p_ana_im[qmf_bands - 1 - m], coz); p_ana_im[qmf_bands - 1 - m] = ((-b_cos1 - a_sin1) << 1); } diff --git a/decoder/ixheaacd_mps_pre_mix.c b/decoder/ixheaacd_mps_pre_mix.c index 1406973..bd3a0ef 100644 --- a/decoder/ixheaacd_mps_pre_mix.c +++ b/decoder/ixheaacd_mps_pre_mix.c @@ -21,7 +21,7 @@ #include #include -#include "ixheaacd_type_def.h" +#include "ixheaac_type_def.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_common_rom.h" #include "ixheaacd_sbrdecsettings.h" @@ -33,7 +33,7 @@ #include "ixheaacd_config.h" #include "ixheaacd_qmf_dec.h" #include "ixheaacd_mps_polyphase.h" -#include "ixheaacd_constants.h" +#include "ixheaac_constants.h" #include "ixheaacd_mps_struct_def.h" #include "ixheaacd_mps_res_rom.h" #include "ixheaacd_mps_aac_struct.h" diff --git a/decoder/ixheaacd_mps_process.c b/decoder/ixheaacd_mps_process.c index 5a4a5dd..6466338 100644 --- a/decoder/ixheaacd_mps_process.c +++ b/decoder/ixheaacd_mps_process.c @@ -18,14 +18,14 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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_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" @@ -44,7 +44,7 @@ #include "ixheaacd_mps_get_index.h" #include "ixheaacd_mps_macro_def.h" #include "ixheaacd_mps_basic_op.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" VOID ixheaacd_mdct_2_qmf(ia_heaac_mps_state_struct *pstr_mps_state) { ia_mps_dec_reuse_array_struct *p_array_struct = pstr_mps_state->array_struct; diff --git a/decoder/ixheaacd_mps_res_block.c b/decoder/ixheaacd_mps_res_block.c index e4444fd..986d895 100644 --- a/decoder/ixheaacd_mps_res_block.c +++ b/decoder/ixheaacd_mps_res_block.c @@ -17,13 +17,13 @@ ***************************************************************************** * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ -#include "ixheaacd_type_def.h" -#include "ixheaacd_constants.h" -#include "ixheaacd_basic_ops32.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_ops40.h" +#include "ixheaac_basic_ops.h" #include "ixheaacd_bitbuffer.h" -#include "ixheaacd_basic_op.h" +#include "ixheaac_basic_op.h" #include "ixheaacd_mps_aac_struct.h" #include "ixheaacd_mps_res_rom.h" #include "ixheaacd_mps_res_block.h" @@ -50,7 +50,7 @@ static PLATFORM_INLINE WORD32 ixheaacd_res_extract_signed_symbol(WORD32 value, W WORD32 *temp_word, WORD32 *pr_bit_pos) { WORD32 out; - out = ixheaacd_extu(value, l_shift, r_shift); + out = ixheaac_extu(value, l_shift, r_shift); if (out) { WORD32 bit_pos = *pr_bit_pos; out = pow_table_q17[out]; @@ -152,9 +152,9 @@ static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word1( it_bit_buf->ptr_bit_buf_end); 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); @@ -162,7 +162,7 @@ static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word1( ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word, it_bit_buf->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; @@ -198,9 +198,9 @@ static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_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); @@ -209,7 +209,7 @@ static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word1( ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word, it_bit_buf->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; @@ -335,16 +335,16 @@ static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word1_lb( 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_bif_buf->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; @@ -380,9 +380,9 @@ static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word1_lb( 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); @@ -391,7 +391,7 @@ static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word1_lb( ixheaacd_aac_read_byte_corr(&ptr_read_next, &bit_pos, &read_word, it_bif_buf->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; @@ -568,7 +568,7 @@ static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word2_4_lb( WORD32 temp_word; temp_word = read_word << bit_pos; - out0 = (ixheaacd_extu(value, 24, 30)); + out0 = (ixheaac_extu(value, 24, 30)); ampout0 = add_d(out0, *p_pul_arr++); ampout0 = pow_table_q17[ampout0]; @@ -582,7 +582,7 @@ static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word2_4_lb( ampout0 = -ampout0; } - out1 = (ixheaacd_extu(value, 26, 30)); + out1 = (ixheaac_extu(value, 26, 30)); ampout1 = add_d(out1, *p_pul_arr++); ampout1 = pow_table_q17[ampout1]; if (out1) { @@ -594,7 +594,7 @@ static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word2_4_lb( } else { ampout1 = -ampout1; } - out2 = (ixheaacd_extu(value, 28, 30)); + out2 = (ixheaac_extu(value, 28, 30)); ampout2 = add_d(out2, *p_pul_arr++); ampout2 = pow_table_q17[ampout2]; if (out2) { @@ -611,7 +611,7 @@ static PLATFORM_INLINE WORD ixheaacd_res_c_block_decode_huff_word2_4_lb( *x_invquant++ = ampout1; *x_invquant++ = ampout2; - out3 = (ixheaacd_extu(value, 30, 30)); + out3 = (ixheaac_extu(value, 30, 30)); ampout3 = add_d(out3, *p_pul_arr++); ampout3 = pow_table_q17[ampout3]; if (out3) { @@ -989,17 +989,17 @@ static VOID ixheaacd_res_apply_one_scf(WORD32 scale_factor, WORD32 *x_invquant, for (j = end; j > 0; j--) { temp_1 = *x_invquant; - buffer1 = ixheaacd_mult32x16in32_shl_sat(temp_1, scale_short); - buffer1 = ixheaacd_shr32(buffer1, shift); + buffer1 = ixheaac_mult32x16in32_shl_sat(temp_1, scale_short); + buffer1 = ixheaac_shr32(buffer1, shift); *x_invquant++ = buffer1; } } else { for (j = end; j > 0; j--) { temp_1 = *x_invquant; - buffer1 = ixheaacd_mult32x16in32_shl(temp_1, scale_short); + buffer1 = ixheaac_mult32x16in32_shl(temp_1, scale_short); - buffer1 = ixheaacd_shr32(buffer1, shift); + buffer1 = ixheaac_shr32(buffer1, shift); *x_invquant++ = buffer1; } } @@ -1009,21 +1009,21 @@ static VOID ixheaacd_res_apply_one_scf(WORD32 scale_factor, WORD32 *x_invquant, if (scale_short == (WORD16)0x8000) { for (j = end; j > 0; j--) { temp_1 = *x_invquant; - temp_1 = ixheaacd_shl32(temp_1, shift - 1); + temp_1 = ixheaac_shl32(temp_1, shift - 1); - buffer1 = ixheaacd_mult32x16in32_shl_sat(temp_1, scale_short); + buffer1 = ixheaac_mult32x16in32_shl_sat(temp_1, scale_short); - buffer1 = ixheaacd_shl32(buffer1, 1); + buffer1 = ixheaac_shl32(buffer1, 1); *x_invquant++ = buffer1; } } else { for (j = end; j > 0; j--) { temp_1 = *x_invquant; - temp_1 = ixheaacd_shl32(temp_1, shift - 1); + temp_1 = ixheaac_shl32(temp_1, shift - 1); - buffer1 = ixheaacd_mult32x16in32_shl(temp_1, scale_short); + buffer1 = ixheaac_mult32x16in32_shl(temp_1, scale_short); - buffer1 = ixheaacd_shl32(buffer1, 1); + buffer1 = ixheaac_shl32(buffer1, 1); *x_invquant++ = buffer1; } } @@ -1032,7 +1032,7 @@ static VOID ixheaacd_res_apply_one_scf(WORD32 scale_factor, WORD32 *x_invquant, for (j = end; j > 0; j--) { temp_1 = *x_invquant; - buffer1 = ixheaacd_mult32x16in32_shl_sat(temp_1, scale_short); + buffer1 = ixheaac_mult32x16in32_shl_sat(temp_1, scale_short); *x_invquant++ = buffer1; } @@ -1040,7 +1040,7 @@ static VOID ixheaacd_res_apply_one_scf(WORD32 scale_factor, WORD32 *x_invquant, for (j = end; j > 0; j--) { temp_1 = *x_invquant; - buffer1 = ixheaacd_mult32x16in32_shl(temp_1, scale_short); + buffer1 = ixheaac_mult32x16in32_shl(temp_1, scale_short); *x_invquant++ = buffer1; } diff --git a/decoder/ixheaacd_mps_res_channel.c b/decoder/ixheaacd_mps_res_channel.c index a4c1c2f..de7fe25 100644 --- a/decoder/ixheaacd_mps_res_channel.c +++ b/decoder/ixheaacd_mps_res_channel.c @@ -18,13 +18,13 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#include "ixheaacd_type_def.h" -#include "ixheaacd_constants.h" +#include "ixheaac_type_def.h" +#include "ixheaac_constants.h" #include "ixheaacd_cnst.h" -#include "ixheaacd_basic_ops32.h" -#include "ixheaacd_basic_ops16.h" -#include "ixheaacd_basic_ops40.h" -#include "ixheaacd_basic_ops.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_mps_aac_struct.h" #include "ixheaacd_mps_res_rom.h" @@ -33,7 +33,7 @@ #include "ixheaacd_mps_res_block.h" #include "ixheaacd_defines.h" #include "ixheaacd_mps_res_channel.h" -#include "ixheaacd_basic_op.h" +#include "ixheaac_basic_op.h" #include "ixheaacd_mps_res_tns.h" #include "ixheaacd_mps_res.h" #include "ixheaacd_mps_res_huffman.h" @@ -163,7 +163,7 @@ WORD16 ixheaacd_res_c_block_read_spec_data( WORD32 *p_spectral_coefficient; ia_mps_dec_residual_ics_info_struct *p_ics_info = &p_aac_decoder_channel_info->ics_info; WORD16 *band_offsets; - WORD32 maximum_bins_short = ixheaacd_shr16_dir_sat(p_ics_info->frame_length, 3); + WORD32 maximum_bins_short = ixheaac_shr16_dir_sat(p_ics_info->frame_length, 3); WORD32 *p_spec_coeff_out; diff --git a/decoder/ixheaacd_mps_res_channel_info.c b/decoder/ixheaacd_mps_res_channel_info.c index 543ab03..9e537a1 100644 --- a/decoder/ixheaacd_mps_res_channel_info.c +++ b/decoder/ixheaacd_mps_res_channel_info.c @@ -17,12 +17,12 @@ ***************************************************************************** * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ -#include "ixheaacd_type_def.h" +#include "ixheaac_type_def.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_cnst.h" #include "ixheaacd_mps_aac_struct.h" #include "ixheaacd_mps_res_rom.h" -#include "ixheaacd_basic_op.h" +#include "ixheaac_basic_op.h" #include "ixheaacd_mps_res.h" const WORD16 *ixheaacd_res_get_sfb_offsets( diff --git a/decoder/ixheaacd_mps_res_longblock.c b/decoder/ixheaacd_mps_res_longblock.c index eb755f7..7628d55 100644 --- a/decoder/ixheaacd_mps_res_longblock.c +++ b/decoder/ixheaacd_mps_res_longblock.c @@ -17,11 +17,11 @@ ***************************************************************************** * 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_cnst.h" -#include "ixheaacd_basic_ops32.h" -#include "ixheaacd_basic_ops16.h" +#include "ixheaac_basic_ops32.h" +#include "ixheaac_basic_ops16.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_mps_aac_struct.h" #include "ixheaacd_mps_res_rom.h" @@ -208,7 +208,7 @@ VOID ixheaacd_res_c_block_read_scf_data( *p_scale_factor_tmp++ = factor; } else { p_pns_data->current_energy = - ixheaacd_add16_sat(p_pns_data->current_energy, norm_value); + ixheaac_add16_sat(p_pns_data->current_energy, norm_value); pns_band = (group << 4) + sfb_transmitted - band - 1; p_aac_decoder_channel_info->p_scale_factor[pns_band] = p_pns_data->current_energy; diff --git a/decoder/ixheaacd_mps_res_pns_js_thumb.c b/decoder/ixheaacd_mps_res_pns_js_thumb.c index dc45f73..f7301a8 100644 --- a/decoder/ixheaacd_mps_res_pns_js_thumb.c +++ b/decoder/ixheaacd_mps_res_pns_js_thumb.c @@ -17,11 +17,11 @@ ***************************************************************************** * 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_cnst.h" -#include "ixheaacd_basic_ops32.h" -#include "ixheaacd_basic_ops16.h" +#include "ixheaac_basic_ops32.h" +#include "ixheaac_basic_ops16.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_mps_aac_struct.h" #include "ixheaacd_mps_res_rom.h" @@ -79,7 +79,7 @@ VOID ixheaacd_res_ctns_apply(ia_mps_dec_residual_channel_info_struct *p_aac_deco WORD window, index, start, stop, size, scale_spec; ia_mps_dec_residual_ics_info_struct *p_ics_info = &p_aac_decoder_channel_info->ics_info; WORD win_len, tns_max_bands; - WORD16 maximum_bins_short = ixheaacd_shr16_dir_sat(p_ics_info->frame_length, 3); + WORD16 maximum_bins_short = ixheaac_shr16_dir_sat(p_ics_info->frame_length, 3); WORD32 coeff_parc[MAX_ORDER + 1]; WORD32 lpc[MAX_ORDER + 1]; @@ -103,11 +103,11 @@ VOID ixheaacd_res_ctns_apply(ia_mps_dec_residual_channel_info_struct *p_aac_deco ixheaacd_res_tns_decode_coeffs_32x16(filter, (WORD16 *)coeff_parc, aac_tables_ptr); - start = ixheaacd_min32(ixheaacd_min32(filter->start_band, tns_max_bands), max_sfb); + start = ixheaac_min32(ixheaac_min32(filter->start_band, tns_max_bands), max_sfb); start = scale_factor_bands_tbl[start]; - stop = ixheaacd_min32(ixheaacd_min32(filter->stop_band, tns_max_bands), max_sfb); + stop = ixheaac_min32(ixheaac_min32(filter->stop_band, tns_max_bands), max_sfb); stop = scale_factor_bands_tbl[stop]; @@ -126,7 +126,7 @@ VOID ixheaacd_res_ctns_apply(ia_mps_dec_residual_channel_info_struct *p_aac_deco if (scale_spec > 0) { WORD shift; - scale_spec = ixheaacd_min32(scale_spec, 31); + scale_spec = ixheaac_min32(scale_spec, 31); if (filter->direction == -1) shift = stop - 1; @@ -141,7 +141,7 @@ VOID ixheaacd_res_ctns_apply(ia_mps_dec_residual_channel_info_struct *p_aac_deco WORD32 *p_tmp = p_spectrum + (window * maximum_bins_short) + start; scale_spec = -scale_spec; - scale_spec = ixheaacd_min32(scale_spec, 31); + scale_spec = ixheaac_min32(scale_spec, 31); for (i = size; i != 0; i--) { *p_tmp = (*p_tmp >> scale_spec); diff --git a/decoder/ixheaacd_mps_res_pulsedata.c b/decoder/ixheaacd_mps_res_pulsedata.c index 4cd2662..6f7a137 100644 --- a/decoder/ixheaacd_mps_res_pulsedata.c +++ b/decoder/ixheaacd_mps_res_pulsedata.c @@ -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_bitbuffer.h" #include "ixheaacd_mps_aac_struct.h" #include "ixheaacd_mps_res_rom.h" diff --git a/decoder/ixheaacd_mps_res_tns.c b/decoder/ixheaacd_mps_res_tns.c index b34414c..f147b08 100644 --- a/decoder/ixheaacd_mps_res_tns.c +++ b/decoder/ixheaacd_mps_res_tns.c @@ -17,12 +17,12 @@ ***************************************************************************** * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ -#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" VOID ixheaacd_res_tns_parcor_2_lpc_32x16(WORD16 *parcor, WORD16 *lpc, WORD16 *scale, WORD order) @@ -50,20 +50,20 @@ VOID ixheaacd_res_tns_parcor_2_lpc_32x16(WORD16 *parcor, WORD16 *lpc, WORD16 *sc z1 = accu1; for (j = 0; j < order; j++) { - w[j] = ixheaacd_round16(accu1); + w[j] = ixheaac_round16(accu1); - accu1 = ixheaacd_mac16x16in32_shl_sat(accu1, parcor[j], z[j]); - if (ixheaacd_abs32_sat(accu1) == 0x7fffffff) status = 1; + accu1 = ixheaac_mac16x16in32_shl_sat(accu1, parcor[j], z[j]); + if (ixheaac_abs32_sat(accu1) == 0x7fffffff) status = 1; } for (j = (order - 1); j >= 0; j--) { - accu2 = ixheaacd_deposit16h_in32(z[j]); - accu2 = ixheaacd_mac16x16in32_shl_sat(accu2, parcor[j], w[j]); - z[j + 1] = ixheaacd_round16(accu2); - if (ixheaacd_abs32_sat(accu2) == 0x7fffffff) status = 1; + accu2 = ixheaac_deposit16h_in32(z[j]); + accu2 = ixheaac_mac16x16in32_shl_sat(accu2, parcor[j], w[j]); + z[j + 1] = ixheaac_round16(accu2); + if (ixheaac_abs32_sat(accu2) == 0x7fffffff) status = 1; } - z[0] = ixheaacd_round16(z1); - lpc[i] = ixheaacd_round16(accu1); + z[0] = ixheaac_round16(z1); + lpc[i] = ixheaac_round16(accu1); accu1 = 0; } accu1 = (status - 1); @@ -91,11 +91,11 @@ VOID ixheaacd_res_tns_ar_filter_fixed_32x16(WORD32 *spectrum, WORD32 size, WORD3 for (i = 0; i < order; i++) { y = (*spectrum) << scale_spec; for (j = i; j > 0; j--) { - y = ixheaacd_sub32_sat(y, ixheaacd_mult32x16in32_shl_sat(state[j - 1], lpc[j])); + y = ixheaac_sub32_sat(y, ixheaac_mult32x16in32_shl_sat(state[j - 1], lpc[j])); state[j] = state[j - 1]; } - state[0] = ixheaacd_shl32_dir_sat_limit(y, shift_value); + state[0] = ixheaac_shl32_dir_sat_limit(y, shift_value); *spectrum = y >> scale_spec; spectrum += inc; } @@ -104,11 +104,11 @@ VOID ixheaacd_res_tns_ar_filter_fixed_32x16(WORD32 *spectrum, WORD32 size, WORD3 y = (*spectrum) << scale_spec; for (j = order; j > 0; j--) { - y = ixheaacd_sub32_sat(y, ixheaacd_mult32x16in32_shl_sat(state[j - 1], lpc[j])); + y = ixheaac_sub32_sat(y, ixheaac_mult32x16in32_shl_sat(state[j - 1], lpc[j])); state[j] = state[j - 1]; } - state[0] = ixheaacd_shl32_dir_sat_limit(y, shift_value); + state[0] = ixheaac_shl32_dir_sat_limit(y, shift_value); *spectrum = y >> scale_spec; spectrum += inc; } @@ -125,28 +125,28 @@ WORD32 ixheaacd_res_calc_max_spectral_line(WORD32 *p_tmp, WORD32 size) { temp3 = *p_tmp++; temp4 = *p_tmp++; - max_spectral_line = ixheaacd_abs32_nrm(temp_1) | max_spectral_line; - max_spectral_line = ixheaacd_abs32_nrm(temp_2) | max_spectral_line; - max_spectral_line = ixheaacd_abs32_nrm(temp3) | max_spectral_line; - max_spectral_line = ixheaacd_abs32_nrm(temp4) | max_spectral_line; + max_spectral_line = ixheaac_abs32_nrm(temp_1) | max_spectral_line; + max_spectral_line = ixheaac_abs32_nrm(temp_2) | max_spectral_line; + max_spectral_line = ixheaac_abs32_nrm(temp3) | max_spectral_line; + max_spectral_line = ixheaac_abs32_nrm(temp4) | max_spectral_line; temp_1 = *p_tmp++; temp_2 = *p_tmp++; temp3 = *p_tmp++; temp4 = *p_tmp++; - max_spectral_line = ixheaacd_abs32_nrm(temp_1) | max_spectral_line; - max_spectral_line = ixheaacd_abs32_nrm(temp_2) | max_spectral_line; - max_spectral_line = ixheaacd_abs32_nrm(temp3) | max_spectral_line; - max_spectral_line = ixheaacd_abs32_nrm(temp4) | max_spectral_line; + max_spectral_line = ixheaac_abs32_nrm(temp_1) | max_spectral_line; + max_spectral_line = ixheaac_abs32_nrm(temp_2) | max_spectral_line; + max_spectral_line = ixheaac_abs32_nrm(temp3) | max_spectral_line; + max_spectral_line = ixheaac_abs32_nrm(temp4) | max_spectral_line; } remaining = size - (count << 3); if (remaining) { for (i = remaining; i--;) { - max_spectral_line = ixheaacd_abs32_nrm(*p_tmp) | max_spectral_line; + max_spectral_line = ixheaac_abs32_nrm(*p_tmp) | max_spectral_line; p_tmp++; } } - return ixheaacd_norm32(max_spectral_line); + return ixheaac_norm32(max_spectral_line); } diff --git a/decoder/ixheaacd_mps_reshape_bb_env.c b/decoder/ixheaacd_mps_reshape_bb_env.c index 773722a..e432343 100644 --- a/decoder/ixheaacd_mps_reshape_bb_env.c +++ b/decoder/ixheaacd_mps_reshape_bb_env.c @@ -17,13 +17,13 @@ ***************************************************************************** * 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 "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_error_codes.h" #include "ixheaacd_common_rom.h" @@ -41,7 +41,7 @@ #include "ixheaacd_mps_macro_def.h" #include "ixheaacd_mps_basic_op.h" #include "ixheaacd_mps_reshape_bb_env.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" #define ALIGN_SIZE64(x) ((((x) + 7) >> 3) << 3) @@ -189,8 +189,8 @@ static VOID ixheaacd_extract_bb_env(ia_heaac_mps_state_struct *pstr_mps_state, W for (pb = start_p; pb <= end_p; pb++) { *n_slot_nrg = ixheaacd_mps_narrow(*slot_nrg, q_slot_nrg); slot_nrg++; - temp_1 = ixheaacd_mult32x16in32(*n_slot_nrg, one_min_alpha_fix); - temp4 = ixheaacd_mult32x16in32((part_nrg_fix[pb]) << 1, alpha_fix); + temp_1 = ixheaac_mult32x16in32(*n_slot_nrg, one_min_alpha_fix); + temp4 = ixheaac_mult32x16in32((part_nrg_fix[pb]) << 1, alpha_fix); part_nrg_fix[pb] = ixheaacd_mps_reshape_add32(temp4, temp_1, &q_part_nrg_fix[pb], *q_slot_nrg); @@ -198,10 +198,10 @@ static VOID ixheaacd_extract_bb_env(ia_heaac_mps_state_struct *pstr_mps_state, W &q_frame_nrg_fix, *q_slot_nrg++); } - frame_nrg_fix = ixheaacd_mult32x16in32(frame_nrg_fix, one_by_nine); + frame_nrg_fix = ixheaac_mult32x16in32(frame_nrg_fix, one_by_nine); - temp_1 = ixheaacd_mult32x16in32(frame_nrg_fix, one_min_alpha_fix); - temp4 = ixheaacd_mult32x16in32((frame_nrg_prev) << 1, alpha_fix); + temp_1 = ixheaac_mult32x16in32(frame_nrg_fix, one_min_alpha_fix); + temp4 = ixheaac_mult32x16in32((frame_nrg_prev) << 1, alpha_fix); frame_nrg_fix = ixheaacd_mps_reshape_add32(temp_1, temp4, &q_frame_nrg_fix, q_frame_nrg_prev); @@ -223,8 +223,8 @@ static VOID ixheaacd_extract_bb_env(ia_heaac_mps_state_struct *pstr_mps_state, W env_fix_l = ixheaacd_mps_mult32x32(env_fix_l, frame_nrg_fix, &q_env_fix_l, q_frame_nrg_fix); - temp_1 = ixheaacd_mult32x16in32(env_fix_l, one_min_beta_fix); - temp4 = ixheaacd_mult32x16in32((*norm_nrg_fix) << 1, beta_fix); + temp_1 = ixheaac_mult32x16in32(env_fix_l, one_min_beta_fix); + temp4 = ixheaac_mult32x16in32((*norm_nrg_fix) << 1, beta_fix); *norm_nrg_fix = ixheaacd_mps_reshape_add32(temp4, temp_1, q_norm_nrg_fix, q_env_fix_l); if (flag) { @@ -307,18 +307,18 @@ static VOID ixheaacd_extract_bb_env(ia_heaac_mps_state_struct *pstr_mps_state, W for (pb = start_p; pb <= end_p; pb++) { *n_slot_nrg = ixheaacd_mps_narrow(*slot_nrg, q_slot_nrg); slot_nrg++; - temp_1 = ixheaacd_mult32x16in32(*n_slot_nrg, one_min_alpha_fix); - temp4 = ixheaacd_mult32x16in32((part_nrg_fix[pb]) << 1, alpha_fix); + temp_1 = ixheaac_mult32x16in32(*n_slot_nrg, one_min_alpha_fix); + temp4 = ixheaac_mult32x16in32((part_nrg_fix[pb]) << 1, alpha_fix); part_nrg_fix[pb] = ixheaacd_mps_reshape_add32(temp4, temp_1, &q_part_nrg_fix[pb], *q_slot_nrg); frame_nrg_fix = ixheaacd_mps_reshape_add32(frame_nrg_fix, *n_slot_nrg++, &q_frame_nrg_fix, *q_slot_nrg++); } - frame_nrg_fix = ixheaacd_mult32x16in32(frame_nrg_fix, one_by_nine); + frame_nrg_fix = ixheaac_mult32x16in32(frame_nrg_fix, one_by_nine); - temp_1 = ixheaacd_mult32x16in32(frame_nrg_fix, one_min_alpha_fix); - temp4 = ixheaacd_mult32x16in32((frame_nrg_prev) << 1, alpha_fix); + temp_1 = ixheaac_mult32x16in32(frame_nrg_fix, one_min_alpha_fix); + temp4 = ixheaac_mult32x16in32((frame_nrg_prev) << 1, alpha_fix); frame_nrg_fix = ixheaacd_mps_reshape_add32(temp_1, temp4, &q_frame_nrg_fix, q_frame_nrg_prev); @@ -340,8 +340,8 @@ static VOID ixheaacd_extract_bb_env(ia_heaac_mps_state_struct *pstr_mps_state, W env_fix_l = ixheaacd_mps_mult32x32(env_fix_l, frame_nrg_fix, &q_env_fix_l, q_frame_nrg_fix); - temp_1 = ixheaacd_mult32x16in32(env_fix_l, one_min_beta_fix); - temp4 = ixheaacd_mult32x16in32((*norm_nrg_fix) << 1, beta_fix); + temp_1 = ixheaac_mult32x16in32(env_fix_l, one_min_beta_fix); + temp4 = ixheaac_mult32x16in32((*norm_nrg_fix) << 1, beta_fix); *norm_nrg_fix = ixheaacd_mps_reshape_add32(temp4, temp_1, q_norm_nrg_fix, q_env_fix_l); temp_1 = ixheaacd_mps_div_32(env_fix_l, *norm_nrg_fix, &qtemp1); diff --git a/decoder/ixheaacd_mps_rom.c b/decoder/ixheaacd_mps_rom.c index a73f255..8e609bb 100644 --- a/decoder/ixheaacd_mps_rom.c +++ b/decoder/ixheaacd_mps_rom.c @@ -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_mps_struct_def.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_common_rom.h" diff --git a/decoder/ixheaacd_mps_smoothing.c b/decoder/ixheaacd_mps_smoothing.c index 875f389..f4f5628 100644 --- a/decoder/ixheaacd_mps_smoothing.c +++ b/decoder/ixheaacd_mps_smoothing.c @@ -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_bitbuffer.h" #include "ixheaacd_common_rom.h" #include "ixheaacd_sbrdecsettings.h" @@ -32,11 +32,11 @@ #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_mps_dec.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" #include "ixheaacd_error_codes.h" #include "ixheaacd_mps_macro_def.h" #include "ixheaacd_mps_smoothing.h" @@ -180,13 +180,13 @@ VOID ixheaacd_mps_smoothing_opd(ia_mps_dec_state_struct *self) { rtemp += 2 * PI_IN_Q27; self->opd_smooth.smooth_l_phase[pb] = - (ixheaacd_mult32_shl(delta, ltemp) + - ixheaacd_mult32_shl(one_minus_delta, + (ixheaac_mult32_shl(delta, ltemp) + + ixheaac_mult32_shl(one_minus_delta, self->opd_smooth.smooth_l_phase[pb])) << 1; self->opd_smooth.smooth_r_phase[pb] = - (ixheaacd_mult32_shl(delta, rtemp) + - ixheaacd_mult32_shl(one_minus_delta, + (ixheaac_mult32_shl(delta, rtemp) + + ixheaac_mult32_shl(one_minus_delta, self->opd_smooth.smooth_r_phase[pb])) << 1; @@ -195,7 +195,7 @@ VOID ixheaacd_mps_smoothing_opd(ia_mps_dec_state_struct *self) { while (tmp > PI_IN_Q27) tmp -= 2 * PI_IN_Q27; while (tmp < -PI_IN_Q27) tmp += 2 * PI_IN_Q27; - if (ixheaacd_abs32(tmp) > thr) { + if (ixheaac_abs32(tmp) > thr) { self->opd_smooth.smooth_l_phase[pb] = ltemp; self->opd_smooth.smooth_r_phase[pb] = rtemp; } diff --git a/decoder/ixheaacd_mps_temp_process.c b/decoder/ixheaacd_mps_temp_process.c index fe5271b..3d676bd 100644 --- a/decoder/ixheaacd_mps_temp_process.c +++ b/decoder/ixheaacd_mps_temp_process.c @@ -18,8 +18,8 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#include "ixheaacd_type_def.h" -#include "ixheaacd_constants.h" +#include "ixheaac_type_def.h" +#include "ixheaac_constants.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_common_rom.h" #include "ixheaacd_sbrdecsettings.h" @@ -39,12 +39,12 @@ #include "ixheaacd_lpp_tran.h" #include "ixheaacd_env_extr.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" #include "ixheaacd_audioobjtypes.h" -#include "ixheaacd_basic_ops32.h" -#include "ixheaacd_basic_ops40.h" +#include "ixheaac_basic_ops32.h" +#include "ixheaac_basic_ops40.h" #include "ixheaacd_mps_bitdec.h" #include "ixheaacd_mps_macro_def.h" #include "ixheaacd_mps_get_index.h" @@ -819,7 +819,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_lf] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_lf], &qtemp2); q_scale[i_lf] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_lf]; } else { - temp_1 = ixheaacd_norm32(dry_ener[0]); + temp_1 = ixheaac_norm32(dry_ener[0]); scale[i_lf] = dry_ener[0] << temp_1; q_scale[i_lf] = q_dry_ener[0] + temp_1 - 30; } @@ -829,7 +829,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_rf] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_rf], &qtemp2); q_scale[i_rf] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_rf]; } else { - temp_1 = ixheaacd_norm32(dry_ener[0]); + temp_1 = ixheaac_norm32(dry_ener[0]); scale[i_rf] = dry_ener[0] << temp_1; q_scale[i_rf] = q_dry_ener[0] + temp_1 - 30; } @@ -839,7 +839,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_c] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_c], &qtemp2); q_scale[i_c] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_c]; } else { - temp_1 = ixheaacd_norm32(dry_ener[0]); + temp_1 = ixheaac_norm32(dry_ener[0]); scale[i_c] = dry_ener[0] << temp_1; q_scale[i_c] = q_dry_ener[0] + temp_1 - 30; } @@ -849,7 +849,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_ls] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_ls], &qtemp2); q_scale[i_ls] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_ls]; } else { - temp_1 = ixheaacd_norm32(dry_ener[0]); + temp_1 = ixheaac_norm32(dry_ener[0]); scale[i_ls] = dry_ener[0] << temp_1; q_scale[i_ls] = q_dry_ener[0] + temp_1 - 30; } @@ -859,7 +859,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_rs] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_rs], &qtemp2); q_scale[i_rs] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_rs]; } else { - temp_1 = ixheaacd_norm32(dry_ener[0]); + temp_1 = ixheaac_norm32(dry_ener[0]); scale[i_rs] = dry_ener[0] << temp_1; q_scale[i_rs] = q_dry_ener[0] + temp_1 - 30; } @@ -881,7 +881,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_lf] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_lf], &qtemp2); q_scale[i_lf] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_lf]; } else { - temp_1 = ixheaacd_norm32(dry_ener[0]); + temp_1 = ixheaac_norm32(dry_ener[0]); scale[i_lf] = dry_ener[0] << temp_1; q_scale[i_lf] = q_dry_ener[0] + temp_1 - 30; } @@ -891,7 +891,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_rf] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rf], &qtemp2); q_scale[i_rf] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rf]; } else { - temp_1 = ixheaacd_norm32(dry_ener[1]); + temp_1 = ixheaac_norm32(dry_ener[1]); scale[i_rf] = dry_ener[1] << temp_1; q_scale[i_rf] = q_dry_ener[1] + temp_1 - 30; } @@ -901,7 +901,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_ls] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_ls], &qtemp2); q_scale[i_ls] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_ls]; } else { - temp_1 = ixheaacd_norm32(dry_ener[0]); + temp_1 = ixheaac_norm32(dry_ener[0]); scale[i_ls] = dry_ener[0] << temp_1; q_scale[i_ls] = q_dry_ener[0] + temp_1 - 30; } @@ -911,7 +911,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_rs] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rs], &qtemp2); q_scale[i_rs] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rs]; } else { - temp_1 = ixheaacd_norm32(dry_ener[1]); + temp_1 = ixheaac_norm32(dry_ener[1]); scale[i_rs] = dry_ener[1] << temp_1; q_scale[i_rs] = q_dry_ener[1] + temp_1 - 30; } @@ -932,7 +932,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_lf] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_lf], &qtemp2); q_scale[i_lf] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_lf]; } else { - temp_1 = ixheaacd_norm32(dry_ener[0]); + temp_1 = ixheaac_norm32(dry_ener[0]); scale[i_lf] = dry_ener[0] << temp_1; q_scale[i_lf] = q_dry_ener[0] + temp_1 - 30; } @@ -942,7 +942,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_rf] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rf], &qtemp2); q_scale[i_rf] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rf]; } else { - temp_1 = ixheaacd_norm32(dry_ener[1]); + temp_1 = ixheaac_norm32(dry_ener[1]); scale[i_rf] = dry_ener[1] << temp_1; q_scale[i_rf] = q_dry_ener[1] + temp_1 - 30; } @@ -952,7 +952,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_ls] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_ls], &qtemp2); q_scale[i_ls] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_ls]; } else { - temp_1 = ixheaacd_norm32(dry_ener[0]); + temp_1 = ixheaac_norm32(dry_ener[0]); scale[i_ls] = dry_ener[0] << temp_1; q_scale[i_ls] = q_dry_ener[0] + temp_1 - 30; } @@ -962,7 +962,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_rs] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rs], &qtemp2); q_scale[i_rs] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rs]; } else { - temp_1 = ixheaacd_norm32(dry_ener[1]); + temp_1 = ixheaac_norm32(dry_ener[1]); scale[i_rs] = dry_ener[1] << temp_1; q_scale[i_rs] = q_dry_ener[1] + temp_1 - 30; } @@ -972,7 +972,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_al] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_al], &qtemp2); q_scale[i_al] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_al]; } else { - temp_1 = ixheaacd_norm32(dry_ener[0]); + temp_1 = ixheaac_norm32(dry_ener[0]); scale[i_al] = dry_ener[0] << temp_1; q_scale[i_al] = q_dry_ener[0] + temp_1 - 30; } @@ -982,7 +982,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_ar] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_ar], &qtemp2); q_scale[i_ar] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_ar]; } else { - temp_1 = ixheaacd_norm32(dry_ener[1]); + temp_1 = ixheaac_norm32(dry_ener[1]); scale[i_ar] = dry_ener[1] << temp_1; q_scale[i_ar] = q_dry_ener[1] + temp_1 - 30; } @@ -1003,7 +1003,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_lf] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_lf], &qtemp2); q_scale[i_lf] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_lf]; } else { - temp_1 = ixheaacd_norm32(dry_ener[0]); + temp_1 = ixheaac_norm32(dry_ener[0]); scale[i_lf] = dry_ener[0] << temp_1; q_scale[i_lf] = q_dry_ener[0] + temp_1 - 30; } @@ -1013,7 +1013,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_rf] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rf], &qtemp2); q_scale[i_rf] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rf]; } else { - temp_1 = ixheaacd_norm32(dry_ener[1]); + temp_1 = ixheaac_norm32(dry_ener[1]); scale[i_rf] = dry_ener[1] << temp_1; q_scale[i_rf] = q_dry_ener[1] + temp_1 - 30; } @@ -1023,7 +1023,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_al] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_al], &qtemp2); q_scale[i_al] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_al]; } else { - temp_1 = ixheaacd_norm32(dry_ener[0]); + temp_1 = ixheaac_norm32(dry_ener[0]); scale[i_al] = dry_ener[0] << temp_1; q_scale[i_al] = q_dry_ener[0] + temp_1 - 30; } @@ -1033,7 +1033,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_ar] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_ar], &qtemp2); q_scale[i_ar] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_ar]; } else { - temp_1 = ixheaacd_norm32(dry_ener[1]); + temp_1 = ixheaac_norm32(dry_ener[1]); scale[i_ar] = dry_ener[1] << temp_1; q_scale[i_ar] = q_dry_ener[1] + temp_1 - 30; } @@ -1054,7 +1054,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_ls] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_ls], &qtemp2); q_scale[i_ls] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_ls]; } else { - temp_1 = ixheaacd_norm32(dry_ener[0]); + temp_1 = ixheaac_norm32(dry_ener[0]); scale[i_ls] = dry_ener[0] << temp_1; q_scale[i_ls] = q_dry_ener[0] + temp_1 - 30; } @@ -1064,7 +1064,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_rs] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_rs], &qtemp2); q_scale[i_rs] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_rs]; } else { - temp_1 = ixheaacd_norm32(dry_ener[1]); + temp_1 = ixheaac_norm32(dry_ener[1]); scale[i_rs] = dry_ener[1] << temp_1; q_scale[i_rs] = q_dry_ener[1] + temp_1 - 30; } @@ -1074,7 +1074,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_al] = ixheaacd_mps_div_32(dry_ener[0], wet_ener[i_al], &qtemp2); q_scale[i_al] = qtemp2 + q_dry_ener[0] - q_wet_ener[i_al]; } else { - temp_1 = ixheaacd_norm32(dry_ener[0]); + temp_1 = ixheaac_norm32(dry_ener[0]); scale[i_al] = dry_ener[0] << temp_1; q_scale[i_al] = q_dry_ener[0] + temp_1 - 30; } @@ -1084,7 +1084,7 @@ static VOID ixheaacd_subband_tp(ia_heaac_mps_state_struct *pstr_mps_state, WORD3 scale[i_ar] = ixheaacd_mps_div_32(dry_ener[1], wet_ener[i_ar], &qtemp2); q_scale[i_ar] = qtemp2 + q_dry_ener[1] - q_wet_ener[i_ar]; } else { - temp_1 = ixheaacd_norm32(dry_ener[1]); + temp_1 = ixheaac_norm32(dry_ener[1]); scale[i_ar] = dry_ener[1] << temp_1; q_scale[i_ar] = q_dry_ener[1] + temp_1 - 30; } diff --git a/decoder/ixheaacd_mps_temp_reshape.c b/decoder/ixheaacd_mps_temp_reshape.c index 2138c78..f9d21dd 100644 --- a/decoder/ixheaacd_mps_temp_reshape.c +++ b/decoder/ixheaacd_mps_temp_reshape.c @@ -18,8 +18,8 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#include "ixheaacd_type_def.h" -#include "ixheaacd_constants.h" +#include "ixheaac_type_def.h" +#include "ixheaac_constants.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_common_rom.h" #include "ixheaacd_sbrdecsettings.h" diff --git a/decoder/ixheaacd_mps_tonality.c b/decoder/ixheaacd_mps_tonality.c index 34a6a7e..325b474 100644 --- a/decoder/ixheaacd_mps_tonality.c +++ b/decoder/ixheaacd_mps_tonality.c @@ -18,13 +18,13 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#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_error_codes.h" #include "ixheaacd_common_rom.h" diff --git a/decoder/ixheaacd_multichannel.c b/decoder/ixheaacd_multichannel.c index 849e243..317f74d 100644 --- a/decoder/ixheaacd_multichannel.c +++ b/decoder/ixheaacd_multichannel.c @@ -19,14 +19,14 @@ */ #include -#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" @@ -85,7 +85,7 @@ #include "ixheaacd_headerdecode.h" #include "ixheaacd_multichannel.h" -#include "ixheaacd_basic_op.h" +#include "ixheaac_basic_op.h" WORD cblock_decode_huff_symbol(UWORD8 *ptr_read_next, WORD32 bit_pos, const UWORD16 *huff_ori, WORD16 *input, @@ -249,7 +249,7 @@ IA_ERRORCODE ixheaacd_dec_coupling_channel_element( ind_channel_info->cc_gain[c] = common_tables_ptr->cc_gain_scale[gain_element_scale]; for (i = 0; i < (-norm_value) - 1; i++) { - ind_channel_info->cc_gain[c] = ixheaacd_mul32_sh( + ind_channel_info->cc_gain[c] = ixheaac_mul32_sh( ind_channel_info->cc_gain[c], common_tables_ptr->cc_gain_scale[gain_element_scale], 29); } @@ -273,9 +273,9 @@ void ixheaacd_dec_couple_channel(WORD32 *p_time_data, WORD32 *out_samp_cc, WORD32 out_cc; WORD32 *ptr_out_samp = &out_samp_cc[0]; for (i = frame_size - 1; i >= 0; i--) { - out_cc = (ixheaacd_shl32_sat( - ixheaacd_mult32x16in32(*ptr_out_samp++, gain_cc), 3)); - *p_time_data = ixheaacd_add32_sat(out_cc, *p_time_data); + out_cc = (ixheaac_shl32_sat( + ixheaac_mult32x16in32(*ptr_out_samp++, gain_cc), 3)); + *p_time_data = ixheaac_add32_sat(out_cc, *p_time_data); p_time_data += total_channels; } } @@ -326,7 +326,7 @@ IA_ERRORCODE ixheaacd_dec_ind_coupling( if (ind_channel_info->cc_target_is_cpe[c] == 0) { WORD32 *p_time_data = &ptr_time_data[k]; - WORD16 gain_cc = ixheaacd_round16(ind_channel_info->cc_gain[j]); + WORD16 gain_cc = ixheaac_round16(ind_channel_info->cc_gain[j]); ixheaacd_dec_couple_channel(p_time_data, out_samp_cc, frame_size, total_channels, gain_cc); @@ -335,7 +335,7 @@ IA_ERRORCODE ixheaacd_dec_ind_coupling( if (ind_channel_info->cc_l[c] == 1) { WORD32 *p_time_data = &ptr_time_data[k]; - WORD16 gain_cc = ixheaacd_round16(ind_channel_info->cc_gain[j]); + WORD16 gain_cc = ixheaac_round16(ind_channel_info->cc_gain[j]); ixheaacd_dec_couple_channel(p_time_data, out_samp_cc, frame_size, total_channels, gain_cc); @@ -345,7 +345,7 @@ IA_ERRORCODE ixheaacd_dec_ind_coupling( if (ind_channel_info->cc_r[c] == 1) { WORD32 *p_time_data = &ptr_time_data[k + 1]; - WORD16 gain_cc = ixheaacd_round16(ind_channel_info->cc_gain[j + 1]); + WORD16 gain_cc = ixheaac_round16(ind_channel_info->cc_gain[j + 1]); ixheaacd_dec_couple_channel(p_time_data, out_samp_cc, frame_size, total_channels, gain_cc); @@ -377,7 +377,7 @@ void ixheaacd_dec_downmix_to_stereo( if (0 == p_obj_exhaacplus_dec->aac_config.element_type[i] || 3 == p_obj_exhaacplus_dec->aac_config.element_type[i]) { temp_l += (WORD16)( - ixheaacd_mult32x16in32( + ixheaac_mult32x16in32( p_obj_exhaacplus_dec->common_tables->down_mix_martix [k][0][p_obj_exhaacplus_dec->aac_config.slot_element[i]], ptr_time_data[j * total_channels + @@ -386,7 +386,7 @@ void ixheaacd_dec_downmix_to_stereo( 14); temp_r += (WORD16)( - ixheaacd_mult32x16in32( + ixheaac_mult32x16in32( p_obj_exhaacplus_dec->common_tables->down_mix_martix [k][1][p_obj_exhaacplus_dec->aac_config.slot_element[i]], ptr_time_data[j * total_channels + @@ -396,7 +396,7 @@ void ixheaacd_dec_downmix_to_stereo( } if (1 == p_obj_exhaacplus_dec->aac_config.element_type[i]) { temp_l += (WORD16)( - ixheaacd_mult32x16in32( + ixheaac_mult32x16in32( p_obj_exhaacplus_dec->common_tables->down_mix_martix [k][0][p_obj_exhaacplus_dec->aac_config.slot_element[i]], ptr_time_data[j * total_channels + @@ -405,7 +405,7 @@ void ixheaacd_dec_downmix_to_stereo( 14); temp_r += (WORD16)( - ixheaacd_mult32x16in32( + ixheaac_mult32x16in32( p_obj_exhaacplus_dec->common_tables->down_mix_martix [k][1] [p_obj_exhaacplus_dec->aac_config.slot_element[i] + 1], diff --git a/decoder/ixheaacd_peak_limiter.c b/decoder/ixheaacd_peak_limiter.c index d5f2b4b..bbd6fd8 100644 --- a/decoder/ixheaacd_peak_limiter.c +++ b/decoder/ixheaacd_peak_limiter.c @@ -19,12 +19,12 @@ */ #include #include -#include "ixheaacd_type_def.h" +#include "ixheaac_type_def.h" #include "ixheaacd_cnst.h" #include "ixheaacd_peak_limiter_struct_def.h" -#include "ixheaacd_constants.h" -#include "ixheaacd_basic_ops32.h" -#include "ixheaacd_basic_ops16.h" +#include "ixheaac_constants.h" +#include "ixheaac_basic_ops32.h" +#include "ixheaac_basic_ops16.h" #define MAX(x, y) ((x) > (y) ? (x) : (y)) #define MIN(x, y) ((x) > (y) ? (y) : (x)) diff --git a/decoder/ixheaacd_pns_js_thumb.c b/decoder/ixheaacd_pns_js_thumb.c index b41e201..e6ba987 100644 --- a/decoder/ixheaacd_pns_js_thumb.c +++ b/decoder/ixheaacd_pns_js_thumb.c @@ -21,12 +21,12 @@ #include #include #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" @@ -36,7 +36,7 @@ #include "ixheaacd_common_rom.h" #include "ixheaacd_basic_funcs.h" #include "ixheaacd_aac_imdct.h" -#include "ixheaacd_basic_op.h" +#include "ixheaac_basic_op.h" #include "ixheaacd_intrinsics.h" #include "ixheaacd_pulsedata.h" @@ -83,26 +83,26 @@ VOID ixheaacd_gen_rand_vec(WORD32 scale, WORD shift, WORD32 *ptr_spec_coef, *spec = (*seed >> 3); - nrg = ixheaacd_add32_sat(nrg, ixheaacd_mult32_shl_sat(*spec, *spec)); + nrg = ixheaac_add32_sat(nrg, ixheaac_mult32_shl_sat(*spec, *spec)); spec++; } - nrg_scale = ixheaacd_norm32(nrg); + nrg_scale = ixheaac_norm32(nrg); if (nrg_scale > 0) { nrg_scale &= ~1; - nrg = ixheaacd_shl32_sat(nrg, nrg_scale); + nrg = ixheaac_shl32_sat(nrg, nrg_scale); shift = shift - (nrg_scale >> 1); } nrg = ixheaacd_sqrt(nrg); - scale = ixheaacd_div32_pos_normb(scale, nrg); + scale = ixheaac_div32_pos_normb(scale, nrg); spec = ptr_spec_coef; for (sfb = 0; sfb <= sfb_width; sfb++) { - *spec = ixheaacd_shr32_dir_sat_limit(ixheaacd_mult32_shl_sat(*spec, scale), + *spec = ixheaac_shr32_dir_sat_limit(ixheaac_mult32_shl_sat(*spec, scale), shift); spec++; } @@ -331,12 +331,12 @@ VOID ixheaacd_aac_tns_process( ixheaacd_tns_decode_coef(filter, parcor_coef_16, ptr_aac_tables); } - start = ixheaacd_min32(ixheaacd_min32(filter->start_band, tns_max_bands), + start = ixheaac_min32(ixheaac_min32(filter->start_band, tns_max_bands), ptr_ics_info->max_sfb); start = ptr_sfb_table[start]; - stop = ixheaacd_min32(ixheaacd_min32(filter->stop_band, tns_max_bands), + stop = ixheaac_min32(ixheaac_min32(filter->stop_band, tns_max_bands), ptr_ics_info->max_sfb); stop = ptr_sfb_table[stop]; @@ -399,7 +399,7 @@ VOID ixheaacd_aac_tns_process( } if (scale_spec > 0) { - scale_spec = ixheaacd_min32(scale_spec, 31); + scale_spec = ixheaac_min32(scale_spec, 31); if ((object_type == AOT_ER_AAC_LD) || (object_type == AOT_AAC_LTP) || (num_ch > 2)) { @@ -452,7 +452,7 @@ VOID ixheaacd_aac_tns_process( ptr_tmp = spec + (win >> 7) + start; scale_spec = -scale_spec; - scale_spec = ixheaacd_min32(scale_spec, 31); + scale_spec = ixheaac_min32(scale_spec, 31); for (i = size; i != 0; i--) { *ptr_tmp = (*ptr_tmp >> scale_spec); diff --git a/decoder/ixheaacd_pred_vec_block.c b/decoder/ixheaacd_pred_vec_block.c index 11ea410..872aa08 100644 --- a/decoder/ixheaacd_pred_vec_block.c +++ b/decoder/ixheaacd_pred_vec_block.c @@ -21,8 +21,8 @@ #include #include #include -#include "ixheaacd_type_def.h" -#include "ixheaacd_sbr_const.h" +#include "ixheaac_type_def.h" +#include "ixheaac_sbr_const.h" #include "ixheaacd_pvc_dec.h" #include "ixheaacd_pvc_rom.h" diff --git a/decoder/ixheaacd_process.c b/decoder/ixheaacd_process.c index 599908b..6b3acf6 100644 --- a/decoder/ixheaacd_process.c +++ b/decoder/ixheaacd_process.c @@ -20,8 +20,8 @@ #include #include #include -#include "ixheaacd_constants.h" -#include "ixheaacd_type_def.h" +#include "ixheaac_constants.h" +#include "ixheaac_type_def.h" #include "ixheaacd_memory_standards.h" #include "ixheaacd_sbrdecsettings.h" #include "ixheaacd_env_extr_part.h" @@ -75,7 +75,7 @@ #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_ec.h" #include "ixheaacd_arith_dec.h" diff --git a/decoder/ixheaacd_ps_bitdec.c b/decoder/ixheaacd_ps_bitdec.c index 298b602..4cc3417 100644 --- a/decoder/ixheaacd_ps_bitdec.c +++ b/decoder/ixheaacd_ps_bitdec.c @@ -19,15 +19,15 @@ */ #include #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_sbrdecsettings.h" @@ -84,7 +84,7 @@ WORD16 ixheaacd_divideby3(WORD op) { temp = (WORD16)(op << 2); - temp = ixheaacd_mult16_shl(temp, 0x2aab); + temp = ixheaac_mult16_shl(temp, 0x2aab); ret = (temp >> 2); @@ -128,20 +128,20 @@ VOID ixheaacd_decode_ps_data(ia_ps_dec_struct *ptr_ps_dec, WORD32 frame_size) { if (ptr_ps_dec->iid_dt[e]) { for (i = 0; i < ixheaacd_num_bands[ptr_ps_dec->iid_mode]; i++) { temp = - ixheaacd_add16(*p_iid_par_prev, ptr_ps_dec->iid_par_table[e][i]); + ixheaac_add16(*p_iid_par_prev, ptr_ps_dec->iid_par_table[e][i]); ptr_ps_dec->iid_par_table[e][i] = ixheaacd_clamp( - temp, ixheaacd_negate16(num_iid_levels), num_iid_levels); + temp, ixheaac_negate16(num_iid_levels), num_iid_levels); p_iid_par_prev += iid_mode; } } else { ptr_ps_dec->iid_par_table[e][0] = ixheaacd_clamp(ptr_ps_dec->iid_par_table[e][0], - ixheaacd_negate16(num_iid_levels), num_iid_levels); + ixheaac_negate16(num_iid_levels), num_iid_levels); for (i = 1; i < ixheaacd_num_bands[ptr_ps_dec->iid_mode]; i++) { - temp = ixheaacd_add16(ptr_ps_dec->iid_par_table[e][i - 1], + temp = ixheaac_add16(ptr_ps_dec->iid_par_table[e][i - 1], ptr_ps_dec->iid_par_table[e][i]); ptr_ps_dec->iid_par_table[e][i] = ixheaacd_clamp( - temp, ixheaacd_negate16(num_iid_levels), num_iid_levels); + temp, ixheaac_negate16(num_iid_levels), num_iid_levels); } } } else { @@ -153,7 +153,7 @@ VOID ixheaacd_decode_ps_data(ia_ps_dec_struct *ptr_ps_dec, WORD32 frame_size) { for (i = (ixheaacd_num_bands[ptr_ps_dec->iid_mode] * iid_mode - 1); i != 0; i--) { ptr_ps_dec->iid_par_table[e][i] = - ptr_ps_dec->iid_par_table[e][ixheaacd_shr32(i, 1)]; + ptr_ps_dec->iid_par_table[e][ixheaac_shr32(i, 1)]; } } @@ -161,7 +161,7 @@ VOID ixheaacd_decode_ps_data(ia_ps_dec_struct *ptr_ps_dec, WORD32 frame_size) { if (ptr_ps_dec->icc_dt[e]) { for (i = 0; i < ixheaacd_num_bands[ptr_ps_dec->icc_mode]; i++) { temp = - ixheaacd_add16(*p_icc_par_prev, ptr_ps_dec->icc_par_table[e][i]); + ixheaac_add16(*p_icc_par_prev, ptr_ps_dec->icc_par_table[e][i]); ptr_ps_dec->icc_par_table[e][i] = ixheaacd_clamp(temp, 0, (WORD16)(NUM_ICC_LEVELS - 1)); p_icc_par_prev += icc_mode; @@ -170,7 +170,7 @@ VOID ixheaacd_decode_ps_data(ia_ps_dec_struct *ptr_ps_dec, WORD32 frame_size) { ptr_ps_dec->icc_par_table[e][0] = ixheaacd_clamp( ptr_ps_dec->icc_par_table[e][0], 0, (WORD16)(NUM_ICC_LEVELS - 1)); for (i = 1; i < ixheaacd_num_bands[ptr_ps_dec->icc_mode]; i++) { - temp = ixheaacd_add16(ptr_ps_dec->icc_par_table[e][i - 1], + temp = ixheaac_add16(ptr_ps_dec->icc_par_table[e][i - 1], ptr_ps_dec->icc_par_table[e][i]); ptr_ps_dec->icc_par_table[e][i] = ixheaacd_clamp(temp, 0, (WORD16)(NUM_ICC_LEVELS - 1)); @@ -185,7 +185,7 @@ VOID ixheaacd_decode_ps_data(ia_ps_dec_struct *ptr_ps_dec, WORD32 frame_size) { for (i = (ixheaacd_num_bands[ptr_ps_dec->icc_mode] * icc_mode - 1); i != 0; i--) { ptr_ps_dec->icc_par_table[e][i] = - ptr_ps_dec->icc_par_table[e][ixheaacd_shr32(i, 1)]; + ptr_ps_dec->icc_par_table[e][ixheaac_shr32(i, 1)]; } } } diff --git a/decoder/ixheaacd_ps_dec.c b/decoder/ixheaacd_ps_dec.c index 74c019e..ea48f89 100644 --- a/decoder/ixheaacd_ps_dec.c +++ b/decoder/ixheaacd_ps_dec.c @@ -19,17 +19,17 @@ */ #include #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_arr.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_arr.h" +#include "ixheaac_basic_ops.h" #include "ixheaacd_defines.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" @@ -65,7 +65,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" @@ -77,7 +77,7 @@ static PLATFORM_INLINE WORD16 ixheaacd_shl16_saturate(WORD16 op1, WORD32 temp; temp = (WORD32)(op1 << shift); - var_out = ixheaacd_sat16(temp); + var_out = ixheaac_sat16(temp); return (var_out); } @@ -98,16 +98,16 @@ VOID ixheaacd_scale_short_vec_left(WORD16 *word16_arr, WORD32 n, WORD16 shift) { } VOID ixheaacd_scale_int_vec_left(WORD32 *word32_arr, WORD32 n, WORD16 shift) { - ixheaacd_shl32_arr_sat(word32_arr, shift, n); + ixheaac_shl32_arr_sat(word32_arr, shift, n); } VOID ixheaacd_scale_int_vec_right(WORD32 *word32_arr, WORD32 n, WORD16 shift) { - ixheaacd_shr32_arr(word32_arr, shift, n); + ixheaac_shr32_arr(word32_arr, shift, n); } VOID ixheaacd_scale_short_vec_right(WORD16 *word16_arr, WORD32 n, WORD16 shift) { - ixheaacd_shr16_arr(word16_arr, shift, n); + ixheaac_shr16_arr(word16_arr, shift, n); } WORD32 ixheaacd_calc_max(WORD16 *array, WORD32 size) { @@ -119,8 +119,8 @@ WORD32 ixheaacd_calc_max(WORD16 *array, WORD32 size) { temp1 = *array++; temp2 = *array++; - max_val = max_val | ixheaacd_abs32_nrm(temp1); - max_val = max_val | ixheaacd_abs32_nrm(temp2); + max_val = max_val | ixheaac_abs32_nrm(temp1); + max_val = max_val | ixheaac_abs32_nrm(temp2); } return max_val; @@ -177,12 +177,12 @@ static WORD ixheaacd_get_ps_scale(ia_ps_dec_struct *ptr_ps_dec) { WORD32 temp3 = *ptr_re_temp++; WORD32 temp4 = *ptr_im++; - max_val = max_val | ixheaacd_abs32_nrm(temp3); - max_val = max_val | ixheaacd_abs32_nrm(temp4); + max_val = max_val | ixheaac_abs32_nrm(temp3); + max_val = max_val | ixheaac_abs32_nrm(temp4); } } - return ixheaacd_pnorm32(max_val); + return ixheaac_pnorm32(max_val); } VOID ixheaacd_init_ps_scale(ia_ps_dec_struct *ptr_ps_dec, @@ -196,9 +196,9 @@ VOID ixheaacd_init_ps_scale(ia_ps_dec_struct *ptr_ps_dec, ptr_ps_dec->delay_buffer_scale = (ptr_ps_dec->delay_buffer_scale + reserve); temp = - ixheaacd_min16(sbr_scale_factor->lb_scale, sbr_scale_factor->ov_lb_scale); - temp = ixheaacd_min16(temp, sbr_scale_factor->hb_scale); - temp = ixheaacd_min16(temp, ptr_ps_dec->delay_buffer_scale); + ixheaac_min16(sbr_scale_factor->lb_scale, sbr_scale_factor->ov_lb_scale); + temp = ixheaac_min16(temp, sbr_scale_factor->hb_scale); + temp = ixheaac_min16(temp, ptr_ps_dec->delay_buffer_scale); sbr_scale_factor->ps_scale = (temp - 1); change = (sbr_scale_factor->ps_scale - ptr_ps_dec->delay_buffer_scale); @@ -214,7 +214,7 @@ WORD32 ixheaacd_divide16_pos_dec(WORD32 op1, WORD32 op2) { UWORD32 u; WORD k, nrm; - nrm = ixheaacd_norm32(op2); + nrm = ixheaac_norm32(op2); u = (op1 << nrm); v = (op2 << nrm); u = (u & 0xffff0000); @@ -272,19 +272,19 @@ VOID ixheaacd_decorr_filter1_dec(ia_ps_dec_struct *ptr_ps_dec, imag_tmp0 = p_delay_buf_sub_re_im[1]; real_in = (WORD16)( - ixheaacd_sub32_sat( - ixheaacd_mult16x16in32(real_tmp0, p_frac_delay_phase_fac_re_im[0]), - ixheaacd_mult16x16in32(imag_tmp0, + ixheaac_sub32_sat( + ixheaac_mult16x16in32(real_tmp0, p_frac_delay_phase_fac_re_im[0]), + ixheaac_mult16x16in32(imag_tmp0, p_frac_delay_phase_fac_re_im[1])) >> 15); imag_in = (WORD16)( - ixheaacd_add32_sat( - ixheaacd_mult16x16in32(real_tmp0, p_frac_delay_phase_fac_re_im[1]), - ixheaacd_mult16x16in32(imag_tmp0, + ixheaac_add32_sat( + ixheaac_mult16x16in32(real_tmp0, p_frac_delay_phase_fac_re_im[1]), + ixheaac_mult16x16in32(imag_tmp0, p_frac_delay_phase_fac_re_im[0])) >> 15); - *p_delay_buf_sub_re_im++ = ixheaacd_round16(p_left_real[sb]); - *p_delay_buf_sub_re_im++ = ixheaacd_round16(p_left_imag[sb]); + *p_delay_buf_sub_re_im++ = ixheaac_round16(p_left_real[sb]); + *p_delay_buf_sub_re_im++ = ixheaac_round16(p_left_imag[sb]); p_frac_delay_phase_fac_re_im += 2; p_frac_delay_phase_fac_ser_re_im1 = p_frac_delay_phase_fac_ser_re_im; @@ -299,29 +299,29 @@ VOID ixheaacd_decorr_filter1_dec(ia_ps_dec_struct *ptr_ps_dec, (*p_delay_buf_ser_sub_re_im)[delay_buf_idx_ser][m][2 * sb + 1]; real_tmp = - (WORD16)(ixheaacd_sub32_sat( - ixheaacd_mult16x16in32( + (WORD16)(ixheaac_sub32_sat( + ixheaac_mult16x16in32( real_tmp0, p_frac_delay_phase_fac_ser_re_im1[0]), - ixheaacd_mult16x16in32( + ixheaac_mult16x16in32( imag_tmp0, p_frac_delay_phase_fac_ser_re_im1[1])) >> 15); imag_tmp = - (WORD16)(ixheaacd_add32_sat( - ixheaacd_mult16x16in32( + (WORD16)(ixheaac_add32_sat( + ixheaac_mult16x16in32( real_tmp0, p_frac_delay_phase_fac_ser_re_im1[1]), - ixheaacd_mult16x16in32( + ixheaac_mult16x16in32( imag_tmp0, p_frac_delay_phase_fac_ser_re_im1[0])) >> 15); decay = ps_tables_ptr->rev_link_decay_ser[m]; - real_tmp = ixheaacd_sub16(real_tmp, ixheaacd_mult16_shl(real_in, decay)); - imag_tmp = ixheaacd_sub16(imag_tmp, ixheaacd_mult16_shl(imag_in, decay)); + real_tmp = ixheaac_sub16(real_tmp, ixheaac_mult16_shl(real_in, decay)); + imag_tmp = ixheaac_sub16(imag_tmp, ixheaac_mult16_shl(imag_in, decay)); (*p_delay_buf_ser_sub_re_im)[delay_buf_idx_ser][m][sb * 2] = - ixheaacd_add16(real_in, ixheaacd_mult16_shl(real_tmp, decay)); + ixheaac_add16(real_in, ixheaac_mult16_shl(real_tmp, decay)); (*p_delay_buf_ser_sub_re_im)[delay_buf_idx_ser][m][sb * 2 + 1] = - ixheaacd_add16(imag_in, ixheaacd_mult16_shl(imag_tmp, decay)); + ixheaac_add16(imag_in, ixheaac_mult16_shl(imag_tmp, decay)); real_in = real_tmp; imag_in = imag_tmp; @@ -330,9 +330,9 @@ VOID ixheaacd_decorr_filter1_dec(ia_ps_dec_struct *ptr_ps_dec, bin = ps_tables_ptr->hybrid_to_bin[sb]; p_right_real[sb] = - ixheaacd_mult16x16in32_shl(real_in, transient_ratio[bin]); + ixheaac_mult16x16in32_shl(real_in, transient_ratio[bin]); p_right_imag[sb] = - ixheaacd_mult16x16in32_shl(imag_in, transient_ratio[bin]); + ixheaac_mult16x16in32_shl(imag_in, transient_ratio[bin]); } } @@ -379,20 +379,20 @@ VOID ixheaacd_decorr_filter2_dec( imag_tmp0 = p_delay_buf_ap_re_im[1]; real_in = (WORD16)( - ixheaacd_sub32_sat( - ixheaacd_mult16x16in32(real_tmp0, p_frac_delay_phase_fac_re_im[0]), - ixheaacd_mult16x16in32(imag_tmp0, + ixheaac_sub32_sat( + ixheaac_mult16x16in32(real_tmp0, p_frac_delay_phase_fac_re_im[0]), + ixheaac_mult16x16in32(imag_tmp0, p_frac_delay_phase_fac_re_im[1])) >> 15); imag_in = (WORD16)( - ixheaacd_add32_sat( - ixheaacd_mult16x16in32(real_tmp0, p_frac_delay_phase_fac_re_im[1]), - ixheaacd_mult16x16in32(imag_tmp0, + ixheaac_add32_sat( + ixheaac_mult16x16in32(real_tmp0, p_frac_delay_phase_fac_re_im[1]), + ixheaac_mult16x16in32(imag_tmp0, p_frac_delay_phase_fac_re_im[0])) >> 15); - *p_delay_buf_ap_re_im++ = ixheaacd_round16(p_left_real[sb]); - *p_delay_buf_ap_re_im++ = ixheaacd_round16(p_left_imag[sb]); + *p_delay_buf_ap_re_im++ = ixheaac_round16(p_left_real[sb]); + *p_delay_buf_ap_re_im++ = ixheaac_round16(p_left_imag[sb]); p_frac_delay_phase_fac_re_im += 2; @@ -410,29 +410,29 @@ VOID ixheaacd_decorr_filter2_dec( (*p_delay_buf_ser_re_im)[delay_buf_idx_ser][m][sb_delay * 2 + 1]; real_tmp = (WORD16)( - ixheaacd_sub32_sat( - ixheaacd_mult16x16in32( + ixheaac_sub32_sat( + ixheaac_mult16x16in32( real_tmp0, p_frac_delay_phase_fac_ser_ap_re_im_temp[0]), - ixheaacd_mult16x16in32( + ixheaac_mult16x16in32( imag_tmp0, p_frac_delay_phase_fac_ser_ap_re_im_temp[1])) >> 15); imag_tmp = (WORD16)( - ixheaacd_add32_sat( - ixheaacd_mult16x16in32( + ixheaac_add32_sat( + ixheaac_mult16x16in32( real_tmp0, p_frac_delay_phase_fac_ser_ap_re_im_temp[1]), - ixheaacd_mult16x16in32( + ixheaac_mult16x16in32( imag_tmp0, p_frac_delay_phase_fac_ser_ap_re_im_temp[0])) >> 15); decay = ps_tables_ptr->decay_scale_factor[di]; - real_tmp = ixheaacd_sub16(real_tmp, ixheaacd_mult16_shl(real_in, decay)); - imag_tmp = ixheaacd_sub16(imag_tmp, ixheaacd_mult16_shl(imag_in, decay)); + real_tmp = ixheaac_sub16(real_tmp, ixheaac_mult16_shl(real_in, decay)); + imag_tmp = ixheaac_sub16(imag_tmp, ixheaac_mult16_shl(imag_in, decay)); (*p_delay_buf_ser_re_im)[delay_buf_idx_ser][m][sb_delay * 2] = - ixheaacd_add16(real_in, ixheaacd_mult16_shl(real_tmp, decay)); + ixheaac_add16(real_in, ixheaac_mult16_shl(real_tmp, decay)); (*p_delay_buf_ser_re_im)[delay_buf_idx_ser][m][sb_delay * 2 + 1] = - ixheaacd_add16(imag_in, ixheaacd_mult16_shl(imag_tmp, decay)); + ixheaac_add16(imag_in, ixheaac_mult16_shl(imag_tmp, decay)); real_in = real_tmp; imag_in = imag_tmp; @@ -441,9 +441,9 @@ VOID ixheaacd_decorr_filter2_dec( bin = ps_tables_ptr->delay_to_bin[sb_delay]; p_right_real[sb] = - ixheaacd_mult16x16in32_shl(real_in, transient_ratio[bin]); + ixheaac_mult16x16in32_shl(real_in, transient_ratio[bin]); p_right_imag[sb] = - ixheaacd_mult16x16in32_shl(imag_in, transient_ratio[bin]); + ixheaac_mult16x16in32_shl(imag_in, transient_ratio[bin]); } } @@ -485,26 +485,26 @@ VOID ixheaacd_decorrelation_dec(ia_ps_dec_struct *ptr_ps_dec, re1 = (p_left_real[5]); im1 = (p_left_imag[5]); - power_buf[0] = ixheaacd_mult32x16in32(re0, (WORD16)(re0 >> 16)); - power_buf[0] = ixheaacd_add32_sat( - power_buf[0], ixheaacd_mult32x16in32(im0, (WORD16)(im0 >> 16))); - power_buf[0] = ixheaacd_add32_sat( - power_buf[0], ixheaacd_mult32x16in32(re1, (WORD16)(re1 >> 16))); - power_buf[0] = ixheaacd_add32_sat( - power_buf[0], ixheaacd_mult32x16in32(im1, (WORD16)(im1 >> 16))); + power_buf[0] = ixheaac_mult32x16in32(re0, (WORD16)(re0 >> 16)); + power_buf[0] = ixheaac_add32_sat( + power_buf[0], ixheaac_mult32x16in32(im0, (WORD16)(im0 >> 16))); + power_buf[0] = ixheaac_add32_sat( + power_buf[0], ixheaac_mult32x16in32(re1, (WORD16)(re1 >> 16))); + power_buf[0] = ixheaac_add32_sat( + power_buf[0], ixheaac_mult32x16in32(im1, (WORD16)(im1 >> 16))); re0 = (p_left_real[4]); im0 = (p_left_imag[4]); re1 = (p_left_real[1]); im1 = (p_left_imag[1]); - power_buf[1] = ixheaacd_mult32x16in32(re0, (WORD16)(re0 >> 16)); - power_buf[1] = ixheaacd_add32_sat( - power_buf[1], ixheaacd_mult32x16in32(im0, (WORD16)(im0 >> 16))); - power_buf[1] = ixheaacd_add32_sat( - power_buf[1], ixheaacd_mult32x16in32(re1, (WORD16)(re1 >> 16))); - power_buf[1] = ixheaacd_add32_sat( - power_buf[1], ixheaacd_mult32x16in32(im1, (WORD16)(im1 >> 16))); + power_buf[1] = ixheaac_mult32x16in32(re0, (WORD16)(re0 >> 16)); + power_buf[1] = ixheaac_add32_sat( + power_buf[1], ixheaac_mult32x16in32(im0, (WORD16)(im0 >> 16))); + power_buf[1] = ixheaac_add32_sat( + power_buf[1], ixheaac_mult32x16in32(re1, (WORD16)(re1 >> 16))); + power_buf[1] = ixheaac_add32_sat( + power_buf[1], ixheaac_mult32x16in32(im1, (WORD16)(im1 >> 16))); } bin = 4 - 2; @@ -513,9 +513,9 @@ VOID ixheaacd_decorrelation_dec(ia_ps_dec_struct *ptr_ps_dec, sb = ps_tables_ptr->borders_group[gr]; re = (p_left_real[sb]); im = (p_left_imag[sb]); - power_buf[bin] = ixheaacd_mult32x16in32(re, (WORD16)(re >> 16)); - power_buf[bin] = ixheaacd_add32_sat( - power_buf[bin], ixheaacd_mult32x16in32(im, (WORD16)(im >> 16))); + power_buf[bin] = ixheaac_mult32x16in32(re, (WORD16)(re >> 16)); + power_buf[bin] = ixheaac_add32_sat( + power_buf[bin], ixheaac_mult32x16in32(im, (WORD16)(im >> 16))); bin++; } @@ -527,9 +527,9 @@ VOID ixheaacd_decorrelation_dec(ia_ps_dec_struct *ptr_ps_dec, sband++) { WORD32 re = (p_left_real[sband]); WORD32 im = (p_left_imag[sband]); - power_buf[bin] = ixheaacd_mult32x16in32(re, (WORD16)(re >> 16)); - power_buf[bin] = ixheaacd_add32_sat( - power_buf[bin], ixheaacd_mult32x16in32(im, (WORD16)(im >> 16))); + power_buf[bin] = ixheaac_mult32x16in32(re, (WORD16)(re >> 16)); + power_buf[bin] = ixheaac_add32_sat( + power_buf[bin], ixheaac_mult32x16in32(im, (WORD16)(im >> 16))); bin++; } @@ -538,18 +538,18 @@ VOID ixheaacd_decorrelation_dec(ia_ps_dec_struct *ptr_ps_dec, WORD32 accu = 0, tmp; WORD32 re, im; - maxsband = ixheaacd_min32(usb, ps_tables_ptr->borders_group[gr + 1]); + maxsband = ixheaac_min32(usb, ps_tables_ptr->borders_group[gr + 1]); for (sband = ps_tables_ptr->borders_group[gr]; sband < maxsband; sband++) { re = (p_left_real[sband]); im = (p_left_imag[sband]); - tmp = ixheaacd_mult32x16in32(re, (WORD16)(re >> 16)); - tmp = ixheaacd_add32_sat(tmp, - ixheaacd_mult32x16in32(im, (WORD16)(im >> 16))); + tmp = ixheaac_mult32x16in32(re, (WORD16)(re >> 16)); + tmp = ixheaac_add32_sat(tmp, + ixheaac_mult32x16in32(im, (WORD16)(im >> 16))); tmp = (tmp >> ps_tables_ptr->group_shift[gr - (SUBQMF_GROUPS + 6)]); - accu = ixheaacd_add32_sat(accu, tmp); + accu = ixheaac_add32_sat(accu, tmp); } power_buf[bin] = accu; bin++; @@ -559,37 +559,37 @@ VOID ixheaacd_decorrelation_dec(ia_ps_dec_struct *ptr_ps_dec, p_left_imag = ptr_ps_dec->ptr_hyb_left_im; for (bin = 0; bin < NUM_OF_BINS; bin++) { - power_buf[bin] = ixheaacd_shl32(power_buf[bin], 1); + power_buf[bin] = ixheaac_shl32(power_buf[bin], 1); - power_buf[bin] = ixheaacd_max32(0, power_buf[bin]); + power_buf[bin] = ixheaac_max32(0, power_buf[bin]); - ptr_ps_dec->peak_decay_diff[bin] = ixheaacd_mult32x16in32_shl( + ptr_ps_dec->peak_decay_diff[bin] = ixheaac_mult32x16in32_shl( ptr_ps_dec->peak_decay_diff[bin], PEAK_DECAYING_FACT); ptr_ps_dec->peak_decay_diff[bin] = - ixheaacd_max32(ptr_ps_dec->peak_decay_diff[bin], power_buf[bin]); + ixheaac_max32(ptr_ps_dec->peak_decay_diff[bin], power_buf[bin]); - peak_diff = ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(ptr_ps_dec->peak_decay_diff_prev[bin], + peak_diff = ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(ptr_ps_dec->peak_decay_diff_prev[bin], 0x6000), - ((ixheaacd_sub32_sat(ptr_ps_dec->peak_decay_diff[bin], + ((ixheaac_sub32_sat(ptr_ps_dec->peak_decay_diff[bin], power_buf[bin]) >> 2))); ptr_ps_dec->peak_decay_diff_prev[bin] = peak_diff; - nrg = ixheaacd_add32_sat( - ixheaacd_mult32x16in32_shl(ptr_ps_dec->energy_prev[bin], 0x6000), + nrg = ixheaac_add32_sat( + ixheaac_mult32x16in32_shl(ptr_ps_dec->energy_prev[bin], 0x6000), (power_buf[bin] >> 2)); ptr_ps_dec->energy_prev[bin] = nrg; - peak_diff = ixheaacd_add32_sat(peak_diff, (peak_diff >> 1)); + peak_diff = ixheaac_add32_sat(peak_diff, (peak_diff >> 1)); if (peak_diff <= nrg) { transient_ratio[bin] = 0x7fff; } else { transient_ratio[bin] = - ixheaacd_extract16l((*ixheaacd_divide16_pos)(nrg, peak_diff)); + ixheaac_extract16l((*ixheaacd_divide16_pos)(nrg, peak_diff)); } } @@ -609,7 +609,7 @@ VOID ixheaacd_decorrelation_dec(ia_ps_dec_struct *ptr_ps_dec, p_right_real = p_buf_right_real; p_right_imag = p_buf_right_imag; - maxsband = ixheaacd_min32((WORD16)usb, ps_tables_ptr->borders_group[21]); + maxsband = ixheaac_min32((WORD16)usb, ps_tables_ptr->borders_group[21]); delay_buf_idx = ptr_ps_dec->delay_buf_idx_long; p_delay_buf_re_im_ld = &ptr_ps_dec->delay_buf_qmf_ld_re_im[delay_buf_idx][0]; @@ -619,15 +619,15 @@ VOID ixheaacd_decorrelation_dec(ia_ps_dec_struct *ptr_ps_dec, real_in = p_delay_buf_re_im_ld[0]; imag_in = p_delay_buf_re_im_ld[1]; - *p_delay_buf_re_im_ld++ = ixheaacd_round16(p_left_real[sband]); - *p_delay_buf_re_im_ld++ = ixheaacd_round16(p_left_imag[sband]); + *p_delay_buf_re_im_ld++ = ixheaac_round16(p_left_real[sband]); + *p_delay_buf_re_im_ld++ = ixheaac_round16(p_left_imag[sband]); - p_right_real[sband] = ixheaacd_mult16x16in32_shl(real_in, trans_ratio); - p_right_imag[sband] = ixheaacd_mult16x16in32_shl(imag_in, trans_ratio); + p_right_real[sband] = ixheaac_mult16x16in32_shl(real_in, trans_ratio); + p_right_imag[sband] = ixheaac_mult16x16in32_shl(imag_in, trans_ratio); } ptr_ps_dec->delay_buf_idx_long = - ixheaacd_add16(ptr_ps_dec->delay_buf_idx_long, 1); + ixheaac_add16(ptr_ps_dec->delay_buf_idx_long, 1); if (ptr_ps_dec->delay_buf_idx_long >= 14) { ptr_ps_dec->delay_buf_idx_long = 0; @@ -636,17 +636,17 @@ VOID ixheaacd_decorrelation_dec(ia_ps_dec_struct *ptr_ps_dec, p_delay_buf_re_im_sd = &ptr_ps_dec->delay_buf_qmf_sd_re_im[0][0]; trans_ratio = transient_ratio[19]; - maxsband = ixheaacd_min32((WORD16)usb, ps_tables_ptr->borders_group[22]); + maxsband = ixheaac_min32((WORD16)usb, ps_tables_ptr->borders_group[22]); for (sband = ps_tables_ptr->borders_group[21]; sband < maxsband; sband++) { WORD16 real_in, imag_in; real_in = p_delay_buf_re_im_sd[0]; imag_in = p_delay_buf_re_im_sd[1]; - *p_delay_buf_re_im_sd++ = ixheaacd_round16(p_left_real[sband]); - *p_delay_buf_re_im_sd++ = ixheaacd_round16(p_left_imag[sband]); + *p_delay_buf_re_im_sd++ = ixheaac_round16(p_left_real[sband]); + *p_delay_buf_re_im_sd++ = ixheaac_round16(p_left_imag[sband]); - p_right_real[sband] = ixheaacd_mult16x16in32_shl(real_in, trans_ratio); - p_right_imag[sband] = ixheaacd_mult16x16in32_shl(imag_in, trans_ratio); + p_right_real[sband] = ixheaac_mult16x16in32_shl(real_in, trans_ratio); + p_right_imag[sband] = ixheaac_mult16x16in32_shl(imag_in, trans_ratio); } } @@ -676,7 +676,7 @@ VOID ixheaacd_decorrelation_dec(ia_ps_dec_struct *ptr_ps_dec, static WORD16 ixheaacd_cos512(WORD phi_by_4, const WORD16 *cos_sin_lookup_tab) { WORD index; - index = ixheaacd_round16(ixheaacd_abs32_sat(phi_by_4)); + index = ixheaac_round16(ixheaac_abs32_sat(phi_by_4)); index = (index & 0x3FF); @@ -690,7 +690,7 @@ static WORD16 ixheaacd_cos512(WORD phi_by_4, const WORD16 *cos_sin_lookup_tab) { static WORD16 ixheaacd_sin512(WORD phi_by_4, const WORD16 *cos_sin_lookup_tab) { WORD index; - index = ixheaacd_round16(phi_by_4); + index = ixheaac_round16(phi_by_4); if (index < 0) { index = (-(index)&0x3FF); @@ -785,8 +785,8 @@ VOID ixheaacd_init_rot_env(ia_ps_dec_struct *ptr_ps_dec, WORD16 env, WORD16 usb, } inv_env_len = - sbr_tables_ptr->env_calc_tables_ptr->sbr_inv_int_table[ixheaacd_abs16( - ixheaacd_sub16_sat(ptr_ps_dec->border_position[env + 1], + sbr_tables_ptr->env_calc_tables_ptr->sbr_inv_int_table[ixheaac_abs16( + ixheaac_sub16_sat(ptr_ps_dec->border_position[env + 1], ptr_ps_dec->border_position[env]))]; p_iid_idx = &ptr_ps_dec->iid_par_table[env][0]; @@ -803,43 +803,43 @@ VOID ixheaacd_init_rot_env(ia_ps_dec_struct *ptr_ps_dec, WORD16 env, WORD16 usb, c1 = p_scale_factors[(num_iid_steps + num_iid_idx)]; c2 = p_scale_factors[(num_iid_steps - num_iid_idx)]; - beta = ixheaacd_mult32x16in32_shl( - ixheaacd_mult16x16in32_shl( + beta = ixheaac_mult32x16in32_shl( + ixheaac_mult16x16in32_shl( sbr_tables_ptr->ps_tables_ptr->alpha_values[num_icc_idx], - ixheaacd_sub16(c1, c2)), + ixheaac_sub16(c1, c2)), PSC_SQRT05F); - alpha = ixheaacd_shr32_dir_sat_limit( - ixheaacd_deposit16h_in32( + alpha = ixheaac_shr32_dir_sat_limit( + ixheaac_deposit16h_in32( sbr_tables_ptr->ps_tables_ptr->alpha_values[num_icc_idx]), 1); - bplusa = ixheaacd_round16(ixheaacd_add32_sat(beta, alpha)); - bminusa = ixheaacd_round16(ixheaacd_sub32_sat(beta, alpha)); + bplusa = ixheaac_round16(ixheaac_add32_sat(beta, alpha)); + bminusa = ixheaac_round16(ixheaac_sub32_sat(beta, alpha)); - indexplusa = ixheaacd_mult32x16in32(rescale, bplusa); - indexminusa = ixheaacd_mult32x16in32(rescale, bminusa); + indexplusa = ixheaac_mult32x16in32(rescale, bplusa); + indexminusa = ixheaac_mult32x16in32(rescale, bminusa); - h11 = ixheaacd_mult16_shl(ixheaacd_cos512(indexplusa, cos_sin_lookup_tab), + h11 = ixheaac_mult16_shl(ixheaacd_cos512(indexplusa, cos_sin_lookup_tab), c2); - h12 = ixheaacd_mult16_shl(ixheaacd_cos512(indexminusa, cos_sin_lookup_tab), + h12 = ixheaac_mult16_shl(ixheaacd_cos512(indexminusa, cos_sin_lookup_tab), c1); - h21 = ixheaacd_mult16_shl(ixheaacd_sin512(indexplusa, cos_sin_lookup_tab), + h21 = ixheaac_mult16_shl(ixheaacd_sin512(indexplusa, cos_sin_lookup_tab), c2); - h22 = ixheaacd_mult16_shl(ixheaacd_sin512(indexminusa, cos_sin_lookup_tab), + h22 = ixheaac_mult16_shl(ixheaacd_sin512(indexminusa, cos_sin_lookup_tab), c1); - ptr_ps_dec->delta_h11_h12[2 * group + 0] = ixheaacd_mult16_shl( + ptr_ps_dec->delta_h11_h12[2 * group + 0] = ixheaac_mult16_shl( inv_env_len, - ixheaacd_sub16(h11, ptr_ps_dec->h11_h12_vec[2 * group + 0])); - ptr_ps_dec->delta_h11_h12[2 * group + 1] = ixheaacd_mult16_shl( + ixheaac_sub16(h11, ptr_ps_dec->h11_h12_vec[2 * group + 0])); + ptr_ps_dec->delta_h11_h12[2 * group + 1] = ixheaac_mult16_shl( inv_env_len, - ixheaacd_sub16(h12, ptr_ps_dec->h11_h12_vec[2 * group + 1])); - ptr_ps_dec->delta_h21_h22[2 * group + 0] = ixheaacd_mult16_shl( + ixheaac_sub16(h12, ptr_ps_dec->h11_h12_vec[2 * group + 1])); + ptr_ps_dec->delta_h21_h22[2 * group + 0] = ixheaac_mult16_shl( inv_env_len, - ixheaacd_sub16(h21, ptr_ps_dec->h21_h22_vec[2 * group + 0])); - ptr_ps_dec->delta_h21_h22[2 * group + 1] = ixheaacd_mult16_shl( + ixheaac_sub16(h21, ptr_ps_dec->h21_h22_vec[2 * group + 0])); + ptr_ps_dec->delta_h21_h22[2 * group + 1] = ixheaac_mult16_shl( inv_env_len, - ixheaacd_sub16(h22, ptr_ps_dec->h21_h22_vec[2 * group + 1])); + ixheaac_sub16(h22, ptr_ps_dec->h21_h22_vec[2 * group + 1])); ptr_ps_dec->H11_H12[2 * group + 0] = ptr_ps_dec->h11_h12_vec[2 * group + 0]; ptr_ps_dec->H11_H12[2 * group + 1] = ptr_ps_dec->h11_h12_vec[2 * group + 1]; @@ -879,45 +879,45 @@ VOID ixheaacd_apply_rot_dec(ia_ps_dec_struct *ptr_ps_dec, WORD32 *p_qmf_left_re, for (group = 0; group < NO_IID_GROUPS; group++) { ptr_ps_dec->H11_H12[2 * group + 0] = - ixheaacd_add16(ptr_ps_dec->H11_H12[2 * group + 0], + ixheaac_add16(ptr_ps_dec->H11_H12[2 * group + 0], ptr_ps_dec->delta_h11_h12[2 * group + 0]); ptr_ps_dec->H11_H12[2 * group + 1] = - ixheaacd_add16(ptr_ps_dec->H11_H12[2 * group + 1], + ixheaac_add16(ptr_ps_dec->H11_H12[2 * group + 1], ptr_ps_dec->delta_h11_h12[2 * group + 1]); ptr_ps_dec->H21_H22[2 * group + 0] = - ixheaacd_add16(ptr_ps_dec->H21_H22[2 * group + 0], + ixheaac_add16(ptr_ps_dec->H21_H22[2 * group + 0], ptr_ps_dec->delta_h21_h22[2 * group + 0]); ptr_ps_dec->H21_H22[2 * group + 1] = - ixheaacd_add16(ptr_ps_dec->H21_H22[2 * group + 1], + ixheaac_add16(ptr_ps_dec->H21_H22[2 * group + 1], ptr_ps_dec->delta_h21_h22[2 * group + 1]); } for (subband = 0; subband < SUBQMF_GROUPS; subband++) { - temp_left_real = ixheaacd_add32_sat( - ixheaacd_mult32x16in32(p_hyb_left_re1[subband], + temp_left_real = ixheaac_add32_sat( + ixheaac_mult32x16in32(p_hyb_left_re1[subband], ptr_ps_dec->H11_H12[2 * subband + 0]), - ixheaacd_mult32x16in32(p_hyb_right_re1[subband], + ixheaac_mult32x16in32(p_hyb_right_re1[subband], ptr_ps_dec->H21_H22[2 * subband + 0])); - temp_left_imag = ixheaacd_add32_sat( - ixheaacd_mult32x16in32(p_hyb_left_im1[subband], + temp_left_imag = ixheaac_add32_sat( + ixheaac_mult32x16in32(p_hyb_left_im1[subband], ptr_ps_dec->H11_H12[2 * subband + 0]), - ixheaacd_mult32x16in32(p_hyb_right_im1[subband], + ixheaac_mult32x16in32(p_hyb_right_im1[subband], ptr_ps_dec->H21_H22[2 * subband + 0])); - temp_right_real = ixheaacd_add32_sat( - ixheaacd_mult32x16in32(p_hyb_left_re1[subband], + temp_right_real = ixheaac_add32_sat( + ixheaac_mult32x16in32(p_hyb_left_re1[subband], ptr_ps_dec->H11_H12[2 * subband + 1]), - ixheaacd_mult32x16in32(p_hyb_right_re1[subband], + ixheaac_mult32x16in32(p_hyb_right_re1[subband], ptr_ps_dec->H21_H22[2 * subband + 1])); - temp_right_imag = ixheaacd_add32_sat( - ixheaacd_mult32x16in32(p_hyb_left_im1[subband], + temp_right_imag = ixheaac_add32_sat( + ixheaac_mult32x16in32(p_hyb_left_im1[subband], ptr_ps_dec->H11_H12[2 * subband + 1]), - ixheaacd_mult32x16in32(p_hyb_right_im1[subband], + ixheaac_mult32x16in32(p_hyb_right_im1[subband], ptr_ps_dec->H21_H22[2 * subband + 1])); - p_hyb_left_re1[subband] = ixheaacd_shl32(temp_left_real, 2); - p_hyb_left_im1[subband] = ixheaacd_shl32(temp_left_imag, 2); - p_hyb_right_re1[subband] = ixheaacd_shl32(temp_right_real, 2); - p_hyb_right_im1[subband] = ixheaacd_shl32(temp_right_imag, 2); + p_hyb_left_re1[subband] = ixheaac_shl32(temp_left_real, 2); + p_hyb_left_im1[subband] = ixheaac_shl32(temp_left_imag, 2); + p_hyb_right_re1[subband] = ixheaac_shl32(temp_right_real, 2); + p_hyb_right_im1[subband] = ixheaac_shl32(temp_right_imag, 2); } p_hyb_left_re = p_qmf_left_re; @@ -931,7 +931,7 @@ VOID ixheaacd_apply_rot_dec(ia_ps_dec_struct *ptr_ps_dec, WORD32 *p_qmf_left_re, WORD32 *h11_h12_dst = (WORD32 *)H11_H12; for (group = SUBQMF_GROUPS; group < NO_IID_GROUPS; group++) { - max_subband = ixheaacd_min32( + max_subband = ixheaac_min32( usb, sbr_tables_ptr->ps_tables_ptr->borders_group[group + 1]); for (subband = sbr_tables_ptr->ps_tables_ptr->borders_group[group]; subband < max_subband; subband++) { @@ -947,13 +947,13 @@ VOID ixheaacd_apply_rot_dec(ia_ps_dec_struct *ptr_ps_dec, WORD32 *p_qmf_left_re, tmp_real1 = *p_hyb_right_re1++; tmp_img1 = *p_hyb_right_im1++; - hybrid_resol = ixheaacd_min16(*ptr_res++, 6); + hybrid_resol = ixheaac_min16(*ptr_res++, 6); for (k = hybrid_resol - 2; k >= 0; k--) { - tmp_real = ixheaacd_add32_sat(tmp_real, *p_hyb_left_re1++); - tmp_img = ixheaacd_add32_sat(tmp_img, *p_hyb_left_im1++); - tmp_real1 = ixheaacd_add32_sat(tmp_real1, *p_hyb_right_re1++); - tmp_img1 = ixheaacd_add32_sat(tmp_img1, *p_hyb_right_im1++); + tmp_real = ixheaac_add32_sat(tmp_real, *p_hyb_left_re1++); + tmp_img = ixheaac_add32_sat(tmp_img, *p_hyb_left_im1++); + tmp_real1 = ixheaac_add32_sat(tmp_real1, *p_hyb_right_re1++); + tmp_img1 = ixheaac_add32_sat(tmp_img1, *p_hyb_right_im1++); } p_hyb_left_re[subband] = tmp_real; @@ -964,28 +964,28 @@ VOID ixheaacd_apply_rot_dec(ia_ps_dec_struct *ptr_ps_dec, WORD32 *p_qmf_left_re, for (; subband < usb; subband++) { temp_left_real = - ixheaacd_add32_sat(ixheaacd_mult32x16in32(p_hyb_left_re[subband], + ixheaac_add32_sat(ixheaac_mult32x16in32(p_hyb_left_re[subband], H11_H12[4 * subband + 0]), - ixheaacd_mult32x16in32(p_hyb_right_re[subband], + ixheaac_mult32x16in32(p_hyb_right_re[subband], H11_H12[4 * subband + 2])); temp_left_imag = - ixheaacd_add32_sat(ixheaacd_mult32x16in32(p_hyb_left_im[subband], + ixheaac_add32_sat(ixheaac_mult32x16in32(p_hyb_left_im[subband], H11_H12[4 * subband + 0]), - ixheaacd_mult32x16in32(p_hyb_right_im[subband], + ixheaac_mult32x16in32(p_hyb_right_im[subband], H11_H12[4 * subband + 2])); temp_right_real = - ixheaacd_add32_sat(ixheaacd_mult32x16in32(p_hyb_left_re[subband], + ixheaac_add32_sat(ixheaac_mult32x16in32(p_hyb_left_re[subband], H11_H12[4 * subband + 1]), - ixheaacd_mult32x16in32(p_hyb_right_re[subband], + ixheaac_mult32x16in32(p_hyb_right_re[subband], H11_H12[4 * subband + 3])); temp_right_imag = - ixheaacd_add32_sat(ixheaacd_mult32x16in32(p_hyb_left_im[subband], + ixheaac_add32_sat(ixheaac_mult32x16in32(p_hyb_left_im[subband], H11_H12[4 * subband + 1]), - ixheaacd_mult32x16in32(p_hyb_right_im[subband], + ixheaac_mult32x16in32(p_hyb_right_im[subband], H11_H12[4 * subband + 3])); - p_hyb_left_re[subband] = ixheaacd_shl32(temp_left_real, 2); - p_hyb_left_im[subband] = ixheaacd_shl32(temp_left_imag, 2); - p_hyb_right_re[subband] = ixheaacd_shl32(temp_right_real, 2); - p_hyb_right_im[subband] = ixheaacd_shl32(temp_right_imag, 2); + p_hyb_left_re[subband] = ixheaac_shl32(temp_left_real, 2); + p_hyb_left_im[subband] = ixheaac_shl32(temp_left_imag, 2); + p_hyb_right_re[subband] = ixheaac_shl32(temp_right_real, 2); + p_hyb_right_im[subband] = ixheaac_shl32(temp_right_imag, 2); } } diff --git a/decoder/ixheaacd_ps_dec_flt.c b/decoder/ixheaacd_ps_dec_flt.c index d16858e..f2c988b 100644 --- a/decoder/ixheaacd_ps_dec_flt.c +++ b/decoder/ixheaacd_ps_dec_flt.c @@ -20,17 +20,17 @@ #include #include #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_arr.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_arr.h" +#include "ixheaac_basic_ops.h" #include "ixheaacd_defines.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" diff --git a/decoder/ixheaacd_pvc_rom.c b/decoder/ixheaacd_pvc_rom.c index f590ee5..ffe4bfc 100644 --- a/decoder/ixheaacd_pvc_rom.c +++ b/decoder/ixheaacd_pvc_rom.c @@ -17,8 +17,8 @@ ***************************************************************************** * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ -#include "ixheaacd_type_def.h" -#include "ixheaacd_sbr_const.h" +#include "ixheaac_type_def.h" +#include "ixheaac_sbr_const.h" #include "ixheaacd_pvc_dec.h" const FLOAT32 ixheaacd_pvc_smoothing_wind_tab_ns4[4] = { diff --git a/decoder/ixheaacd_qmf_dec.c b/decoder/ixheaacd_qmf_dec.c index 8929a7c..58efdb6 100644 --- a/decoder/ixheaacd_qmf_dec.c +++ b/decoder/ixheaacd_qmf_dec.c @@ -20,13 +20,13 @@ #include #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" @@ -133,26 +133,26 @@ VOID ixheaacd_fftposttw(WORD32 *out, temp[3] = *ptr_out_rev--; temp[2] = *ptr_out_rev++; - in2 = ixheaacd_sub32_sat(temp[3], temp[1]); - in1 = ixheaacd_add32_sat(temp[3], temp[1]); + in2 = ixheaac_sub32_sat(temp[3], temp[1]); + in1 = ixheaac_add32_sat(temp[3], temp[1]); - temp[1] = ixheaacd_sub32_sat(temp[0], temp[2]); - temp[3] = ixheaacd_add32_sat(temp[0], temp[2]); + temp[1] = ixheaac_sub32_sat(temp[0], temp[2]); + temp[3] = ixheaac_add32_sat(temp[0], temp[2]); twid_re = *twidle_fwd++; twid_im = *twidle_rev--; - val1 = ixheaacd_mult32x16in32(in1, twid_re) - - ixheaacd_mult32x16in32(temp[1], twid_im); - val2 = ixheaacd_mult32x16in32(temp[1], twid_re) + - ixheaacd_mult32x16in32(in1, twid_im); + val1 = ixheaac_mult32x16in32(in1, twid_re) - + ixheaac_mult32x16in32(temp[1], twid_im); + val2 = ixheaac_mult32x16in32(temp[1], twid_re) + + ixheaac_mult32x16in32(in1, twid_im); val1 = val1 << 1; val2 = val2 << 1; - *p_out_fwd++ = ixheaacd_add32_sat(temp[3], val1); - *p_out_fwd++ = ixheaacd_add32_sat(in2, val2); + *p_out_fwd++ = ixheaac_add32_sat(temp[3], val1); + *p_out_fwd++ = ixheaac_add32_sat(in2, val2); - *ptr_out_rev-- = ixheaacd_sub32_sat(val2, in2); - *ptr_out_rev-- = ixheaacd_sub32_sat(temp[3], val1); + *ptr_out_rev-- = ixheaac_sub32_sat(val2, in2); + *ptr_out_rev-- = ixheaac_sub32_sat(temp[3], val1); } return; @@ -173,12 +173,12 @@ VOID ixheaacd_posttwdct2(WORD32 *inp, WORD16 *out_fwd, out_re = *inp++; out_im = *inp++; out_re1 = - ixheaacd_sat64_32(ixheaacd_add64((WORD64)out_re, (WORD64)out_im) >> 1); - re1 = ixheaacd_round16(ixheaacd_shl32(out_re1, (5 - 1))); + ixheaac_sat64_32(ixheaac_add64((WORD64)out_re, (WORD64)out_im) >> 1); + re1 = ixheaac_round16(ixheaac_shl32(out_re1, (5 - 1))); *out_fwd++ = re1; - last_val = ixheaacd_sub32_sat(out_re, out_im); + last_val = ixheaac_sub32_sat(out_re, out_im); twidle_fwd = qmf_dec_tables_ptr->dct23_tw + 2; for (k = DCT2_LEN / 2 - 2; k >= 0; k--) { @@ -187,13 +187,13 @@ VOID ixheaacd_posttwdct2(WORD32 *inp, WORD16 *out_fwd, twid_re = *twidle_fwd++; twid_im = *twidle_fwd++; - out_re = ixheaacd_sub32_sat(ixheaacd_mult32x16in32(inp_re, twid_re), - ixheaacd_mult32x16in32(inp_im, twid_im)); - out_im = ixheaacd_add32_sat(ixheaacd_mult32x16in32(inp_im, twid_re), - ixheaacd_mult32x16in32(inp_re, twid_im)); - re1 = ixheaacd_round16(ixheaacd_shl32(out_re, (5 - 1))); - im1 = ixheaacd_round16(ixheaacd_shl32(out_im, (5 - 1))); - im2 = ixheaacd_negate16(im1); + out_re = ixheaac_sub32_sat(ixheaac_mult32x16in32(inp_re, twid_re), + ixheaac_mult32x16in32(inp_im, twid_im)); + out_im = ixheaac_add32_sat(ixheaac_mult32x16in32(inp_im, twid_re), + ixheaac_mult32x16in32(inp_re, twid_im)); + re1 = ixheaac_round16(ixheaac_shl32(out_re, (5 - 1))); + im1 = ixheaac_round16(ixheaac_shl32(out_im, (5 - 1))); + im2 = ixheaac_negate16(im1); *out_fwd++ = re1; *out_rev2-- = re1; @@ -202,8 +202,8 @@ VOID ixheaacd_posttwdct2(WORD32 *inp, WORD16 *out_fwd, } twid_re = *twidle_fwd++; - out_re = ixheaacd_mult32x16in32(last_val, twid_re); - re1 = ixheaacd_round16(ixheaacd_shl32(out_re, (5 - 1))); + out_re = ixheaac_mult32x16in32(last_val, twid_re); + re1 = ixheaac_round16(ixheaac_shl32(out_re, (5 - 1))); *out_fwd++ = re1; *out_rev2-- = re1; @@ -239,11 +239,11 @@ static PLATFORM_INLINE VOID ixheaacd_fftposttw_32( temp3 = *ptr_out_rev--; temp2 = *ptr_out_rev++; - in1 = ixheaacd_add32_sat(temp1, temp3); - in2 = ixheaacd_sub32_sat(temp3, temp1); + in1 = ixheaac_add32_sat(temp1, temp3); + in2 = ixheaac_sub32_sat(temp3, temp1); - temp1 = ixheaacd_sub32_sat(temp0, temp2); - temp3 = ixheaacd_add32_sat(temp0, temp2); + temp1 = ixheaac_sub32_sat(temp0, temp2); + temp3 = ixheaac_add32_sat(temp0, temp2); twid_re = *twidle_fwd; twidle_fwd += 2; @@ -251,19 +251,19 @@ static PLATFORM_INLINE VOID ixheaacd_fftposttw_32( twid_im = *twidle_rev; twidle_rev -= 2; - val1 = ixheaacd_mult32x16in32(in1, twid_re) - - ixheaacd_mult32x16in32(temp1, twid_im); - val2 = ixheaacd_mult32x16in32(temp1, twid_re) + - ixheaacd_mult32x16in32(in1, twid_im); + val1 = ixheaac_mult32x16in32(in1, twid_re) - + ixheaac_mult32x16in32(temp1, twid_im); + val2 = ixheaac_mult32x16in32(temp1, twid_re) + + ixheaac_mult32x16in32(in1, twid_im); val1 = val1 << 1; val2 = val2 << 1; - *ptr_out_fwd++ = ixheaacd_add32_sat(temp3, val1); - *ptr_out_fwd++ = ixheaacd_add32_sat(in2, val2); + *ptr_out_fwd++ = ixheaac_add32_sat(temp3, val1); + *ptr_out_fwd++ = ixheaac_add32_sat(in2, val2); - *ptr_out_rev-- = ixheaacd_sub32_sat(val2, in2); - *ptr_out_rev-- = ixheaacd_sub32_sat(temp3, val1); + *ptr_out_rev-- = ixheaac_sub32_sat(val2, in2); + *ptr_out_rev-- = ixheaac_sub32_sat(temp3, val1); } return; @@ -289,10 +289,10 @@ ixheaacd_posttwdct2_32(WORD32 *inp, WORD16 *out_fwd, out_im = *inp++; out_re1 = - ixheaacd_sat64_32(ixheaacd_add64((WORD64)out_re, (WORD64)out_im) >> 1); - re1 = ixheaacd_round16(ixheaacd_shl32_sat(out_re1, (5 - 1))); + ixheaac_sat64_32(ixheaac_add64((WORD64)out_re, (WORD64)out_im) >> 1); + re1 = ixheaac_round16(ixheaac_shl32_sat(out_re1, (5 - 1))); *out_fwd++ = re1; - last_val = ixheaacd_sub32_sat(out_re, out_im); + last_val = ixheaac_sub32_sat(out_re, out_im); twidle_fwd = qmf_dec_tables_ptr->dct23_tw + 4; for (k = 14; k >= 0; k--) { @@ -302,27 +302,27 @@ ixheaacd_posttwdct2_32(WORD32 *inp, WORD16 *out_fwd, twid_im = *twidle_fwd; twidle_fwd += 3; - temp1 = ixheaacd_mult32x16in32(inp_re, twid_re); - temp2 = ixheaacd_mult32x16in32(inp_re, twid_im); + temp1 = ixheaac_mult32x16in32(inp_re, twid_re); + temp2 = ixheaac_mult32x16in32(inp_re, twid_im); inp_re = *inp++; - out_re = ixheaacd_sub32_sat(temp1, ixheaacd_mult32x16in32(inp_re, twid_im)); - out_im = ixheaacd_add32_sat(ixheaacd_mult32x16in32(inp_re, twid_re), temp2); + out_re = ixheaac_sub32_sat(temp1, ixheaac_mult32x16in32(inp_re, twid_im)); + out_im = ixheaac_add32_sat(ixheaac_mult32x16in32(inp_re, twid_re), temp2); - out_re = ixheaacd_add32_sat(out_re, out_re); - out_im = ixheaacd_add32_sat(out_im, out_im); - out_re = ixheaacd_add32_sat(out_re, out_re); - out_im = ixheaacd_add32_sat(out_im, out_im); - out_re = ixheaacd_add32_sat(out_re, out_re); - out_im = ixheaacd_add32_sat(out_im, out_im); - out_re = ixheaacd_add32_sat(out_re, out_re); - out_im = ixheaacd_add32_sat(out_im, out_im); - out_re = ixheaacd_add32_sat(out_re, rounding_fac); - out_im = ixheaacd_add32_sat(out_im, rounding_fac); + out_re = ixheaac_add32_sat(out_re, out_re); + out_im = ixheaac_add32_sat(out_im, out_im); + out_re = ixheaac_add32_sat(out_re, out_re); + out_im = ixheaac_add32_sat(out_im, out_im); + out_re = ixheaac_add32_sat(out_re, out_re); + out_im = ixheaac_add32_sat(out_im, out_im); + out_re = ixheaac_add32_sat(out_re, out_re); + out_im = ixheaac_add32_sat(out_im, out_im); + out_re = ixheaac_add32_sat(out_re, rounding_fac); + out_im = ixheaac_add32_sat(out_im, rounding_fac); re1 = (out_re >> 16); im1 = (out_im >> 16); - im2 = ixheaacd_negate16(im1); + im2 = ixheaac_negate16(im1); *out_fwd++ = re1; *out_rev2-- = re1; @@ -331,8 +331,8 @@ ixheaacd_posttwdct2_32(WORD32 *inp, WORD16 *out_fwd, } twid_re = *twidle_fwd++; - out_re = ixheaacd_mult32x16in32(last_val, twid_re); - re1 = ixheaacd_round16(ixheaacd_shl32_sat(out_re, (5 - 1))); + out_re = ixheaac_mult32x16in32(last_val, twid_re); + re1 = ixheaac_round16(ixheaac_shl32_sat(out_re, (5 - 1))); *out_fwd++ = re1; *out_rev2-- = re1; @@ -367,63 +367,63 @@ VOID ixheaacd_sbr_qmfanal32_winadd_eld_mps(WORD32 *inp1, WORD32 *inp2, for (n = 0; n < 64; n += 2) { WORD32 accu; - accu = ixheaacd_mul32_sh(inp1[n + 0], p_qmf1[(n + 0)], 31); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 2 * resolution], + accu = ixheaac_mul32_sh(inp1[n + 0], p_qmf1[(n + 0)], 31); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 2 * resolution], p_qmf1[(n + 2 * resolution)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 4 * resolution], + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 4 * resolution], p_qmf1[(n + 4 * resolution)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 6 * resolution], + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 6 * resolution], p_qmf1[(n + 6 * resolution)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 8 * resolution], + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 8 * resolution], p_qmf1[(n + 8 * resolution)], 31)); p_out[n] = accu; - accu = ixheaacd_mul32_sh(inp1[n + 1 + 0], p_qmf1[(n + 1 + 0)], 31); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 1 + 2 * resolution], + accu = ixheaac_mul32_sh(inp1[n + 1 + 0], p_qmf1[(n + 1 + 0)], 31); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 1 + 2 * resolution], p_qmf1[(n + 1 + 2 * resolution)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 1 + 4 * resolution], + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 1 + 4 * resolution], p_qmf1[(n + 1 + 4 * resolution)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 1 + 6 * resolution], + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 1 + 6 * resolution], p_qmf1[(n + 1 + 6 * resolution)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 1 + 8 * resolution], + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 1 + 8 * resolution], p_qmf1[(n + 1 + 8 * resolution)], 31)); p_out[n + 1] = accu; - accu = ixheaacd_mul32_sh(inp2[n + 0], p_qmf2[(n + 0)], 31); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 2 * resolution], + accu = ixheaac_mul32_sh(inp2[n + 0], p_qmf2[(n + 0)], 31); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 2 * resolution], p_qmf2[(n + 2 * resolution)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 4 * resolution], + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 4 * resolution], p_qmf2[(n + 4 * resolution)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 6 * resolution], + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 6 * resolution], p_qmf2[(n + 6 * resolution)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 8 * resolution], + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 8 * resolution], p_qmf2[(n + 8 * resolution)], 31)); p_out[n + 64] = accu; - accu = ixheaacd_mul32_sh(inp2[n + 1 + 0], p_qmf2[(n + 1 + 0)], 31); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 1 + 2 * resolution], + accu = ixheaac_mul32_sh(inp2[n + 1 + 0], p_qmf2[(n + 1 + 0)], 31); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 1 + 2 * resolution], p_qmf2[(n + 1 + 2 * resolution)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 1 + 4 * resolution], + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 1 + 4 * resolution], p_qmf2[(n + 1 + 4 * resolution)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 1 + 6 * resolution], + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 1 + 6 * resolution], p_qmf2[(n + 1 + 6 * resolution)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 1 + 8 * resolution], + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 1 + 8 * resolution], p_qmf2[(n + 1 + 8 * resolution)], 31)); p_out[n + 1 + 64] = accu; } @@ -436,48 +436,48 @@ VOID ixheaacd_sbr_qmfanal32_winadd_eld_32(WORD32 *inp1, WORD32 *inp2, for (n = 0; n < 32; n += 2) { WORD32 accu; - accu = ixheaacd_mul32_sh(inp1[n + 0], p_qmf1[(n + 0)], 31); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 64], p_qmf1[(n + 64)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 128], p_qmf1[(n + 128)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 192], p_qmf1[(n + 192)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 256], p_qmf1[(n + 256)], 31)); + accu = ixheaac_mul32_sh(inp1[n + 0], p_qmf1[(n + 0)], 31); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 64], p_qmf1[(n + 64)], 31)); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 128], p_qmf1[(n + 128)], 31)); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 192], p_qmf1[(n + 192)], 31)); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 256], p_qmf1[(n + 256)], 31)); p_out[n] = accu; - accu = ixheaacd_mul32_sh(inp1[n + 1 + 0], p_qmf1[(n + 1 + 0)], 31); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 1 + 64], p_qmf1[(n + 1 + 64)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 1 + 128], p_qmf1[(n + 1 + 128)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 1 + 192], p_qmf1[(n + 1 + 192)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp1[n + 1 + 256], p_qmf1[(n + 1 + 256)], 31)); + accu = ixheaac_mul32_sh(inp1[n + 1 + 0], p_qmf1[(n + 1 + 0)], 31); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 1 + 64], p_qmf1[(n + 1 + 64)], 31)); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 1 + 128], p_qmf1[(n + 1 + 128)], 31)); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 1 + 192], p_qmf1[(n + 1 + 192)], 31)); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp1[n + 1 + 256], p_qmf1[(n + 1 + 256)], 31)); p_out[n + 1] = accu; - accu = ixheaacd_mul32_sh(inp2[n + 0], p_qmf2[(n + 0)], 31); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 64], p_qmf2[(n + 64)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 128], p_qmf2[(n + 128)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 192], p_qmf2[(n + 192)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 256], p_qmf2[(n + 256)], 31)); + accu = ixheaac_mul32_sh(inp2[n + 0], p_qmf2[(n + 0)], 31); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 64], p_qmf2[(n + 64)], 31)); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 128], p_qmf2[(n + 128)], 31)); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 192], p_qmf2[(n + 192)], 31)); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 256], p_qmf2[(n + 256)], 31)); p_out[n + 32] = accu; - accu = ixheaacd_mul32_sh(inp2[n + 1 + 0], p_qmf2[(n + 1 + 0)], 31); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 1 + 64], p_qmf2[(n + 1 + 64)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 1 + 128], p_qmf2[(n + 1 + 128)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 1 + 192], p_qmf2[(n + 1 + 192)], 31)); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mul32_sh(inp2[n + 1 + 256], p_qmf2[(n + 1 + 256)], 31)); + accu = ixheaac_mul32_sh(inp2[n + 1 + 0], p_qmf2[(n + 1 + 0)], 31); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 1 + 64], p_qmf2[(n + 1 + 64)], 31)); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 1 + 128], p_qmf2[(n + 1 + 128)], 31)); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 1 + 192], p_qmf2[(n + 1 + 192)], 31)); + accu = ixheaac_add32_sat( + accu, ixheaac_mul32_sh(inp2[n + 1 + 256], p_qmf2[(n + 1 + 256)], 31)); p_out[n + 1 + 32] = accu; } } @@ -489,48 +489,48 @@ VOID ixheaacd_sbr_qmfanal32_winadd_eld(WORD16 *inp1, WORD16 *inp2, for (n = 0; n < 32; n += 2) { WORD32 accu; - accu = ixheaacd_mult16x16in32(inp1[n + 0], p_qmf1[(n + 0)]); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp1[n + 64], p_qmf1[(n + 64)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp1[n + 128], p_qmf1[(n + 128)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp1[n + 192], p_qmf1[(n + 192)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp1[n + 256], p_qmf1[(n + 256)])); + accu = ixheaac_mult16x16in32(inp1[n + 0], p_qmf1[(n + 0)]); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp1[n + 64], p_qmf1[(n + 64)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp1[n + 128], p_qmf1[(n + 128)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp1[n + 192], p_qmf1[(n + 192)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp1[n + 256], p_qmf1[(n + 256)])); p_out[n] = accu; - accu = ixheaacd_mult16x16in32(inp1[n + 1 + 0], p_qmf1[(n + 1 + 0)]); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp1[n + 1 + 64], p_qmf1[(n + 1 + 64)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp1[n + 1 + 128], p_qmf1[(n + 1 + 128)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp1[n + 1 + 192], p_qmf1[(n + 1 + 192)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp1[n + 1 + 256], p_qmf1[(n + 1 + 256)])); + accu = ixheaac_mult16x16in32(inp1[n + 1 + 0], p_qmf1[(n + 1 + 0)]); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp1[n + 1 + 64], p_qmf1[(n + 1 + 64)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp1[n + 1 + 128], p_qmf1[(n + 1 + 128)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp1[n + 1 + 192], p_qmf1[(n + 1 + 192)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp1[n + 1 + 256], p_qmf1[(n + 1 + 256)])); p_out[n + 1] = accu; - accu = ixheaacd_mult16x16in32(inp2[n + 0], p_qmf2[(n + 0)]); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp2[n + 64], p_qmf2[(n + 64)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp2[n + 128], p_qmf2[(n + 128)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp2[n + 192], p_qmf2[(n + 192)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp2[n + 256], p_qmf2[(n + 256)])); + accu = ixheaac_mult16x16in32(inp2[n + 0], p_qmf2[(n + 0)]); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp2[n + 64], p_qmf2[(n + 64)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp2[n + 128], p_qmf2[(n + 128)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp2[n + 192], p_qmf2[(n + 192)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp2[n + 256], p_qmf2[(n + 256)])); p_out[n + 32] = accu; - accu = ixheaacd_mult16x16in32(inp2[n + 1 + 0], p_qmf2[(n + 1 + 0)]); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp2[n + 1 + 64], p_qmf2[(n + 1 + 64)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp2[n + 1 + 128], p_qmf2[(n + 1 + 128)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp2[n + 1 + 192], p_qmf2[(n + 1 + 192)])); - accu = ixheaacd_add32_sat( - accu, ixheaacd_mult16x16in32(inp2[n + 1 + 256], p_qmf2[(n + 1 + 256)])); + accu = ixheaac_mult16x16in32(inp2[n + 1 + 0], p_qmf2[(n + 1 + 0)]); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp2[n + 1 + 64], p_qmf2[(n + 1 + 64)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp2[n + 1 + 128], p_qmf2[(n + 1 + 128)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp2[n + 1 + 192], p_qmf2[(n + 1 + 192)])); + accu = ixheaac_add32_sat( + accu, ixheaac_mult16x16in32(inp2[n + 1 + 256], p_qmf2[(n + 1 + 256)])); p_out[n + 1 + 32] = accu; } } @@ -543,188 +543,188 @@ VOID ixheaacd_esbr_qmfanal32_winadd(WORD32 *inp1, WORD32 *inp2, WORD32 *p_qmf1, if (num_band_anal_qmf == 32) { for (n = 0; n < num_band_anal_qmf; n += 2) { - accu = ixheaacd_mult64(inp1[n + 0], p_qmf1[2 * (n + 0)]); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 2 * num_band_anal_qmf], + accu = ixheaac_mult64(inp1[n + 0], p_qmf1[2 * (n + 0)]); + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 2 * num_band_anal_qmf], p_qmf1[2 * (n + 2 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 4 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 4 * num_band_anal_qmf], p_qmf1[2 * (n + 4 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 6 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 6 * num_band_anal_qmf], p_qmf1[2 * (n + 6 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 8 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 8 * num_band_anal_qmf], p_qmf1[2 * (n + 8 * num_band_anal_qmf)])); p_out[n] = (WORD32)(accu >> 31); - accu = ixheaacd_mult64(inp1[n + 1 + 0], p_qmf1[2 * (n + 1 + 0)]); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 1 + 2 * num_band_anal_qmf], + accu = ixheaac_mult64(inp1[n + 1 + 0], p_qmf1[2 * (n + 1 + 0)]); + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 1 + 2 * num_band_anal_qmf], p_qmf1[2 * (n + 1 + 2 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 1 + 4 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 1 + 4 * num_band_anal_qmf], p_qmf1[2 * (n + 1 + 4 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 1 + 6 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 1 + 6 * num_band_anal_qmf], p_qmf1[2 * (n + 1 + 6 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 1 + 8 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 1 + 8 * num_band_anal_qmf], p_qmf1[2 * (n + 1 + 8 * num_band_anal_qmf)])); p_out[n + 1] = (WORD32)(accu >> 31); - accu = ixheaacd_mult64(inp2[n + 0], p_qmf2[2 * (n + 0)]); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 2 * num_band_anal_qmf], + accu = ixheaac_mult64(inp2[n + 0], p_qmf2[2 * (n + 0)]); + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 2 * num_band_anal_qmf], p_qmf2[2 * (n + 2 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 4 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 4 * num_band_anal_qmf], p_qmf2[2 * (n + 4 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 6 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 6 * num_band_anal_qmf], p_qmf2[2 * (n + 6 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 8 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 8 * num_band_anal_qmf], p_qmf2[2 * (n + 8 * num_band_anal_qmf)])); p_out[n + num_band_anal_qmf] = (WORD32)(accu >> 31); - accu = ixheaacd_mult64(inp2[n + 1 + 0], p_qmf2[2 * (n + 1 + 0)]); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 1 + 2 * num_band_anal_qmf], + accu = ixheaac_mult64(inp2[n + 1 + 0], p_qmf2[2 * (n + 1 + 0)]); + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 1 + 2 * num_band_anal_qmf], p_qmf2[2 * (n + 1 + 2 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 1 + 4 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 1 + 4 * num_band_anal_qmf], p_qmf2[2 * (n + 1 + 4 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 1 + 6 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 1 + 6 * num_band_anal_qmf], p_qmf2[2 * (n + 1 + 6 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 1 + 8 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 1 + 8 * num_band_anal_qmf], p_qmf2[2 * (n + 1 + 8 * num_band_anal_qmf)])); p_out[n + 1 + num_band_anal_qmf] = (WORD32)(accu >> 31); } } else if (num_band_anal_qmf == 24) { for (n = 0; n < num_band_anal_qmf; n += 2) { - accu = ixheaacd_mult64(inp1[n + 0], p_qmf1[(n + 0)]); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 2 * num_band_anal_qmf], + accu = ixheaac_mult64(inp1[n + 0], p_qmf1[(n + 0)]); + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 2 * num_band_anal_qmf], p_qmf1[(n + 2 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 4 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 4 * num_band_anal_qmf], p_qmf1[(n + 4 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 6 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 6 * num_band_anal_qmf], p_qmf1[(n + 6 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 8 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 8 * num_band_anal_qmf], p_qmf1[(n + 8 * num_band_anal_qmf)])); p_out[n] = (WORD32)(accu >> 31); - accu = ixheaacd_mult64(inp1[n + 1 + 0], p_qmf1[(n + 1 + 0)]); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 1 + 2 * num_band_anal_qmf], + accu = ixheaac_mult64(inp1[n + 1 + 0], p_qmf1[(n + 1 + 0)]); + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 1 + 2 * num_band_anal_qmf], p_qmf1[(n + 1 + 2 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 1 + 4 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 1 + 4 * num_band_anal_qmf], p_qmf1[(n + 1 + 4 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 1 + 6 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 1 + 6 * num_band_anal_qmf], p_qmf1[(n + 1 + 6 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 1 + 8 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 1 + 8 * num_band_anal_qmf], p_qmf1[(n + 1 + 8 * num_band_anal_qmf)])); p_out[n + 1] = (WORD32)(accu >> 31); - accu = ixheaacd_mult64(inp2[n + 0], p_qmf2[(n + 0)]); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 2 * num_band_anal_qmf], + accu = ixheaac_mult64(inp2[n + 0], p_qmf2[(n + 0)]); + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 2 * num_band_anal_qmf], p_qmf2[(n + 2 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 4 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 4 * num_band_anal_qmf], p_qmf2[(n + 4 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 6 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 6 * num_band_anal_qmf], p_qmf2[(n + 6 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 8 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 8 * num_band_anal_qmf], p_qmf2[(n + 8 * num_band_anal_qmf)])); p_out[n + num_band_anal_qmf] = (WORD32)(accu >> 31); - accu = ixheaacd_mult64(inp2[n + 1 + 0], p_qmf2[(n + 1 + 0)]); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 1 + 2 * num_band_anal_qmf], + accu = ixheaac_mult64(inp2[n + 1 + 0], p_qmf2[(n + 1 + 0)]); + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 1 + 2 * num_band_anal_qmf], p_qmf2[(n + 1 + 2 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 1 + 4 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 1 + 4 * num_band_anal_qmf], p_qmf2[(n + 1 + 4 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 1 + 6 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 1 + 6 * num_band_anal_qmf], p_qmf2[(n + 1 + 6 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 1 + 8 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 1 + 8 * num_band_anal_qmf], p_qmf2[(n + 1 + 8 * num_band_anal_qmf)])); p_out[n + 1 + num_band_anal_qmf] = (WORD32)(accu >> 31); } } else { for (n = 0; n < num_band_anal_qmf; n += 2) { - accu = ixheaacd_mult64(inp1[n + 0], p_qmf1[4 * (n + 0)]); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 2 * num_band_anal_qmf], + accu = ixheaac_mult64(inp1[n + 0], p_qmf1[4 * (n + 0)]); + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 2 * num_band_anal_qmf], p_qmf1[4 * (n + 2 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 4 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 4 * num_band_anal_qmf], p_qmf1[4 * (n + 4 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 6 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 6 * num_band_anal_qmf], p_qmf1[4 * (n + 6 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 8 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 8 * num_band_anal_qmf], p_qmf1[4 * (n + 8 * num_band_anal_qmf)])); p_out[n] = (WORD32)(accu >> 31); - accu = ixheaacd_mult64(inp1[n + 1 + 0], p_qmf1[4 * (n + 1 + 0)]); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 1 + 2 * num_band_anal_qmf], + accu = ixheaac_mult64(inp1[n + 1 + 0], p_qmf1[4 * (n + 1 + 0)]); + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 1 + 2 * num_band_anal_qmf], p_qmf1[4 * (n + 1 + 2 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 1 + 4 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 1 + 4 * num_band_anal_qmf], p_qmf1[4 * (n + 1 + 4 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 1 + 6 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 1 + 6 * num_band_anal_qmf], p_qmf1[4 * (n + 1 + 6 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp1[n + 1 + 8 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp1[n + 1 + 8 * num_band_anal_qmf], p_qmf1[4 * (n + 1 + 8 * num_band_anal_qmf)])); p_out[n + 1] = (WORD32)(accu >> 31); - accu = ixheaacd_mult64(inp2[n + 0], p_qmf2[4 * (n + 0)]); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 2 * num_band_anal_qmf], + accu = ixheaac_mult64(inp2[n + 0], p_qmf2[4 * (n + 0)]); + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 2 * num_band_anal_qmf], p_qmf2[4 * (n + 2 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 4 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 4 * num_band_anal_qmf], p_qmf2[4 * (n + 4 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 6 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 6 * num_band_anal_qmf], p_qmf2[4 * (n + 6 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 8 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 8 * num_band_anal_qmf], p_qmf2[4 * (n + 8 * num_band_anal_qmf)])); p_out[n + num_band_anal_qmf] = (WORD32)(accu >> 31); - accu = ixheaacd_mult64(inp2[n + 1 + 0], p_qmf2[4 * (n + 1 + 0)]); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 1 + 2 * num_band_anal_qmf], + accu = ixheaac_mult64(inp2[n + 1 + 0], p_qmf2[4 * (n + 1 + 0)]); + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 1 + 2 * num_band_anal_qmf], p_qmf2[4 * (n + 1 + 2 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 1 + 4 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 1 + 4 * num_band_anal_qmf], p_qmf2[4 * (n + 1 + 4 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 1 + 6 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 1 + 6 * num_band_anal_qmf], p_qmf2[4 * (n + 1 + 6 * num_band_anal_qmf)])); - accu = ixheaacd_add64( - accu, ixheaacd_mult64(inp2[n + 1 + 8 * num_band_anal_qmf], + accu = ixheaac_add64( + accu, ixheaac_mult64(inp2[n + 1 + 8 * num_band_anal_qmf], p_qmf2[4 * (n + 1 + 8 * num_band_anal_qmf)])); p_out[n + 1 + num_band_anal_qmf] = (WORD32)(accu >> 31); } @@ -757,30 +757,30 @@ VOID ixheaacd_sbr_qmfsyn32_winadd(WORD16 *tmp1, WORD16 *tmp2, WORD16 *inp1, for (k = 0; k < 32; k++) { WORD32 syn_out = rounding_fac; - syn_out = ixheaacd_add32( - syn_out, ixheaacd_mult16x16in32(tmp1[0 + k], inp1[2 * (k + 0)])); - syn_out = ixheaacd_add32( - syn_out, ixheaacd_mult16x16in32(tmp1[128 + k], inp1[2 * (k + 64)])); - syn_out = ixheaacd_add32( - syn_out, ixheaacd_mult16x16in32(tmp1[256 + k], inp1[2 * (k + 128)])); - syn_out = ixheaacd_add32( - syn_out, ixheaacd_mult16x16in32(tmp1[384 + k], inp1[2 * (k + 192)])); - syn_out = ixheaacd_add32( - syn_out, ixheaacd_mult16x16in32(tmp1[512 + k], inp1[2 * (k + 256)])); + syn_out = ixheaac_add32( + syn_out, ixheaac_mult16x16in32(tmp1[0 + k], inp1[2 * (k + 0)])); + syn_out = ixheaac_add32( + syn_out, ixheaac_mult16x16in32(tmp1[128 + k], inp1[2 * (k + 64)])); + syn_out = ixheaac_add32( + syn_out, ixheaac_mult16x16in32(tmp1[256 + k], inp1[2 * (k + 128)])); + syn_out = ixheaac_add32( + syn_out, ixheaac_mult16x16in32(tmp1[384 + k], inp1[2 * (k + 192)])); + syn_out = ixheaac_add32( + syn_out, ixheaac_mult16x16in32(tmp1[512 + k], inp1[2 * (k + 256)])); - syn_out = ixheaacd_add32( - syn_out, ixheaacd_mult16x16in32(tmp2[64 + k], inp1[2 * (k + 32)])); - syn_out = ixheaacd_add32( - syn_out, ixheaacd_mult16x16in32(tmp2[192 + k], inp1[2 * (k + 96)])); - syn_out = ixheaacd_add32( - syn_out, ixheaacd_mult16x16in32(tmp2[320 + k], inp1[2 * (k + 160)])); - syn_out = ixheaacd_add32( - syn_out, ixheaacd_mult16x16in32(tmp2[448 + k], inp1[2 * (k + 224)])); - syn_out = ixheaacd_add32( - syn_out, ixheaacd_mult16x16in32(tmp2[576 + k], inp1[2 * (k + 288)])); - syn_out = ixheaacd_add32_sat(syn_out, syn_out); + syn_out = ixheaac_add32( + syn_out, ixheaac_mult16x16in32(tmp2[64 + k], inp1[2 * (k + 32)])); + syn_out = ixheaac_add32( + syn_out, ixheaac_mult16x16in32(tmp2[192 + k], inp1[2 * (k + 96)])); + syn_out = ixheaac_add32( + syn_out, ixheaac_mult16x16in32(tmp2[320 + k], inp1[2 * (k + 160)])); + syn_out = ixheaac_add32( + syn_out, ixheaac_mult16x16in32(tmp2[448 + k], inp1[2 * (k + 224)])); + syn_out = ixheaac_add32( + syn_out, ixheaac_mult16x16in32(tmp2[576 + k], inp1[2 * (k + 288)])); + syn_out = ixheaac_add32_sat(syn_out, syn_out); if (shift == 2) { - syn_out = ixheaacd_add32_sat(syn_out, syn_out); + syn_out = ixheaac_add32_sat(syn_out, syn_out); } sample_buffer[ch_fac * k] = (syn_out >> 16); } @@ -799,10 +799,10 @@ void ixheaacd_sbr_pre_twiddle(WORD32 *p_xre, WORD32 *p_xim, WORD32 re, im; - re = ixheaacd_mac32x16in32_shl_sat( - ixheaacd_mult32x16in32_shl(x_re, ixheaacd_cosine), x_im, ixheaacd_sine); - im = ixheaacd_sub32_sat(ixheaacd_mult32x16in32_shl(x_im, ixheaacd_cosine), - ixheaacd_mult32x16in32_shl(x_re, ixheaacd_sine)); + re = ixheaac_mac32x16in32_shl_sat( + ixheaac_mult32x16in32_shl(x_re, ixheaacd_cosine), x_im, ixheaacd_sine); + im = ixheaac_sub32_sat(ixheaac_mult32x16in32_shl(x_im, ixheaacd_cosine), + ixheaac_mult32x16in32_shl(x_re, ixheaacd_sine)); *p_xre++ = re; *p_xim++ = im; @@ -890,7 +890,7 @@ VOID ixheaacd_cplx_synt_qmffilt( if (active) { code_scale_factor = scale_factor = sbr_scale_factor->ps_scale; } else { - code_scale_factor = ixheaacd_min32(lb_scale, ov_lb_scale); + code_scale_factor = ixheaac_min32(lb_scale, ov_lb_scale); scale_factor = sbr_scale_factor->hb_scale; } diff --git a/decoder/ixheaacd_qmf_poly.h b/decoder/ixheaacd_qmf_poly.h index a3952b4..47d511e 100644 --- a/decoder/ixheaacd_qmf_poly.h +++ b/decoder/ixheaacd_qmf_poly.h @@ -29,13 +29,13 @@ WORD32 ixheaacd_real_synth_filt(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer, WORD32 num_columns, FLOAT32 qmf_buf_real[][64], FLOAT32 qmf_buf_imag[][64]); -VOID ixheaacd_cmplx_anal_fft_p2(FLOAT32 *inp, FLOAT32 *out, WORD32 n_points); +VOID ixheaac_cmplx_anal_fft_p2(FLOAT32 *inp, FLOAT32 *out, WORD32 n_points); -VOID ixheaacd_cmplx_anal_fft_p3(FLOAT32 *inp, FLOAT32 *out, WORD32 n_points); +VOID ixheaac_cmplx_anal_fft_p3(FLOAT32 *inp, FLOAT32 *out, WORD32 n_points); -VOID ixheaacd_real_synth_fft_p2(FLOAT32 *inp, FLOAT32 *out, WORD32 n_points); +VOID ixheaac_real_synth_fft_p2(FLOAT32 *inp, FLOAT32 *out, WORD32 n_points); -VOID ixheaacd_real_synth_fft_p3(FLOAT32 *inp, FLOAT32 *out, WORD32 n_points); +VOID ixheaac_real_synth_fft_p3(FLOAT32 *inp, FLOAT32 *out, WORD32 n_points); WORD32 ixheaacd_dft_hbe_cplx_anal_filt(ia_esbr_hbe_txposer_struct *ptr_hbe_txposer, FLOAT32 qmf_buf_real[][64], diff --git a/decoder/ixheaacd_rev_vlc.c b/decoder/ixheaacd_rev_vlc.c index 1e9b3b4..8d20067 100644 --- a/decoder/ixheaacd_rev_vlc.c +++ b/decoder/ixheaacd_rev_vlc.c @@ -20,13 +20,13 @@ #include #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" @@ -52,7 +52,7 @@ #include "ixheaacd_common_rom.h" #include "ixheaacd_basic_funcs.h" -#include "ixheaacd_basic_op.h" +#include "ixheaac_basic_op.h" #include "ixheaacd_aacdec.h" @@ -77,7 +77,7 @@ #include "ixheaacd_mps_interface.h" #include "ixheaacd_struct_def.h" #include "ixheaacd_cnst.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_error_standards.h" #define RVLC_ERROR_ALL_ESCAPE_WORDS_INVALID 0x80000000 #define RVLC_ERROR_FORBIDDEN_CW_DETECTED_FWD 0x08000000 @@ -1061,14 +1061,14 @@ VOID ixheaacd_bi_dir_est_scf_prev_frame_reference( INTENSITY_HCB) || (ptr_aac_dec_static_channel_info->rvlc_prev_cb[bnds] == INTENSITY_HCB2)) { - common_min = ixheaacd_min32( + common_min = ixheaac_min32( ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds], ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds]); - ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaacd_min32( + ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaac_min32( common_min, ptr_aac_dec_static_channel_info->rvlc_prev_sf[bnds]); } else { - ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaacd_min32( + ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaac_min32( ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds], ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds]); } @@ -1077,14 +1077,14 @@ VOID ixheaacd_bi_dir_est_scf_prev_frame_reference( case NOISE_HCB: if (ptr_aac_dec_static_channel_info->rvlc_prev_cb[bnds] == NOISE_HCB) { - common_min = ixheaacd_min32( + common_min = ixheaac_min32( ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds], ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds]); - ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaacd_min32( + ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaac_min32( common_min, ptr_aac_dec_static_channel_info->rvlc_prev_sf[bnds]); } else { - ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaacd_min32( + ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaac_min32( ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds], ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds]); } @@ -1099,14 +1099,14 @@ VOID ixheaacd_bi_dir_est_scf_prev_frame_reference( INTENSITY_HCB) && (ptr_aac_dec_static_channel_info->rvlc_prev_cb[bnds] != INTENSITY_HCB2)) { - common_min = ixheaacd_min32( + common_min = ixheaac_min32( ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds], ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds]); - ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaacd_min32( + ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaac_min32( common_min, ptr_aac_dec_static_channel_info->rvlc_prev_sf[bnds]); } else { - ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaacd_min32( + ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaac_min32( ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds], ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds]); } @@ -1469,10 +1469,10 @@ VOID ixheaacd_predictive_interpolation( INTENSITY_HCB) || (ptr_aac_dec_static_channel_info->rvlc_prev_cb[bnds] == INTENSITY_HCB2)) { - common_min = ixheaacd_min32( + common_min = ixheaac_min32( ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds], ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds]); - ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaacd_min32( + ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaac_min32( common_min, ptr_aac_dec_static_channel_info->rvlc_prev_sf[bnds]); } else { @@ -1483,10 +1483,10 @@ VOID ixheaacd_predictive_interpolation( case NOISE_HCB: if (ptr_aac_dec_static_channel_info->rvlc_prev_cb[bnds] == NOISE_HCB) { - common_min = ixheaacd_min32( + common_min = ixheaac_min32( ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds], ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds]); - ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaacd_min32( + ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaac_min32( common_min, ptr_aac_dec_static_channel_info->rvlc_prev_sf[bnds]); } else { @@ -1503,10 +1503,10 @@ VOID ixheaacd_predictive_interpolation( INTENSITY_HCB) && (ptr_aac_dec_static_channel_info->rvlc_prev_cb[bnds] != INTENSITY_HCB2)) { - common_min = ixheaacd_min32( + common_min = ixheaac_min32( ptr_aac_dec_channel_info->rvlc_scf_fwd_arr[bnds], ptr_aac_dec_channel_info->rvlc_scf_bwd_arr[bnds]); - ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaacd_min32( + ptr_aac_dec_channel_info->ptr_scale_factor[bnds] = ixheaac_min32( common_min, ptr_aac_dec_static_channel_info->rvlc_prev_sf[bnds]); } else { @@ -1612,13 +1612,13 @@ static VOID ixheaacd_rvlc_final_error_detection( (ptr_rvlc->conceal_min == CONCEAL_MIN_INIT)) { ptr_rvlc->conceal_max = 0; ptr_rvlc->conceal_min = - ixheaacd_max32(0, (ptr_rvlc->num_wind_grps - 1) * 16 + + ixheaac_max32(0, (ptr_rvlc->num_wind_grps - 1) * 16 + ptr_rvlc->max_sfb_transmitted - 1); } else { ptr_rvlc->conceal_max = - ixheaacd_min32(ptr_rvlc->conceal_max, ptr_rvlc->conceal_max_esc); + ixheaac_min32(ptr_rvlc->conceal_max, ptr_rvlc->conceal_max_esc); ptr_rvlc->conceal_min = - ixheaacd_max32(ptr_rvlc->conceal_min, ptr_rvlc->conceal_min_esc); + ixheaac_max32(ptr_rvlc->conceal_min, ptr_rvlc->conceal_min_esc); } } diff --git a/decoder/ixheaacd_rom.c b/decoder/ixheaacd_rom.c index f61e49a..37c40a1 100644 --- a/decoder/ixheaacd_rom.c +++ b/decoder/ixheaacd_rom.c @@ -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_bitbuffer.h" #include "ixheaacd_interface.h" diff --git a/decoder/ixheaacd_sbr_crc.c b/decoder/ixheaacd_sbr_crc.c index 7dede60..16e7eb6 100644 --- a/decoder/ixheaacd_sbr_crc.c +++ b/decoder/ixheaacd_sbr_crc.c @@ -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_bitbuffer.h" #include "ixheaacd_sbr_crc.h" -#include "ixheaacd_sbr_const.h" +#include "ixheaac_sbr_const.h" static VOID ixheaacd_calc_chk_sum(WORD16* crc_state, WORD32 stream_data, WORD32 num_bits) { diff --git a/decoder/ixheaacd_sbr_dec.c b/decoder/ixheaacd_sbr_dec.c index 2a73ed8..c57c514 100644 --- a/decoder/ixheaacd_sbr_dec.c +++ b/decoder/ixheaacd_sbr_dec.c @@ -19,15 +19,15 @@ */ #include #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" @@ -67,7 +67,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" @@ -1057,19 +1057,19 @@ WORD32 ixheaacd_sbr_dec( reserve_ov1 = reservea[1]; else reserve_ov1 = reserve; - ptr_sbr_dec->max_samp_val = ixheaacd_min32(reserve, reserve_ov1); + ptr_sbr_dec->max_samp_val = ixheaac_min32(reserve, reserve_ov1); reserve_ov2 = (*ixheaacd_ixheaacd_expsubbandsamples)( ptr_sbr_dec->str_hf_generator.lpc_filt_states_real, ptr_sbr_dec->str_hf_generator.lpc_filt_states_imag, 0, usb, 0, LPC_ORDER, low_pow_flag); - reserve_ov1 = ixheaacd_min32(reserve_ov1, reserve_ov2); + reserve_ov1 = ixheaac_min32(reserve_ov1, reserve_ov2); shift1 = ptr_sbr_dec->str_sbr_scale_fact.lb_scale + reserve; shift2 = ptr_sbr_dec->str_sbr_scale_fact.ov_lb_scale + reserve_ov1; - min_shift = ixheaacd_min32(shift1, shift2); + min_shift = ixheaac_min32(shift1, shift2); shift_over = (shift2 - min_shift); reserve -= (shift1 - min_shift); @@ -1118,7 +1118,7 @@ WORD32 ixheaacd_sbr_dec( &ptr_sbr_dec->str_hf_generator, p_arr_qmf_buf_real, degree_alias, border_vec[0] * ptr_header_data->time_step, ptr_header_data->time_step * - ixheaacd_sub16_sat( + ixheaac_sub16_sat( border_vec[ptr_frame_data->str_frame_info_details.num_env], ptr_header_data->num_time_slots), ptr_header_data->pstr_freq_band_data->num_if_bands, @@ -1127,7 +1127,7 @@ WORD32 ixheaacd_sbr_dec( ptr_work_buf_core); com_low_band_scale = - ixheaacd_min32(ptr_sbr_dec->str_sbr_scale_fact.ov_lb_scale, + ixheaac_min32(ptr_sbr_dec->str_sbr_scale_fact.ov_lb_scale, ptr_sbr_dec->str_sbr_scale_fact.lb_scale); ptr_sbr_dec->str_sbr_scale_fact.hb_scale = @@ -1148,7 +1148,7 @@ WORD32 ixheaacd_sbr_dec( &ptr_sbr_dec->str_hf_generator, &ptr_sbr_dec->str_sbr_scale_fact, p_arr_qmf_buf_real, p_arr_qmf_buf_imag, ptr_header_data->time_step, border_vec[0], - ixheaacd_sub16_sat( + ixheaac_sub16_sat( border_vec[ptr_frame_data->str_frame_info_details.num_env], ptr_header_data->num_time_slots), ptr_header_data->pstr_freq_band_data->num_if_bands, diff --git a/decoder/ixheaacd_sbr_rom.c b/decoder/ixheaacd_sbr_rom.c index 25edaa3..493ba54 100644 --- a/decoder/ixheaacd_sbr_rom.c +++ b/decoder/ixheaacd_sbr_rom.c @@ -19,7 +19,7 @@ */ #include #include "ixheaacd_sbr_common.h" -#include "ixheaacd_type_def.h" +#include "ixheaac_type_def.h" #include "ixheaacd_defines.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_pns.h" @@ -36,7 +36,7 @@ #include "ixheaacd_drc_dec.h" #include "ixheaacd_sbrdecoder.h" -#include "ixheaacd_sbr_const.h" +#include "ixheaac_sbr_const.h" #include "ixheaacd_sbrdecsettings.h" #include "ixheaacd_sbr_scale.h" diff --git a/decoder/ixheaacd_sbrdec_initfuncs.c b/decoder/ixheaacd_sbrdec_initfuncs.c index 118533e..40ed4d5 100644 --- a/decoder/ixheaacd_sbrdec_initfuncs.c +++ b/decoder/ixheaacd_sbrdec_initfuncs.c @@ -19,18 +19,18 @@ */ #include #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_intrinsics.h" -#include "ixheaacd_sbr_const.h" -#include "ixheaacd_basic_op.h" +#include "ixheaac_sbr_const.h" +#include "ixheaac_basic_op.h" #include "ixheaacd_defines.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_pns.h" @@ -437,10 +437,10 @@ static PLATFORM_INLINE VOID ixheaacd_init_headerdata( if (tmp < 0) ptr_header_data->num_time_slots = - ixheaacd_extract16l(samp_per_frame << (-tmp)); + ixheaac_extract16l(samp_per_frame << (-tmp)); else ptr_header_data->num_time_slots = - ixheaacd_extract16l(samp_per_frame >> tmp); + ixheaac_extract16l(samp_per_frame >> tmp); } else { ptr_header_data->time_step = 1; diff --git a/decoder/ixheaacd_sbrdec_lpfuncs.c b/decoder/ixheaacd_sbrdec_lpfuncs.c index 60c6ebc..d828d2f 100644 --- a/decoder/ixheaacd_sbrdec_lpfuncs.c +++ b/decoder/ixheaacd_sbrdec_lpfuncs.c @@ -20,18 +20,18 @@ #include #include #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_intrinsics.h" -#include "ixheaacd_sbr_const.h" -#include "ixheaacd_basic_op.h" +#include "ixheaac_sbr_const.h" +#include "ixheaac_basic_op.h" #include "ixheaacd_defines.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_pns.h" @@ -344,7 +344,7 @@ WORD32 ixheaacd_reset_hf_generator(ia_sbr_hf_generator_struct *ptr_hf_gen_str, goal_sb = ixheaacd_find_closest_entry(goal_sb, f_master_tbl, num_mf_bands, 1); if (audio_object_type != AOT_ER_AAC_ELD && audio_object_type != AOT_ER_AAC_LD) { - if (ixheaacd_abs16_sat((WORD16)(goal_sb - usb)) < 4) { + if (ixheaac_abs16_sat((WORD16)(goal_sb - usb)) < 4) { goal_sb = usb; } } @@ -394,7 +394,7 @@ WORD32 ixheaacd_reset_hf_generator(ia_sbr_hf_generator_struct *ptr_hf_gen_str, } src_start_band = SHIFT_START_SB; - abs_sb = ixheaacd_abs16_sat((WORD16)((sb - goal_sb))) - 3; + abs_sb = ixheaac_abs16_sat((WORD16)((sb - goal_sb))) - 3; if (num_bands_in_patch <= 0 && flag_break_1 == 1) { break; @@ -430,8 +430,8 @@ WORD32 ixheaacd_reset_hf_generator(ia_sbr_hf_generator_struct *ptr_hf_gen_str, temp = 0; for (patch = 0; patch < pstr_transposer_settings->num_patches; patch++) { - sb = ixheaacd_min32(sb, p_str_patch_param[patch].src_start_band); - temp = ixheaacd_max32(temp, p_str_patch_param[patch].src_end_band); + sb = ixheaac_min32(sb, p_str_patch_param[patch].src_start_band); + temp = ixheaac_max32(temp, p_str_patch_param[patch].src_end_band); } if (sb > temp) return IA_FATAL_ERROR; @@ -470,8 +470,8 @@ VOID ixheaacd_rescale_x_overlap( ptr_sbr_dec->str_codec_qmf_bank.usb = new_lsb; ptr_sbr_dec->str_synthesis_qmf_bank.lsb = new_lsb; - start_band = ixheaacd_min32(old_lsb, new_lsb); - end_band = ixheaacd_max32(old_lsb, new_lsb); + start_band = ixheaac_min32(old_lsb, new_lsb); + end_band = ixheaac_max32(old_lsb, new_lsb); if (new_lsb != old_lsb && old_lsb > 0) { for (l = start_slot; l < 6; l++) { @@ -751,9 +751,9 @@ VOID ixheaacd_invfilt_level_emphasis(ia_sbr_hf_generator_struct *ptr_hf_gen_str, w1 = 0x7400; w2 = 0x0c00; } - accu = ixheaacd_add32( - ixheaacd_mult32x16in32_shl(bw_array[i], w1), - ixheaacd_mult32x16in32_shl(ptr_hf_gen_str->bw_array_prev[i], w2)); + accu = ixheaac_add32( + ixheaac_mult32x16in32_shl(bw_array[i], w1), + ixheaac_mult32x16in32_shl(ptr_hf_gen_str->bw_array_prev[i], w2)); if (accu < 0x02000000) { accu = 0; diff --git a/decoder/ixheaacd_sbrdecoder.c b/decoder/ixheaacd_sbrdecoder.c index 6bb0801..ade6111 100644 --- a/decoder/ixheaacd_sbrdecoder.c +++ b/decoder/ixheaacd_sbrdecoder.c @@ -19,19 +19,19 @@ */ #include #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_error_codes.h" #include "ixheaacd_intrinsics.h" -#include "ixheaacd_sbr_const.h" -#include "ixheaacd_basic_op.h" +#include "ixheaac_sbr_const.h" +#include "ixheaac_basic_op.h" #include "ixheaacd_defines.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_pns.h" diff --git a/decoder/ixheaacd_spectrum_dec.c b/decoder/ixheaacd_spectrum_dec.c index 11009fb..7ff189e 100644 --- a/decoder/ixheaacd_spectrum_dec.c +++ b/decoder/ixheaacd_spectrum_dec.c @@ -20,7 +20,7 @@ #include #include #include -#include "ixheaacd_type_def.h" +#include "ixheaac_type_def.h" #include "ixheaacd_bitbuffer.h" @@ -38,7 +38,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" diff --git a/decoder/ixheaacd_stereo.c b/decoder/ixheaacd_stereo.c index e091969..2f880f6 100644 --- a/decoder/ixheaacd_stereo.c +++ b/decoder/ixheaacd_stereo.c @@ -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_aac_rom.h" @@ -32,7 +32,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_pulsedata.h" @@ -90,10 +90,10 @@ VOID ixheaacd_ms_stereo_process( WORD32 left_coef2 = *(l_spec + 1); WORD32 right_coef2 = *(r_spec + 1); - *l_spec++ = ixheaacd_add32_sat(left_coef, right_coef); - *r_spec++ = ixheaacd_sub32_sat(left_coef, right_coef); - *l_spec++ = ixheaacd_add32_sat(left_coef2, right_coef2); - *r_spec++ = ixheaacd_sub32_sat(left_coef2, right_coef2); + *l_spec++ = ixheaac_add32_sat(left_coef, right_coef); + *r_spec++ = ixheaac_sub32_sat(left_coef, right_coef); + *l_spec++ = ixheaac_add32_sat(left_coef2, right_coef2); + *r_spec++ = ixheaac_sub32_sat(left_coef2, right_coef2); } } else { l_spec += ptr_sfb_width[sfb]; @@ -186,7 +186,7 @@ VOID ixheaacd_intensity_stereo_process( scf_exp = (sfb_factor >> 2); scale = *(ptr_scale_table + (sfb_factor & 3)); if (!((ptr_ms_used[sfb]) ^ (code_book & 0x1))) { - scale = ixheaacd_negate32(scale); + scale = ixheaac_negate32(scale); } scf_exp = -(scf_exp + 2); @@ -195,16 +195,16 @@ VOID ixheaacd_intensity_stereo_process( WORD32 temp, shift_val; temp = *l_spec++; - shift_val = ixheaacd_norm32(temp); - temp = ixheaacd_shl32(temp, shift_val); + shift_val = ixheaac_norm32(temp); + temp = ixheaac_shl32(temp, shift_val); temp = ixheaacd_mult32x16in32l(temp, scale); shift_val = shift_val + scf_exp; if (shift_val < 0) { - temp = ixheaacd_shl32_sat(temp, -shift_val); + temp = ixheaac_shl32_sat(temp, -shift_val); } else { - temp = ixheaacd_shr32(temp, shift_val); + temp = ixheaac_shr32(temp, shift_val); } *r_spec++ = temp; } diff --git a/decoder/ixheaacd_tcx_fwd_alcnx.c b/decoder/ixheaacd_tcx_fwd_alcnx.c index e0dd052..1ab64f6 100644 --- a/decoder/ixheaacd_tcx_fwd_alcnx.c +++ b/decoder/ixheaacd_tcx_fwd_alcnx.c @@ -22,7 +22,7 @@ #include #include #include -#include "ixheaacd_type_def.h" +#include "ixheaac_type_def.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_interface.h" @@ -41,7 +41,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" @@ -51,9 +51,9 @@ #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 ABS(A) ((A) < 0 ? (-A) : (A)) @@ -78,7 +78,7 @@ WORD8 ixheaacd_float2fix(FLOAT32 *x, WORD32 *int_x, WORD32 length) { } itemp = (WORD32)(ftemp); - shiftp = ixheaacd_norm32(itemp); + shiftp = ixheaac_norm32(itemp); for (k = 0; k < length; k++) { int_x[k] = (WORD32)(x[k] * (FLOAT32)((WORD64)1 << shiftp)); diff --git a/decoder/ixheaacd_tcx_fwd_mdct.c b/decoder/ixheaacd_tcx_fwd_mdct.c index 9af0895..267af0d 100644 --- a/decoder/ixheaacd_tcx_fwd_mdct.c +++ b/decoder/ixheaacd_tcx_fwd_mdct.c @@ -24,7 +24,7 @@ #include #include "ixheaacd_cnst.h" -#include "ixheaacd_type_def.h" +#include "ixheaac_type_def.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_acelp_com.h" @@ -45,11 +45,11 @@ #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_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_ec_defines.h" #include "ixheaacd_ec_struct_def.h" #include "ixheaacd_main.h" @@ -147,7 +147,7 @@ VOID ixheaacd_lpc_to_td(FLOAT32 *coeff, WORD32 order, FLOAT32 *gains, WORD32 lg) } itemp = (WORD32)ftemp; - qshift = ixheaacd_norm32(itemp); + qshift = ixheaac_norm32(itemp); for (i = 0; i < size_n; i++) { idata_r[i] = (WORD32)(data_r[i] * ((WORD64)1 << qshift)); diff --git a/decoder/ixheaacd_thumb_ps_dec.c b/decoder/ixheaacd_thumb_ps_dec.c index 52d6d73..b4550cb 100644 --- a/decoder/ixheaacd_thumb_ps_dec.c +++ b/decoder/ixheaacd_thumb_ps_dec.c @@ -19,17 +19,17 @@ */ #include #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_arr.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_arr.h" +#include "ixheaac_basic_ops.h" #include "ixheaacd_defines.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" @@ -61,7 +61,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" #include "ixheaacd_function_selector.h" diff --git a/decoder/ixheaacd_tns.c b/decoder/ixheaacd_tns.c index c4a2dea..c9c9743 100644 --- a/decoder/ixheaacd_tns.c +++ b/decoder/ixheaacd_tns.c @@ -20,7 +20,7 @@ #include #include -#include "ixheaacd_type_def.h" +#include "ixheaac_type_def.h" #include "ixheaacd_bitbuffer.h" #include "ixheaacd_interface.h" @@ -37,16 +37,16 @@ #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_function_selector.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 sfb_offset(x) (((x) > 0) ? sfb_top[(x)-1] : 0) @@ -105,18 +105,18 @@ static VOID ixheaacd_tns_parcor_lpc_convert_usac(WORD32 *parcor, for (j = 0; j < order; j++) { temp_buf2[j] = (accu1); - accu1 = ixheaacd_add32_sat( - accu1, ixheaacd_mult32_shl_sat(parcor[j], temp_buf1[j])); - if (ixheaacd_abs32_sat(accu1) == 0x7fffffff) status = 1; + accu1 = ixheaac_add32_sat( + accu1, ixheaac_mult32_shl_sat(parcor[j], temp_buf1[j])); + if (ixheaac_abs32_sat(accu1) == 0x7fffffff) status = 1; } for (j = (order - 1); j >= 0; j--) { accu2 = (temp_buf1[j]); - accu2 = ixheaacd_add32_sat( - accu2, ixheaacd_mult32_shl_sat(parcor[j], temp_buf2[j])); + accu2 = ixheaac_add32_sat( + accu2, ixheaac_mult32_shl_sat(parcor[j], temp_buf2[j])); temp_buf1[j + 1] = (accu2); - if (ixheaacd_abs32_sat(accu2) == 0x7fffffff) status = 1; + if (ixheaac_abs32_sat(accu2) == 0x7fffffff) status = 1; } temp_buf1[0] = (accu); @@ -153,13 +153,13 @@ static VOID ixheaacd_tns_ar_filter_usac(WORD32 *spectrum, WORD32 size, acc = 0; for (j = i; j > 0; j--) { - acc = ixheaacd_add64_sat( - acc, ixheaacd_mult64(ptr_filter_state[j - 1], lpc_coeff[j])); + acc = ixheaac_add64_sat( + acc, ixheaac_mult64(ptr_filter_state[j - 1], lpc_coeff[j])); ptr_filter_state[j] = ptr_filter_state[j - 1]; } - y = ixheaacd_sub32_sat(y, (WORD32)(acc >> 31)); - ptr_filter_state[0] = ixheaacd_shl32(y, shift_value); + y = ixheaac_sub32_sat(y, (WORD32)(acc >> 31)); + ptr_filter_state[0] = ixheaac_shl32(y, shift_value); *spectrum = y; spectrum += inc; } @@ -168,13 +168,13 @@ static VOID ixheaacd_tns_ar_filter_usac(WORD32 *spectrum, WORD32 size, y = *spectrum; acc = 0; for (j = order; j > 0; j--) { - acc = ixheaacd_add64_sat( - acc, ixheaacd_mult64(ptr_filter_state[j - 1], lpc_coeff[j])); + acc = ixheaac_add64_sat( + acc, ixheaac_mult64(ptr_filter_state[j - 1], lpc_coeff[j])); ; ptr_filter_state[j] = ptr_filter_state[j - 1]; } - y = ixheaacd_sub32_sat(y, (WORD32)(acc >> 31)); - ptr_filter_state[0] = ixheaacd_shl32(y, shift_value); + y = ixheaac_sub32_sat(y, (WORD32)(acc >> 31)); + ptr_filter_state[0] = ixheaac_shl32(y, shift_value); *spectrum = y; spectrum += inc; } @@ -235,18 +235,18 @@ IA_ERRORCODE ixheaacd_tns_apply(ia_usac_data_struct *usac_data, WORD32 *spec, tmp = (*usac_data->tns_max_bands_tbl_usac)[usac_data->sampling_rate_idx] [idx]; - start = ixheaacd_min32(start, tmp); + start = ixheaac_min32(start, tmp); - start = ixheaacd_min32(start, nbands); + start = ixheaac_min32(start, nbands); if (start > pstr_sfb_info->sfb_per_sbk) return -1; start = sfb_offset(start); - stop = ixheaacd_min32(stop, tmp); - stop = ixheaacd_min32(stop, nbands); + stop = ixheaac_min32(stop, tmp); + stop = ixheaac_min32(stop, nbands); if (stop > pstr_sfb_info->sfb_per_sbk) return -1; stop = sfb_offset(stop); - guard_band = 31 - ixheaacd_norm32(filt->order); + guard_band = 31 - ixheaac_norm32(filt->order); if ((size = stop - start) <= 0) continue; @@ -277,7 +277,7 @@ IA_ERRORCODE ixheaacd_tns_apply(ia_usac_data_struct *usac_data, WORD32 *spec, WORD32 *ptr_temp = ptr_spec + start; scale_spec = -scale_spec; - scale_spec = ixheaacd_min32(scale_spec, 31); + scale_spec = ixheaac_min32(scale_spec, 31); for (i = size; i != 0; i--) { *ptr_temp = *ptr_temp >> scale_spec; diff --git a/decoder/ixheaacd_usac_ec.c b/decoder/ixheaacd_usac_ec.c index 2e2006b..a91709e 100644 --- a/decoder/ixheaacd_usac_ec.c +++ b/decoder/ixheaacd_usac_ec.c @@ -18,11 +18,11 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "ixheaacd_sbr_common.h" #include "ixheaacd_intrinsics.h" #include "ixheaacd_common_rom.h" @@ -46,7 +46,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" @@ -64,7 +64,7 @@ static VOID ixheaacd_usac_flip_spec_sign(WORD32 *ptr_spec_coeff, WORD32 samples_ UWORD32 *seed_value) { WORD32 i; for (i = 0; i < samples_per_frame; i++) { - ptr_spec_coeff[i] = ixheaacd_mult32x16in32_sat(ptr_spec_coeff[i], + ptr_spec_coeff[i] = ixheaac_mult32x16in32_sat(ptr_spec_coeff[i], (WORD16)ixheaacd_randomsign(seed_value)); } } @@ -81,11 +81,11 @@ static VOID iexheaace_ec_sfb_nrg_q(WORD32 *ptr_spectrum, ia_ec_sfb_str *pstr_ec_ for (sfb = 0; sfb < num_sfb; sfb++) { WORD64 accu = (WORD64)1; WORD32 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 (; l < ptr_sfb_offset[sfb + 1]; l++) { - accu += ixheaacd_mul32_sh(ptr_spectrum[l], ptr_spectrum[l], q_nrg); + accu += ixheaac_mul32_sh(ptr_spectrum[l], ptr_spectrum[l], q_nrg); } - ptr_sfb_enrg[sfb] = ixheaacd_norm32((WORD32)accu); + ptr_sfb_enrg[sfb] = ixheaac_norm32((WORD32)accu); } } else { num_sfb = pstr_ec_sfb->num_sfb_long; @@ -94,11 +94,11 @@ static VOID iexheaace_ec_sfb_nrg_q(WORD32 *ptr_spectrum, ia_ec_sfb_str *pstr_ec_ for (sfb = 0; sfb < num_sfb; sfb++) { WORD64 accu = (WORD64)1; WORD32 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 (; l < ptr_sfb_offset[sfb + 1]; l++) { - accu += ixheaacd_mul32_sh(ptr_spectrum[(l >> 3)], ptr_spectrum[(l >> 3)], q_nrg); + accu += ixheaac_mul32_sh(ptr_spectrum[(l >> 3)], ptr_spectrum[(l >> 3)], q_nrg); } - ptr_sfb_enrg[sfb] = ixheaacd_norm32((WORD32)accu); + ptr_sfb_enrg[sfb] = ixheaac_norm32((WORD32)accu); } } break; @@ -112,11 +112,11 @@ static VOID iexheaace_ec_sfb_nrg_q(WORD32 *ptr_spectrum, ia_ec_sfb_str *pstr_ec_ for (sfb = 0; sfb < num_sfb; sfb++) { WORD64 accu = (WORD64)1; WORD32 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 (; l < ptr_sfb_offset[sfb + 1]; l++) { - accu += ixheaacd_mul32_sh(ptr_spectrum[l], ptr_spectrum[l], q_nrg); + accu += ixheaac_mul32_sh(ptr_spectrum[l], ptr_spectrum[l], q_nrg); } - ptr_sfb_enrg[sfb] = ixheaacd_norm32((WORD32)accu); + ptr_sfb_enrg[sfb] = ixheaac_norm32((WORD32)accu); } } else { num_sfb = pstr_ec_sfb->num_sfb_short; @@ -125,11 +125,11 @@ static VOID iexheaace_ec_sfb_nrg_q(WORD32 *ptr_spectrum, ia_ec_sfb_str *pstr_ec_ for (sfb = 0; sfb < num_sfb; sfb++) { WORD64 accu = (WORD64)1; WORD32 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 (; l < ptr_sfb_offset[sfb + 1] << 3; l++) { - accu += (accu + (ixheaacd_mul32_sh(ptr_spectrum[l], ptr_spectrum[l], q_nrg))) >> 3; + accu += (accu + (ixheaac_mul32_sh(ptr_spectrum[l], ptr_spectrum[l], q_nrg))) >> 3; } - ptr_sfb_enrg[sfb] = ixheaacd_norm32((WORD32)accu); + ptr_sfb_enrg[sfb] = ixheaac_norm32((WORD32)accu); } } break; @@ -149,16 +149,16 @@ static VOID ixheaacd_usac_ec_interpolate(WORD32 *ptr_spectrum, WORD16 *pq_spec_c ptr_nrg_prev[sfb] - ptr_nrg_act[sfb] + ((*pq_spec_coeff_act - *pq_spec_coeff_prev) << 1); fac_mod = fac_shift & 3; fac_shift = (fac_shift >> 2) + 1; - fac_shift += *pq_spec_coeff_prev - ixheaacd_max16(*pq_spec_coeff_prev, *pq_spec_coeff_act); - fac_shift = ixheaacd_max32(ixheaacd_min32(fac_shift, INT_BITS - 1), -(INT_BITS - 1)); + fac_shift += *pq_spec_coeff_prev - ixheaac_max16(*pq_spec_coeff_prev, *pq_spec_coeff_act); + fac_shift = ixheaac_max32(ixheaac_min32(fac_shift, INT_BITS - 1), -(INT_BITS - 1)); for (; l < ptr_sfb_offset[sfb + 1]; l++) { - WORD32 accu = ixheaacd_shl32_sat( - ixheaacd_mult32x32in32(ptr_spectrum[l], (WORD32)(ia_ec_interpolation_fac[fac_mod])), 1); - ptr_spectrum[l] = ixheaacd_shl32_dir_sat((WORD32)accu, fac_shift); + WORD32 accu = ixheaac_shl32_sat( + ixheaac_mult32x32in32(ptr_spectrum[l], (WORD32)(ia_ec_interpolation_fac[fac_mod])), 1); + ptr_spectrum[l] = ixheaac_shl32_dir_sat((WORD32)accu, fac_shift); } } - *pq_spec_coeff_out = ixheaacd_max16(*pq_spec_coeff_prev, *pq_spec_coeff_act); + *pq_spec_coeff_out = ixheaac_max16(*pq_spec_coeff_prev, *pq_spec_coeff_act); } static VOID ixheaacd_usac_ec_interpolate_frame(ia_usac_data_struct *pstr_usac_data, diff --git a/decoder/libxaacdec.cmake b/decoder/libxaacdec.cmake index 68696b5..d75dc28 100644 --- a/decoder/libxaacdec.cmake +++ b/decoder/libxaacdec.cmake @@ -34,13 +34,10 @@ list( "${XAAC_ROOT}/decoder/ixheaacd_env_dec.c" "${XAAC_ROOT}/decoder/ixheaacd_env_extr.c" "${XAAC_ROOT}/decoder/ixheaacd_esbr_envcal.c" - "${XAAC_ROOT}/decoder/ixheaacd_esbr_fft.c" "${XAAC_ROOT}/decoder/ixheaacd_esbr_polyphase.c" - "${XAAC_ROOT}/decoder/ixheaacd_esbr_rom.c" "${XAAC_ROOT}/decoder/ixheaacd_ext_ch_ele.c" "${XAAC_ROOT}/decoder/ixheaacd_fft.c" "${XAAC_ROOT}/decoder/ixheaacd_fft_ifft_32x32.c" - "${XAAC_ROOT}/decoder/ixheaacd_fft_ifft_32x32_rom.c" "${XAAC_ROOT}/decoder/ixheaacd_freq_sca.c" "${XAAC_ROOT}/decoder/ixheaacd_fwd_alias_cnx.c" "${XAAC_ROOT}/decoder/ixheaacd_hbe_dft_trans.c" @@ -139,4 +136,4 @@ else() include("${XAAC_ROOT}/decoder/x86/libxaacdec_x86.cmake") endif() -add_library(libxaacdec STATIC ${LIBXAACDEC_SRCS} ${LIBXAACCDEC_ASMS}) +add_library(libxaacdec STATIC ${LIBXAAC_COMMON_SRCS} ${LIBXAACDEC_SRCS} ${LIBXAACCDEC_ASMS}) diff --git a/decoder/x86/ixheaacd_function_selector_x86.c b/decoder/x86/ixheaacd_function_selector_x86.c index 33575df..918ec2e 100644 --- a/decoder/x86/ixheaacd_function_selector_x86.c +++ b/decoder/x86/ixheaacd_function_selector_x86.c @@ -20,15 +20,15 @@ #include #include #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" diff --git a/decoder/x86_64/ixheaacd_function_selector_x86_64.c b/decoder/x86_64/ixheaacd_function_selector_x86_64.c index 8698005..3800a3b 100644 --- a/decoder/x86_64/ixheaacd_function_selector_x86_64.c +++ b/decoder/x86_64/ixheaacd_function_selector_x86_64.c @@ -20,15 +20,15 @@ #include #include #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" diff --git a/fuzzer/xaac_dec_fuzzer.cpp b/fuzzer/xaac_dec_fuzzer.cpp index 6ec2ab1..6c760d2 100644 --- a/fuzzer/xaac_dec_fuzzer.cpp +++ b/fuzzer/xaac_dec_fuzzer.cpp @@ -26,8 +26,8 @@ #include -#include "ixheaacd_type_def.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_type_def.h" +#include "ixheaac_error_standards.h" #include "ixheaacd_error_handler.h" #include "ixheaacd_apicmd_standards.h" #include "ixheaacd_memory_standards.h" diff --git a/test/Android.bp b/test/Android.bp index e3e9e58..1e8c9a8 100644 --- a/test/Android.bp +++ b/test/Android.bp @@ -29,10 +29,10 @@ cc_test { ], srcs: [ - "ixheaacd_error.c", - "ixheaacd_fileifc.c", - "ixheaacd_main.c", - "ixheaacd_metadata_read.c" + "decoder/ixheaacd_error.c", + "decoder/ixheaacd_fileifc.c", + "decoder/ixheaacd_main.c", + "decoder/ixheaacd_metadata_read.c" ], static_libs: ["libxaacdec"], diff --git a/test/impd_drc_config_params.h b/test/decoder/impd_drc_config_params.h similarity index 100% rename from test/impd_drc_config_params.h rename to test/decoder/impd_drc_config_params.h diff --git a/test/ixheaacd_error.c b/test/decoder/ixheaacd_error.c similarity index 99% rename from test/ixheaacd_error.c rename to test/decoder/ixheaacd_error.c index 048c95e..235e796 100644 --- a/test/ixheaacd_error.c +++ b/test/decoder/ixheaacd_error.c @@ -18,8 +18,8 @@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ #include -#include "ixheaacd_type_def.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_type_def.h" +#include "ixheaac_error_standards.h" #include "ixheaacd_error_handler.h" /*****************************************************************************/ diff --git a/test/ixheaacd_fileifc.c b/test/decoder/ixheaacd_fileifc.c similarity index 100% rename from test/ixheaacd_fileifc.c rename to test/decoder/ixheaacd_fileifc.c diff --git a/test/ixheaacd_fileifc.h b/test/decoder/ixheaacd_fileifc.h similarity index 100% rename from test/ixheaacd_fileifc.h rename to test/decoder/ixheaacd_fileifc.h diff --git a/test/ixheaacd_main.c b/test/decoder/ixheaacd_main.c similarity index 99% rename from test/ixheaacd_main.c rename to test/decoder/ixheaacd_main.c index 0e07647..277ca55 100644 --- a/test/ixheaacd_main.c +++ b/test/decoder/ixheaacd_main.c @@ -24,8 +24,8 @@ #define AOSP_CHANGE #include "ixheaacd_fileifc.h" -#include "ixheaacd_type_def.h" -#include "ixheaacd_error_standards.h" +#include "ixheaac_type_def.h" +#include "ixheaac_error_standards.h" #include "ixheaacd_error_handler.h" #include "ixheaacd_apicmd_standards.h" #include "ixheaacd_memory_standards.h" diff --git a/test/ixheaacd_metadata_read.c b/test/decoder/ixheaacd_metadata_read.c similarity index 99% rename from test/ixheaacd_metadata_read.c rename to test/decoder/ixheaacd_metadata_read.c index 1b6ea88..da2e688 100644 --- a/test/ixheaacd_metadata_read.c +++ b/test/decoder/ixheaacd_metadata_read.c @@ -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 #include #include diff --git a/test/ixheaacd_metadata_read.h b/test/decoder/ixheaacd_metadata_read.h similarity index 100% rename from test/ixheaacd_metadata_read.h rename to test/decoder/ixheaacd_metadata_read.h diff --git a/test/xaacdec.cmake b/test/decoder/xaacdec.cmake similarity index 67% rename from test/xaacdec.cmake rename to test/decoder/xaacdec.cmake index 168ab74..51f8fed 100644 --- a/test/xaacdec.cmake +++ b/test/decoder/xaacdec.cmake @@ -1,8 +1,8 @@ -list(APPEND XAACDEC_SRCS "${XAAC_ROOT}/test/ixheaacd_error.c" - "${XAAC_ROOT}/test/ixheaacd_fileifc.c" "${XAAC_ROOT}/test/ixheaacd_main.c" - "${XAAC_ROOT}/test/ixheaacd_metadata_read.c") +list(APPEND XAACDEC_SRCS "${XAAC_ROOT}/test/decoder/ixheaacd_error.c" + "${XAAC_ROOT}/test/decoder/ixheaacd_fileifc.c" "${XAAC_ROOT}/test/decoder/ixheaacd_main.c" + "${XAAC_ROOT}/test/decoder/ixheaacd_metadata_read.c") -set(LIBXAACDEC_INCLUDES ${XAAC_ROOT}/decoder ${XAAC_ROOT}/test +set(LIBXAACDEC_INCLUDES ${XAAC_ROOT}/decoder ${XAAC_ROOT}/test/decoder/ ${XAAC_ROOT}/decoder/drc_src) include_directories(${LIBXAACDEC_INCLUDES})