From: "Leonardo E. Reiter" <lreiter@win4lin.com>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Updated BGR vs. RGB vga patch...
Date: Mon, 10 Apr 2006 12:41:31 -0400 [thread overview]
Message-ID: <443A8ABB.9010409@win4lin.com> (raw)
In-Reply-To: <200604101735.39032.paul@codesourcery.com>
You can definitely figure it out by asking the X server or SDL. I don't
know enough SDL to have hacked it in myself. X is pretty simple on the
other hand.
As for where to add it, I agree that the low level conversions are not a
great place to add this. I didn't originate the patch, I just updated
it. Unfortunately none of the VGA is optimized - everything happens
pixel by pixel already. Adding what probably amounts to 2 instructions
(probably a couple of clock cycles) per pixel doesn't seem to do
anything for performance really. The VGA is already slow.
Unfortunately X11 will not allow you to force a certain color order in
24-bit mode. You can tell it to force byte-order but this only affects
16-bit blits - it's ignored for 24-bit since the individual components
of the 24-bit blits, even if packed into 32-bits, are still 8-bits long.
That's what the color masks are for. There is no efficient way to do
this at the server level that I can see. If you find a better way
(within the current scope of the VGA architecture), I'd be glad to try
to implement it. I was just sharing something that was useful to me.
Thanks,
Leo Reiter
Paul Brook wrote:
> On Monday 10 April 2006 17:25, Leonardo E. Reiter wrote:
>
>>Hello,
>>
>>attached is an updated version (against today's CVS) of a patch to
>>enable B/G/R color encoding rather than R/G/B with the command-line
>>option -bgr. I found the original here (post by Martin Bochnig):
>
>
> Shouldn't we be able to figure this out by asking SDL and/or the X server?
> Also, adding an if to the low-level conversion routines seems a bad idea for
> performance.
>
> Paul
--
Leonardo E. Reiter
Vice President of Product Development, CTO
Win4Lin, Inc.
Virtual Computing from Desktop to Data Center
Main: +1 512 339 7979
Fax: +1 512 532 6501
http://www.win4lin.com
next prev parent reply other threads:[~2006-04-10 16:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-10 16:25 [Qemu-devel] Updated BGR vs. RGB vga patch Leonardo E. Reiter
2006-04-10 16:35 ` Paul Brook
2006-04-10 16:41 ` Leonardo E. Reiter [this message]
2006-04-10 16:46 ` Paul Brook
2006-04-10 16:48 ` Leonardo E. Reiter
2006-04-10 16:44 ` Leonardo E. Reiter
2006-04-10 16:49 ` Paul Brook
2006-04-10 16:51 ` Leonardo E. Reiter
2006-04-10 16:59 ` Paul Brook
2006-04-10 18:24 ` Leonardo E. Reiter
2006-04-10 19:08 ` malc
2006-04-10 19:11 ` Leonardo E. Reiter
2006-04-11 17:06 ` Leonardo E. Reiter
2006-04-11 17:11 ` Leonardo E. Reiter
2006-04-10 18:25 ` Leonardo E. Reiter
2006-04-10 23:12 ` Thiemo Seufer
2006-04-10 23:22 ` Leonardo E. Reiter
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=443A8ABB.9010409@win4lin.com \
--to=lreiter@win4lin.com \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.