Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!gem.mps.ohio-state.edu!ctrsol!emory!mephisto!mcnc!rti!bcw From: bcw@rti.UUCP (Bruce Wright) Newsgroups: comp.sys.ibm.pc Subject: Re: Super Duper VGA boards Summary: Size of lookup tables, etc Message-ID: <3303@rti.UUCP> Date: 2 Dec 89 06:24:18 GMT References: <8911250811.AA26716@cie.uoregon.edu> <10401@attctc.Dallas.TX.US> <4037@peora.ccur.com> Organization: Research Triangle Institute, RTP, NC Lines: 66 In article <4037@peora.ccur.com>, joel@peora.ccur.com (Joel Upchurch) writes: > In article <3300@rti.UUCP>, bcw@rti.UUCP (Bruce Wright) writes: > > This is certainly true for some applications, but if you want to do > > image processing it can be *VERY* useful to be able to play around > > with a video lookup table. [...] > > I think you are are quite correct when we are talking about fairly small > color maps. What I'm not so sure about is what is most efficent when the > size of the color map is on the same order of magnitude as the video > buffer, which it seems to me that it is when you start talking about > 64k different colors on screen. You can certainly get enough bits to make a lookup table impractical, but that point is highter than 64k colors. That corresponds to 16 bits per pixel, and a LUT oF 65536 words (in whatever architecture the LUT uses - maybe 16, maybe 32 bit words). For a VGA-style display (640x480), which is hardly the limit, there are 307,200 pixels or about 600KB if you have 16 bits per pixel (I realize this isn't quite a standard VGA). So in this case the LUT is still less than half the size of the display memory (about 256KB if it's 32-bit words). One advantage that it would still retain even at an approximately equal size would be that you usually need not modify _all_ of it - there are usually commands to set up a "default" lookup table and to modify only parts of it. Most systems, however, have fewer bits per pixel than 16 - like maybe 8 or 12; this is quite sufficient for many (most?) purposes: for example, most medical imaging systems (the kind I'm most familiar with) only give you maybe 8 or 12 bits of accuracy at most, and then only give you a monochrome density image. Many image processing programs add color to highlight certain density ranges (a process which can be tricky, because the eye does not process color variation anywhere nearly as linearly as it does grey scales), but it's all added, not in the original. For most interactive use, you could do with a lot less - 8 or 16 may be a bit on the lean side, but 64 (=6 bits/pixel) or 256 (=8 bits/pixel) would probably be enough for all but the most demanding (and flush) user. You are usually better off spending the extra memory to buy more pixels rather than more bits/pixel unless you're doing imaging (analysis or creation) of some sort - having more pixels reduces the jaggies (aliasing in the technical jargon). One system I've heard of had 4096 x 4096 pixels, with 32 bits per pixel (10 bits each of R, G, B, and two overlay planes for annotations) which was used for satellite photographic data. Clearly _this_ system can't use a lookup table (which would require over 4,000,000,000 entries, presumably of at least 4 bytes each ... far larger than the size of the primary image storage). > This raises another question with me. How is the cost of a DAC effected > by the number of bits of input resolution? What is the cost differental > of 6 bit versus 8 bit versus n bit DACs? If you had a high resolution > gray scale mode, would it be cheaper to have a seperate DAC for it, > that set the R, G and B signals to the same levels, or use 3 high > resolution DACs all the time? Of course in real life, all these DACs > probably wind up on one chip, but which chip is cheaper to make? I'm not a video design engineer, but my impression from the way I usually see things done both for video generators and for A-D and D-A boards is that anything up to a 12 bit A-D or D-A device is not terribly expensive but that the cost goes up rapidly if you want more than 12 bits. At least until fairly recently, the dominent cost of going to more bits/pixel was not the higher resolution DAC you'd need to make the upgrade worthwhile, but the memory you'd need to store all that data. Since memory is finally dropping down into a more reasonable price range, this may no longer be true. Bruce C. Wright