Changeset 13658 for trunk/indexers
- Timestamp:
- 2007-01-17T11:56:49+13:00 (17 years ago)
- Location:
- trunk/indexers/mg/lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/indexers/mg/lib/bitio_m.h
r13654 r13658 57 57 register int _B_x = (x) - 1; \ 58 58 (v) = 0; \ 59 for (; _B_x ; _B_x>>=1, (v)++); \59 for (; _B_x ; _B_x>>=1, ++(v)); \ 60 60 } while(0) 61 61 … … 65 65 register int _B_x = (x); \ 66 66 (v) = -1; \ 67 for (; _B_x ; _B_x>>=1, (v)++); \67 for (; _B_x ; _B_x>>=1, ++(v)); \ 68 68 } while(0) 69 69 … … 98 98 BIO_DECODE_PROLOGUE; \ 99 99 (x) = 1; \ 100 while (!DECODE_BIT) (x)++; \100 while (!DECODE_BIT) ++(x); \ 101 101 BIO_DECODE_EPILOGUE; \ 102 102 } while(0) … … 106 106 BIO_DECODE_PROLOGUE; \ 107 107 (x) = 1; \ 108 while (!DECODE_BIT) (x)++; \108 while (!DECODE_BIT) ++(x); \ 109 109 (count) += (x); \ 110 110 BIO_DECODE_EPILOGUE; \ … … 176 176 CEILLOG_2(_B_b, _B_logofb); \ 177 177 _B_thresh = (1<<_B_logofb) - _B_b; \ 178 _B_logofb--; \179 for (_B_i=0; _B_i < _B_logofb; _B_i++) \178 --_B_logofb; \ 179 for (_B_i=0; _B_i < _B_logofb; ++_B_i) \ 180 180 DECODE_ADD(_B_x); \ 181 181 if (_B_x >= _B_thresh) \ … … 201 201 CEILLOG_2(_B_b, _B_logofb); \ 202 202 _B_thresh = (1<<_B_logofb) - _B_b; \ 203 _B_logofb--; \203 --_B_logofb; \ 204 204 (count) += _B_logofb; \ 205 for (_B_i=0; _B_i < _B_logofb; _B_i++) \205 for (_B_i=0; _B_i < _B_logofb; ++_B_i) \ 206 206 DECODE_ADD(_B_x); \ 207 207 if (_B_x >= _B_thresh) \ … … 209 209 DECODE_ADD(_B_x); \ 210 210 _B_x -= _B_thresh; \ 211 (count)++; \211 ++(count); \ 212 212 } \ 213 213 (x) = _B_x+1; \ … … 274 274 register int _B_nbits = 0; \ 275 275 BIO_DECODE_PROLOGUE; \ 276 while(!DECODE_BIT) _B_nbits++; \276 while(!DECODE_BIT) ++_B_nbits; \ 277 277 while (_B_nbits-- > 0) \ 278 278 DECODE_ADD(_B_xx); \ … … 286 286 register int _B_nbits = 0; \ 287 287 BIO_DECODE_PROLOGUE; \ 288 while(!DECODE_BIT) _B_nbits++; \288 while(!DECODE_BIT) ++_B_nbits; \ 289 289 (count) += _B_nbits*2+1; \ 290 290 while (_B_nbits-- > 0) \ … … 331 331 register unsigned long _B_xxx; \ 332 332 register int _B_logx; \ 333 GAMMA_DECODE(_B_logx); _B_logx--; \334 BINARY_DECODE(_B_xxx, 1<<_B_logx); _B_xxx--; \333 GAMMA_DECODE(_B_logx); --_B_logx; \ 334 BINARY_DECODE(_B_xxx, 1<<_B_logx); --_B_xxx; \ 335 335 (x) = _B_xxx + (1<<_B_logx); \ 336 336 } while (0) … … 340 340 register unsigned long _B_xxx; \ 341 341 register int _B_logx; \ 342 GAMMA_DECODE_L(_B_logx, count); _B_logx--; \343 BINARY_DECODE_L(_B_xxx, 1<<_B_logx, count); _B_xxx--; \342 GAMMA_DECODE_L(_B_logx, count); --_B_logx; \ 343 BINARY_DECODE_L(_B_xxx, 1<<_B_logx, count); --_B_xxx; \ 344 344 (x) = _B_xxx + (1<<_B_logx); \ 345 345 } while (0) … … 372 372 while (_B_xx>_B_upper) \ 373 373 { \ 374 _B_k++; \374 ++_B_k; \ 375 375 _B_lower = _B_upper+1; \ 376 376 _B_pow *= _B_s; \ … … 392 392 while (_B_xx>_B_upper) \ 393 393 { \ 394 _B_k++; \394 ++_B_k; \ 395 395 _B_lower = _B_upper+1; \ 396 396 _B_pow *= _B_s; \ … … 409 409 register int _B_k; \ 410 410 register double _B_pow=1.0; \ 411 UNARY_DECODE(_B_k); _B_k--; \411 UNARY_DECODE(_B_k); --_B_k; \ 412 412 while (_B_k--) \ 413 413 { \ … … 416 416 _B_upper += _B_b*_B_pow; \ 417 417 } \ 418 BINARY_DECODE(_B_xx, _B_upper-_B_lower+1); _B_xx--; \418 BINARY_DECODE(_B_xx, _B_upper-_B_lower+1); --_B_xx; \ 419 419 POSITIVE(gamma, _B_xx+_B_lower); \ 420 420 (x) = _B_xx+_B_lower; \ … … 429 429 register int _B_k; \ 430 430 register double _B_pow=1.0; \ 431 UNARY_DECODE_L(_B_k, count); _B_k--; \431 UNARY_DECODE_L(_B_k, count); --_B_k; \ 432 432 while (_B_k--) \ 433 433 { \ … … 436 436 _B_upper += _B_b*_B_pow; \ 437 437 } \ 438 BINARY_DECODE_L(_B_xx, _B_upper-_B_lower+1, count); _B_xx--; \438 BINARY_DECODE_L(_B_xx, _B_upper-_B_lower+1, count); --_B_xx; \ 439 439 POSITIVE(gamma, _B_xx+_B_lower); \ 440 440 (x) = _B_xx+_B_lower; \ … … 452 452 while (_B_xx>_B_upper) \ 453 453 { \ 454 _B_k++; \454 ++_B_k; \ 455 455 _B_lower = _B_upper+1; \ 456 456 _B_pow *= _B_s; \ … … 472 472 register int _B_xdivb = 0; \ 473 473 POSITIVE(bblock, _B_xx); \ 474 _B_xx--; \474 --_B_xx; \ 475 475 while (_B_xx >= _B_bb) \ 476 476 { \ 477 _B_xdivb++; \477 ++_B_xdivb; \ 478 478 _B_xx -= _B_bb; \ 479 479 } \ … … 488 488 register int _B_xdivb = 0; \ 489 489 POSITIVE(bblock, _B_xx); \ 490 _B_xx--; \490 --_B_xx; \ 491 491 while (_B_xx >= _B_bb) \ 492 492 { \ 493 _B_xdivb++; \493 ++_B_xdivb; \ 494 494 _B_xx -= _B_bb; \ 495 495 } \ … … 503 503 register unsigned long _B_bb = (b); \ 504 504 register int _B_xdivb; \ 505 UNARY_DECODE(_B_xdivb); _B_xdivb--; \505 UNARY_DECODE(_B_xdivb); --_B_xdivb; \ 506 506 while (_B_xdivb--) \ 507 507 _B_xx += _B_bb; \ … … 515 515 register unsigned long _B_bb = (b); \ 516 516 register int _B_xdivb; \ 517 UNARY_DECODE_L(_B_xdivb, count); _B_xdivb--; \517 UNARY_DECODE_L(_B_xdivb, count); --_B_xdivb; \ 518 518 while (_B_xdivb--) \ 519 519 _B_xx += _B_bb; \ … … 528 528 register int _B_xdivb = 0; \ 529 529 POSITIVE(bblock, _B_xx); \ 530 _B_xx--; \530 --_B_xx; \ 531 531 while (_B_xx >= _B_bb) \ 532 532 { \ 533 _B_xdivb++; \533 ++_B_xdivb; \ 534 534 _B_xx -= _B_bb; \ 535 535 } \ -
trunk/indexers/mg/lib/bitio_m_mem.h
r13654 r13658 72 72 #define ENCODE_BIT(b) \ 73 73 do { \ 74 __btg--; \74 --__btg; \ 75 75 if (b) __buff |= (1 << __btg); \ 76 76 if (!__btg) \ … … 79 79 { \ 80 80 *__pos++ = __buff; \ 81 __remaining--; \81 --__remaining; \ 82 82 } \ 83 83 __buff = 0; \ … … 100 100 { \ 101 101 *__pos++ = __buff; \ 102 __remaining--; \102 --__remaining; \ 103 103 } \ 104 104 __btg = sizeof(__buff)*8; \ … … 133 133 { \ 134 134 __buff = *__pos++; \ 135 __remaining--; \135 --__remaining; \ 136 136 } \ 137 137 else \ … … 149 149 { \ 150 150 __buff = *__pos++; \ 151 __remaining--; \151 --__remaining; \ 152 152 } \ 153 153 else \ -
trunk/indexers/mg/lib/bitio_m_mems.h
r13654 r13658 57 57 else \ 58 58 __base[__pos>>3] &= 0xff7f >> (__pos&7); \ 59 __pos++; \59 ++__pos; \ 60 60 } while(0) 61 61 … … 86 86 do { \ 87 87 (b) += (b) + (__base[__pos>>3] & (0x80 >> (__pos&7)) != 0); \ 88 __pos++; \88 ++__pos; \ 89 89 } while(0) 90 90 -
trunk/indexers/mg/lib/bitio_m_stdio.h
r13654 r13658 63 63 #define ENCODE_BIT(b) \ 64 64 do { \ 65 __btg--; \65 --__btg; \ 66 66 if (b) __buff |= (1 << __btg); \ 67 67 if (!__btg) \ -
trunk/indexers/mg/lib/huffman.h
r13654 r13658 67 67 register int __clen = (lens)[x]; \ 68 68 register unsigned long __code = (codes)[x]; \ 69 for (__i=__clen-1; __i>=0; __i--) \69 for (__i=__clen-1; __i>=0; --__i) \ 70 70 ENCODE_BIT((__code >> __i) & 1); \ 71 71 } while(0)
Note:
See TracChangeset
for help on using the changeset viewer.