Re: FIELD_ALTERNATE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Friday 21 March 2003 10:50, Gerd Knorr wrote:
> Gabor Kerenyi <wom@xxxxxxxxxxx> writes:
> > > fetch latest bits from http://bytesex.org/snapshot/
> >
> > Thanks, it works. Though it doesn't solve my problem
> > as I thought.
> > I have to decide the next field (top or bottom) in the IRQ
> > handler depending whether the bt chip previously
> > captured a wrong field or not.
>
> Point being?  Why not simply capture at full field rate and throw
> away the ones where the bt878 chip didn't manage to pick the
> correct field? (due to resync after input switch I assume?).

Yes you're are right. It is needed to achieve higher frame rate
when multiplexing inputs. The problem is that after switching
inputs the BT chip sometimes captures a wrong field.
No problem, on the Euresys card there is a chip which outputs
the correct field and I can get the signal through GPIO.

I tried to capture at full framerate but the result was not good
enough. The frame rate was max. 2.5 fps/channel (4 channels).
Previously I used FIELD_SEQ_TB and at that time I could
manage to get 2.5 to 3.8 fps/channel. (for very short time 4.4)
That time I used an algorithm something like this in the IRQ handler:

CapturePicture
IF COUNTER>0 OR FIRST_FRAME=TOP
		switch channel
		IF (FIRST_FRAME=TOP) buffer->reserved[1]=TOP
		ELSE buffer->reserved[1]=BOTTOM
		COUNTER=0;
ELSE
	COUNTER=COUNTER+1
FI

So it's very simple. After the switch the first field in the buffer
will probably wrong so we have to drop it. But the second
field in the buffer will be good, so if the second one matches the
requested FIELD type we can use it, otherwise we capture another
2 fields.
So at worst case 2 frames (4 fields) are needed
to be captured to get the correct field, but sometimes 2 are
enough.
The disadvantage is when the second capture is made and we
use the first field not the second one in the buffer we would not
need to capture the second field.
At FIELD_SEQ_TB the 2 fields in the buffers are never the
same, but the order can change. (TOP-BOTTOM, BOTTOM-TOP).
with an extra chip on board it is possible to determine
the first or the second image matches the requested field.

With FIELD_LATERNATE I thought it's possible decrease the
number of frames needed to capture at the worst case from
4 to 3.

Gabor





[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux