Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Harris
Opus
Commits
ed01a596
Commit
ed01a596
authored
Jan 04, 2014
by
Jean-Marc Valin
Browse files
Making exp_rotation1() use MAC16_16(), which saves a few cycles on ARM
parent
ccec752a
Changes
1
Show whitespace changes
Inline
Side-by-side
celt/vq.c
View file @
ed01a596
...
...
@@ -42,15 +42,17 @@
static
void
exp_rotation1
(
celt_norm
*
X
,
int
len
,
int
stride
,
opus_val16
c
,
opus_val16
s
)
{
int
i
;
opus_val16
ms
;
celt_norm
*
Xptr
;
Xptr
=
X
;
ms
=
NEG16
(
s
);
for
(
i
=
0
;
i
<
len
-
stride
;
i
++
)
{
celt_norm
x1
,
x2
;
x1
=
Xptr
[
0
];
x2
=
Xptr
[
stride
];
Xptr
[
stride
]
=
EXTRACT16
(
PSHR32
(
MULT16_16
(
c
,
x2
)
+
MULT16_16
(
s
,
x1
),
15
));
*
Xptr
++
=
EXTRACT16
(
PSHR32
(
M
ULT
16_16
(
c
,
x1
)
-
MULT16_16
(
s
,
x2
),
15
));
Xptr
[
stride
]
=
EXTRACT16
(
PSHR32
(
MAC16_16
(
MULT16_16
(
c
,
x2
)
,
s
,
x1
),
15
));
*
Xptr
++
=
EXTRACT16
(
PSHR32
(
M
AC
16_16
(
MULT16_16
(
c
,
x1
),
m
s
,
x2
),
15
));
}
Xptr
=
&
X
[
len
-
2
*
stride
-
1
];
for
(
i
=
len
-
2
*
stride
-
1
;
i
>=
0
;
i
--
)
...
...
@@ -58,8 +60,8 @@ static void exp_rotation1(celt_norm *X, int len, int stride, opus_val16 c, opus_
celt_norm
x1
,
x2
;
x1
=
Xptr
[
0
];
x2
=
Xptr
[
stride
];
Xptr
[
stride
]
=
EXTRACT16
(
PSHR32
(
MULT16_16
(
c
,
x2
)
+
MULT16_16
(
s
,
x1
),
15
));
*
Xptr
--
=
EXTRACT16
(
PSHR32
(
M
ULT
16_16
(
c
,
x1
)
-
MULT16_16
(
s
,
x2
),
15
));
Xptr
[
stride
]
=
EXTRACT16
(
PSHR32
(
MAC16_16
(
MULT16_16
(
c
,
x2
)
,
s
,
x1
),
15
));
*
Xptr
--
=
EXTRACT16
(
PSHR32
(
M
AC
16_16
(
MULT16_16
(
c
,
x1
),
m
s
,
x2
),
15
));
}
}
...
...
Write
Preview
Supports
Markdown
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