LibRaw's postprocessing is LibRaw's postprocessing is mostly similar with dcraw.c's one (that's why postprocessing procedure is called dcraw_process()) So, most of your questions are answered in 'dcraw annotated' site: https://ninedegreesbelow.com/files/dcraw-c-code-annotated-code.html For DNG-specific processing (color data extraction etc) look into DNG specs -- Alex Tutubalin @LibRaw LLC reply
LibRaw's postprocessing is mostly similar with dcraw.c's one (that's why postprocessing procedure is called dcraw_process())
So, most of your questions are answered in 'dcraw annotated' site: https://ninedegreesbelow.com/files/dcraw-c-code-annotated-code.html
For DNG-specific processing (color data extraction etc) look into DNG specs