Index: branches/zorg/include/mpcdec/decoder.h
===================================================================
--- branches/zorg/include/mpcdec/decoder.h	(revision 17)
+++ branches/zorg/include/mpcdec/decoder.h	(revision 18)
@@ -52,6 +52,6 @@
 
 typedef struct {
-    mpc_int32_t  L [36];
-    mpc_int32_t  R [36];
+    mpc_int16_t  L [36];
+    mpc_int16_t  R [36];
 } QuantTyp;
 
@@ -91,18 +91,20 @@
     mpc_uint32_t  __r2; 
 
-    mpc_int32_t   SCF_Index_L [32] [3];
-    mpc_int32_t   SCF_Index_R [32] [3];       // holds scalefactor-indices
+    mpc_int8_t    SCF_Index_L [32] [3];
+    mpc_int8_t    SCF_Index_R [32] [3];       // holds scalefactor-indices
     QuantTyp      Q [32];                     // holds quantized samples
-    mpc_int32_t   Res_L [32];
-    mpc_int32_t   Res_R [32];                 // holds the chosen quantizer for each subband
+    mpc_int8_t    Res_L [32];
+    mpc_int8_t    Res_R [32];                 // holds the chosen quantizer for each subband
+#ifdef MPC_SUPPORT_SV456
     mpc_bool_t    DSCF_Flag_L [32];
     mpc_bool_t    DSCF_Flag_R [32];           // differential SCF used?
-    mpc_int32_t   SCFI_L [32];
-    mpc_int32_t   SCFI_R [32];                // describes order of transmitted SCF
-    mpc_int32_t   DSCF_Reference_L [32];
-    mpc_int32_t   DSCF_Reference_R [32];      // holds last frames SCF
+#endif
+    mpc_int8_t    SCFI_L [32];
+    mpc_int8_t    SCFI_R [32];                // describes order of transmitted SCF
+    //mpc_int32_t   DSCF_Reference_L [32];
+    //mpc_int32_t   DSCF_Reference_R [32];      // holds last frames SCF
     mpc_bool_t    MS_Flag[32];                // MS used?
 #ifdef MPC_FIXED_POINT
-    unsigned char SCF_shift[256];
+    mpc_uint8_t   SCF_shift[256];
 #endif
 
Index: branches/zorg/src/idtag.c
===================================================================
--- branches/zorg/src/idtag.c	(revision 17)
+++ branches/zorg/src/idtag.c	(revision 18)
@@ -42,5 +42,5 @@
 mpc_int32_t
 JumpID3v2 (mpc_reader* r) {
-    unsigned char  tmp [10];
+    mpc_uint8_t    tmp [10];
     mpc_uint32_t   Unsynchronisation;   // ID3v2.4-flag
     mpc_uint32_t   ExtHeaderPresent;    // ID3v2.4-flag
Index: branches/zorg/src/mpc_decoder.c
===================================================================
--- branches/zorg/src/mpc_decoder.c	(revision 17)
+++ branches/zorg/src/mpc_decoder.c	(revision 18)
@@ -169,5 +169,5 @@
 mpc_decoder_scfi_bundle_read(
     mpc_decoder *d,
-    const HuffmanTyp* Table, mpc_int32_t* SCFI, mpc_bool_t* DSCF) 
+    const HuffmanTyp* Table, mpc_int8_t* SCFI, mpc_bool_t* DSCF) 
 {
     // load preview and decode
@@ -300,8 +300,10 @@
     memset(d->SCFI_L          , 0, sizeof d->SCFI_L           );
     memset(d->SCFI_R          , 0, sizeof d->SCFI_R           );
+#ifdef MPC_SUPPORT_SV456
     memset(d->DSCF_Flag_L     , 0, sizeof d->DSCF_Flag_L      );
     memset(d->DSCF_Flag_R     , 0, sizeof d->DSCF_Flag_R      );
-    memset(d->DSCF_Reference_L, 0, sizeof d->DSCF_Reference_L );
-    memset(d->DSCF_Reference_R, 0, sizeof d->DSCF_Reference_R );
+#endif
+    //memset(d->DSCF_Reference_L, 0, sizeof d->DSCF_Reference_L );
+    //memset(d->DSCF_Reference_R, 0, sizeof d->DSCF_Reference_R );
     memset(d->Q               , 0, sizeof d->Q                );
     memset(d->MS_Flag         , 0, sizeof d->MS_Flag          );
@@ -489,6 +491,6 @@
     MPC_SAMPLE_FORMAT* YL;
     MPC_SAMPLE_FORMAT* YR;
-    mpc_int32_t*    L;
-    mpc_int32_t*    R;
+    mpc_int16_t*    L;
+    mpc_int16_t*    R;
 
 #ifdef MPC_FIXED_POINT
@@ -515,18 +517,18 @@
             if ( d->Res_L [Band] ) {
                 if ( d->Res_R [Band] ) {    // M!=0, S!=0
-                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , (unsigned char)d->SCF_Index_L[Band][0]);
-                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , (unsigned char)d->SCF_Index_R[Band][0]);
+                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , d->SCF_Index_L[Band][0]);
+                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , d->SCF_Index_R[Band][0]);
                     for ( n = 0; n < 12; n++, YL += 32, YR += 32 ) {
                         *YL   = (templ = MPC_MULTIPLY_FLOAT_INT(facL,*L++))+(tempr = MPC_MULTIPLY_FLOAT_INT(facR,*R++));
                         *YR   = templ - tempr;
                     }
