Thu Apr 28 2011 17:13:57

Asterisk developer's documentation


msgsm.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define GSM_MAGIC   0xD
#define readGSM_33(c1)
#define writeGSM_33(c1)

Typedefs

typedef unsigned char gsm_byte
typedef unsigned int uword
typedef unsigned char wav_byte

Functions

static void conv65 (wav_byte *c, gsm_byte *d)
static void conv66 (gsm_byte *d, wav_byte *c)

Define Documentation

#define GSM_MAGIC   0xD

Definition at line 3 of file msgsm.h.

#define readGSM_33 (   c1)

Definition at line 11 of file msgsm.h.

Referenced by conv66().

#define writeGSM_33 (   c1)

Definition at line 351 of file msgsm.h.

Referenced by conv65().


Typedef Documentation

typedef unsigned char gsm_byte

Definition at line 6 of file msgsm.h.

typedef unsigned int uword

Definition at line 9 of file msgsm.h.

typedef unsigned char wav_byte

Definition at line 8 of file msgsm.h.


Function Documentation

static void conv65 ( wav_byte c,
gsm_byte d 
) [inline, static]

Definition at line 455 of file msgsm.h.

References writeGSM_33.

Referenced by gsm_write(), gsmtolin_framein(), and wav_read().

                                                      {

                unsigned int sr = 0;
                unsigned int frame_chain;
      unsigned int LARc[8], Nc[4], Mc[4], bc[4], xmaxc[4];
      /* silence bogus compiler warning */
      unsigned int xmc[13*4] = { 0, };
 
                        sr = *c++;
                        LARc[0] = sr & 0x3f;  sr >>= 6;
                        sr |= (uword)*c++ << 2;
                        LARc[1] = sr & 0x3f;  sr >>= 6;
                        sr |= (uword)*c++ << 4;
                        LARc[2] = sr & 0x1f;  sr >>= 5;
                        LARc[3] = sr & 0x1f;  sr >>= 5;
                        sr |= (uword)*c++ << 2;
                        LARc[4] = sr & 0xf;  sr >>= 4;
                        LARc[5] = sr & 0xf;  sr >>= 4;
                        sr |= (uword)*c++ << 2;                 /* 5 */
                        LARc[6] = sr & 0x7;  sr >>= 3;
                        LARc[7] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 4;
                        Nc[0] = sr & 0x7f;  sr >>= 7;
                        bc[0] = sr & 0x3;  sr >>= 2;
                        Mc[0] = sr & 0x3;  sr >>= 2;
                        sr |= (uword)*c++ << 1;
                        xmaxc[0] = sr & 0x3f;  sr >>= 6;
                        xmc[0] = sr & 0x7;  sr >>= 3;
                        sr = *c++;
                        xmc[1] = sr & 0x7;  sr >>= 3;
                        xmc[2] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 2;
                        xmc[3] = sr & 0x7;  sr >>= 3;
                        xmc[4] = sr & 0x7;  sr >>= 3;
                        xmc[5] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 1;                 /* 10 */
                        xmc[6] = sr & 0x7;  sr >>= 3;
                        xmc[7] = sr & 0x7;  sr >>= 3;
                        xmc[8] = sr & 0x7;  sr >>= 3;
                        sr = *c++;
                        xmc[9] = sr & 0x7;  sr >>= 3;
                        xmc[10] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 2;
                        xmc[11] = sr & 0x7;  sr >>= 3;
                        xmc[12] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 4;
                        Nc[1] = sr & 0x7f;  sr >>= 7;
                        bc[1] = sr & 0x3;  sr >>= 2;
                        Mc[1] = sr & 0x3;  sr >>= 2;
                        sr |= (uword)*c++ << 1;
                        xmaxc[1] = sr & 0x3f;  sr >>= 6;
                        xmc[13] = sr & 0x7;  sr >>= 3;
                        sr = *c++;                              /* 15 */
                        xmc[14] = sr & 0x7;  sr >>= 3;
                        xmc[15] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 2;
                        xmc[16] = sr & 0x7;  sr >>= 3;
                        xmc[17] = sr & 0x7;  sr >>= 3;
                        xmc[18] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 1;
                        xmc[19] = sr & 0x7;  sr >>= 3;
                        xmc[20] = sr & 0x7;  sr >>= 3;
                        xmc[21] = sr & 0x7;  sr >>= 3;
                        sr = *c++;
                        xmc[22] = sr & 0x7;  sr >>= 3;
                        xmc[23] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 2;
                        xmc[24] = sr & 0x7;  sr >>= 3;
                        xmc[25] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 4;                 /* 20 */
                        Nc[2] = sr & 0x7f;  sr >>= 7;
                        bc[2] = sr & 0x3;  sr >>= 2;
                        Mc[2] = sr & 0x3;  sr >>= 2;
                        sr |= (uword)*c++ << 1;
                        xmaxc[2] = sr & 0x3f;  sr >>= 6;
                        xmc[26] = sr & 0x7;  sr >>= 3;
                        sr = *c++;
                        xmc[27] = sr & 0x7;  sr >>= 3;
                        xmc[28] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 2;
                        xmc[29] = sr & 0x7;  sr >>= 3;
                        xmc[30] = sr & 0x7;  sr >>= 3;
                        xmc[31] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 1;
                        xmc[32] = sr & 0x7;  sr >>= 3;
                        xmc[33] = sr & 0x7;  sr >>= 3;
                        xmc[34] = sr & 0x7;  sr >>= 3;
                        sr = *c++;                              /* 25 */
                        xmc[35] = sr & 0x7;  sr >>= 3;
                        xmc[36] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 2;
                        xmc[37] = sr & 0x7;  sr >>= 3;
                        xmc[38] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 4;
                        Nc[3] = sr & 0x7f;  sr >>= 7;
                        bc[3] = sr & 0x3;  sr >>= 2;
                        Mc[3] = sr & 0x3;  sr >>= 2;
                        sr |= (uword)*c++ << 1;
                        xmaxc[3] = sr & 0x3f;  sr >>= 6;
                        xmc[39] = sr & 0x7;  sr >>= 3;
                        sr = *c++;
                        xmc[40] = sr & 0x7;  sr >>= 3;
                        xmc[41] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 2;                 /* 30 */
                        xmc[42] = sr & 0x7;  sr >>= 3;
                        xmc[43] = sr & 0x7;  sr >>= 3;
                        xmc[44] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 1;
                        xmc[45] = sr & 0x7;  sr >>= 3;
                        xmc[46] = sr & 0x7;  sr >>= 3;
                        xmc[47] = sr & 0x7;  sr >>= 3;
                        sr = *c++;
                        xmc[49] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 2;
                        xmc[50] = sr & 0x7;  sr >>= 3;
                        xmc[51] = sr & 0x7;  sr >>= 3;

                        frame_chain = sr & 0xf;


                        writeGSM_33(d);/* LARc etc. -> array of 33 GSM bytes */


                        sr = frame_chain;
                        sr |= (uword)*c++ << 4;                 /* 1 */
                        LARc[0] = sr & 0x3f;  sr >>= 6;
                        LARc[1] = sr & 0x3f;  sr >>= 6;
                        sr = *c++;
                        LARc[2] = sr & 0x1f;  sr >>= 5;
                        sr |= (uword)*c++ << 3;
                        LARc[3] = sr & 0x1f;  sr >>= 5;
                        LARc[4] = sr & 0xf;  sr >>= 4;
                        sr |= (uword)*c++ << 2;
                        LARc[5] = sr & 0xf;  sr >>= 4;
                        LARc[6] = sr & 0x7;  sr >>= 3;
                        LARc[7] = sr & 0x7;  sr >>= 3;
                        sr = *c++;                              /* 5 */
                        Nc[0] = sr & 0x7f;  sr >>= 7;
                        sr |= (uword)*c++ << 1;
                        bc[0] = sr & 0x3;  sr >>= 2;
                        Mc[0] = sr & 0x3;  sr >>= 2;
                        sr |= (uword)*c++ << 5;
                        xmaxc[0] = sr & 0x3f;  sr >>= 6;
                        xmc[0] = sr & 0x7;  sr >>= 3;
                        xmc[1] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 1;
                        xmc[2] = sr & 0x7;  sr >>= 3;
                        xmc[3] = sr & 0x7;  sr >>= 3;
                        xmc[4] = sr & 0x7;  sr >>= 3;
                        sr = *c++;
                        xmc[5] = sr & 0x7;  sr >>= 3;
                        xmc[6] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 2;                 /* 10 */
                        xmc[7] = sr & 0x7;  sr >>= 3;
                        xmc[8] = sr & 0x7;  sr >>= 3;
                        xmc[9] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 1;
                        xmc[10] = sr & 0x7;  sr >>= 3;
                        xmc[11] = sr & 0x7;  sr >>= 3;
                        xmc[12] = sr & 0x7;  sr >>= 3;
                        sr = *c++;
                        Nc[1] = sr & 0x7f;  sr >>= 7;
                        sr |= (uword)*c++ << 1;
                        bc[1] = sr & 0x3;  sr >>= 2;
                        Mc[1] = sr & 0x3;  sr >>= 2;
                        sr |= (uword)*c++ << 5;
                        xmaxc[1] = sr & 0x3f;  sr >>= 6;
                        xmc[13] = sr & 0x7;  sr >>= 3;
                        xmc[14] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 1;                 /* 15 */
                        xmc[15] = sr & 0x7;  sr >>= 3;
                        xmc[16] = sr & 0x7;  sr >>= 3;
                        xmc[17] = sr & 0x7;  sr >>= 3;
                        sr = *c++;
                        xmc[18] = sr & 0x7;  sr >>= 3;
                        xmc[19] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 2;
                        xmc[20] = sr & 0x7;  sr >>= 3;
                        xmc[21] = sr & 0x7;  sr >>= 3;
                        xmc[22] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 1;
                        xmc[23] = sr & 0x7;  sr >>= 3;
                        xmc[24] = sr & 0x7;  sr >>= 3;
                        xmc[25] = sr & 0x7;  sr >>= 3;
                        sr = *c++;
                        Nc[2] = sr & 0x7f;  sr >>= 7;
                        sr |= (uword)*c++ << 1;                 /* 20 */
                        bc[2] = sr & 0x3;  sr >>= 2;
                        Mc[2] = sr & 0x3;  sr >>= 2;
                        sr |= (uword)*c++ << 5;
                        xmaxc[2] = sr & 0x3f;  sr >>= 6;
                        xmc[26] = sr & 0x7;  sr >>= 3;
                        xmc[27] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 1;
                        xmc[28] = sr & 0x7;  sr >>= 3;
                        xmc[29] = sr & 0x7;  sr >>= 3;
                        xmc[30] = sr & 0x7;  sr >>= 3;
                        sr = *c++;
                        xmc[31] = sr & 0x7;  sr >>= 3;
                        xmc[32] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 2;
                        xmc[33] = sr & 0x7;  sr >>= 3;
                        xmc[34] = sr & 0x7;  sr >>= 3;
                        xmc[35] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 1;                 /* 25 */
                        xmc[36] = sr & 0x7;  sr >>= 3;
                        xmc[37] = sr & 0x7;  sr >>= 3;
                        xmc[38] = sr & 0x7;  sr >>= 3;
                        sr = *c++;
                        Nc[3] = sr & 0x7f;  sr >>= 7;
                        sr |= (uword)*c++ << 1;
                        bc[3] = sr & 0x3;  sr >>= 2;
                        Mc[3] = sr & 0x3;  sr >>= 2;
                        sr |= (uword)*c++ << 5;
                        xmaxc[3] = sr & 0x3f;  sr >>= 6;
                        xmc[39] = sr & 0x7;  sr >>= 3;
                        xmc[40] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 1;
                        xmc[41] = sr & 0x7;  sr >>= 3;
                        xmc[42] = sr & 0x7;  sr >>= 3;
                        xmc[43] = sr & 0x7;  sr >>= 3;
                        sr = *c++;                              /* 30 */
                        xmc[44] = sr & 0x7;  sr >>= 3;
                        xmc[45] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 2;
                        xmc[46] = sr & 0x7;  sr >>= 3;
                        xmc[47] = sr & 0x7;  sr >>= 3;
                        xmc[48] = sr & 0x7;  sr >>= 3;
                        sr |= (uword)*c++ << 1;
                        xmc[49] = sr & 0x7;  sr >>= 3;
                        xmc[50] = sr & 0x7;  sr >>= 3;
                        xmc[51] = sr & 0x7;  sr >>= 3;
                        writeGSM_33(d+33);

}
static void conv66 ( gsm_byte d,
wav_byte c 
) [inline, static]

