Shop OBEX P1 Docs P2 Docs Learn Events
Prop Video Player ! (sadly only 10 fps) — Parallax Forums

Prop Video Player ! (sadly only 10 fps)

RaymanRayman Posts: 14,827
edited 2009-06-01 01:01 in Propeller 1
Had a few minutes together to bring you this TV video player for the Prop...

You need to have an SD card installed in your setup.

Unfortunately, the "out of the box" SD routines only give ~10 fps.

Anybody want to help get this going faster?
Here's the source code and test video.· (this test video is perhaps not the best, it's just what I had handy...).


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

Comments

  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-05-30 17:26
    LOL "a few minutes"... No need to brag about your genius here, Raymen... We are fully aware. [noparse]:)[/noparse]

    This is great! 10fps is still PRETTY GOOD a little 'ol micro.
  • Bill HenningBill Henning Posts: 6,445
    edited 2009-05-30 17:32
    Hi,

    I'd suggest the following:

    - freshly format an SD card
    - copy the movie onto it
    - only use the fsrw routines to get the address of the first block
    - use SPI routines to read a few K at a time
    - double buffer it if you have the memory, ie read the next frame while you are displaying the last read frame

    It might get you to 30fps!
    Rayman said...
    Anybody want to help get this going faster?

    Bill

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Largos - a nano operating system for the Propeller
    www.mikronauts.com - a new blog about microcontrollers
  • RaymanRayman Posts: 14,827
    edited 2009-05-30 18:34
    If it could do more like 60 fps, then things are a lot nicer... We could sync to the NTSC rate and wouldn't need to double buffer... Plus, that would provide the time to read in some audio.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • MagIO2MagIO2 Posts: 2,243
    edited 2009-05-30 19:40
    Hmmm ... you should have a look at the SD card driver. It's still running in SPI-mode. If you manage to get the SD mode running it would be at least 4 times faster. But I'm not sure what that means for sharing your code. You're surely not allowed to sell stuff that uses the SD card mode without payin for the license.

    When my RAM subproject is done I'll surely have a look at SD cards - but dunno how long that'll be.
  • RaymanRayman Posts: 14,827
    edited 2009-05-30 22:38
    I really don't have the time to dive into SD card code right now... But, I do think the assembly code works in block units... Perhaps adding a second block buffer would be an easy way to make it a hair faster...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-05-31 03:57
    Take a look at the ZiCog code for the TriBlade. Provided the SD card was formatted and then the video file copied, it will be contiguous. In the ZiCog demo code I use block mode to read the SD card to load the SRAM by calling the sdspiFemto code directly. If you change the calling code to pasm as well (easily done) you should see big improvement. The concept is the same if you can find a faster pasm sd routine.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBladeProp, SixBladeProp, website (Multiple propeller pcbs)
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: Micros eg Altair, and Terminals eg VT100 (Index)
    · Search the Propeller forums (via Google)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • mctriviamctrivia Posts: 3,772
    edited 2009-05-31 13:56
    if i remember correctly video tapes are only 12fps so 10 should be pretty good for fluid motion video.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    propmod_us are now in stock. propmod_1x1 arrive on 26th. Only $30

    Need to upload large images or movies for use in the forum. you can do so at uploader.propmodule.com for free.
  • OwenSOwenS Posts: 173
    edited 2009-05-31 19:20
    VHS is a full 60 or 50 interlaced frames per second - it's pretty much just the PAL or NTSC signal with the colour highly compressed and stored separately.
  • RaymanRayman Posts: 14,827
    edited 2009-06-01 01:01
    I'm thinking about converting one of Chip's Prop2 webinars to this format... I think I can do 7 fps video plus one channel of 22050 Hz audio...

    BTW: I find it interesting that 22050 is divisible by 7. I usually don't get that lucky with primes...

    PS:· NTCS VHS is 60 hz interlaced, they really didn't have a choice.· It's the horizontal resolution that's crappy with VHS...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Sign In or Register to comment.