case HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_P:
v4l2_pixel_format = V4L2_PIX_FMT_YUV420;
break;
-
+#ifdef V4L2_PIX_FMT_YUV420N
case HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_PN:
v4l2_pixel_format = V4L2_PIX_FMT_YUV420N;
break;
-
+#endif
case HAL_PIXEL_FORMAT_YCbCr_422_SP:
v4l2_pixel_format = V4L2_PIX_FMT_NV16;
break;
case HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP:
v4l2_pixel_format = V4L2_PIX_FMT_NV12;
break;
-
+#ifdef V4L2_PIX_FMT_NV12N
case HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN:
v4l2_pixel_format = V4L2_PIX_FMT_NV12N;
break;
-
+#endif
case HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M:
case HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_PRIV:
case HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_S10B:
v4l2_pixel_format = V4L2_PIX_FMT_NV12MT_16X16;
#endif
break;
-
+#ifdef V4L2_PIX_FMT_NV12NT
case HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN_TILED:
v4l2_pixel_format = V4L2_PIX_FMT_NV12NT;
break;
-
+#endif
case HAL_PIXEL_FORMAT_EXYNOS_YCrCb_422_I:
v4l2_pixel_format = V4L2_PIX_FMT_YVYU;
break;
case V4L2_PIX_FMT_YUV420:
hal_pixel_format = HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_P;
break;
-
+#ifdef V4L2_PIX_FMT_YUV420N
case V4L2_PIX_FMT_YUV420N:
hal_pixel_format = HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_PN;
break;
-
+#endif
case V4L2_PIX_FMT_YUV420M:
hal_pixel_format = HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_P_M;
break;
case V4L2_PIX_FMT_NV12:
hal_pixel_format = HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP;
break;
-
+#ifdef V4L2_PIX_FMT_NV12N
case V4L2_PIX_FMT_NV12N:
hal_pixel_format = HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN;
break;
-
+#endif
case V4L2_PIX_FMT_NV12M:
hal_pixel_format = HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M;
break;
case V4L2_PIX_FMT_NV12MT_16X16:
hal_pixel_format = HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SP_M_TILED;
break;
-
+#ifdef V4L2_PIX_FMT_NV12NT
case V4L2_PIX_FMT_NV12NT:
hal_pixel_format = HAL_PIXEL_FORMAT_EXYNOS_YCbCr_420_SPN_TILED;
break;
-
+#endif
case V4L2_PIX_FMT_NV61:
hal_pixel_format = HAL_PIXEL_FORMAT_EXYNOS_YCrCb_422_SP;
break;
switch (v4l2_pixel_format) {
case V4L2_PIX_FMT_NV12:
case V4L2_PIX_FMT_NV21:
+#ifdef V4L2_PIX_FMT_NV12N
case V4L2_PIX_FMT_NV12N:
+#endif
+#ifdef V4L2_PIX_FMT_NV12NT
case V4L2_PIX_FMT_NV12NT:
+#endif
case V4L2_PIX_FMT_YUV420:
case V4L2_PIX_FMT_YVU420:
+#ifdef V4L2_PIX_FMT_YUV420N
case V4L2_PIX_FMT_YUV420N:
+#endif
*bpp = 12;
*planes = 1;
break;
ext_ctrls.count += 1;
}
#endif
+#ifdef V4L2_CID_MPEG_VIDEO_H264_MIN_QP_P
/* optional : if these are not set, set value are same as I frame */
if (pCtx->videoInstInfo.specificInfo.enc.bQpRangePBSupport == VIDEO_TRUE) {
i = ext_ctrls.count;
ext_ctrls.count += 4;
}
+#endif
break;
}
break;
}
ext_ctrls.count = MPEG4_CTRL_NUM;
-
+#ifdef V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP_P
/* optional : if these are not set, set value are same as I frame */
if (pCtx->videoInstInfo.specificInfo.enc.bQpRangePBSupport == VIDEO_TRUE) {
i = ext_ctrls.count;
ext_ctrls.count += 4;
}
+#endif
break;
}
break;
}
ext_ctrls.count = H263_CTRL_NUM;
-
+#ifdef V4L2_CID_MPEG_VIDEO_H263_MIN_QP_P
/* optional : if these are not set, set value are same as I frame */
if (pCtx->videoInstInfo.specificInfo.enc.bQpRangePBSupport == VIDEO_TRUE) {
i = ext_ctrls.count;
ext_ctrls.count += 2;
}
+#endif
break;
}
ext_ctrls.count += 3;
}
-
+#ifdef V4L2_CID_MPEG_VIDEO_VP8_MIN_QP_P
/* optional : if these are not set, set value are same as I frame */
if (pCtx->videoInstInfo.specificInfo.enc.bQpRangePBSupport == VIDEO_TRUE) {
i = ext_ctrls.count;
ext_ctrls.count += 2;
}
+#endif
break;
}
#ifdef USE_HEVCENC_SUPPORT
ext_ctrl[52].value = (2 << 16 | 29);
ext_ctrls.count = HEVC_CTRL_NUM;
-#ifdef CID_SUPPORT
+#if defined(CID_SUPPORT) && defined(V4L2_CID_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_LAYER_BIT0)
if (pCtx->videoInstInfo.specificInfo.enc.bTemporalSvcSupport == VIDEO_TRUE) {
i = ext_ctrls.count;
ext_ctrl[i].id = V4L2_CID_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_LAYER_BIT0;
ext_ctrls.count += 1;
}
#endif
-
+#ifdef V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP_P
/* optional : if these are not set, set value are same as I frame */
if (pCtx->videoInstInfo.specificInfo.enc.bQpRangePBSupport == VIDEO_TRUE) {
i = ext_ctrls.count;
ext_ctrls.count += 4;
}
+#endif
break;
}
#endif
values[0][0] = GET_H264_QP_VALUE(qpRange.QpMin_I);
values[0][1] = GET_H264_QP_VALUE(qpRange.QpMax_I);
-
+#ifdef V4L2_CID_MPEG_VIDEO_H264_MIN_QP_P
if (pCtx->videoInstInfo.specificInfo.enc.bQpRangePBSupport == VIDEO_TRUE) {
cids[1][0] = V4L2_CID_MPEG_VIDEO_H264_MIN_QP_P;
cids[1][1] = V4L2_CID_MPEG_VIDEO_H264_MAX_QP_P;
values[2][0] = GET_H264_QP_VALUE(qpRange.QpMin_B);
values[2][1] = GET_H264_QP_VALUE(qpRange.QpMax_B);
}
+#endif
break;
}
case VIDEO_CODING_MPEG4:
values[0][0] = GET_MPEG4_QP_VALUE(qpRange.QpMin_I);
values[0][1] = GET_MPEG4_QP_VALUE(qpRange.QpMax_I);
-
+#ifdef V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP_P
if (pCtx->videoInstInfo.specificInfo.enc.bQpRangePBSupport == VIDEO_TRUE) {
cids[1][0] = V4L2_CID_MPEG_VIDEO_MPEG4_MIN_QP_P;
cids[1][1] = V4L2_CID_MPEG_VIDEO_MPEG4_MAX_QP_P;
values[2][0] = GET_MPEG4_QP_VALUE(qpRange.QpMin_B);
values[2][1] = GET_MPEG4_QP_VALUE(qpRange.QpMax_B);
}
+#endif
break;
}
case VIDEO_CODING_H263:
values[0][0] = GET_H263_QP_VALUE(qpRange.QpMin_I);
values[0][1] = GET_H263_QP_VALUE(qpRange.QpMax_I);
-
+#ifdef V4L2_CID_MPEG_VIDEO_H263_MIN_QP_P
if (pCtx->videoInstInfo.specificInfo.enc.bQpRangePBSupport == VIDEO_TRUE) {
cids[1][0] = V4L2_CID_MPEG_VIDEO_H263_MIN_QP_P;
cids[1][1] = V4L2_CID_MPEG_VIDEO_H263_MAX_QP_P;
values[1][0] = GET_H263_QP_VALUE(qpRange.QpMin_P);
values[1][1] = GET_H263_QP_VALUE(qpRange.QpMax_P);
}
+#endif
break;
}
case VIDEO_CODING_VP8:
values[0][0] = GET_VP8_QP_VALUE(qpRange.QpMin_I);
values[0][1] = GET_VP8_QP_VALUE(qpRange.QpMax_I);
-
+#ifdef V4L2_CID_MPEG_VIDEO_VP8_MIN_QP_P
if (pCtx->videoInstInfo.specificInfo.enc.bQpRangePBSupport == VIDEO_TRUE) {
cids[1][0] = V4L2_CID_MPEG_VIDEO_VP8_MIN_QP_P;
cids[1][1] = V4L2_CID_MPEG_VIDEO_VP8_MAX_QP_P;
values[1][0] = GET_VP8_QP_VALUE(qpRange.QpMin_P);
values[1][1] = GET_VP8_QP_VALUE(qpRange.QpMax_P);
}
+#endif
break;
}
#ifdef USE_HEVCENC_SUPPORT
values[0][0] = GET_HEVC_QP_VALUE(qpRange.QpMin_I);
values[0][1] = GET_HEVC_QP_VALUE(qpRange.QpMax_I);
-
+#ifdef V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP_P
if (pCtx->videoInstInfo.specificInfo.enc.bQpRangePBSupport == VIDEO_TRUE) {
cids[1][0] = V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP_P;
cids[1][1] = V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP_P;
values[2][0] = GET_HEVC_QP_VALUE(qpRange.QpMin_B);
values[2][1] = GET_HEVC_QP_VALUE(qpRange.QpMax_B);
}
+#endif
break;
}
#endif
goto EXIT;
}
break;
-#if defined(USE_HEVCENC_SUPPORT) && defined(CID_SUPPORT)
+#if defined(USE_HEVCENC_SUPPORT) && defined(CID_SUPPORT) && defined(V4L2_CID_MPEG_VIDEO_HEVC_PREPEND_SPSPPS_TO_IDR)
case VIDEO_CODING_HEVC:
if (exynos_v4l2_s_ctrl(pCtx->hEnc, V4L2_CID_MPEG_VIDEO_HEVC_PREPEND_SPSPPS_TO_IDR, 1) != 0) {
ALOGE("%s: Failed to s_ctrl", __func__);
case VIDEO_CODING_AVC:
CID = V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_CH;
break;
-#if defined(USE_HEVCENC_SUPPORT) && defined(CID_SUPPORT)
+#if defined(USE_HEVCENC_SUPPORT) && defined(CID_SUPPORT) && defined(V4L2_CID_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_LAYER_CH)
case VIDEO_CODING_HEVC:
CID = V4L2_CID_MPEG_VIDEO_HEVC_HIERARCHICAL_CODING_LAYER_CH;
break;