OSDN Git Service

Camera2: Use full pixel array for ZSL stream
authorEino-Ville Talvala <etalvala@google.com>
Wed, 12 Sep 2012 00:23:48 +0000 (17:23 -0700)
committerEino-Ville Talvala <etalvala@google.com>
Wed, 12 Sep 2012 00:23:48 +0000 (17:23 -0700)
For efficiency, use full pixel array size for the ZSL output/input
streams, instead of the final picture size.

Bug: 7139362
Change-Id: I98ad4f5a1ca283efe87ae60bf0cf39573e22d2f3

services/camera/libcameraservice/camera2/ZslProcessor.cpp

index ea1c2b9..0771872 100644 (file)
@@ -132,8 +132,8 @@ status_t ZslProcessor::updateStream(const Parameters &params) {
                     client->getCameraId(), strerror(-res), res);
             return res;
         }
-        if (currentWidth != (uint32_t)params.pictureWidth ||
-                currentHeight != (uint32_t)params.pictureHeight) {
+        if (currentWidth != (uint32_t)params.fastInfo.arrayWidth ||
+                currentHeight != (uint32_t)params.fastInfo.arrayHeight) {
             res = device->deleteReprocessStream(mZslReprocessStreamId);
             if (res != OK) {
                 ALOGE("%s: Camera %d: Unable to delete old reprocess stream "
@@ -154,8 +154,9 @@ status_t ZslProcessor::updateStream(const Parameters &params) {
 
     if (mZslStreamId == NO_STREAM) {
         // Create stream for HAL production
+        // TODO: Sort out better way to select resolution for ZSL
         res = device->createStream(mZslWindow,
-                params.pictureWidth, params.pictureHeight,
+                params.fastInfo.arrayWidth, params.fastInfo.arrayHeight,
                 HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED, 0,
                 &mZslStreamId);
         if (res != OK) {