Definition at line 114 of file msgsm.h.

References readGSM_33.

Referenced by wav_write().

                                                      {
   gsm_byte frame_chain;
    unsigned int sr;
   unsigned int    LARc[8], Nc[4], Mc[4], bc[4], xmaxc[4], xmc[13*4];
   
   readGSM_33(d);
   sr = 0;
   sr = (sr >> 6) | (LARc[0] << 10);
   sr = (sr >> 6) | (LARc[1] << 10);
   *c++ = sr >> 4;
   sr = (sr >> 5) | (LARc[2] << 11);
   *c++ = sr >> 7;
   sr = (sr >> 5) | (LARc[3] << 11);
   sr = (sr >> 4) | (LARc[4] << 12);
   *c++ = sr >> 6;
   sr = (sr >> 4) | (LARc[5] << 12);
   sr = (sr >> 3) | (LARc[6] << 13);
   *c++ = sr >> 7;
   sr = (sr >> 3) | (LARc[7] << 13);
   sr = (sr >> 7) | (Nc[0] << 9);
   *c++ = sr >> 5;
   sr = (sr >> 2) | (bc[0] << 14);
   sr = (sr >> 2) | (Mc[0] << 14);
   sr = (sr >> 6) | (xmaxc[0] << 10);
   *c++ = sr >> 3;
   sr = (sr >> 3 )|( xmc[0] << 13);
   *c++ = sr >> 8;
   sr = (sr >> 3 )|( xmc[1] << 13);
   sr = (sr >> 3 )|( xmc[2] << 13);
    sr = (sr >> 3 )|( xmc[3] << 13);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[4] << 13);
    sr = (sr >> 3 )|( xmc[5] << 13);
    sr = (sr >> 3 )|( xmc[6] << 13);
    *c++ = sr >> 6;
    sr = (sr >> 3 )|( xmc[7] << 13);
    sr = (sr >> 3 )|( xmc[8] << 13);
    *c++ = sr >> 8;
    sr = (sr >> 3 )|( xmc[9] << 13);
    sr = (sr >> 3 )|( xmc[10] << 13);
    sr = (sr >> 3 )|( xmc[11] << 13);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[12] << 13);
    sr = (sr >> 7 )|( Nc[1] << 9);
    *c++ = sr >> 5;
    sr = (sr >> 2 )|( bc[1] << 14);
    sr = (sr >> 2 )|( Mc[1] << 14);
    sr = (sr >> 6 )|( xmaxc[1] << 10);
    *c++ = sr >> 3;
    sr = (sr >> 3 )|( xmc[13] << 13);
    *c++ = sr >> 8;
    sr = (sr >> 3 )|( xmc[14] << 13);
    sr = (sr >> 3 )|( xmc[15] << 13);
    sr = (sr >> 3 )|( xmc[16] << 13);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[17] << 13);
    sr = (sr >> 3 )|( xmc[18] << 13);
    sr = (sr >> 3 )|( xmc[19] << 13);
    *c++ = sr >> 6;
    sr = (sr >> 3 )|( xmc[20] << 13);
    sr = (sr >> 3 )|( xmc[21] << 13);
    *c++ = sr >> 8;
    sr = (sr >> 3 )|( xmc[22] << 13);
    sr = (sr >> 3 )|( xmc[23] << 13);
    sr = (sr >> 3 )|( xmc[24] << 13);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[25] << 13);
    sr = (sr >> 7 )|( Nc[2] << 9);
    *c++ = sr >> 5;
    sr = (sr >> 2 )|( bc[2] << 14);
    sr = (sr >> 2 )|( Mc[2] << 14);
    sr = (sr >> 6 )|( xmaxc[2] << 10);
    *c++ = sr >> 3;
    sr = (sr >> 3 )|( xmc[26] << 13);
    *c++ = sr >> 8;
    sr = (sr >> 3 )|( xmc[27] << 13);
    sr = (sr >> 3 )|( xmc[28] << 13);
    sr = (sr >> 3 )|( xmc[29] << 13);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[30] << 13);
    sr = (sr >> 3 )|( xmc[31] << 13);
    sr = (sr >> 3 )|( xmc[32] << 13);
    *c++ = sr >> 6;
    sr = (sr >> 3 )|( xmc[33] << 13);
    sr = (sr >> 3 )|( xmc[34] << 13);
    *c++ = sr >> 8;
    sr = (sr >> 3 )|( xmc[35] << 13);
    sr = (sr >> 3 )|( xmc[36] << 13);
    sr = (sr >> 3 )|( xmc[37] << 13);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[38] << 13);
    sr = (sr >> 7 )|( Nc[3] << 9);
    *c++ = sr >> 5;
    sr = (sr >> 2 )|( bc[3] << 14);
    sr = (sr >> 2 )|( Mc[3] << 14);
    sr = (sr >> 6 )|( xmaxc[3] << 10);
    *c++ = sr >> 3;
    sr = (sr >> 3 )|( xmc[39] << 13);
    *c++ = sr >> 8;
    sr = (sr >> 3 )|( xmc[40] << 13);
    sr = (sr >> 3 )|( xmc[41] << 13);
    sr = (sr >> 3 )|( xmc[42] << 13);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[43] << 13);
    sr = (sr >> 3 )|( xmc[44] << 13);
    sr = (sr >> 3 )|( xmc[45] << 13);
    *c++ = sr >> 6;
    sr = (sr >> 3 )|( xmc[46] << 13);
    sr = (sr >> 3 )|( xmc[47] << 13);
    *c++ = sr >> 8;
    sr = (sr >> 3 )|( xmc[48] << 13);
    sr = (sr >> 3 )|( xmc[49] << 13);
    sr = (sr >> 3 )|( xmc[50] << 13);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[51] << 13);
    sr = sr >> 4;
    *c = sr >> 8;
    frame_chain = *c;
    readGSM_33(d+33); /* puts all the parameters into LARc etc. */


    sr = 0;
