MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / stbi__jpeg_finish

Function stbi__jpeg_finish

Source/Utils/stb_image.h:3079–3096  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3077}
3078
3079static 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
3098static int stbi__process_marker(stbi__jpeg *z, int m)
3099{

Callers 1

stbi__decode_jpeg_imageFunction · 0.85

Calls 1

stbi__jpeg_dequantizeFunction · 0.85

Tested by

no test coverage detected