-                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , (unsigned char)d->SCF_Index_L[Band][1]);
-                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , (unsigned char)d->SCF_Index_R[Band][1]);
+                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , d->SCF_Index_L[Band][1]);
+                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , d->SCF_Index_R[Band][1]);
                     for ( ; n < 24; n++, YL += 32, YR += 32 ) {
                         *YL   = (templ = MPC_MULTIPLY_FLOAT_INT(facL,*L++))+(tempr = MPC_MULTIPLY_FLOAT_INT(facR,*R++));
                         *YR   = templ - tempr;
                     }
-                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , (unsigned char)d->SCF_Index_L[Band][2]);
-                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , (unsigned char)d->SCF_Index_R[Band][2]);
+                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , d->SCF_Index_L[Band][2]);
+                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , d->SCF_Index_R[Band][2]);
                     for ( ; n < 36; n++, YL += 32, YR += 32 ) {
                         *YL   = (templ = MPC_MULTIPLY_FLOAT_INT(facL,*L++))+(tempr = MPC_MULTIPLY_FLOAT_INT(facR,*R++));
@@ -534,13 +536,13 @@
                     }
                 } else {    // M!=0, S==0
-                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , (unsigned char)d->SCF_Index_L[Band][0]);
+                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , d->SCF_Index_L[Band][0]);
                     for ( n = 0; n < 12; n++, YL += 32, YR += 32 ) {
                         *YR = *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
                     }
-                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , (unsigned char)d->SCF_Index_L[Band][1]);
+                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , d->SCF_Index_L[Band][1]);
                     for ( ; n < 24; n++, YL += 32, YR += 32 ) {
                         *YR = *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
                     }
-                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , (unsigned char)d->SCF_Index_L[Band][2]);
+                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , d->SCF_Index_L[Band][2]);
                     for ( ; n < 36; n++, YL += 32, YR += 32 ) {
                         *YR = *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
@@ -550,13 +552,13 @@
                 if (d->Res_R[Band])    // M==0, S!=0
                 {
-                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , (unsigned char)d->SCF_Index_R[Band][0]);
+                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , d->SCF_Index_R[Band][0]);
                     for ( n = 0; n < 12; n++, YL += 32, YR += 32 ) {
                         *YR = - (*YL = MPC_MULTIPLY_FLOAT_INT(facR,*(R++)));
                     }
-                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , (unsigned char)d->SCF_Index_R[Band][1]);
+                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , d->SCF_Index_R[Band][1]);
                     for ( ; n < 24; n++, YL += 32, YR += 32 ) {
                         *YR = - (*YL = MPC_MULTIPLY_FLOAT_INT(facR,*(R++)));
                     }
-                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , (unsigned char)d->SCF_Index_R[Band][2]);
+                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , d->SCF_Index_R[Band][2]);
                     for ( ; n < 36; n++, YL += 32, YR += 32 ) {
                         *YR = - (*YL = MPC_MULTIPLY_FLOAT_INT(facR,*(R++)));
@@ -573,18 +575,18 @@
             if ( d->Res_L [Band] ) {
                 if ( d->Res_R [Band] ) {    // L!=0, R!=0
-                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , (unsigned char)d->SCF_Index_L[Band][0]);
-                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , (unsigned char)d->SCF_Index_R[Band][0]);
+                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , d->SCF_Index_L[Band][0]);
+                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , d->SCF_Index_R[Band][0]);
                     for (n = 0; n < 12; n++, YL += 32, YR += 32 ) {
                         *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
                         *YR = MPC_MULTIPLY_FLOAT_INT(facR,*R++);
                     }
-                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , (unsigned char)d->SCF_Index_L[Band][1]);
-                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , (unsigned char)d->SCF_Index_R[Band][1]);
+                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , d->SCF_Index_L[Band][1]);
+                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , d->SCF_Index_R[Band][1]);
                     for (; n < 24; n++, YL += 32, YR += 32 ) {
                         *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
                         *YR = MPC_MULTIPLY_FLOAT_INT(facR,*R++);
                     }
-                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , (unsigned char)d->SCF_Index_L[Band][2]);
-                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , (unsigned char)d->SCF_Index_R[Band][2]);
+                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , d->SCF_Index_L[Band][2]);
+                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , d->SCF_Index_R[Band][2]);
                     for (; n < 36; n++, YL += 32, YR += 32 ) {
                         *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
@@ -592,15 +594,15 @@
                     }
                 } else {     // L!=0, R==0
-                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , (unsigned char)d->SCF_Index_L[Band][0]);
+                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , d->SCF_Index_L[Band][0]);
                     for ( n = 0; n < 12; n++, YL += 32, YR += 32 ) {
                         *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
                         *YR = 0;
                     }
-                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , (unsigned char)d->SCF_Index_L[Band][1]);
+                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , d->SCF_Index_L[Band][1]);
                     for ( ; n < 24; n++, YL += 32, YR += 32 ) {
                         *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
                         *YR = 0;
                     }
-                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , (unsigned char)d->SCF_Index_L[Band][2]);
+                    facL = MPC_MULTIPLY_SCF( Cc[d->Res_L[Band]] , d->SCF_Index_L[Band][2]);
                     for ( ; n < 36; n++, YL += 32, YR += 32 ) {
                         *YL = MPC_MULTIPLY_FLOAT_INT(facL,*L++);
@@ -611,15 +613,15 @@
             else {
                 if ( d->Res_R [Band] ) {    // L==0, R!=0
-                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , (unsigned char)d->SCF_Index_R[Band][0]);
+                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , d->SCF_Index_R[Band][0]);
                     for ( n = 0; n < 12; n++, YL += 32, YR += 32 ) {
                         *YL = 0;
                         *YR = MPC_MULTIPLY_FLOAT_INT(facR,*R++);
                     }
-                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , (unsigned char)d->SCF_Index_R[Band][1]);
+                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , d->SCF_Index_R[Band][1]);
                     for ( ; n < 24; n++, YL += 32, YR += 32 ) {
                         *YL = 0;
                         *YR = MPC_MULTIPLY_FLOAT_INT(facR,*R++);
                     }
