home *** CD-ROM | disk | FTP | other *** search
/ Falcon 030 Power 2 / F030_POWER2.iso / ST_STE / MAGS / ICTARI07.ARJ / ictari.07 / MISC / BITPLANE.TXT
Text File  |  1989-07-29  |  3KB  |  68 lines

  1. The ST`s Screens
  2. ================
  3.      Let`s  start  with something we know,  the resolutions &  colors  of  the 
  4. screens:
  5.                Screen   | Resolution| Max Colors | => bits/pixel
  6.              -----------+-----------+------------+---------------
  7.                 LOW     | 320 * 200 |     16     |       4
  8.                MEDIUM   | 640 * 200 |      4     |       2
  9.               HI (MONO) | 640 * 400 |      2     |       1
  10.  
  11.  
  12.      From this the screen length in bits can be calculated,  and from that the 
  13. length in bytes can be calculated:
  14.  
  15.                     LOW = (320 * 200 * 4) / 8 = 32000 bytes
  16.                    MED. = (640 * 200 * 2) / 8 = 32000 bytes
  17.                    MONO =   (640 * 400) / 8   = 32000 bytes
  18.  
  19.  
  20. Bitplanes
  21. =========
  22.      Starting with MEDIUM res, each pixel(P) needs two bits(B) as follows:
  23.  
  24.            B2a  B2b
  25.              \  /
  26.           P1, P2, P3 > P16;   P17 > P32;   P33 > P48;   and so on...
  27.          /  \         /   \
  28.        B1a  B1b    B16a   B16b
  29.  
  30.  
  31.      These  bits  are not stored consecutively.   Instead they are  stored  in 
  32.      ------------------------------------------
  33. groups of 16, 16 being the ST`s WORD SIZE, as follows:
  34.  
  35.        +-----Make up P2------+             +-Make up P17--+
  36.        |                     |             |              |
  37.   B1a,B2a,B3a > B16a;   B1b,B2b > B16b;   B17a > B32a;   B17b > B32b;   ...
  38.   ~~~~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~    ~~~~~~~~~~~    ~~~~~~~~~~~
  39.       Bitplane 1            Plane 2         Plane 1        Plane 2
  40.  
  41.  
  42.      In  other  words,  a group of 16`s lower bits are  all  stored  together, 
  43. followed  by that groups higher bits - and these 'groups of bits'  are  called 
  44. BITPLANES!
  45.  
  46.      Moving onto LOW res, and again starting with the pixels:
  47.  
  48.                     P1 > P16;   P17 > P32;   and so on...
  49.  
  50.      For  this  case each pixel needs 4 bits(B),  namely a >  d,  and  thus  4 
  51. bitplanes are needed as follows:
  52.  
  53.                                  All  make  up  P16
  54.                     +-------------+-------------+-------------+
  55.                     |             |             |             |
  56.              B1a > B16a;   B1b > B16b;   B1c > B16c;   B1d > B16d;
  57.             B17a > B32a;  B17b > B32b;  B17c > B32c;  B17d > B32d;  ...
  58.             ~~~~~~~~~~~   ~~~~~~~~~~~   ~~~~~~~~~~~   ~~~~~~~~~~~
  59.               Plane 1       Plane 2       Plane 3       Plane 4
  60.  
  61.  
  62.      In MONO,  as there is only 1 bitplane (i.e. 1 bit/pixel), coding is a lot 
  63. less complex as 'P1>P16; P17>P32' is simply represented by 'B1>B16; B17>B32'.
  64.  
  65.  
  66. ---END---
  67.  
  68.