qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1 of 3] [UPDATE] vnc dynamic resolution


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 1 of 3] [UPDATE] vnc dynamic resolution
Date: Mon, 08 Sep 2008 09:25:38 -0500
User-agent: Thunderbird 2.0.0.16 (X11/20080723)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]