Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Mark Harris
Opus
Commits
75732de1
Commit
75732de1
authored
Sep 29, 2009
by
Jean-Marc Valin
Browse files
Tuning the spreading rotations
parent
4834c92e
Changes
1
Hide whitespace changes
Inline
Side-by-side
libcelt/vq.c
View file @
75732de1
...
...
@@ -46,7 +46,7 @@ static void exp_rotation(celt_norm_t *X, int len, int dir, int stride, int K)
celt_word16_t
c
,
s
;
celt_word16_t
gain
,
theta
;
celt_norm_t
*
Xptr
;
gain
=
celt_div
((
celt_word32_t
)
MULT16_16
(
Q15_ONE
,
len
),(
celt_word32_t
)(
len
+
2
*
K
*
((
K
>>
1
)
+
1
)
));
gain
=
celt_div
((
celt_word32_t
)
MULT16_16
(
Q15_ONE
,
len
),(
celt_word32_t
)(
3
+
len
+
6
*
K
));
/* FIXME: Make that HALF16 instead of HALF32 */
theta
=
SUB16
(
Q15ONE
,
HALF32
(
MULT16_16_Q15
(
gain
,
gain
)));
/*if (len==30)
...
...
@@ -57,8 +57,8 @@ static void exp_rotation(celt_norm_t *X, int len, int dir, int stride, int K)
}*/
c
=
celt_cos_norm
(
EXTEND32
(
theta
));
s
=
dir
*
celt_cos_norm
(
EXTEND32
(
SUB16
(
Q15ONE
,
theta
)));
/* sin(theta) */
if
(
stride
==
1
)
stride
=
2
;
if
(
len
>
8
*
stride
)
stride
*
=
len
/
(
8
*
stride
)
;
iter
=
1
;
for
(
k
=
0
;
k
<
iter
;
k
++
)
{
...
...
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