-                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , (unsigned char)d->SCF_Index_R[Band][2]);
+                    facR = MPC_MULTIPLY_SCF( Cc[d->Res_R[Band]] , d->SCF_Index_R[Band][2]);
                     for ( ; n < 36; n++, YL += 32, YR += 32 ) {
                         *YL = 0;
@@ -637,5 +639,5 @@
 
 #ifdef MPC_SUPPORT_SV456
-static const unsigned char Q_res[32][16] = {
+static const mpc_uint8_t Q_res[32][16] = {
 {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17},
 {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17},
@@ -681,8 +683,10 @@
     const HuffmanTyp *x1;
     const HuffmanTyp *x2;
-    mpc_int32_t *L;
-    mpc_int32_t *R;
-    mpc_int32_t *ResL = d->Res_L;
-    mpc_int32_t *ResR = d->Res_R;
+    mpc_int8_t  *L;
+    mpc_int8_t  *R;
+    mpc_int16_t *QL;
+    mpc_int16_t *QR;
+    mpc_int8_t *ResL = d->Res_L;
+    mpc_int8_t *ResR = d->Res_R;
 
     /************************ HEADER **************************/
@@ -697,5 +701,5 @@
         *ResL = Q_res[n][mpc_decoder_huffman_decode(d, Table)];
         if (d->MS_used) {
-            d->MS_Flag[n] = mpc_decoder_bitstream_read(d,  1);
+            d->MS_Flag[n] = (mpc_bool_t) mpc_decoder_bitstream_read(d,  1);
         }
         *ResR = Q_res[n][mpc_decoder_huffman_decode(d, Table)];
@@ -725,5 +729,5 @@
             if (d->DSCF_Flag_L[n]==1)
             {
-                L[2] = d->DSCF_Reference_L[n];
+                //L[2] = d->DSCF_Reference_L[n];
                 switch (d->SCFI_L[n])
                 {
@@ -784,9 +788,9 @@
             }
             // update Reference for DSCF
-            d->DSCF_Reference_L[n] = L[2];
+            //d->DSCF_Reference_L[n] = L[2];
         }
         if (*ResR)
         {
-            R[2] = d->DSCF_Reference_R[n];
+            //R[2] = d->DSCF_Reference_R[n];
             /*********** DSCF ************/
             if (d->DSCF_Flag_R[n]==1)
@@ -850,5 +854,5 @@
             }
             // update Reference for DSCF
-            d->DSCF_Reference_R[n] = R[2];
+            //d->DSCF_Reference_R[n] = R[2];
         }
     }
@@ -862,12 +866,12 @@
         x1 = mpc_table_SampleHuff[*ResL];
         x2 = mpc_table_SampleHuff[*ResR];
-        L = d->Q[n].L;
-        R = d->Q[n].R;
+        QL = d->Q[n].L;
+        QR = d->Q[n].R;
 
         if (x1!=NULL || x2!=NULL)
             for (k=0; k<36; ++k)
             {
-                if (x1 != NULL) *L++ = mpc_decoder_huffman_decode_fast(d,  x1);
-                if (x2 != NULL) *R++ = mpc_decoder_huffman_decode_fast(d,  x2);
+                if (x1 != NULL) *QL++ = mpc_decoder_huffman_decode_fast(d,  x1);
+                if (x2 != NULL) *QR++ = mpc_decoder_huffman_decode_fast(d,  x2);
             }
 
@@ -875,6 +879,6 @@
             for (k=0; k<36; ++k)
             {
-                if (*ResL>7) *L++ = (mpc_int32_t)mpc_decoder_bitstream_read(d,  Res_bit[*ResL]) - Dc[*ResL];
-                if (*ResR>7) *R++ = (mpc_int32_t)mpc_decoder_bitstream_read(d,  Res_bit[*ResR]) - Dc[*ResR];
+                if (*ResL>7) *QL++ = (mpc_int16_t)mpc_decoder_bitstream_read(d,  Res_bit[*ResL]) - Dc[*ResL];
+                if (*ResR>7) *QR++ = (mpc_int16_t)mpc_decoder_bitstream_read(d,  Res_bit[*ResR]) - Dc[*ResR];
             }
     }
@@ -892,10 +896,11 @@
     /*static*/ mpc_int32_t idx51[] = { -2,-2,-2,-2,-2,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2};
 
-    mpc_int32_t n,k;
+    mpc_int32_t n, k;
     mpc_int32_t Max_used_Band=0;
     const HuffmanTyp *Table;
