Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ZhouShuya
OpenXG-RAN
Commits
296494ea
Commit
296494ea
authored
5 years ago
by
frtabu
Committed by
oai
5 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create dft shared lib
parent
82e97fce
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
494 additions
and
316 deletions
+494
-316
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+5
-1
openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
+4
-4
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
+20
-20
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
+8
-8
openair1/PHY/LTE_TRANSPORT/prach.c
openair1/PHY/LTE_TRANSPORT/prach.c
+23
-23
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
+102
-102
openair1/PHY/MODULATION/ofdm_mod.c
openair1/PHY/MODULATION/ofdm_mod.c
+12
-12
openair1/PHY/MODULATION/slot_fep_nr.c
openair1/PHY/MODULATION/slot_fep_nr.c
+25
-25
openair1/PHY/MODULATION/slot_fep_ul.c
openair1/PHY/MODULATION/slot_fep_ul.c
+11
-11
openair1/PHY/TOOLS/oai_dfts.c
openair1/PHY/TOOLS/oai_dfts.c
+67
-48
openair1/PHY/TOOLS/tools_defs.h
openair1/PHY/TOOLS/tools_defs.h
+217
-62
No files found.
cmake_targets/CMakeLists.txt
View file @
296494ea
...
@@ -1327,6 +1327,9 @@ add_library(ldpc MODULE ${PHY_LDPC_OPTIM8SEGMULTI_SRC} )
...
@@ -1327,6 +1327,9 @@ add_library(ldpc MODULE ${PHY_LDPC_OPTIM8SEGMULTI_SRC} )
add_library
(
coding MODULE
${
PHY_TURBOSRC
}
)
add_library
(
coding MODULE
${
PHY_TURBOSRC
}
)
add_library
(
dfts MODULE
${
OPENAIR1_DIR
}
/PHY/TOOLS/oai_dfts.c
)
set
(
PHY_SRC_COMMON
set
(
PHY_SRC_COMMON
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/dci_tools_common.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/dci_tools_common.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/lte_mcs.c
${
OPENAIR1_DIR
}
/PHY/LTE_TRANSPORT/lte_mcs.c
...
@@ -1368,7 +1371,7 @@ set(PHY_SRC_COMMON
...
@@ -1368,7 +1371,7 @@ set(PHY_SRC_COMMON
${
OPENAIR1_DIR
}
/PHY/INIT/lte_parms.c
${
OPENAIR1_DIR
}
/PHY/INIT/lte_parms.c
${
OPENAIR1_DIR
}
/PHY/INIT/lte_param_init.c
${
OPENAIR1_DIR
}
/PHY/INIT/lte_param_init.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cadd_vv.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cadd_vv.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/lte_dfts.c
#
${OPENAIR1_DIR}/PHY/TOOLS/lte_dfts.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/log2_approx.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/log2_approx.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cmult_sv.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cmult_sv.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cmult_vv.c
${
OPENAIR1_DIR
}
/PHY/TOOLS/cmult_vv.c
...
@@ -1576,6 +1579,7 @@ endif ()
...
@@ -1576,6 +1579,7 @@ endif ()
add_library
(
PHY_COMMON
${
PHY_SRC_COMMON
}
)
add_library
(
PHY_COMMON
${
PHY_SRC_COMMON
}
)
add_dependencies
(
PHY_COMMON rrc_flag
)
add_dependencies
(
PHY_COMMON rrc_flag
)
add_dependencies
(
PHY_COMMON dfts
)
add_library
(
PHY
${
PHY_SRC
}
)
add_library
(
PHY
${
PHY_SRC
}
)
add_dependencies
(
PHY rrc_flag
)
add_dependencies
(
PHY rrc_flag
)
add_library
(
PHY_UE
${
PHY_SRC_UE
}
)
add_library
(
PHY_UE
${
PHY_SRC_UE
}
)
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
View file @
296494ea
...
@@ -56,22 +56,22 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
...
@@ -56,22 +56,22 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
// do ifft of channel estimate
// do ifft of channel estimate
switch
(
frame_parms
->
N_RB_DL
)
{
switch
(
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
dft
128
(
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
dft
(
DFT_128
,
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
25
:
case
25
:
dft
512
(
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
dft
(
DFT_512
,
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
50
:
case
50
:
dft
1024
(
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
dft
(
DFT_1024
,
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
100
:
case
100
:
dft
2048
(
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
dft
(
DFT_2048
,
(
int16_t
*
)
&
lte_eNB_srs
->
srs_ch_estimates
[
aa
][
0
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
(
int16_t
*
)
lte_eNB_srs
->
srs_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
View file @
296494ea
...
@@ -141,28 +141,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
...
@@ -141,28 +141,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
switch
(
frame_parms
->
N_RB_DL
)
{
switch
(
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
idft
128
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_128
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
25
:
case
25
:
idft
512
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_512
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
50
:
case
50
:
idft
1024
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_1024
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
75
:
case
75
:
idft
1536
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_1536
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
(
short
*
)
sync_tmp
,
1
);
/// complex output
1
);
/// complex output
break
;
break
;
case
100
:
case
100
:
idft
2048
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_2048
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
...
@@ -189,28 +189,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
...
@@ -189,28 +189,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
switch
(
frame_parms
->
N_RB_DL
)
{
switch
(
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
idft
128
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_128
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
25
:
case
25
:
idft
512
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_512
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
50
:
case
50
:
idft
1024
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_1024
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
75
:
case
75
:
idft
1536
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_1536
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
100
:
case
100
:
idft
2048
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_2048
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
...
@@ -237,28 +237,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
...
@@ -237,28 +237,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
switch
(
frame_parms
->
N_RB_DL
)
{
switch
(
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
idft
128
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_128
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
25
:
case
25
:
idft
512
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_512
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
50
:
case
50
:
idft
1024
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_1024
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
75
:
case
75
:
idft
1536
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_1536
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
case
100
:
case
100
:
idft
2048
(
(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_2048
,
(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
(
short
*
)
sync_tmp
,
/// complex output
1
);
1
);
break
;
break
;
...
@@ -492,28 +492,28 @@ int ru_sync_time_init(RU_t *ru) // LTE_UE_COMMON *common_vars
...
@@ -492,28 +492,28 @@ int ru_sync_time_init(RU_t *ru) // LTE_UE_COMMON *common_vars
switch
(
ru
->
frame_parms
->
N_RB_DL
)
{
switch
(
ru
->
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
idft
128
(
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
idft
(
IDFT_128
,
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
ru
->
dmrssync
,
/// complex output
ru
->
dmrssync
,
/// complex output
1
);
1
);
break
;
break
;
case
25
:
case
25
:
idft
512
(
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
idft
(
IDFT_512
,
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
ru
->
dmrssync
,
/// complex output
ru
->
dmrssync
,
/// complex output
1
);
1
);
break
;
break
;
case
50
:
case
50
:
idft
1024
(
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
idft
(
IDFT_1024
,
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
ru
->
dmrssync
,
/// complex output
ru
->
dmrssync
,
/// complex output
1
);
1
);
break
;
break
;
case
75
:
case
75
:
idft
1536
(
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
idft
(
IDFT_1536
,
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
ru
->
dmrssync
,
ru
->
dmrssync
,
1
);
/// complex output
1
);
/// complex output
break
;
break
;
case
100
:
case
100
:
idft
2048
(
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
idft
(
IDFT_2048
,
(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
ru
->
dmrssync
,
/// complex output
ru
->
dmrssync
,
/// complex output
1
);
1
);
break
;
break
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
View file @
296494ea
...
@@ -246,25 +246,25 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
...
@@ -246,25 +246,25 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
switch
(
frame_parms
->
N_RB_DL
)
{
switch
(
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
idft
128
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_128
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
25
:
case
25
:
idft
512
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_512
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
50
:
case
50
:
idft
1024
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_1024
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
100
:
case
100
:
idft
2048
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_2048
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
...
@@ -575,25 +575,25 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
...
@@ -575,25 +575,25 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
switch
(
frame_parms
->
N_RB_DL
)
{
switch
(
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
idft
128
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_128
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
25
:
case
25
:
idft
512
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_512
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
50
:
case
50
:
idft
1024
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_1024
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
100
:
case
100
:
idft
2048
(
(
int16_t
*
)
temp_in_ifft_0
,
idft
(
IDFT_2048
,
(
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/prach.c
View file @
296494ea
...
@@ -298,24 +298,24 @@ void rx_prach0(PHY_VARS_eNB *eNB,
...
@@ -298,24 +298,24 @@ void rx_prach0(PHY_VARS_eNB *eNB,
switch
(
fp
->
N_RB_UL
)
{
switch
(
fp
->
N_RB_UL
)
{
case
6
:
case
6
:
if
(
prach_fmt
==
4
)
{
if
(
prach_fmt
==
4
)
{
dft
256
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_256
,
prach2
,
rxsigF
[
aa
],
1
);
}
else
{
}
else
{
dft
1536
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_1536
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
>
1
)
if
(
prach_fmt
>
1
)
dft
1536
(
prach2
+
3072
,
rxsigF
[
aa
]
+
3072
,
1
);
dft
(
DFT_1536
,
prach2
+
3072
,
rxsigF
[
aa
]
+
3072
,
1
);
}
}
break
;
break
;
case
15
:
case
15
:
if
(
prach_fmt
==
4
)
{
if
(
prach_fmt
==
4
)
{
dft
256
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_256
,
prach2
,
rxsigF
[
aa
],
1
);
}
else
{
}
else
{
dft
3072
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_3072
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
>
1
)
if
(
prach_fmt
>
1
)
dft
3072
(
prach2
+
6144
,
rxsigF
[
aa
]
+
6144
,
1
);
dft
(
DFT_3072
,
prach2
+
6144
,
rxsigF
[
aa
]
+
6144
,
1
);
}
}
break
;
break
;
...
@@ -323,13 +323,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
...
@@ -323,13 +323,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
case
25
:
case
25
:
default:
default:
if
(
prach_fmt
==
4
)
{
if
(
prach_fmt
==
4
)
{
dft
1024
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_1024
,
prach2
,
rxsigF
[
aa
],
1
);
fft_size
=
1024
;
fft_size
=
1024
;
}
else
{
}
else
{
dft
6144
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_6144
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
>
1
)
if
(
prach_fmt
>
1
)
dft
6144
(
prach2
+
12288
,
rxsigF
[
aa
]
+
12288
,
1
);
dft
(
DFT_6144
,
prach2
+
12288
,
rxsigF
[
aa
]
+
12288
,
1
);
fft_size
=
6144
;
fft_size
=
6144
;
}
}
...
@@ -338,24 +338,24 @@ void rx_prach0(PHY_VARS_eNB *eNB,
...
@@ -338,24 +338,24 @@ void rx_prach0(PHY_VARS_eNB *eNB,
case
50
:
case
50
:
if
(
prach_fmt
==
4
)
{
if
(
prach_fmt
==
4
)
{
dft
2048
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_2048
,
prach2
,
rxsigF
[
aa
],
1
);
}
else
{
}
else
{
dft
12288
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_12288
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
>
1
)
if
(
prach_fmt
>
1
)
dft
12288
(
prach2
+
24576
,
rxsigF
[
aa
]
+
24576
,
1
);
dft
(
DFT_12288
,
prach2
+
24576
,
rxsigF
[
aa
]
+
24576
,
1
);
}
}
break
;
break
;
case
75
:
case
75
:
if
(
prach_fmt
==
4
)
{
if
(
prach_fmt
==
4
)
{
dft
3072
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_3072
,
prach2
,
rxsigF
[
aa
],
1
);
}
else
{
}
else
{
dft
18432
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_18432
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
>
1
)
if
(
prach_fmt
>
1
)
dft
18432
(
prach2
+
36864
,
rxsigF
[
aa
]
+
36864
,
1
);
dft
(
DFT_18432
,
prach2
+
36864
,
rxsigF
[
aa
]
+
36864
,
1
);
}
}
break
;
break
;
...
@@ -363,21 +363,21 @@ void rx_prach0(PHY_VARS_eNB *eNB,
...
@@ -363,21 +363,21 @@ void rx_prach0(PHY_VARS_eNB *eNB,
case
100
:
case
100
:
if
(
fp
->
threequarter_fs
==
0
)
{
if
(
fp
->
threequarter_fs
==
0
)
{
if
(
prach_fmt
==
4
)
{
if
(
prach_fmt
==
4
)
{
dft
4096
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_4096
,
prach2
,
rxsigF
[
aa
],
1
);
}
else
{
}
else
{
dft
24576
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_24576
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
>
1
)
if
(
prach_fmt
>
1
)
dft
24576
(
prach2
+
49152
,
rxsigF
[
aa
]
+
49152
,
1
);
dft
(
DFT_24576
,
prach2
+
49152
,
rxsigF
[
aa
]
+
49152
,
1
);
}
}
}
else
{
}
else
{
if
(
prach_fmt
==
4
)
{
if
(
prach_fmt
==
4
)
{
dft
3072
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_3072
,
prach2
,
rxsigF
[
aa
],
1
);
}
else
{
}
else
{
dft
18432
(
prach2
,
rxsigF
[
aa
],
1
);
dft
(
DFT_18432
,
prach2
,
rxsigF
[
aa
],
1
);
if
(
prach_fmt
>
1
)
if
(
prach_fmt
>
1
)
dft
18432
(
prach2
+
36864
,
rxsigF
[
aa
]
+
36864
,
1
);
dft
(
DFT_18432
,
prach2
+
36864
,
rxsigF
[
aa
]
+
36864
,
1
);
}
}
}
}
...
@@ -589,13 +589,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
...
@@ -589,13 +589,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
// Now do IFFT of size 1024 (N_ZC=839) or 256 (N_ZC=139)
// Now do IFFT of size 1024 (N_ZC=839) or 256 (N_ZC=139)
if
(
N_ZC
==
839
)
{
if
(
N_ZC
==
839
)
{
log2_ifft_size
=
10
;
log2_ifft_size
=
10
;
idft
1024
(
prachF
,
prach_ifft_tmp
,
1
);
idft
(
IDFT_1024
,
prachF
,
prach_ifft_tmp
,
1
);
// compute energy and accumulate over receive antennas and repetitions for BR
// compute energy and accumulate over receive antennas and repetitions for BR
for
(
i
=
0
;
i
<
2048
;
i
++
)
for
(
i
=
0
;
i
<
2048
;
i
++
)
prach_ifft
[
i
]
+=
(
prach_ifft_tmp
[
i
<<
1
]
*
prach_ifft_tmp
[
i
<<
1
]
+
prach_ifft_tmp
[
1
+
(
i
<<
1
)]
*
prach_ifft_tmp
[
1
+
(
i
<<
1
)])
>>
9
;
prach_ifft
[
i
]
+=
(
prach_ifft_tmp
[
i
<<
1
]
*
prach_ifft_tmp
[
i
<<
1
]
+
prach_ifft_tmp
[
1
+
(
i
<<
1
)]
*
prach_ifft_tmp
[
1
+
(
i
<<
1
)])
>>
9
;
}
else
{
}
else
{
idft
256
(
prachF
,
prach_ifft_tmp
,
1
);
idft
(
IDFT_256
,
prachF
,
prach_ifft_tmp
,
1
);
log2_ifft_size
=
8
;
log2_ifft_size
=
8
;
// compute energy and accumulate over receive antennas and repetitions for BR
// compute energy and accumulate over receive antennas and repetitions for BR
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
View file @
296494ea
...
@@ -154,9 +154,9 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH) {
...
@@ -154,9 +154,9 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH) {
switch
(
Msc_PUSCH
)
{
switch
(
Msc_PUSCH
)
{
case
12
:
case
12
:
dft
12
((
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out
0
);
dft
(
DFT_12
,(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
0
);
dft
12
((
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
);
dft
(
DFT_12
,(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
0
);
dft
12
((
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
);
dft
(
DFT_12
,(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
0
);
#if defined(__x86_64__)||defined(__i386__)
#if defined(__x86_64__)||defined(__i386__)
norm128
=
_mm_set1_epi16
(
9459
);
norm128
=
_mm_set1_epi16
(
9459
);
#elif defined(__arm__)
#elif defined(__arm__)
...
@@ -178,201 +178,201 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH) {
...
@@ -178,201 +178,201 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH) {
break
;
break
;
case
24
:
case
24
:
dft
24
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_24
,
idft_in0
,
idft_out0
,
1
);
dft
24
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_24
,
idft_in1
,
idft_out1
,
1
);
dft
24
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_24
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
case
36
:
case
36
:
dft
36
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_36
,
idft_in0
,
idft_out0
,
1
);
dft
36
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_36
,
idft_in1
,
idft_out1
,
1
);
dft
36
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_36
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
case
48
:
case
48
:
dft
48
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_48
,
idft_in0
,
idft_out0
,
1
);
dft
48
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_48
,
idft_in1
,
idft_out1
,
1
);
dft
48
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_48
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
case
60
:
case
60
:
dft
60
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_60
,
idft_in0
,
idft_out0
,
1
);
dft
60
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_60
,
idft_in1
,
idft_out1
,
1
);
dft
60
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_60
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
case
72
:
case
72
:
dft
72
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_72
,
idft_in0
,
idft_out0
,
1
);
dft
72
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_72
,
idft_in1
,
idft_out1
,
1
);
dft
72
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_72
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
case
96
:
case
96
:
dft
96
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_96
,
idft_in0
,
idft_out0
,
1
);
dft
96
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_96
,
idft_in1
,
idft_out1
,
1
);
dft
96
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_96
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
case
108
:
case
108
:
dft
108
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_108
,
idft_in0
,
idft_out0
,
1
);
dft
108
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_108
,
idft_in1
,
idft_out1
,
1
);
dft
108
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_108
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
case
120
:
case
120
:
dft
120
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_120
,
idft_in0
,
idft_out0
,
1
);
dft
120
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_120
,
idft_in1
,
idft_out1
,
1
);
dft
120
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_120
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
case
144
:
case
144
:
dft
144
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_144
,
idft_in0
,
idft_out0
,
1
);
dft
144
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_144
,
idft_in1
,
idft_out1
,
1
);
dft
144
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_144
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
case
180
:
case
180
:
dft
180
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_180
,
idft_in0
,
idft_out0
,
1
);
dft
180
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_180
,
idft_in1
,
idft_out1
,
1
);
dft
180
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_180
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
case
192
:
case
192
:
dft
192
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_192
,
idft_in0
,
idft_out0
,
1
);
dft
192
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_192
,
idft_in1
,
idft_out1
,
1
);
dft
192
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_192
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
case
216
:
case
216
:
dft
216
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_216
,
idft_in0
,
idft_out0
,
1
);
dft
216
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_216
,
idft_in1
,
idft_out1
,
1
);
dft
216
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_216
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
case
240
:
case
240
:
dft
240
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_240
,
idft_in0
,
idft_out0
,
1
);
dft
240
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_240
,
idft_in1
,
idft_out1
,
1
);
dft
240
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_240
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
case
288
:
case
288
:
dft
288
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_288
,
idft_in0
,
idft_out0
,
1
);
dft
288
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_288
,
idft_in1
,
idft_out1
,
1
);
dft
288
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_288
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
case
300
:
case
300
:
dft
300
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_300
,
idft_in0
,
idft_out0
,
1
);
dft
300
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_300
,
idft_in1
,
idft_out1
,
1
);
dft
300
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_300
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
case
324
:
case
324
:
dft
324
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_324
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
324
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_324
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
324
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_324
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
360
:
case
360
:
dft
360
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_360
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
360
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_360
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
360
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_360
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
384
:
case
384
:
dft
384
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_384
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
384
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_384
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
384
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_384
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
432
:
case
432
:
dft
432
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_432
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
432
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_432
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
432
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_432
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
480
:
case
480
:
dft
480
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_480
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
480
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_480
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
480
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_480
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
540
:
case
540
:
dft
540
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_540
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
540
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_540
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
540
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_540
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
576
:
case
576
:
dft
576
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_576
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
576
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_576
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
576
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_576
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
600
:
case
600
:
dft
600
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_600
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
600
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_600
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
600
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_600
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
648
:
case
648
:
dft
648
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_648
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
648
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_648
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
648
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_648
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
720
:
case
720
:
dft
720
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_720
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
720
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_720
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
720
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_720
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
768
:
case
768
:
dft
768
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_768
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
768
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_768
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
768
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_768
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
864
:
case
864
:
dft
864
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_864
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
864
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_864
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
864
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_864
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
900
:
case
900
:
dft
900
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_900
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
900
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_900
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
900
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_900
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
960
:
case
960
:
dft
960
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_960
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
960
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_960
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
960
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_960
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
972
:
case
972
:
dft
972
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_972
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
972
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_972
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
972
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_972
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
1080
:
case
1080
:
dft
1080
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_1080
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
1080
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_1080
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
1080
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_1080
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
1152
:
case
1152
:
dft
1152
(
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
(
DFT_1152
,
(
int16_t
*
)
idft_in0
,(
int16_t
*
)
idft_out0
,
1
);
dft
1152
(
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
(
DFT_1152
,
(
int16_t
*
)
idft_in1
,(
int16_t
*
)
idft_out1
,
1
);
dft
1152
(
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
dft
(
DFT_1152
,
(
int16_t
*
)
idft_in2
,(
int16_t
*
)
idft_out2
,
1
);
break
;
break
;
case
1200
:
case
1200
:
dft
1200
(
idft_in0
,
idft_out0
,
1
);
dft
(
DFT_1200
,
idft_in0
,
idft_out0
,
1
);
dft
1200
(
idft_in1
,
idft_out1
,
1
);
dft
(
DFT_1200
,
idft_in1
,
idft_out1
,
1
);
dft
1200
(
idft_in2
,
idft_out2
,
1
);
dft
(
DFT_1200
,
idft_in2
,
idft_out2
,
1
);
break
;
break
;
default:
default:
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/MODULATION/ofdm_mod.c
View file @
296494ea
...
@@ -95,41 +95,41 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
...
@@ -95,41 +95,41 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
volatile
int
*
output_ptr
=
(
int
*
)
0
;
volatile
int
*
output_ptr
=
(
int
*
)
0
;
int
*
temp_ptr
=
(
int
*
)
0
;
int
*
temp_ptr
=
(
int
*
)
0
;
void
(
*
idft
)(
int16_t
*
,
int16_t
*
,
int
)
;
idft_size_idx_t
idftsize
;
switch
(
fftsize
)
{
switch
(
fftsize
)
{
case
128
:
case
128
:
idft
=
idft
128
;
idft
size
=
IDFT_
128
;
break
;
break
;
case
256
:
case
256
:
idft
=
idft
256
;
idft
size
=
IDFT_
256
;
break
;
break
;
case
512
:
case
512
:
idft
=
idft
512
;
idft
size
=
IDFT_
512
;
break
;
break
;
case
1024
:
case
1024
:
idft
=
idft
1024
;
idft
size
=
IDFT_
1024
;
break
;
break
;
case
1536
:
case
1536
:
idft
=
idft
1536
;
idft
size
=
IDFT_
1536
;
break
;
break
;
case
2048
:
case
2048
:
idft
=
idft
2048
;
idft
size
=
IDFT_
2048
;
break
;
break
;
case
3072
:
case
3072
:
idft
=
idft
3072
;
idft
size
=
IDFT_
3072
;
break
;
break
;
case
4096
:
case
4096
:
idft
=
idft
4096
;
idft
size
=
IDFT_
4096
;
break
;
break
;
default:
default:
idft
=
idft
512
;
idft
size
=
IDFT_
512
;
break
;
break
;
}
}
...
@@ -148,12 +148,12 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
...
@@ -148,12 +148,12 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
#ifndef __AVX2__
#ifndef __AVX2__
// handle 128-bit alignment for 128-bit SIMD (SSE4,NEON,AltiVEC)
// handle 128-bit alignment for 128-bit SIMD (SSE4,NEON,AltiVEC)
idft
((
int16_t
*
)
&
input
[
i
*
fftsize
],
idft
(
idftsize
,
(
int16_t
*
)
&
input
[
i
*
fftsize
],
(
fftsize
==
128
)
?
(
int16_t
*
)
temp
:
(
int16_t
*
)
&
output
[(
i
*
fftsize
)
+
((
1
+
i
)
*
nb_prefix_samples
)],
(
fftsize
==
128
)
?
(
int16_t
*
)
temp
:
(
int16_t
*
)
&
output
[(
i
*
fftsize
)
+
((
1
+
i
)
*
nb_prefix_samples
)],
1
);
1
);
#else
#else
// on AVX2 need 256-bit alignment
// on AVX2 need 256-bit alignment
idft
((
int16_t
*
)
&
input
[
i
*
fftsize
],
idft
(
idftsize
,
(
int16_t
*
)
&
input
[
i
*
fftsize
],
(
int16_t
*
)
temp
,
(
int16_t
*
)
temp
,
1
);
1
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/MODULATION/slot_fep_nr.c
View file @
296494ea
...
@@ -61,44 +61,44 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
...
@@ -61,44 +61,44 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
unsigned
int
rx_offset
;
unsigned
int
rx_offset
;
void
(
*
dft
)(
int16_t
*
,
int16_t
*
,
int
)
;
dft_size_idx_t
dftsize
;
int
tmp_dft_in
[
8192
]
__attribute__
((
aligned
(
32
)));
// This is for misalignment issues for 6 and 15 PRBs
int
tmp_dft_in
[
8192
]
__attribute__
((
aligned
(
32
)));
// This is for misalignment issues for 6 and 15 PRBs
switch
(
frame_parms
->
ofdm_symbol_size
)
{
switch
(
frame_parms
->
ofdm_symbol_size
)
{
case
128
:
case
128
:
dft
=
dft
128
;
dft
size
=
DFT_
128
;
break
;
break
;
case
256
:
case
256
:
dft
=
dft
256
;
dft
size
=
DFT_
256
;
break
;
break
;
case
512
:
case
512
:
dft
=
dft
512
;
dft
size
=
DFT_
512
;
break
;
break
;
case
1024
:
case
1024
:
dft
=
dft
1024
;
dft
size
=
DFT_
1024
;
break
;
break
;
case
1536
:
case
1536
:
dft
=
dft
1536
;
dft
size
=
DFT_
1536
;
break
;
break
;
case
2048
:
case
2048
:
dft
=
dft
2048
;
dft
size
=
DFT_
2048
;
break
;
break
;
case
3072
:
case
3072
:
dft
=
dft
3072
;
dft
size
=
DFT_
3072
;
break
;
break
;
case
4096
:
case
4096
:
dft
=
dft
4096
;
dft
size
=
DFT_
4096
;
break
;
break
;
case
8192
:
case
8192
:
dft
=
dft
8192
;
dft
size
=
DFT_
8192
;
break
;
break
;
default:
default:
...
@@ -146,14 +146,14 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
...
@@ -146,14 +146,14 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
memcpy
((
void
*
)
tmp_dft_in
,
memcpy
((
void
*
)
tmp_dft_in
,
(
void
*
)
&
common_vars
->
rxdata
[
aa
][
rx_offset
%
frame_length_samples
],
(
void
*
)
&
common_vars
->
rxdata
[
aa
][
rx_offset
%
frame_length_samples
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
dft
((
int16_t
*
)
tmp_dft_in
,
dft
(
dftsize
,
(
int16_t
*
)
tmp_dft_in
,
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
else
{
// use dft input from RX buffer directly
}
else
{
// use dft input from RX buffer directly
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
rx_dft_stats
);
start_meas
(
&
ue
->
rx_dft_stats
);
#endif
#endif
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
dft
(
dftsize
,
(
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
rx_dft_stats
);
stop_meas
(
&
ue
->
rx_dft_stats
);
...
@@ -176,11 +176,11 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
...
@@ -176,11 +176,11 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
memcpy
((
void
*
)
tmp_dft_in
,
memcpy
((
void
*
)
tmp_dft_in
,
(
void
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
(
void
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
dft
((
int16_t
*
)
tmp_dft_in
,
dft
(
dftsize
,
(
int16_t
*
)
tmp_dft_in
,
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
else
{
// use dft input from RX buffer directly
}
else
{
// use dft input from RX buffer directly
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
dft
(
dftsize
,
(
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
]].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
}
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
...
@@ -218,43 +218,43 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
...
@@ -218,43 +218,43 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
unsigned
int
nb_prefix_samples
=
(
no_prefix
?
0
:
frame_parms
->
nb_prefix_samples
);
unsigned
int
nb_prefix_samples
=
(
no_prefix
?
0
:
frame_parms
->
nb_prefix_samples
);
unsigned
int
nb_prefix_samples0
=
(
no_prefix
?
0
:
frame_parms
->
nb_prefix_samples0
);
unsigned
int
nb_prefix_samples0
=
(
no_prefix
?
0
:
frame_parms
->
nb_prefix_samples0
);
void
(
*
dft
)(
int16_t
*
,
int16_t
*
,
int
)
;
dft_size_idx_t
dftsize
;
switch
(
frame_parms
->
ofdm_symbol_size
)
{
switch
(
frame_parms
->
ofdm_symbol_size
)
{
case
128
:
case
128
:
dft
=
dft
128
;
dft
size
=
DFT_
128
;
break
;
break
;
case
256
:
case
256
:
dft
=
dft
256
;
dft
size
=
DFT_
256
;
break
;
break
;
case
512
:
case
512
:
dft
=
dft
512
;
dft
size
=
DFT_
512
;
break
;
break
;
case
1024
:
case
1024
:
dft
=
dft
1024
;
dft
size
=
DFT_
1024
;
break
;
break
;
case
1536
:
case
1536
:
dft
=
dft
1536
;
dft
size
=
DFT_
1536
;
break
;
break
;
case
2048
:
case
2048
:
dft
=
dft
2048
;
dft
size
=
DFT_
2048
;
break
;
break
;
case
4096
:
case
4096
:
dft
=
dft
4096
;
dft
size
=
DFT_
4096
;
break
;
break
;
case
8192
:
case
8192
:
dft
=
dft
8192
;
dft
size
=
DFT_
8192
;
break
;
break
;
default:
default:
dft
=
dft
512
;
dft
size
=
DFT_
512
;
break
;
break
;
}
}
...
@@ -266,7 +266,7 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
...
@@ -266,7 +266,7 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
else
else
rxdata_offset
=
slot_offset
+
nb_prefix_samples0
+
(
symbol
*
(
frame_parms
->
ofdm_symbol_size
+
nb_prefix_samples
))
-
SOFFSET
;
rxdata_offset
=
slot_offset
+
nb_prefix_samples0
+
(
symbol
*
(
frame_parms
->
ofdm_symbol_size
+
nb_prefix_samples
))
-
SOFFSET
;
dft
((
int16_t
*
)
&
rxdata
[
rxdata_offset
],
dft
(
dftsize
,
(
int16_t
*
)
&
rxdata
[
rxdata_offset
],
(
int16_t
*
)
&
rxdataF
[
symbol
*
frame_parms
->
ofdm_symbol_size
],
1
);
(
int16_t
*
)
&
rxdataF
[
symbol
*
frame_parms
->
ofdm_symbol_size
],
1
);
return
(
0
);
return
(
0
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/MODULATION/slot_fep_ul.c
View file @
296494ea
...
@@ -44,7 +44,7 @@ int slot_fep_ul(RU_t *ru,
...
@@ -44,7 +44,7 @@ int slot_fep_ul(RU_t *ru,
unsigned
int
slot_offset
;
unsigned
int
slot_offset
;
void
(
*
dft
)(
int16_t
*
,
int16_t
*
,
int
)
;
dft_size_idx_t
dftsize
;
int
tmp_dft_in
[
2048
]
__attribute__
((
aligned
(
32
)));
// This is for misalignment issues for 6 and 15 PRBs
int
tmp_dft_in
[
2048
]
__attribute__
((
aligned
(
32
)));
// This is for misalignment issues for 6 and 15 PRBs
unsigned
int
frame_length_samples
=
fp
->
samples_per_tti
*
10
;
unsigned
int
frame_length_samples
=
fp
->
samples_per_tti
*
10
;
...
@@ -52,31 +52,31 @@ int slot_fep_ul(RU_t *ru,
...
@@ -52,31 +52,31 @@ int slot_fep_ul(RU_t *ru,
switch
(
fp
->
ofdm_symbol_size
)
{
switch
(
fp
->
ofdm_symbol_size
)
{
case
128
:
case
128
:
dft
=
dft
128
;
dft
size
=
DFT_
128
;
break
;
break
;
case
256
:
case
256
:
dft
=
dft
256
;
dft
size
=
DFT_
256
;
break
;
break
;
case
512
:
case
512
:
dft
=
dft
512
;
dft
size
=
DFT_
512
;
break
;
break
;
case
1024
:
case
1024
:
dft
=
dft
1024
;
dft
size
=
DFT_
1024
;
break
;
break
;
case
1536
:
case
1536
:
dft
=
dft
1536
;
dft
size
=
DFT_
1536
;
break
;
break
;
case
2048
:
case
2048
:
dft
=
dft
2048
;
dft
size
=
DFT_
2048
;
break
;
break
;
default:
default:
dft
=
dft
512
;
dft
size
=
DFT_
512
;
break
;
break
;
}
}
...
@@ -109,7 +109,7 @@ int slot_fep_ul(RU_t *ru,
...
@@ -109,7 +109,7 @@ int slot_fep_ul(RU_t *ru,
LOG_D
(
PHY
,
"slot_fep: symbol 0 %d dB
\n
"
,
LOG_D
(
PHY
,
"slot_fep: symbol 0 %d dB
\n
"
,
dB_fixed
(
signal_energy
(
&
common
->
rxdata_7_5kHz
[
aa
][
rx_offset
],
fp
->
ofdm_symbol_size
)));
dB_fixed
(
signal_energy
(
&
common
->
rxdata_7_5kHz
[
aa
][
rx_offset
],
fp
->
ofdm_symbol_size
)));
#endif
#endif
dft
(
(
int16_t
*
)
&
common
->
rxdata_7_5kHz
[
aa
][
rx_offset
],
dft
(
dftsize
,
(
int16_t
*
)
&
common
->
rxdata_7_5kHz
[
aa
][
rx_offset
],
(
int16_t
*
)
&
common
->
rxdataF
[
aa
][
fp
->
ofdm_symbol_size
*
symbol
],
(
int16_t
*
)
&
common
->
rxdataF
[
aa
][
fp
->
ofdm_symbol_size
*
symbol
],
1
1
);
);
...
@@ -121,13 +121,13 @@ int slot_fep_ul(RU_t *ru,
...
@@ -121,13 +121,13 @@ int slot_fep_ul(RU_t *ru,
memcpy
((
void
*
)
&
tmp_dft_in
,
memcpy
((
void
*
)
&
tmp_dft_in
,
(
void
*
)
&
common
->
rxdata_7_5kHz
[
aa
][(
rx_offset
%
frame_length_samples
)],
(
void
*
)
&
common
->
rxdata_7_5kHz
[
aa
][(
rx_offset
%
frame_length_samples
)],
fp
->
ofdm_symbol_size
*
sizeof
(
int
));
fp
->
ofdm_symbol_size
*
sizeof
(
int
));
dft
(
(
short
*
)
tmp_dft_in
,
dft
(
dftsize
,
(
short
*
)
tmp_dft_in
,
(
short
*
)
&
common
->
rxdataF
[
aa
][
fp
->
ofdm_symbol_size
*
symbol
],
(
short
*
)
&
common
->
rxdataF
[
aa
][
fp
->
ofdm_symbol_size
*
symbol
],
1
1
);
);
}
}
else
{
else
{
dft
(
(
short
*
)
&
common
->
rxdata_7_5kHz
[
aa
][
rx_offset
],
dft
(
dftsize
,
(
short
*
)
&
common
->
rxdata_7_5kHz
[
aa
][
rx_offset
],
(
short
*
)
&
common
->
rxdataF
[
aa
][
fp
->
ofdm_symbol_size
*
symbol
],
(
short
*
)
&
common
->
rxdataF
[
aa
][
fp
->
ofdm_symbol_size
*
symbol
],
1
1
);
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/
lte
_dfts.c
→
openair1/PHY/TOOLS/
oai
_dfts.c
View file @
296494ea
...
@@ -31,11 +31,10 @@
...
@@ -31,11 +31,10 @@
#ifndef M_PI
#ifndef M_PI
#define M_PI 3.14159265358979323846
#define M_PI 3.14159265358979323846
#endif
#endif
#define OAIDFTS
#ifndef MR_MAIN
#ifndef MR_MAIN
#include "PHY/defs_common.h"
#include "PHY/defs_common.h"
#include "PHY/impl_defs_top.h"
#include "PHY/impl_defs_top.h"
#include "tools_defs.h"
#else
#else
#include "time_meas.h"
#include "time_meas.h"
#include "LOG/log.h"
#include "LOG/log.h"
...
@@ -64,6 +63,9 @@ const static int16_t reflip[32] __attribute__((aligned(32))) = {1,-1,1,-1,1,-1,
...
@@ -64,6 +63,9 @@ const static int16_t reflip[32] __attribute__((aligned(32))) = {1,-1,1,-1,1,-1,
#if defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
static
inline
void
cmac
(
__m128i
a
,
__m128i
b
,
__m128i
*
re32
,
__m128i
*
im32
)
__attribute__
((
always_inline
));
static
inline
void
cmac
(
__m128i
a
,
__m128i
b
,
__m128i
*
re32
,
__m128i
*
im32
)
__attribute__
((
always_inline
));
static
inline
void
cmac
(
__m128i
a
,
__m128i
b
,
__m128i
*
re32
,
__m128i
*
im32
)
static
inline
void
cmac
(
__m128i
a
,
__m128i
b
,
__m128i
*
re32
,
__m128i
*
im32
)
...
@@ -2588,7 +2590,7 @@ const static int16_t tw64c[96] __attribute__((aligned(32))) = {
...
@@ -2588,7 +2590,7 @@ const static int16_t tw64c[96] __attribute__((aligned(32))) = {
#endif
#endif
#ifndef __AVX2__
#ifndef __AVX2__
void
dft64
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft64
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd_q15_t
xtmp
[
16
],
ytmp
[
16
],
*
tw64a_128
=
(
simd_q15_t
*
)
tw64a
,
*
tw64b_128
=
(
simd_q15_t
*
)
tw64b
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
;
simd_q15_t
xtmp
[
16
],
ytmp
[
16
],
*
tw64a_128
=
(
simd_q15_t
*
)
tw64a
,
*
tw64b_128
=
(
simd_q15_t
*
)
tw64b
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
;
...
@@ -2702,7 +2704,7 @@ void dft64(int16_t *x,int16_t *y,int scale)
...
@@ -2702,7 +2704,7 @@ void dft64(int16_t *x,int16_t *y,int scale)
}
}
#else // __AVX2__
#else // __AVX2__
void
dft64
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft64
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
16
],
ytmp
[
16
],
*
tw64a_256
=
(
simd256_q15_t
*
)
tw64a
,
*
tw64b_256
=
(
simd256_q15_t
*
)
tw64b
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
;
simd256_q15_t
xtmp
[
16
],
ytmp
[
16
],
*
tw64a_256
=
(
simd256_q15_t
*
)
tw64a
,
*
tw64b_256
=
(
simd256_q15_t
*
)
tw64b
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
;
...
@@ -2850,7 +2852,7 @@ void dft64(int16_t *x,int16_t *y,int scale)
...
@@ -2850,7 +2852,7 @@ void dft64(int16_t *x,int16_t *y,int scale)
#endif
#endif
#ifndef __AVX2__
#ifndef __AVX2__
void
idft64
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft64
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd_q15_t
xtmp
[
16
],
ytmp
[
16
],
*
tw64a_128
=
(
simd_q15_t
*
)
tw64
,
*
tw64b_128
=
(
simd_q15_t
*
)
tw64c
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
;
simd_q15_t
xtmp
[
16
],
ytmp
[
16
],
*
tw64a_128
=
(
simd_q15_t
*
)
tw64
,
*
tw64b_128
=
(
simd_q15_t
*
)
tw64c
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
;
...
@@ -2942,7 +2944,7 @@ void idft64(int16_t *x,int16_t *y,int scale)
...
@@ -2942,7 +2944,7 @@ void idft64(int16_t *x,int16_t *y,int scale)
}
}
#else // __AVX2__
#else // __AVX2__
void
idft64
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft64
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
16
],
ytmp
[
16
],
*
tw64a_256
=
(
simd256_q15_t
*
)
tw64
,
*
tw64b_256
=
(
simd256_q15_t
*
)
tw64c
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
;
simd256_q15_t
xtmp
[
16
],
ytmp
[
16
],
*
tw64a_256
=
(
simd256_q15_t
*
)
tw64
,
*
tw64b_256
=
(
simd256_q15_t
*
)
tw64c
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
;
...
@@ -3052,7 +3054,7 @@ int16_t tw128b[128] __attribute__((aligned(32))) = {0,32767,-1608,32727,-3212,32
...
@@ -3052,7 +3054,7 @@ int16_t tw128b[128] __attribute__((aligned(32))) = {0,32767,-1608,32727,-3212,32
int16_t
tw128c
[
128
]
__attribute__
((
aligned
(
32
)))
=
{
0
,
32767
,
1608
,
32727
,
3212
,
32609
,
4808
,
32412
,
6393
,
32137
,
7962
,
31785
,
9512
,
31356
,
11039
,
30851
,
12540
,
30272
,
14010
,
29621
,
15447
,
28897
,
16846
,
28105
,
18205
,
27244
,
19520
,
26318
,
20788
,
25329
,
22005
,
24278
,
23170
,
23169
,
24279
,
22004
,
25330
,
20787
,
26319
,
19519
,
27245
,
18204
,
28106
,
16845
,
28898
,
15446
,
29622
,
14009
,
30273
,
12539
,
30852
,
11038
,
31357
,
9511
,
31786
,
7961
,
32138
,
6392
,
32413
,
4807
,
32610
,
3211
,
32728
,
1607
,
32767
,
0
,
32728
,
-
1608
,
32610
,
-
3212
,
32413
,
-
4808
,
32138
,
-
6393
,
31786
,
-
7962
,
31357
,
-
9512
,
30852
,
-
11039
,
30273
,
-
12540
,
29622
,
-
14010
,
28898
,
-
15447
,
28106
,
-
16846
,
27245
,
-
18205
,
26319
,
-
19520
,
25330
,
-
20788
,
24279
,
-
22005
,
23170
,
-
23170
,
22005
,
-
24279
,
20788
,
-
25330
,
19520
,
-
26319
,
18205
,
-
27245
,
16846
,
-
28106
,
15447
,
-
28898
,
14010
,
-
29622
,
12540
,
-
30273
,
11039
,
-
30852
,
9512
,
-
31357
,
7962
,
-
31786
,
6393
,
-
32138
,
4808
,
-
32413
,
3212
,
-
32610
,
1608
,
-
32728
};
int16_t
tw128c
[
128
]
__attribute__
((
aligned
(
32
)))
=
{
0
,
32767
,
1608
,
32727
,
3212
,
32609
,
4808
,
32412
,
6393
,
32137
,
7962
,
31785
,
9512
,
31356
,
11039
,
30851
,
12540
,
30272
,
14010
,
29621
,
15447
,
28897
,
16846
,
28105
,
18205
,
27244
,
19520
,
26318
,
20788
,
25329
,
22005
,
24278
,
23170
,
23169
,
24279
,
22004
,
25330
,
20787
,
26319
,
19519
,
27245
,
18204
,
28106
,
16845
,
28898
,
15446
,
29622
,
14009
,
30273
,
12539
,
30852
,
11038
,
31357
,
9511
,
31786
,
7961
,
32138
,
6392
,
32413
,
4807
,
32610
,
3211
,
32728
,
1607
,
32767
,
0
,
32728
,
-
1608
,
32610
,
-
3212
,
32413
,
-
4808
,
32138
,
-
6393
,
31786
,
-
7962
,
31357
,
-
9512
,
30852
,
-
11039
,
30273
,
-
12540
,
29622
,
-
14010
,
28898
,
-
15447
,
28106
,
-
16846
,
27245
,
-
18205
,
26319
,
-
19520
,
25330
,
-
20788
,
24279
,
-
22005
,
23170
,
-
23170
,
22005
,
-
24279
,
20788
,
-
25330
,
19520
,
-
26319
,
18205
,
-
27245
,
16846
,
-
28106
,
15447
,
-
28898
,
14010
,
-
29622
,
12540
,
-
30273
,
11039
,
-
30852
,
9512
,
-
31357
,
7962
,
-
31786
,
6393
,
-
32138
,
4808
,
-
32413
,
3212
,
-
32610
,
1608
,
-
32728
};
#ifndef __AVX2__
#ifndef __AVX2__
void
dft128
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft128
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simdshort_q15_t
xtmp
[
64
],
*
x64
=
(
simdshort_q15_t
*
)
x
;
simdshort_q15_t
xtmp
[
64
],
*
x64
=
(
simdshort_q15_t
*
)
x
;
...
@@ -3159,7 +3161,7 @@ void dft128(int16_t *x,int16_t *y,int scale)
...
@@ -3159,7 +3161,7 @@ void dft128(int16_t *x,int16_t *y,int scale)
}
}
#else // __AVX2__
#else // __AVX2__
void
dft128
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft128
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
16
],
*
x256
=
(
simd256_q15_t
*
)
x
;
simd256_q15_t
xtmp
[
16
],
*
x256
=
(
simd256_q15_t
*
)
x
;
...
@@ -3229,7 +3231,7 @@ void dft128(int16_t *x,int16_t *y,int scale)
...
@@ -3229,7 +3231,7 @@ void dft128(int16_t *x,int16_t *y,int scale)
#endif
#endif
#ifndef __AVX2__
#ifndef __AVX2__
void
idft128
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft128
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simdshort_q15_t
xtmp
[
64
],
*
x64
=
(
simdshort_q15_t
*
)
x
;
simdshort_q15_t
xtmp
[
64
],
*
x64
=
(
simdshort_q15_t
*
)
x
;
...
@@ -3328,7 +3330,7 @@ void idft128(int16_t *x,int16_t *y,int scale)
...
@@ -3328,7 +3330,7 @@ void idft128(int16_t *x,int16_t *y,int scale)
}
}
#else // __AVX2__
#else // __AVX2__
void
idft128
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft128
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
16
],
*
x256
=
(
simd256_q15_t
*
)
x
;
simd256_q15_t
xtmp
[
16
],
*
x256
=
(
simd256_q15_t
*
)
x
;
...
@@ -3401,7 +3403,7 @@ int16_t tw256b[384] __attribute__((aligned(32))) = {0,32767,-805,32757,-1608,327
...
@@ -3401,7 +3403,7 @@ int16_t tw256b[384] __attribute__((aligned(32))) = {0,32767,-805,32757,-1608,327
0
,
32767
,
-
2411
,
32678
,
-
4808
,
32412
,
-
7180
,
31970
,
-
9512
,
31356
,
-
11793
,
30571
,
-
14010
,
29621
,
-
16151
,
28510
,
-
18205
,
27244
,
-
20160
,
25831
,
-
22005
,
24278
,
-
23732
,
22594
,
-
25330
,
20787
,
-
26790
,
18867
,
-
28106
,
16845
,
-
29269
,
14732
,
-
30273
,
12539
,
-
31114
,
10278
,
-
31786
,
7961
,
-
32285
,
5601
,
-
32610
,
3211
,
-
32758
,
804
,
-
32728
,
-
1608
,
-
32521
,
-
4012
,
-
32138
,
-
6393
,
-
31581
,
-
8740
,
-
30852
,
-
11039
,
-
29956
,
-
13279
,
-
28898
,
-
15447
,
-
27684
,
-
17531
,
-
26319
,
-
19520
,
-
24812
,
-
21403
,
-
23170
,
-
23170
,
-
21403
,
-
24812
,
-
19520
,
-
26319
,
-
17531
,
-
27684
,
-
15447
,
-
28898
,
-
13279
,
-
29956
,
-
11039
,
-
30852
,
-
8740
,
-
31581
,
-
6393
,
-
32138
,
-
4012
,
-
32521
,
-
1608
,
-
32728
,
804
,
-
32758
,
3211
,
-
32610
,
5601
,
-
32285
,
7961
,
-
31786
,
10278
,
-
31114
,
12539
,
-
30273
,
14732
,
-
29269
,
16845
,
-
28106
,
18867
,
-
26790
,
20787
,
-
25330
,
22594
,
-
23732
,
24278
,
-
22005
,
25831
,
-
20160
,
27244
,
-
18205
,
28510
,
-
16151
,
29621
,
-
14010
,
30571
,
-
11793
,
31356
,
-
9512
,
31970
,
-
7180
,
32412
,
-
4808
,
32678
,
-
2411
0
,
32767
,
-
2411
,
32678
,
-
4808
,
32412
,
-
7180
,
31970
,
-
9512
,
31356
,
-
11793
,
30571
,
-
14010
,
29621
,
-
16151
,
28510
,
-
18205
,
27244
,
-
20160
,
25831
,
-
22005
,
24278
,
-
23732
,
22594
,
-
25330
,
20787
,
-
26790
,
18867
,
-
28106
,
16845
,
-
29269
,
14732
,
-
30273
,
12539
,
-
31114
,
10278
,
-
31786
,
7961
,
-
32285
,
5601
,
-
32610
,
3211
,
-
32758
,
804
,
-
32728
,
-
1608
,
-
32521
,
-
4012
,
-
32138
,
-
6393
,
-
31581
,
-
8740
,
-
30852
,
-
11039
,
-
29956
,
-
13279
,
-
28898
,
-
15447
,
-
27684
,
-
17531
,
-
26319
,
-
19520
,
-
24812
,
-
21403
,
-
23170
,
-
23170
,
-
21403
,
-
24812
,
-
19520
,
-
26319
,
-
17531
,
-
27684
,
-
15447
,
-
28898
,
-
13279
,
-
29956
,
-
11039
,
-
30852
,
-
8740
,
-
31581
,
-
6393
,
-
32138
,
-
4012
,
-
32521
,
-
1608
,
-
32728
,
804
,
-
32758
,
3211
,
-
32610
,
5601
,
-
32285
,
7961
,
-
31786
,
10278
,
-
31114
,
12539
,
-
30273
,
14732
,
-
29269
,
16845
,
-
28106
,
18867
,
-
26790
,
20787
,
-
25330
,
22594
,
-
23732
,
24278
,
-
22005
,
25831
,
-
20160
,
27244
,
-
18205
,
28510
,
-
16151
,
29621
,
-
14010
,
30571
,
-
11793
,
31356
,
-
9512
,
31970
,
-
7180
,
32412
,
-
4808
,
32678
,
-
2411
};
};
#ifndef __AVX2__
#ifndef __AVX2__
void
dft256
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft256
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd_q15_t
xtmp
[
64
],
ytmp
[
64
],
*
tw256a_128p
=
(
simd_q15_t
*
)
tw256a
,
*
tw256b_128p
=
(
simd_q15_t
*
)
tw256b
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
,
*
y128p
=
(
simd_q15_t
*
)
y
;
simd_q15_t
xtmp
[
64
],
ytmp
[
64
],
*
tw256a_128p
=
(
simd_q15_t
*
)
tw256a
,
*
tw256b_128p
=
(
simd_q15_t
*
)
tw256b
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
,
*
y128p
=
(
simd_q15_t
*
)
y
;
...
@@ -3513,7 +3515,7 @@ void dft256(int16_t *x,int16_t *y,int scale)
...
@@ -3513,7 +3515,7 @@ void dft256(int16_t *x,int16_t *y,int scale)
void
idft256
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft256
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd_q15_t
xtmp
[
64
],
ytmp
[
64
],
*
tw256_128p
=
(
simd_q15_t
*
)
tw256
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
,
*
y128p
=
(
simd_q15_t
*
)
y
;
simd_q15_t
xtmp
[
64
],
ytmp
[
64
],
*
tw256_128p
=
(
simd_q15_t
*
)
tw256
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
,
*
y128p
=
(
simd_q15_t
*
)
y
;
...
@@ -3571,7 +3573,7 @@ void idft256(int16_t *x,int16_t *y,int scale)
...
@@ -3571,7 +3573,7 @@ void idft256(int16_t *x,int16_t *y,int scale)
#else //__AVX2__
#else //__AVX2__
void
dft256
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft256
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
32
],
ytmp
[
32
],
*
tw256a_256p
=
(
simd256_q15_t
*
)
tw256a
,
*
tw256b_256p
=
(
simd256_q15_t
*
)
tw256b
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
,
*
y256p
=
(
simd256_q15_t
*
)
y
;
simd256_q15_t
xtmp
[
32
],
ytmp
[
32
],
*
tw256a_256p
=
(
simd256_q15_t
*
)
tw256a
,
*
tw256b_256p
=
(
simd256_q15_t
*
)
tw256b
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
,
*
y256p
=
(
simd256_q15_t
*
)
y
;
...
@@ -3663,7 +3665,7 @@ void dft256(int16_t *x,int16_t *y,int scale)
...
@@ -3663,7 +3665,7 @@ void dft256(int16_t *x,int16_t *y,int scale)
}
}
void
idft256
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft256
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
32
],
ytmp
[
32
],
*
tw256_256p
=
(
simd256_q15_t
*
)
tw256
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
,
*
y256p
=
(
simd256_q15_t
*
)
y
;
simd256_q15_t
xtmp
[
32
],
ytmp
[
32
],
*
tw256_256p
=
(
simd256_q15_t
*
)
tw256
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
,
*
y256p
=
(
simd256_q15_t
*
)
y
;
...
@@ -3768,7 +3770,7 @@ int16_t tw512c[512] __attribute__((aligned(32))) = {
...
@@ -3768,7 +3770,7 @@ int16_t tw512c[512] __attribute__((aligned(32))) = {
};
};
#ifndef __AVX2__
#ifndef __AVX2__
void
dft512
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft512
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simdshort_q15_t
xtmp
[
256
],
*
xtmpp
,
*
x64
=
(
simdshort_q15_t
*
)
x
;
simdshort_q15_t
xtmp
[
256
],
*
xtmpp
,
*
x64
=
(
simdshort_q15_t
*
)
x
;
...
@@ -3888,7 +3890,7 @@ void dft512(int16_t *x,int16_t *y,int scale)
...
@@ -3888,7 +3890,7 @@ void dft512(int16_t *x,int16_t *y,int scale)
}
}
void
idft512
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft512
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simdshort_q15_t
xtmp
[
256
],
*
xtmpp
,
*
x64
=
(
simdshort_q15_t
*
)
x
;
simdshort_q15_t
xtmp
[
256
],
*
xtmpp
,
*
x64
=
(
simdshort_q15_t
*
)
x
;
...
@@ -3980,7 +3982,7 @@ void idft512(int16_t *x,int16_t *y,int scale)
...
@@ -3980,7 +3982,7 @@ void idft512(int16_t *x,int16_t *y,int scale)
#else //__AVX2__
#else //__AVX2__
void
dft512
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft512
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
64
],
*
x256
=
(
simd256_q15_t
*
)
x
;
simd256_q15_t
xtmp
[
64
],
*
x256
=
(
simd256_q15_t
*
)
x
;
...
@@ -4062,7 +4064,7 @@ void dft512(int16_t *x,int16_t *y,int scale)
...
@@ -4062,7 +4064,7 @@ void dft512(int16_t *x,int16_t *y,int scale)
}
}
void
idft512
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft512
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
64
],
*
x256
=
(
simd256_q15_t
*
)
x
;
simd256_q15_t
xtmp
[
64
],
*
x256
=
(
simd256_q15_t
*
)
x
;
...
@@ -4149,7 +4151,7 @@ void idft512(int16_t *x,int16_t *y,int scale)
...
@@ -4149,7 +4151,7 @@ void idft512(int16_t *x,int16_t *y,int scale)
int16_t
tw1024
[
1536
]
__attribute__
((
aligned
(
32
)));
int16_t
tw1024
[
1536
]
__attribute__
((
aligned
(
32
)));
#ifndef __AVX2__
#ifndef __AVX2__
void
dft1024
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft1024
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd_q15_t
xtmp
[
256
],
ytmp
[
256
],
*
tw1024_128p
=
(
simd_q15_t
*
)
tw1024
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
,
*
y128p
=
(
simd_q15_t
*
)
y
;
simd_q15_t
xtmp
[
256
],
ytmp
[
256
],
*
tw1024_128p
=
(
simd_q15_t
*
)
tw1024
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
,
*
y128p
=
(
simd_q15_t
*
)
y
;
...
@@ -4205,7 +4207,7 @@ void dft1024(int16_t *x,int16_t *y,int scale)
...
@@ -4205,7 +4207,7 @@ void dft1024(int16_t *x,int16_t *y,int scale)
}
}
void
idft1024
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft1024
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd_q15_t
xtmp
[
256
],
ytmp
[
256
],
*
tw1024_128p
=
(
simd_q15_t
*
)
tw1024
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
,
*
y128p
=
(
simd_q15_t
*
)
y
;
simd_q15_t
xtmp
[
256
],
ytmp
[
256
],
*
tw1024_128p
=
(
simd_q15_t
*
)
tw1024
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
,
*
y128p
=
(
simd_q15_t
*
)
y
;
...
@@ -4262,7 +4264,7 @@ void idft1024(int16_t *x,int16_t *y,int scale)
...
@@ -4262,7 +4264,7 @@ void idft1024(int16_t *x,int16_t *y,int scale)
}
}
#else //__AVX2__
#else //__AVX2__
void
dft1024
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft1024
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
128
],
ytmp
[
128
],
*
tw1024_256p
=
(
simd256_q15_t
*
)
tw1024
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
,
*
y256p
=
(
simd256_q15_t
*
)
y
;
simd256_q15_t
xtmp
[
128
],
ytmp
[
128
],
*
tw1024_256p
=
(
simd256_q15_t
*
)
tw1024
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
,
*
y256p
=
(
simd256_q15_t
*
)
y
;
...
@@ -4318,7 +4320,7 @@ void dft1024(int16_t *x,int16_t *y,int scale)
...
@@ -4318,7 +4320,7 @@ void dft1024(int16_t *x,int16_t *y,int scale)
}
}
void
idft1024
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft1024
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
128
],
ytmp
[
128
],
*
tw1024_256p
=
(
simd256_q15_t
*
)
tw1024
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
,
*
y256p
=
(
simd256_q15_t
*
)
y
;
simd256_q15_t
xtmp
[
128
],
ytmp
[
128
],
*
tw1024_256p
=
(
simd256_q15_t
*
)
tw1024
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
,
*
y256p
=
(
simd256_q15_t
*
)
y
;
...
@@ -4378,7 +4380,7 @@ void idft1024(int16_t *x,int16_t *y,int scale)
...
@@ -4378,7 +4380,7 @@ void idft1024(int16_t *x,int16_t *y,int scale)
int16_t
tw2048
[
2048
]
__attribute__
((
aligned
(
32
)));
int16_t
tw2048
[
2048
]
__attribute__
((
aligned
(
32
)));
#ifndef __AVX2__
#ifndef __AVX2__
void
dft2048
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft2048
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simdshort_q15_t
xtmp
[
1024
],
*
xtmpp
,
*
x64
=
(
simdshort_q15_t
*
)
x
;
simdshort_q15_t
xtmp
[
1024
],
*
xtmpp
,
*
x64
=
(
simdshort_q15_t
*
)
x
;
...
@@ -4469,7 +4471,7 @@ void dft2048(int16_t *x,int16_t *y,int scale)
...
@@ -4469,7 +4471,7 @@ void dft2048(int16_t *x,int16_t *y,int scale)
}
}
void
idft2048
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft2048
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simdshort_q15_t
xtmp
[
1024
],
*
xtmpp
,
*
x64
=
(
simdshort_q15_t
*
)
x
;
simdshort_q15_t
xtmp
[
1024
],
*
xtmpp
,
*
x64
=
(
simdshort_q15_t
*
)
x
;
...
@@ -4561,7 +4563,7 @@ void idft2048(int16_t *x,int16_t *y,int scale)
...
@@ -4561,7 +4563,7 @@ void idft2048(int16_t *x,int16_t *y,int scale)
#else // __AVX2__
#else // __AVX2__
void
dft2048
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft2048
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
256
],
*
xtmpp
,
*
x256
=
(
simd256_q15_t
*
)
x
;
simd256_q15_t
xtmp
[
256
],
*
xtmpp
,
*
x256
=
(
simd256_q15_t
*
)
x
;
...
@@ -4652,7 +4654,7 @@ void dft2048(int16_t *x,int16_t *y,int scale)
...
@@ -4652,7 +4654,7 @@ void dft2048(int16_t *x,int16_t *y,int scale)
}
}
void
idft2048
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft2048
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
256
],
*
xtmpp
,
*
x256
=
(
simd256_q15_t
*
)
x
;
simd256_q15_t
xtmp
[
256
],
*
xtmpp
,
*
x256
=
(
simd256_q15_t
*
)
x
;
...
@@ -4749,7 +4751,7 @@ void idft2048(int16_t *x,int16_t *y,int scale)
...
@@ -4749,7 +4751,7 @@ void idft2048(int16_t *x,int16_t *y,int scale)
int16_t
tw4096
[
3
*
2
*
1024
];
int16_t
tw4096
[
3
*
2
*
1024
];
#ifndef __AVX2__
#ifndef __AVX2__
void
dft4096
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft4096
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd_q15_t
xtmp
[
1024
],
ytmp
[
1024
],
*
tw4096_128p
=
(
simd_q15_t
*
)
tw4096
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
,
*
y128p
=
(
simd_q15_t
*
)
y
;
simd_q15_t
xtmp
[
1024
],
ytmp
[
1024
],
*
tw4096_128p
=
(
simd_q15_t
*
)
tw4096
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
,
*
y128p
=
(
simd_q15_t
*
)
y
;
...
@@ -4807,7 +4809,7 @@ void dft4096(int16_t *x,int16_t *y,int scale)
...
@@ -4807,7 +4809,7 @@ void dft4096(int16_t *x,int16_t *y,int scale)
void
idft4096
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft4096
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd_q15_t
xtmp
[
1024
],
ytmp
[
1024
],
*
tw4096_128p
=
(
simd_q15_t
*
)
tw4096
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
,
*
y128p
=
(
simd_q15_t
*
)
y
;
simd_q15_t
xtmp
[
1024
],
ytmp
[
1024
],
*
tw4096_128p
=
(
simd_q15_t
*
)
tw4096
,
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
,
*
y128p
=
(
simd_q15_t
*
)
y
;
...
@@ -4864,7 +4866,7 @@ void idft4096(int16_t *x,int16_t *y,int scale)
...
@@ -4864,7 +4866,7 @@ void idft4096(int16_t *x,int16_t *y,int scale)
}
}
#else //__AVX2__
#else //__AVX2__
void
dft4096
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft4096
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
512
],
ytmp
[
512
],
*
tw4096_256p
=
(
simd256_q15_t
*
)
tw4096
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
,
*
y256p
=
(
simd256_q15_t
*
)
y
;
simd256_q15_t
xtmp
[
512
],
ytmp
[
512
],
*
tw4096_256p
=
(
simd256_q15_t
*
)
tw4096
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
,
*
y256p
=
(
simd256_q15_t
*
)
y
;
...
@@ -4920,7 +4922,7 @@ void dft4096(int16_t *x,int16_t *y,int scale)
...
@@ -4920,7 +4922,7 @@ void dft4096(int16_t *x,int16_t *y,int scale)
}
}
void
idft4096
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft4096
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
512
],
ytmp
[
512
],
*
tw4096_256p
=
(
simd256_q15_t
*
)
tw4096
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
,
*
y256p
=
(
simd256_q15_t
*
)
y
;
simd256_q15_t
xtmp
[
512
],
ytmp
[
512
],
*
tw4096_256p
=
(
simd256_q15_t
*
)
tw4096
,
*
x256
=
(
simd256_q15_t
*
)
x
,
*
y256
=
(
simd256_q15_t
*
)
y
,
*
y256p
=
(
simd256_q15_t
*
)
y
;
...
@@ -4982,7 +4984,7 @@ void idft4096(int16_t *x,int16_t *y,int scale)
...
@@ -4982,7 +4984,7 @@ void idft4096(int16_t *x,int16_t *y,int scale)
int16_t
tw8192
[
2
*
4096
]
__attribute__
((
aligned
(
32
)));
int16_t
tw8192
[
2
*
4096
]
__attribute__
((
aligned
(
32
)));
#ifndef __AVX2__
#ifndef __AVX2__
void
dft8192
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft8192
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simdshort_q15_t
xtmp
[
4096
],
*
xtmpp
,
*
x64
=
(
simdshort_q15_t
*
)
x
;
simdshort_q15_t
xtmp
[
4096
],
*
xtmpp
,
*
x64
=
(
simdshort_q15_t
*
)
x
;
...
@@ -5072,7 +5074,7 @@ void dft8192(int16_t *x,int16_t *y,int scale)
...
@@ -5072,7 +5074,7 @@ void dft8192(int16_t *x,int16_t *y,int scale)
}
}
void
idft8192
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft8192
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simdshort_q15_t
xtmp
[
4096
],
*
xtmpp
,
*
x64
=
(
simdshort_q15_t
*
)
x
;
simdshort_q15_t
xtmp
[
4096
],
*
xtmpp
,
*
x64
=
(
simdshort_q15_t
*
)
x
;
...
@@ -5163,7 +5165,7 @@ void idft8192(int16_t *x,int16_t *y,int scale)
...
@@ -5163,7 +5165,7 @@ void idft8192(int16_t *x,int16_t *y,int scale)
}
}
#else // __AVX2__
#else // __AVX2__
void
dft8192
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
dft8192
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
1024
],
*
xtmpp
,
*
x256
=
(
simd256_q15_t
*
)
x
;
simd256_q15_t
xtmp
[
1024
],
*
xtmpp
,
*
x256
=
(
simd256_q15_t
*
)
x
;
...
@@ -5254,7 +5256,7 @@ void dft8192(int16_t *x,int16_t *y,int scale)
...
@@ -5254,7 +5256,7 @@ void dft8192(int16_t *x,int16_t *y,int scale)
}
}
void
idft8192
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
)
void
idft8192
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale
)
{
{
simd256_q15_t
xtmp
[
1024
],
*
xtmpp
,
*
x256
=
(
simd256_q15_t
*
)
x
;
simd256_q15_t
xtmp
[
1024
],
*
xtmpp
,
*
x256
=
(
simd256_q15_t
*
)
x
;
...
@@ -5350,7 +5352,7 @@ void idft8192(int16_t *x,int16_t *y,int scale)
...
@@ -5350,7 +5352,7 @@ void idft8192(int16_t *x,int16_t *y,int scale)
int16_t
twa1536
[
1024
],
twb1536
[
1024
];
int16_t
twa1536
[
1024
],
twb1536
[
1024
];
// 512 x 3
// 512 x 3
void
idft1536
(
int16_t
*
input
,
int16_t
*
output
,
int
scale
)
void
idft1536
(
int16_t
*
input
,
int16_t
*
output
,
unsigned
char
scale
)
{
{
int
i
,
i2
,
j
;
int
i
,
i2
,
j
;
uint32_t
tmp
[
3
][
512
]
__attribute__
((
aligned
(
32
)));
uint32_t
tmp
[
3
][
512
]
__attribute__
((
aligned
(
32
)));
...
@@ -5402,7 +5404,7 @@ void idft1536(int16_t *input, int16_t *output, int scale)
...
@@ -5402,7 +5404,7 @@ void idft1536(int16_t *input, int16_t *output, int scale)
}
}
void
dft1536
(
int16_t
*
input
,
int16_t
*
output
,
int
scale
)
void
dft1536
(
int16_t
*
input
,
int16_t
*
output
,
unsigned
char
scale
)
{
{
int
i
,
i2
,
j
;
int
i
,
i2
,
j
;
uint32_t
tmp
[
3
][
512
]
__attribute__
((
aligned
(
32
)));
uint32_t
tmp
[
3
][
512
]
__attribute__
((
aligned
(
32
)));
...
@@ -5467,7 +5469,7 @@ void dft1536(int16_t *input, int16_t *output, int scale)
...
@@ -5467,7 +5469,7 @@ void dft1536(int16_t *input, int16_t *output, int scale)
int16_t
twa3072
[
2048
]
__attribute__
((
aligned
(
32
)));
int16_t
twa3072
[
2048
]
__attribute__
((
aligned
(
32
)));
int16_t
twb3072
[
2048
]
__attribute__
((
aligned
(
32
)));
int16_t
twb3072
[
2048
]
__attribute__
((
aligned
(
32
)));
// 1024 x 3
// 1024 x 3
void
dft3072
(
int16_t
*
input
,
int16_t
*
output
,
int
scale
)
void
dft3072
(
int16_t
*
input
,
int16_t
*
output
,
unsigned
char
scale
)
{
{
int
i
,
i2
,
j
;
int
i
,
i2
,
j
;
uint32_t
tmp
[
3
][
1024
]
__attribute__
((
aligned
(
32
)));
uint32_t
tmp
[
3
][
1024
]
__attribute__
((
aligned
(
32
)));
...
@@ -5517,7 +5519,7 @@ void dft3072(int16_t *input, int16_t *output,int scale)
...
@@ -5517,7 +5519,7 @@ void dft3072(int16_t *input, int16_t *output,int scale)
_m_empty
();
_m_empty
();
}
}
void
idft3072
(
int16_t
*
input
,
int16_t
*
output
,
int
scale
)
void
idft3072
(
int16_t
*
input
,
int16_t
*
output
,
unsigned
char
scale
)
{
{
int
i
,
i2
,
j
;
int
i
,
i2
,
j
;
uint32_t
tmp
[
3
][
1024
]
__attribute__
((
aligned
(
32
)));
uint32_t
tmp
[
3
][
1024
]
__attribute__
((
aligned
(
32
)));
...
@@ -5571,7 +5573,7 @@ void idft3072(int16_t *input, int16_t *output,int scale)
...
@@ -5571,7 +5573,7 @@ void idft3072(int16_t *input, int16_t *output,int scale)
int16_t
twa6144
[
4096
]
__attribute__
((
aligned
(
32
)));
int16_t
twa6144
[
4096
]
__attribute__
((
aligned
(
32
)));
int16_t
twb6144
[
4096
]
__attribute__
((
aligned
(
32
)));
int16_t
twb6144
[
4096
]
__attribute__
((
aligned
(
32
)));
void
idft6144
(
int16_t
*
input
,
int16_t
*
output
,
int
scale
)
void
idft6144
(
int16_t
*
input
,
int16_t
*
output
,
unsigned
char
scale
)
{
{
int
i
,
i2
,
j
;
int
i
,
i2
,
j
;
uint32_t
tmp
[
3
][
2048
]
__attribute__
((
aligned
(
32
)));
uint32_t
tmp
[
3
][
2048
]
__attribute__
((
aligned
(
32
)));
...
@@ -5631,7 +5633,7 @@ void idft6144(int16_t *input, int16_t *output,int scale)
...
@@ -5631,7 +5633,7 @@ void idft6144(int16_t *input, int16_t *output,int scale)
}
}
void
dft6144
(
int16_t
*
input
,
int16_t
*
output
,
int
scale
)
void
dft6144
(
int16_t
*
input
,
int16_t
*
output
,
unsigned
char
scale
)
{
{
int
i
,
i2
,
j
;
int
i
,
i2
,
j
;
uint32_t
tmp
[
3
][
2048
]
__attribute__
((
aligned
(
32
)));
uint32_t
tmp
[
3
][
2048
]
__attribute__
((
aligned
(
32
)));
...
@@ -5696,7 +5698,7 @@ void dft6144(int16_t *input, int16_t *output,int scale)
...
@@ -5696,7 +5698,7 @@ void dft6144(int16_t *input, int16_t *output,int scale)
int16_t
twa12288
[
8192
]
__attribute__
((
aligned
(
32
)));
int16_t
twa12288
[
8192
]
__attribute__
((
aligned
(
32
)));
int16_t
twb12288
[
8192
]
__attribute__
((
aligned
(
32
)));
int16_t
twb12288
[
8192
]
__attribute__
((
aligned
(
32
)));
// 4096 x 3
// 4096 x 3
void
dft12288
(
int16_t
*
input
,
int16_t
*
output
,
int
scale
)
void
dft12288
(
int16_t
*
input
,
int16_t
*
output
,
unsigned
char
scale
)
{
{
int
i
,
i2
,
j
;
int
i
,
i2
,
j
;
uint32_t
tmp
[
3
][
4096
]
__attribute__
((
aligned
(
32
)));
uint32_t
tmp
[
3
][
4096
]
__attribute__
((
aligned
(
32
)));
...
@@ -5756,7 +5758,7 @@ void dft12288(int16_t *input, int16_t *output,int scale)
...
@@ -5756,7 +5758,7 @@ void dft12288(int16_t *input, int16_t *output,int scale)
}
}
void
idft12288
(
int16_t
*
input
,
int16_t
*
output
,
int
scale
)
void
idft12288
(
int16_t
*
input
,
int16_t
*
output
,
unsigned
char
scale
)
{
{
int
i
,
i2
,
j
;
int
i
,
i2
,
j
;
uint32_t
tmp
[
3
][
4096
]
__attribute__
((
aligned
(
32
)));
uint32_t
tmp
[
3
][
4096
]
__attribute__
((
aligned
(
32
)));
...
@@ -5820,7 +5822,7 @@ void idft12288(int16_t *input, int16_t *output,int scale)
...
@@ -5820,7 +5822,7 @@ void idft12288(int16_t *input, int16_t *output,int scale)
int16_t
twa18432
[
12288
]
__attribute__
((
aligned
(
32
)));
int16_t
twa18432
[
12288
]
__attribute__
((
aligned
(
32
)));
int16_t
twb18432
[
12288
]
__attribute__
((
aligned
(
32
)));
int16_t
twb18432
[
12288
]
__attribute__
((
aligned
(
32
)));
// 6144 x 3
// 6144 x 3
void
dft18432
(
int16_t
*
input
,
int16_t
*
output
,
int
scale
)
{
void
dft18432
(
int16_t
*
input
,
int16_t
*
output
,
unsigned
char
scale
)
{
int
i
,
i2
,
j
;
int
i
,
i2
,
j
;
uint32_t
tmp
[
3
][
6144
]
__attribute__
((
aligned
(
32
)));
uint32_t
tmp
[
3
][
6144
]
__attribute__
((
aligned
(
32
)));
...
@@ -5868,7 +5870,7 @@ void dft18432(int16_t *input, int16_t *output,int scale) {
...
@@ -5868,7 +5870,7 @@ void dft18432(int16_t *input, int16_t *output,int scale) {
_m_empty
();
_m_empty
();
}
}
void
idft18432
(
int16_t
*
input
,
int16_t
*
output
,
int
scale
)
{
void
idft18432
(
int16_t
*
input
,
int16_t
*
output
,
unsigned
char
scale
)
{
int
i
,
i2
,
j
;
int
i
,
i2
,
j
;
uint32_t
tmp
[
3
][
6144
]
__attribute__
((
aligned
(
32
)));
uint32_t
tmp
[
3
][
6144
]
__attribute__
((
aligned
(
32
)));
...
@@ -5920,7 +5922,7 @@ void idft18432(int16_t *input, int16_t *output,int scale) {
...
@@ -5920,7 +5922,7 @@ void idft18432(int16_t *input, int16_t *output,int scale) {
int16_t
twa24576
[
16384
]
__attribute__
((
aligned
(
32
)));
int16_t
twa24576
[
16384
]
__attribute__
((
aligned
(
32
)));
int16_t
twb24576
[
16384
]
__attribute__
((
aligned
(
32
)));
int16_t
twb24576
[
16384
]
__attribute__
((
aligned
(
32
)));
// 8192 x 3
// 8192 x 3
void
dft24576
(
int16_t
*
input
,
int16_t
*
output
,
int
scale
)
void
dft24576
(
int16_t
*
input
,
int16_t
*
output
,
unsigned
char
scale
)
{
{
int
i
,
i2
,
j
;
int
i
,
i2
,
j
;
uint32_t
tmp
[
3
][
8192
]
__attribute__
((
aligned
(
32
)));
uint32_t
tmp
[
3
][
8192
]
__attribute__
((
aligned
(
32
)));
...
@@ -5983,7 +5985,7 @@ void dft24576(int16_t *input, int16_t *output,int scale)
...
@@ -5983,7 +5985,7 @@ void dft24576(int16_t *input, int16_t *output,int scale)
}
}
}
}
void
idft24576
(
int16_t
*
input
,
int16_t
*
output
,
int
scale
)
void
idft24576
(
int16_t
*
input
,
int16_t
*
output
,
unsigned
char
scale
)
{
{
int
i
,
i2
,
j
;
int
i
,
i2
,
j
;
uint32_t
tmp
[
3
][
8192
]
__attribute__
((
aligned
(
32
)));
uint32_t
tmp
[
3
][
8192
]
__attribute__
((
aligned
(
32
)));
...
@@ -6194,7 +6196,7 @@ static inline void dft12f(simd_q15_t *x0,
...
@@ -6194,7 +6196,7 @@ static inline void dft12f(simd_q15_t *x0,
void
dft12
(
int16_t
*
x
,
int16_t
*
y
)
void
dft12
(
int16_t
*
x
,
int16_t
*
y
,
unsigned
char
scale_flag
)
{
{
simd_q15_t
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
;
simd_q15_t
*
x128
=
(
simd_q15_t
*
)
x
,
*
y128
=
(
simd_q15_t
*
)
y
;
...
@@ -8644,7 +8646,8 @@ void init_rad5_rep(int N,int16_t *twa,int16_t *twb,int16_t *twc,int16_t *twd) {
...
@@ -8644,7 +8646,8 @@ void init_rad5_rep(int N,int16_t *twa,int16_t *twb,int16_t *twc,int16_t *twd) {
twd
+=
8
;
twd
+=
8
;
}
}
}
}
/*----------------------------------------------------------------*/
/* dft library entry points: */
void
init_dfts
(
void
)
void
init_dfts
(
void
)
{
{
...
@@ -8693,8 +8696,24 @@ void init_dfts(void)
...
@@ -8693,8 +8696,24 @@ void init_dfts(void)
init_rad3_rep
(
1080
,
twa1080
,
twb1080
);
init_rad3_rep
(
1080
,
twa1080
,
twb1080
);
init_rad4_rep
(
1152
,
twa1152
,
twb1152
,
twc1152
);
init_rad4_rep
(
1152
,
twa1152
,
twb1152
,
twc1152
);
init_rad4_rep
(
1200
,
twa1200
,
twb1200
,
twc1200
);
init_rad4_rep
(
1200
,
twa1200
,
twb1200
,
twc1200
);
}
}
void
dft
(
uint8_t
sizeidx
,
int16_t
*
sigF
,
int16_t
*
sig
,
unsigned
char
scale_flag
){
AssertFatal
((
sizeidx
>=
0
&&
sizeidx
<
(
int
)
DFT_SIZE_IDXTABLESIZE
),
"Invalid dft size index %i
\n
"
,
sizeidx
);
dft_ftab
[
sizeidx
](
sigF
,
sig
,
scale_flag
);
};
void
idft
(
uint8_t
sizeidx
,
int16_t
*
sigF
,
int16_t
*
sig
,
unsigned
char
scale_flag
){
AssertFatal
((
sizeidx
>=
0
&&
sizeidx
<
(
int
)
IDFT_SIZE_IDXTABLESIZE
),
"Invalid idft size index %i
\n
"
,
sizeidx
);
idft_ftab
[
sizeidx
](
sigF
,
sig
,
scale_flag
);
};
/*---------------------------------------------------------------------------------------*/
#ifdef MR_MAIN
#ifdef MR_MAIN
#include <string.h>
#include <string.h>
#include <stdio.h>
#include <stdio.h>
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/tools_defs.h
View file @
296494ea
...
@@ -181,29 +181,234 @@ This function performs optimized fixed-point radix-2 FFT/IFFT.
...
@@ -181,29 +181,234 @@ This function performs optimized fixed-point radix-2 FFT/IFFT.
);
);
*/
*/
void
idft1536
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft6144
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft12288
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft18432
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft3072
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
idft24576
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
dft1536
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
dft3072
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
#ifdef OAIDFTS
typedef
void
(
*
adftfunc_t
)(
int16_t
*
sigF
,
int16_t
*
sig
,
unsigned
char
scale_flag
);
typedef
void
(
*
aidftfunc_t
)(
int16_t
*
sigF
,
int16_t
*
sig
,
unsigned
char
scale_flag
);
void
dft6144
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
void
dft12
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft24
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft36
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft48
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft60
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft72
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft96
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft108
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft120
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft144
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft180
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft192
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft216
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft240
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft288
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft300
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft324
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft360
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft384
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft432
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft480
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft540
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft576
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft600
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft648
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft720
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft768
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft864
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft900
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft960
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft972
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft1080
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft1152
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft1200
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft64
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft128
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft256
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft512
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft1024
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft2048
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft4096
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft8192
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft64
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft128
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft256
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft512
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft1024
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft2048
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft4096
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft8192
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
idft1536
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
idft6144
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
idft12288
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
idft18432
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
idft3072
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
idft24576
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
dft1536
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
dft3072
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
dft6144
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
dft12288
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
dft18432
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
void
dft24576
(
int16_t
*
sigF
,
int16_t
*
sig
,
uint8_t
scale_flag
);
#else
typedef
void
(
*
dftfunc_t
)(
uint8_t
sizeidx
,
int16_t
*
sigF
,
int16_t
*
sig
,
unsigned
char
scale_flag
);
typedef
void
(
*
idftfunc_t
)(
uint8_t
sizeidx
,
int16_t
*
sigF
,
int16_t
*
sig
,
unsigned
char
scale_flag
);
extern
dftfunc_t
dft
;
extern
idftfunc_t
idft
;
#endif
void
dft12288
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
typedef
enum
DFT_size_idx
{
DFT_12
,
DFT_24
,
DFT_36
,
DFT_48
,
DFT_60
,
DFT_72
,
DFT_96
,
DFT_108
,
DFT_120
,
DFT_128
,
DFT_144
,
DFT_180
,
DFT_192
,
DFT_216
,
DFT_240
,
DFT_256
,
DFT_288
,
DFT_300
,
DFT_324
,
DFT_360
,
DFT_384
,
DFT_432
,
DFT_480
,
DFT_512
,
DFT_540
,
DFT_576
,
DFT_600
,
DFT_648
,
DFT_720
,
DFT_768
,
DFT_864
,
DFT_900
,
DFT_960
,
DFT_972
,
DFT_1024
,
DFT_1080
,
DFT_1152
,
DFT_1200
,
DFT_1536
,
DFT_2048
,
DFT_3072
,
DFT_4096
,
DFT_6144
,
DFT_8192
,
DFT_12288
,
DFT_18432
,
DFT_24576
,
DFT_SIZE_IDXTABLESIZE
,
}
dft_size_idx_t
;
#ifdef OAIDFTS
adftfunc_t
dft_ftab
[]
=
{
dft12
,
dft24
,
dft36
,
dft48
,
dft60
,
dft72
,
dft96
,
dft108
,
dft120
,
dft128
,
dft144
,
dft180
,
dft192
,
dft216
,
dft240
,
dft256
,
dft288
,
dft300
,
dft324
,
dft360
,
dft384
,
dft432
,
dft480
,
dft512
,
dft540
,
dft576
,
dft600
,
dft648
,
dft720
,
dft768
,
dft864
,
dft900
,
dft960
,
dft972
,
dft1024
,
dft1080
,
dft1152
,
dft1200
,
dft1536
,
dft2048
,
dft3072
,
dft4096
,
dft6144
,
dft8192
,
dft12288
,
dft18432
,
dft24576
,
};
#endif
void
dft18432
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
typedef
enum
idft_size_idx
{
IDFT_128
,
IDFT_256
,
IDFT_288
,
IDFT_300
,
IDFT_324
,
IDFT_360
,
IDFT_384
,
IDFT_432
,
IDFT_480
,
IDFT_512
,
IDFT_1024
,
IDFT_1536
,
IDFT_2048
,
IDFT_3072
,
IDFT_4096
,
IDFT_6144
,
IDFT_8192
,
IDFT_12288
,
IDFT_18432
,
IDFT_24576
,
IDFT_SIZE_IDXTABLESIZE
,
}
idft_size_idx_t
;
#ifdef OAIDFTS
aidftfunc_t
idft_ftab
[]
=
{
idft128
,
idft256
,
idft512
,
idft1024
,
idft1536
,
idft2048
,
idft3072
,
idft4096
,
idft6144
,
idft8192
,
idft12288
,
idft18432
,
idft24576
,
};
#endif
void
dft24576
(
int16_t
*
sigF
,
int16_t
*
sig
,
int
scale
);
/*!\fn int32_t rotate_cpx_vector(int16_t *x,int16_t *alpha,int16_t *y,uint32_t N,uint16_t output_shift)
/*!\fn int32_t rotate_cpx_vector(int16_t *x,int16_t *alpha,int16_t *y,uint32_t N,uint16_t output_shift)
...
@@ -374,57 +579,7 @@ int64_t dot_product64(int16_t *x,
...
@@ -374,57 +579,7 @@ int64_t dot_product64(int16_t *x,
uint32_t
N
,
//must be a multiple of 8
uint32_t
N
,
//must be a multiple of 8
uint8_t
output_shift
);
uint8_t
output_shift
);
void
dft12
(
int16_t
*
x
,
int16_t
*
y
);
void
dft24
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft36
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft48
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft60
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft72
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft96
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft108
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft120
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft144
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft180
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft192
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft216
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft240
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft288
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft300
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft324
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft360
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft384
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft432
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft480
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft540
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft576
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft600
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft648
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft720
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft768
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft864
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft900
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft960
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft972
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft1080
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft1152
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft1200
(
int16_t
*
x
,
int16_t
*
y
,
uint8_t
scale_flag
);
void
dft64
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
dft128
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
dft256
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
dft512
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
dft1024
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
dft2048
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
dft4096
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
dft8192
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft64
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft128
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft256
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft512
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft1024
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft2048
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft4096
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
void
idft8192
(
int16_t
*
x
,
int16_t
*
y
,
int
scale
);
/** @} */
/** @} */
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment