Changeset 9612 for trunk/mgpp/lib/bitio_m_abstract.h
- Timestamp:
- 2005-04-08T15:41:31+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mgpp/lib/bitio_m_abstract.h
r3365 r9612 22 22 while (_B_x != 0) { 23 23 _B_x >>= 1; 24 reply ++;24 ++reply; 25 25 } 26 26 return reply; … … 35 35 while (_B_x != 0) { 36 36 _B_x >>= 1; 37 reply ++;37 ++reply; 38 38 } 39 39 return reply; … … 44 44 45 45 x = 1; 46 while (!this->bit()) x++;46 while (!this->bit()) ++x; 47 47 if (count != NULL) { 48 48 *count += x; … … 72 72 _B_logofb = ceil_log2(_B_b); 73 73 _B_thresh = (1<<_B_logofb) - _B_b; 74 _B_logofb--;74 --_B_logofb; 75 75 76 76 if (count != NULL) { … … 78 78 } 79 79 80 for (_B_i=0; _B_i < _B_logofb; _B_i++) {80 for (_B_i=0; _B_i < _B_logofb; ++_B_i) { 81 81 _B_x += _B_x + this->bit(); 82 82 } … … 123 123 124 124 _B_xdivb = this->unary_decode(count); 125 _B_xdivb--;125 --_B_xdivb; 126 126 while (_B_xdivb--) { 127 127 _B_xx += _B_bb; … … 136 136 register int _B_xdivb = 0; 137 137 check_positive("bblock", _B_xx); 138 _B_xx--;138 --_B_xx; 139 139 while (_B_xx >= _B_bb) { 140 _B_xdivb++;140 ++_B_xdivb; 141 141 _B_xx -= _B_bb; 142 142 } … … 154 154 155 155 _B_k = this->unary_decode(count); 156 _B_k--;156 --_B_k; 157 157 while (_B_k--) { 158 158 _B_lower = _B_upper+1; … … 161 161 } 162 162 _B_xx = this->binary_decode(_B_upper-_B_lower+1, count); 163 _B_xx--;163 --_B_xx; 164 164 check_positive("gamma", _B_xx+_B_lower); 165 165 return _B_xx+_B_lower; … … 177 177 178 178 while ((int)_B_xx>_B_upper) { 179 _B_k++;179 ++_B_k; 180 180 _B_lower = _B_upper+1; 181 181 _B_pow *= _B_s; … … 190 190 register int _B_nbits = 0; 191 191 192 while(!this->bit()) _B_nbits++;192 while(!this->bit()) ++_B_nbits; 193 193 if (count != NULL) { 194 194 *count += _B_nbits*2+1; … … 219 219 register int _B_logx; 220 220 _B_logx = gamma_decode(count); 221 _B_logx--;221 --_B_logx; 222 222 _B_xxx = binary_decode(1<<_B_logx, count); 223 _B_xxx--;223 --_B_xxx; 224 224 return (_B_xxx + (1<<_B_logx)); 225 225 } … … 241 241 do { 242 242 __code += __code + bit(); 243 if (count != NULL) (*count) ++;243 if (count != NULL) ++(*count); 244 244 } while (__code < *++__mclen); 245 245 … … 252 252 register int __clen = lens[x]; 253 253 register unsigned long __code = codes[x]; 254 for (__i=__clen-1; __i>=0; __i--) {254 for (__i=__clen-1; __i>=0; --__i) { 255 255 encodeBit((__code >> __i) & 1); 256 256 } … … 284 284 285 285 check_positive("bblock", _B_xx); 286 _B_xx--;286 --_B_xx; 287 287 while (_B_xx >= _B_bb) { 288 _B_xdivb++;288 ++_B_xdivb; 289 289 _B_xx -= _B_bb; 290 290 } … … 307 307 308 308 while ((int)(_B_xx)>_B_upper) { 309 _B_k++;309 ++_B_k; 310 310 _B_lower = _B_upper+1; 311 311 _B_pow *= _B_s;
Note:
See TracChangeset
for help on using the changeset viewer.