[cvs] / xvidcore / src / utils / mbtransquant.c Repository:
ViewVC logotype

Diff of /xvidcore/src/utils/mbtransquant.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1, Fri Mar 8 02:44:58 2002 UTC revision 1.22.2.1, Sun May 4 15:15:59 2003 UTC
# Line 42  Line 42 
42    *                                                                            *    *                                                                            *
43    *  Revision history:                                                         *    *  Revision history:                                                         *
44    *                                                                            *    *                                                                            *
45    *  22.12.2001 get_dc_scaler() moved to common.h    *  29.03.2002 interlacing speedup - used transfer strides instead of             *
46      *             manual field-to-frame conversion                                                           *
47      *  26.03.2002 interlacing support - moved transfers outside loops                        *
48      *  22.12.2001 get_dc_scaler() moved to common.h                                                          *
49    *  19.11.2001 introduced coefficient thresholding (Isibaar)                  *    *  19.11.2001 introduced coefficient thresholding (Isibaar)                  *
50    *  17.11.2001 initial version                                                *    *  17.11.2001 initial version                                                *
51    *                                                                            *    *                                                                            *
52    ******************************************************************************/    ******************************************************************************/
53    
54    #include <string.h>
55    
56  #include "../portab.h"  #include "../portab.h"
57  #include "mbfunctions.h"  #include "mbfunctions.h"
58    
# Line 60  Line 65 
65  #include "../quant/quant_h263.h"  #include "../quant/quant_h263.h"
66  #include "../encoder.h"  #include "../encoder.h"
67    
68  #define MIN(X, Y) ((X)<(Y)?(X):(Y))  #include "../image/reduced.h"
69  #define MAX(X, Y) ((X)>(Y)?(X):(Y))  
70    MBFIELDTEST_PTR MBFieldTest;
71    
72  #define TOOSMALL_LIMIT 1 /* skip blocks having a coefficient sum below this value */  #define TOOSMALL_LIMIT 1 /* skip blocks having a coefficient sum below this value */
73    
74  /* this isnt pretty, but its better than 20 ifdefs */  static __inline void
75    MBfDCT(int16_t data[6 * 64])
76    {
77            start_timer();
78            fdct(&data[0 * 64]);
79            fdct(&data[1 * 64]);
80            fdct(&data[2 * 64]);
81            fdct(&data[3 * 64]);
82            fdct(&data[4 * 64]);
83            fdct(&data[5 * 64]);
84            stop_dct_timer();
85    }
86    
 void MBTransQuantIntra(const MBParam *pParam,  
                        const uint32_t x_pos,  
                        const uint32_t y_pos,  
                        int16_t data[][64],  
                            int16_t qcoeff[][64],  
                            IMAGE * const pCurrent)  
