Dhewm3 for AmigaOS4
# ABOUT
_dhewm 3_ is a _Doom 3_ GPL source port, know to work on at least Windows, Linux, Mac OS X, FreeBSD and now! AmigaOS4.
Copyright (C) 2018-2023 Hugues Nouvel
_CODE NAME_ _dhewm 3_ AOS4 "ALWAYS ULTRA"
The goal of _dhewm 3_ is bring _DOOM 3_ with the help of SDL1 to all suitable
platforms.
Bugs present in the original _DOOM 3_ will be fixed (when identified) without
altering the original gameplay.
This project
Dhewm3 for AmigaOS4 PowerPC with EGL_Wrap, Gl4es, Warp3D NOVA and Opengles2 library
- A-EON (NOVA and Opengles 2.0) http://www.a-eon.com/
- GL4es https://github.com/ptitSeb/gl4es
- EGL_Wrap library http://hunoppc.amiga-projects.net/
This distribution uses these functions of these 6 projects :
**The project is hosted at:** https://github.com/HunoPPC-NG/Dhewm3-for-EGL_Wrap-AmigaOS4
Dhewm3 for Update and support a standard code of engine : https://github.com/dhewm
Dante OpenglES2 for a source code of GLES2 : https://github.com/omcfadde/dante
Dante's GLSL Shaders : https://github.com/omcfadde/gl2progs
glKarin idTech4A++ (Harmattan Edition) : https://github.com/glKarin/com.n0n3m4.diii4a
Doom3 Original source code for ARB Driver : https://github.com/id-Software/DOOM-3
Gl4ES for Opengl renderer : https://github.com/ptitSeb/gl4es
# RELEASES
## Dhewm3 V1.5.5 release Named ALWAYS ULTRA AOS4(betatest) by HunoPPC (05.03.2023)
- Now use jpeg-turbo library, ALTIVEC support for AmigaOne X1000 (static)
- Now use a new zlib 1.2.13 October 13, 2022 (static)
- Speedup loading datas on .pk4 now!!
- Added new Option hack lights on shadow => r_speedHackShadow : Option = 0.0f Min -> 3.0f Max
*add this on configfile of dhewm3 : seta r_speedHackShadow "0" ( fps) - option disabled
seta r_speedHackShadow "0.90" (28.6 fps) fullHD
seta r_speedHackShadow "0.95" (29 fps) fullHD
seta r_speedHackShadow "0.96" (29.6 fps) fullHD
seta r_speedHackShadow "0.97" (30 fps) fullHD - By Default on new config-file
seta r_speedHackShadow "0.999" (30.3 fps) fullHD
seta r_speedHackShadow "1.0" (30.5 fps) fullHD
seta r_speedHackShadow "1.022" (30.8 fps) fullHD
seta r_speedHackShadow "1.033" (31 fps) fullHD
- For benchmark X5000 options is:
Video Quality: ULTRA QUALITY
Screen Size: 1920x1080
Fullscreen: YES
Antialiasing: OFF
All advanced options enabled (just shadows OFF)
- Now on FullHD ARB renderer go to 47 FPS (x5000 with RX560), this renderer not support shadows and lights effects (for low machines), on console use this command-line = "timedemo demo1.demo usecache"
- Now on FullHD ARB2 renderer go to 20 FPS (x5000 with RX560), this renderer is an NATIVE Doom3, on console use this command-line = "timedemo demo1.demo usecache"
- Now on FullHD GLSL renderer go to 30FPS (x5000 with RX560), this renderer is an Hack by HunoPPC for AmigaOS4, on console use this command-line = "timedemo demo1.demo usecache"
* for exemple on MACOSX PPC Doom 3 Benchmarks :
640 x 480 800 x 600 1024 x 768 1280 x 1024 1600 x 1200
No FSAA 47.1 45.3 41.3 35.6 29.5
FSAA 2x 44.9 42.5 38.2 31.7 24.8
FSAA 4x 40.8 36.7 30.3 23.6 18.4
BEST RESULTS IN BOLD. ALL RESULTS ARE IN FRAMES PER SECOND.
Article is here : https://www.macworld.com/article/174720/doom3-7.html
* for exemple X5000/40 - X1000 and PI400 on Linux PPC Doom 3 Benchmarks :
Video Quality: ULTRA QUALITY
Screen Size: 1600x1200
Fullscreen: YES
Antialiasing: 8 x
All advanced options enabled
Results:
AmigaOne X5000/40 4 x 2200.00 MHz with an AMD Radeon HD6970 (Fienix/Debian Sid): 2148 frames rendered in 80.0 seconds = 26.9 fps
AmigaOne X5000/40 4 x 2200.00 MHz with an AMD Radeon HD6970 (Ubuntu 16.04 LTS): 2148 frames rendered in 86.2 seconds = 24.9 fps
AmigaOne X1000 2 x 1800.00 MHz with an AMD Radeon HD6970 (Fienix/Debian Sid): 2148 frames rendered in 110.8 seconds = 19.4 fps
-----
Video Quality: ULTRA QUALITY
Screen Size: 1280x1024
Fullscreen: YES
Antialiasing: 8 x
All advanced options enabled
Result:
AmigaOne X5000/40 4 x 2200.00 MHz with an AMD Radeon HD6970 (Fienix/Debian Sid): 2148 frames rendered in 79.6 seconds = 27.0 fps
-----
Video Quality: HIGH QUALITY
Screen Size: 1024x768
Fullscreen: YES
Antialiasing: OFF
All advanced options enabled
Results:
AmigaOne X5000/40 4 x 2200.00 MHz with an AMD Radeon HD6970 (Fienix/Debian Sid): 2148 frames rendered in 78.8 seconds = 27.3 fps
AmigaOne X1000 2 x 1800.00 MHz with an AMD Radeon HD6970 (Fienix/Debian Sid): 2148 frames rendered in 109.1 seconds = 19.7 fps
Raspberry Pi 400 4 x 2200.00 MHz with the VideoCore VI (V3D) (Raspberry Pi OS): 2148 frames rendered in 166.4 seconds = 12.9 fps
X5000: AMD Radeon HD6970 (Cayman XT) in the x4 PCIe slot: 2000 MByte/s (AGP 8x: 2133 MByte/s)
One in turn of the CPU cores is always at 100% if Doom3 runs so the PCIe interface to the graphics card is used very often.
Article is here: https://forum.hyperion-entertainment.com/viewtopic.php?p=53182#p53182
## Dhewm3 V1.5.4 release Named ALWAYS ULTRA AOS4(betatest) by HunoPPC (03.01.2023)
- Big work on glsl renderer (W.I.P)
- 3 renderers working now : (HunoPPC 2022)
* Arb simple renderer opengl without spécials effects
* Arb2 use native arb2 shaders with all effects
* Glsl use modified glsl native shaders with all effects
- Now by default use gamma in shader (HunoPPC 2022)
- Brightness working on direct renderer with gamma in shader mode active (HunoPPC 2022)
- Patch lights on shaders for speedup engine (HunoPPC 2022)
- Patch internal image loader Egl_wrap for speedup convertion rgb -> rgba and intensive usage CPU (HunoPPC 2022)
- Added special datas for AmigaOS4 version (HunoPPC 2023)
## Dhewm3 V1.5.3 release Named ALWAYS ULTRA AOS4(betatest) by HunoPPC (05.09.2022)
- Now ARB working fine for low machine (increase speed), on fullHD 40 FPS (X5000), this renderer is not supported on the future
- Now compiled with GCC Version 11 and a new SDK for AmigaOS4
- Added a new versions of compatible MODS (One individual executable per Module by HunoPPC 2022):
* Vanilla W.I.P
* Edge of chaos W.I.P
* Grimm W.I.P
* Sikkmod W.I.P
* Vanilla W.I.P
- Now a Mod "The Lost Mission" WORKING
- Use a GLSL native on EGL_Wrap with new renderer effects W.I.P 45%
## Dhewm3 V1.5.2 release Named ALWAYS ULTRA AOS4(betatest) by HunoPPC (09.07.2022)
- Added Joypad with EGLSDL v1.3 (HunoPPC 2022)
- Added Icons and installer (HunoPPC 2022)
- Support multithreading in EGL_wrapper library for low CPU on DOOM3 now! (HunoPPC 2022)
- Support ARB2 (HunoPPC 2022)
- Optimized sound support to relieve CPU resources (HunoPPC 2022)
- Support for the full Polish version of Doom3 (c) LEM
- Gamma and Brightness are now applied in the shaders instead of by setting hardware gamma, can be disabled (so hardware gamma is used again) with r_gammaInShaders 0
- s_alReverbGain CVar to reduce EFX reverb effect intensity
- Fixes for looped sounds
- Replaced most usages of strncpy() with something safer to prevent buffer overflows (remaining cases should be safe)
- Support loading some mods known to need fs_game_base d3xp via Mods menu (currently, The Lost Mission and LibreCoop d3xp are supported)
- Disable assertion in idSampleDecoderLocal::DecodeOGG() that triggered when starting a new Classic Doom3 game
- Versions of compatible MODS (One individual executable per Module by HunoPPC 2022):
* LibreCoop W.I.P
* The Lost Mission WORKING
* Classic Doom3 WORKING
* HardCorps WORKING
* Resurrection of Evil WORKING
* Rivensin WORKING
* Fitz Packerton W.I.P
* Denton's Enhanced Doom3 WORKING
> > See https://dhewm3.org/mods.html for more details
- dhewm3 now supports the Doom3 Demo gamedata (HunoPPC 2022)
- Restore "Carmack's Reverse" Z-Fail stencil shadows; use glStencilOpSeparate() if available
- Scale menus, fullscreen videos and the PDA to 4:3 (with black bars left/right) on (HunoPPC 2022)
- Widescreen displays so they don't look stretched/distorted. Can be disabled with r_scaleMenusTo43 0. (HunoPPC 2022)
- Lags in starting to play a sound which for example caused the machinegun or plasmagun sounds to stutter have been eliminated
- Looping .wav sounds with leadin now work
- Added support of PNG images for additional MODS (HunoPPC 2022)
- Added support Network, now it's possible playing on NET and LOCAL networks (HunoPPC 2022)
- Added new package of Enhanced Shaders (HunoPPC 2022)
- Addition of several video modes (HunoPPC 2022):
Mode 0: 320x240"
Mode 2: 512x384"
Mode 3: 640x480"
Mode 4: 720x405"
Mode 5: 720x480"
Mode 6: 720x576"
Mode 7: 800x600"
Mode 8: 960x540"
Mode 9: 960x600"
Mode 10: 960x720"
Mode 11: 1024x576"
Mode 12: 1024x640"
Mode 13: 1024x768"
Mode 14: 1152x864"
Mode 15: 1280x720"
Mode 16: 1280x768"
Mode 17: 1280x960"
Mode 18: 1280x1024"
Mode 19: 1440x810"
Mode 20: 1440x900"
Mode 21: 1440x1080"
Mode 22: 1600x900"
Mode 23: 1600x1000"
Mode 24: 1600x1200"
Mode 25: 1920x1080"
Mode 26: 1920x1200"
Mode 27: 1920x1440"
Mode 28: 2048x1152"
Mode 29: 2560x1600"
Mode 30: 3200x2400"
Mode 31: 3840x2160"
Mode 32: 4096x2304"
Mode 33: 2880x1800"
Mode 34: 2560x1440"
# CHANGES ON THIS VERSION
Compared to the original _DOOM 3_, the changes of _dhewm 3_ worth mentioning are:
- EGLSDL for low level OS support, OpenGL and input handling
- OpenAL for audio output, all OS specific audio backends are gone
- OpenAL EFX for EAX reverb effects (read: EAX-like sound effects on all platforms/hardware)
- Better support for widescreen (and arbitrary display resolutions)
- New several video modes
- New enhanced shaders
- Support multithread for future multicore with EGL_Wrap library
- Support PNG images
- all new options
- Support Joypad with EGLSDL v1.3
- Use jpeg-turbo library with ALTIVEC support
# GENERAL NOTES
## Game data and patching
This source release does not contain any game data, the game data is still
covered by the original EULA and must be obeyed as usual.
You must patch the game to the latest version (1.3.1). See the FAQ for details, including
how to get the game data from Steam on Linux or OSX.
Note that _Doom 3_ and _Doom 3: Resurrection of Evil_ are available from the Steam store at
http://store.steampowered.com/app/9050/
http://store.steampowered.com/app/9070/
You can also buy Steam keys at the Humble Store; currently this seems the only way to
buy a Doom3 Steam key in Germany (Note that Germans still can't buy the RoE Addon there):
https://www.humblebundle.com/store/p/doom3_storefront
https://www.humblebundle.com/store/p/doom3_resofevil_storefront
## Loading DOOM 3 files
Dhewm3 can load pk4 files. The Dhewm3 core requires game data files which can be found here and here. If you bought the game on CDs/DVD, base/pak000.pk4 - pak004.pk4 and d3xp/pak000.pk4 can be copied from the disks, the other files are from the patch.
On Linux (and probably other Unix-like systems and maybe even Windows with a mingw shell) you can extract the needed files from the official 1.3.1 patch for Linux with:
sh /path/to/doom3-linux-1.3.1.1304.x86.run --tar xvf --wildcards base/pak* d3xp/pak*
On Windows you can just install the game and the official 1.3.1 patch for Windows and then get the files from the installation directory (or copy dhewm3 in there).
Warning
Doom3 BFG is not supported.
You'll need the game data from a Doom3 installation patched to 1.3.1. Specifically, you'll need the following .pk4 files for the main game:
Filename Size MD5-sum
base/pak000.pk4 337MB 71b8d37b2444d3d86a36fd61783844fe
base/pak001.pk4 220MB 4bc4f3ba04ec2b4f4837be40e840a3c1
base/pak002.pk4 398MB fa84069e9642ad9aa4b49624150cc345
base/pak003.pk4 303MB f22d8464997924e4913e467e7d62d5fe
base/pak004.pk4 227MB 38561a3c73f93f2e6fd31abf1d4e9102
base/pak005.pk4 540KB 2afd4ece27d36393b7538d55a345b90d
base/pak006.pk4 214KB a6e7003fa9dcc75073dc02b56399b370
base/pak007.pk4 118KB 6319f086f930ec1618ab09b4c20c268c
base/pak008.pk4 12KB 28750b7841de9453eb335bad6841a2a5
... and (optionally) these .pk4 files for the Resurrection of Evil addon:
Resurrection of Evil is a horror first-person shooter video game developed by Nerve Software and published by Activision. It was released for Microsoft Windows on April 3, 2005, as an expansion pack and sequel to Doom 3 and on October 5, 2005, for the Xbox video game console. The Xbox version does not require the original Doom 3 in order to play, and includes The Ultimate Doom, Doom II: Hell on Earth and Master Levels for Doom II.
Filename Size MD5-sum
d3xp/pak000.pk4 514MB a883fef0fd10aadeb73d34c462ff865d
d3xp/pak001.pk4 98KB 06fc9be965e345587064056bf22236d2
An example folder structure would be like so:
|--> Games-PPC/
|--> Dhewm3-OS4/
|
|--> base
|--> base/
| |--> pak000.pk4
| |--> pak001.pk4
| |--> pak002.pk4
| |--> pak003.pk4
| |--> pak004.pk4
| |--> pak005.pk4
| |--> pak006.pk4
| |--> pak007.pk4
| |--> pak008.pk4
|--> d3xp/
|--> pak000.pk4
|--> pak001.pk4
Game saves files will be created in the doom3-saves directory, organised in folders matching the filenames of loaded content - for example:
|--> Games-PPC/
|--> Dhewm3-OS4/
|--> doom3-saves/
|--> base/
|--> savegames/
| |--> *.save
| |--> *.txt
|--> d3xp/
|--> savegames/
|--> *.save
|--> *.txt
Game saves are named from mission names on "doom3-saves" directory.
Game internal configuration files will be created in the doom3-configs directory, organised in folders matching the filenames of loaded content - for example:
|--> Games-PPC/
|--> Dhewm3-OS4/
|--> doom3-configs/
|--> base/
| |--> *.cfg
|--> d3xp/
|--> *.cfg
Game configs are named from mission names on "doom3-configs" directory.
## Compiling
Required libraries are not part of the tree. These are:
- AmigaOS 4.1 Machine PowerPC with support Warp3D NOVA
- Warp3D NOVA from A-EON
- OpenglES2 from A-EON
- EGL_Wrap library from HunoPPC
- zlib (static)
- libcurl (static)
- libturbojpeg (static)
- libogg (static)
- libvorbis (static)
- libvorbisfile (may be part of libvorbis) (static)
- OpenAL Soft (static)
- EGLSDL v1.3 (static)
## Back End Rendering of Stencil Shadows
The Doom 3 GPL source code release does not include functionality enabling rendering
of stencil shadows via the "depth fail" method, a functionality commonly known as
"Carmack's Reverse".
***Note*** that this **does *not* change the visual appereance** of the game.
The shadows look the same, they're just created in a slightly different way.
In theory there might be a small performance impact, but on hardware less than
ten years old it shouldn't make a difference.
## MayaImport
The code for our Maya export plugin is included, if you are a Maya licensee
you can obtain the SDK from Autodesk.
# LICENSE
See COPYING.txt for the GNU GENERAL PUBLIC LICENSE
ADDITIONAL TERMS: The Doom 3 GPL Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU GPL which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
EXCLUDED CODE: The code described below and contained in the Doom 3 GPL Source Code release is not part of the Program covered by the GPL and is expressly excluded from its terms. You are solely responsible for obtaining from the copyright holder a license for such code and complying with the applicable license terms.
## PropTree
neo/tools/common/PropTree/*
Copyright (C) 1998-2001 Scott Ramsay
sramsay@gonavi.com
http://www.gonavi.com
This material is provided "as is", with absolutely no warranty expressed
or implied. Any use is at your own risk.
Permission to use or copy this software for any purpose is hereby granted
without fee, provided the above notices are retained on all copies.
Permission to modify the code and to distribute modified code is granted,
provided the above notices are retained, and a notice that the code was
modified is included with the above copyright notice.
If you use this code, drop me an email. I'd like to know if you find the code
useful.
## Base64 implementation
neo/idlib/Base64.cpp
Copyright (c) 1996 Lars Wirzenius. All rights reserved.
June 14 2003: TTimo <ttimo@idsoftware.com>
modified + endian bug fixes
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=197039
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
## IO on .zip files using minizip
src/framework/minizip/*
Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
Modifications of Unzip for Zip64
Copyright (C) 2007-2008 Even Rouault
Modifications for Zip64 support
Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
## MD4 Message-Digest Algorithm
neo/idlib/hashing/MD4.cpp
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.
License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD4 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.
License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD4 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this
documentation and/or software.
## MD5 Message-Digest Algorithm
neo/idlib/hashing/MD5.cpp
This code implements the MD5 message-digest algorithm.
The algorithm is due to Ron Rivest. This code was
written by Colin Plumb in 1993, no copyright is claimed.
This code is in the public domain; do with it what you wish.
## CRC32 Checksum
neo/idlib/hashing/CRC32.cpp
Copyright (C) 1995-1998 Mark Adler
## Brandelf utility
neo/sys/linux/setup/brandelf.c
Copyright (c) 1996 Søren Schmidt
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer
in this position and unchanged.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software withough specific prior written permission
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
$FreeBSD: src/usr.bin/brandelf/brandelf.c,v 1.16 2000/07/02 03:34:08 imp Exp $
## makeself - Make self-extractable archives on Unix
neo/sys/linux/setup/makeself/*, neo/sys/linux/setup/makeself/README
Copyright (c) Stéphane Peter
Licensing: GPL v2
## libjpeg-turbo
https://github.com/libjpeg-turbo/libjpeg-turbo
libjpeg-turbo is a JPEG image codec that uses SIMD instructions to accelerate baseline JPEG compression and decompression on x86, x86-64,
Arm, PowerPC, and MIPS systems, as well as progressive JPEG compression on x86, x86-64, and Arm systems. On such systems,
libjpeg-turbo is generally 2-6x as fast as libjpeg, all else being equal. On other types of systems,
libjpeg-turbo can still outperform libjpeg by a significant amount, by virtue of its highly-optimized Huffman coding routines.
In many cases, the performance of libjpeg-turbo rivals that of proprietary high-speed JPEG codecs.
libjpeg-turbo implements both the traditional libjpeg API as well as the less powerful but more straightforward TurboJPEG API.
libjpeg-turbo also features colorspace extensions that allow it to compress from/decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.),
as well as a full-featured Java interface.
libjpeg-turbo was originally based on libjpeg/SIMD, an MMX-accelerated derivative of libjpeg v6b developed by Miyasaka Masaru.
The TigerVNC and VirtualGL projects made numerous enhancements to the codec in 2009, and in early 2010,
libjpeg-turbo spun off into an independent project, with the goal of making high-speed JPEG compression/decompression technology available to a broader range of users and developers.
libjpeg-turbo is covered by three compatible BSD-style open source licenses. Refer to LICENSE.md for a roll-up of license terms.
## zlib
https://www.zlib.net/
zlib is designed to be a free, general-purpose, legally unencumbered -- that is, not covered by any patents -- lossless data-compression library for use on virtually any computer hardware and operating system.
The zlib data format is itself portable across platforms. Unlike the LZW compression method used in Unix compress(1) and in the GIF image format,
the compression method currently used in zlib essentially never expands the data. (LZW can double or triple the file size in extreme cases.)
zlib's memory footprint is also independent of the input data and can be reduced, if necessary, at some cost in compression. A more precise, technical discussion of both points is available on another page.