Autoscaling CMOS APS with customized increase of dynamic range