Android O Camera深度研究

目录

Adnroid O之前的Android camera软件框架

Adnroid O camera软件框架

Passthrough Mode 

Binderized mode

Wrapper shim for libhardware HALs

Wrapper shim for libhardware HALs

Customized Treble Camera HAL/framework

Camera HAL transition and removal plan

Camera HAL transition and removal plan

Other camera framework changes

Android O metata生成方式

FrameWork HAL1 HAL3

Vendor tag及Flash相关

What is Camera ITS?

Camera framework plans  for future releases​​​​​​​


Adnroid O之前的Android camera软件框架

Adnroid O camera软件框架

Passthrough Mode 

Binderized mode

Wrapper shim for libhardware HALs

1.  Google will provide a wrapper shim layer to adapt libhardware camera HAL implementations to the new HIDL interface.

2.  Google will provide wrapper shim for both HAL1.0 and HAL3.2~HAL3.4

        2.1 HIDL ICameraDevice@1.0 maps to libhardware HAL1.0

        2.2 HIDL ICameraDevice@3.2 maps to libhardware HAL3.2 ~ 3.4

        2.3 HIDL ICameraProvider@2.4 maps to libhardware module 1.0 and 2.4

3.  Partners can use the wrapper shim if you do not have customized HAL API in your code

4.  For partners who do have customized HAL APIs, they must implement customized HIDL HAL to add these APIs back. Some parts of wrapper shim source code might still be relevant. Feel free to reuse  them.

Wrapper shim for libhardware HALs

Customized Treble Camera HAL/framework

Camera HAL transition and removal plan

1.  Android O

        1.1 Newly launched devices can still implement HAL1.0, but have to be running binderized mode

        1.2 Upgraded device can be HAL1.0 and run passthrough mode

2.  Android P and Q

        2.1 Newly launched device must implement HAL3 in binderized mode

        2.2 Upgraded devices can still be HAL1.0(and run in whichever mode in launch)

3.  Android R

        3.1 HAL1.0 support will be removed entirely

Camera HAL transition and removal plan

Other camera framework changes

1.  Libhardware modules/device API version no longer supported

        1.1  Module 2.0 ~ 2.3

                It should be fairly easy to upgrade from 2.0 ~ 2.4

                The only required API addition in 2.4 is torch API, which saves significant power in flashlight use  case.

        1.2  Device 3.0 ~ 3.1

                No one should be using these version as far as we know.

        1.3 ZSL feature in API1 <-> HAL3 shim Was implemented via deprecated “bidirectional” stream tyep, which will be removed in HIDL HAL.  

                Switch to PRIVATE_REPROCESSING interface in Android O if you want to keep this feature working

Android O metata生成方式

Overview:

        The camera.metadata interface is used by the Android camera service, camera provider and camera device to retrieve static camera information and issue camera capture controls.

File path:

        android/hardware/interface/camera/metadata/3.2/types.hal

生成文件

        android/hardware/camera/metadata/3.2/types.h

Docs:

        The docs.html for each version for the detailed description of each metadata Android/system/media/camera/docs/docs.html

FrameWork HAL1 HAL3

FrameWork对HAL1/HAL3的接口控制下移到interface层进行配置定义。

文件路径:

        Android/hardware/interface/camera/device/1.0 or 3.2

        其中目录下的type.hal定义接口会使用到的类型定义

生成文件路径:

        Android/hardware/camera/device/3.2/type.cpp,CameraDeviceAll.cpp,CameraDeviceCallbacAll.cpp,CameraDeviceSessionAll.cpp     

        Android/hardware/camera/devcie/3.2/ICameraDevice.h, BnCameraDevice.h,BpCameraDevice.h …

PS:编译器加载libhwbinder.so生成各文件,之后Framework通过hwbinder与生成的中间文件进行交互。

Vendor tag及Flash相关

Vendor tag及Flash接口定义文件:

        Android/hardware/interface/camera/provider/2.4 (API Version)

Overview:

        The camera.provider HAL is used by the Android Camera service to discover,query, and open individual camera devices.

        It also allows for direct control of the flash unit of camera device tha have one, for turning on/off  torch mode.

File

        ICameraProvider.hal    ICameraProviderCallback.hal

API

        setCallback    getVendorTags    cameraDeviceStatusChange       torchModeStatusChange …

@2.4

        First HIDL version of the camera provider HAL.

What is Camera ITS?

1.  CameraITS(ITS) is part of Android Compatibility Test suite (CTS)

        Includes all tests the require verifying image content

        Required for all Android partners

2.  Running ITS currently a very manual and time-consuming process

3.  List of parts provided to partners

        White photo box,tripod,charts,LED lamp

4.  Multiple manual scenes

        scenes[0, 1, 2, 3, 4, 5]

5.  Function tests, not performance metrics

        Timestamps, exp/gain, crop/rotation, 3A, etc.

Camera framework plans  for future releases

 1.  Continue delivring new features and optimization for Camera2 and HAL3 in upcoming Android releases.

2.  Onging test coverage and infrastructure improvements.

3.  API1(deprecated) will continue to exist, working with HAL3 shim.

4.  Middleware/SuperHAL layer remains on our future roadmap to better isolate OEM and SoC logics.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

塞外totem

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值