1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

G400 Max: 24 bit vs 32 bit color?

Discussion in 'Matrox' started by Curly, Feb 12, 2004.

  1. Curly

    Curly Guest

    What's the difference between these 2 modes? I can't tell much difference in
    terms of pic quality and speed.
     
    Curly, Feb 12, 2004
    #1
    1. Advertisements

  2. Curly

    Rick Guest

    32-bit color is simply 24-bit color with an added 8-bit alpha
    channel. This alpha channel is for transparency, and also used
    for an 8-bit grayscale mask, which is for icon or cursor
    shadows, animations etc.

    Rick
     
    Rick, Feb 12, 2004
    #2
    1. Advertisements

  3. Curly

    Arthur Hagen Guest

    The main purpose of 32-bit colour is really to pad out the pixels so they
    take up one longword. This allows much faster indexing of a pixel, speeding
    up graphics at the expense of RAM used.

    As an example, to get the RGB values for a given pixel in m68k code in 24
    and 32 bit modes (can be coded much more effectively, but it gives an idea
    of the difference in complexity):

    24-bit mode 32-bit mode
    ; a0 = Address of display buffer in a0
    ; d0 = Pixel number
    ; d1 = return value, in 00RRGGBB format
    move.l d0,-(sp) move.l (a0,d0.l*4),d1
    move.l d0,d1 andi.l #FFFFFF,d1
    add.l d1,d0 rts
    add.l d1,d0
    moveq #0,d1
    move.b (a0,d0.l),d1
    lsl.w #8,d1
    add.b 1(a0,d0.l),d1
    lsl.w #8,d1
    add.b 2(a0,d0.l),d1
    move.l (sp)+,d0
    rts


    Regards,
     
    Arthur Hagen, Feb 12, 2004
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.