|author||Daniel Hung-yu Wu <email@example.com>||Tue Mar 13 06:26:59 2018|
|committer||chrome-bot <firstname.lastname@example.org>||Tue Mar 20 07:00:26 2018|
rockchip: increase thumbnail compression buffer size The encoder allocates a buffer of NV12 format size for thumbnail image processing, which may be not enough for high compression quality thumbnails. BUG=b:72365664 TEST='test_that chromeos2-row1-rack11-host1.cros \ cheets_CTS_N.arm.CtsCameraTestCases' and not failed at StillCaptureTest#testJpegExif: Jpeg must have thumbnail for thumbnail size 320x240 Change-Id: I75b416e2a84ea884863e9e1bff58a8961297e9a0 Reviewed-on: https://chromium-review.googlesource.com/959841 Commit-Ready: Jeffy Chen <email@example.com> Tested-by: Jeffy Chen <firstname.lastname@example.org> Reviewed-by: Hung-yu Wu <email@example.com> Reviewed-by: Jeffy Chen <firstname.lastname@example.org>
The repository hosts the core Chrome OS platform camera components, including:
The camera service provider on Chrome OS is a standalone process that can be divided into two part:
Currently we have two major camera clients on Chrome OS: Chrome browser and Android container. All the clients connect to the camera HAL adapter through the Camera Module Mojo IPC interface and the Camera Device Mojo IPC interface to access camera functions. The Mojo IPC interface is very similar to the Android camera HAL v3 APIs.
Usually the platform-specific camera HAL is accompanied with a proprietary camera 3A (auto focus, auto exposure, and auto white-balance) library that provides the algorithms to control the camera subsystem for capturing high quality images. We isolate the camera 3A library in a separated sandboxed process for security consideration. The camera HAL accesses the camera 3A library through the Camera Algorithm Mojo IPC interface.
The camera HAL needs to generate JPEG images when processing still shot requests. On Chrome OS the JPEG codec service, if supported on the platform, is provided by the GPU process in Chrome browser. We provide libraries to handle JPEG encoding and decoding: On platform that supports hardware-accelerated JPEG encoder/decoder, the JPEG libraries connect to the Chrome GPU process through Mojo IPC channels to encode/decode JPEG images; othewise the JPEG encoding/decoding is done through software.
The Chrome OS camera HAL are essentially the following shared libraries, plus and dependencies required by them:
camera_hal.sothat provides the camera HAL interface. This is very similar to a regular Android camera HAL. (Required)
libcam_algo.sothat provides the camera algorithm interface for the isolated camera 3A library. (Required if the camera HAL requires 3A library to work).
We provide the following packages that are required to build the camera HAL:
A package that installs all the necessary Android headers files required by the camera HAL.
A replacement for Android gralloc. The library provides APIs to import and map buffer handles received in capture requests.
A port of the Android
A port of the Android
A port of the Android
In addition to the required packages, we also have some useful packages that can handle some general functions for the camera HAL:
Provides utility functions to fill in the EXIF headers of a JPEG image.
Provides utility functions to encode JPEG image.
Provides utility functions to get the local timezone.
To add a new camera HAL for a new platform, one needs to upload the source code of the camera HAL to the camera HAL directory.
After the camera HAL source code is uploaded, one needs to add corresponding packages to build and install the camera HAL and the required libraries. On Chrome OS, packages are managed by ebuild files. The following ebuild files are required for a new camera HAL:
A ebuild file for the newly added camera HAL. The ebuild file is used to build the camera HAL and install the
libcam_algo.so shared libraries into the board sysroot. To integrate the camera HAL into the OS image, a
virtual/cros-camera-hal ebuild that includes the newly added camera HAL as
RDEPEND is required in the baseboard or board overlay.
For board-specific camera HAL config files, we have the
virtual/cros-camera-hal-configs ebuild. One can add a new ebuild to install the board-specific camera HAL config files, and list the new ebuild as
RDEPEND of the virtual ebuild.