LastRect clarification needed.

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

LastRect clarification needed.

Peter Rosin
Hi list,

I'm curious about this wording in trunk/doc/rfbtight.tex:

> LastRect pseudo-encoding is special -- it does not include
> x-position, y-position, width and height fields, and is not
> followed by any other data as well. Only 4 bytes is sent in
> LastRect, while other encodings and pseudo-encodings normally
> send 12 bytes as a rectangle header.

How is that possible, when the omitted fields are sent prior
to the encoding-type?

Cheers,
Peter

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___________________________________________________________
TightVNC mailing list, [hidden email]
To change your subscription or to UNSUBSCRIBE, please visit
https://lists.sourceforge.net/lists/listinfo/vnc-tight-list
Reply | Threaded
Open this post in threaded view
|

Re: LastRect clarification needed.

Constantin Kaplinsky
Hello Peter,

>>>>> Peter Rosin wrote:

> I'm curious about this wording in trunk/doc/rfbtight.tex:
>
>> LastRect pseudo-encoding is special -- it does not include
>> x-position, y-position, width and height fields, and is not
>> followed by any other data as well. Only 4 bytes is sent in
>> LastRect, while other encodings and pseudo-encodings normally
>> send 12 bytes as a rectangle header.
>
> How is that possible, when the omitted fields are sent prior
> to the encoding-type?

Oops, the description is incorrect. I've just replaced the paragraph
with the following:

  The fields x-position, y-position}, width and height are not used and
  should be filled with zero values.

I do not remember what caused me to write that way. Thank you for
pointing me to the problem.

A side note: the documentation in rfbtight.tex is far from being
finished. Most importantly, the documentation on file transfers is
incomplete and certain message formats may be (will be!) changed.

--
With Best Wishes,
Constantin



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___________________________________________________________
TightVNC mailing list, [hidden email]
To change your subscription or to UNSUBSCRIBE, please visit
https://lists.sourceforge.net/lists/listinfo/vnc-tight-list
Reply | Threaded
Open this post in threaded view
|

Re: LastRect clarification needed.

Peter Rosin
Hi Constantin,

On Mon, Jan 14, 2008 at 05:23:23PM +0600, Constantin Kaplinsky wrote:
> >>>>> Peter Rosin wrote:
> > How is that possible, when the omitted fields are sent prior
> > to the encoding-type?
>
> Oops, the description is incorrect. I've just replaced the paragraph
> with the following:
>
>   The fields x-position, y-position}, width and height are not used and
>   should be filled with zero values.

Cool, that's straight forward, and also what I had implemented before
reading the docs :-)

> I do not remember what caused me to write that way. Thank you for
> pointing me to the problem.

No problem, you're welcome.

On a tangent, I have tried - but failed - to make tight-vnc servers
issue a LastRect pseudo-rectangle. Is there anything special I need
to do to get one? (i.e. besides adding -224 to the SetEncodings
message)

The tight-vnc server versions I have tried are 1.2.9 and
1.3.9 on Windows

(I don't expect any problems, it works between my server and client
 and also when tight-vnc acts as client to my server, and LastRect
 is easy enough. But it would be nice to test the last combination
 as well...)

> side note: the documentation in rfbtight.tex is far from being
> finished. Most importantly, the documentation on file transfers is
> incomplete and certain message formats may be (will be!) changed.

Understood, I'll keep that in mind. But I think it is a valuable
resource, please try to keep it up to date!

Cheers,
Peter

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___________________________________________________________
TightVNC mailing list, [hidden email]
To change your subscription or to UNSUBSCRIBE, please visit
https://lists.sourceforge.net/lists/listinfo/vnc-tight-list
Reply | Threaded
Open this post in threaded view
|

Re: LastRect clarification needed.

Constantin Kaplinsky
Hello Peter,

>>>>> Peter Rosin wrote:

> On a tangent, I have tried - but failed - to make tight-vnc servers
> issue a LastRect pseudo-rectangle. Is there anything special I need
> to do to get one? (i.e. besides adding -224 to the SetEncodings
> message)

Most importantly, LastRect is used only with Tight encoding enabled.
Otherwise, it does not make much sense since the number of rectangles
can be easily computed from the list of changed rectangles.

> Understood, I'll keep that in mind. But I think it is a valuable
> resource, please try to keep it up to date!

