some issues

main
Steffen Pohle 3 months ago
parent 501cf03869
commit 0d127bb882

@ -1,4 +1,4 @@
.SILENT:
# .SILENT:
DEPENDFILE=.depend
VERSION=0.1

@ -20,6 +20,7 @@ Configuration::Configuration() {
runasdaemon = 0;
vdev_iomode = DEFAULT_VDEV_IOMODE;
vdev_device = DEFAULT_VDEV_DEVICE;
vdev_format = "";
ssl_key = DEFAULT_SSL_KEY;
ssl_cert = DEFAULT_SSL_CERT;
initflags = 0;
@ -52,6 +53,7 @@ int Configuration::PrintConfig() {
jp.AddObject("vdev-device", vdev_device);
jp.AddObject("vdev-height", vdev_height);
jp.AddObject("vdev-width", vdev_width);
jp.AddObject("vdev-format", vdev_format);
jp.AddObject("web-height", web_height);
jp.AddObject("web-width", web_width);
@ -91,6 +93,7 @@ int Configuration::LoadFile(std::string fn) {
if (jp.GetValueInt("web-width", &i)) web_width = i;
if (jp.GetValueString("vdev-device", &s)) vdev_device = s;
if (jp.GetValueString("vdev-format", &s)) vdev_format = s;
if (jp.GetValueInt("vdev-iomode", &i)) vdev_iomode = i;
if (jp.GetValueInt("vdev-height", &i)) vdev_height = i;
if (jp.GetValueInt("vdev-width", &i)) vdev_width = i;
@ -157,6 +160,13 @@ int Configuration::LoadArgs(int argc, char **argv) {
else
ErrorExit("missing iomode parameter", -1);
}
if (strcmp(argv[i], "-vdevformat") == 0) {
if (++i < argc) {
vdev_format = argv[i];
}
else
ErrorExit("missing device parameter", -1);
}
if (strcmp(argv[i], "-vdevdevice") == 0) {
if (++i < argc) {
vdev_device = argv[i];
@ -199,6 +209,7 @@ void Configuration::Help() {
printf (" -vdeviomode INT IOMode to read the video data, 0-read, 1-MMap\n");
printf (" -vdevdevice FILE Device File i.e. /dev/video2\n");
printf (" -vdevsize INT INT define video input resolution\n");
printf (" -vdevformat FORMAT 4 Char Format code - see v4l2 documentation (videodev2.h)\n");
printf ("\n");
printf (" -config FILE load this configfile\n");
printf (" -dump_config print the config file\n");

@ -41,6 +41,7 @@ public:
int vdev_width;
int vdev_iomode;
std::string vdev_device;
std::string vdev_format;
Configuration();
~Configuration();

@ -28,6 +28,7 @@ uint32_t convert_pixelformats [] = {
V4L2_PIX_FMT_UYVY,
V4L2_PIX_FMT_SGRBG16,
V4L2_PIX_FMT_SGRBG8,
V4L2_PIX_FMT_SRGGB10P,
0
};
@ -218,6 +219,13 @@ int Convert (ConvertData *cdata, VideoFrame *dest, unsigned char *ptrsrc, int sr
}
break;
case (V4L2_PIX_FMT_SRGGB10P):
if (debayer_mode == 0)
debayer_rggb10packed_simple ((uint16_t *)ptrsrc, srcw, srch, ptrdst, srcw, srch);
else
debayer_rggb10packet_bilinear ((uint16_t *)ptrsrc, srcw, srch, ptrdst, srcw, srch);
break;
case (V4L2_PIX_FMT_SGRBG16):
if (debayer_mode == 0)
debayer_grbg16_simple ((uint16_t *)ptrsrc, srcw, srch, ptrdst, srcw, srch);

@ -364,3 +364,15 @@ void debayer_grbg8_bilinear (uint8_t * src, int src_w, int src_h,
b = LE;
STORE8;
}
void debayer_rggb10packet_simple (uint16_t * src, int src_w, int src_h,
uint8_t * dst, int dst_w, int dst_h) {
};
void debayer_rggb10packet_bilinear (uint8_t * src, int src_w, int src_h,
uint8_t * dst, int dst_w, int dst_h) {
};

@ -5,12 +5,17 @@
void debayer_grbg16_simple (uint16_t * src, int src_w, int src_h,
uint8_t * dst, int dst_w, int dst_h);
void debayer_grbg16_bilinear (uint16_t * src, int src_w, int src_h,
uint8_t * dst, int dst_w, int dst_h);
void debayer_grbg8_simple (uint8_t * src, int src_w, int src_h,
uint8_t * dst, int dst_w, int dst_h);
void debayer_grbg8_bilinear (uint8_t * src, int src_w, int src_h,
uint8_t * dst, int dst_w, int dst_h);
void debayer_grbg16_bilinear (uint16_t * src, int src_w, int src_h,
void debayer_rggb10packet_simple (uint16_t * src, int src_w, int src_h,
uint8_t * dst, int dst_w, int dst_h);
void debayer_grbg8_bilinear (uint8_t * src, int src_w, int src_h,
void debayer_rggb10packet_bilinear (uint8_t * src, int src_w, int src_h,
uint8_t * dst, int dst_w, int dst_h);
#endif

Loading…
Cancel
Save