Image to ZX Spec 1.2 Released (Video and high performance support)

edited April 2010 in Announcements
Yes I know it's only been about three weeks since 1.1 but I've been working very hard on this version and has a major work engine overhaul for multi core processors and video support.
Monochrome on a single core with Nasik ordered dithering on an old Athlon 2600@2.175Ghz is 40-50 FPS, and on a Core 2 Duo@3.16Ghz using 2 threads per core is 150-170 FPS, switch on the FPS counter to see your own benchmark.


Default settings are good for most video - try them before adjusting anything :) (if anything only contrast and brightness pre processing increases are needed).

Please read the README Known Issues and FAQ fully before asking questions about video conversion!

Changes from 1.1:
- Added AVI and MOV video conversion (limited codecs however).
- Added large performance improvements.
- Added multi CPU work dispatcher engine.
- Added threads per CPU option.
- Added tap video/slideshow basic loader option.
- Added Buffered USR 0 (128K) tap video/slideshow loader.
- Added FPS counter and option (using 2 second interval).
- Added option to disable the WIP preview.
- Improved Low Error Atkinson dither to 25% error.
- Improved colour code performance (reduced object overhead).
- Memory settings changed (>512MB contiguous minimum).
- Enabled Java aggressive heap mode for better memory use.

Download 1.2.1 here:

Conversion of the Iron Man 2 trailer is here (note this had to be run on an emulator due to my divIDE not keeping up):
Iron Man 2 on the speccy (with original audio)

More detail is available on the Silent Development Blog

I'll ask for the WOS version to be updated as soon as I know 1.2.1 is "stable" (i.e. its been a week or so).
Post edited by brownb2 on


  • edited April 2010
    Hehe...strange seeing IRon Man 2 as done by a Speccy!

    Good work!
  • edited April 2010
    Okay I found a minor bug and needed a new feature (and a pro tip for converting video).

    Firstly the bug - if a video file has an non decodable audio stream (due to lack of codec support), but a good video stream the video stream decodes but the converter stops as it thinks there is an error state.

    The new feature is a solution to the problem that video does not play in real time at 10FPS using a Spectrum PAUSE of 5 (1/10 of a second on PAL), so I needed a way of adjusting the conversion frame sample rate which the video is converted to.

    I can definitively say that using a frame delay of *1* and a video sampling frame rate of exactly *7.14 FPS* REAL TIME playback is possible - tested on my Spectrum +3, DivIDE Plus, using the USR 0 Buffered video loader and a 64MB CF. Using this value in the "Video Sampling Rate" allows you to keep sound in sync when played back from an external source (at least for the 12 minutes of video I watched). I hope this value works for others users too!

    Is there something magical about the number 7.14? A coincidence that the clock speed of an Amiga which was clock sync'd for NTSC genlocking is also 7.14Mhz if that makes the number easier to remember!

    I've updated the downloads above.
  • edited April 2010
    Okay I've taken feedback onboard and will put the final release of 1.2 (probably named 1.2.1) out tomorrow evening ~9-10pm GMT. I don't see myself moving this project any further as I did what I intended to do - it was more of an education. Bzither support will likely never get done, same for any video sound support, extra video codecs or video conversions larger than memory will allow* as I have other projects I would like to work on. No doubt I'll put out any bug fixes and any user provided enhancements (i.e. improved code, bug fixes, small new features) but nothing really added by me. All 48 classes of the source code are fully javadoc'd/API'd to the eyeballs and will also be included on my site.

    This last version finished tonight has the following changes:
    - White on black menu and black border for video (requested for Alice in Wonderland).
    - More sensible UI drop list sizes in Windows (asked for a number of times).
    - Improved UI spacing on Ubuntu (for me).
    - Small reorganisation of the Options tool bar items (again for me).
    - Improved readme.txt documenting the features (dumbed down somewhat for a Softpedia audience).

    and as I don't think I mentioned it before - used and available memory is shown in the About box (old feature).

    * 32 bit machines are limited by a 2GB process size (~1.5GB effective for Java heap). 64 bit machines vary - 64 bit Ubuntu can have much larger sizes using a command line option to start it (i.e. 2GB+ up to whatever swap space you have, however low physical memory causes Ubuntu to kill the process and I don't know how to prevent this). If you have enough memory I recommend opening a command at the directory it is downloaded to and trying
    nice -n20 java -Xmx3000m -jar ImagetoZxSpec.jar &
    where 3000 is a safe amount of RAM, disabling compiz will also save 100-200MB RAM.
    Reducing the "video sampling frame rate" option and converting the video (say in VirtualDub) to have a size of 256x192 will provide faster video buffering as no resize is necessary. The former can significantly reduce the memory overhead.
    For reference the largest video I managed on 32 bit Windows Vista was 8 minutes at 256x192, 7.14 fps, i.e. just slightly shorter than Alice in Wonderland. This was achieved by starting the jar from the command line which gave me an extra 200MB over Java's safe "aggressive heap" maximum (i.e. that obtained by just starting the app double clicked). You may be able to obtain a higher or lower amount of memory than 1500. Opening a command line at the directory the jar was downloaded to type:
    java -Xmx1500m -jar ImagetoZxSpec.jar

    As memory starts getting low the converting frame rate will drop off significantly (i.e. you'll be in your last 100MB free) as Java will start some extreme (memory) garbage collecting.

    These and as many other best practices as I can provide are in the updated readme.

    My missus will be a very happy bunny again as she'll now be able to see me more in the evening.... until I start back on my Nintendo DS projects. ;)
Sign In or Register to comment.