Radeon 10-bit Gamma
- Added testgamma_osx to the downloads below. It will save and load the gamma table on the main screen to/from files on your desktop under OS X. Apple uses floating point values in the range [0.0,1.0] now, so determining bit precision is a matter of asking Apple (which I've done) to support the 10-bit input mode of the ATI drivers and then testing them. According to ATI, the same drivers are used on OS X as on 9; Apple writes the glue to connect the CGDirectDisplay calls to the right driver control codes that testgamma (when booted into 9) calls directly. Note that in classic mode, Apple's "BB" proxy driver (for "Blue Box") does not support passing through greater-than-8-bit values to the ATI driver as reported by the classic version of testgamma.
- The impending Psychtoolbox 2.5 release will incorporate 10 bit DAC support in a transparent way (via LoadClut), so I'm removing my extensions to Psychtoolbox and Videotoolbox below since they are out of date. However, I've updated my standalone C program testgamma (formerly testclut) to operate as it originally did, knowing nothing about the video driver. It merely tries to load the gamma table with 16 bit entries (you can specify whether the upper or lower 10 bits should be significant) and shows a pattern that should be visible with greater than 8 bit DACs with driver support. This provides a way to test new drivers, such as the GeForce 4 (see next item).
- The reference indicating that all GeForce4 cards have 10 bit DACs is the nView tech brief (page 10), available here. Let me know if you have a GeForce4 to test!
- Doug Taylor reports that the GF4 MX driver in his Mac does not support greater than 8 bit gamma table entries. I updated testgamma again today as well. If your driver supports >8 bit gamma table entries, that is said explicitly. If it does and you enter the opposite bit alignment, you will get characteristic display patterns which are explained now as well.
- ATI developer relations says that the PC Radeon drivers implement 10 bit gamma! An example app I put together seems to confirm this, but more rigorous measurements need to be made. Take a look at the documentation for the SetDeviceGammaRamp API call. You'll need the latest Radeon driver (though I think they implemented this early on), DirectX 8.1 and Windows 98/2000/XP. Win95 and NT4 won't work.
- Doug (not David, sorry!) Taylor has an 8500 and gets this for the VideoCard inquiry (see 5/8/02 news below):
I haven't updated the detection code below yet.
- card = ATY,R200i_A (for screen 0, *_B for screen 1)
- driver = .Display_DualHead
- driverVersion = 1.0f69
- I just updated my ATI extensions on System 9 via March 2002 ATI Retail Update. The driver version for my Radeon Mac Edition is still the same as for January, so the IsRadeon10.m script provided below still detects my card. However, I'll bet most of the changes are related to the newer cards. Since IsRadeon10_Gen2.m doesn't check driver numbers, just the card model, those of you with 7000/7500 cards should be ok (assuming ATI didn't remove 10 bit gamma support). Anyone with an 8500 please report what is returned in MATLAB using the PsychToolbox command "[card,driver,driverVersion,slot]=SCREEN(screenWith8500,'VideoCard')"
- ATI has corrected me on the newer PowerBook G4 with the mobility Radeon-- apparently the VGA out has 10-bit DAC driver support! I am aware of someone here with that model, I will attempt to test it out. If true, this would be a portable color psychophysics lab! Two screens and 10-bit out weighing in at 5.4 pounds! Of course the CRT you'll be lugging around will weigh a little more :-)
- An OEM AGP Radeon 7500 (dual head) comes standard in the base G4 tower now. A coworker next door has one, and I've updated the files below to work with the 7500, and fixed bugs in the older ones (testclut C program now works on gen2 Radeons, TestNewSetClut MATLAB script updated, and now works on gen1 again). David Brainard updated some of the scripts in the PTBExtension, and I tested them on the 7500 with success! Obviously the analog VGA out needs to be used, not the digital out which doesn't use the DACs. This is great for vision research, since you get two screens, and 10 bits on one of them with driver support, out of the box from Apple!
- If you want PC support or direct information about gamma support, contact ATI Developer Relations. I (and a few others) haven't gotten any response from them, and the more of us asking the better. You might want to accidentally drop "Quake bug" into the subject line to get a quicker response. Just kidding.
- You might also want to try NVIDIA (see note below about the GF4 having 10-bit DACs): NVIDIA Developer Relations.
- There was a typo in the 3/15 TestNewSetClut script. Thanks to Jonathan Peirce for pointing it out. He reports that the PTB scripts work with the 7000! I posted an updated (3/22) version.
- No luck on PC Radeon testing yet.
- The GeForce4 has 10-bit DACs as well! I have contacted NVIDIA.
- David Brainard has made lots of updates to PsychToolbox to accomodate 10-bit gamma tables and the various cards that support them. I have also modified and contributed a little to the scripts he provided (for the little I know about the 7000/8500), available in the PsychToolbox extensions area below. These extensions will be part of the next update to PsychToolbox and will be removed when that update is available.
- One corollary to the 2nd generation Radeon drivers providing 10-bit DAC access is that it appears only the 7000/8500 and the regular "Mac Edition" Radeon drivers work-- ATI didn't mention the Mobility (via VGA out) or the VE in their list of models that will work.
- Updated ATI link and updates link below
- As I mentioned at the end of January, the second-generation Radeons work. Linda Glennie of Steve Shevell's lab got the 7000 Mac Edition to work. The drivers out of the box will do the job-- you just need to use the lower 10 bits in the gamma table instead of the upper 10, like we do with the first-generation Radeons. The files below are updated to detect and work with the 7000, but I don't have one to test.
- Working with Maarten van der Smagt of the Salk Institute to get a PC version working. Will be fooling around with DirectX this weekend hopefully!
- Radeon 7000 Mac Edition and Radeon 8500 Mac Edition have 10-bit DAC support in their drivers! I am working with Steve Shevell to add support for the 7000 in the files below, if he buys it as planned.
- Currently no word on whether there is/will be 10-bit DAC support on the new cards (Radeon 7000 Mac Edition and Radeon 8500 Mac Edition).
- The January 14 ROM update continues to have 10-bit DAC support. I updated the PsychToolbox and VideoToolbox extension files to recognize the new driver version (1.0f57) installed by this update.
- In looking back over my TimeVideo results with both the AGP and PCI versions of the Radeon, I noticed a 10x difference in CopyBits performance! I got around 200 MB/s with the AGP version and 20 MB/s for the PCI version! CopyBitsQuickly really helps with the PCI version: it brought it up to 70 MB/s. But CopyBitsQuickly on the AGP brought it down to 120 MB/s. Can anyone confirm this?
- Apple doesn't offer the Radeon AGP as a build-to-order option in the G4 towers anymore. To get the card pre-installed you need to put it in the PCI slot. To use an AGP Radeon you'd need to buy an AGP Radeon separately, then take out the pre-installed AGP Nvidia card, and buy another PCI card if you want 2 displays! It would be nice if one could use the Radeon VE with the 10-bit DAC drivers and use its dual-head capability, but there's no evidence yet that the VE works with the new drivers (see below), nor have I checked whether its dual-head feature works on Macs.
- Took the ATI ROM Xtender 1.0.7 out of the Extensions folder after installing 9.2.2 to see if the 10-bit DAC driver for Retail Radeons is included in 9.2.2. I guess not, gamma could only be loaded in 8-bit mode.
- Does anyone have access to a Radeon VE Mac Edition or a newer PowerBook G4 with the Radeon Mobility installed? I would like to see if the drivers work with these models. I tried a PC version of the Radeon VE in my Mac but apparently that doesn't work (need the Open Firmware on board I assume).
- There are occasions (like when I took the ROM Xtender out) when the display reverts to some timing that the monitor wont support, or when gamma is incorrectly restored on boot to a blank table-- making your display unusable. I've found that the way out of this situation is to remove the video cable from the troubled card, and boot to the second video card (hope you have one!). Then remove the "Display Preferences" from the Preferences folder and reboot with the troubled card connected. It should revert to a safe mode.
What it is
An update to the Radeon driver allows one to make a cscSetGamma control call and pass a 256-entry gamma table that contains two bytes (16 bits) per entry rather than the usual one byte. Only the upper 10 bits of the 16 bit entries are significant. More details are in the files you can download below.
What can I do with it?
This will probably be of primary interest to vision scientists, but could be useful for anyone who wants to provide very fine intensity changes on their displays, either in space or time. In vision science experimenters often want to measure the smallest change, or "threshold" in contrast that the subject can detect, and unfortunately in an 8-bit per channel system, there's no way to make changes along a single axis in color space fine enough to accurately measure the threshold. There are research-grade setups which provide up to 12 bits per channel color resolution, but they are often expensive or obsolete. The Radeon is a mainstream solution, is inexpensive and available now (costing about $150 in October 2001).
I learned that there were 10 bit DACs on the card in February 2001. Home theater enthusiasts and ATI PC driver engineers were extolling their virtues with regard to DVD playback quality in this thread on the AVS Forum. The 10-bit DACs are mentioned in passing on page 19 of the Radeon Digital Video white paper. I communicated with ATI's Mac driver people and requested 10-bit DAC support. After some back and forth on the best way to do so, they came up with a driver update and were very helpful and responsive. With the release of MacOS 9.2.1 (8/20/01) ATI and Apple made the extra gamma support available to everyone, but for OEM Radeons only, not retail versions. Having a retail version myself, I didn't think 9.2.1 contained the driver update. On 10/1/01 ATI released the September ROM Update which brought 10-bit gamma support to the retail cards. Wee ha!
The second generation Radeons (7000,7500,8500) have drivers that support 10-bit DACs out of the box, so 10-bit DAC support at ATI seems to be the default now (at least in the Mac drivers)!
Last updated 04/2003