Mercurial > libavcodec.hg
changeset 11917:2952baf6a266 libavcodec
Add a macro to pack 4 bytes into native byte-order so they can be written
at once using a single 32-bit store.
author | rbultje |
---|---|
date | Tue, 22 Jun 2010 19:15:27 +0000 |
parents | 73f4fd490f2a |
children | 823f332655e8 |
files | mathops.h |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mathops.h Tue Jun 22 19:12:54 2010 +0000 +++ b/mathops.h Tue Jun 22 19:15:27 2010 +0000 @@ -146,5 +146,13 @@ # define NEG_USR32(a,s) (((uint32_t)(a))>>(32-(s))) #endif +#ifndef PACK4x8 +# if HAVE_BIGENDIAN +# define PACK4x8(a,b,c,d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d)) +# else +# define PACK4x8(a,b,c,d) (((d) << 24) | ((c) << 16) | ((b) << 8) | (a)) +# endif +#endif + #endif /* AVCODEC_MATHOPS_H */