Module: Mesa Branch: main Commit: 73713f837b4c0ceda7f33476586931c04a0ec4b9 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=73713f837b4c0ceda7f33476586931c04a0ec4b9
Author: Agate, Jesse <jesse.ag...@amd.com> Date: Tue Nov 7 11:36:42 2023 -0500 amd/vpelib: Studio Range Handling The purpose of this change is to support bg color fill + studio range output. Now, studio range conversion will be done in the gamma block before bg color fill. That is for all studio range outputs adn SDR outputs we will be in NL before blend block. For full range HDR (full range PQ of FP16 only), we will be linear before blend block. - Added linear_0_1 gamma function - Consolidated x_scale and y_scale - Refactor Regam/Degam Funcs - Add y bias to regam and degam - Pull memory allocation for cm into a different function to make it more readable - Added logic to degamma/regamma to re-calculate instead of using table if the scale factors are not one and the bias is not zero. - Changing output gamma programming sequence in sw layer - Fixes in hw layer for interpolation error assocaites with studio range transformation in gamma. - Disabling ocsc - PQ studio will still be 'blended' in NL. But A check was added to reject the job if it is not opaque Reviewed-by: Roy Chan <roy.c...@amd.com> Acked-by: Alan Liu <haoping....@amd.com> Signed-off-by: Jesse Agate <jesse.ag...@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26841> --- src/amd/vpelib/src/chip/vpe10/inc/vpe10_mpc.h | 2 +- src/amd/vpelib/src/chip/vpe10/vpe10_cm_common.c | 44 +++ src/amd/vpelib/src/chip/vpe10/vpe10_mpc.c | 68 ++-- src/amd/vpelib/src/chip/vpe10/vpe10_opp.c | 13 +- src/amd/vpelib/src/chip/vpe10/vpe10_resource.c | 1 - src/amd/vpelib/src/core/color.c | 427 +++++++++++++++--------- src/amd/vpelib/src/core/color_bg.c | 69 +++- src/amd/vpelib/src/core/color_gamma.c | 244 ++++++++------ src/amd/vpelib/src/core/inc/color.h | 32 +- src/amd/vpelib/src/core/inc/color_bg.h | 5 +- src/amd/vpelib/src/core/inc/color_gamma.h | 7 +- src/amd/vpelib/src/core/inc/hw_shared.h | 5 - src/amd/vpelib/src/core/inc/mpc.h | 2 +- src/amd/vpelib/src/core/vpelib.c | 30 +- 14 files changed, 594 insertions(+), 355 deletions(-) Diff: http://cgit.freedesktop.org/mesa/mesa/diff/?id=73713f837b4c0ceda7f33476586931c04a0ec4b9