comparison avcodec.h @ 4263:e10af5bd6ff2 libavcodec

Move BE_*/LE_*/ST*/LD* macros to a common place. Some further optimization/cleanup would be desirable (e.g. LE_* and LD* should be the same on x86).
author reimar
date Sun, 03 Dec 2006 16:35:30 +0000
parents daaebca81d86
children 73abe5df48ea
comparison
equal deleted inserted replaced
4262:cdcfabd40101 4263:e10af5bd6ff2
2682 int pix_fmt, int top_band, int left_band); 2682 int pix_fmt, int top_band, int left_band);
2683 2683
2684 int img_pad(AVPicture *dst, const AVPicture *src, int height, int width, int pix_fmt, 2684 int img_pad(AVPicture *dst, const AVPicture *src, int height, int width, int pix_fmt,
2685 int padtop, int padbottom, int padleft, int padright, int *color); 2685 int padtop, int padbottom, int padleft, int padright, int *color);
2686 2686
2687 /* endian macros */
2688 #if !defined(BE_16) || !defined(BE_32) || !defined(LE_16) || !defined(LE_32)
2689 #define BE_16(x) ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1])
2690 #define BE_32(x) ((((uint8_t*)(x))[0] << 24) | \
2691 (((uint8_t*)(x))[1] << 16) | \
2692 (((uint8_t*)(x))[2] << 8) | \
2693 ((uint8_t*)(x))[3])
2694 #define LE_16(x) ((((uint8_t*)(x))[1] << 8) | ((uint8_t*)(x))[0])
2695 #define LE_32(x) ((((uint8_t*)(x))[3] << 24) | \
2696 (((uint8_t*)(x))[2] << 16) | \
2697 (((uint8_t*)(x))[1] << 8) | \
2698 ((uint8_t*)(x))[0])
2699 #endif
2700
2701 extern unsigned int av_xiphlacing(unsigned char *s, unsigned int v); 2687 extern unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
2702 2688
2703 #ifdef __cplusplus 2689 #ifdef __cplusplus
2704 } 2690 }
2705 #endif 2691 #endif