diff options
Diffstat (limited to 'source/blender/avi/intern')
-rw-r--r-- | source/blender/avi/intern/avirgb.c | 17 | ||||
-rw-r--r-- | source/blender/avi/intern/endian.c | 16 |
2 files changed, 12 insertions, 21 deletions
diff --git a/source/blender/avi/intern/avirgb.c b/source/blender/avi/intern/avirgb.c index b7f6a58b6d7..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" -#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__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/avi/intern/endian.c b/source/blender/avi/intern/endian.c index a985e8c3d5e..50ec2330beb 100644 --- a/source/blender/avi/intern/endian.c +++ b/source/blender/avi/intern/endian.c @@ -43,11 +43,7 @@ #include "endian.h" #include "avi_intern.h" -#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__) -#define WORDS_BIGENDIAN -#endif - -#ifdef WORDS_BIGENDIAN +#ifdef __BIG_ENDIAN__ static void invert (int *num) { int new=0,i,j; @@ -79,7 +75,7 @@ static void Ichunk (AviChunk *chunk) { } #endif -#ifdef WORDS_BIGENDIAN +#ifdef __BIG_ENDIAN__ static void Ilist (AviList *list){ invert (&list->fcc); invert (&list->size); @@ -159,10 +155,10 @@ static void Iindexe (AviIndexEntry *indexe) { invert (&indexe->Offset); invert (&indexe->Size); } -#endif /* WORDS_BIGENDIAN */ +#endif /* __BIG_ENDIAN__ */ void awrite (AviMovie *movie, void *datain, int block, int size, FILE *fp, int type) { -#ifdef WORDS_BIGENDIAN +#ifdef __BIG_ENDIAN__ void *data; data = MEM_mallocN (size, "avi endian"); @@ -209,9 +205,9 @@ void awrite (AviMovie *movie, void *datain, int block, int size, FILE *fp, int t } MEM_freeN (data); -#else /* WORDS_BIGENDIAN */ +#else /* __BIG_ENDIAN__ */ (void)movie; /* unused */ (void)type; /* unused */ fwrite (datain, block, size, fp); -#endif /* WORDS_BIGENDIAN */ +#endif /* __BIG_ENDIAN__ */ } |