Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.sinclair > #2519
| From | Matthew Westcott <gasman@raww.org> |
|---|---|
| Newsgroups | comp.sys.sinclair |
| Subject | Re: Speccy video player in C?!! |
| Date | 2011-02-11 00:17 +0000 |
| Message-ID | <8rjdggF8m7U1@mid.individual.net> (permalink) |
| References | (2 earlier) <e5f41f0d-92d2-41fc-aaaa-8e91053053e0@8g2000prt.googlegroups.com> <8r29onFudkU1@mid.individual.net> <92e43e27-e2a2-492b-b144-37a28239b9a5@m16g2000prc.googlegroups.com> <8re0ggFrrrU1@mid.individual.net> <8150c333-33e4-4c3c-92e1-2aec596ee23d@z27g2000prz.googlegroups.com> |
On 10/02/2011 13:09, BitNaughty wrote: > On Feb 9, 4:04 am, Matthew Westcott<gas...@raww.org> wrote: >> On 08/02/2011 14:20, BitNaughty wrote: >> >> 3) Compare that screen with the previous one*, making a list of all the >> runs of continuous bytes that differ between them (but with some tricky >> special cases: for example, if you've got two runs that are only a few >> bytes apart, it's better to treat them as one long run rather than >> having the extra overhead of reading two data chunks) > > OK, so this is something like LZW GIF compression, if I understand it > correctly, am I right......? It's a bit simpler than that... LZW is all about building up a dictionary of the strings you've encountered so far in the compression/decompression, so that if you find a repeating pattern you can just refer back to the last place it appeared, rather than storing it in full. Here there's nothing like that - the rule is just "only store the bits of screen that have changed". >> keep a >> rough count of how long it's going to take the Spectrum to process the >> stuff you're generating, so that you can pick out the right sample from >> the audio stream that will be played at that point. > > This sounds amazing! How do you do this? Well, this is the point at which the cleverness ends and the tedious messy code begins :-) Best to just look at the code - the delta_compressor_pack_deltas function in https://github.com/gasman/divideo/blob/master/c/delta_compressor.c is where we keep count of timings (in the variable frame_time).
Back to comp.sys.sinclair | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Speccy video player in C?!! Matthew Westcott <gasman@raww.org> - 2011-02-04 12:29 +0000
Re: Speccy video player in C?!! "Paul E Collins" <find_my_real_address@CL4.org> - 2011-02-10 21:53 +0000
Re: Speccy video player in C?!! "Daniel Mandic" <daniel_mandic@hotmail.com> - 2011-02-10 22:29 +0000
Re: Speccy video player in C?!! Matthew Westcott <gasman@raww.org> - 2011-02-11 00:17 +0000
Re: Speccy video player in C?!! Matthew Westcott <gasman@raww.org> - 2011-02-13 16:26 +0000
Re: Speccy video player in C?!! Matthew Westcott <gasman@raww.org> - 2011-02-08 23:04 +0000
Re: Speccy video player in C?!! BitNaughty <bit-naughty@hotmail.com> - 2011-02-10 05:09 -0800
Re: Speccy video player in C?!! BitNaughty <bit-naughty@hotmail.com> - 2011-02-08 06:20 -0800
csiph-web