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
717eeb77
Commit
717eeb77
authored
Dec 23, 2015
by
Ganesh Ajjanagadde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/dcaenc: replace pow(10,x) by ff_exp10(x)
Signed-off-by:
Ganesh Ajjanagadde
<
gajjanagadde@gmail.com
>
parent
b0e28da3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
dcaenc.c
libavcodec/dcaenc.c
+3
-2
No files found.
libavcodec/dcaenc.c
View file @
717eeb77
...
...
@@ -24,6 +24,7 @@
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "avcodec.h"
#include "dca.h"
#include "dcadata.h"
...
...
@@ -179,7 +180,7 @@ static int encode_init(AVCodecContext *avctx)
cos_table
[
2048
-
i
]
=
cos_table
[
i
];
}
for
(
i
=
0
;
i
<
2048
;
i
++
)
{
cb_to_level
[
i
]
=
(
int32_t
)(
0x7fffffff
*
pow
(
10
,
-
0
.
005
*
i
));
cb_to_level
[
i
]
=
(
int32_t
)(
0x7fffffff
*
ff_exp10
(
-
0
.
005
*
i
));
}
for
(
k
=
0
;
k
<
32
;
k
++
)
{
...
...
@@ -205,7 +206,7 @@ static int encode_init(AVCodecContext *avctx)
}
for
(
i
=
0
;
i
<
256
;
i
++
)
{
double
add
=
1
+
pow
(
10
,
-
0
.
01
*
i
);
double
add
=
1
+
ff_exp10
(
-
0
.
01
*
i
);
cb_to_add
[
i
]
=
(
int32_t
)(
100
*
log10
(
add
));
}
for
(
j
=
0
;
j
<
8
;
j
++
)
{
...
...
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