Update decoding state */ sy_f is the interval length (frequency of the symbol) */ lt_f is the lower end (frequency sum of < symbols) */ tot_f is the total interval length (total frequency sum) */
| 246 | /* lt_f is the lower end (frequency sum of < symbols) */ |
| 247 | /* tot_f is the total interval length (total frequency sum) */ |
| 248 | void RangeDecoder::update(U32 sy_f, U32 lt_f, U32 tot_f) |
| 249 | { |
| 250 | U32 tmp; |
| 251 | tmp = help * lt_f; |
| 252 | low -= tmp; |
| 253 | #ifdef EXTRAFAST |
| 254 | this->range = help * sy_f; |
| 255 | #else |
| 256 | if (lt_f + sy_f < tot_f) |
| 257 | { |
| 258 | this->range = help * sy_f; |
| 259 | } |
| 260 | else |
| 261 | { |
| 262 | this->range -= tmp; |
| 263 | } |
| 264 | #endif |
| 265 | } |
| 266 | |
| 267 | inline void RangeDecoder::normalize() |
| 268 | { |