Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
9ae53c58
Commit
9ae53c58
authored
Sep 16, 2013
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: add ff_u8_to_s8() for safe type punning of uint8_t to int8_t
parent
5626f994
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
mathops.h
libavcodec/mathops.h
+10
-0
No files found.
libavcodec/mathops.h
View file @
9ae53c58
...
@@ -224,4 +224,14 @@ static inline av_const unsigned int ff_sqrt(unsigned int a)
...
@@ -224,4 +224,14 @@ static inline av_const unsigned int ff_sqrt(unsigned int a)
return
b
-
(
a
<
b
*
b
);
return
b
-
(
a
<
b
*
b
);
}
}
static
inline
int8_t
ff_u8_to_s8
(
uint8_t
a
)
{
union
{
uint8_t
u8
;
int8_t
s8
;
}
b
;
b
.
u8
=
a
;
return
b
.
s8
;
}
#endif
/* AVCODEC_MATHOPS_H */
#endif
/* AVCODEC_MATHOPS_H */
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