-    mpc_int32_t idx;
-    mpc_int32_t *L   ,*R;
-    mpc_int32_t *ResL,*ResR;
+    mpc_int32_t  idx;
+    mpc_int8_t   *L, *R;
+    mpc_int16_t  *LQ, *RQ;
+    mpc_int8_t   *ResL, *ResR;
     mpc_uint32_t tmp;
 
@@ -948,5 +953,5 @@
         if (*ResL)
         {
-            L[2] = d->DSCF_Reference_L[n];
+            //L[2] = d->DSCF_Reference_L[n];
             switch (d->SCFI_L[n])
             {
@@ -984,9 +989,9 @@
             }
             // update Reference for DSCF
-            d->DSCF_Reference_L[n] = L[2];
+            //d->DSCF_Reference_L[n] = L[2];
         }
         if (*ResR)
         {
-            R[2] = d->DSCF_Reference_R[n];
+            //R[2] = d->DSCF_Reference_R[n];
             switch (d->SCFI_R[n])
             {
@@ -1024,5 +1029,5 @@
             }
             // update Reference for DSCF
-            d->DSCF_Reference_R[n] = R[2];
+            //d->DSCF_Reference_R[n] = R[2];
         }
     }
@@ -1030,7 +1035,7 @@
     ResL = d->Res_L;
     ResR = d->Res_R;
