| 3315 | } |
| 3316 | |
| 3317 | static void stbi__jpeg_finish(stbi__jpeg* z) { |
| 3318 | if (z->progressive) { |
| 3319 | // dequantize and idct the data |
| 3320 | int i, j, n; |
| 3321 | for (n = 0; n < z->s->img_n; ++n) { |
| 3322 | int w = (z->img_comp[n].x + 7) >> 3; |
| 3323 | int h = (z->img_comp[n].y + 7) >> 3; |
| 3324 | for (j = 0; j < h; ++j) { |
| 3325 | for (i = 0; i < w; ++i) { |
| 3326 | short* data = z->img_comp[n].coeff + |
| 3327 | 64 * (i + j * z->img_comp[n].coeff_w); |
| 3328 | stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); |
| 3329 | z->idct_block_kernel( |
| 3330 | z->img_comp[n].data + z->img_comp[n].w2 * j * 8 + i * 8, |
| 3331 | z->img_comp[n].w2, data); |
| 3332 | } |
| 3333 | } |
| 3334 | } |
| 3335 | } |
| 3336 | } |
| 3337 | |
| 3338 | static int stbi__process_marker(stbi__jpeg* z, int m) { |
| 3339 | int L; |
no test coverage detected