Commits on Source (10)
-
Add post-curve support in color.h. Pre-curve and post-curve describe color pipeline components in a single GL shader invocation.The GL shader is supposed to match struct weston_color_transform exactly. We have the following color pipeline: shader A -> blending -> shader B -> KMS. Both A and B shaders using the same source file :fragment.glsl. Each shader has pre and post curve. The typical color pipeline with 3DLUT: Shader A: pre-curve identity->3DLUT->blending->post-curve identity Shader B: pre-curve->3DLUT identity->post-curve identity->KMS The typical color pipeline with matrix (in next commits): Shader A: pre-curve->matrix->blending->post-curve identity Shader B: pre-curve->matrix identity->post-curve identity->KMS The pre-curve plays role of EOTF (shader A) or INV_EOTF (shader B) becouse we are stiching the shaders. We assume that someone in the future may use both pre-curve and post-curve, for example, when it is not possible to combine these curves into 3DLUT and we will do mapping elements based on their location in ICC profile. Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
96f0fc39 -
Add matrix in color.h Matrix is used as an optimized method for color mapping vs 3DLUT. Nothing sets color mapping to matrix yet. Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
cd888bde -
Eotf is the transfer function whose inverse must be used for converting from output light-linear space to sink electrical space. Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
003252a5 -
Rename cmslcms_fill_in_pre_curve to cmlcms_fill_in_output_inv_eotf_vcgt due to importance what the function is fetching: profile->output_inv_eotf_vcgt. Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
06d89fe1 -
Relax the types of color transformations categories where this function can be used. Yes, it is only useful for BLEND_TO_OUTPUT, but that is for the user of this function to take care of. This function always works as named regardless. The only condition is that output_inv_eotf_vcgt has been populated, so fill_in_curves() may as well assert that. While at it, make the code a little more concise. The 'len' assertion belongs in fill_in_curves() because that is where the problem would appear if the assertion failed. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
711b2779 -
Right now this function only creates a CMM pipeline and produces a 3D LUT from it, but in the future it can produce other types of transformations. The function is renamed to xform_realize_chain() because it creates a chain of profiles, forms a multi-profile-transform from them, and fits that into weston_color_transform. The further refactoring supports the future changes, and attempts to make the code more readable. There is provision for easily adding more profiles into the chain. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
40e06794 -
Restructing cmlcms_color_transform_create for readibility. Also dropped zalloc() check in favor of xzalloc() as per the recent Weston development policy. Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Co-authored-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
f3277a4f -
This will be used by debug logging and error reporting. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
1874f4db -
This patch adds the essential LittleCMS color pipeline optimizations and analysis that is necessary for extracting matrices from pipelines correctly. When we can extract a matrix and 1D curve sets, we can use those with GL-renderer without needing an inherently heavy and imprecise 3D LUT. This should improve color transformation precision and performance when a 3D LUT is not necessary. The core of the optimization and analysis is a custom plugin for LittleCMS. The optimization step comprises of repeatedly merging sequential matrices and sequential curve sets into one and eliminating identity elements which may allow for more merging. The analysis step takes the optimized LittleCMS pipeline and attempts to fit all of its elements into the weston_color_transform model. If it fits, we have an optimized color transformation and do not need a 3D LUT. If it does not fit, we use a 3D LUT as before. Co-authored-by: Pekka Paalanen <pekka.paalanen@collabora.com> Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
6678f815 -
Not a functional change. The replacement of const dump file to use suffix of appropriate sub tests (sRGB->sRGB, sRGB->adobeRGB, etc). Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com>
52e6052f
This diff is collapsed.