Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-19 12:11:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-19 12:11:30 +0400
commit4e9ab6d04c4ae6306be77cccbb403804ec8d9108 (patch)
tree1942746e37d9a571f05f2f6da5069430678f052d /source
parent83a2f02a78cd01aaf31b9b4ae8a217a1ecea6a49 (diff)
replace WORDS_BIGENDIAN with __BIG_ENDIAN__
Diffstat (limited to 'source')
-rw-r--r--source/blender/avi/intern/avirgb.c17
-rw-r--r--source/blender/imbuf/intern/md5.c6
2 files changed, 9 insertions, 14 deletions
diff --git a/source/blender/avi/intern/avirgb.c b/source/blender/avi/intern/avirgb.c
index 9e40b00adfc..7050aec9bf6 100644
--- a/source/blender/avi/intern/avirgb.c
+++ b/source/blender/avi/intern/avirgb.c
@@ -42,11 +42,6 @@
#include "MEM_guardedalloc.h"
#include "avirgb.h"
-#ifdef __BIG_ENDIAN__
-# define WORDS_BIGENDIAN
-#endif
-
-
/* implementation */
void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *buffer, int *size) {
@@ -63,9 +58,9 @@ void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *bu
if (bits==16) {
unsigned short *pxl;
unsigned char *to;
- #ifdef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
unsigned char *pxla;
- #endif
+#endif
buf = MEM_mallocN (movie->header->Height * movie->header->Width * 3, "fromavirgbbuf");
@@ -75,19 +70,19 @@ void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *bu
while (y--) {
pxl= (unsigned short *) (buffer + y * movie->header->Width * 2);
- #ifdef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
pxla= (unsigned char *)pxl;
- #endif
+#endif
x= movie->header->Width;
while (x--) {
- #ifdef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
i= pxla[0];
pxla[0]= pxla[1];
pxla[1]= i;
pxla+=2;
- #endif
+#endif
*(to++)= ((*pxl>>10)&0x1f)*8;
*(to++)= ((*pxl>>5)&0x1f)*8;
diff --git a/source/blender/imbuf/intern/md5.c b/source/blender/imbuf/intern/md5.c
index 18148143eb9..2192fa32f19 100644
--- a/source/blender/imbuf/intern/md5.c
+++ b/source/blender/imbuf/intern/md5.c
@@ -28,11 +28,11 @@
#include "md5.h"
-#ifdef WORDS_BIGENDIAN
-# define SWAP(n) \
+#ifdef __BIG_ENDIAN__
+# define SWAP(n) \
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
#else
-# define SWAP(n) (n)
+# define SWAP(n) (n)
#endif