| 3077 | } |
| 3078 | |
| 3079 | static void stbi__jpeg_finish(stbi__jpeg *z) |
| 3080 | { |
| 3081 | if (z->progressive) { |
| 3082 | // dequantize and idct the data |
| 3083 | int i,j,n; |
| 3084 | for (n=0; n < z->s->img_n; ++n) { |
| 3085 | int w = (z->img_comp[n].x+7) >> 3; |
| 3086 | int h = (z->img_comp[n].y+7) >> 3; |
| 3087 | for (j=0; j < h; ++j) { |
| 3088 | for (i=0; i < w; ++i) { |
| 3089 | short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); |
| 3090 | stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); |
| 3091 | z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data); |
| 3092 | } |
| 3093 | } |
| 3094 | } |
| 3095 | } |
| 3096 | } |
| 3097 | |
| 3098 | static int stbi__process_marker(stbi__jpeg *z, int m) |
| 3099 | { |
no test coverage detected