| 262 | } |
| 263 | |
| 264 | void IntegerCompressor::compress(I32 pred, I32 real, U32 context) |
| 265 | { |
| 266 | assert(enc); |
| 267 | // the corrector will be within the interval [ - (corr_range - 1) ... + (corr_range - 1) ] |
| 268 | I32 corr = real - pred; |
| 269 | // we fold the corrector into the interval [ corr_min ... corr_max ] |
| 270 | if (corr < corr_min) corr += corr_range; |
| 271 | else if (corr > corr_max) corr -= corr_range; |
| 272 | writeCorrector(corr, mBits[context]); |
| 273 | } |
| 274 | |
| 275 | void IntegerCompressor::initDecompressor() |
| 276 | { |
no outgoing calls
no test coverage detected