Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
vlc-2-2
Commits
67415a4c
Commit
67415a4c
authored
Feb 07, 2009
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wmafixed: optimize
parent
9bca33b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
modules/codec/wmafixed/wmadeci.c
modules/codec/wmafixed/wmadeci.c
+2
-2
modules/codec/wmafixed/wmafixed.c
modules/codec/wmafixed/wmafixed.c
+7
-7
No files found.
modules/codec/wmafixed/wmadeci.c
View file @
67415a4c
...
...
@@ -238,7 +238,7 @@ static void wma_window(WMADecodeContext *s, int32_t *in, int32_t *out)
/*previous block was smaller or the same size, so use it's size to set the window length*/
block_len
=
1
<<
s
->
prev_block_len_bits
;
/*find the middle of the two overlapped blocks, this will be the first overlapped sample*/
n
=
(
s
->
block_len
-
block_len
)
/
2
;
n
=
(
s
->
block_len
-
block_len
)
>>
1
;
bsize
=
s
->
frame_len_bits
-
s
->
prev_block_len_bits
;
vector_fmul_add_add
(
out
+
n
,
in
+
n
,
s
->
windows
[
bsize
],
block_len
);
...
...
@@ -261,7 +261,7 @@ static void wma_window(WMADecodeContext *s, int32_t *in, int32_t *out)
}
else
{
block_len
=
1
<<
s
->
next_block_len_bits
;
n
=
(
s
->
block_len
-
block_len
)
/
2
;
n
=
(
s
->
block_len
-
block_len
)
>>
1
;
bsize
=
s
->
frame_len_bits
-
s
->
next_block_len_bits
;
memcpy
(
out
,
in
,
n
*
sizeof
(
int32_t
));
...
...
modules/codec/wmafixed/wmafixed.c
View file @
67415a4c
...
...
@@ -122,7 +122,7 @@ int32_t fixsqrt32(int32_t x)
#undef STEP
return
(
int32_t
)(
r
<<
(
PRECISION
/
2
));
return
(
int32_t
)(
r
<<
(
PRECISION
>>
1
));
}
/* Inverse gain of circular cordic rotation in s0.31 format. */
...
...
@@ -191,17 +191,17 @@ long fsincos(unsigned long phase, int32_t *cos)
z
=
phase
;
/* The phase has to be somewhere between 0..pi for this to work right */
if
(
z
<
0xffffffff
/
4
)
{
if
(
z
<
0xffffffff
>>
2
)
{
/* z in first quadrant, z += pi/2 to correct */
x
=
-
x
;
z
+=
0xffffffff
/
4
;
}
else
if
(
z
<
3
*
(
0xffffffff
/
4
))
{
z
+=
0xffffffff
>>
2
;
}
else
if
(
z
<
3
*
(
0xffffffff
>>
2
))
{
/* z in third quadrant, z -= pi/2 to correct */
z
-=
0xffffffff
/
4
;
z
-=
0xffffffff
>>
2
;
}
else
{
/* z in fourth quadrant, z -= 3pi/2 to correct */
x
=
-
x
;
z
-=
3
*
(
0xffffffff
/
4
);
z
-=
3
*
(
0xffffffff
>>
2
);
}
/* Each iteration adds roughly 1-bit of extra precision */
...
...
@@ -211,7 +211,7 @@ long fsincos(unsigned long phase, int32_t *cos)
z1
=
atan_table
[
i
];
/* Decided which direction to rotate vector. Pivot point is pi/2 */
if
(
z
>=
0xffffffff
/
4
)
{
if
(
z
>=
0xffffffff
>>
2
)
{
x
-=
y1
;
y
+=
x1
;
z
-=
z1
;
...
...
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