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
d3f4fd76
Commit
d3f4fd76
authored
Jul 07, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
celp_math: use av_assert
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
dc7aecd8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
celp_math.c
libavcodec/celp_math.c
+5
-5
No files found.
libavcodec/celp_math.c
View file @
d3f4fd76
...
...
@@ -22,8 +22,8 @@
#include <inttypes.h>
#include <limits.h>
#include <assert.h>
#include "libavutil/avassert.h"
#include "avcodec.h"
#include "mathops.h"
#include "celp_math.h"
...
...
@@ -80,7 +80,7 @@ int16_t ff_cos(uint16_t arg)
uint8_t
offset
=
arg
;
uint8_t
ind
=
arg
>>
8
;
a
ssert
(
arg
<
0x4000
);
a
v_assert2
(
arg
<
0x4000
);
return
FFMAX
(
base_cos
[
ind
]
+
((
slope_cos
[
ind
]
*
offset
)
>>
12
),
-
0x8000
);
}
...
...
@@ -91,7 +91,7 @@ int ff_exp2(uint16_t power)
uint16_t
frac_dx
;
int
result
;
a
ssert
(
power
<=
0x7fff
);
a
v_assert2
(
power
<=
0x7fff
);
frac_x0
=
power
>>
10
;
frac_dx
=
(
power
&
0x03ff
)
<<
5
;
...
...
@@ -140,7 +140,7 @@ int16_t ff_cos(uint16_t arg)
uint8_t
offset
=
arg
;
uint8_t
ind
=
arg
>>
8
;
a
ssert
(
arg
<=
0x3fff
);
a
v_assert2
(
arg
<=
0x3fff
);
return
tab_cos
[
ind
]
+
(
offset
*
(
tab_cos
[
ind
+
1
]
-
tab_cos
[
ind
])
>>
8
);
}
...
...
@@ -149,7 +149,7 @@ int ff_exp2(uint16_t power)
{
unsigned
int
result
=
exp2a
[
power
>>
10
]
+
0x10000
;
a
ssert
(
power
<=
0x7fff
);
a
v_assert2
(
power
<=
0x7fff
);
result
=
(
result
<<
3
)
+
((
result
*
exp2b
[(
power
>>
5
)
&
31
])
>>
17
);
return
result
+
((
result
*
(
power
&
31
)
*
89
)
>>
22
);
...
...
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