|
|
|
@ -1289,8 +1289,9 @@ static int stbiw__jpg_processDU(stbi__write_context *s, int *bitBuf, int *bitCnt |
|
|
|
|
// Quantize/descale/zigzag the coefficients
|
|
|
|
|
for(y = 0, j=0; y < 8; ++y) { |
|
|
|
|
for(x = 0; x < 8; ++x,++j) { |
|
|
|
|
float v; |
|
|
|
|
i = y*du_stride+x; |
|
|
|
|
float v = CDU[i]*fdtbl[j]; |
|
|
|
|
v = CDU[i]*fdtbl[j]; |
|
|
|
|
// DU[stbiw__jpg_ZigZag[j]] = (int)(v < 0 ? ceilf(v - 0.5f) : floorf(v + 0.5f));
|
|
|
|
|
// ceilf() and floorf() are C99, not C89, but I /think/ they're not needed here anyway?
|
|
|
|
|
DU[stbiw__jpg_ZigZag[j]] = (int)(v < 0 ? v - 0.5f : v + 0.5f); |
|
|
|
|