-    L    = d->Q[0].L;
-    R    = d->Q[0].R;
-    for (n=0; n <= Max_used_Band; ++n, ++ResL, ++ResR, L+=36, R+=36)
+    LQ   = d->Q[0].L;
+    RQ   = d->Q[0].R;
+    for (n=0; n <= Max_used_Band; ++n, ++ResL, ++ResR, LQ+=36, RQ+=36)
     {
         /************** links **************/
@@ -1039,14 +1044,14 @@
         case  -2: case  -3: case  -4: case  -5: case  -6: case  -7: case  -8: case  -9:
         case -10: case -11: case -12: case -13: case -14: case -15: case -16: case -17:
-            L += 36;
+            LQ += 36;
             break;
         case -1:
             for (k=0; k<36; k++ ) {
                 tmp  = mpc_random_int(d);
-                *L++ = ((tmp >> 24) & 0xFF) + ((tmp >> 16) & 0xFF) + ((tmp >>  8) & 0xFF) + ((tmp >>  0) & 0xFF) - 510;
+                *LQ++ = ((tmp >> 24) & 0xFF) + ((tmp >> 16) & 0xFF) + ((tmp >>  8) & 0xFF) + ((tmp >>  0) & 0xFF) - 510;
             }
             break;
         case 0:
-            L += 36;// increase pointer
+            LQ += 36;// increase pointer
             break;
         case 1:
@@ -1055,7 +1060,7 @@
             {
                 idx = mpc_decoder_huffman_decode_fast(d,  Table);
-                *L++ = idx30[idx];
-                *L++ = idx31[idx];
-                *L++ = idx32[idx];
+                *LQ++ = idx30[idx];
+                *LQ++ = idx31[idx];
+                *LQ++ = idx32[idx];
             }
             break;
@@ -1065,6 +1070,6 @@
             {
                 idx = mpc_decoder_huffman_decode_fast(d,  Table);
-                *L++ = idx50[idx];
-                *L++ = idx51[idx];
+                *LQ++ = idx50[idx];
+                *LQ++ = idx51[idx];
             }
             break;
@@ -1073,10 +1078,10 @@
             Table = mpc_table_HuffQ[mpc_decoder_bitstream_read(d, 1)][*ResL];
             for (k=0; k<36; ++k)
-                *L++ = mpc_decoder_huffman_decode_faster(d, Table);
+                *LQ++ = mpc_decoder_huffman_decode_faster(d, Table);
             break;
         case 5:
             Table = mpc_table_HuffQ[mpc_decoder_bitstream_read(d, 1)][*ResL];
             for (k=0; k<36; ++k)
-                *L++ = mpc_decoder_huffman_decode_fast(d, Table);
+                *LQ++ = mpc_decoder_huffman_decode_fast(d, Table);
             break;
         case 6:
@@ -1084,10 +1089,10 @@
             Table = mpc_table_HuffQ[mpc_decoder_bitstream_read(d, 1)][*ResL];
             for (k=0; k<36; ++k)
-                *L++ = mpc_decoder_huffman_decode(d, Table);
+                *LQ++ = mpc_decoder_huffman_decode(d, Table);
             break;
         case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17:
             tmp = Dc[*ResL];
             for (k=0; k<36; ++k)
-                *L++ = (mpc_int32_t)mpc_decoder_bitstream_read(d, Res_bit[*ResL]) - tmp;
+                *LQ++ = (mpc_int32_t)mpc_decoder_bitstream_read(d, Res_bit[*ResL]) - tmp;
             break;
         default:
@@ -1099,14 +1104,14 @@
         case  -2: case  -3: case  -4: case  -5: case  -6: case  -7: case  -8: case  -9:
         case -10: case -11: case -12: case -13: case -14: case -15: case -16: case -17:
-            R += 36;
+            RQ += 36;
             break;
         case -1:
                 for (k=0; k<36; k++ ) {
                     tmp  = mpc_random_int(d);
-                    *R++ = ((tmp >> 24) & 0xFF) + ((tmp >> 16) & 0xFF) + ((tmp >>  8) & 0xFF) + ((tmp >>  0) & 0xFF) - 510;
+                    *RQ++ = ((tmp >> 24) & 0xFF) + ((tmp >> 16) & 0xFF) + ((tmp >>  8) & 0xFF) + ((tmp >>  0) & 0xFF) - 510;
                 }
                 break;
             case 0:
-                R += 36;// increase pointer
+                RQ += 36;// increase pointer
                 break;
             case 1:
@@ -1115,7 +1120,7 @@
                 {
                     idx = mpc_decoder_huffman_decode_fast(d, Table);
-                    *R++ = idx30[idx];
-                    *R++ = idx31[idx];
-                    *R++ = idx32[idx];
+                    *RQ++ = idx30[idx];
+                    *RQ++ = idx31[idx];
+                    *RQ++ = idx32[idx];
                 }
                 break;
@@ -1125,6 +1130,6 @@
                 {
                     idx = mpc_decoder_huffman_decode_fast(d, Table);
-                    *R++ = idx50[idx];
-                    *R++ = idx51[idx];
+                    *RQ++ = idx50[idx];
+                    *RQ++ = idx51[idx];
                 }
                 break;
@@ -1133,10 +1138,10 @@
                 Table = mpc_table_HuffQ[mpc_decoder_bitstream_read(d, 1)][*ResR];
                 for (k=0; k<36; ++k)
-                    *R++ = mpc_decoder_huffman_decode_faster(d, Table);
+                    *RQ++ = mpc_decoder_huffman_decode_faster(d, Table);
                 break;
             case 5:
                 Table = mpc_table_HuffQ[mpc_decoder_bitstream_read(d, 1)][*ResR];
                 for (k=0; k<36; ++k)
-                    *R++ = mpc_decoder_huffman_decode_fast(d, Table);
+                    *RQ++ = mpc_decoder_huffman_decode_fast(d, Table);
                 break;
             case 6:
@@ -1144,10 +1149,10 @@
                 Table = mpc_table_HuffQ[mpc_decoder_bitstream_read(d, 1)][*ResR];
                 for (k=0; k<36; ++k)
-                    *R++ = mpc_decoder_huffman_decode(d, Table);
+                    *RQ++ = mpc_decoder_huffman_decode(d, Table);
                 break;
             case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17:
                 tmp = Dc[*ResR];
                 for (k=0; k<36; ++k)
-                    *R++ = (mpc_int32_t)mpc_decoder_bitstream_read(d, Res_bit[*ResR]) - tmp;
+                    *RQ++ = (mpc_int32_t)mpc_decoder_bitstream_read(d, Res_bit[*ResR]) - tmp;
                 break;
             default:
@@ -1300,8 +1305,10 @@
     memset(d->SCFI_L          , 0, sizeof d->SCFI_L           );
     memset(d->SCFI_R          , 0, sizeof d->SCFI_R           );
+#ifdef MPC_SUPPORT_SV456
     memset(d->DSCF_Flag_L     , 0, sizeof d->DSCF_Flag_L      );
     memset(d->DSCF_Flag_R     , 0, sizeof d->DSCF_Flag_R      );
-    memset(d->DSCF_Reference_L, 0, sizeof d->DSCF_Reference_L );
-    memset(d->DSCF_Reference_R, 0, sizeof d->DSCF_Reference_R );
+#endif
+    //memset(d->DSCF_Reference_L, 0, sizeof d->DSCF_Reference_L );
+    //memset(d->DSCF_Reference_R, 0, sizeof d->DSCF_Reference_R );
     memset(d->Q               , 0, sizeof d->Q                );
     memset(d->MS_Flag         , 0, sizeof d->MS_Flag          );
Index: branches/zorg/src/mpc_reader.c
===================================================================
--- branches/zorg/src/mpc_reader.c	(revision 17)
+++ branches/zorg/src/mpc_reader.c	(revision 18)
@@ -44,5 +44,5 @@
     mpc_reader_file *d = (mpc_reader_file *) data;
 
-    return fread(ptr, 1, size, d->file);
+    return (mpc_int32_t) fread(ptr, 1, size, d->file);
 }
 
