c_unpck32 - Unpack packed 32-bit words containing 3 10-bit words into 16-bit words

SYNTAX

FUNCTION c_unpck32(inbuf, outbuf, nwords, swap)

     unsigned char *inbuf;
     short         *outbuf;
     long          *nwords;
     long          *swap; 

PARAMETERS

inbuf (unsigned char *, input)

A pointer to the 32-bit input buffer containing packed 10-bit data.

outbuf (short *, output)

A series of 10 bit words, each stored right-justified in 16 bits.

nwords (long *, input)

The number of 16-bit words to unpack.

swap (long *, input)

Byte swap flag.

     = TRUE  (1):    The data needs to be byte-swapped.
     = FALSE (0):    The data does not need to be byte-swapped.

DESCRIPTION

The c_unpck32() routine is used to unpack 10-bit data from packed 32-bit words. The input buffer is byte-swapped if swap is TRUE. The input buffer should be in the following format before 10-bit words are extracted:

     Format of input buffer:
     +-----------------------------------------------+
     |00:    Word 1    :    Word 2    :    Word 3    |  1st 32-bit word
     +-----------------------------------------------+
     |00:    Word 4    :    Word 5    :    Word 6    |  2nd 32-bit word
     +-----------------------------------------------+
     etc.
Each 10-bit word is extracted from the 32-bit buffer and placed in its own 16-bit word:

     Format of output buffer:
     +--------------------+
     !000000    Word 1    !  1st 16-bit word
     +--------------------+
     !000000    Word 2    !  2nd 16-bit word
     +--------------------+
     !000000    Word 3    !  3rd 16-bit word
     +--------------------+
     !000000    Word 4    !  4th 16-bit word
     +--------------------+
     !000000    Word 5    !  5th 16-bit word
     +--------------------+
     !000000    Word 6    !  6th 16-bit word
     +--------------------+
     etc.

RETURN VALUE

c_unpck32() has no return value.