87    
88    static __inline uint32_t
89    QuantizeInterBlock(     int16_t qcoeff[64],
90                                            const int16_t data[64],
91                                            const uint32_t iQuant,
92                                            const uint32_t quant_type)
93  {  {
94          const uint32_t stride = pParam->edged_width;          uint32_t sum;
         uint32_t i;  
         uint32_t iQuant = pParam->quant;  
         uint8_t *pY_Cur, *pU_Cur, *pV_Cur;  
95    
96      pY_Cur = pCurrent->y + (y_pos << 4) * stride + (x_pos << 4);          start_timer();
97      pU_Cur = pCurrent->u + (y_pos << 3) * (stride >> 1) + (x_pos << 3);          if (quant_type == H263_QUANT)
98      pV_Cur = pCurrent->v + (y_pos << 3) * (stride >> 1) + (x_pos << 3);                  sum = quant_inter(qcoeff, data, iQuant);
99            else
100                    sum = quant4_inter(qcoeff, data, iQuant);
101    
102          for(i = 0; i < 6; i++) {          stop_quant_timer();
103                  uint32_t iDcScaler = get_dc_scaler(iQuant, i < 4);          return sum;
104    }
105    
106    void
107    MBTransQuantIntra(const MBParam * const pParam,
108                                    FRAMEINFO * const frame,
109                                    MACROBLOCK * const pMB,
110                                    const uint32_t x_pos,
111                                    const uint32_t y_pos,
112                                    int16_t data[6 * 64],
113                                    int16_t qcoeff[6 * 64])
114    {
115    
116            uint32_t stride = pParam->edged_width;
117            const uint32_t stride2 = stride / 2;
118            uint32_t next_block = stride * ((frame->global_flags & XVID_REDUCED)?16:8);
119            int i;
120            const uint32_t iQuant = pMB->quant;
121            uint8_t *pY_Cur, *pU_Cur, *pV_Cur;
122            const IMAGE * const pCurrent = &frame->image;
123    
124                  start_timer();                  start_timer();
125            if ((frame->global_flags & XVID_REDUCED))
126            {
127                    pY_Cur = pCurrent->y + (y_pos << 5) * stride + (x_pos << 5);
128                    pU_Cur = pCurrent->u + (y_pos << 4) * stride2 + (x_pos << 4);
129                    pV_Cur = pCurrent->v + (y_pos << 4) * stride2 + (x_pos << 4);
130    
131                    filter_18x18_to_8x8(&data[0 * 64], pY_Cur, stride);
132                    filter_18x18_to_8x8(&data[1 * 64], pY_Cur + 16, stride);
133                    filter_18x18_to_8x8(&data[2 * 64], pY_Cur + next_block, stride);
134                    filter_18x18_to_8x8(&data[3 * 64], pY_Cur + next_block + 16, stride);
135                    filter_18x18_to_8x8(&data[4 * 64], pU_Cur, stride2);
136                    filter_18x18_to_8x8(&data[5 * 64], pV_Cur, stride2);
137            } else {
138                    pY_Cur = pCurrent->y + (y_pos << 4) * stride + (x_pos << 4);
139                    pU_Cur = pCurrent->u + (y_pos << 3) * stride2 + (x_pos << 3);
140                    pV_Cur = pCurrent->v + (y_pos << 3) * stride2 + (x_pos << 3);
141    
142                  switch(i) {                  transfer_8to16copy(&data[0 * 64], pY_Cur, stride);
143                  case 0 :                  transfer_8to16copy(&data[1 * 64], pY_Cur + 8, stride);
144                          transfer_8to16copy(data[0], pY_Cur, stride);                  transfer_8to16copy(&data[2 * 64], pY_Cur + next_block, stride);
145                          break;                  transfer_8to16copy(&data[3 * 64], pY_Cur + next_block + 8, stride);
146                  case 1 :                  transfer_8to16copy(&data[4 * 64], pU_Cur, stride2);
147                          transfer_8to16copy(data[1], pY_Cur + 8, stride);                  transfer_8to16copy(&data[5 * 64], pV_Cur, stride2);
                         break;  
                 case 2 :  
                     transfer_8to16copy(data[2], pY_Cur + 8 * stride, stride);  
                         break;  
                 case 3 :  
                         transfer_8to16copy(data[3], pY_Cur + 8 * stride + 8, stride);  
                         break;  
                 case 4 :  
                         transfer_8to16copy(data[4], pU_Cur, stride / 2);  
                         break;  
                 case 5 :  
                         transfer_8to16copy(data[5], pV_Cur, stride / 2);  
                         break;  
148                  }                  }
149                  stop_transfer_timer();                  stop_transfer_timer();
150    
151            /* XXX: rrv+interlacing is buggy */
152                  start_timer();                  start_timer();
153                  fdct(data[i]);          pMB->field_dct = 0;
154                  stop_dct_timer();          if ((frame->global_flags & XVID_INTERLACING) &&
155                    (x_pos>0) && (x_pos<pParam->mb_width-1) &&
156                    (y_pos>0) && (y_pos<pParam->mb_height-1)) {
157                    pMB->field_dct = MBDecideFieldDCT(data);
158            }
159            stop_interlacing_timer();
160    
161                  if (pParam->quant_type == H263_QUANT)          MBfDCT(data);
162                  {  
163                          start_timer();          for (i = 0; i < 6; i++) {
164                          quant_intra(qcoeff[i], data[i], iQuant, iDcScaler);                  const uint32_t iDcScaler = get_dc_scaler(iQuant, i < 4);
                         stop_quant_timer();  
165    
166                          start_timer();                          start_timer();
167                          dequant_intra(data[i], qcoeff[i], iQuant, iDcScaler);                  if (pParam->m_quant_type == H263_QUANT)
168                          stop_iquant_timer();                          quant_intra(&qcoeff[i * 64], &data[i * 64], iQuant, iDcScaler);
                 }  
169                  else                  else
170                  {                          quant4_intra(&qcoeff[i * 64], &data[i * 64], iQuant, iDcScaler);
                         start_timer();  
                         quant4_intra(qcoeff[i], data[i], iQuant, iDcScaler);  
171                          stop_quant_timer();                          stop_quant_timer();
172    
173                    /* speedup: dont decode when encoding only ivops */
174                    if (pParam->iMaxKeyInterval != 1 || pParam->max_bframes > 0)
175                    {
176                          start_timer();                          start_timer();
177                          dequant4_intra(data[i], qcoeff[i], iQuant, iDcScaler);                          if (pParam->m_quant_type == H263_QUANT)
178                                    dequant_intra(&data[i * 64], &qcoeff[i * 64], iQuant, iDcScaler);
179                            else
180                                    dequant4_intra(&data[i * 64], &qcoeff[i * 64], iQuant, iDcScaler);
181                          stop_iquant_timer();                          stop_iquant_timer();
                 }  
182    
183                  start_timer();                  start_timer();
184                  idct(data[i]);                          idct(&data[i * 64]);
185                  stop_idct_timer();                  stop_idct_timer();
186                    }
187            }
188    
189                  start_timer();          /* speedup: dont decode when encoding only ivops */
190            if (pParam->iMaxKeyInterval != 1 || pParam->max_bframes > 0)
191            {
192    
193                  switch(i) {                  if (pMB->field_dct) {
194                  case 0:                          next_block = stride;
195                          transfer_16to8copy(pY_Cur, data[0], stride);                          stride *= 2;
                         break;  
                 case 1:  
                         transfer_16to8copy(pY_Cur + 8, data[1], stride);  
                         break;  
                 case 2:  
                         transfer_16to8copy(pY_Cur + 8 * stride, data[2], stride);  
                         break;  
                 case 3:  
                         transfer_16to8copy(pY_Cur + 8 + 8 * stride, data[3], stride);  
                         break;  
                 case 4:  
                         transfer_16to8copy(pU_Cur, data[4], stride / 2);  
                         break;  
                 case 5:  
                         transfer_16to8copy(pV_Cur, data[5], stride / 2);  
                         break;  
196                  }                  }
197                  stop_transfer_timer();  
198                    start_timer();
199                    if ((frame->global_flags & XVID_REDUCED)) {
200                            copy_upsampled_8x8_16to8(pY_Cur, &data[0 * 64], stride);
201                            copy_upsampled_8x8_16to8(pY_Cur + 16, &data[1 * 64], stride);
202                            copy_upsampled_8x8_16to8(pY_Cur + next_block, &data[2 * 64], stride);
203                            copy_upsampled_8x8_16to8(pY_Cur + next_block + 16, &data[3 * 64], stride);
204                            copy_upsampled_8x8_16to8(pU_Cur, &data[4 * 64], stride2);
205                            copy_upsampled_8x8_16to8(pV_Cur, &data[5 * 64], stride2);
206                    } else {
207                            transfer_16to8copy(pY_Cur, &data[0 * 64], stride);
208                            transfer_16to8copy(pY_Cur + 8, &data[1 * 64], stride);
209                            transfer_16to8copy(pY_Cur + next_block, &data[2 * 64], stride);
210                            transfer_16to8copy(pY_Cur + next_block + 8, &data[3 * 64], stride);
211                            transfer_16to8copy(pU_Cur, &data[4 * 64], stride2);
212                            transfer_16to8copy(pV_Cur, &data[5 * 64], stride2);
213      }      }
214                    stop_transfer_timer();
215  }  }
216    
217    }
218    
219  uint8_t MBTransQuantInter(const MBParam *pParam,  uint8_t
220                                          const uint32_t x_pos, const uint32_t y_pos,  MBTransQuantInter(const MBParam * const pParam,
221                                          int16_t data[][64],                                  FRAMEINFO * const frame,
222                                          int16_t qcoeff[][64],                                  MACROBLOCK * const pMB,
223                                          IMAGE * const pCurrent)                                  const uint32_t x_pos,
224                                    const uint32_t y_pos,
225                                    int16_t data[6 * 64],
226                                    int16_t qcoeff[6 * 64])
227  {  {
228          const uint32_t stride = pParam->edged_width;          uint32_t stride = pParam->edged_width;
229      uint8_t i;          const uint32_t stride2 = stride / 2;
230      uint8_t iQuant = pParam->quant;          uint32_t next_block = stride * ((frame->global_flags & XVID_REDUCED)?16:8);
231            int i;
232            const uint32_t iQuant = pMB->quant;
233          uint8_t *pY_Cur, *pU_Cur, *pV_Cur;          uint8_t *pY_Cur, *pU_Cur, *pV_Cur;
234      uint8_t cbp = 0;          int cbp = 0;
235          uint32_t sum;          uint32_t sum;
236            const IMAGE * const pCurrent = &frame->image;
237    
238            if ((frame->global_flags & XVID_REDUCED)) {
239                    pY_Cur = pCurrent->y + (y_pos << 5) * stride + (x_pos << 5);
240                    pU_Cur = pCurrent->u + (y_pos << 4) * stride2 + (x_pos << 4);
241                    pV_Cur = pCurrent->v + (y_pos << 4) * stride2 + (x_pos << 4);
242            } else {
243      pY_Cur = pCurrent->y + (y_pos << 4) * stride + (x_pos << 4);      pY_Cur = pCurrent->y + (y_pos << 4) * stride + (x_pos << 4);
244      pU_Cur = pCurrent->u + (y_pos << 3) * (stride >> 1) + (x_pos << 3);                  pU_Cur = pCurrent->u + (y_pos << 3) * stride2 + (x_pos << 3);
245      pV_Cur = pCurrent->v + (y_pos << 3) * (stride >> 1) + (x_pos << 3);                  pV_Cur = pCurrent->v + (y_pos << 3) * stride2 + (x_pos << 3);
246            }
247    
248            start_timer();
249            pMB->field_dct = 0;
250            if ((frame->global_flags & XVID_INTERLACING) &&
251                    (x_pos>0) && (x_pos<pParam->mb_width-1) &&
252                    (y_pos>0) && (y_pos<pParam->mb_height-1)) {
253                    pMB->field_dct = MBDecideFieldDCT(data);
254            }
255            stop_interlacing_timer();
256    
257            MBfDCT(data);
258    
259      for(i = 0; i < 6; i++) {      for(i = 0; i < 6; i++) {
260                    const uint32_t limit = TOOSMALL_LIMIT + ((iQuant == 1) ? 1 : 0);
261                  /*                  /*
262                  no need to transfer 8->16-bit                   *  no need to transfer 8->16-bit
263                  (this is performed already in motion compensation)                   * (this is performed already in motion compensation)
264                  */                  */
                 start_timer();  
                 fdct(data[i]);  
                 stop_dct_timer();  
265    
266                  if (pParam->quant_type == 0)                  sum = QuantizeInterBlock(&qcoeff[i * 64], &data[i * 64], iQuant, pParam->m_quant_type);
267                  {  
268                          start_timer();                  if(frame->global_flags & XVID_CARTOON_MODE) {
269                          sum = quant_inter(qcoeff[i], data[i], iQuant);                          limit *= 3;
                         stop_quant_timer();  
270                  }                  }
271    
272                    if (sum >= limit) {
273    
274                            start_timer();
275                            if (pParam->m_quant_type == H263_QUANT)
276                                    dequant_inter(&data[i * 64], &qcoeff[i * 64], iQuant);
277                  else                  else
278                  {                                  dequant4_inter(&data[i * 64], &qcoeff[i * 64], iQuant);
279                            stop_iquant_timer();
280    
281                            cbp |= 1 << (5 - i);
282    
283                          start_timer();                          start_timer();
284                          sum = quant4_inter(qcoeff[i], data[i], iQuant);                          idct(&data[i * 64]);
285                          stop_quant_timer();                          stop_idct_timer();
286                    }
287                  }                  }
288    
289                  if(sum >= TOOSMALL_LIMIT) { // skip block ?          if (pMB->field_dct) {
290                    next_block = stride;
291                    stride *= 2;
292            }
293    
                         if (pParam->quant_type == H263_QUANT)  
                         {  
294                                  start_timer();                                  start_timer();
295                                  dequant_inter(data[i], qcoeff[i], iQuant);          if ((frame->global_flags & XVID_REDUCED)) {
296                                  stop_iquant_timer();                  if (cbp & 32)
297                            add_upsampled_8x8_16to8(pY_Cur, &data[0 * 64], stride);
298                    if (cbp & 16)
299                            add_upsampled_8x8_16to8(pY_Cur + 16, &data[1 * 64], stride);
300                    if (cbp & 8)
301                            add_upsampled_8x8_16to8(pY_Cur + next_block, &data[2 * 64], stride);
302                    if (cbp & 4)
303                            add_upsampled_8x8_16to8(pY_Cur + 16 + next_block, &data[3 * 64], stride);
304                    if (cbp & 2)
305                            add_upsampled_8x8_16to8(pU_Cur, &data[4 * 64], stride2);
306                    if (cbp & 1)
307                            add_upsampled_8x8_16to8(pV_Cur, &data[5 * 64], stride2);
308            } else {
309                    if (cbp & 32)
310                            transfer_16to8add(pY_Cur, &data[0 * 64], stride);
311                    if (cbp & 16)
312                            transfer_16to8add(pY_Cur + 8, &data[1 * 64], stride);
313                    if (cbp & 8)
314                            transfer_16to8add(pY_Cur + next_block, &data[2 * 64], stride);
315                    if (cbp & 4)
316                            transfer_16to8add(pY_Cur + next_block + 8, &data[3 * 64], stride);
317                    if (cbp & 2)
318                            transfer_16to8add(pU_Cur, &data[4 * 64], stride2);
319                    if (cbp & 1)
320                            transfer_16to8add(pV_Cur, &data[5 * 64], stride2);
321                          }                          }
322                          else          stop_transfer_timer();
323    
324            return (uint8_t) cbp;
325    }
326    
327    uint8_t
328    MBTransQuantInterBVOP(const MBParam * pParam,
329                                      FRAMEINFO * frame,
330                                      MACROBLOCK * pMB,
331                                      int16_t data[6 * 64],
332                                      int16_t qcoeff[6 * 64])
333                          {                          {
334            int cbp = 0;
335            int i;
336    
337    /* there is no MBTrans for Inter block, that's done in motion compensation already */
338    
339                                  start_timer();                                  start_timer();
340                                  dequant4_inter(data[i], qcoeff[i], iQuant);          pMB->field_dct = 0;
341                                  stop_iquant_timer();          if ((frame->global_flags & XVID_INTERLACING)) {
342                    pMB->field_dct = MBDecideFieldDCT(data);
343                          }                          }
344            stop_interlacing_timer();
345    
346                          cbp |= 1 << (5 - i);          MBfDCT(data);
347    
348                          start_timer();          for (i = 0; i < 6; i++) {
349                          idct(data[i]);                  int codedecision = 0;
                         stop_idct_timer();  
350    
351                          start_timer();                  int sum = QuantizeInterBlock(&qcoeff[i * 64], &data[i * 64], pMB->quant, pParam->m_quant_type);
352    
353                          switch(i) {                  if(frame->global_flags & XVID_CARTOON_MODE) {
354                          case 0:                          limit *= 2;
                                 transfer_16to8add(pY_Cur, data[0], stride);  
                                 break;  
                         case 1:  
                                 transfer_16to8add(pY_Cur + 8, data[1], stride);  
                                 break;  
                         case 2:  
                                 transfer_16to8add(pY_Cur + 8 * stride, data[2], stride);  
                                 break;  
                         case 3:  
                                 transfer_16to8add(pY_Cur + 8 + 8 * stride, data[3], stride);  
                                 break;  
                         case 4:  
                                 transfer_16to8add(pU_Cur, data[4], stride / 2);  
                                 break;  
                         case 5:  
                                 transfer_16to8add(pV_Cur, data[5], stride / 2);  
                                 break;  
355                          }                          }
356                          stop_transfer_timer();  
357                    if ((sum > 2) || (qcoeff[i*64+1] != 0) || (qcoeff[i*64+8] != 0) ) codedecision = 1;
358                    else {
359                            if (pMB->mode == MODE_DIRECT || pMB->mode == MODE_DIRECT_NO4V) {
360                                    // dark blocks prevention for direct mode
361                                    if ( (qcoeff[i*64] < -1) || (qcoeff[i*64] > 0) ) codedecision = 1;
362                            } else
363                                    if (qcoeff[i*64] != 0) codedecision = 1; // not direct mode
364                    }
365    
366                    if (codedecision) cbp |= 1 << (5 - i);
367            }
368    
369    /* we don't have to DeQuant, iDCT and Transfer back data for B-frames if we don't reconstruct this frame */
370    /* warning: reconstruction not supported yet */
371            return (uint8_t) cbp;
372    }
373    
374    /* permute block and return field dct choice */
375    
376    static uint32_t
377    MBDecideFieldDCT(int16_t data[6 * 64])
378    {
379            const uint32_t field = MBFieldTest(data);
380            if (field) MBFrameToField(data);
381    
382            return field;
383                  }                  }
384    
385    /* if sum(diff between field lines) < sum(diff between frame lines), use field dct */
386    
387    uint32_t
388    MBFieldTest_c(int16_t data[6 * 64])
389    {
390            const uint8_t blocks[] =
391                    { 0 * 64, 0 * 64, 0 * 64, 0 * 64, 2 * 64, 2 * 64, 2 * 64, 2 * 64 };
392            const uint8_t lines[] = { 0, 16, 32, 48, 0, 16, 32, 48 };
393    
394            int frame = 0, field = 0;
395            int i, j;
396    
397            for (i = 0; i < 7; ++i) {
398                    for (j = 0; j < 8; ++j) {
399                            frame +=
400                                    ABS(data[0 * 64 + (i + 1) * 8 + j] - data[0 * 64 + i * 8 + j]);
401                            frame +=
402                                    ABS(data[1 * 64 + (i + 1) * 8 + j] - data[1 * 64 + i * 8 + j]);
403                            frame +=
404                                    ABS(data[2 * 64 + (i + 1) * 8 + j] - data[2 * 64 + i * 8 + j]);
405                            frame +=
406                                    ABS(data[3 * 64 + (i + 1) * 8 + j] - data[3 * 64 + i * 8 + j]);
407    
408                            field +=
409                                    ABS(data[blocks[i + 1] + lines[i + 1] + j] -
410                                            data[blocks[i] + lines[i] + j]);
411                            field +=
412                                    ABS(data[blocks[i + 1] + lines[i + 1] + 8 + j] -
413                                            data[blocks[i] + lines[i] + 8 + j]);
414                            field +=
415                                    ABS(data[blocks[i + 1] + 64 + lines[i + 1] + j] -
416                                            data[blocks[i] + 64 + lines[i] + j]);
417                            field +=
418                                    ABS(data[blocks[i + 1] + 64 + lines[i + 1] + 8 + j] -
419                                            data[blocks[i] + 64 + lines[i] + 8 + j]);
420                    }
421            }
422    
423            return (frame >= (field + 350));
424          }          }
425      return cbp;  
426    
427    /* deinterlace Y blocks vertically */
428    
429    #define MOVLINE(X,Y) memcpy(X, Y, sizeof(tmp))
430    #define LINE(X,Y)    &data[X*64 + Y*8]
431    
432    void
433    MBFrameToField(int16_t data[6 * 64])
434    {
435            int16_t tmp[8];
436    
437            /* left blocks */
438    
439            // 1=2, 2=4, 4=8, 8=1
440            MOVLINE(tmp, LINE(0, 1));
441            MOVLINE(LINE(0, 1), LINE(0, 2));
442            MOVLINE(LINE(0, 2), LINE(0, 4));
443            MOVLINE(LINE(0, 4), LINE(2, 0));
444            MOVLINE(LINE(2, 0), tmp);
445    
446            // 3=6, 6=12, 12=9, 9=3
447            MOVLINE(tmp, LINE(0, 3));
448            MOVLINE(LINE(0, 3), LINE(0, 6));
449            MOVLINE(LINE(0, 6), LINE(2, 4));
450            MOVLINE(LINE(2, 4), LINE(2, 1));
451            MOVLINE(LINE(2, 1), tmp);
452    
453            // 5=10, 10=5
454            MOVLINE(tmp, LINE(0, 5));
455            MOVLINE(LINE(0, 5), LINE(2, 2));
456            MOVLINE(LINE(2, 2), tmp);
457    
458            // 7=14, 14=13, 13=11, 11=7
459            MOVLINE(tmp, LINE(0, 7));
460            MOVLINE(LINE(0, 7), LINE(2, 6));
461            MOVLINE(LINE(2, 6), LINE(2, 5));
462            MOVLINE(LINE(2, 5), LINE(2, 3));
463            MOVLINE(LINE(2, 3), tmp);
464    
465            /* right blocks */
466    
467            // 1=2, 2=4, 4=8, 8=1
468            MOVLINE(tmp, LINE(1, 1));
469            MOVLINE(LINE(1, 1), LINE(1, 2));
470            MOVLINE(LINE(1, 2), LINE(1, 4));
471            MOVLINE(LINE(1, 4), LINE(3, 0));
472            MOVLINE(LINE(3, 0), tmp);
473    
474            // 3=6, 6=12, 12=9, 9=3
475            MOVLINE(tmp, LINE(1, 3));
476            MOVLINE(LINE(1, 3), LINE(1, 6));
477            MOVLINE(LINE(1, 6), LINE(3, 4));
478            MOVLINE(LINE(3, 4), LINE(3, 1));
479            MOVLINE(LINE(3, 1), tmp);
480    
481            // 5=10, 10=5
482            MOVLINE(tmp, LINE(1, 5));
483            MOVLINE(LINE(1, 5), LINE(3, 2));
484            MOVLINE(LINE(3, 2), tmp);
485    
486            // 7=14, 14=13, 13=11, 11=7
487            MOVLINE(tmp, LINE(1, 7));
488            MOVLINE(LINE(1, 7), LINE(3, 6));
489            MOVLINE(LINE(3, 6), LINE(3, 5));
490            MOVLINE(LINE(3, 5), LINE(3, 3));
491            MOVLINE(LINE(3, 3), tmp);
492  }  }

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.22.2.1

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4