@@ -52,5 +52,5 @@
     mpc_reader_file *d = (mpc_reader_file *) data;
 
-    return d->is_seekable ? !fseek(d->file, offset, SEEK_SET) : FALSE;
+    return d->is_seekable ? (mpc_bool_t) !fseek(d->file, offset, SEEK_SET) : FALSE;
 }
 
Index: branches/zorg/src/requant.c
===================================================================
--- branches/zorg/src/requant.c	(revision 17)
+++ branches/zorg/src/requant.c	(revision 18)
@@ -71,5 +71,5 @@
 
 #ifdef MPC_FIXED_POINT
-static mpc_uint32_t find_shift(double fval)
+static mpc_uint8_t find_shift(double fval)
 {
 	mpc_int64_t  val = (mpc_int64_t)fval;
@@ -78,5 +78,5 @@
 	while(val) {val>>=1;ptr++;}
 
-	return ptr > 31 ? 0 : 31 - ptr;
+	return ptr > 31 ? 0 : (mpc_uint8_t) 31 - ptr;
 }
 #endif
@@ -84,12 +84,12 @@
 /* F U N C T I O N S */
 
-#define SET_SCF(N,X) d->SCF[N] = MAKE_MPC_SAMPLE_EX(X,d->SCF_shift[N] = (unsigned char)find_shift(X));
+#define SET_SCF(N,X) d->SCF[N] = MAKE_MPC_SAMPLE_EX(X,d->SCF_shift[N] = find_shift(X));
 
 void
 mpc_decoder_scale_output(mpc_decoder *d, double factor) 
 {
-    mpc_int32_t     n;
-    double  f1;
-    double  f2;
+    mpc_uint8_t n;
+    double      f1;
+    double      f2;
 #ifndef MPC_FIXED_POINT
 	factor *= 1.0 / (double)(1<<(MPC_FIXED_POINT_SHIFT-1));
@@ -107,6 +107,6 @@
 
     for ( n = 1; n <= 128; n++ ) {
-		SET_SCF((unsigned char)(1+n),f1);
-		SET_SCF((unsigned char)(1-n),f2);
+		SET_SCF(1+n,f1);
+		SET_SCF(1-n,f2);
         f1 *=   0.83298066476582673961;
         f2 *= 1/0.83298066476582673961;
Index: branches/zorg/src/synth_filter.c
===================================================================
--- branches/zorg/src/synth_filter.c	(revision 17)
+++ branches/zorg/src/synth_filter.c	(revision 18)
@@ -385,5 +385,5 @@
 /*******************************************/
 
-static const unsigned char    Parity [256] = {  // parity
+static const mpc_uint8_t Parity [256] = {  // parity
     0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,
     1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,1,0,0,1,0,1,1,0,
