Skip to content

Instantly share code, notes, and snippets.

View j4m3z0r's full-sized avatar

James Gregory j4m3z0r

View GitHub Profile
@j4m3z0r
j4m3z0r / dcraw-nefdecode.c
Last active October 18, 2017 23:50
NEF bitstream decoding from dcraw
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;
000:<: am lsb-first want 11:0 authorising with '' of length 0
000:>: Success, version is 11:0 vendor='The X.Org Foundation' release=11804000 resource-id=0x00c00000 resource-mask=0x001fffff motion-buffer-size=256 max-request-len=65535 image-byte-order=LSBFirst(0x00) bitmap-bit-order=LeastSignificant(0x00) scanline-unit=32 scanline-pad=32 min-keycode=0x08 max-keycode=0x00 pixmap-formats={depth=1 bits/pixel=1 scanline-pad=32},{depth=4 bits/pixel=8 scanline-pad=32},{depth=8 bits/pixel=8 scanline-pad=32},{depth=15 bits/pixel=16 scanline-pad=32},{depth=16 bits/pixel=16 scanline-pad=32},{depth=24 bits/pixel=32 scanline-pad=32},{depth=32 bits/pixel=32 scanline-pad=32}; roots={root=0x000001e7 default-colormap=0x00000020 white-pixel=0x00ffffff black-pixel=0x00000000 input-mask=KeyPress,KeyRelease,StructureNotify,SubstructureNotify,SubstructureRedirect,FocusChange,PropertyChange,ColormapChange width[pixel]=2560 height[pixel]=1600 width[mm]=677 height[mm]=423 min-installed-maps=1 max-installed-maps=1 root=0x00000021 back