From 84a475a20f6ceaa2d0456c21f96535aa639d5827 Mon Sep 17 00:00:00 2001 From: Shuzhen Wang Date: Thu, 28 May 2020 23:39:07 -0700 Subject: [PATCH] Camera: Allow reprocessing session to configure physical streams Do not disallow reprocessable session to use physical streams. At the same time, we cannot claim reprocessing to/from physical streams work because: 1. It's undefined behavior to reprocess an input buffer into a physical stream of different physical camera, or an input physical stream buffer into an output buffer of different physical camera. 2. If the reprocessing input buffer comes from different physical cameras with different sizes, because the current HAL API doesn't support sending different size buffers through input stream, there isn't a non-vendor-specific solution available. Bug: 157123506 Test: vendor testing Change-Id: I1ccf2b3918c1cb475b1baec10d35c6785b25208d --- .../hardware/camera2/impl/CameraDeviceImpl.java | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java index bfc7f37aaf8dc..e21b45ab6577f 100644 --- a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java +++ b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java @@ -1154,7 +1154,6 @@ public class CameraDeviceImpl extends CameraDevice checkIfCameraClosedOrInError(); // Make sure that there all requests have at least 1 surface; all surfaces are non-null; - // the surface isn't a physical stream surface for reprocessing request for (CaptureRequest request : requestList) { if (request.getTargets().isEmpty()) { throw new IllegalArgumentException( @@ -1165,17 +1164,6 @@ public class CameraDeviceImpl extends CameraDevice if (surface == null) { throw new IllegalArgumentException("Null Surface targets are not allowed"); } - - for (int i = 0; i < mConfiguredOutputs.size(); i++) { - OutputConfiguration configuration = mConfiguredOutputs.valueAt(i); - if (configuration.isForPhysicalCamera() - && configuration.getSurfaces().contains(surface)) { - if (request.isReprocess()) { - throw new IllegalArgumentException( - "Reprocess request on physical stream is not allowed"); - } - } - } } }