linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antonino Daplas <adaplas@pol.net>
To: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	James Simmons <jsimmons@infradead.org>,
	Linux Frame Buffer Device Development
	<linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: fb_imageblit semantic
Date: 17 Mar 2003 21:02:12 +0800	[thread overview]
Message-ID: <1047906079.2684.53.camel@localhost.localdomain> (raw)
In-Reply-To: <1304562C67A8@vcnet.vc.cvut.cz>

On Mon, 2003-03-17 at 20:25, Petr Vandrovec wrote:
> On 17 Mar 03 at 13:18, Geert Uytterhoeven wrote:
> > 
> > That depends... How do we draw the monochrome penguin? Using image->depth is 1
> > or 8? The latter (current method) is slower, since we need to expand the
> > monochrome logo to 8-bit first, and (usually) compress it to 1-bit in the fbdev
> > driver afterwards.
> 
> As far as I can see, it gets monochromatic logo and converts it to
> 8bpp format ;-) (fb_set_logo, needs_logo = 1 or ~1) And then imageblit
> converts it back to 1bpp.
>  

Yes.  That's the sacrifice for simplicity and consistency, low color
depths sacrifice on speed, high color depth sacrifice on color range. 
The real beneficiary is 8-bit pseudo-pixel.

Of course, there's always a choice:

1.  allow support for non-monochrome expansion/reduction in
cfb_imageblit(), ie input data is 4bpp and framebuffer format is 16 bpp,
directcolor.

2.  prepare all logo so image->depth matches framebuffer depth.  This
will require  that fb_prepare_logo() has additional code to pack
image->data properly

3.  Just add conditionals like:

if depth == 1
	logo->data == logo_bw
else if depth == 4
	logo->data == logo_4
else if depth == 8
	logo->data == logo_8
else
	prepare_logo_to_match_fb_depth

For #2 and #3, what do we do when var->bits_per_pixel > 8?  Do we still
use image->depth=8? Do we still use the LUT?  

4.  Go back to the 2.4 way of drawing the logo, let the upper layer do
everything, and just directly memcopy the data to the framebuffer.

> > And perhaps we may want to draw 32-bit ARGB images later?
> > 
> > So I see the following possible valid values for image->depth:
> >   - 8 (logo with up to 256 colors and LUT)
> >   - optional 1 (monochrome logo, if we don't want to expand?)
> >   - optional 32 (ARGB image, dithering left to the driver?)
> 
> I still do not understand 'if we don't want to expand'. This forces too
> much knowledge on upper layer, as far as I can tell.

I agree.

Tony




-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en

  parent reply	other threads:[~2003-03-17 13:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-17 12:25 fb_imageblit semantic Petr Vandrovec
2003-03-17 12:40 ` Geert Uytterhoeven
2003-03-17 13:02 ` Antonino Daplas [this message]
2003-03-17 13:47   ` Geert Uytterhoeven
2003-03-17 14:24     ` Antonino Daplas
2003-03-17 14:46       ` Geert Uytterhoeven
2003-03-18 21:46       ` Detecting if the mode can be changed? Kendall Bennett
2003-03-18 23:50         ` Enumerating available display modes? Kendall Bennett
  -- strict thread matches above, loose matches on Subject: below --
2003-03-17 10:40 fb_imageblit semantic Petr Vandrovec
2003-03-17 12:07 ` Antonino Daplas
2003-03-17 12:18   ` Geert Uytterhoeven
2003-03-17 13:01     ` Antonino Daplas
2003-03-14 10:52 Petr Vandrovec
2003-03-16 23:00 ` Antonino Daplas
2003-03-17 10:31   ` Geert Uytterhoeven
2003-03-14 10:18 Petr Vandrovec
2003-03-14 10:40 ` Geert Uytterhoeven
2003-02-20  1:09 FBdev updates James Simmons
2003-02-20 15:02 ` Dave Jones
2003-02-20 18:29   ` Petr Vandrovec
2003-02-21  0:24     ` Antonino Daplas
2003-03-03 20:35       ` [Linux-fbdev-devel] " Petr Vandrovec
2003-03-04 21:29         ` Jurriaan
2003-03-09 21:29           ` Petr Vandrovec
2003-03-09 22:27             ` Antonino Daplas
2003-03-09 22:54               ` Petr Vandrovec
2003-03-13 22:23                 ` fb_imageblit semantic Petr Vandrovec
2003-03-14  9:22                   ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1047906079.2684.53.camel@localhost.localdomain \
    --to=adaplas@pol.net \
    --cc=geert@linux-m68k.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=vandrove@vc.cvut.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).