লুক-আপ টেবিলের সাথে রঙ সঠিক (LUTs)
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
অ্যান্ড্রয়েড ডিভাইস জুড়ে বিভিন্ন HDR ক্ষমতা খণ্ডিত HDR ডিসপ্লে আউটপুট হতে পারে। একটি লুক-আপ টেবিল (LUT) হল একটি নতুন রঙ সংশোধন সমাধান যা এই অসঙ্গতি সমাধানের জন্য ডিজাইন করা হয়েছে। এই অসঙ্গতিটি একটি অনির্ধারিত প্রতি-ডিভাইস রঙ সংশোধন পদ্ধতিতে অর্পণ করার পরিবর্তে রঙ সঠিক করার একটি উপায় নির্ধারণ করে সমাধান করা হয়।
SDK পূর্বশর্ত
LUTs প্রয়োগ করতে, আপনার SDK সংস্করণটি 36 বা তার বেশি হতে হবে।
একটি LUT বাস্তবায়ন
একটি SurfaceControl
একটি LUT প্রয়োগ করতে এই পদক্ষেপগুলি অনুসরণ করুন:
- একটি
DisplayLuts
উদাহরণ তৈরি করুন। - LUT ডেটা বাফার, LUT মাত্রা এবং LUT-এর স্যাম্পলিং কী দিয়ে
DisplayLuts.Entry
. Entry উদাহরণ(গুলি) তৈরি করুন। আরও তথ্যের জন্য, LutProperties
ডকুমেন্টেশন দেখুন। - LUT এন্ট্রি সেট করতে
DisplayLuts#set(DisplayLuts.Entry luts)
অথবা DisplayLuts#set(DisplayLuts.Entry first, DisplayLuts.Entry second)
কল করুন। ফ্রেমওয়ার্ক 1D LUT, 3D LUT, বা 1D এবং 3D LUT-এর সংমিশ্রণ সমর্থন করে। - স্তরে LUTs প্রয়োগ করতে
SurfaceControl.Transaction#setLuts
কল করুন।
কোটলিন
val sc = SurfaceControl.Builder().build()
val luts = DisplayLuts()
val entry = DisplayLuts.Entry(
floatArrayOf(0.5f, 0.5f, 0.5f, 0.5f),
LutProperties.ONE_DIMENSION,
LutProperties.SAMPLING_KEY_MAX_RGB
)
luts.set(entry)
SurfaceControl.Transaction().setLuts(sc, luts).apply()
জাভা
SurfaceControl sc = new SurfaceControl.Builder().build();
DisplayLuts luts = new DisplayLuts();
DisplayLuts.Entry entry = new DisplayLuts.Entry(
new float[]{0.5f, 0.5f, 0.5f, 0.5f},
LutProperties.ONE_DIMENSION,
LutProperties.SAMPLING_KEY_MAX_RGB
);
luts.set(entry);
new SurfaceControl.Transaction().setLuts(sc, luts).apply();
আপনি ডিভাইসের LUT বৈশিষ্ট্যগুলি বোঝার জন্য OverlayProperties.getLutProperties()
ব্যবহার করতে পারেন এবং হার্ডওয়্যার কম্পোজার নির্বাচিত LUT পরিচালনা করতে পারে কিনা তা নির্ধারণ করতে পারেন।
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-08-21 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-08-21 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Color correct with look-up tables (LUTs)\n\nVarying HDR capabilities across Android devices can lead to fragmented HDR\ndisplay outputs. A look-up table (LUT) is a new color correction solution\ndesigned to resolve this inconsistency. This inconsistency is resolved by\n*prescribing* a way to color correct, rather than delegating to an undefined\nper-device color correction mechanism.\n\nSDK prerequisites\n-----------------\n\nTo implement LUTs, your SDK version must 36 or higher.\n\nImplement a LUT\n---------------\n\nFollow these steps to apply a LUT to a [`SurfaceControl`](/reference/android/view/SurfaceControl):\n\n1. Create a [`DisplayLuts`](/reference/android/hardware/DisplayLuts) instance.\n2. Create [`DisplayLuts.Entry`](/reference/android/hardware/DisplayLuts.Entry) instance(s) with the LUT data buffer, LUT dimension, and the sampling key of the LUT. For more information, see [`LutProperties`](/reference/android/hardware/LutProperties) documentation.\n3. Call [`DisplayLuts#set(DisplayLuts.Entry luts)`](/reference/android/hardware/DisplayLuts#set(android.hardware.DisplayLuts.Entry)) or [`DisplayLuts#set(DisplayLuts.Entry first, DisplayLuts.Entry second)`](/reference/android/hardware/DisplayLuts#set(android.hardware.DisplayLuts.Entry,%20android.hardware.DisplayLuts.Entry)) to set LUT entries. The framework supports 1D LUT, 3D LUT, or a combination of 1D and 3D LUTs.\n4. Call [`SurfaceControl.Transaction#setLuts`](/reference/android/view/SurfaceControl.Transaction#setLuts(android.view.SurfaceControl,%20android.hardware.DisplayLuts)) to apply the LUTs to the layer.\n\n### Kotlin\n\n val sc = SurfaceControl.Builder().build()\n val luts = DisplayLuts()\n val entry = DisplayLuts.Entry(\n floatArrayOf(0.5f, 0.5f, 0.5f, 0.5f),\n LutProperties.ONE_DIMENSION,\n LutProperties.SAMPLING_KEY_MAX_RGB\n )\n luts.set(entry)\n SurfaceControl.Transaction().setLuts(sc, luts).apply()\n\n### Java\n\n SurfaceControl sc = new SurfaceControl.Builder().build();\n DisplayLuts luts = new DisplayLuts();\n DisplayLuts.Entry entry = new DisplayLuts.Entry(\n new float[]{0.5f, 0.5f, 0.5f, 0.5f},\n LutProperties.ONE_DIMENSION,\n LutProperties.SAMPLING_KEY_MAX_RGB\n );\n luts.set(entry);\n new SurfaceControl.Transaction().setLuts(sc, luts).apply();\n\nYou can also use [`OverlayProperties.getLutProperties()`](/reference/android/hardware/OverlayProperties#getLutProperties()) to understand the\nLUT properties of the device, and determine if the Hardware Composer can handle\nthe selected LUT."]]