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
littleBu
OpenXG-RAN
Commits
ef3b99a2
Commit
ef3b99a2
authored
Jan 16, 2025
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove MMX instruction usage in threegpplte_turbo_encoder_sse()
parent
e106ec6d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
33 deletions
+17
-33
openair1/PHY/CODING/3gpplte_sse.c
openair1/PHY/CODING/3gpplte_sse.c
+17
-33
No files found.
openair1/PHY/CODING/3gpplte_sse.c
View file @
ef3b99a2
...
...
@@ -47,14 +47,8 @@
//#define CALLGRIND 1
struct
treillis
{
union
{
simde__m64
systematic_andp1_64
[
3
];
uint8_t
systematic_andp1_8
[
24
];
};
union
{
simde__m64
parity2_64
[
3
];
uint8_t
parity2_8
[
24
];
};
uint8_t
systematic_andp1
[
24
];
uint8_t
parity2
[
24
];
int
exit_state
;
}
__attribute__
((
aligned
(
64
)));
...
...
@@ -91,12 +85,11 @@ static void treillis_table_init(void) {
current_state
=
i
;
for
(
b
=
0
;
b
<
8
;
b
++
)
{
// pre-compute the image of the byte j in _m128i vector right place
all_treillis
[
i
][
j
].
systematic_andp1_8
[
b
*
3
]
=
(
j
&
(
1
<<
(
7
-
b
)))
>>
(
7
-
b
);
v
=
threegpplte_rsc
(
all_treillis
[
i
][
j
].
systematic_andp1_8
[
b
*
3
]
,
&
current_state
);
all_treillis
[
i
][
j
].
systematic_andp1_8
[
b
*
3
+
1
]
=
v
;
// for the yparity1
all_treillis
[
i
][
j
].
systematic_andp1
[
b
*
3
]
=
(
j
&
(
1
<<
(
7
-
b
)))
>>
(
7
-
b
);
v
=
threegpplte_rsc
(
all_treillis
[
i
][
j
].
systematic_andp1
[
b
*
3
],
&
current_state
);
all_treillis
[
i
][
j
].
systematic_andp1
[
b
*
3
+
1
]
=
v
;
// for the yparity1
// all_treillis[i][j].parity1_8[b*3+1]=v; // for the yparity1
all_treillis
[
i
][
j
].
parity2
_8
[
b
*
3
+
2
]
=
v
;
// for the yparity2
all_treillis
[
i
][
j
].
parity2
[
b
*
3
+
2
]
=
v
;
// for the yparity2
}
all_treillis
[
i
][
j
].
exit_state
=
current_state
;
...
...
@@ -275,13 +268,9 @@ char interleave_compact_byte(short *base_interleaver,unsigned char *input, unsig
}
*/
void
threegpplte_turbo_encoder_sse
(
unsigned
char
*
input
,
unsigned
short
input_length_bytes
,
unsigned
char
*
output
,
unsigned
char
F
)
{
int
i
;
void
threegpplte_turbo_encoder_sse
(
unsigned
char
*
input
,
unsigned
short
input_length_bytes
,
unsigned
char
*
output
,
unsigned
char
F
)
{
unsigned
char
*
x
;
unsigned
char
state0
=
0
,
state1
=
0
;
unsigned
short
input_length_bits
=
input_length_bytes
<<
3
;
short
*
base_interleaver
;
...
...
@@ -290,6 +279,7 @@ void threegpplte_turbo_encoder_sse(unsigned char *input,
}
// look for f1 and f2 precomputed interleaver values
int
i
;
for
(
i
=
0
;
i
<
188
&&
f1f2mat
[
i
].
nb_bits
!=
input_length_bits
;
i
++
);
if
(
i
==
188
)
{
...
...
@@ -301,24 +291,18 @@ void threegpplte_turbo_encoder_sse(unsigned char *input,
unsigned
char
systematic2
[
768
]
__attribute__
((
aligned
(
32
)));
interleave_compact_byte
(
base_interleaver
,
input
,
systematic2
,
input_length_bytes
);
simde__m64
*
ptr_output
=
(
simde__m64
*
)
output
;
unsigned
char
*
ptr_output
=
output
;
unsigned
char
cur_s1
,
cur_s2
;
int
code_rate
;
for
(
state0
=
state1
=
i
=
0
;
i
<
input_length_bytes
;
i
++
)
{
unsigned
char
state0
=
0
,
state1
=
0
;
for
(
int
i
=
0
;
i
<
input_length_bytes
;
i
++
)
{
cur_s1
=
input
[
i
];
cur_s2
=
systematic2
[
i
];
for
(
code_rate
=
0
;
code_rate
<
3
;
code_rate
++
)
{
/*
*ptr_output++ = simde_mm_add_pi8(all_treillis[state0][cur_s1].systematic_64[code_rate],
simde_mm_add_pi8(all_treillis[state0][cur_s1].parity1_64[code_rate],
all_treillis[state1][cur_s2].parity2_64[code_rate]));
*/
*
ptr_output
++
=
simde_mm_add_pi8
(
all_treillis
[
state0
][
cur_s1
].
systematic_andp1_64
[
code_rate
],
all_treillis
[
state1
][
cur_s2
].
parity2_64
[
code_rate
]);
*
(
simde__m128i
*
)
ptr_output
=
simde_mm_add_epi8
(
*
(
simde__m128i
*
)
all_treillis
[
state0
][
cur_s1
].
systematic_andp1
,
*
(
simde__m128i
*
)
all_treillis
[
state1
][
cur_s2
].
parity2
);
ptr_output
+=
16
;
for
(
int
code_rate
=
16
;
code_rate
<
24
;
code_rate
++
)
{
*
ptr_output
++
=
all_treillis
[
state0
][
cur_s1
].
systematic_andp1
[
code_rate
]
+
all_treillis
[
state1
][
cur_s2
].
parity2
[
code_rate
];
}
state0
=
all_treillis
[
state0
][
cur_s1
].
exit_state
;
state1
=
all_treillis
[
state1
][
cur_s2
].
exit_state
;
}
...
...
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