Only decode specific area.

Hi. Great library.
I wish to decode only part or parts of the image, kind of as what happens in the 'half size' mode. If not, i can demosaic myself and for that i need to acces the bayer data in parts. How do i do that?
The reason is
(1) that i often only want one part of the image processed.
(2) i want to speed it up by multithreading, as i cant use openmp (using clang). I could just cut the image in quadrants and process them to have a 4x speedup.

Tim

Forums: 

1) half-size interpolation is

1) half-size interpolation is a special (very fast) mode: each 4 bayer pixels (r-g-b-g) are joined into one RGB pixel with two greens averaged.
2) There is no way to do partial RAW decoding (LibRaw::unpack()), all RAW data always decoded.
3) For partial processing you may set imgdata.params.cropbox (to x1,y1,x2,y2) and LibRaw::dcraw_process() will return you part of image. This is not thread safe, so cannot be used in parallel.
4) LibRaw can use OpenMP for parts of processing (e.g. AHD interpolation), just compile it with OpenMP

-- Alex Tutubalin