참고표 (LUT)를 사용하여 색상 보정
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Android 기기마다 HDR 기능이 다르기 때문에 HDR 디스플레이 출력이 단편화될 수 있습니다. 룩업 테이블 (LUT)은 이러한 불일치를 해결하기 위해 설계된 새로운 색상 보정 솔루션입니다. 이 불일치는 정의되지 않은 기기별 색상 보정 메커니즘에 위임하는 대신 색상 보정 방법을 지정하여 해결됩니다.
SDK 기본 요건
LUT를 구현하려면 SDK 버전이 36 이상이어야 합니다.
LUT 구현
LUT를 SurfaceControl
에 적용하려면 다음 단계를 따르세요.
DisplayLuts
인스턴스를 만듭니다.
- LUT 데이터 버퍼, LUT 차원, LUT의 샘플링 키를 사용하여
DisplayLuts.Entry
인스턴스를 만듭니다. 자세한 내용은 LutProperties
문서를 참고하세요.
DisplayLuts#set(DisplayLuts.Entry luts)
또는 DisplayLuts#set(DisplayLuts.Entry first, DisplayLuts.Entry second)
를 호출하여 LUT 항목을 설정합니다. 프레임워크는 1D LUT, 3D LUT 또는 1D 및 3D LUT의 조합을 지원합니다.
SurfaceControl.Transaction#setLuts
를 호출하여 레이어에 LUT를 적용합니다.
Kotlin
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();
OverlayProperties.getLutProperties()
를 사용하여 기기의 LUT 속성을 파악하고 하드웨어 컴포저가 선택한 LUT를 처리할 수 있는지 확인할 수도 있습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-08-27(UTC)
[null,null,["최종 업데이트: 2025-08-27(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."]]