My plans have an item to finish this piece of documentation.

--
With Best Wishes,
Constantin

P.S. I think it might be a good idea to discuss development-related
     issues in the devel mailing list:

                  http://www.tightvnc.com/lists.html


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___________________________________________________________
TightVNC mailing list, [hidden email]
To change your subscription or to UNSUBSCRIBE, please visit
https://lists.sourceforge.net/lists/listinfo/vnc-tight-list
Reply | Threaded
Open this post in threaded view
|

Re: LastRect clarification needed.

Peter Rosin
On Mon, Jan 14, 2008 at 08:00:35PM +0600, Constantin Kaplinsky wrote:
> Most importantly, LastRect is used only with Tight encoding enabled.
> Otherwise, it does not make much sense since the number of rectangles
> can be easily computed from the list of changed rectangles.

Ok, only requesting LastRect, Tight, a Tight quality and a Tight
compression, I do get many updates encoded with Tight and with rect-
counts of close to 100 (and some even above that), but still no
LastRect.

Do you know of any other thing that influenses this?

Cheers,
Peter

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___________________________________________________________
TightVNC mailing list, [hidden email]
To change your subscription or to UNSUBSCRIBE, please visit
https://lists.sourceforge.net/lists/listinfo/vnc-tight-list
Reply | Threaded
Open this post in threaded view
|

Re: LastRect clarification needed.

Constantin Kaplinsky
Peter,

>>>>> Peter Rosin wrote:

> Ok, only requesting LastRect, Tight, a Tight quality and a Tight
> compression, I do get many updates encoded with Tight and with rect-
> counts of close to 100 (and some even above that), but still no
> LastRect.
>
> Do you know of any other thing that influenses this?

There are many factors. LastRect is used when the exact number of
rectangles is not known in advance. This happens when rectangles of the
changed region are big enough (e.g. full screen) so that they will be
split by the Tight encoder. Compression levels also affect the
probability of using LastRect, as they limit the maximum Tight rectangle
size allowed etc.

Actually, I think TightVNC Server 1.3.9 should emit LastRect often
enough, so it's strange that you have not caught it yet.

--
With Best Wishes,
Constantin


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___________________________________________________________
TightVNC mailing list, [hidden email]
To change your subscription or to UNSUBSCRIBE, please visit
https://lists.sourceforge.net/lists/listinfo/vnc-tight-list
Reply | Threaded
Open this post in threaded view
|

Re: LastRect clarification needed.

Peter Rosin
On Mon, Jan 14, 2008 at 09:19:03PM +0600, Constantin Kaplinsky wrote:

> >>>>> Peter Rosin wrote:
>
> > Ok, only requesting LastRect, Tight, a Tight quality and a Tight
> > compression, I do get many updates encoded with Tight and with rect-
> > counts of close to 100 (and some even above that), but still no
> > LastRect.
> >
> > Do you know of any other thing that influenses this?
>
> There are many factors. LastRect is used when the exact number of
> rectangles is not known in advance. This happens when rectangles of the
> changed region are big enough (e.g. full screen) so that they will be
> split by the Tight encoder. Compression levels also affect the
> probability of using LastRect, as they limit the maximum Tight rectangle
> size allowed etc.
>
> Actually, I think TightVNC Server 1.3.9 should emit LastRect often
> enough, so it's strange that you have not caught it yet.

Ok, I managed to get one. It seems that LastRect (-224) has to come
after Tight (7) in the SetEncodings message for it to be recognized.

Cheers,
Peter

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___________________________________________________________
TightVNC mailing list, [hidden email]
To change your subscription or to UNSUBSCRIBE, please visit
https://lists.sourceforge.net/lists/listinfo/vnc-tight-list
Reply | Threaded
Open this post in threaded view
|

Re: LastRect clarification needed.

Constantin Kaplinsky
Hello Peter,

>>>>> Peter Rosin wrote:

>> Actually, I think TightVNC Server 1.3.9 should emit LastRect often
>> enough, so it's strange that you have not caught it yet.
>
> Ok, I managed to get one. It seems that LastRect (-224) has to come
> after Tight (7) in the SetEncodings message for it to be recognized.

No, the order should not make any difference in this case.

