OSDN Git Service

camera2: Add height to the crop region metadata property
authorIgor Murashkin <iam@google.com>
Tue, 7 May 2013 20:22:15 +0000 (13:22 -0700)
committerIgor Murashkin <iam@google.com>
Tue, 7 May 2013 20:24:43 +0000 (13:24 -0700)
Bug: 8756080
Change-Id: I90b9166440e92f7675255a01ddc4a980c2e52201

services/camera/libcameraservice/camera2/Parameters.cpp

index b26cd09..f50ca9e 100644 (file)
@@ -1810,13 +1810,14 @@ status_t Parameters::updateRequest(CameraMetadata *request) const {
             CropRegion::OUTPUT_PREVIEW     |
             CropRegion::OUTPUT_VIDEO       |
             CropRegion::OUTPUT_PICTURE    ));
-    int32_t reqCropRegion[3] = {
+    int32_t reqCropRegion[4] = {
         static_cast<int32_t>(crop.left),
         static_cast<int32_t>(crop.top),
-        static_cast<int32_t>(crop.width)
+        static_cast<int32_t>(crop.width),
+        static_cast<int32_t>(crop.height)
     };
     res = request->update(ANDROID_SCALER_CROP_REGION,
-            reqCropRegion, 3);
+            reqCropRegion, 4);
     if (res != OK) return res;
 
     uint8_t reqVstabMode = videoStabilization ?