* Get one coefficient value from the bistream and store it. */
| 287 | * Get one coefficient value from the bistream and store it. |
| 288 | */ |
| 289 | static inline void decode_coeff(DCTELEM *dst, int coef, int esc, GetBitContext *gb, VLC* vlc) |
| 290 | { |
| 291 | if(coef){ |
| 292 | if(coef == esc){ |
| 293 | coef = get_vlc2(gb, vlc->table, 9, 2); |
| 294 | if(coef > 23){ |
| 295 | coef -= 23; |
| 296 | coef = 22 + ((1 << coef) | get_bits(gb, coef)); |
| 297 | } |
| 298 | coef += esc; |
| 299 | } |
| 300 | if(get_bits1(gb)) |
| 301 | coef = -coef; |
| 302 | *dst = coef; |
| 303 | } |
| 304 | } |
| 305 | |
| 306 | /** |
| 307 | * Decode 2x2 subblock of coefficients. |
no test coverage detected