hwc: Add support for YCrCb_420_SP_VENUS(NV21_VENUS)
* Earlier, camera preview buffers were of NV21(YCrCb_420_SP)
and the video buffers were of NV12_VENUS(YCbCr_420_SP_VENUS)
format. Now that the video encoder has support for NV21,
both the camera and video buffers can be of
NV21_VENUS(YCrCb_420_SP_VENUS) format.
* If the preview and video buffer sizes are the same,
CPP double pass to generate video and preview buffers can be
avoided and the buffers can now be generated within a single pass
with CPP duplication thereby saving power.
* Add support in gralloc for NV12_VENUS format to achieve
the same.
Change-Id: I7001f975f2cafa21c893e7384ddbddd5f2788b1d
diff --git a/libcopybit/copybit.cpp b/libcopybit/copybit.cpp
index 02f0c7e..10f5943 100644
--- a/libcopybit/copybit.cpp
+++ b/libcopybit/copybit.cpp
@@ -146,6 +146,7 @@
case HAL_PIXEL_FORMAT_YCbCr_420_SP: return MDP_Y_CBCR_H2V2;
case HAL_PIXEL_FORMAT_YCrCb_420_SP_ADRENO: return MDP_Y_CBCR_H2V2_ADRENO;
case HAL_PIXEL_FORMAT_YCbCr_420_SP_VENUS: return MDP_Y_CBCR_H2V2_VENUS;
+ case HAL_PIXEL_FORMAT_YCrCb_420_SP_VENUS: return MDP_Y_CRCB_H2V2_VENUS;
case HAL_PIXEL_FORMAT_NV12_ENCODEABLE: return MDP_Y_CBCR_H2V2;
}
return -1;