camera: add support for V4L2_PIX_FMT_SBGGR10P
This commit is contained in:
parent
c9600d1253
commit
3bc447c772
@ -65,6 +65,7 @@ option_value_t camera_formats[] = {
|
||||
{ "RG10", V4L2_PIX_FMT_SRGGB10 },
|
||||
{ "GB10P", V4L2_PIX_FMT_SGRBG10P },
|
||||
{ "RG10P", V4L2_PIX_FMT_SRGGB10P },
|
||||
{ "BG10P", V4L2_PIX_FMT_SBGGR10P },
|
||||
{ "RGB565", V4L2_PIX_FMT_RGB565 },
|
||||
{ "RGBP", V4L2_PIX_FMT_RGB565 },
|
||||
{ "RGB24", V4L2_PIX_FMT_RGB24 },
|
||||
|
@ -90,6 +90,7 @@ int camera_configure_output(camera_t *camera, const char *name, unsigned target_
|
||||
}
|
||||
|
||||
if (!src_capture) {
|
||||
LOG_INFO(camera, "Cannot find source for '%s' for one of the formats '%s'.", name, many_fourcc_to_string(formats).buf);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -54,6 +54,7 @@ int camera_configure_pipeline(camera_t *camera, buffer_list_t *capture)
|
||||
switch (capture->fmt.format) {
|
||||
case V4L2_PIX_FMT_SRGGB10P:
|
||||
case V4L2_PIX_FMT_SGRBG10P:
|
||||
case V4L2_PIX_FMT_SBGGR10P:
|
||||
case V4L2_PIX_FMT_SRGGB10:
|
||||
case V4L2_PIX_FMT_SGRBG10:
|
||||
camera_configure_isp(camera, capture);
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "fourcc.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
fourcc_string fourcc_to_string(unsigned format)
|
||||
{
|
||||
fourcc_string fourcc;
|
||||
@ -19,3 +21,17 @@ fourcc_string fourcc_to_string(unsigned format)
|
||||
*ptr++ = 0;
|
||||
return fourcc;
|
||||
}
|
||||
|
||||
many_fourcc_string many_fourcc_to_string(unsigned formats[])
|
||||
{
|
||||
many_fourcc_string fourcc = {0};
|
||||
|
||||
for (int i = 0; formats[i]; i++) {
|
||||
if (fourcc.buf[0]) {
|
||||
strcat(fourcc.buf, ", ");
|
||||
}
|
||||
strcat(fourcc.buf, fourcc_to_string(formats[i]).buf);
|
||||
}
|
||||
|
||||
return fourcc;
|
||||
}
|
||||
|
@ -7,4 +7,9 @@ typedef struct {
|
||||
char buf[10];
|
||||
} fourcc_string;
|
||||
|
||||
typedef struct {
|
||||
char buf[250];
|
||||
} many_fourcc_string;
|
||||
|
||||
fourcc_string fourcc_to_string(unsigned format);
|
||||
many_fourcc_string many_fourcc_to_string(unsigned formats[]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user