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
e616c6d6
Commit
e616c6d6
authored
Apr 16, 2008
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify transform
Originally committed as revision 12848 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
d965c3e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
20 deletions
+10
-20
nellymoserdec.c
libavcodec/nellymoserdec.c
+10
-20
No files found.
libavcodec/nellymoserdec.c
View file @
e616c6d6
...
@@ -111,30 +111,22 @@ static inline int signed_shift(int i, int shift) {
...
@@ -111,30 +111,22 @@ static inline int signed_shift(int i, int shift) {
return
i
>>
-
shift
;
return
i
>>
-
shift
;
}
}
static
void
overlap_and_window
(
NellyMoserDecodeContext
*
s
,
float
*
state
,
float
*
audio
)
static
void
overlap_and_window
(
NellyMoserDecodeContext
*
s
,
float
*
state
,
float
*
audio
,
float
*
a_in
)
{
{
int
bot
,
mid_up
,
mid_down
,
top
;
int
bot
,
top
,
top2
;
float
s_bot
,
s_top
;
bot
=
0
;
bot
=
0
;
top
=
NELLY_BUF_LEN
-
1
;
top
=
NELLY_BUF_LEN
-
1
;
mid_up
=
NELLY_BUF_LEN
/
2
;
top2
=
2
*
NELLY_BUF_LEN
-
1
;
mid_down
=
(
NELLY_BUF_LEN
/
2
)
-
1
;
while
(
bot
<
NELLY_BUF_LEN
/
4
)
{
s_bot
=
audio
[
bot
];
s_top
=
-
audio
[
top
];
audio
[
bot
]
=
(
-
audio
[
mid_up
]
*
sine_window
[
bot
]
-
state
[
bot
]
*
sine_window
[
top
])
/
s
->
scale_bias
+
s
->
add_bias
;
audio
[
top
]
=
(
-
state
[
bot
]
*
sine_window
[
bot
]
+
audio
[
mid_up
]
*
sine_window
[
top
])
/
s
->
scale_bias
+
s
->
add_bias
;
state
[
bot
]
=
audio
[
mid_down
];
audio
[
mid_down
]
=
(
s_top
*
sine_window
[
mid_down
]
-
state
[
mid_down
]
*
sine_window
[
mid_up
])
/
s
->
scale_bias
+
s
->
add_bias
;
while
(
bot
<
NELLY_BUF_LEN
/
2
)
{
audio
[
mid_up
]
=
(
-
state
[
mid_down
]
*
sine_window
[
mid_down
]
-
s_top
*
sine_window
[
mid_up
])
/
s
->
scale_bias
+
s
->
add_bias
;
audio
[
bot
]
=
(
-
a_in
[
bot
]
*
sine_window
[
bot
]
-
state
[
bot
]
*
sine_window
[
top
])
/
s
->
scale_bias
;
state
[
mid_down
]
=
s_bot
;
audio
[
top
]
=
(
-
state
[
bot
]
*
sine_window
[
bot
]
+
a_in
[
bot
]
*
sine_window
[
top
])
/
s
->
scale_bias
;
state
[
bot
]
=
a_in
[
top2
];
bot
++
;
bot
++
;
mid_up
++
;
top2
--
;
mid_down
--
;
top
--
;
top
--
;
}
}
}
}
...
@@ -323,9 +315,7 @@ void nelly_decode_block(NellyMoserDecodeContext *s, const unsigned char block[NE
...
@@ -323,9 +315,7 @@ void nelly_decode_block(NellyMoserDecodeContext *s, const unsigned char block[NE
aptr
,
s
->
imdct_tmp
);
aptr
,
s
->
imdct_tmp
);
/* XXX: overlapping and windowing should be part of a more
/* XXX: overlapping and windowing should be part of a more
generic imdct function */
generic imdct function */
memcpy
(
&
aptr
[
0
],
&
s
->
imdct_out
[
NELLY_BUF_LEN
+
NELLY_BUF_LEN
/
2
],
(
NELLY_BUF_LEN
/
2
)
*
sizeof
(
float
));
overlap_and_window
(
s
,
s
->
state
,
aptr
,
s
->
imdct_out
);
memcpy
(
&
aptr
[
NELLY_BUF_LEN
/
2
],
&
s
->
imdct_out
[
0
],(
NELLY_BUF_LEN
/
2
)
*
sizeof
(
float
));
overlap_and_window
(
s
,
s
->
state
,
aptr
);
}
}
}
}
...
...
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