From: Christopher N. Hesse Date: Mon, 6 Nov 2017 17:36:31 +0000 (+0100) Subject: v4l2: Ifdef V4L2_PIX_FMT_NV12N_10B X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=360b399781e871878a77795252878547f5e3530f;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_exynos.git v4l2: Ifdef V4L2_PIX_FMT_NV12N_10B Older SoCs like 7880 seem to lack this. Change-Id: I3358703a2f111bbe29baea4de6e044e64432fe4a --- diff --git a/libexynosutils/exynos_format_v4l2.c b/libexynosutils/exynos_format_v4l2.c index 9424bc7..0590b42 100644 --- a/libexynosutils/exynos_format_v4l2.c +++ b/libexynosutils/exynos_format_v4l2.c @@ -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", diff --git a/libvideocodec/dec/ExynosVideoDecoder.c b/libvideocodec/dec/ExynosVideoDecoder.c index 5b84530..0bfc3be 100644 --- a/libvideocodec/dec/ExynosVideoDecoder.c +++ b/libvideocodec/dec/ExynosVideoDecoder.c @@ -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: