Although most functions in LibRaw/internal/dcraw_common.cpp looks like untaltered dcraw.c code, this is not completely true.
Data layout in LibRaw is different and old (dcraw's) variables are #define-d in internal/var_defines.h
You may try this approach:
1) Subclass LibRaw:
class MyLibRaw: public LibRaw....
2) Implement own dcraw_process() (with different function name) and build it using dcraw/libraw functions (pre_interpolate(), scale_colors(), etc)
Although most functions in LibRaw/internal/dcraw_common.cpp looks like untaltered dcraw.c code, this is not completely true.
Data layout in LibRaw is different and old (dcraw's) variables are #define-d in internal/var_defines.h
You may try this approach:
1) Subclass LibRaw:
2) Implement own dcraw_process() (with different function name) and build it using dcraw/libraw functions (pre_interpolate(), scale_colors(), etc)