ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
Ultra HDR
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Android 14 รองรับการถ่ายภาพ Ultra HDR ที่บีบอัดโดยใช้รูปแบบรูปภาพ JPEG_R
รูปแบบนี้ใช้งานร่วมกับรูปภาพ JPEG SDR ได้ย้อนหลังและรองรับการแสดงผลเนื้อหา HDR
ดูรายละเอียดเกี่ยวกับข้อกำหนดรูปแบบ Ultra HDR ได้ที่รูปแบบรูปภาพ Ultra HDR v1.0
การใช้งาน
ส่วนนี้จะอธิบายวิธีใช้ฟีเจอร์ Ultra HDR
การใช้งานอ้างอิง
เฟรมเวิร์กกล้องและบริการกล้อง AOSP มีการใช้งาน Ultra HDR อ้างอิง
นอกจากฟังก์ชันการอ้างอิงในเฟรมเวิร์กกล้องแล้ว คุณยังใช้ Ultra HDR ภายใน HAL ของกล้องและโฆษณาการรองรับเอาต์พุต JPEG_R
ได้เช่นเดียวกับสตรีมเอาต์พุต HAL ของกล้องอื่นๆ ในกรณีนี้ HAL ของกล้องต้องสร้างแผนที่การกู้คืนที่จำเป็นและJPEG_R
รูปภาพสุดท้ายตามที่ข้อกำหนด Ultra HDR ระบุ
คุณสามารถเพิ่มประสิทธิภาพและปรับแต่งเอาต์พุตสุดท้ายได้ โดยขึ้นอยู่กับความสามารถของฮาร์ดแวร์และซอฟต์แวร์ของอุปกรณ์
ตัวเลือกการติดตั้งใช้งาน
ผู้ผลิตอุปกรณ์สามารถเลือกระดับการรองรับ Ultra HDR สำหรับอุปกรณ์ของตนได้ดังนี้
- ขั้นต่ำ: ในการกำหนดค่านี้ ระบบจะปิดใช้ฟังก์ชันการทำงานของเอาต์พุต Ultra HDR ผ่านสตรีมคอมโพสิตของบริการกล้องโดยค่าเริ่มต้น หากต้องการเปิดใช้
JpegRCompositeStream
การใช้งานข้อมูลอ้างอิง ให้ตั้งค่าพร็อพเพอร์ตี้ระบบ ro.camera.enableCompositeAPI0JpegR
เป็น true
เนื่องจากกระบวนการทั้งหมดและการเข้ารหัสจะดำเนินการในซอฟต์แวร์ ตัวเลือกนี้จึงอาจส่งผลให้เวลาในการตอบสนองเพิ่มขึ้นและประสิทธิภาพลดลง
- ปานกลาง: เมื่อใช้ตัวเลือกนี้ การใช้งาน
JpegRCompositeStream
จะนําไฟล์ SDR JPEG ที่ HAL ให้มาใช้เป็นรูปภาพพื้นฐานและเฟรม P010 เพื่อคํานวณแผนที่การกู้คืน ตัวเลือกนี้เกี่ยวข้องกับการประมวลผลซอฟต์แวร์ภายในเส้นทางข้อมูล แต่มีปริมาณไม่มากนักเมื่อเทียบกับตัวเลือกขั้นต่ำ
- ครอบคลุม: HAL ของกล้องแสดงโฆษณาและรองรับสตรีมเอาต์พุต
JPEG_R
โดยตรง ตัวเลือกนี้ช่วยให้ผู้ผลิตอุปกรณ์ใช้การเพิ่มประสิทธิภาพเฉพาะอุปกรณ์ได้ และสามารถปรับปรุงคุณภาพรูปภาพได้อย่างมาก
หากต้องการปิดใช้การติดตั้งใช้งาน JpegRCompositeStream
ให้ตั้งค่าพร็อพเพอร์ตี้บิลด์ ro.camera.disableJpegR
เป็น true
หากไม่ได้ตั้งค่าพร็อพเพอร์ตี้บิลด์นี้หรือตั้งค่าเป็น false
ระบบจะเปิดใช้ Ultra HDR โดยค่าเริ่มต้นผ่าน JpegRCompositeStream
ในอุปกรณ์ที่รองรับความสามารถในการแสดงผล 10 บิต และการจับภาพ 10 และ 8 บิตพร้อมกัน
การตรวจสอบความถูกต้อง
หากต้องการตรวจสอบฟีเจอร์ Ultra HDR ในอุปกรณ์ ให้ทำการทดสอบต่อไปนี้
การทดสอบ CTS
การทดสอบ ITS
การทดสอบด้วยตนเอง
หากต้องการทำการทดสอบด้วยตนเอง ให้ใช้ตัวอย่างการใช้งานสำหรับการจับภาพ Ultra HDR ซึ่งรองรับการกำหนดค่าและการจับภาพ Ultra HDR โดยใช้รูปแบบรูปภาพ JPEG_R
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-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-07-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."]]