| 295 | } |
| 296 | |
| 297 | static inline int wv_get_value_integer(WavpackFrameContext *s, uint32_t *crc, |
| 298 | unsigned S) |
| 299 | { |
| 300 | unsigned bit; |
| 301 | |
| 302 | if (s->extra_bits) { |
| 303 | S *= 1 << s->extra_bits; |
| 304 | |
| 305 | if (s->got_extra_bits && |
| 306 | get_bits_left(&s->gb_extra_bits) >= s->extra_bits) { |
| 307 | S |= get_bits_long(&s->gb_extra_bits, s->extra_bits); |
| 308 | *crc = *crc * 9 + (S & 0xffff) * 3 + ((unsigned)S >> 16); |
| 309 | } |
| 310 | } |
| 311 | |
| 312 | bit = (S & s->and) | s->or; |
| 313 | bit = ((S + bit) << s->shift) - bit; |
| 314 | |
| 315 | if (s->hybrid) |
| 316 | bit = av_clip(bit, s->hybrid_minclip, s->hybrid_maxclip); |
| 317 | |
| 318 | return bit << s->post_shift; |
| 319 | } |
| 320 | |
| 321 | static float wv_get_value_float(WavpackFrameContext *s, uint32_t *crc, int S) |
| 322 | { |
no test coverage detected