As discussed in another message the DNG SDK does not seem to be able to write floating point DNGs. Since I need higher dynamic range than a 16 bit sample I instead went for 32 bit integers.
This works, and I manage to create a file but when I run dng_validate on it it says the white level is invalid. The white level I have of course set to 0xFFFFFFFF to make use of the full 32 bit range. Looking into the code in dng_ifd.cpp where this test is made it seems like the default max white level is set to 65535.0 and the file's white level is compared against that, regardless if the sample type is 16 or 32 bit. This means that I can only make use of 16 bits of the 32 bit integer which seems kind of strange. Looking into the DNG spec I don't see anything there that forbids using the full 32 bit range of 32 bit samples. So this looks like a bug to me.
This is with version 1.4
the created file can be opened in Lightroom 4, so the only problem seems to be that dng_validate does not think its valid.
Message was edited by: torger76, removed clipping issue, that was a fault in my code.