This website works better with JavaScript.
Home
Help
Sign In
falkTX
/
FFmpeg
mirror of
https://github.com/falkTX/FFmpeg.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
338
Wiki
Activity
Browse Source
lavc: add ff_u8_to_s8() for safe type punning of uint8_t to int8_t
tags/n2.1
Justin Ruggles
12 years ago
parent
5626f994f2
commit
9ae53c5860
1 changed files
with
10 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+10
-0
libavcodec/mathops.h
+ 10
- 0
libavcodec/mathops.h
View File
@@ -224,4 +224,14 @@ static inline av_const unsigned int ff_sqrt(unsigned int a)
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 */
Write
Preview
Loading…
Cancel
Save