Author Topic: Four Level Grayscale Video  (Read 32498 times)

0 Members and 1 Guest are viewing this topic.

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Four Level Grayscale Video
« on: January 28, 2011, 11:46:25 pm »
Yes, that title means exactly what you think it does. I can play 4 level grayscale videos. The videos run at 15 fps and are 12*64*2 = 1,536 bytes a frame. But through some RLE (compressing 00's and FF's) I managed to get compression ratios of about 30% meaning that overall, these videos run at about 16KB/s.

As far as the converting, it is very ugly. First I send a video through SUPER and it spits it out as a series of .jpg's. Then I use a GIMP extension to convert those to .bmp's. Then my converter looks at each picture, decides which colors go where, and spits out a binary which goes through To8xk and Wabbitsign to become an app.

To decide what color to use where, I tried two different strategies. The first was to tally up all the brightnesses of every pixel in the whole video then take the Q1, Mid, and Q3 as the cutoffs for each color. But this resulted in parts of the video that were mostly one color. So used the same technique to calculate the cutoffs each frame and that is what I use now. (But the old way is still possible with the flip of a bit.)

There'll be more videos to come. Even one sync'd with another calculator for sound (bet you can't guess what that is ;)). But for now, you just get to watch me do a Daffy off a jump while skiing.

Edit:
     It looks better in wabbitEmu, so here are the files. (I can't even imagine on a real calc 0.0

Edit2:
     I got too anxious and uploaded an uncompressed video and a decompressing player. Fixed now.
« Last Edit: January 29, 2011, 12:02:24 am by thepenguin77 »
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Four Level Grayscale Video
« Reply #1 on: January 28, 2011, 11:51:47 pm »
THAT'S AWESOME! (pardon my caps)

Wow. O.O  Wonderful job.  How much video can we fit on the calc at once?
Also, nice jump. ;D

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Four Level Grayscale Video
« Reply #2 on: January 28, 2011, 11:56:17 pm »
It obviously depends on the video. But if you get around 30% compression, around 90 seconds. Meaning that it holds more video than sound.

I forgot to mention in the first post, don't garbage collect with this on your calculator. Some of the pages start with FF and the app will surely get corrupted.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Four Level Grayscale Video
« Reply #3 on: January 28, 2011, 11:56:49 pm »
How does it work? Wabbitemu won't run it for me  :'(
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Four Level Grayscale Video
« Reply #4 on: January 28, 2011, 11:57:41 pm »
Send the app and the program and run the program. That's so it's easier to modify while working on it.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Four Level Grayscale Video
« Reply #5 on: January 28, 2011, 11:59:27 pm »
Well, there goes Wabbit...
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Four Level Grayscale Video
« Reply #6 on: January 29, 2011, 12:03:01 am »
I got too anxious. Read the Edit2 on the first post. That will probably fix your problems.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Four Level Grayscale Video
« Reply #7 on: January 29, 2011, 03:15:47 am »
That's awesome! I wonder if this could be streamed from MSD8x...

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Four Level Grayscale Video
« Reply #8 on: January 29, 2011, 03:24:26 am »
Wow, now that is a cool idea!

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Four Level Grayscale Video
« Reply #9 on: January 29, 2011, 03:31:23 am »
That's even more amazing than the first time I ran truegray.  O.O

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 kindermoumoute

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 836
  • Rating: +54/-3
    • View Profile
Re: Four Level Grayscale Video
« Reply #10 on: January 29, 2011, 03:53:05 am »
Amesome screenshoot !
(a video player on z80, soon ?)


I download the 2 files, and I got a bug :



PS : Which langage is use ?
Projects :

Worms armageddon z80 :
- smoothscrolling Pixelmapping : 100%
- Map editor : 80%
- Game System : 0%

Tutoriel français sur l'Axe Parser
- 1ère partie : en ligne.
- 2ème partie : en ligne.
- 3ème partie : en ligne.
- 4ème partie : 10%
- Annexe : 100%

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Four Level Grayscale Video
« Reply #11 on: January 29, 2011, 04:02:35 am »
Wow, your screenshot looks like a video converted from a VHS tape during two overlapping recordings. :P

He uses assembly, by the way.
« Last Edit: January 29, 2011, 04:02:58 am by DJ Omnimaga »

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Four Level Grayscale Video
« Reply #12 on: January 29, 2011, 09:44:20 am »
Could you make a program that does the same thing, but for black and white screens?

Ashbad

  • Guest
Re: Four Level Grayscale Video
« Reply #13 on: January 29, 2011, 11:51:31 am »
I would totally do this for the sausage song

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Four Level Grayscale Video
« Reply #14 on: January 29, 2011, 02:02:11 pm »
I'm surprised no one thought of rickrolls yet :P