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
3343e4e6
Commit
3343e4e6
authored
Dec 23, 2015
by
Ganesh Ajjanagadde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/wmaenc: replace pow(10,x) by ff_exp10(x)
Signed-off-by:
Ganesh Ajjanagadde
<
gajjanagadde@gmail.com
>
parent
62765c00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
wmaenc.c
libavcodec/wmaenc.c
+3
-2
No files found.
libavcodec/wmaenc.c
View file @
3343e4e6
...
...
@@ -20,6 +20,7 @@
*/
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
#include "avcodec.h"
#include "internal.h"
...
...
@@ -132,7 +133,7 @@ static void init_exp(WMACodecContext *s, int ch, const int *exp_param)
max_scale
=
0
;
while
(
q
<
q_end
)
{
/* XXX: use a table */
v
=
pow
(
10
,
*
exp_param
++
*
(
1
.
0
/
16
.
0
));
v
=
ff_exp10
(
*
exp_param
++
*
(
1
.
0
/
16
.
0
));
max_scale
=
FFMAX
(
max_scale
,
v
);
n
=
*
ptr
++
;
do
{
...
...
@@ -227,7 +228,7 @@ static int encode_block(WMACodecContext *s, float (*src_coefs)[BLOCK_MAX_SIZE],
coefs1
=
s
->
coefs1
[
ch
];
exponents
=
s
->
exponents
[
ch
];
mult
=
pow
(
10
,
total_gain
*
0
.
05
)
/
s
->
max_exponent
[
ch
];
mult
=
ff_exp10
(
total_gain
*
0
.
05
)
/
s
->
max_exponent
[
ch
];
mult
*=
mdct_norm
;
coefs
=
src_coefs
[
ch
];
if
(
s
->
use_noise_coding
&&
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