cae672e1f9
If an image has 256 or fewer colors, WebP/Lossless allows storing the colors in a helper image, and then storing just indexes into that helper image in the main image's green channel, while setting r, b, and a of the main image to 0. Since constant-color channels need to space to store in WebP, this reduces storage needed to 1/4th (if alpha is used) or 1/3rd (if alpha is constant across the image). If an image has <= 16 colors, WebP lossless files pack multiple color table indexes into a single pixel's green channel, further reducing file size. This pixel packing is not yet implemented in this commit. GIFs can store at most 256 colors per frame, so animated gifs often have 256 or fewer colors, making this effective when transcoding gifs. (WebP also has a "subtract green" transform, which can be used to need to store just a single channel for grayscale images, without having to store a color table. That's not yet implemented -- for now, we'll now store grayscale images using this color indexing transform instead, which wastes to storage for the color table.) (If an image has <= 256 colors but all these colors use only a single channel, then storing a color table for these colors is also wasteful, at least if the image has > 16 colors too. That's rare in practice, but maybe we can add code for it later on.) (WebP also has a "color cache" feature where the last few used colors can be referenced using very few bits. This is what the webp spec says is similar to palettes as well. We don't implement color cache writing support yet either; maybe it's better than using a color indexing transform for some inputs.) Some numbers on my test files: sunset-retro.png: No performance or binary size impact. The input quickly uses more than 256 colors. giphy.gif (184k): 4.1M -> 3.9M, 95.5 ms ± 4.9 ms -> 106.4 ms ± 5.3 ms Most frames use more than 256 colors, but just barely. So fairly expensive runtime wise, with just a small win. (See comment on #24454 for the previous 4.9 MiB -> 4.1 MiB drop.) 7z7c.gif (11K): 118K -> 40K Every frame has less than 256 colors (but more than 16, so no packing), and so we can cut filesize roughly to 1/3rd: We only need to store an index per channel. From 10.7x as large as the input to 3.6x as large. |
||
---|---|---|
.devcontainer | ||
.github | ||
AK | ||
Base | ||
Documentation | ||
Kernel | ||
Ladybird | ||
Meta | ||
Ports | ||
Tests | ||
Toolchain | ||
Userland | ||
.clang-format | ||
.clang-tidy | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.gn | ||
.mailmap | ||
.pre-commit-config.yaml | ||
.prettierignore | ||
.prettierrc | ||
.ycm_extra_conf.py | ||
CMakeLists.txt | ||
CONTRIBUTING.md | ||
flake.lock | ||
flake.nix | ||
LICENSE | ||
README.md | ||
SECURITY.md |
SerenityOS and Ladybird
SerenityOS is a graphical Unix-like operating system for x86-64 computers.
Ladybird is a cross-platform independent web browser built from SerenityOS components.
FAQ | Documentation | Build Instructions
About SerenityOS
SerenityOS is a love letter to '90s user interfaces with a custom Unix-like core. It flatters with sincerity by stealing beautiful ideas from various other systems.
Roughly speaking, the goal is a marriage between the aesthetic of late-1990s productivity software and the power-user accessibility of late-2000s *nix. This is a system by us, for us, based on the things we like.
You can watch videos of the system being developed on YouTube:
About Ladybird
Ladybird is a cross-platform independent web browser built from SerenityOS components. It is a separate project from SerenityOS, but it uses the SerenityOS build system and shares much of the same code.
All the browser UI code lives in the Serenity repository under the Ladybird
directory. The SerenityOS LibGUI port of Ladybird lives in the Userland/Applications/Browser
directory.
All the implementation details are in the Userland/Libraries
and Userland/Services
directories.
See the Ladybird README.md for more information.
SerenityOS Screenshot
SerenityOS Features
- Modern x86 64-bit kernel with pre-emptive multi-threading
- Browser with JavaScript, WebAssembly, and more (check the spec compliance for JS, CSS, and Wasm)
- Security features (hardware protections, limited userland capabilities, W^X memory,
pledge
&unveil
, (K)ASLR, OOM-resistance, web-content isolation, state-of-the-art TLS algorithms, ...) - System services (WindowServer, LoginServer, AudioServer, WebServer, RequestServer, CrashServer, ...) and modern IPC
- Good POSIX compatibility (LibC, Shell, syscalls, signals, pseudoterminals, filesystem notifications, standard Unix utilities, ...)
- POSIX-like virtual file systems (/proc, /dev, /sys, /tmp, ...) and ext2 file system
- Network stack and applications with support for IPv4, TCP, UDP; DNS, HTTP, Gemini, IMAP, NTP
- Profiling, debugging and other development tools (Kernel-supported profiling, CrashReporter, interactive GUI playground, HexEditor, HackStudio IDE for C++ and more)
- Libraries for everything from cryptography to OpenGL, audio, JavaScript, GUI, playing chess, ...
- Support for many common and uncommon file formats (PNG, JPEG, GIF, MP3, WAV, FLAC, ZIP, TAR, PDF, QOI, Gemini, ...)
- Unified style and design philosophy, flexible theming system, custom (bitmap and vector) fonts
- Games (Solitaire, Minesweeper, 2048, chess, Conway's Game of Life, ...) and demos (CatDog, Starfield, Eyes, mandelbrot set, WidgetGallery, ...)
- Every-day GUI programs and utilities (Spreadsheet with JavaScript, TextEditor, Terminal, PixelPaint, various multimedia viewers and players, Mail, Assistant, Calculator, ...)
... and all of the above are right in this repository, no extra dependencies, built from-scratch by us :^)
Additionally, there are over three hundred ports of popular open-source software, including games, compilers, Unix tools, multimedia apps and more.
How do I read the documentation?
Man pages are available online at man.serenityos.org. These pages are generated from the Markdown source files in Base/usr/share/man
and updated automatically.
When running SerenityOS you can use man
for the terminal interface, or help
for the GUI.
Code-related documentation can be found in the documentation folder.
How do I build and run this?
See the SerenityOS build instructions or the Ladybird build instructions.
The build system supports a cross-compilation build of SerenityOS from Linux, macOS, Windows (with WSL2) and many other *Nixes. The default build system commands will launch a QEMU instance running the OS with hardware or software virtualization enabled as supported.
Ladybird runs on the same platforms that can be the host for a cross build of SerenityOS and on SerenityOS itself.
Get in touch and participate!
Join our Discord server: SerenityOS Discord
Before opening an issue, please see the issue policy.
A general guide for contributing can be found in CONTRIBUTING.md
.
Authors
- Andreas Kling - awesomekling
- Robin Burchell - rburchell
- Conrad Pankoff - deoxxa
- Sergey Bugaev - bugaevc
- Liav A - supercomputer7
- Linus Groh - linusg
- Ali Mohammad Pur - alimpfard
- Shannon Booth - shannonbooth
- Hüseyin ASLITÜRK - asliturk
- Matthew Olsson - mattco98
- Nico Weber - nico
- Brian Gianforcaro - bgianfo
- Ben Wiederhake - BenWiederhake
- Tom - tomuta
- Paul Scharnofske - asynts
- Itamar Shenhar - itamar8910
- Luke Wilde - Lubrsi
- Brendan Coles - bcoles
- Andrew Kaster - ADKaster
- thankyouverycool - thankyouverycool
- Idan Horowitz - IdanHo
- Gunnar Beutner - gunnarbeutner
- Tim Flynn - trflynn89
- Jean-Baptiste Boric - boricj
- Stephan Unverwerth - sunverwerth
- Max Wipfli - MaxWipfli
- Daniel Bertalan - BertalanD
- Jelle Raaijmakers - GMTA
- Sam Atkins - AtkinsSJ
- Tobias Christiansen - TobyAsE
- Lenny Maiorani - ldm5180
- sin-ack - sin-ack
- Jesse Buhagiar - Quaker762
- Peter Elliott - Petelliott
- Karol Kosek - krkk
- Mustafa Quraish - mustafaquraish
- David Tuin - davidot
- Leon Albrecht - Hendiadyoin1
- Tim Schumacher - timschumi
- Marcus Nilsson - metmo
- Gegga Thor - Xexxa
- kleines Filmröllchen - kleinesfilmroellchen
- Kenneth Myhra - kennethmyhra
- Maciej - sppmacd
- Sahan Fernando - ccapitalK
- Benjamin Maxwell - MacDue
- Dennis Esternon - djwisdom
- frhun - frhun
- networkException - networkException
- Brandon Jordan - electrikmilk
- Lucas Chollet - LucasChollet
- Timon Kruiper - FireFox317
- Martin Falisse - martinfalisse
- Gregory Bertilson - Zaggy1024
- Erik Wouters - EWouters
- Rodrigo Tobar - rtobar
- Alexander Kalenik - kalenikaliaksandr
- Tim Ledbetter - tcl3
- Steffen T. Larssen - stelar7
- Andi Gallo - axgallo
- Simon Wanner - skyrising
- FalseHonesty - FalseHonesty
- Bastiaan van der Plaat - bplaat
- Dan Klishch - DanShaders
- Julian Offenhäuser - janso3
- Sönke Holz - spholz
- implicitfield - implicitfield
And many more! See here for a full contributor list. The people listed above have landed more than 100 commits in the project. :^)
License
SerenityOS is licensed under a 2-clause BSD license.