mirror of
https://github.com/KrisKennaway/ii-pix.git
synced 2025-04-22 19:37:17 +00:00
- avoid passing around a float[::1] memoryview across function barriers, this seems to require reference counting which has a large overhead - inline some functions - C division - float instead of double
11 lines
458 B
Cython
11 lines
458 B
Cython
cdef float clip(float a, float min_value, float max_value) nogil
|
|
|
|
# This is used to avoid passing around float[::1] memoryviews in the critical path. These seem to
|
|
# require reference counting which has a large performance overhead.
|
|
cdef packed struct float3:
|
|
float[3] data
|
|
|
|
cdef float3 convert_rgb_to_cam16ucs(float[:, ::1] rgb_to_cam16ucs, float r, float g, float b) nogil
|
|
|
|
cdef float colour_distance_squared(float[3] colour1, float[3] colour2) nogil
|