mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 02:38:01 +02:00
color-lcms: constify build_3d_lut()
These arrays are read-only here. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
parent
33ee2c9fb4
commit
f69bb08738
3 changed files with 6 additions and 6 deletions
|
|
@ -1702,13 +1702,13 @@ cmlcms_color_transform_recipe_string(const struct cmlcms_color_transform_recipe
|
|||
|
||||
static bool
|
||||
build_3d_lut(struct weston_compositor *compositor, cmsHTRANSFORM cmap_3dlut,
|
||||
unsigned int len_shaper, float *shaper,
|
||||
unsigned int len_shaper, const float *shaper,
|
||||
unsigned int len_lut3d, float *lut3d)
|
||||
{
|
||||
float divider = len_lut3d - 1;
|
||||
float rgb_in[3], rgb_out[3];
|
||||
uint32_t index, index_r, index_g, index_b;
|
||||
float *curves[3];
|
||||
const float *curves[3];
|
||||
|
||||
curves[0] = &shaper[0];
|
||||
curves[1] = &shaper[len_shaper];
|
||||
|
|
|
|||
|
|
@ -430,7 +430,7 @@ linear_interpolation(float x, float x0, float y0, float x1, float y1)
|
|||
}
|
||||
|
||||
WESTON_EXPORT_FOR_TESTS void
|
||||
find_neighbors(struct weston_compositor *compositor, uint32_t len, float *array,
|
||||
find_neighbors(struct weston_compositor *compositor, uint32_t len, const float *array,
|
||||
float val, uint32_t *neigh_A_index, uint32_t *neigh_B_index)
|
||||
{
|
||||
bool ascendent = (array[0] <= array[len - 1]);
|
||||
|
|
@ -469,7 +469,7 @@ find_neighbors(struct weston_compositor *compositor, uint32_t len, float *array,
|
|||
*/
|
||||
WL_EXPORT float
|
||||
weston_inverse_evaluate_lut1d(struct weston_compositor *compositor,
|
||||
uint32_t len_lut, float *lut, float input)
|
||||
uint32_t len_lut, const float *lut, float input)
|
||||
{
|
||||
float divider = len_lut - 1;
|
||||
uint32_t neighbor_A_index, neighbor_B_index;
|
||||
|
|
|
|||
|
|
@ -681,12 +681,12 @@ weston_color_curve_to_3x1D_LUT(struct weston_compositor *compositor,
|
|||
size_t lut_size, char **err_msg);
|
||||
|
||||
void
|
||||
find_neighbors(struct weston_compositor *compositor, uint32_t len, float *array,
|
||||
find_neighbors(struct weston_compositor *compositor, uint32_t len, const float *array,
|
||||
float val, uint32_t *neigh_A_index, uint32_t *neigh_B_index);
|
||||
|
||||
float
|
||||
weston_inverse_evaluate_lut1d(struct weston_compositor *compositor,
|
||||
uint32_t len_lut, float *lut, float input);
|
||||
uint32_t len_lut, const float *lut, float input);
|
||||
|
||||
struct weston_color_transform *
|
||||
weston_color_transform_ref(struct weston_color_transform *xform);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue