Hello Benoit,
Right. I used the following strategy :
> [...]
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.
Ok.
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).
datasheet != real world. 8-) But please don't let us argue about this...
Ok, I see, you have already modified the bttv driver to achieve this and
you don't want to do the switching in the userland program anyway.
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).
Switching and grabbing don't synchronize each other I suppose, ie. you
can switch the current input even if capturing is in progress. It
wouldn't make sense to control this in hardware anyway, it's up to the
driver to do this right.
I think this problem is unsolvable.
Wrong. At least, it works in a usable way for me.
I though of "unsolvable" in the sense of "fast switching of several
inputs on most bt8x8 cards without modifying the driver and detecting in
a reliable way if the bt8x8 has itself synchronized to the new input".
8-)
If you can find a way to detect if the bt8x8 has synchronized itself to
the new input, you could simply do something like this: after a
successful capture, stop the risc engine, check if it's synchronized,
start the risc engine with the next capture. The bt8x8 should then start
to capture with the beginning of the next valid frame. Of course you
cannot tell how long the time between "stop, check, start, beginning of
capture" lasts and how much frames the start/stop cycle will cost.
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.
Ok, I know what you mean. Using a ViaKT133a based system I get PCI bus
problems with one(!) video capture card already, while using a SIS735
based system, using three video capture cards works almost alright. (If
you don't do excessive i/o or video card stuff via AGP...)
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 :-)).
Good luck. I think you can only do trial & error and see if it works
reliable for your current setup.
Benoit
CU
Michael.