fix reading of DC scaling factor
add includes for Windows compiler