It probably needs to be w * sizeof(PIXEL_T), but I'd feel better if
someone could test it, as apparently whatever I'm doing isn't invoking
the copy filter (not sure how that filter is ever invoked, because I'm
exercising all of the others by running various programs in the Xvnc
session, moving windows around, etc.)  If you have a reliable way of
testing the Copy filter, then you should be able to invoke the code
below by running vncviewer on an X server with a depth of 16.


On 11/9/11 3:23 AM, matthieu.lochegn...@altissemiconductor.com wrote:
> 
> DRC <dcomman...@users.sourceforge.net> wrote on 08/11/2011 19:37:33:
> 
>> Odd that valgrind didn't trap it.  Perhaps the low-level datasets aren't
>> ever exercising the Tight Copy filter.
> 
> Hi,
> 
> are you confident with the few lines for the Tight Copy filter, below
> Pierre's fix?
> 
> Those were changed this way by commit 4763 :
> 
>          while (h > 0) {
> -          input->readBytes(ptr, rowSize);
> +          memcpy(ptr, srcPtr, rowSize * sizeof(PIXEL_T));
>           ptr += stride;
> +          srcPtr += w * sizeof(PIXEL_T);
>           h--;
>         }
> 
> I guess the new version does not copy the same number of bytes except in
> 8bpp.
> 
> Maybe this could be written :
>          while (h > 0) {
>            memcpy(ptr, srcPtr, w * sizeof(PIXEL_T));
>            ptr += stride;
>            srcPtr += w * sizeof(PIXEL_T);
>            h--;
>          }
> 
> or :
>          while (h > 0) {
>            memcpy(ptr, srcPtr, rowSize);
>            ptr += stride;
>            srcPtr += rowSize;
>            h--;
>          }
> 
> 
> -- 
> Matthieu Lochegnies
> Altis Semiconductor - http://www.altissemiconductor.com/
> 
> 
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> 
> 
> 
> _______________________________________________
> Tigervnc-devel mailing list
> Tigervnc-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to