|
@@ -19,14 +19,31 @@ gles2_debayer_new(int format)
|
|
|
|
|
|
int shader = 0;
|
|
|
|
|
|
- if (pixfmt == V4L2_PIX_FMT_SBGGR8 || pixfmt == V4L2_PIX_FMT_SGBRG8 ||
|
|
|
- pixfmt == V4L2_PIX_FMT_SGRBG8 || pixfmt == V4L2_PIX_FMT_SRGGB8 ||
|
|
|
- pixfmt == V4L2_PIX_FMT_SBGGR10P || pixfmt == V4L2_PIX_FMT_SGBRG10P ||
|
|
|
- pixfmt == V4L2_PIX_FMT_SGRBG10P || pixfmt == V4L2_PIX_FMT_SRGGB10P) {
|
|
|
- shader = SHADER_DEBAYER;
|
|
|
- } else if (pixfmt == V4L2_PIX_FMT_YUYV) {
|
|
|
- shader = SHADER_YUV;
|
|
|
- } else {
|
|
|
+ switch (pixfmt) {
|
|
|
+ case V4L2_PIX_FMT_SBGGR8:
|
|
|
+ case V4L2_PIX_FMT_SGBRG8:
|
|
|
+ case V4L2_PIX_FMT_SGRBG8:
|
|
|
+ case V4L2_PIX_FMT_SRGGB8:
|
|
|
+ case V4L2_PIX_FMT_SBGGR10P:
|
|
|
+ case V4L2_PIX_FMT_SGBRG10P:
|
|
|
+ case V4L2_PIX_FMT_SGRBG10P:
|
|
|
+ case V4L2_PIX_FMT_SRGGB10P:
|
|
|
+ case V4L2_PIX_FMT_SBGGR10:
|
|
|
+ case V4L2_PIX_FMT_SGBRG10:
|
|
|
+ case V4L2_PIX_FMT_SGRBG10:
|
|
|
+ case V4L2_PIX_FMT_SRGGB10:
|
|
|
+ case V4L2_PIX_FMT_SBGGR12:
|
|
|
+ case V4L2_PIX_FMT_SGBRG12:
|
|
|
+ case V4L2_PIX_FMT_SGRBG12:
|
|
|
+ case V4L2_PIX_FMT_SRGGB12:
|
|
|
+ shader = SHADER_DEBAYER;
|
|
|
+ break;
|
|
|
+ case V4L2_PIX_FMT_YUYV:
|
|
|
+ shader = SHADER_YUV;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (shader == 0) {
|
|
|
return NULL;
|
|
|
}
|
|
|
|