Shop OBEX P1 Docs P2 Docs Learn Events
Video OVERLAY Using Propeller — Parallax Forums

Video OVERLAY Using Propeller

dallgxdallgx Posts: 2
edited 2009-01-05 20:08 in Propeller 1
Has anyone done any work with·the Propeller to OVERLAY a composite·video signal?

Video In ---> Propeller Circuit ---> Video Out, where:

Video In is a standard NTSC composite video signal (1v p-p)
Video Out is·identical to Video In·except graphics/text has been inserted into the picture.
The·Propeller Circuit·would·buffer the inbound signal, "lock"·to·the sync signals·of the·video signal, then key·the video into the buffered input video.

Thanks!

Comments

  • soshimososhimo Posts: 215
    edited 2008-12-29 20:33
    I interviewed for a company once that mixed advertisement feed with the broadcast feed (apparently commercials are not part of the broadcast stream but are injected at cue points during that broadcast). I was shown the hardware and some of the software associated with interleaving the two signals and it was incredibly complex. There were multiple boards with many components. This was 10 years ago so I'm sure the boards are much smaller with surface mount more prevalent, but I imagine that the task of mixing the signals alone might be more than the prop can handle on its own.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-29 20:37
    Hitt Consulting has a Propeller-based video overlay board. The schematic and source code are available on his (Bean's) website.
    The input video is not buffered. The Propeller's video output routine syncs to the input signal and "overrides" the input when needed
    to produce the overlaid text.

    See: www.hittconsulting.com
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-12-29 20:40
    Yes, it's been done with the Prop. Hitt Consulting (a.k.a. Bean in this forum) has an overlay module here. (His website seems to be down right now, though.) It's back up now.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 12/30/2008 12:01:56 AM GMT
  • GreyBox TimGreyBox Tim Posts: 60
    edited 2008-12-29 21:38
    I've always thought it would be interesting to try a pass-through of BT.656 parallel video, with external video decoders and encoders.

    "656" is a very common parallel-video-bus format, where interlaced video data is transmitted with an 8-bit or 10-bit bus (plus one clock line) using 4:2:2 encoding (i.e. color sampled at half the luma sample rate).· The sync signal are embedded by using certain "special" bit patterns.· For a 480i or 576i signal, the pixel clock would be 27MHz, so if you had two or more cogs·doing the work, it should be do-able.

    One cog would simply be the active bus manipulator, with 9 inputs and 8 outputs (the clock does not need to be passed through the cog since the clock doesn't change once the PLL locks - and we can take advantage of the fact that video by its very nature is a continuous serial stream).· The Cog would simply watch the incoming pins and write the output to the output pins (if you invert the clock from the input, and pass the inverted clock to the output this gives you an extra one half clock cycle to setup your outputs, otherwise, you could simply drive the output pins·"integer" clock periods late at the·cost of signal latency (and the added programming expense of video buffer management) - the invert can be done with a high speed single gate XOR, with one input driven by the incoming clock and the other driven by another output pin on the Prop).· Intenally for the "bus manipulator", you could have a keying block, which takes a hub long and writes the key to the next 32 pixels based on T/F tests - or you could work out a color map for fewer pixels... or alpha blend the values to the OSD (this would take several cogs, as to do a proper alpha blend, you need to do the following math: (input*Alpha/255)+(OSD*(1-(Alpha/255)))=Output where "alpha" is an 8-bit value - and this is all assuming an RGB 4:4:4 colorspace).

    At least one more Cog would need to be watching the same input bus and clock pins to figure out which pixel was what and what color-sample was what, then dispatch the intended output OSD to the "bus manipulator" cog.


    This type of application is why I'm really looking forward to the PropII - lots of very high-quality video processing becomes possible when the chip runs a little bit faster than 80MHz, features optimized hub access, has more RAM, and has other toys like dual-port rams, etc...· This kind of high-speed (near-)realtime overlay things·are also where CPLDs and FPGAs really start to make a lot more sense than a·standard micro-p, depite how powerfull and fancy the micro might be, because they can be pipelined and process things in parallel easier than a micro can (for example you could do a 32-bit fixed point math operation for the alpha blend with a·lower clock speed than you could with a 32-bit micro and a fixed-op [noparse][[/noparse]32-bits by the way being just enough to do a fixed point alpha with an 8-bit input and alpha variable assuming no sign bit - a trick for doing the "1-(alpha/255)" is to work out the 1/255 value to five decimal places and simply do an "alphaXOR255" to get the subtraction, then the "x alpha" becomes a more simplfied process of -alpha=alphaXOR255, frac=1/255 [noparse][[/noparse]which works out to: 0.00392 and could be represented as decimal 392], inputresult = input*(alpha*frac) and OSDresult = OSD*(-alpha*frac), then output=inputresult+OSDresult).· You can see than even with fixed point math, it's several steps - so a·micro-p would have trouble keeping up with the incoming data-rate.

    With a slave FPGA, you could·reduce the pin-count·from the micro to only a simple SPI/LVDS interface (clock/data) for a standard text overlay, our you could widen the bus for full speed video (clock/data1/data2/data3 for 18-bit RGB or clock/data1/data2/data3/data4 for 24-bit RGB - still just 4 or 5 pins out of the micro)


    -Tim

    Post Edited (GreyBox Tim) : 12/29/2008 10:16:13 PM GMT
  • dallgxdallgx Posts: 2
    edited 2009-01-05 20:08
    Thanks everyone for your contrubutions!

    Yet again Parallax (and the great Parallax customer base) comes through for me. I am thinking a mix of the various technologies presented here will get me an inexpensive system that meets the needs of my application. We are going to use the native composite video output mode switchable to the overlay mode to give us the best of both worlds.

    -David
  • I know this is an old thread, but the website linked to has expired. I am wondering if anyone has a copy of the schematic and source code linked to -- I tried looking at a web cache but they were both 404 errors.

  • You may be interested in a newer video overlay board, based on the Propeller. They are not in assembly right now, but all info can be found at:

    https://www.parallax.com/product/28327

  • Are you saying they have video input? I already have (theoretically) the nesecary hardware, I was just looking for schematics and code on how to overlay.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2015-08-13 20:29
    Yes, the Backpack has video input and output. One caveat, though: the video coming it has to be from a true 75-ohm source producing a 2V P-P signal into an open circuit (i.e. 1V P-P into a 75-ohm load). Some cheaper board cameras produce 5V P-P at a higher impedance, but those will not work well with the Backpack.

    Although the Backpack is not currently in production, its schematic and principles of operation are included in the docs, and you're free to duplicate the essential elements of the circuit.

    -Phil
  • Does anyone know of a schematic of this new backpack module? I can't seem to find it.
  • Here: https://www.parallax.com/downloads/propeller-backpack-product-document

    BTW, this is not a new module. It was in production for years but is currently out of production. This is a situation I hope to remedy eventually, possibly with an updated version.

    -Phil
  • jacksons wrote: »
    Does anyone know of a schematic of this new backpack module? I can't seem to find it.

    The particulars where in my comment. (The downloads)

  • This don't look that complicated, why isn't this an object in obex, or are the prop's resources used up, and no room for other methods. I would like to see remotely what my robot is doing, and be able to read sensor data at the same time.
Sign In or Register to comment.