From owner-freebsd-multimedia Tue May 27 16:11:59 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id QAA09246 for multimedia-outgoing; Tue, 27 May 1997 16:11:59 -0700 (PDT) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id QAA09237 for ; Tue, 27 May 1997 16:11:50 -0700 (PDT) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id AAA16301; Wed, 28 May 1997 00:36:57 +0200 From: Luigi Rizzo Message-Id: <199705272236.AAA16301@labinfo.iet.unipi.it> Subject: Re: bt848 status, comments and diffs To: hasty@rah.star-gate.com (Amancio Hasty) Date: Wed, 28 May 1997 00:36:56 +0200 (MET DST) Cc: luigi@iet.unipi.it, multimedia@FreeBSD.ORG In-Reply-To: <199705271548.IAA13533@rah.star-gate.com> from "Amancio Hasty" at May 27, 97 08:47:48 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-multimedia@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > 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/ _____________________________|______________________________________