home *** CD-ROM | disk | FTP | other *** search
/ Commodore Free 27 / Commodore_Free_Issue_27_2009_Commodore_Computer_Club.d64 / fmv < prev    next >
Text File  |  2023-02-26  |  2KB  |  95 lines

  1. ..
  2.  
  3.  
  4. FMV (Full Motion Video)
  5.  
  6. Written by Mathias "AmiDog" Roslund
  7. http://www.amidog.com/c64/fmv/
  8.  
  9. Converter:
  10. 8bit greyscale input frames are
  11. cropped & or scaled to 80x48 pixels.
  12. These frames are split into tiles of
  13. 4x4 pixels & a simple histogram
  14. approach is used to select the 256 of
  15. the most frequently used ones while
  16. trying to avoid picking 2 very similar
  17. ones. During the 2nd pass, mean square
  18. error is used to pick one of the 256
  19. tiles for each & every tile in the
  20. frames. This results in frames of
  21. 20x12 tiles (240 bytes).
  22.  
  23. Packer:
  24. The packer will try to compress each
  25. frame using a set of possible compres-
  26. sion methods & will select one that
  27. gives the best compression.  All
  28. methods are currently lossless, but
  29. that may change.
  30.  
  31. Currently supported methods:
  32.   - No compression (1 type)
  33.   - RLE (1 type)
  34.   - Delta (3 types)
  35.  
  36. Player:
  37. The player uses the dream load loader
  38. system. The player currently only
  39. works on 1541 drives though, sorry
  40. about that. The player will start by
  41. loading the charset (tiles) & will
  42. then start pre-buffering The buffer
  43. used is 16KB (64 sectors). Displaying
  44. & decoding is handled by an interrupt
  45. & a new image is displayed & decoded
  46. every 2nd frame, giving an output of
  47. 25fps. In case the buffer runs empty,
  48. the player will wait for it to be
  49. filled to 1/4 (4KB) before playback
  50. continues.
  51.  
  52. Full screen playback:
  53. If the firebutton (PORT 2) is being
  54. pressed when playback starts (i.e.
  55. when the pre-buffering is done), the
  56. animation will be scaled to full
  57. screen while playing.
  58.  
  59. The player was developed using
  60. dreamass & VICE, but has also been
  61. tested on a real C64 with 1541C disk
  62. drive.
  63.  
  64. Example animation:
  65.  
  66. The famous lion_seul.mpg animation
  67. (1600 frames, 320x240 pixels) has been
  68. converted (cropped to 320x192 pixels &
  69. scaled to 80x48 pixels) to 1601 tile
  70. based frames of 20x12 tiles each (a
  71. black frame has been added to the end
  72. of the animation). The raw data
  73. (1601*240 = 384240 bytes) has been
  74. compressed to 81642 bytes using RLE
  75. (9 frames) & Delta (1592 frames)
  76. compression. This gives an average of
  77. about 51 bytes/frame, which seems to
  78. be about the limit of 1541 streaming
  79. using the current loader & compression
  80. methods, especially when using the
  81. full screen mode.
  82.  
  83. Future:
  84.  - Lossy delta compression
  85.  - Faster loader allowing higher byte
  86. rates
  87.  - Some kind of dithering
  88.  - Lower frame rate but higher
  89. resolution
  90.  - Lower frame rate but more colours
  91.  
  92. // Mathias "AmiDog" Roslund, 2008
  93.  
  94. ..end..
  95.