v4l2: Ifdef V4L2_PIX_FMT_NV12N_10B
authorChristopher N. Hesse <raymanfx@gmail.com>
Mon, 6 Nov 2017 17:36:31 +0000 (18:36 +0100)
committerJan Altensen <info@stricted.net>
Sun, 5 Apr 2020 01:02:41 +0000 (03:02 +0200)
Older SoCs like 7880 seem to lack this.

Change-Id: I3358703a2f111bbe29baea4de6e044e64432fe4a

libexynosutils/exynos_format_v4l2.c
libvideocodec/dec/ExynosVideoDecoder.c

index 9424bc77fb4408965d5e99c78a2e83311ad51f8f..0590b420d7d3ecf06e967f2fd7b21847e7426ed1 100644 (file)
@@ -103,9 +103,11 @@ int HAL_PIXEL_FORMAT_2_V4L2_PIX(
         v4l2_pixel_format = V4L2_PIX_FMT_NV12M;
         break;
 
+#ifdef V4L2_PIX_FMT_NV12N_10B
     case HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN_S10B:
         v4l2_pixel_format = V4L2_PIX_FMT_NV12N_10B;
         break;
+#endif
 
     case HAL_PIXEL_FORMAT_YCbCr_422_I:
         v4l2_pixel_format = V4L2_PIX_FMT_YUYV;
@@ -252,9 +254,11 @@ int V4L2_PIX_2_HAL_PIXEL_FORMAT(
         hal_pixel_format = HAL_PIXEL_FORMAT_EXYNOS_CrYCbY_422_I;
         break;
 
+#ifdef V4L2_PIX_FMT_NV12N_10B
     case V4L2_PIX_FMT_NV12N_10B:
         hal_pixel_format = HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN_S10B;
         break;
+#endif
 
     default:
         ALOGE("%s::unmatched V4L2_PIX color_space(%d)\n",
index 5b84530242260bbf07a04eb40a6c3e19eabf243c..0bfc3beca4756fe21142177b474bc43eac46b9b6 100644 (file)
@@ -251,7 +251,9 @@ static ExynosVideoColorFormatType __V4L2PixelFormat_To_ColorFormatType(unsigned
         break;
 #ifdef USE_SINGLE_PALNE_SUPPORT
     case V4L2_PIX_FMT_NV12N:
+#ifdef V4L2_PIX_FMT_NV12N_10B
     case V4L2_PIX_FMT_NV12N_10B:
+#endif
         colorFormatType = VIDEO_COLORFORMAT_NV12;
         break;
     case V4L2_PIX_FMT_YUV420N: