Permalink
Browse files

update camerahal, fixes barcode scanner mode

Change-Id: Ie739add366d213847020e77756da7cbe85106e02
  • Loading branch information...
1 parent 7438eb4 commit 0c7ada3f430fdf561de84a60feab27e52aeae846 @KonstaT committed Jun 2, 2012
Showing with 32 additions and 2 deletions.
  1. +32 −2 libcamera/cameraHal.cpp
View
@@ -39,9 +39,36 @@
//#define LOGV LOGI
+struct qcom_mdp_rect {
+ uint32_t x;
+ uint32_t y;
+ uint32_t w;
+ uint32_t h;
+};
+
+struct qcom_mdp_img {
+ uint32_t width;
+ int32_t height;
+ int32_t format;
+ int32_t offset;
+ int memory_id; /* The file descriptor */
+ uint32_t priv; // CONFIG_ANDROID_PMEM
+};
+
+struct qcom_mdp_blit_req {
+ struct qcom_mdp_img src;
+ struct qcom_mdp_img dst;
+ struct qcom_mdp_rect src_rect;
+ struct qcom_mdp_rect dst_rect;
+ uint32_t alpha;
+ uint32_t transp_mask;
+ uint32_t flags;
+ int sharpening_strength; /* -127 <--> 127, default 64 */
+};
+
struct blitreq {
unsigned int count;
- struct mdp_blit_req req;
+ struct qcom_mdp_blit_req req;
};
/* Prototypes and extern functions. */
@@ -125,6 +152,7 @@ CameraHAL_CopyBuffers_Hw(int srcFd, int destFd,
blit.req.flags = 0;
blit.req.alpha = 0xff;
blit.req.transp_mask = 0xffffffff;
+ blit.req.sharpening_strength = 64; /* -127 <--> 127, default 64 */
blit.req.src.width = w;
blit.req.src.height = h;
@@ -332,7 +360,9 @@ CameraHAL_DataCb(int32_t msg_type, const android::sp<android::IMemory>& dataPtr,
hwParameters.getPreviewSize(&previewWidth, &previewHeight);
CameraHAL_HandlePreviewData(dataPtr, mWindow, origCamReqMemory,
previewWidth, previewHeight);
- } else if (origData_cb != NULL && origCamReqMemory != NULL) {
+ }
+
+ if (origData_cb != NULL && origCamReqMemory != NULL) {
camera_memory_t *clientData = CameraHAL_GenClientData(dataPtr,
origCamReqMemory, user);
if (clientData != NULL) {

0 comments on commit 0c7ada3

Please sign in to comment.