Camera: Relax input format requirements for RAW reprocessing.

Certain applications may want to request RAW reprocessing when they know the capabilities of the device in advance. CTS requirements will prevent HALs from advertising this capability, but we should allow requests for it.

Bug: 282820994
Test: Ran Camera CTS
Change-Id: I1526841f38ab1409c15c10cd5d95107741997d6f
This commit is contained in:
Austin Borger
2023-05-24 17:17:25 -07:00
parent e6d6d26454
commit 3914efed82

View File

@@ -20,6 +20,7 @@ import static com.android.internal.util.function.pooled.PooledLambda.obtainRunna
import android.annotation.NonNull;
import android.content.Context;
import android.graphics.ImageFormat;
import android.hardware.ICameraService;
import android.hardware.camera2.CameraAccessException;
import android.hardware.camera2.CameraCaptureSession;
@@ -1478,6 +1479,12 @@ public class CameraDeviceImpl extends CameraDevice
}
}
// Allow RAW formats, even when not advertised.
if (inputFormat == ImageFormat.RAW_PRIVATE || inputFormat == ImageFormat.RAW10
|| inputFormat == ImageFormat.RAW12 || inputFormat == ImageFormat.RAW_SENSOR) {
return true;
}
if (validFormat == false) {
return false;
}