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
b0e28da3
Commit
b0e28da3
authored
Dec 23, 2015
by
Ganesh Ajjanagadde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/cngdec: replace pow(10,x) by ff_exp10(x)
Signed-off-by:
Ganesh Ajjanagadde
<
gajjanagadde@gmail.com
>
parent
cb3a994b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
cngdec.c
libavcodec/cngdec.c
+2
-1
No files found.
libavcodec/cngdec.c
View file @
b0e28da3
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#include <math.h>
#include <math.h>
#include "libavutil/common.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "avcodec.h"
#include "avcodec.h"
#include "celp_filters.h"
#include "celp_filters.h"
#include "internal.h"
#include "internal.h"
...
@@ -112,7 +113,7 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -112,7 +113,7 @@ static int cng_decode_frame(AVCodecContext *avctx, void *data,
if
(
avpkt
->
size
)
{
if
(
avpkt
->
size
)
{
int
dbov
=
-
avpkt
->
data
[
0
];
int
dbov
=
-
avpkt
->
data
[
0
];
p
->
target_energy
=
1081109975
*
pow
(
10
,
dbov
/
10
.
0
)
*
0
.
75
;
p
->
target_energy
=
1081109975
*
ff_exp10
(
dbov
/
10
.
0
)
*
0
.
75
;
memset
(
p
->
target_refl_coef
,
0
,
p
->
order
*
sizeof
(
*
p
->
target_refl_coef
));
memset
(
p
->
target_refl_coef
,
0
,
p
->
order
*
sizeof
(
*
p
->
target_refl_coef
));
for
(
i
=
0
;
i
<
FFMIN
(
avpkt
->
size
-
1
,
p
->
order
);
i
++
)
{
for
(
i
=
0
;
i
<
FFMIN
(
avpkt
->
size
-
1
,
p
->
order
);
i
++
)
{
p
->
target_refl_coef
[
i
]
=
(
avpkt
->
data
[
1
+
i
]
-
127
)
/
128
.
0
;
p
->
target_refl_coef
[
i
]
=
(
avpkt
->
data
[
1
+
i
]
-
127
)
/
128
.
0
;
...
...
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