Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
327747de
Commit
327747de
authored
Oct 19, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atrac3: simplify MDCT window calculation
parent
5d1007f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
atrac3.c
libavcodec/atrac3.c
+7
-10
No files found.
libavcodec/atrac3.c
View file @
327747de
...
...
@@ -177,19 +177,16 @@ static int decode_bytes(const uint8_t *input, uint8_t *out, int bytes)
static
av_cold
void
init_atrac3_window
(
void
)
{
float
enc_window
[
256
];
int
i
;
int
i
,
j
;
/* generate the mdct window, for details see
* http://wiki.multimedia.cx/index.php?title=RealAudio_atrc#Windows */
for
(
i
=
0
;
i
<
256
;
i
++
)
enc_window
[
i
]
=
(
sin
(((
i
+
0
.
5
)
/
256
.
0
-
0
.
5
)
*
M_PI
)
+
1
.
0
)
*
0
.
5
;
for
(
i
=
0
;
i
<
256
;
i
++
)
{
mdct_window
[
i
]
=
enc_window
[
i
]
/
(
enc_window
[
i
]
*
enc_window
[
i
]
+
enc_window
[
255
-
i
]
*
enc_window
[
255
-
i
]);
mdct_window
[
511
-
i
]
=
mdct_window
[
i
];
for
(
i
=
0
,
j
=
255
;
i
<
128
;
i
++
,
j
--
)
{
float
wi
=
sin
(((
i
+
0
.
5
)
/
256
.
0
-
0
.
5
)
*
M_PI
)
+
1
.
0
;
float
wj
=
sin
(((
j
+
0
.
5
)
/
256
.
0
-
0
.
5
)
*
M_PI
)
+
1
.
0
;
float
w
=
0
.
5
*
(
wi
*
wi
+
wj
*
wj
);
mdct_window
[
i
]
=
mdct_window
[
511
-
i
]
=
wi
/
w
;
mdct_window
[
j
]
=
mdct_window
[
511
-
j
]
=
wj
/
w
;
}
}
...
...
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