Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

byteorder.h File Reference

#include <sys/types.h>

Go to the source code of this file.

Defines

#define SWAP_ITERATE
#define SWAP_24BIT_ITERATE
#define SWAP_32BIT_ITERATE

Functions

int get_byte_order ()
int swap_bytes (int wordsize, unsigned char *buffer, long len)


Define Documentation

#define SWAP_24BIT_ITERATE
 

Value:

byte1 = buffer1[i]; \
                                byte2 = buffer2[i]; \
                                byte3 = buffer3[i]; \
                                buffer1[i] = byte3; \
                                buffer2[i] = byte2; \
                                buffer3[i] = byte1; \
                                i += 3;

Definition at line 18 of file byteorder.h.

Referenced by swap_bytes().

#define SWAP_32BIT_ITERATE
 

Value:

byte1 = buffer1[i]; \
                                byte2 = buffer2[i]; \
                                byte3 = buffer3[i]; \
                                byte4 = buffer4[i]; \
                                buffer1[i] = byte4; \
                                buffer2[i] = byte1; \
                                buffer3[i] = byte2; \
                                buffer4[i] = byte3; \
                                i += 4;

Definition at line 27 of file byteorder.h.

Referenced by swap_bytes().

#define SWAP_ITERATE
 

Value:

byte1 = buffer1[i]; \
                                byte2 = buffer2[i]; \
                                buffer1[i] = byte2; \
                                buffer2[i] = byte1; \
                                        i += 2;

Definition at line 11 of file byteorder.h.

Referenced by swap_bytes().


Function Documentation

int get_byte_order  )  [inline]
 

Definition at line 6 of file byteorder.h.

Referenced by FileBase::FileBase(), and FileBase::samples_to_raw().

int swap_bytes int  wordsize,
unsigned char *  buffer,
long  len
[inline]
 

Definition at line 38 of file byteorder.h.

References SWAP_24BIT_ITERATE, SWAP_32BIT_ITERATE, and SWAP_ITERATE.

Referenced by FileBase::samples_to_raw().


Generated on Sun Jan 8 13:39:03 2006 for Cinelerra-svn by  doxygen 1.4.4