2008-02-26 09:57:39 SDL in Hitachi TFT
Miquel Soler i Mir (SPAIN)
Message: 51661 Hello.
I'm using the TFT hitachi from bluetechnix with a CM-BF537E as a core.
I'm using SDL to send picture to the TFT. The system seems to work fine. But there are some with the color.
The same problem was happen when I was using jpegview or pngview. I solve this problem changing the RGB conversion with this code in jpegview and pngviewe source code.
//#define RGB(r,g,b) (((b&0x1f)<<11)|((g&0x3f)<<5)|(r&0x1f))
//#define RGB(r,g,b) ~((((b&0xf8)<<8)|((g&0xfc)<<3)|(r>>3)))
//#define RGB(r,g,b) ((((r&0xf8)<<8)|((g&0xfc)<<3)|(b>>3)))
#define RGB(r,g,b) ( ((b&0xF8)<<8) | ((g&0xFC)<<3) | ((r&0xF8)>>3) )
I'm trying to made the same changes is SDL.
But I can't fine the file where the configuracion is!!!!
Somebody know in which file where are this configuration.
Thanks
Miquel Soler i Mir
TranslateQuoteReplyEditDelete
2008-02-26 10:57:21 Re: SDL in Hitachi TFT
Robin Getz (UNITED STATES)
Message: 51665 Miquel:
Try the SDL mailing list - http://www.libsdl.org/mailing-list.php there are more SDL experts there than here.
-Robin
QuoteReplyEditDelete
2008-02-26 13:02:14 Re: SDL in Hitachi TFT
Mike Frysinger (UNITED STATES)
Message: 51669 doesnt that indicate the color is broken in the driver and by screwing with the shifting in userspace, you're just ignoring the problem ?
QuoteReplyEditDelete
2008-02-26 13:37:32 Re: SDL in Hitachi TFT
Robin Getz (UNITED STATES)
Message: 51670 Mike:
There isn't really a "standard" for applications to use for 16-bit colour. 5B 6G 5R is what some applications use - but not all.
To get max performance, it is best that the application, uses whatever colour space is the driver, is the hardware.
-Robin
QuoteReplyEditDelete
2008-02-26 13:45:51 Re: SDL in Hitachi TFT
Miquel Soler i Mir (SPAIN)
Message: 51671 Hello Mike.
Finaly I find the problem.
I execute the code in uClinux and in the host with this results
Configuration of Host:
-----------------------------------------------------
BitsPerPixel:32
BytesPerPixel:4
Rloss:0, Gloss:0, Bloss:0, Aloss:8
Rshift:16, Gshift:8, Bshift:0, Ashift:0
Rmask:FF0000, Gmask:FF00, Bmask:FF, Amaskt:0
ColorKey:0x0
alpha:255
-----------------------------------------------------
Parametres screen:
Caracteristiques de la capa
BitsPerPixel:16
BytesPerPixel:2
Rloss:3, Gloss:2, Bloss:3, Aloss:0
Rshift:11, Gshift:5, Bshift:0, Ashift:0
Rmask:F800, Gmask:7E0, Bmask:1F, Amaskt:0
ColorKey:0x0
alpha:255
-----------------------------------------------------
Parametres fons:
Caracteristiques de la capa
BitsPerPixel:16
BytesPerPixel:2
Rloss:3, Gloss:2, Bloss:3, Aloss:8
Rshift:11, Gshift:5, Bshift:0, Ashift:0
Rmask:F800, Gmask:7E0, Bmask:1F, Amaskt:0
ColorKey:0x7FF
alpha:255
-----------------------------------------------------
Configuration of uClinux:
-----------------------------------------------------
BitsPerPixel:16
BytesPerPixel:2
Rloss:3, Gloss:2, Bloss:3, Aloss:8
Rshift:0, Gshift:6, Bshift:11, Ashift:0
Rmask:1F, Gmask:FC0, Bmask:F800, Amaskt:0
ColorKey:0x0
alpha:255
-----------------------------------------------------
Parametres screen:
Caracteristiques de la capa
BitsPerPixel:16
BytesPerPixel:2
Rloss:3, Gloss:2, Bloss:3, Aloss:8
Rshift:0, Gshift:6, Bshift:11, Ashift:0
Rmask:1F, Gmask:FC0, Bmask:F800, Amaskt:0
ColorKey:0x0
alpha:255
-----------------------------------------------------
Parametres fons:
Caracteristiques de la capa
BitsPerPixel:16
BytesPerPixel:2
Rloss:3, Gloss:2, Bloss:3, Aloss:8
Rshift:0, Gshift:6, Bshift:11, Ashift:0
Rmask:1F, Gmask:FC0, Bmask:F800, Amaskt:0
ColorKey:0xFFC0
alpha:255
-----------------------------------------------------
I configure the SDL with 320x240 and 16bitsperpixel
I the host, the configuratio is OK. But in uclinux the Gmask and Gshift are wrong.
In the TFT I can't see the image correctly for this problem.
I seems that the driver from TFT give a wrong configuration to SDL library.
Does SDL take the config from the framebuffer or from the Hitachi driver?
the TFT is working 100 % I test with jpegview and pngview
I don't know the way to correct this.
Can you help me?
Thanks
Miquel Soler i Mir
Paleta.tar
TranslateQuoteReplyEditDelete
2008-03-04 17:59:49 Re: SDL in Hitachi TFT
Miquel Soler i Mir (SPAIN)
Message: 52054 Finaly I found the problem. Was in the driver, the 2007 version has some bugs. The 2008 version are correct.
Thanks