Commit Graph

12 Commits

Author SHA1 Message Date
kris
a686ef76c3 WIP 2021-03-15 15:10:12 +00:00
kris
f87ca90fd4 Add a --verbose option to output progress 2021-03-15 15:01:21 +00:00
kris
e1108b4dd0 Tidy up a bit in preparation for merge. 2021-03-15 10:45:57 +00:00
kris
ad9515dcf2 Implement NTSC emulation, using an 8 pixel window for chroma signal.
Use this to precompute a new ntsc palette with 256 entries (though
only 84 unique colours) that are available by appropriate pixel
sequences.  Unfortunately the precomputed distance matrix for this
palette is 4GB!

Optimize the precomputation to be less memory hungry, while also
making efficient use of the mmapped output file.

Add support for dithering images using this 8-bit palette depth,
i.e. to optimize for NTSC rendering.  This often gives better image
quality since more colours are available, especially when modulating
areas of similar colour.

Fix 140 pixel dithering and render the output including NTSC fringing
instead of the unrealistic 140px output that doesn't include it.

Add support for rendering output image using any target palette, which
is useful e.g. for comparing how an 8-pixel NTSC rendered image will
be displayed on an emulator using 4-pixel ntsc emulation (there is
usually some colour bias, because the 8 pixel chroma blending tends to
average away colours).

Switch the output binary format to write AUX memory first, which
matches the image format of other utilities.
2021-02-14 23:34:25 +00:00
kris
d535d2430d Tidy a bit 2021-01-22 22:26:10 +00:00
kris
081c815643 Flatten image array, about 5% faster 2021-01-22 22:19:48 +00:00
kris
61e1448b87 Refactor to use a Dither cstruct 2021-01-22 22:06:25 +00:00
kris
84442f32a7 Clean up some more 2021-01-21 23:33:12 +00:00
kris
e046f5fccf Clean up a bit 2021-01-21 23:23:19 +00:00
kris
a4ecf69610 Checkpoint WIP 2021-01-21 23:17:55 +00:00
kris
a061795022 Re-enable 140px mode 2021-01-15 22:58:01 +00:00
kris
f5553e00b8 Rename 2021-01-15 22:20:28 +00:00