2025 年 3 月 27 日より、AOSP のビルドとコントリビューションには aosp-main
ではなく android-latest-release
を使用することをおすすめします。詳細については、AOSP の変更をご覧ください。
ウルトラ HDR
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Android 14 は JPEG_R
画像形式を使用したウルトラ HDR 圧縮画像のキャプチャをサポートしています。この形式は SDR JPEG の下位互換で、コンテンツの HDR レンダリングをサポートしています。
ウルトラ HDR 形式の仕様について詳しくは、ウルトラ HDR 画像形式 v1.0 をご覧ください。
実装
このセクションでは、ウルトラ HDR 機能を実装する方法について説明します。
リファレンス実装
AOSP のカメラ フレームワークとカメラサービスには、ウルトラ HDR のリファレンス実装が含まれています。
カメラ フレームワークのリファレンス機能に加えて、カメラ HAL 内にウルトラ HDR を実装して、他のカメラ HAL 出力ストリームと同様の方法で JPEG_R
出力のサポートをアドバタイズできます。このシナリオでは、ウルトラ HDR 仕様で定義されているように、カメラ HAL は必要なリカバリマップと、最終的な JPEG_R
画像を生成する必要があります。デバイスのハードウェアとソフトウェアの機能に応じて、最終的な出力を最適化し、調整できます。
実装オプション
デバイス メーカーはデバイスにおけるウルトラ HDR サポートのレベルを次から選択できます。
- ミニマル: この設定では、カメラサービスの複合ストリーム機能からのウルトラ HDR 出力はデフォルトで無効になっています。
JpegRCompositeStream
リファレンス実装を有効にするには、ro.camera.enableCompositeAPI0JpegR
システム プロパティを true
に設定します。すべてのプロセスとエンコードはソフトウェアで実行されるため、このオプションではレイテンシが増加し、パフォーマンスが低下します。
- 中程度: このオプションでは、
JpegRCompositeStream
実装は HAL による SDR JPEG ファイルをベース画像および P010 フレームとして使用し、リカバリマップを計算します。このオプションでは、データパス内のソフトウェア処理が行われますが、ミニマル オプションと比較すると小規模です。
- 高度: カメラ HAL は直接
JPEG_R
出力ストリームをアドバタイズしてサポートします。このオプションでは、メーカーはデバイス固有の最適化を実装でき、大幅な画像の質の向上を実現できます。
JpegRCompositeStream
実装を無効にするには、ro.camera.disableJpegR
ビルド プロパティを true
に設定します。このビルド プロパティが設定されていない場合、または false
に設定されている場合、10 ビット出力機能と 10 および 8 ビット同時キャプチャをサポートしているデバイスのウルトラ HDR は JpegRCompositeStream
からデフォルトで有効になります。
検証
デバイスのウルトラ HDR 機能を検証するには、次のテストを実行します。
CTS テスト
ITS テスト
手動テスト
手動テストを実行するには、ウルトラ HDR 画像キャプチャのサンプル実装を使用します。これには、JPEG_R
画像形式を使用したウルトラ HDR の設定とキャプチャのサポートが含まれています。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-03-26 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-03-26 UTC。"],[],[],null,["# Ultra HDR\n\nAndroid 14 provides support for capturing Ultra HDR\ncompressed images using the\n[`JPEG_R`](https://developer.android.com/reference/kotlin/android/graphics/ImageFormat#jpeg_r)\nimage format. This format is backward compatible with SDR JPEG images and\nsupports HDR rendering of content.\nFor details about the Ultra HDR format specification, see\n[Ultra HDR Image Format v1.0](https://developer.android.com/guide/topics/media/hdr-image-format).\n\nImplementation\n--------------\n\nThis section describes how to implement the Ultra HDR feature.\n\n### Reference implementation\n\nThe AOSP camera framework and camera service includes a reference Ultra HDR\nimplementation.\n\nIn addition to the reference functionality in the camera framework, you can\nimplement Ultra HDR within the camera HAL and advertise support for `JPEG_R`\noutput in the same way as other camera HAL output streams. In this scenario,\nthe camera HAL must generate the necessary recovery map and the final `JPEG_R`\nimage as defined by the\n[Ultra HDR specification](https://developer.android.com/guide/topics/media/hdr-image-format#introduction).\nYou can optimize and tune the final output depending on the device hardware\nand software capabilities.\n\n### Implementation options\n\nDevice manufacturers can decide on the following levels of Ultra HDR support for\ntheir devices:\n\n- **Minimal:** In this configuration, Ultra HDR output through the camera service composite stream functionality is disabled by default. To enable the `JpegRCompositeStream` reference implementation, set the `ro.camera.enableCompositeAPI0JpegR` system property to `true`. Because all processes and encoding is performed in software, this option can result in increased latency and decreased performance.\n- **Moderate:** With this option, the `JpegRCompositeStream` implementation uses a HAL-provided SDR JPEG file as a base image and a P010 frame to calculate a recovery map. This option involves software processing within the data path but is relatively minor compared to the minimal option.\n- **Extensive:** The camera HAL advertises and supports the `JPEG_R` output stream directly. This option lets device manufacturers implement device-specific optimizations and can provide significant image quality improvements.\n\nTo disable the `JpegRCompositeStream` implementation, set the\n`ro.camera.disableJpegR` build property to `true`. If this build property isn't\nset or is set to `false`, Ultra HDR is enabled by default through\n`JpegRCompositeStream` on devices supporting\n[10-bit output capability](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT)\nand\n[concurrent 10 and 8-bit capture](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#getProfileCaptureRequestConstraints(long)).\n\nValidation\n----------\n\nTo validate the Ultra HDR feature on your device, run the following tests.\n\n### CTS tests\n\n- [`ImageReaderTest.java#testImageReaderBuilderWithBLOBAndJpegR`](https://android.googlesource.com/platform/cts/+/refs/heads/android16-release/tests/camera/src/android/hardware/camera2/cts/ImageReaderTest.java#815)\n- [`ImageReaderTest.java#testJpegR`](https://android.googlesource.com/platform/cts/+/refs/heads/android16-release/tests/camera/src/android/hardware/camera2/cts/ImageReaderTest.java#503)\n- [`ImageReaderTest.java#testJpegRDisplayP3`](https://android.googlesource.com/platform/cts/+/refs/heads/android16-release/tests/camera/src/android/hardware/camera2/cts/ImageReaderTest.java#526)\n- [`PerformanceTest.java#testSingleCapture`](https://android.googlesource.com/platform/cts/+/refs/heads/android16-release/tests/camera/src/android/hardware/camera2/cts/PerformanceTest.java#313)\n- [`StillCaptureTest.java# testJpegRCapture`](https://android.googlesource.com/platform/cts/+/refs/heads/android16-release/tests/camera/src/android/hardware/camera2/cts/StillCaptureTest.java#192)\n\n### ITS tests\n\n- [`scene4#test_aspect_ratio_and_crop`](https://android.googlesource.com/platform/cts/+/refs/heads/android16-release/apps/CameraITS/tests/scene4/test_aspect_ratio_and_crop.py)\n\n### Manual tests\n\nTo perform manual tests, use the\n[sample implementation for Ultra HDR image capture](https://github.com/android/platform-samples/pull/56),\nwhich includes support for the configuration and capture of Ultra HDR using the\n`JPEG_R` image format."]]