Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Finished 32 bit sample to unsigned 32 bit sample. */
- #define CONV_SU32(s) \
- ( (s >= 0) \
- ? ((uint32_t)s + (uint32_t)2147483648UL) \
- : ((s == (int32_t)-2147483648UL) \
- ? 0 /* Separate because negation would overflow. */ \
- : (uint32_t)2147483648UL - (uint32_t)(-s) ) \
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement