On Mon, 10 Jun 2002 17:13:52 +0000 Michael Hunold <hunold-ml@xxxxxx> wrote: > Hello Benoit, > How fast do you need to switch your inputs, ie. how many switches per > second do you need? > > Switching the sources and grabbing really fast (ie. switch to port 0, > grab picture to buffer 0, switch to input 1, grab picture to buffer 2) > > won't work. Right. I used the following strategy : - capture 2 images on input 0, ignore first image - capture 2 images on input 1, ignore first image and so one. With 4 inputs, this gave me : 25 frames per second (fps) => 3.125 fps which is enought for my application requiring 3 fps. > Your four inputs provide analogue video signals. If you switch from > one input to the other, the bt848 needs to synchronize to the new > input first. The time it needs to do this is unpredictable. This > depends on the video source and can vary from a few ms to about 100ms > in the worst case (ie. you will miss about 2-3 video frames). >From the datasheet, the bt848 is able to synchronize over few lines. But of course,I need to take care that switching does not occur in the middle of an image. However, since my video inputs are not synchronized, I just switch from input to another at the end of the "capture 2 images" (and just after loading the new RISC instructions). > If you get black lines in your picture, then the bt848 was not able to > > synchronize to the new source yet and tries to recover gracefully by > skipping the lines. If you get mixed up pictures, then you tried to > capture an image while the channel change was not completed yet. > > I don't know the internas of the bt848 driver, but I suspect it cannot > > detect when the input switch is completed. Right. It seems that the "switching" is done outside the bt878 core. So the grabbing RISC instructions are not aware of this. However, it sets the FDSR bit in the Interrupt Status sometimes (Fifo Data Stream Resynchronization). > I think this problem is unsolvable. Wrong. At least, it works in a usable way for me. > If time is not important for you, make sure to wait long enough after > a channel switch. If time does matter, you should probably use > multiple video cards. I know. But using multiple cards does not work I'm sorry. I got ALL kinds of PCI bus problems (with lots of black lines in images). For my application, frame rate is not important, but QUALITY IS IMPORTANT. I'm currently trying to increase the frame rate (using 2 buffers is not enought, I'm trying to use at least 3 buffers now). The code will be more general (meaning that I'm removing hardcoded values :-)). Benoit