Streaming video and audio for Apple II
Go to file
kris 976e26f159 Vectorize the computation of diff weights, by precomputing a map
of all possible weights.  We encode the two 8-bit inputs into a single
16 bit value instead of dealing with an array of tuples.

Fix an important bug in _compute_delta: old and is_odd were transposed
so we weren't actually subtracting the old deltas!  Surprisingly,
when I accidentally fixed this bug in the vectorized version, the video
encoding was much worse!  This turned out to be because the edit
distance metric allowed reducing diffs by turning on pixels, which
meant it would tend to do this when "minimizing error" in a way that
was visually unappealing.

To remedy this, introduce a separate notion of substitution cost for
errors, and weight pixel colour changes more highly to discourage them
unless absolutely necessary.  This gives very good quality results!

Also vectorize the selection of page offsets and priorities having
a negative error delta, instead of heapifying the entire page.

Also it turns out to be a bit faster to compute (and memoize) the delta
between a proposed content byte and the entire target screen at once,
since we'll end up recomputing the same content diffs multiple times.

(Committing messy version in case I want to revisit some of those
interim versions)
2019-03-14 22:08:50 +00:00
audiotest/audiotest Optimize some more to fit in memory! 2019-03-10 21:57:05 +00:00
ethernet/ethernet Write symbol table to .dbg file when assembling player 2019-02-27 12:10:14 +00:00
simulator - Allow HGR ROM entry point 2019-02-27 22:46:53 +00:00
audio.py Remove vestige of standalone audio encoder. 2019-03-14 21:52:57 +00:00
frame_grabber.py Integrated audio + video player! 2019-03-07 23:07:24 +00:00
main.py fix 2019-03-14 21:45:40 +00:00
memory_map.py Refactor the various representations of screen memory (bitmap, (x,y) 2019-03-03 22:21:28 +00:00
movie.py Normalize audio by tasting the first 10M of the audio stream and 2019-03-14 21:40:09 +00:00
opcodes_test.py Update cycle timing from working ethernet player. 2019-02-23 23:38:14 +00:00
opcodes.py Construct opcodes and classes for all of the TICK_x_PAGE_y 2019-03-07 15:56:04 +00:00
scheduler.py Introduction more general notion of update priority used to increase 2019-03-04 23:09:00 +00:00
screen.py Refactor the various representations of screen memory (bitmap, (x,y) 2019-03-03 22:21:28 +00:00
server.py Take filename to serve from argv. 2019-03-14 21:38:12 +00:00
symbol_table_test.py Write symbol table to .dbg file when assembling player 2019-02-27 12:10:14 +00:00
symbol_table.py Write symbol table to .dbg file when assembling player 2019-02-27 12:10:14 +00:00
video_test.py Add some tests for edit_weight and byte_to_colour_string 2019-03-10 23:07:44 +00:00
video.py Vectorize the computation of diff weights, by precomputing a map 2019-03-14 22:08:50 +00:00