dear zing lee
thanks for re-writing. it's now very clear. unfortunately i have
nothing to add. all your comments are correct. the card claims to
provide 10-bit DAC performance, but as far as we can tell by using
GetClut, the lower two bits in fact cannot be reliably set. it is
most probably a limitation of the driver. we are in touch with ATI
about precisely this problem with several of the Radeon cards and
we're hopeful that a solution may arrive, but it may not cover all
cards. It is also just possible that the result from GetClut is
misleading and that in fact the low bits are correctly set
internally, but misreported. however, for research that's not much
good, because unless you're really confident that it's working you
won't want to base your experiments on it. you may want to read:
http://psychtoolbox.org/mac.html#drivers
LoadClut uses the gamma table as it sees fit to efficiently load what
you want into the hardware clut. users might indeed get unexpected
results if they mix use of SetClut and LoadClut. I'll add a specific
warning about that to the help text.
i added an item "Screen.mex" to the bug list, crediting your last message:
http://psychtoolbox.org/mac.html#bugs
best
denis
>I'm very sorry for my poor English. I'm trying to write again, and
>hope it's clearer.
>Thanks very much!
>
>__________________________________________________
>______________________
>The information for the computer and PsyToolbox:
>
>»describecomputer
>*** Kathy Murphy's Power Mac G4/500, Mac OS 9.1
>**************************
>G4, 500 MHz, memory bus 100 MHz, 71.175 Mflop/s
>Psychtoolbox 2.52, 12 August 2002, Matlab 5.2.1.1421
>FileSharing is on.
>»describescreen
>*** Screen 0
>*************************************************************
>ATI Rage128Pro, AGP
>"ATY,Rage128Ps" (.Display_Rage128 version 1.0f12) in slot
>SLOT-A
>8 bit dacs. 1280x1024 75 Hz.
>(56,60,65,67,70,72,75,76,85,90,100,120 Hz avail)
>*** Screen 1
>*************************************************************
>ATI Radeon 7200, retail, PCI, aka "ATI Radeon Mac Edition (PCI)"
>"ATY,RADEONp" (.Display_RADEON version 1.0f52) in slot
>SLOT-B
>10 bit dacs. 800x600 120 Hz.
>(56,60,65,67,70,72,75,76,85,90,100,120 Hz avail)
>**********************************************************************
>****
>__________________________________________________
>______________________
>(1) % LoadClutTest
>loadcluttest(1)
> - - - - - - - - - - - - - - - - - - - - - - - - -
> 8-bit gamma table. pixelSize 8. Success! GetClut==LoadClut at
>8 bits.
> 8-bit gamma table. pixelSize 16. Success! GetClut==LoadClut at
>8 bits.
> 8-bit gamma table. pixelSize 32. Success! GetClut==LoadClut at
>8 bits.
>10-bit gamma table. pixelSize 8. Failed! Values read differed (by
>up to 3) from what was written:
> 0: LoadClut:[ 0 1023 251] vs. GetClut:[ 0 1023 248]
> 1: LoadClut:[ 4 1019 213] vs. GetClut:[ 4 1019 212]
> 3: LoadClut:[ 12 1011 957] vs. GetClut:[ 12 1011 959]
> 5: LoadClut:[ 20 1003 993] vs. GetClut:[ 20 1003 995]
> 6: LoadClut:[ 24 999 683] vs. GetClut:[ 24 999 682]
>10-bit gamma table. pixelSize 16. Failed! Values read differed (by
>up to 3) from what was written:
> 1: LoadClut:[ 33 990 113] vs. GetClut:[ 32 991 112]
> 2: LoadClut:[ 66 957 711] vs. GetClut:[ 64 959 710]
> 3: LoadClut:[ 99 924 926] vs. GetClut:[ 96 927 927]
> 4: LoadClut:[ 132 891 917] vs. GetClut:[ 132 891 919]
> 5: LoadClut:[ 165 858 322] vs. GetClut:[ 164 859 321]
>10-bit gamma table. pixelSize 32. Failed! Values read differed (by
>up to 3) from what was written:
> 0: LoadClut:[ 0 1023 603] vs. GetClut:[ 0 1023 602]
> 1: LoadClut:[ 4 1019 692] vs. GetClut:[ 4 1019 694]
> 2: LoadClut:[ 8 1015 1013] vs. GetClut:[ 8 1015 1015]
> 3: LoadClut:[ 12 1011 977] vs. GetClut:[ 12 1011 979]
> 5: LoadClut:[ 20 1003 792] vs. GetClut:[ 20 1003 795]
>__________________________________________________
>______________________
>(2) % observe the value of Gamma Table and ClutTable after
>LoadClut
>% the result indicates that Gamma is set as 10bit precision, but
>ClutTable is set as 8bit precision
>LoadClut(1,ones(256,3)*bin2dec('1110011100'),0,10);
>[oldGammaTable,oldBits,gammaError]=Screen(1,'Gamma');
>dec2bin(oldGammaTable(1,1))
>clut=screen(1,'getclut',10);
>dec2bin(clut(1,1))
>
>ans =
>
>1110011100
>
>
>ans =
>
>1110011111
>__________________________________________________
>______________________
>(3) % after process (2)
>% observe the value of Gamma Table and ClutTable after
>Screen SetClut
>% the result means Screen SetClut (10bit) doesn't change
>Gamma Table as LoadClut(10bit) does
>% so it will confuse programmer when function "Screen SetClut"
>and "LoadClut" are both used in one file.
>screen(1,'setclut',ones(256,3)*bin2dec('1000011100'),0,10);
>[oldGammaTable,oldBits,gammaError]=Screen(1,'Gamma');
>dec2bin(oldGammaTable(1,1))
>clut=screen(1,'getclut',10);
>dec2bin(clut(1,1))
>
>ans =
>
>1110011100
>
>
>ans =
>
>1110011111
>
>
>
>
>
>
>
>http://psychtoolbox.org
>POST a message to: psychtoolbox@yahoogroups.com
>UNSUBSCRIBE by sending a blank message to:
>psychtoolbox-unsubscribe@yahoogroups.com
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/