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

Anthony Liguori wrote:

> 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.
> 

I understand.
I went with red_max1 because we were already using this "notation" with
red_shift and red_shift1.
How do you suggest I should call them?

  reply	other threads:[~2008-09-08 14:31 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
2008-09-08 14:32       ` Stefano Stabellini [this message]
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=48C5378D.1010502@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=anthony@codemonkey.ws \
    --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 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).