camera: improve resolution scaling for non-block camera inputs

This commit is contained in:
Kamil Trzcinski
2023-03-02 12:54:41 +01:00
parent abacfe89ea
commit edba5098d2
4 changed files with 39 additions and 21 deletions

View File

@ -80,11 +80,11 @@ static int camera_configure_input_libcamera(camera_t *camera)
bool found = false;
found = camera_get_scaled_resolution(capture_fmt, &camera->options.snapshot, &capture_fmt);
found = camera_get_scaled_resolution(capture_fmt, &camera->options.snapshot, &capture_fmt, 1);
if (!found)
found = camera_get_scaled_resolution(capture_fmt, &camera->options.stream, &capture_fmt);
found = camera_get_scaled_resolution(capture_fmt, &camera->options.stream, &capture_fmt, 1);
if (!found)
found = camera_get_scaled_resolution(capture_fmt, &camera->options.video, &capture_fmt);
found = camera_get_scaled_resolution(capture_fmt, &camera->options.video, &capture_fmt, 1);
buffer_list_t *camera_capture = device_open_buffer_list(camera->camera, true, capture_fmt, true);
if (!camera_capture) {