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
767aeb11
Commit
767aeb11
authored
Jul 03, 2006
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify
Originally committed as revision 5597 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
5351c29c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
intfloat_readwrite.c
libavutil/intfloat_readwrite.c
+4
-7
No files found.
libavutil/intfloat_readwrite.c
View file @
767aeb11
...
...
@@ -43,7 +43,7 @@ double av_ext2dbl(const AVExtFloat ext){
int
e
,
i
;
for
(
i
=
0
;
i
<
8
;
i
++
)
m
|=
(
uint64_t
)
ext
.
mantissa
[
i
]
<<
(
56
-
(
i
<<
3
))
;
m
=
(
m
<<
8
)
+
ext
.
mantissa
[
i
]
;
e
=
(((
int
)
ext
.
exponent
[
0
]
&
0x7f
)
<<
8
)
|
ext
.
exponent
[
1
];
if
(
e
==
0x7fff
&&
m
)
return
0
.
0
/
0
.
0
;
...
...
@@ -51,7 +51,7 @@ double av_ext2dbl(const AVExtFloat ext){
* mantissa bit is written as opposed to the
* single and double precision formats */
if
(
ext
.
exponent
[
0
]
&
0x80
)
return
ldexp
(
-
m
,
e
)
;
m
=
-
m
;
return
ldexp
(
m
,
e
);
}
...
...
@@ -72,7 +72,7 @@ int32_t av_flt2int(float d){
}
AVExtFloat
av_dbl2ext
(
double
d
){
struct
AVExtFloat
ext
;
struct
AVExtFloat
ext
=
{{
0
}}
;
int
e
,
i
;
double
f
;
uint64_t
m
;
f
=
fabs
(
frexp
(
d
,
&
e
));
...
...
@@ -83,11 +83,8 @@ AVExtFloat av_dbl2ext(double d){
m
=
(
uint64_t
)
ldexp
(
f
,
64
);
for
(
i
=
0
;
i
<
8
;
i
++
)
ext
.
mantissa
[
i
]
=
m
>>
(
56
-
(
i
<<
3
));
}
else
if
(
f
==
0
.
0
)
{
memset
(
&
ext
,
0
,
10
);
}
else
{
}
else
if
(
f
!=
0
.
0
)
{
ext
.
exponent
[
0
]
=
0x7f
;
ext
.
exponent
[
1
]
=
0xff
;
memset
(
&
ext
.
mantissa
,
0
,
8
);
if
(
f
!=
1
/
0
.
0
)
ext
.
mantissa
[
0
]
=
~
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