--
With Best Wishes,
Constantin


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___________________________________________________________
TightVNC mailing list, [hidden email]
To change your subscription or to UNSUBSCRIBE, please visit
https://lists.sourceforge.net/lists/listinfo/vnc-tight-list
Reply | Threaded
Open this post in threaded view
|

Re: LastRect clarification needed.

Peter Rosin
Hello Constantin,

On Tue, Jan 15, 2008 at 07:51:18PM +0600, Constantin Kaplinsky wrote:
> >>>>> Peter Rosin wrote:
> > Ok, I managed to get one. It seems that LastRect (-224) has to come
> > after Tight (7) in the SetEncodings message for it to be recognized.
>
> No, the order should not make any difference in this case.

If the order shouldn't make a difference, you seem to have a problem
with your code. Check out these TCP dumps:

Requesting Tight _before_ LastRect (working):
S->C  52 46 42 20 30 30 33 2e 30 30 33 0a              ; RFB 003.003\n
C->S  52 46 42 20 30 30 33 2e 30 30 33 0a              ; RFB 003.003\n
S->C  00 00 00 01                                      ; No security
C->S  01                                               ; CI Shared
S->C  05 00 04 00 10 10 00 01 00 1f 00 3f 00 1f 0b 05  ; SI 1280x1024 r5g6b5
S->C  00 3b 74 3b 00 00 00 08 73 69 6c 75 72 2d 70 63  ; "silur-pc"
C->S  00 00 00 00 10 10 00 01 00 1f 00 3f 00 1f 0b 05  ; SPF r5g6b5
C->S  00 00 00 00                                      ;
C->S  02 00 00 04 00 00 00 07 ff ff ff 20 ff ff ff e5  ; SE 7,-224,-27
C->S  ff ff ff 01                                      ; -255
C->S  03 00 00 00 00 00 05 00 04 00                    ; FBUR 1280x1024 !incr
S->C  00 e9 ff ff...                                   ; FBU /w LastRect (good)

Requesting Tight _after_ LastRect (not working):
S->C  52 46 42 20 30 30 33 2e 30 30 33 0a              ; RFB 003.003\n
C->S  52 46 42 20 30 30 33 2e 30 30 33 0a              ; RFB 003.003\n
S->C  00 00 00 01                                      ; No security
C->S  01                                               ; CI Shared
S->C  05 00 04 00 10 10 00 01 00 1f 00 3f 00 1f 0b 05  ; SI 1280x1024 r5g6b5
S->C  00 3b 74 3b 00 00 00 08 73 69 6c 75 72 2d 70 63  ; "silur-pc"
C->S  00 00 00 00 10 10 00 01 00 1f 00 3f 00 1f 0b 05  ; SPF r5g6b5
C->S  00 00 00 00                                      ;
C->S  02 00 00 04 ff ff ff 20 00 00 00 07 ff ff ff e5  ; SE -224,7,-27
C->S  ff ff ff 01                                      ; -255
C->S  03 00 00 00 00 00 05 00 04 00                    ; FBUR 1280x1024 !incr
S->C  00 e9 02 80                                      ; FBU /w 640 rects (bad)

This is against 1.2.9 on Windows, but 1.3.9 (also Windows) seems to
behave the same (but I haven't actually made the TCP dump there, I have
only inspected the debug output of my viewer).

Granted, this only shows the first update, but given that the rate of
LastRect instances is quite high in the former case and doesn't seem
to appear at all in the latter, I'm think there is only one conclusion
to make:
Requests for LastRect doesn't have any effekt when Tight is requested
_after_ LastRect.

Cheers,
Peter

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
___________________________________________________________
TightVNC mailing list, [hidden email]
To change your subscription or to UNSUBSCRIBE, please visit
https://lists.sourceforge.net/lists/listinfo/vnc-tight-list
Reply | Threaded
Open this post in threaded view
|

Re: LastRect clarification needed.

Constantin Kaplinsky
Hello Peter,

>>>>> Peter Rosin wrote:

> If the order shouldn't make a difference, you seem to have a problem
> with your code. Check out these TCP dumps:

I will reply a bit later (after some checking) in the TightVNC _Devel_
mailing list.

--
With Best Wishes,
Constantin

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
___________________________________________________________
TightVNC mailing list, [hidden email]
To change your subscription or to UNSUBSCRIBE, please visit
https://lists.sourceforge.net/lists/listinfo/vnc-tight-list