Fixes image quality at lower resolutions

This commit is contained in:
Kwabena W. Agyeman 2020-07-16 17:26:47 -07:00
parent 1789910002
commit 24d637f3ef

View File

@ -437,6 +437,8 @@ static int calculate_hts(sensor_t *sensor, uint16_t width)
if (width > 640) hts = IM_MAX((width * 2) + 8, hts_target);
}
if (width <= 640) hts += 160; // Fix image quality at low resolutions.
return IM_MAX(hts + HSYNC_TIME, (SENSOR_WIDTH + HSYNC_TIME) / 2); // Fix to prevent crashing.
}