home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Free 27
/
Commodore_Free_Issue_27_2009_Commodore_Computer_Club.d64
/
fmv
< prev
next >
Wrap
Text File
|
2023-02-26
|
2KB
|
95 lines
..
FMV (Full Motion Video)
Written by Mathias "AmiDog" Roslund
http://www.amidog.com/c64/fmv/
Converter:
8bit greyscale input frames are
cropped & or scaled to 80x48 pixels.
These frames are split into tiles of
4x4 pixels & a simple histogram
approach is used to select the 256 of
the most frequently used ones while
trying to avoid picking 2 very similar
ones. During the 2nd pass, mean square
error is used to pick one of the 256
tiles for each & every tile in the
frames. This results in frames of
20x12 tiles (240 bytes).
Packer:
The packer will try to compress each
frame using a set of possible compres-
sion methods & will select one that
gives the best compression. All
methods are currently lossless, but
that may change.
Currently supported methods:
- No compression (1 type)
- RLE (1 type)
- Delta (3 types)
Player:
The player uses the dream load loader
system. The player currently only
works on 1541 drives though, sorry
about that. The player will start by
loading the charset (tiles) & will
then start pre-buffering The buffer
used is 16KB (64 sectors). Displaying
& decoding is handled by an interrupt
& a new image is displayed & decoded
every 2nd frame, giving an output of
25fps. In case the buffer runs empty,
the player will wait for it to be
filled to 1/4 (4KB) before playback
continues.
Full screen playback:
If the firebutton (PORT 2) is being
pressed when playback starts (i.e.
when the pre-buffering is done), the
animation will be scaled to full
screen while playing.
The player was developed using
dreamass & VICE, but has also been
tested on a real C64 with 1541C disk
drive.
Example animation:
The famous lion_seul.mpg animation
(1600 frames, 320x240 pixels) has been
converted (cropped to 320x192 pixels &
scaled to 80x48 pixels) to 1601 tile
based frames of 20x12 tiles each (a
black frame has been added to the end
of the animation). The raw data
(1601*240 = 384240 bytes) has been
compressed to 81642 bytes using RLE
(9 frames) & Delta (1592 frames)
compression. This gives an average of
about 51 bytes/frame, which seems to
be about the limit of 1541 streaming
using the current loader & compression
methods, especially when using the
full screen mode.
Future:
- Lossy delta compression
- Faster loader allowing higher byte
rates
- Some kind of dithering
- Lower frame rate but higher
resolution
- Lower frame rate but more colours
// Mathias "AmiDog" Roslund, 2008
..end..