Shop OBEX P1 Docs P2 Docs Learn Events
FryView image viewer - Page 2 — Parallax Forums

FryView image viewer

2»

Comments

  • vampyrevampyre Posts: 146
    edited 2008-06-12 16:33
    ok here's a youtube video to hold u guys over



    This is a video of my puppy Porthos being played on the protoboard. its running about 30 fps at 80x96, no audio yet.

    this is the first video converted with the new PC based converter software. this one takes a series of .bmp images instead of ppm.
    I have a color conversion bug to track down (my arm turns purple in the video), but once thats done i'll get the code ready to release the first version and then start workin in the higher resolution and then audio.
  • BaggersBaggers Posts: 3,019
    edited 2008-06-12 16:48
    Perry, Glad you've now got it working lol [noparse]:)[/noparse] look forward to posted vids [noparse];)[/noparse]


    Vampyre, I've added a linkable to your excellent vid [noparse];)[/noparse] http://www.youtube.com/watch?v=RR53pmh8Qk0·looks really good [noparse];)[/noparse]


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-12 22:57
    Awesome video! Deepfry will be very cool!

    The speed which the .PGF files load is incredible!

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange
  • vampyrevampyre Posts: 146
    edited 2008-06-13 22:46
    Ok i've hit a bit of a stumbling block. I'm using raymans spin wav player to add audio but i havn't had much success. I was hoping someone could help me out a bit.

    I am sure the problem is a simple one, but this head cold has turned into a full on summer flu, the whole family has it, and its made me even dumber than usual. I'm gonna post the code i have so far along with a sample video file

    the format is pretty simple. image-2k of audio-image-2k of audio - repeat as needed

    the images are 80x96, the audio is 16 bit 16ksps.

    problem is that it pops and clicks and stutters. There's no timing control at the moment, its just doing things as fast as it can, which made me think perhaps its not getting a chance to play all the audio, but putting in a check to see if the buffers were empty doesn't help much. my brain is mush at the moment so ill continue my bug hunt tomorrow with a fresh look on things

    zip file with player and video file attached

    edit: file deleted to save space on the server

    Post Edited (vampyre) : 6/16/2008 1:13:28 AM GMT
  • BaggersBaggers Posts: 3,019
    edited 2008-06-13 23:17
    I've not downloaded or looked at the source yet, i'll do that tomorrow, it's way past bed tim for me now lol
    First question are you having a double buffer for the audio? as you'll need it, or maybe even triple?

    Baggers.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • vampyrevampyre Posts: 146
    edited 2008-06-13 23:36
    thanks for the reply. yeah i am, its pretty much just copy/pasted straight from the origonal spin wav player which had two buffers , but the way i have it set up .... it doesn't make use of them properly and i can't figure out how to . i think i should probably put this down for a few days till my head clears. i am having trouble even making sentances.
  • PerryPerry Posts: 253
    edited 2008-06-14 00:50
    when you read the audio into a buffer from SD card,
    take care you don't overwrite the one being played?

    Perry
  • vampyrevampyre Posts: 146
    edited 2008-06-14 13:58
    this is my main loop at the moment

     repeat
    
         error := fsrw.pread(@displayb,HORIZONTAL_PIXELS*VERTICAL_PIXELS)
    
        repeat while (buff2[noparse][[/noparse]n]<>0)                     'wait till the buffers are empty
    
         m:=fsrw.pread(@MonoData, buffSize*2)  'fill both audio buffers
           repeat i from 0 to n
             buff1[i]:=($8000+MonoData[i])<<16
    
          m:=fsrw.pread(@MonoData, buffSize*2)
          repeat i from 0 to n
             buff2[i]:=($8000+MonoData[i])<<16
        
        if m<0
          quit
    [/i][/i][/i][/i]
    



    i've tried this, i've also tried without the wait, i've tried putting waits in different places. there's a smarter way to do this im sure, im just not smart enough right now to figure it out.
  • vampyrevampyre Posts: 146
    edited 2008-06-14 20:42
    oh , i see what your saying perry, thanks for that. i'll check and see if that helps
  • PerryPerry Posts: 253
    edited 2008-06-14 21:04
    vampyre:
    There are other questions that need to be answered for a functional spec !

    What is Frame Rate of video ?
    audio should be Mono/Stereo Hz 8/16 bit ?
    any compression ?

    I published code for the simple video capture on another thread

    I don't know who's channeling who, but could we collaborate on a video format?


    Perry
  • vampyrevampyre Posts: 146
    edited 2008-06-14 21:33
    I found my problem i think, this video is designed to play at 15.625 frames per second, and right now the loop is taking a lil more than 93 milliseconds...

    If i'm not mistaken , at 16ksps, and 16 bits... 2048 bytes of audio comes out to a little faster than 1/15th of a second?
    i should probably drop the sampling frequency and bit precision.

    at this point i'm thinking perhaps i should be using the hydra sound system, with its 1 bit adpcm audio. except, that i don't know how to make 1 bit adpcm audio files, nor how to stream them to the HSS

    perry:
    sounds good to me. I'll download your code and look it over, i have a feeling our video formats are probably very similar already. audio will be the tricky bit. do you think you'll be adding audio to your project ?
  • BaggersBaggers Posts: 3,019
    edited 2008-06-14 22:53
    Just out of interest guys, I used audio sampled at 8bit 15625hz per frame of video ( at 12.5 fps ) but padded the data to 512 byte blocks for faster reading [noparse]:)[/noparse] ( yes reading more is faster, because it doesn't straddle sectors then and need two reads to get one [noparse]:)[/noparse] )

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • vampyrevampyre Posts: 146
    edited 2008-06-14 23:13
    baggers:
    Thanks for the reply. i hadn't even thought of using oddly timed sampling frequencies.

    at 2048 bytes i think im sitting within the 512 sector size.. but admittadly, im not really sure i know what im doing right now. did you use raymans player or something custom?
  • vampyrevampyre Posts: 146
    edited 2008-06-15 00:17
    oh, ok i think i see what im doing wrong now. i shouldn't load both audio buffers in the loop, only one or the other... and that buffer should be the whole lengh of the frame, right? yeah i think i got it now.... off to code some more
  • Beanie2kBeanie2k Posts: 83
    edited 2008-06-15 01:26
    Vampyre please do take care of yourself first. The prop software can wait. Ordinarily they say garlic is good for a cold but in your case that may not be true lol.gif . Anyway hope you get to feeling better soon! cool.gif
  • BaggersBaggers Posts: 3,019
    edited 2008-06-15 07:54
    vampyre, yeah, take some time off before doing the audio, get better first [noparse];)[/noparse]
    and yes, the buffer is the whole length of the frame, ie, if you're playing at 15fps, the audio for that frame needs to last that long [noparse]:)[/noparse]
    oh, and as for driver, I made my own [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • vampyrevampyre Posts: 146
    edited 2008-06-15 14:43
    garlic, *shudder* hehe. wise advice from both of you, thanks. i'd be a lot less frustrated if i could think straight, but i've been coding to keep myself busy while i'm stuck here on the couch. I'm starting to feel better by the way, thanks for the well wishes [noparse]:)[/noparse]

    I'm guessing your driver is sleek asm code that puts anything i can do to shame baggers [noparse]:)[/noparse] that being said, after dropping to 8 bit audio, and figuring out my fumble with the buffering, i think i'm on the right track.

    just to make sure i know what i'm doing, if i'm using 1024 bytes of audio per frame, and 7680 bytes per image, then i shouldn't need to pad anything right? since it's all evenly divisible by 512?
  • BaggersBaggers Posts: 3,019
    edited 2008-06-15 14:51
    Glad you're feeling better, ps, how about a silver bullet? since garlic is bad oh no, silver bullets are bad too lol

    As for your padding (or should I say no need for), yeah, that's fine! And at 96x80 you should easily get 30fps too [noparse]:)[/noparse]

    Oh and yes, it's an asm driver, not that a spin driver isn't just as effective, after all it's not that high a frequency [noparse]:)[/noparse]

    I look forward to getting seeing your first full vid [noparse]:)[/noparse]

    Baggers.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • vampyrevampyre Posts: 146
    edited 2008-06-15 19:45
    shouldn't be too long now, i dont anticipate any more snags at this point.

    i think silver bullets are for werewolves , but i'm not too anxious to try that theory out. I actualy love garlic though. mmmm garlic bread, think i'll go make some now
  • BaggersBaggers Posts: 3,019
    edited 2008-06-15 22:31
    yeah, garlic is delicious [noparse];)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • vampyrevampyre Posts: 146
    edited 2008-06-16 01:08
    as deepfry is an essentially different app , i've started its own thread
    http://forums.parallax.com/forums/default.aspx?f=25&m=273791
  • vampyrevampyre Posts: 146
    edited 2008-06-22 08:06
    Slight update
    the viewer is still the same, however the converter is gone/dead/deceased/no more

    its been replaced with a shiny new fangled windows app that allows you to convert .BMP or .PCX images of any resolution, and also greatly improves conversion customization of the colors.

    updated file in first post
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-06-22 17:39
    Awesome converter! Nice work!

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with the Protoboard? - Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card? - PropDOS
    Need a part? Got spare electronics? - The Electronics Exchange

    Post Edited (Oldbitcollector) : 6/22/2008 6:12:02 PM GMT
  • vampyrevampyre Posts: 146
    edited 2008-06-22 18:37
    nice pics, thanks for posting them
Sign In or Register to comment.