[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40342] trunk/blender/source/blender: replace WORDS_BIGENDIAN with __BIG_ENDIAN__
Campbell Barton
ideasman42 at gmail.com
Mon Sep 19 10:11:33 CEST 2011
Revision: 40342
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40342
Author: campbellbarton
Date: 2011-09-19 08:11:30 +0000 (Mon, 19 Sep 2011)
Log Message:
-----------
replace WORDS_BIGENDIAN with __BIG_ENDIAN__
Modified Paths:
--------------
trunk/blender/source/blender/avi/intern/avirgb.c
trunk/blender/source/blender/imbuf/intern/md5.c
Modified: trunk/blender/source/blender/avi/intern/avirgb.c
===================================================================
--- trunk/blender/source/blender/avi/intern/avirgb.c 2011-09-19 08:02:17 UTC (rev 40341)
+++ trunk/blender/source/blender/avi/intern/avirgb.c 2011-09-19 08:11:30 UTC (rev 40342)
@@ -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 @@
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 @@
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;
Modified: trunk/blender/source/blender/imbuf/intern/md5.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/md5.c 2011-09-19 08:02:17 UTC (rev 40341)
+++ trunk/blender/source/blender/imbuf/intern/md5.c 2011-09-19 08:11:30 UTC (rev 40342)
@@ -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
More information about the Bf-blender-cvs
mailing list