از 27 مارس 2025، توصیه می کنیم از android-latest-release
به جای aosp-main
برای ساختن و کمک به AOSP استفاده کنید. برای اطلاعات بیشتر، به تغییرات AOSP مراجعه کنید.
خروجی دوربین 10 بیتی
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
برای دستگاههایی که Android نسخه 13 و بالاتر دارند، Android از خروجی دوربین 10 بیتی از طریق نمایههای محدوده پویا پشتیبانی میکند که میتواند توسط مشتری دوربین به عنوان بخشی از پیکربندی پخش جریانی پیکربندی شود. سازندگان دستگاه می توانند از پروفایل های محدوده دینامیکی 10 بیتی مانند HLG10، HDR 10، HDR 10+ و Dolby Vision پشتیبانی کنند.
پشتیبانی از خروجی دوربین 10 بیتی به مشتریان دوربین اجازه می دهد تا با تماس گرفتن getSupportedProfiles
، پروفایل های دامنه پویا 10 بیتی پشتیبانی شده یک دستگاه را کشف کنند. سپس چارچوب نمونهای از DynamicRangeProfiles
را برمیگرداند که شامل اطلاعاتی در مورد نمایههای دامنه پویا پشتیبانیشده و در صورت وجود، محدودیتهای درخواست ضبط میشود. نمایه HLG10
باید پشتیبانی شود. نمایه محدوده دینامیکی توصیه شده در قسمت REQUEST_RECOMMENDED_TEN_BIT_DYNAMIC_RANGE_PROFILE
فهرست شده است.
کلاینتهای دوربین میتوانند ترکیبهای جریان را با فراخوانی setDynamicRangeProfile
پیکربندی کنند. برای اطلاعات بیشتر در مورد ترکیبات جریان خروجی اجباری، جدول تنظیمات تضمین شده اضافی خروجی 10 بیتی را در ضبط منظم ببینید.
الزامات
برای پشتیبانی از خروجی دوربین 10 بیتی، دستگاه باید دارای سنسور دوربین 10 بیتی یا بالاتر با پشتیبانی ISP مربوطه باشد. برای جزئیات در مورد الزامات سازگاری مرتبط برای پشتیبانی 10 بیتی، به بخش 7.5 مراجعه کنید. دوربین ها در CDD.
پیاده سازی
برای ارائه پشتیبانی از خروجی دوربین 10 بیتی، سازندگان دستگاه باید ادغامهای Camera AIDL HAL زیر را انجام دهند:
- شامل
ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT
در قابلیت های دوربین. -
ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
با تمام نمایههای دامنه پویا پشتیبانی شده و یک بیت مپ از محدودیتهای آنها پر کنید. نمایه HLG10
باید پشتیبانی شود. همچنین باید یک نمایه محدوده دینامیکی توصیه شده برای اطلاع مشتریان دوربین از فرمت بهینه پشتیبانی شده اضافه کنید. - اطمینان حاصل کنید که از مقدار نمایه محدوده پویا در طول پیکربندی جریان برای جریانهایی که از قالب P010 استفاده میکنند یا از یک قالب تعریفشده توسط پیادهسازی پشتیبانی میکند (
ImageFormat.PRIVATE
). - بسته به نمایه دامنه پویا، قبل از اطلاع رسانی به سرویس دوربین، بافر فراداده ایستا یا پویا بافرهای پردازش شده Gralloc 4 را تنظیم کنید.
برای جزئیات بیشتر در مورد خروجی دوربین 10 بیتی در Camera HAL، به موارد زیر در metadata_definitions.xml
مراجعه کنید:
برای اجرای مرجع دوربین HAL که از خروجی دوربین 10 بیتی پشتیبانی می کند، به /hardware/google/camera/devices/EmulatedCamera/hwl
مراجعه کنید.
اعتبار سنجی
برای تأیید اجرای خروجی دوربین 10 بیتی خود و اطمینان از اینکه برنامه های شخص ثالث می توانند این ویژگی را فعال کنند، توصیه می کنیم سه مرحله اعتبار سنجی زیر را انجام دهید.
برای اعتبارسنجی بصری خروجی دوربین 10 بیتی، فرض بر این است که دستگاه از نمایش HDR (نمایشگر 1000 نیتی) پشتیبانی می کند و برنامه مشاهده ویدیو (به عنوان مثال، Google Photos) از پخش ویدیوی HDR پشتیبانی می کند.
صحت عملکرد API را تست کنید
برای تست صحت عملکرد API خروجی دوربین 10 بیتی، تست های CTS، دوربین ITS و VTS زیر را اجرا کنید:
دوربین اصلی و برنامه شخص ثالث را مقایسه کنید
ما قویاً توصیه میکنیم که نتایج ضبط ویدیوهای 10 بیتی با یک برنامه شخص ثالث مشابه، اگر یکسان نباشد، با برنامه دوربین اصلی باشد. این بدان معناست که انتخابهای تنظیم، مانند نوردهی، محدوده دینامیکی و رنگ، باید از برنامه اصلی به برنامههای شخص ثالث منتقل شوند. برای تأیید رفتار ضبط ویدیوی یک برنامه شخص ثالث که از خروجی دوربین 10 بیتی در دستگاه شما پشتیبانی می کند، از برنامه نمونه Camera2Video در GitHub استفاده کنید. راهنمایی زیر برای نشان دادن جنبههای قابل مشاهده HDR بدون اعداد هدف، به دلیل تنوع سنسورها، پانلها، شرایط مشاهده، و ترجیحات فروشنده است.
صحنه های پیشنهادی برای مقایسه
برای مقایسه بین برنامه دوربین اصلی و یک برنامه شخص ثالث، با استفاده از چندین صحنه مختلف با برنامه دوربین اصلی و برنامه نمونه Camera2Video فیلم بگیرید. صحنه های زیر برای مقایسه پیشنهاد می شوند:
- یک صحنه نور متوسط تا کم نور با یک جسم روشن، مانند یک شمع یا نور روشن کوچک که محدوده قابل توجهی از روشنایی ایجاد می کند. این رفتار نوردهی خودکار و محدوده دینامیکی را تأیید می کند.
- صحنهای روشن در فضای باز با رنگهای زنده و اشیاء بازتابنده مانند سپرهای کرومی روی خودرو که برجستهسازیهای روشن ایجاد میکند. این رندر صحنه های روشن با هایلایت های روشن تر را تایید می کند.
- صحنهای با دامنه دینامیکی متوسط، مانند صحنههای طبیعی داخلی در خانه یا محل کار. این امر تأیید می کند که شرایط نوری کم تر مطابق انتظار رفتار می کنند.
برای همه صحنهها، توصیه میکنیم افراد و چهرهها را برای بررسی میزان نوردهی، رنگ و رنگ پوست داشته باشید. کاهش تنوع شات به شات، مقایسه پشت سر هم را آسان می کند.
محدوده دینامیکی استاندارد و محدوده دینامیکی بالا را مقایسه کنید
برای اطمینان از اینکه استفاده از نمایه محدوده دینامیکی 10 بیتی نسبت به یک نمایه محدوده دینامیکی استاندارد مزیت محسوسی دارد، فیلمبرداری با استفاده از SDR (بدون نمایه HDR) را با ویدیوهای HDR مقایسه کنید تا تأیید کنید که جنبههای کلیدی HDR در عکسها ظاهر میشوند. برای مقایسه SDR و HDR، از برنامه نمونه Camera2Video و صحنه های پیشنهادی برای مقایسه برنامه دوربین اصلی و برنامه های شخص ثالث استفاده کنید.
موارد زیر جنبه های کلیدی برای تأیید در صحنه های پیشنهادی است. پنلهای صفحهنمایش با قابلیت HDR در سطوح روشنایی (اندازهگیری شده برحسب nit یا لومن) متفاوت هستند، بنابراین اعداد زیر بهعنوان مثالهایی در نظر گرفته شدهاند:
- در صحنه های نور متوسط تا کم نور، نقاط برجسته روشن شمع یا نور کوچک با حداکثر روشنایی برای نمایشگر (احتمالاً تا 1000 نیت) در کلیپ HDR و با حداکثر روشنایی برای SDR (تقریباً 100 نیت) در کلیپ SDR ارائه می شود. در کلیپ HDR، نقاط برجسته روشن باید از نمایشگر بدرخشد و درک کاربر از محدوده دینامیکی واقعی صحنه را به تصویر بکشد. در مقایسه با کلیپ HDR، گیره SDR باید صاف تر و روشن تر به نظر برسد.
- در صحنه خروجی روشن، بسته به تنظیم دستگاه، گیره HDR تفاوت آشکاری در روشنایی صفحه نمایش در مقایسه با کلیپ SDR نشان می دهد. برای کلیپ HDR، روشنایی صفحه برای صحنه کلی (بسته به فضای سر) باید بیشتر باشد، به عنوان مثال، تا 800 نیت، و حتی بیشتر از آن برای نقاط برجسته روشن مانند ضربه گیرهای کرومی، در حدود حداکثر روشنایی.
- در فیلمبرداری داخلی با دامنه دینامیکی متوسط و پایین، گیره های HDR و SDR از نظر رنگ و تن مشابه هستند و تصویربرداری HDR به طور بالقوه روشن تر از SDR است. HDR نباید تیره تر از SDR باشد. اگر انتخاب های تنظیم این کار را غیرممکن می کند، مطمئن شوید که رفتار برنامه شخص ثالث با رفتار برنامه دوربین اصلی مطابقت دارد.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-29 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# 10-bit camera output\n\nFor devices running Android 13 and higher, Android\nsupports 10-bit camera output through dynamic range profiles that can be\nconfigured by the camera client as part of the stream configuration. Device\nmanufacturers can add support for 10-bit dynamic range profiles such as HLG10,\nHDR 10, HDR 10+, and Dolby Vision.\n\n10-bit camera output support lets camera clients discover supported 10-bit\ndynamic range profiles of a device by calling\n[`getSupportedProfiles`](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#getSupportedProfiles()).\nThe framework then returns an instance of\n[`DynamicRangeProfiles`](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles),\nwhich includes information about supported dynamic range profiles and, if\navailable, capture request constraints. The\n[`HLG10`](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#HLG10)\nprofile must be supported. The recommended dynamic range profile is listed in\nthe\n[`REQUEST_RECOMMENDED_TEN_BIT_DYNAMIC_RANGE_PROFILE`](https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics#REQUEST_RECOMMENDED_TEN_BIT_DYNAMIC_RANGE_PROFILE)\nfield.\n\nCamera clients can configure stream combinations by calling\n[`setDynamicRangeProfile`](https://developer.android.com/reference/android/hardware/camera2/params/OutputConfiguration#setDynamicRangeProfile(long)).\nFor more information on mandatory output stream combinations, see the\n*10-bit output additional guaranteed configurations* table in\n[Regular capture](https://developer.android.com/reference/android/hardware/camera2/CameraDevice#regular-capture).\n\nRequirements\n------------\n\nTo support 10-bit camera output, the device must have a 10-bit or higher\ncapable camera sensor with respective ISP support. For details about related\ncompatibility requirements for 10-bit support, see section\n[7.5. Cameras](/docs/compatibility/13/android-13-cdd#75_cameras) in the CDD.\n\nImplementation\n--------------\n\nTo provide support for 10-bit camera output, device manufacturers must perform\nthe following Camera AIDL HAL integrations:\n\n- Include `ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT` in camera capabilities.\n- Populate `ANDROID_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP` with all supported dynamic range profiles and a bitmap of their constraints. The [`HLG10`](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles#HLG10) profile must be supported. You must also include a recommended dynamic range profile to inform camera clients of the optimal supported format.\n- Ensure support for the dynamic range profile value during stream configuration for streams using the [P010](https://developer.android.com/reference/android/graphics/ImageFormat#YCBCR_P010) format or support for an implementation-defined format ([`ImageFormat.PRIVATE`](https://developer.android.com/reference/android/graphics/ImageFormat#PRIVATE)).\n- Depending on the dynamic range profile, set the static or dynamic metadata buffer of processed Gralloc 4 buffers before notifying the camera service.\n\nFor further details on 10-bit camera output in the Camera HAL, see the\nfollowing in [`metadata_definitions.xml`](https://cs.android.com/android/platform/superproject/+/android-latest-release:system/media/camera/docs/metadata_definitions.xml):\n\n- [`DYNAMIC_RANGE_TEN_BIT`](https://cs.android.com/android/platform/superproject/+/android-latest-release:system/media/camera/docs/metadata_definitions.xml?q=DYNAMIC_RANGE_TEN_BIT)\n- HAL details for [`availableDynamicRangeProfilesMap`](https://cs.android.com/android/platform/superproject/+/android-latest-release:system/media/camera/docs/metadata_definitions.xml?q=availableDynamicRangeProfilesMap)\n- [`recommendedTenBitDynamicRangeProfile`](https://cs.android.com/android/platform/superproject/+/android-latest-release:system/media/camera/docs/metadata_definitions.xml?q=recommendedTenBitDynamicRangeProfile)\n- [`10BIT_OUTPUT`](https://cs.android.com/android/platform/superproject/+/android-latest-release:system/media/camera/docs/metadata_definitions.xml?q=10BIT_OUTPUT)\n\nFor a reference Camera HAL implementation supporting 10-bit camera output, see\n[`/hardware/google/camera/devices/EmulatedCamera/hwl`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/google/camera/devices/EmulatedCamera/hwl/).\n\nValidation\n----------\n\nTo validate your implementation of 10-bit camera output and ensure that\nthird-party apps can enable the feature, we recommend performing the following\nthree stages of validation.\n\n- [Test API functional correctness](#test-api-functional-correctness)\n- [Compare native camera and third-party app](#compare-native-third-party-app)\n- [Compare standard dynamic range and high dynamic range](#compare-sdr-hdr)\n\nFor visual validation of 10-bit camera output, it's assumed that the device\nsupports displaying HDR (1000+ nits display), and the video viewing app (for\nexample, Google Photos) supports playback of HDR video.\n\n### Test API functional correctness\n\nTo test the API functional correctness of 10-bit camera output, run the\nfollowing CTS, camera ITS, and VTS tests:\n\n- [`hardware/interfaces/camera/provider/aidl/vts/`](https://cs.android.com/android/platform/superproject/+/android-latest-release:hardware/interfaces/camera/provider/aidl/vts/): Tests for basic discovery, configuration, and streaming, and checks for the presence of HDR metadata where required.\n- [`tests/camera/src/android/hardware/camera2/cts/`](https://cs.android.com/android/platform/superproject/+/android-latest-release:cts/tests/camera/src/android/hardware/camera2/cts): Ensures that the camera behaves according to the AOSP API specifications.\n- [`cts/apps/CameraITS`](https://cs.android.com/android/platform/superproject/+/android-latest-release:cts/apps/CameraITS): Confirms general video behavior is consistent when HDR profiles are used. The specific test is [`tests/scene4/test_video_aspect_ratio_and_crop.py`](https://cs.android.com/android/platform/superproject/+/android-latest-release:cts/apps/CameraITS/tests/scene4/test_video_aspect_ratio_and_crop.py).\n\n### Compare native camera and third-party app\n\nWe strongly recommend ensuring that the results of capturing 10-bit videos with\na third-party app are similar, if not identical, to the native camera app. This\nmeans that tuning choices, such as exposure, dynamic range, and color, should\ncarry forward from the native app to third-party apps. To verify the video\nrecording behavior of a third-party app supporting 10-bit camera output on your\ndevice, use the\n[Camera2Video sample app](https://github.com/android/camera-samples/tree/main/Camera2Video)\non GitHub. The following guidance serves to illustrate the visible aspects of\nHDR without objective numbers, due to the variability of sensors, panels,\nviewing conditions, and vendor preferences.\n\n#### Suggested scenes for comparison\n\nTo make a comparison between the native camera app and a third-party app,\ncapture videos using several different scenes with both the native camera app\nand the Camera2Video sample app. The following are suggested scenes to use for\ncomparison:\n\n- A mid-light to low-light scene with a bright object, such as a candle or small bright light that creates a significant range of brightness. This confirms the auto exposure behavior and dynamic range.\n- A bright outdoor scene with vibrant colors and reflective objects such as chrome bumpers on a car, which creates bright highlights. This confirms the rendering for bright scenes with even brighter highlights.\n- A mid-range, low dynamic range scene such as an indoor natural scene in a home or office. This confirms that less extreme lighting conditions behave as expected.\n\nFor all scenes, we recommend having people and faces to verify exposure, color,\nand skin tone handling. Reducing shot-to-shot variation eases back-to-back\ncomparisons.\n\n### Compare standard dynamic range and high dynamic range\n\nTo ensure that there's a perceived benefit of using a 10-bit dynamic range\nprofile over a standard dynamic range profile, compare video captures using SDR\n(no HDR profile) against HDR videos to confirm that key aspects of HDR appear in\nthe captures. To compare SDR and HDR, use the\n[Camera2Video sample app](https://github.com/android/camera-samples/tree/main/Camera2Video)\nand [suggested scenes](#suggested-scenes) for comparing the native camera\napp and third-party apps.\n\nThe following are key aspects to verify in the suggested scenes. Display panels\ncapable of HDR vary in brightness levels (measured in nits or lumens), so the\nfollowing numbers given are meant to be examples:\n\n- In the mid-light to low-light scene, the bright highlights of the candle or small light are rendered at *max brightness for the display* (possibly up to 1000 nits) in the HDR clip, and rendered at *max brightness for SDR* (approximately 100 nits) in the SDR clip. In the HDR clip, the bright highlights should shine out of the display, capturing the user's perception of what the scene's true dynamic range was. Compared to the HDR clip, the SDR clip should appear as flatter and less bright.\n- In the bright output scene, depending on the device's tuning, the HDR clip shows an apparent difference in screen brightness as compared to the SDR clip. For the HDR clip, the screen brightness for the overall scene (depending on headroom) should be higher, for example, up to 800 nits, and even more so for the bright highlights such as the chrome bumpers, around maximum brightness.\n- In the mid-range, low dynamic range indoor capture, the HDR and SDR clips are similar in color and tone, with the HDR capture being potentially brighter than the SDR. The HDR shouldn't be darker than the SDR. If tuning choices make this impossible, ensure that the third-party app behavior matches the native camera app behavior."]]