qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1 of 3] [UPDATE] vnc dynamic resolution
Date: Mon, 08 Sep 2008 09:25:38 -0500	[thread overview]
Message-ID: <48C535E2.9040703@codemonkey.ws> (raw)
In-Reply-To: <48C5310E.5090506@eu.citrix.com>

Stefano Stabellini wrote:
> Anthony Liguori wrote:
>   
>> "Red-max is the maximum red value (= 2n − 1 where n is the number of
>> bits used for red)."
>>
>> Is this just overzealous checks or was a fix for a broken client?
>>     
>
>
> This code is meant to convert pixels from the vnc server internal pixel
> format to the vnc client pixel format.
> red_max refers to the vnc client red max, while red_max1 refers to the
> vnc server internal red max.
> Before we were just handling the case red_max1 = 0xff, this code should
> be able to handle other cases as well (necessary for handling the shared
> buffer).
> Does this answer your question? May be with the assumption that red_max
> = 2^n - 1 is still possible to simplify the conversion code...
>   

Perhaps the source of my confusion is the use of red_max and red_max1.  
Could you try some more descriptive names?  I understand what the code 
is doing now but it's very easy to confuse the two masks.

Regards,

Anthony Liguori

  reply	other threads:[~2008-09-08 14:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-04 14:26 [Qemu-devel] [PATCH 1 of 3] [UPDATE] vnc dynamic resolution Stefano Stabellini
2008-09-08  0:42 ` Anthony Liguori
2008-09-08 14:05   ` Stefano Stabellini
2008-09-08 14:25     ` Anthony Liguori [this message]
2008-09-08 14:32       ` Stefano Stabellini
2008-09-08 14:32         ` Anthony Liguori

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=48C535E2.9040703@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    /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).