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
3d5863d7
Commit
3d5863d7
authored
May 16, 2019
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/aacdec_fixed: ssign seems always -1 in noise_scale(), simplify
parent
d3f236b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
aacdec_fixed.c
libavcodec/aacdec_fixed.c
+4
-4
No files found.
libavcodec/aacdec_fixed.c
View file @
3d5863d7
...
...
@@ -195,12 +195,12 @@ static void subband_scale(int *dst, int *src, int scale, int offset, int len, vo
static
void
noise_scale
(
int
*
coefs
,
int
scale
,
int
band_energy
,
int
len
)
{
int
ssign
=
scale
<
0
?
-
1
:
1
;
int
s
=
FFABS
(
scale
);
int
s
=
-
scale
;
unsigned
int
round
;
int
i
,
out
,
c
=
exp2tab
[
s
&
3
];
int
nlz
=
0
;
av_assert0
(
s
>=
0
);
while
(
band_energy
>
0x7fff
)
{
band_energy
>>=
1
;
nlz
++
;
...
...
@@ -216,7 +216,7 @@ static void noise_scale(int *coefs, int scale, int band_energy, int len)
round
=
s
?
1
<<
(
s
-
1
)
:
0
;
for
(
i
=
0
;
i
<
len
;
i
++
)
{
out
=
(
int
)(((
int64_t
)
coefs
[
i
]
*
c
)
>>
32
);
coefs
[
i
]
=
((
int
)(
out
+
round
)
>>
s
)
*
ssign
;
coefs
[
i
]
=
-
((
int
)(
out
+
round
)
>>
s
)
;
}
}
else
{
...
...
@@ -224,7 +224,7 @@ static void noise_scale(int *coefs, int scale, int band_energy, int len)
round
=
s
?
1
<<
(
s
-
1
)
:
0
;
for
(
i
=
0
;
i
<
len
;
i
++
)
{
out
=
(
int
)((
int64_t
)((
int64_t
)
coefs
[
i
]
*
c
+
round
)
>>
s
);
coefs
[
i
]
=
out
*
ssign
;
coefs
[
i
]
=
-
out
;
}
}
}
...
...
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