Merge branch 'master' of https://github.com/enginmanap/stb
This commit is contained in:
commit
68c8e4851a
@ -1724,11 +1724,12 @@ static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg *j, short data[64], stbi__
|
|||||||
short *p = &data[stbi__jpeg_dezigzag[k]];
|
short *p = &data[stbi__jpeg_dezigzag[k]];
|
||||||
if (*p != 0)
|
if (*p != 0)
|
||||||
if (stbi__jpeg_get_bit(j))
|
if (stbi__jpeg_get_bit(j))
|
||||||
if ((*p & bit)==0)
|
if ((*p & bit)==0) {
|
||||||
if (*p > 0)
|
if (*p > 0)
|
||||||
*p += bit;
|
*p += bit;
|
||||||
else
|
else
|
||||||
*p -= bit;
|
*p -= bit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
k = j->spec_start;
|
k = j->spec_start;
|
||||||
@ -1760,11 +1761,12 @@ static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg *j, short data[64], stbi__
|
|||||||
short *p = &data[stbi__jpeg_dezigzag[k]];
|
short *p = &data[stbi__jpeg_dezigzag[k]];
|
||||||
if (*p != 0) {
|
if (*p != 0) {
|
||||||
if (stbi__jpeg_get_bit(j))
|
if (stbi__jpeg_get_bit(j))
|
||||||
if ((*p & bit)==0)
|
if ((*p & bit)==0) {
|
||||||
if (*p > 0)
|
if (*p > 0)
|
||||||
*p += bit;
|
*p += bit;
|
||||||
else
|
else
|
||||||
*p -= bit;
|
*p -= bit;
|
||||||
|
}
|
||||||
++k;
|
++k;
|
||||||
} else {
|
} else {
|
||||||
if (r == 0) {
|
if (r == 0) {
|
||||||
@ -2420,7 +2422,6 @@ static int stbi__parse_entropy_coded_data(stbi__jpeg *z)
|
|||||||
for (x=0; x < z->img_comp[n].h; ++x) {
|
for (x=0; x < z->img_comp[n].h; ++x) {
|
||||||
int x2 = (i*z->img_comp[n].h + x);
|
int x2 = (i*z->img_comp[n].h + x);
|
||||||
int y2 = (j*z->img_comp[n].v + y);
|
int y2 = (j*z->img_comp[n].v + y);
|
||||||
int ha = z->img_comp[n].ha;
|
|
||||||
short *data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w);
|
short *data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w);
|
||||||
if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n))
|
if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n))
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user