From owner-freebsd-multimedia Tue Dec 1 03:43:45 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id DAA17810 for freebsd-multimedia-outgoing; Tue, 1 Dec 1998 03:43:45 -0800 (PST) (envelope-from owner-freebsd-multimedia@FreeBSD.ORG) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id DAA17805 for ; Tue, 1 Dec 1998 03:43:42 -0800 (PST) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id KAA01718; Tue, 1 Dec 1998 10:33:28 +0100 From: Luigi Rizzo Message-Id: <199812010933.KAA01718@labinfo.iet.unipi.it> Subject: Re: BT848 adaptive AGC (fwd) To: mmt-ref@tu-dresden.de Date: Tue, 1 Dec 1998 10:33:27 +0100 (MET) Cc: roger@cs.strath.ac.uk, multimedia@FreeBSD.ORG In-Reply-To: from "Christoph Fleck" at Dec 1, 98 10:49:14 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Can the BT848 driver enable the adaptive AGC mode? > In the BT848 hardware documentation > http://www.brooktree.com/pdf/graphics/DATASHTS/l848a_a.pdf > (page 106) describe how to enable the adaptive AGC. > > Reason: > All the BT848 based video transmissions use a unnecessary high bandwith. > The automatic gain control (AGC) is to fast. > If a small part of the video change its brightness, the > whole video change it too. > The adaptive AGC could avoid this. I doubt it! There are two "AGC" in the Bt848 -- one refers to AD overflows, the other one to chroma. For the first one (register 0x068, pg.103 in my manual, "CRUSH" bit) the relevant piece of code is /* sync detect threshold */ #if 0 #define SYNC_LEVEL (BT848_ADC_RESERVED | \ BT848_ADC_CRUSH) /* threshold ~125 mV */ #else #define SYNC_LEVEL (BT848_ADC_RESERVED | \ BT848_ADC_SYNC_T) /* threshold ~75 mV */ #endif The "CRUSH" bit is disabled by default (at least in my copy of the sources) because I found out that the adaptation process is one-way: it reduces the gain, but never brings it up again. So when you have bad signal (usually from the tuner) and the capture chip looks for sync pulses in the wrong place, the image turns rapidly black. I think you don't want this feature, anyways. The other "AGC" i see is in the registers E_SCLOOP and O_SCLOOP and it seems to affect the chroma component. Looking at the code, this feature is disabled when opening the device, and enabled in the various functions which build the bt848 programs yuvpack_prog(), yuv422_prog(), yuv12_prog() -- i am not sure if this is a mistake or it is intentional. You can easily try to disable it yourself by commenting out the three pairs of lines in the above functions. > If possible, could you point my how to do it? > Other ideas? be sure that the problem does not come from the camera (e.g. most Camcorder have AGC and often there is no way to disable it) or lighting (especially with neon lamps, when you have a drift between the camera and mains frequency). cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message