projects
/
babl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdcfd36
)
LUT: disable when running on big-endian systems
author
Øyvind Kolås
<pippin@gimp.org>
Sat, 22 Apr 2023 13:29:33 +0000
(15:29 +0200)
committer
Øyvind Kolås
<pippin@gimp.org>
Sat, 22 Apr 2023 13:29:33 +0000
(15:29 +0200)
We are crashing due to endian assumptions - we now only try to do the LUT
optimizations on little endian - no functionality is lost on big-endian
though conversion might be a tad slower. Hopefully fixing issue #91
babl/babl-fish-path.c
patch
|
blob
|
history
diff --git
a/babl/babl-fish-path.c
b/babl/babl-fish-path.c
index c01cc2d7c0cca6c51abaf4d1230db1b48fb0d356..ef195f8e59c74f28e36ee245b15530a93867df0d 100644
(file)
--- a/
babl/babl-fish-path.c
+++ b/
babl/babl-fish-path.c
@@
-648,6
+648,14
@@
_babl_legal_error (void)
else
enable_lut = 1;
+ {
+ const uint32_t u32 = 1;
+ if ( *((char*)&u32) == 0)
+ { /* disable use of LUTs if we are running on big endian */
+ enable_lut = 0;
+ }
+ }
+
return error;
}