/*                       sr = (sr >> 4 )|( s->frame_chain << 12); */
    sr = (sr >> 4 )|( frame_chain << 12);

    sr = (sr >> 6 )|( LARc[0] << 10);
    *c++ = sr >> 6;
    sr = (sr >> 6 )|( LARc[1] << 10);
    *c++ = sr >> 8;
    sr = (sr >> 5 )|( LARc[2] << 11);
    sr = (sr >> 5 )|( LARc[3] << 11);
    *c++ = sr >> 6;
    sr = (sr >> 4 )|( LARc[4] << 12);
    sr = (sr >> 4 )|( LARc[5] << 12);
    *c++ = sr >> 6;
    sr = (sr >> 3 )|( LARc[6] << 13);
    sr = (sr >> 3 )|( LARc[7] << 13);
    *c++ = sr >> 8;
    sr = (sr >> 7 )|( Nc[0] << 9);
    sr = (sr >> 2 )|( bc[0] << 14);
    *c++ = sr >> 7;
    sr = (sr >> 2 )|( Mc[0] << 14);
    sr = (sr >> 6 )|( xmaxc[0] << 10);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[0] << 13);
    sr = (sr >> 3 )|( xmc[1] << 13);
    sr = (sr >> 3 )|( xmc[2] << 13);
    *c++ = sr >> 6;
    sr = (sr >> 3 )|( xmc[3] << 13);
    sr = (sr >> 3 )|( xmc[4] << 13);
    *c++ = sr >> 8;
    sr = (sr >> 3 )|( xmc[5] << 13);
    sr = (sr >> 3 )|( xmc[6] << 13);
    sr = (sr >> 3 )|( xmc[7] << 13);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[8] << 13);
    sr = (sr >> 3 )|( xmc[9] << 13);
    sr = (sr >> 3 )|( xmc[10] << 13);
    *c++ = sr >> 6;
    sr = (sr >> 3 )|( xmc[11] << 13);
    sr = (sr >> 3 )|( xmc[12] << 13);
    *c++ = sr >> 8;
    sr = (sr >> 7 )|( Nc[1] << 9);
    sr = (sr >> 2 )|( bc[1] << 14);
    *c++ = sr >> 7;
    sr = (sr >> 2 )|( Mc[1] << 14);
    sr = (sr >> 6 )|( xmaxc[1] << 10);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[13] << 13);
    sr = (sr >> 3 )|( xmc[14] << 13);
    sr = (sr >> 3 )|( xmc[15] << 13);
    *c++ = sr >> 6;
    sr = (sr >> 3 )|( xmc[16] << 13);
    sr = (sr >> 3 )|( xmc[17] << 13);
    *c++ = sr >> 8;
    sr = (sr >> 3 )|( xmc[18] << 13);
    sr = (sr >> 3 )|( xmc[19] << 13);
    sr = (sr >> 3 )|( xmc[20] << 13);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[21] << 13);
    sr = (sr >> 3 )|( xmc[22] << 13);
    sr = (sr >> 3 )|( xmc[23] << 13);
    *c++ = sr >> 6;
    sr = (sr >> 3 )|( xmc[24] << 13);
    sr = (sr >> 3 )|( xmc[25] << 13);
    *c++ = sr >> 8;
    sr = (sr >> 7 )|( Nc[2] << 9);
    sr = (sr >> 2 )|( bc[2] << 14);
    *c++ = sr >> 7;
    sr = (sr >> 2 )|( Mc[2] << 14);
    sr = (sr >> 6 )|( xmaxc[2] << 10);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[26] << 13);
    sr = (sr >> 3 )|( xmc[27] << 13);
    sr = (sr >> 3 )|( xmc[28] << 13);
    *c++ = sr >> 6;
    sr = (sr >> 3 )|( xmc[29] << 13);
    sr = (sr >> 3 )|( xmc[30] << 13);
    *c++ = sr >> 8;
    sr = (sr >> 3 )|( xmc[31] << 13);
    sr = (sr >> 3 )|( xmc[32] << 13);
    sr = (sr >> 3 )|( xmc[33] << 13);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[34] << 13);
    sr = (sr >> 3 )|( xmc[35] << 13);
    sr = (sr >> 3 )|( xmc[36] << 13);
    *c++ = sr >> 6;
    sr = (sr >> 3 )|( xmc[37] << 13);
    sr = (sr >> 3 )|( xmc[38] << 13);
    *c++ = sr >> 8;
    sr = (sr >> 7 )|( Nc[3] << 9);
    sr = (sr >> 2 )|( bc[3] << 14);
    *c++ = sr >> 7;
    sr = (sr >> 2 )|( Mc[3] << 14);
    sr = (sr >> 6 )|( xmaxc[3] << 10);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[39] << 13);
    sr = (sr >> 3 )|( xmc[40] << 13);
    sr = (sr >> 3 )|( xmc[41] << 13);
    *c++ = sr >> 6;
    sr = (sr >> 3 )|( xmc[42] << 13);
    sr = (sr >> 3 )|( xmc[43] << 13);
    *c++ = sr >> 8;
    sr = (sr >> 3 )|( xmc[44] << 13);
    sr = (sr >> 3 )|( xmc[45] << 13);
    sr = (sr >> 3 )|( xmc[46] << 13);
    *c++ = sr >> 7;
    sr = (sr >> 3 )|( xmc[47] << 13);
    sr = (sr >> 3 )|( xmc[48] << 13);
    sr = (sr >> 3 )|( xmc[49] << 13);
    *c++ = sr >> 6;
    sr = (sr >> 3 )|( xmc[50] << 13);
    sr = (sr >> 3 )|( xmc[51] << 13);
    *c++ = sr >> 8;

}