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