nanogui: Thread: Unsupported bpp: 4


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Unsupported bpp: 4
From: Steven Scholz ####@####.####
Date: 22 Jul 2004 12:48:06 +0100
Message-Id: <40FFA972.4070301@imc-berlin.de>

Hi there,

I had FLTK running with microwindows-0.9 and nxlib-0.45 using linux 
framebuffer with 16bpp on a color TFT.

Now I want to use a 4bpp Grayscale FSTN display.

But when starting my (FLTK) application I get

Unsupported bpp: 4

Why is that in nxlib:

         if (sinfo.bpp < 8) {
                 fprintf(stderr, "nx11: Unsupported bpp: %d\n", sinfo.bpp);
                 GrClose();
                 return NULL;
         }

???

And has this anything to do with setting

GRAYPALETTE              = Y

in my microwindows config?

BTW: I have set "SCREEN_PIXTYPE = MWPF_TRUECOLOR0888" just as the comment 
suggests for using frame buffer..


Thanks!

--
Steven Scholz

Subject: Re: [nanogui] Unsupported bpp: 4
From: "Greg Haerr" ####@####.####
Date: 22 Jul 2004 16:07:49 +0100
Message-Id: <001601c46ffd$97a1f840$3aba46a6@xmission.com>

: Why is that in nxlib:
: 
:          if (sinfo.bpp < 8) {
:                  fprintf(stderr, "nx11: Unsupported bpp: %d\n", sinfo.bpp);
:                  GrClose();
:                  return NULL;
:          }

I put this in because none of the NXLIB image routines handle
4bpp at this time.  This means that 4bpp pixmaps won't get displayed.
There may be some other issues as well, some coding can
solve this problem.

: GRAYPALETTE              = Y

Try removing this for the time being.  This sets a gray palette for palette
mode displays only.

: BTW: I have set "SCREEN_PIXTYPE = MWPF_TRUECOLOR0888" just as the comment 
: suggests for using frame buffer..

You can't set this if your display is actually 4bpp. Is it 16bpp or 4bpp?
The 4bpp display will have to run in palette mode, not truecolor, as the
line above specifies.

Regards,

Greg

Subject: Re: [nanogui] Unsupported bpp: 4
From: Steven Scholz ####@####.####
Date: 22 Jul 2004 16:19:34 +0100
Message-Id: <40FFDAFB.7070807@imc-berlin.de>

Greg Haerr wrote:

> : BTW: I have set "SCREEN_PIXTYPE = MWPF_TRUECOLOR0888" just as the comment 
> : suggests for using frame buffer..
> 
> You can't set this if your display is actually 4bpp. Is it 16bpp or 4bpp?
> The 4bpp display will have to run in palette mode, not truecolor, as the
> line above specifies.

mircowindows config file read

####################################################################
#
# The pixeltype of the native hardware or underlying graphics library.
# This definition defines the PIXELVAL to be 32, 16 or 8 bits wide.
# If using Linux framebuffer, set to MWPF_TRUECOLOR0888, and use fbset.
# It also enables GdArea/GrArea for this particular pixel packing format.
# ...

That' why I set SCREEN_PIXTYPE = MWPF_TRUECOLOR0888... !?!?

I have a B/W display. But "The LCD Controller generates 16 gray levels. 
These gray levels are defined by 4 bits of display data for each pixel... 
The shades of gray are obtained by controlling the number of frames in which 
the pixel is "on" over a period of 16 frames. This method is known as Frame 
Rate Control (FRC)."

So I have a linux framebuffer device. And 4 bit per pixel.

-- 
Steven Scholz
Subject: Re: [nanogui] Unsupported bpp: 4
From: Steven Scholz ####@####.####
Date: 23 Jul 2004 13:16:43 +0100
Message-Id: <410101A5.5050604@imc-berlin.de>

Greg,


> Greg Haerr wrote:
> 
>> : BTW: I have set "SCREEN_PIXTYPE = MWPF_TRUECOLOR0888" just as the 
>> comment : suggests for using frame buffer..
>>
>> You can't set this if your display is actually 4bpp. Is it 16bpp or 4bpp?
>> The 4bpp display will have to run in palette mode, not truecolor, as the
>> line above specifies.

Did I misunderstood the line

> # If using Linux framebuffer, set to MWPF_TRUECOLOR0888, and use fbset.

???

How do I have to set SCREEN_PIXTYPE when I am using linux frame buffer and 
have an 4bpp grayscale display?

Thanks!

-- 
Steven Scholz
Subject: Re: [nanogui] Unsupported bpp: 4
From: "Greg Haerr" ####@####.####
Date: 23 Jul 2004 18:51:55 +0100
Message-Id: <1c4e01c470de$2b2cbf60$0300a8c0@RDP>

: How do I have to set SCREEN_PIXTYPE when I am using linux frame buffer and
: have an 4bpp grayscale display?

SCREEN_PIXTYPE=MWPF_PALETTE

In palette mode, colors are palette indices.  8bpp or 4bpp
they're still indices, 4bpp is 0-15, 8bpp is 0-255.  The
indices are reverse-looked up in the engine/devpalX.c
tables from the application-specified RGB colors.  The
index is then sent to the linked in drivers/fblin{4,8}.c driver.

Regards,

Greg


[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.