Date: Wed, 28 May 1997 00:36:56 +0200 (MET DST) From: Luigi Rizzo <luigi@labinfo.iet.unipi.it> To: hasty@rah.star-gate.com (Amancio Hasty) Cc: luigi@iet.unipi.it, multimedia@FreeBSD.ORG Subject: Re: bt848 status, comments and diffs Message-ID: <199705272236.AAA16301@labinfo.iet.unipi.it> In-Reply-To: <199705271548.IAA13533@rah.star-gate.com> from "Amancio Hasty" at May 27, 97 08:47:48 am
next in thread | previous in thread | raw e-mail | index | archive | help
> Hi Luigi,
>
> interlace is for ntsc interlace frames see the bt848 databook for
> a brief description . In your case, modifiy the driver so interlace
ok, I think I have got it. you have several different options
1. odd only;
2. even only
3. odd or even as separate fields
4. odd + even, interlaced
> Tonite, I will review the mods on a quick qlance they look great!
I have given a first shot at the yuvpacked code (the simpler one).
I would write it as follows:
yuvpacked(...)
{
... init stuff ...
inst = OP_WRITE | OP_SOL | OP_EOL | bt_enable_cnt << 12 | (cols*2);
if (i_flag == 1 /* want even only */)
I2( OP_SYNC | OP_RESYNC | BKTR_VRE, 0 );
else /* odd or full frame start with an odd field */
I2( OP_SYNC | OP_RESYNC | BKTR_VRO, 0 );
I2( OP_SYNC | OP_RESYNC | BKTR_FM1, 0 );
for (i = 0; i < (rows/interlace) - 1; i++) {
I2( inst, target_buffer );
target_buffer += interlace*cols*2;
}
if (interlace == 1) {
/* last row, generate interrupt */
I2( inst | OP_IRQ, target_buffer );
} else {
/* last row of odd field, no interrupt */
I2( inst, target_buffer );
/* want BOTH: odd done, wait even */
I2( OP_SYNC | OP_RESYNC | BKTR_VRE, 0 );
target_buffer = (u_long) buffer + cols*2;
I2( OP_SYNC | OP_RESYNC | BKTR_FM1, 0 );
for (i = 0; i < (rows/interlace) - 1 ; i++) {
I2( inst, target_buffer );
target_buffer += interlace * ( cols*2);
}
/* generate IRQ on last row */
I2( inst | OP_IRQ, target_buffer );
}
I2( OP_JUMP , (u_long ) vtophys(bktr->dma_prog) );
*dma_prog++ = 0; /* NULL WORD */
}
The above code is based on the assumption that the IRQ is generated
at the end of the instruction. The manual does not mention this,
but I don't think it would make sense the other way round.
Also, the way it is structured, it does not permit to capture both
fields non interlaced (case 3 above), but that should be easy to fix.
Cheers
Luigi
-----------------------------+--------------------------------------
Luigi Rizzo | Dip. di Ingegneria dell'Informazione
email: luigi@iet.unipi.it | Universita' di Pisa
tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy)
fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/
_____________________________|______________________________________
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705272236.AAA16301>
