实施 RAW_PRIVATE 需要 Android 设备吗?

Is an Android device required to implement RAW_PRIVATE?

Camera2 兼容 Android 设备可以实现 RAW_PRIVATE image format, which in principle contains unprocessed binary data straight from the image sensor (in contrast with RAW_SENSOR,几乎总是被处理):

Private raw camera sensor image format, a single channel image with implementation depedent pixel layout.

RAW_PRIVATE is a format for unprocessed raw image buffers coming from an image sensor. The actual structure of buffers of this format is implementation-dependent.

尽管 Android Compatibility Definition Document makes no mention of that parameter, is the presence of this ImageFormat at least guaranteed in some way for devices that answer true to the REQUEST_AVAILABLE_CAPABILITIES_RAW 能力?

不,不需要支持。 RAW_SENSOR 是 REQUEST_AVAILABLE_CAPABILITIES_RAW 保证的唯一格式。任何其他 RAW 格式都是可选的。

RAW_SENSOR 不应该被处理,顺便说一句——它可能是从直接来自传感器的 10 位或 12 位 MIPI 缓冲区布局重新排列的,但它通常应该是纯 RAW。 (具体来说,它不应该是 'linear RAW' 或类似的)。

即使支持 RAW_PRIVATE,您也不知道它的布局是什么,因为它是特定于设备的。因此,使用它需要进行大量特定于模型的调查。