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
c21f8199
Commit
c21f8199
authored
Sep 13, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegaudioenc: replace pow(2,.. by exp2(
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
51fa6538
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mpegaudioenc.c
libavcodec/mpegaudioenc.c
+3
-3
No files found.
libavcodec/mpegaudioenc.c
View file @
c21f8199
...
@@ -148,16 +148,16 @@ static av_cold int MPA_encode_init(AVCodecContext *avctx)
...
@@ -148,16 +148,16 @@ static av_cold int MPA_encode_init(AVCodecContext *avctx)
}
}
for
(
i
=
0
;
i
<
64
;
i
++
)
{
for
(
i
=
0
;
i
<
64
;
i
++
)
{
v
=
(
int
)(
pow
(
2
.
0
,
(
3
-
i
)
/
3
.
0
)
*
(
1
<<
20
));
v
=
(
int
)(
exp2
(
(
3
-
i
)
/
3
.
0
)
*
(
1
<<
20
));
if
(
v
<=
0
)
if
(
v
<=
0
)
v
=
1
;
v
=
1
;
scale_factor_table
[
i
]
=
v
;
scale_factor_table
[
i
]
=
v
;
#ifdef USE_FLOATS
#ifdef USE_FLOATS
scale_factor_inv_table
[
i
]
=
pow
(
2
.
0
,
-
(
3
-
i
)
/
3
.
0
)
/
(
float
)(
1
<<
20
);
scale_factor_inv_table
[
i
]
=
exp2
(
-
(
3
-
i
)
/
3
.
0
)
/
(
float
)(
1
<<
20
);
#else
#else
#define P 15
#define P 15
scale_factor_shift
[
i
]
=
21
-
P
-
(
i
/
3
);
scale_factor_shift
[
i
]
=
21
-
P
-
(
i
/
3
);
scale_factor_mult
[
i
]
=
(
1
<<
P
)
*
pow
(
2
.
0
,
(
i
%
3
)
/
3
.
0
);
scale_factor_mult
[
i
]
=
(
1
<<
P
)
*
exp2
(
(
i
%
3
)
/
3
.
0
);
#endif
#endif
}
}
for
(
i
=
0
;
i
<
128
;
i
++
)
{
for
(
i
=
0
;
i
<
128
;
i
++
)
{
...
...
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