From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: better LUT segmentation for EOTFs Date: Thu, 07 May 2026 13:11:56 +1000 Message-ID: In-Reply-To: <20260506191606.15022-1-mwen@igalia.com> References: <20260506191606.15022-1-mwen@igalia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: better LUT segmentation for EOTFs Author: Melissa Wen Patches: 6 Reviewed: 2026-05-07T13:11:56.356959 --- This is a well-motivated 5-patch series addressing gradient banding in HDR = content (specifically PQ EOTFs) when AMD display hardware lacks fixed-funct= ion curves for certain color blocks (shaper, blend, regamma). The core insi= ght is sound: the existing code used the same LUT segmentation helper (`cm3= _helper_translate_curve_to_hw_format`) for both EOTFs (encoded=E2=86=92line= ar, degamma-like) and inverse EOTFs (linear=E2=86=92encoded, regamma-like),= despite these having fundamentally different input domains and curvature d= istributions. **Structure**: Patches 1-3 form the main fix =E2=80=94 enabling GAMCOR for = subsampled formats, reintroducing the degamma-specific translation helper, = and wiring it up. Patches 4-5 are a precision refinement =E2=80=94 adding i= nterpolation and a halving segment distribution for PQ/sRGB. The author hon= estly notes patches 4-5 didn't produce visible improvement, which is refres= hing transparency. **Correctness**: The math checks out. Array bounds are respected (`rgb_resu= lted` has 259 entries, max `hw_points` is 256; `TRANSFER_FUNC_POINTS` is 10= 25, max tf_pts index accessed is 401). The `interp_tf_pts` interpolation is= clean and correctly degenerates to a direct lookup when `seg_distr[k] <=3D= 4`. The NULL-ramp path through `mod_color_calculate_degamma_params` is saf= e =E2=80=94 all ramp dereferences are guarded by `ramp &&` checks. **Scope**: Changes are tightly scoped to DCN3+ hardware (dcn32_hwseq.c), to= uching only 4 files. The series is reviewable and bisectable. **Minor concerns**: One whitespace issue in patch 1, and the revert in patc= h 2 could benefit from a brief note about what was changed from the origina= l removed code (if anything). Overall the series looks ready with minor fix= es. --- --- Generated by Claude Code Patch Reviewer