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
2b992d0e
Commit
2b992d0e
authored
Nov 14, 2007
by
Benjamin Larsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small simplification
Originally committed as revision 11026 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
97c8b064
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
nellymoserdec.c
libavcodec/nellymoserdec.c
+7
-9
No files found.
libavcodec/nellymoserdec.c
View file @
2b992d0e
...
...
@@ -123,9 +123,9 @@ static void overlap_and_window(NellyMoserDecodeContext *s, float *state, float *
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
;
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
;
...
...
@@ -281,7 +281,6 @@ void nelly_decode_block(NellyMoserDecodeContext *s, unsigned char block[NELLY_BL
float
*
aptr
,
*
bptr
,
*
pptr
,
val
,
pval
;
int
bits
[
NELLY_BUF_LEN
];
unsigned
char
v
;
float
a
;
init_get_bits
(
&
s
->
gb
,
block
,
NELLY_BLOCK_LEN
*
8
);
...
...
@@ -324,10 +323,9 @@ void nelly_decode_block(NellyMoserDecodeContext *s, unsigned char block[NELLY_BL
aptr
,
s
->
imdct_tmp
);
/* XXX: overlapping and windowing should be part of a more
generic imdct function */
a
=
1
.
0
/
8
.
0
;
for
(
j
=
0
;
j
<
NELLY_BUF_LEN
/
2
;
j
++
)
{
aptr
[
j
]
=
s
->
imdct_out
[
j
+
NELLY_BUF_LEN
+
NELLY_BUF_LEN
/
2
]
*
a
;
aptr
[
j
+
NELLY_BUF_LEN
/
2
]
=
-
s
->
imdct_out
[
j
]
*
a
;
aptr
[
j
]
=
s
->
imdct_out
[
j
+
NELLY_BUF_LEN
+
NELLY_BUF_LEN
/
2
];
aptr
[
j
+
NELLY_BUF_LEN
/
2
]
=
s
->
imdct_out
[
j
]
;
}
overlap_and_window
(
s
,
s
->
state
,
aptr
);
}
...
...
@@ -345,10 +343,10 @@ static int decode_init(AVCodecContext * avctx) {
if
(
s
->
dsp
.
float_to_int16
==
ff_float_to_int16_c
)
{
s
->
add_bias
=
385
;
s
->
scale_bias
=
32768
;
s
->
scale_bias
=
8
*
32768
;
}
else
{
s
->
add_bias
=
0
;
s
->
scale_bias
=
1
;
s
->
scale_bias
=
1
*
8
;
}
/* Generate overlap window */
...
...
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