Bryan I'm a little lost as to what you are aiming for.
You want to use the RAW information. You've mentioned DNG aswell. ( what camera version do you have? )
I very recently created a pretty simple to use python script to do this:
I believe it creates a pretty decent output in terms of color/quality and with the addition
of standard lossless DNG compression you can half the file size at no cost. Really cant get better than that.
The mentioned C tool will pack the RAW into a 16bit DNG. It works with both V1 and V2.
But lacks the correct color matrix and doesn't do any RAW calibration prior to packing it ( lens shading, hot pixel removal )
If you want to use the RAW data, do some debayering and then output into a more standard format you could possibly explore OpenCV debayer aswell.
Not to "inflate" or "hype" myself here, but in this situation I believe my aforementioned script above
will give you the best result if DNG is what you are after. Go ahead and tweak it as you see fit.
I realize too its not the most intuitive to work with, but should be quite workable.
I'm really trying to get the process done right, so feedback is very welcome.