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
f79f25e9
Commit
f79f25e9
authored
Aug 08, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
integer: switch to av_assert
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ae199ab4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
integer.c
libavutil/integer.c
+11
-13
No files found.
libavutil/integer.c
View file @
f79f25e9
...
@@ -158,8 +158,6 @@ int64_t av_i2int(AVInteger a){
...
@@ -158,8 +158,6 @@ int64_t av_i2int(AVInteger a){
}
}
#ifdef TEST
#ifdef TEST
#undef NDEBUG
#include <assert.h>
const
uint8_t
ff_log2_tab
[
256
]
=
{
const
uint8_t
ff_log2_tab
[
256
]
=
{
0
,
0
,
1
,
1
,
2
,
2
,
2
,
2
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
0
,
0
,
1
,
1
,
2
,
2
,
2
,
2
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
3
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
4
,
...
@@ -180,17 +178,17 @@ int main(void){
...
@@ -180,17 +178,17 @@ int main(void){
AVInteger
ai
=
av_int2i
(
a
);
AVInteger
ai
=
av_int2i
(
a
);
AVInteger
bi
=
av_int2i
(
b
);
AVInteger
bi
=
av_int2i
(
b
);
a
ssert
(
av_i2int
(
ai
)
==
a
);
a
v_assert0
(
av_i2int
(
ai
)
==
a
);
a
ssert
(
av_i2int
(
bi
)
==
b
);
a
v_assert0
(
av_i2int
(
bi
)
==
b
);
a
ssert
(
av_i2int
(
av_add_i
(
ai
,
bi
))
==
a
+
b
);
a
v_assert0
(
av_i2int
(
av_add_i
(
ai
,
bi
))
==
a
+
b
);
a
ssert
(
av_i2int
(
av_sub_i
(
ai
,
bi
))
==
a
-
b
);
a
v_assert0
(
av_i2int
(
av_sub_i
(
ai
,
bi
))
==
a
-
b
);
a
ssert
(
av_i2int
(
av_mul_i
(
ai
,
bi
))
==
a
*
b
);
a
v_assert0
(
av_i2int
(
av_mul_i
(
ai
,
bi
))
==
a
*
b
);
a
ssert
(
av_i2int
(
av_shr_i
(
ai
,
9
))
==
a
>>
9
);
a
v_assert0
(
av_i2int
(
av_shr_i
(
ai
,
9
))
==
a
>>
9
);
a
ssert
(
av_i2int
(
av_shr_i
(
ai
,
-
9
))
==
a
<<
9
);
a
v_assert0
(
av_i2int
(
av_shr_i
(
ai
,
-
9
))
==
a
<<
9
);
a
ssert
(
av_i2int
(
av_shr_i
(
ai
,
17
))
==
a
>>
17
);
a
v_assert0
(
av_i2int
(
av_shr_i
(
ai
,
17
))
==
a
>>
17
);
a
ssert
(
av_i2int
(
av_shr_i
(
ai
,
-
17
))
==
a
<<
17
);
a
v_assert0
(
av_i2int
(
av_shr_i
(
ai
,
-
17
))
==
a
<<
17
);
a
ssert
(
av_log2_i
(
ai
)
==
av_log2
(
a
));
a
v_assert0
(
av_log2_i
(
ai
)
==
av_log2
(
a
));
a
ssert
(
av_i2int
(
av_div_i
(
ai
,
bi
))
==
a
/
b
);
a
v_assert0
(
av_i2int
(
av_div_i
(
ai
,
bi
))
==
a
/
b
);
}
}
}
}
return
0
;
return
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