Message ID | 1275657527-26032-3-git-send-email-corentincj@iksaif.net |
---|---|
State | New |
Headers | show |
On 04.06.2010, at 15:18, Corentin Chary wrote: > Disable JPEG compression by default and only enable it if the > VNC client has sent the requested quality. > > Signed-off-by: Corentin Chary <corentincj@iksaif.net> > --- > vnc.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/vnc.c b/vnc.c > index ed0e096..9cf38d1 100644 > --- a/vnc.c > +++ b/vnc.c > @@ -1644,7 +1644,7 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) > vs->features = 0; > vs->vnc_encoding = 0; > vs->tight_compression = 9; > - vs->tight_quality = 9; > + vs->tight_quality = -1; /* Lossless by default */ So what's the threshold? When do you start to be lossy? Alex
On 06/04/2010 08:16 AM, Alexander Graf wrote: > On 04.06.2010, at 15:18, Corentin Chary wrote: > > >> Disable JPEG compression by default and only enable it if the >> VNC client has sent the requested quality. >> >> Signed-off-by: Corentin Chary<corentincj@iksaif.net> >> --- >> vnc.c | 2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/vnc.c b/vnc.c >> index ed0e096..9cf38d1 100644 >> --- a/vnc.c >> +++ b/vnc.c >> @@ -1644,7 +1644,7 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) >> vs->features = 0; >> vs->vnc_encoding = 0; >> vs->tight_compression = 9; >> - vs->tight_quality = 9; >> + vs->tight_quality = -1; /* Lossless by default */ >> > So what's the threshold? When do you start to be lossy? > When the client explicitly requests it. Regards, Anthony Liguori > Alex > >
On 04.06.2010, at 15:19, Anthony Liguori wrote: > On 06/04/2010 08:16 AM, Alexander Graf wrote: >> On 04.06.2010, at 15:18, Corentin Chary wrote: >> >> >>> Disable JPEG compression by default and only enable it if the >>> VNC client has sent the requested quality. >>> >>> Signed-off-by: Corentin Chary<corentincj@iksaif.net> >>> --- >>> vnc.c | 2 +- >>> 1 files changed, 1 insertions(+), 1 deletions(-) >>> >>> diff --git a/vnc.c b/vnc.c >>> index ed0e096..9cf38d1 100644 >>> --- a/vnc.c >>> +++ b/vnc.c >>> @@ -1644,7 +1644,7 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) >>> vs->features = 0; >>> vs->vnc_encoding = 0; >>> vs->tight_compression = 9; >>> - vs->tight_quality = 9; >>> + vs->tight_quality = -1; /* Lossless by default */ >>> >> So what's the threshold? When do you start to be lossy? >> > > When the client explicitly requests it. The tight quality level is a slider on most clients. A user doesn't know when it starts being lossy. He also can only choose 0 as the lowest (iirc). And IIRC the X tightvnc client also always sent the quality level. Alex
> > The tight quality level is a slider on most clients. A user doesn't know when it starts being lossy. He also can only choose 0 as the lowest (iirc). And IIRC the X tightvnc client also always sent the quality level. > > Alex > > You can use -nojpeg for that. Most vnc clients have this options.
On 04.06.2010, at 15:48, Corentin Chary wrote: >> >> The tight quality level is a slider on most clients. A user doesn't know when it starts being lossy. He also can only choose 0 as the lowest (iirc). And IIRC the X tightvnc client also always sent the quality level. >> >> Alex >> >> > > You can use -nojpeg for that. Most vnc clients have this options. Phew - I didn't even know of that option until now. I guess that's a bad sign? :) One way I thought of it was to start being lossy as of quality level 6 or so. That way people who accidently enable jpeg still know "high quality means lossless". I'm not sure Anthony agrees on this though. Alex
> Phew - I didn't even know of that option until now. I guess that's a bad sign? :) > > One way I thought of it was to start being lossy as of quality level 6 or so. That way people who accidently enable jpeg still know "high quality means lossless". I'm not sure Anthony agrees on this though. > > Alex > > If client set a quality it means that we are allowed to send something lossy. If you don't want this behavior, you can add the lossless (or lossy) parameter :).
diff --git a/vnc.c b/vnc.c index ed0e096..9cf38d1 100644 --- a/vnc.c +++ b/vnc.c @@ -1644,7 +1644,7 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) vs->features = 0; vs->vnc_encoding = 0; vs->tight_compression = 9; - vs->tight_quality = 9; + vs->tight_quality = -1; /* Lossless by default */ vs->absolute = -1; /*
Disable JPEG compression by default and only enable it if the VNC client has sent the requested quality. Signed-off-by: Corentin Chary <corentincj@iksaif.net> --- vnc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)