GraphicsMagick: coders/tiff.c: Performance improvement for lo en...
GraphicsMagick Commits <[email protected]> Sun, 04 Feb 2024 05:28:20 -0600
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.4222.1707046114.1736.graphicsmagick-commit@lists.sourceforge.net> |
changeset c88dc1a95388 in /hg/GraphicsMagick details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=c88dc1a95388 summary: coders/tiff.c: Performance improvement for lo endian architecture. diffstat: ChangeLog | 4 ++++ coders/tiff.c | 8 ++++++++ 2 files changed, 12 insertions(+), 0 deletions(-) diffs (38 lines): diff -r 54f3da31ad45 -r c88dc1a95388 ChangeLog --- a/ChangeLog Tue Jan 30 14:06:49 2024 -0600 +++ b/ChangeLog Sun Feb 04 12:27:57 2024 +0100 @@ -1,3 +1,7 @@ +2024-02-04 Fojtik Jaroslav <[email protected]> + + * coders/tiff.c: Performance improvement for lo endian architecture. + 2024-01-29 Fojtik Jaroslav <[email protected]> * coders/tiff.c: Allow succesfull compilation for older libtiff. diff -r 54f3da31ad45 -r c88dc1a95388 coders/tiff.c --- a/coders/tiff.c Tue Jan 30 14:06:49 2024 -0600 +++ b/coders/tiff.c Sun Feb 04 12:27:57 2024 +0100 @@ -4423,7 +4423,11 @@ static magick_uint32_t LD_UINT32_LO(const unsigned char *Mem) { +#ifdef WORDS_BIGENDIAN return (magick_uint32_t)Mem[0] | ((magick_uint32_t)Mem[1] << 8) | ((magick_uint32_t)Mem[2] << 16) | ((magick_uint32_t)Mem[3] << 24); +#else + return *(magick_uint32_t*)Mem; +#endif } static magick_uint32_t LD_UINT32_HI(const unsigned char *Mem) @@ -4433,7 +4437,11 @@ static magick_uint16_t LD_UINT16_LO(const unsigned char *Mem) { +#ifdef WORDS_BIGENDIAN return (magick_uint16_t)Mem[0] | ((magick_uint16_t)Mem[1] << 8); +#else + return *(magick_uint16_t*)Mem; +#endif } static magick_uint16_t LD_UINT16_HI(const unsigned char *Mem)