-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Rationale
There is a lot of potential conversions, adaptation with colors.
Make tiny programs and opcodes in a "scanline VM" (that will process pixels identically as a row)
in order to be able to find some optimizations on the bytecode.
The individual opcodes are on the order of:
- convert rgba8 to float
- greyscale / luma
- exponentiation / sRGB mapping
This will allow to support any input format to any output format, with a little runtime cost but smaller code in the end I think.
The problem is all the scanlines functions we already have in Gamut.
Preliminary design
VM opcode design:
- 4 input ports, size of a scanline
- 4 output ports, size of a scanline
- 8 temporaries registers, size of a scanline
- can we avoid relocation with input/output pointers and length being passed as arguments? => yes, similar to shaders or GPGPU, input and output pointer are arguments, also item count. "Registers" are whole scanline allocated next to each other.
- math opcodes
A VM program is always about one scanline, possibly having 2 inputs or 2 outputs.
Ability to navigate: CIE XYZ, various RGB, various HSL spaces, power-laws, but also do any kind of blending.
Very fast startup.
Metadata
Metadata
Assignees
Labels
No labels