Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84a475a2 authored by Shuzhen Wang's avatar Shuzhen Wang
Browse files

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
parent d0125c37
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -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");
                            }
                        }
                    }
                }
            }