unpack3 (const unsigned char b[3], unsigned short s[16])
{
    //
    // Unpack a 3-byte block into 4 by 4 identical 16-bit pixels.
    //

    #if defined (DEBUG)
	assert (b[2] == 0xfc);
    #endif

    s[0] = (b[0] << 8) | b[1];

    if (s[0] & 0x8000)
	s[0] &= 0x7fff;
    else
	s[0] = ~s[0];

    for (int i = 1; i < 16; ++i)
	s[i] = s[0];
}
unpack3 (const unsigned char b[3], unsigned short s[16])
{
     
     
     

    #if defined (DEBUG)
	assert (b[2] == 0xfc);
    #endif

    s[0] = (b[0] << 8) | b[1];

    if (s[0] & 0x8000)
	s[0] &= 0x7fff;
    else
	s[0] = ~s[0];

    for (int i = 1; i < 16; ++i)
	s[i] = s[0];
}