Author Topic: Video player for Casio Prizm  (Read 57079 times)

0 Members and 2 Guests are viewing this topic.

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Video player for Casio Prizm
« Reply #15 on: July 14, 2011, 09:01:06 am »
How large would the file size become if JPEG isn't used? Maybe we could try some other kind of compression... I don't know what one would fit, though.
Screen has 384 x 216 x 2 B,I use 1/2 images (192*108*2) => 41472B. The jpeg compression makes them around 3.2 KB





Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Video player for Casio Prizm
« Reply #16 on: July 14, 2011, 10:59:27 pm »
JPEG compression is very impressive considering the complexity of that format. Other formats we could try are PNG but I'm unfamiliar with how long it takes to decompress compared to JPEG. One format worth trying is DXTC http://en.wikipedia.org/wiki/S3_Texture_Compression which is the standard format for DirectX textures. It will compress a bmp image into a little less than half the size it is normally and can be drawn very quickly. Because the images are being played back in video format there are a lot of size optimizations that can be done on the DXTC format such as keeping some or all of the palette data for the next frame. For just standard DXT1 compression I've been writing a super fast asm routine to decompress the images and I think I have an idea for a video based version of DXT, both of which I'll post once I finalize them.

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Video player for Casio Prizm
« Reply #17 on: July 14, 2011, 11:21:20 pm »
The color depth could also be reduced, from 16 to 8 bit.

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Video player for Casio Prizm
« Reply #18 on: July 14, 2011, 11:46:21 pm »
The color depth could also be reduced, from 16 to 8 bit.
That's a possibility but I think that should be done on a frame by frame or segment of frames basis. As in there shouldn't be a single palette for the entire video but instead each frame or segment of frames should define a new one. You could even go as far to define an 8 bit palette for each frame then use 8 bit DXT1 compression for that frame. I'm also thinking it would be a good idea to interlace the video to increase speed while cutting size in half. 

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Video player for Casio Prizm
« Reply #19 on: July 15, 2011, 03:00:14 am »
Other formats we could try are PNG but I'm unfamiliar with how long it takes to decompress compared to JPEG.
PNG might not optimize well. If I recall correctly, PNG is good for simple drawings and graphics, while JPEG is suitable for images with lots of details (such as photos).
I'm also thinking it would be a good idea to interlace the video to increase speed while cutting size in half.  
Wouldn't interlacing look odd on a screen like this, considering that it's running at a low amount of fps? TVs can get away with it, but they have a refresh rate of 60Hz/50Hz.
« Last Edit: July 15, 2011, 03:00:30 am by JosJuice »

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Video player for Casio Prizm
« Reply #20 on: July 15, 2011, 03:48:55 am »
Hello,
this is another version of the player. It uses 96x50 frames (4 bit colors), uncompressed. Video has 12.5 frames per second (the calculator was able to keep sync with computer, where the original video was playing)
The maximum speed (before I implemented timing) was 15.88 frames per seconds.


Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Video player for Casio Prizm
« Reply #21 on: July 15, 2011, 03:53:46 am »
Is the rar file supposed to be able to sent to the calculator as a rar, or should only the raw file be sent?

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Video player for Casio Prizm
« Reply #22 on: July 15, 2011, 04:06:20 am »
Is the rar file supposed to be able to sent to the calculator as a rar, or should only the raw file be sent?
Please, extract the rar and put the raw file in the calculator. I rared it to save bandwidth (and I would probably also touch the 7MB limit set on this server)

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Video player for Casio Prizm
« Reply #23 on: July 15, 2011, 04:17:50 am »
The frame rate looks great! :) Is the video supposed to be in grayscale, or is this something that was added for compression?

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Video player for Casio Prizm
« Reply #24 on: July 15, 2011, 04:20:01 am »
The frame rate looks great! :) Is the video supposed to be in grayscale, or is this something that was added for compression?
Both:-) The video is in gray-scale (16 colors) to reduce video size.

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Video player for Casio Prizm
« Reply #25 on: July 15, 2011, 04:55:21 am »
The frame rate looks great! :) Is the video supposed to be in grayscale, or is this something that was added for compression?
Both:-) The video is in gray-scale (16 colors) to reduce video size.
Maybe RLE could be used for compression? It's popular on older calculators since they only have 2/4 colors. Using RLE with 16-bit color won't really work, but maybe it's good enough for 4-bit?

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Video player for Casio Prizm
« Reply #26 on: July 15, 2011, 05:18:01 am »
Maybe RLE could be used for compression? It's popular on older calculators since they only have 2/4 colors. Using RLE with 16-bit color won't really work, but maybe it's good enough for 4-bit?
Yes, I will probably try RLE as a next step.

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Video player for Casio Prizm
« Reply #27 on: July 22, 2011, 06:35:58 am »
DJ_O: thank you for testing the player and posting the video:-)

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Video player for Casio Prizm
« Reply #28 on: July 24, 2011, 09:49:48 am »
Indeed, the frame rate looks very good, WAY better than in Z80 Calculators and the Nspire, but that's because of the colours and the better processor. nice job MPoupe!

Offline helder7

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 185
  • Rating: +33/-1
    • View Profile
Re: Video player for Casio Prizm
« Reply #29 on: January 19, 2012, 09:53:16 am »
any instructions how to port a video?