Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (min=row=0; row < height; row++) {
- if (split && row == split) {
- free (huff);
- huff = make_decoder (nikon_tree[tree+1]);
- max += (min = 16) << 1;
- }
- for (col=0; col < raw_width; col++) {
- i = gethuff(huff);
- len = i & 15;
- shl = i >> 4;
- diff = ((getbits(len-shl) << 1) + 1) << shl >> 1;
- if ((diff & (1 << (len-1))) == 0)
- diff -= (1 << len) - !shl;
- if (col < 2) hpred[col] = vpred[row & 1][col] += diff;
- else hpred[col & 1] += diff;
- if ((ushort)(hpred[col & 1] + min) >= max) derror();
- RAW(row,col) = curve[LIM((short)hpred[col & 1],0,0x3fff)];
- }
- }
- free (huff);
Add Comment
Please, Sign In to add comment