Fix res factors

This commit is contained in:
Kamil Trzcinski 2022-04-05 21:01:31 +02:00
parent 7e8789b53f
commit f109f3f569
4 changed files with 13 additions and 3 deletions

View File

@ -57,11 +57,11 @@ int camera_open(camera_t *camera)
case V4L2_PIX_FMT_SRGGB10P:
#if 1
if (camera_configure_isp(camera, 1, 0) < 0) {
if (camera_configure_isp(camera, camera->options.high_res_factor, camera->options.low_res_factor) < 0) {
goto error;
}
#else
if (camera_configure_legacy_isp(&camera, 1.3) < 0) {
if (camera_configure_legacy_isp(&camera, camera->options.high_res_factor) < 0) {
goto error;
}
#endif

5
csi_camera.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
set -xeo pipefail
make
./camera_stream -camera-path /dev/v4l/by-path/*.csi-video-index0 "$@"

View File

@ -32,7 +32,7 @@ typedef struct options_s {
#define OPTION_FORMAT_uint "%d"
#define OPTION_FORMAT_hex "%08x"
#define OPTION_FORMAT_bool "%d"
#define OPTION_FORMAT_float "%.1f"
#define OPTION_FORMAT_float "%f"
#define OPTION_FORMAT_string "%s"
#define DEFINE_OPTION(_section, _name, _type) \

5
usb_camera.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
set -xeo pipefail
make
./camera_stream -camera-path /dev/v4l/by-id/usb-*-video-index0 "$@"