I am using the 642's video port to suck in raw RGB data (24-bit) whose source is a VGA display signal running 1024x768@60 Hz. I am using a TI codec to resize and then encode these frames (.h264). As you can imagine, I can't compress frames at 60 FPS, so I would like to be able to decimate by dropping frames on the ground while I am processing a given frame. I can't use a vanilla ping-pong approach because I can't spare the memory BW...I really just want to dump frames into the bit bucket.
The problem is that I want to run the video port in "continuous mode" if possible so that I can get the next frame as quickly as possible when I am ready (as opposed to one-shot mode that has to re-acquire via 2 vertical syncs). In continuous mode, the video port will be raising the EDMA event associated with the video data (which currently is raised after every row is captured). So the challenge is: keep the video port running continuously, raising EDMA events, but also drop frames on the ground via EDMA.
I think this would be quite easy to do if there were the idea of a "dummy" EDMA transfer; i.e. the EDMA row event gets raised, but I just send the row data to nowhere...essentially, what I really want to do is simply clear the FIFO when the EDMA events happen while I am in "dropping" mode. But I can't seem to make the EDMA do this....I think it wants to send data somewhere valid every time, which is just a waste of effort when I want to drop.
The way that I would do this if I could:
1. On first frame, transfer whole frame to RAM using EDMA xfer #1 (this is working)....EDMA transfer #1 "links" to a "dummy" EDMA transfer xfer_dummy.
2. Transfer xfer_dummy will simply drop the buffer on the ground if possible, and will simply link to itself. It will raise a transfer complete isr that will check to see if I am ready to get the next frame; if so, then inside the isr I will link back to xfer #1.
Is this possible?
The other way I reasoned that this could be done: is there a way to have an isr execute *instead* of EDMA when the video port EDMA event is raised? If this were possible, then I could set up this isr upon completion of the first transfer, then have my isr run instead of EDMA on events that represent frames I want to drop, then re-activate the EDMA handling of the event when I am ready...
Any ideas on whether these things are possible? Have you done anything like this before?
Thanks for any help!
Steve