Merge and split


Functions

void merge_channels (unsigned char *channel_A, unsigned char *channel_B, unsigned char *channel_AB, int len_A, int len_B)
void split_channels (unsigned char *channel_AB, unsigned char *channel_A, unsigned char *channel_B, int len_AB, int len_A, int len_B, int *real_len_A, int *real_len_B)

Detailed Description


Function Documentation

void merge_channels ( unsigned char *  channel_A,
unsigned char *  channel_B,
unsigned char *  channel_AB,
int  len_A,
int  len_B 
)

Merge two channels

This function merges channel_A with channel_B. Result is stored in the channel_AB. Note that on return, combined channel_AB can be further merged with another channel.

Parameters:
channel_A Channel A
channel_B Channel B
channel_AB Combined channel AB
len_A Length of the channel_A
len_B Length of the channel_B
Note:
The caller should allocate at least len_A + len_B bytes for the channel_AB array.
Returns:
VOID

References MIN.

Referenced by eps_encode_truecolor_block().

void split_channels ( unsigned char *  channel_AB,
unsigned char *  channel_A,
unsigned char *  channel_B,
int  len_AB,
int  len_A,
int  len_B,
int *  real_len_A,
int *  real_len_B 
)

Split combined channel

This function splits combined channel_AB into the channel_A and channel_B. It is important to note that channel_AB can be truncated at any position beforehand. In this case channel_A and channel_B will contain only part of original data. Real amount of saved bytes will be stored in the real_len_A and real_len_B respectively.

Parameters:
channel_AB Combined channel AB
channel_A Channel A
channel_B Channel B
len_AB Current length of the channel_AB
len_A Original length of the channel_A
len_B Original length of the channel_B
real_len_A Number of bytes actually used in the channel_A
real_len_B Number of bytes actually used in the channel_B
Note:
The caller should allocate at least len_AB bytes for channel_A and channel_B arrays.
Returns:
VOID

References MIN.

Referenced by eps_decode_truecolor_block().


Generated on Fri May 27 14:50:00 2011 for EPSILON by  doxygen 1.5.6