Commit Graph

91 Commits

Author SHA1 Message Date
kris
527f6504f7 Add comments and tidy up some more 2021-03-15 17:22:14 +00:00
kris
101d974d50 Use hyphens in option names so that --no-boolean-option is
consistently hyphenated.
2021-03-15 17:21:22 +00:00
kris
ede063a21b No need to pattern to have third axis of shape 1
Minor optimization to not compute error_fraction 3 times

Tidy a bit
2021-03-15 16:22:55 +00:00
kris
551be3eba7 Get --resolution=140 working again
Back out the pixel_palette_options WIP to make this mergable
2021-03-15 15:41:33 +00:00
kris
fcf83aaf9c Even more fasterer! 2021-03-15 15:11:06 +00:00
kris
f157272327 Checkpoint more type annotations 2021-03-15 15:10:49 +00:00
kris
722e85f645 Combine loops in dither_lookahead and don't bother dithering beyond
lookahead or edge of screen.
2021-03-15 15:10:33 +00:00
kris
8b48455c8f Checkpoint 2021-03-15 15:10:33 +00:00
kris
049c334950 Fixed 2021-03-15 15:10:33 +00:00
kris
f4cc7dac40 Checkpoint - I broke something 2021-03-15 15:10:33 +00:00
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
e98116b276 Tidy up for merge 2021-03-15 14:01:14 +00:00
kris
72de8f0dfe Try using a table 2021-03-15 13:55:44 +00:00
kris
4ddd48ed8c Try to fix image layout 2021-03-15 13:43:25 +00:00
kris
85ad76a251 More fixes 2021-03-15 13:41:01 +00:00
kris
aa802b93d4 Fixes 2021-03-15 13:35:17 +00:00
kris
5f78cf53d3 Fixes 2021-03-15 13:33:07 +00:00
kris
4b00da3771 Add more screenshots of --palette=openemulator
Rename files for consistency
2021-03-15 13:08:34 +00:00
kris
93456edb53 Openemulator screenshots of NTSC image conversions 2021-03-15 12:07:59 +00:00
kris
d5e6038939 Regen 2021-03-15 11:50:51 +00:00
kris
aef135808c Rename files to match existing scheme 2021-03-15 11:05:56 +00:00
kris
61052ca93c Add DHR and preview images rendered with --palette=ntsc 2021-03-15 10:59:04 +00:00
kris
e1108b4dd0 Tidy up a bit in preparation for merge. 2021-03-15 10:45:57 +00:00
kris
467a0cd196 Tidy up a bit to prepare for merge 2021-03-15 10:45:33 +00:00
kris
d5bd173345 Update to describe NTSC emulation 2021-02-18 00:53:43 +00:00
kris
e0b732cdaa Reimplement NTSC conversion to closely match openemulator output. I
can't figure out why contrast=2 is needed (openemulator uses a default
value of 1, so there must be a factor of 2x somewhere), or where the
slight hue rotation comes from - perhaps this is somehow introduced by
the more complex band-pass filtering that openemulator does?

I needed to also account for the DHGR timing difference that
introduces a phase offset of 1 pixel between the memory values and
displayed pixel timings.

Fix a last-minute bug with palette precomputation.
2021-02-17 21:29:43 +00:00
kris
e1dab91783 Whitespace 2021-02-14 23:42: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
301ca2772b Checkpoint 2021-02-04 22:00:03 +00:00
kris
3ac5c284e9 Checkpoint NTSC emulation 2021-02-03 23:40:16 +00:00
kris
a835baadf8 Fix --show_input 2021-01-26 00:16:51 +00:00
kris
b29f5f2b18 Create directory before writing to it 2021-01-25 23:57:07 +00:00
kris
c3c88efc09 Fix path typos 2021-01-25 23:42:17 +00:00
kris
2bbd65a079 Add some comments and docstrings 2021-01-25 23:16:46 +00:00
kris
a7d734f2b0 Fix broken paths 2021-01-25 22:47:41 +00:00
kris
6a3707e1fa Rename file to try and get github to render link 2021-01-25 22:46:37 +00:00
kris
cb938b2737 Add missing image 2021-01-25 22:45:08 +00:00
kris
6c095c494b Merge branch 'main' of https://github.com/KrisKennaway/ii-pix into main 2021-01-25 22:44:02 +00:00
kris
8577a00969 New default, modified Jarvis dither that propagates errors to 4 pixels
in the forward x-direction.
2021-01-25 22:43:03 +00:00
KrisKennaway
a6905a4868
Merge pull request #1 from KrisKennaway/add-license-1
Create LICENSE
2021-01-25 22:37:02 +00:00
KrisKennaway
7f9d48aeb2
Create LICENSE 2021-01-25 22:36:50 +00:00
kris
dd8cf07c49 Add support for multiple palettes 2021-01-25 22:28:00 +00:00
kris
923ec0cf6d Docs and examples 2021-01-25 22:27:24 +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