Date: Fri, 30 May 1997 00:36:12 -0700 From: Amancio Hasty <hasty@rah.star-gate.com> To: Luigi Rizzo <luigi@labinfo.iet.unipi.it> Cc: multimedia@FreeBSD.ORG Subject: Re: bt848 status, comments and diffs Message-ID: <199705300736.AAA00894@rah.star-gate.com> In-Reply-To: Your message of "Wed, 28 May 1997 13:24:46 %2B0200." <199705281124.NAA17044@labinfo.iet.unipi.it>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Luigi,
Video capture starts by first waiting on a mode change FM1 or FM3 .
It took me a while to spot that error. BT848 data book page 46:
"The first field begins with a synchronization instruction (SYNC)
indicating PACKED or PLANAR data from the FIFO...."
You have :
printf("bktr: yuvpack_prog, i_flag %d, interlace %d, rows %d, cols %d\n",
i_flag, interlace, rows, cols);
/* first: wait for start of even/odd field */
if (i_flag == 1 /* want even only */) {
I2( OP_SYNC | OP_RESYNC | BKTR_VRE, 0 );
} else {
I2( OP_SYNC | OP_RESYNC | BKTR_VRO, 0 );
}
/* sync, wait for packed data */
I2( OP_SYNC | OP_RESYNC | BKTR_FM1, 0 );
----
It should be :
/* sync, wait for packed data */
I2( OP_SYNC | OP_RESYNC | BKTR_FM1, 0 );
for (i = 0; i < (rows/interlace) - 1; i++) {
I2( inst, target_buffer );
target_buffer += b ;
}
if (i_flag == 1 /* want even only */) {
I2( OP_SYNC | OP_RESYNC | BKTR_VRE, 0 );
}
if { i_flag == 2 /* want odd only */ ) {
I2( OP_SYNC | OP_RESYNC | BKTR_VRO, 0 );
}
if { i_flag == 3 /* even field follows */ ) {
I2( OP_SYNC | OP_RESYNC | BKTR_VRO, 0 );
}
I think this was my yuv422 bug and it applies to the yuv pack mode
Will post the patches tomorrow.
Enjoy,
Amancio
>From The Desk Of Luigi Rizzo :
> Yet another version of brooktree848.c with the cleanups I was
> mentioning in my previous postings. The code is available at
>
> http://www.iet.unipi.it/~luigi/brooktree848.c
>
> I have tested it and it seems to work in both packed and planar mode,
> with single frame capture. It works with the old and the new
> grabber-meteor.cc
>
> Try it if you can, and send feedback.
>
> I have left the rgb_ code untouched, since amancio is probably working
> on that. In passing, I noticed that the clipping features of the Bt848
> are quite powerful. A better way to exploit them would be, probably, to
> let the application program pass the clipping shape in raster format,
> rather than pass it as a set of rectangles. This would allow complex
> figures (e.g. clipping into circles, ovals etc. which are not possible
> now, and do not require time-consuming computations from the kernel like
> sorting rectangles etc.
>
> Basically, I would describe a clipping shape as a sequence of lines
>
> BEGIN (skip n1 write n2) *
>
> (one per row in the output) and let the driver just translate this into
> Bt848 instructions. The above description can be as small as 32 bit/row.
>
> 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?199705300736.AAA00894>
