VNC-Server has very bad quality

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • VNC-Server has very bad quality

      Hi to all,

      we use emWin 5.50.

      When we tried the VNC-Server we found out that the screen on the PC is definitely not a true copy of the LCD on the target.
      There are false colors and lots of litter on the screen.
      Attached you see the pics of original and remote display.

      Any help would be much appreciated

      • Original.jpg

        82.62 kB, 640×480, viewed 110 times
      • Remote on PC.jpg

        94.34 kB, 640×480, viewed 114 times
    • Hi Andy,

      I suppose that the read function set for the GUIDRV_FlexColor is not working properly.

      You could check this by filling the screen with a color and read it back with GUI_GetPixelIndex().

      For example, fill the screen with GUI_RED and read back the first pixel at 0|0. GUI_GetPixelIndex() should return 0xF800 (with GUICC_M565).

      Another solution might be to use a cached version of the driver. This way it doesn't need to read from the LCD controller but reads the pixel data from the cache. Of course, this would require some RAM (320x240x2 + some additional bytes). Since you have set ~800KB for emWin (in GUIConf.c) this should work.

      Simply call

      GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66720, GUIDRV_FLEXCOLOR_M16C1B16);

      instead of

      GUIDRV_FlexColor_SetFunc(pDevice, &PortAPI, GUIDRV_FLEXCOLOR_F66720, GUIDRV_FLEXCOLOR_M16C0B16);

      in LCDConf.c.

      Last thing you could try is to set a custom bunch of read functions by using LCD_SetDevFunc() and the commands LCD_DEVFUNC_READMPIXELS and LCD_DEVFUNC_READPIXEL. Please refer to the manual for more information on this.

      Attached is an example configuration for the GUIDRV_FlexColor driver which makes use of LCD_SetDevFunc(). It is for a different controller but should work as some sort of template.


        (2.46 kB, downloaded 81 times, last: )
    • Hi,

      Good to know that it is working with the cache enabled.

      Not sure about the differences in regards of reading. With the cach enabled emWin does not need to read from the LCD controller, but reads from the cache instead. I suppose that something like the byte order of the hardware reading routines is not correct.

      Enabling the cache will speed up the drawing process in most cases, too. First the data will be send only once and in one large block to the LCD controller. emWin will send only the smallest possible rectangle in which data has changed. Second, when it comes to reading back pixel data it is way faster to read from internal memory. Reading is required for mixing pixel colors (fore- and background) or sending data via VNC.