AnsweredHot!software alpha blending

Author
yts
Super Member
  • Total Posts : 561
  • Reward points : 0
  • Joined: 2005/09/06 17:45:30
  • Status: offline
2018/01/07 17:52:03 (permalink)
0

software alpha blending

PIC32MZ2048EFM064 without an external SRAM
Harmony V2.05
Graphic controller ILI9327

The attached fig1.png and fig2.png show the Screen Designer of Graphics Composer and the actual LCD screen, respectively. Two Gradient Widgets are partially overlapped in these figures. One of them has the alpha amount of 150 and the other has that of 255.

The alpha blending is not realized on the actual LCD screen as seen in fig2.png.
How can I realize the software (not hardware) alpha blending?
 
yts

Attached Image(s)

#1
MHGC
Super Member
  • Total Posts : 205
  • Reward points : 0
  • Status: offline
Re: software alpha blending 2018/01/08 08:48:19 (permalink)
0
Hi yts,
 
What is the color format set to in the Graphics Composer design?  Software alpha blending would require something like RGBA8888.
post edited by MHGC - 2018/01/08 08:52:28
#2
MHGC
Super Member
  • Total Posts : 205
  • Reward points : 0
  • Status: offline
Re: software alpha blending 2018/01/08 09:47:45 (permalink)
0
In addition, software alpha-blending is a read-modify write procedure.  It requires access to the frame buffer memory or else it will not work.  From your posting in the other thread (http://www.microchip.com/forums/m1030374.aspx), I am still not clear if your frame buffer is on the PIC's internal SRAM or on-board the ILI9327.
post edited by MHGC - 2018/01/08 10:12:07
#3
yts
Super Member
  • Total Posts : 561
  • Reward points : 0
  • Joined: 2005/09/06 17:45:30
  • Status: offline
Re: software alpha blending 2018/01/08 19:18:20 (permalink)
0
Hi MHGC;

Thank you very much for your valuable comments.
Probably, I may have misunderstanding and my graphic driver may have some faults.

The color format is set to be RGB565, because the graphic controller ili9327 may not accept the RGBA8888 and/or RGB888 format(s). When the color format is set to be RGBA8888 in the Graphics Composer, the bad image appear as expected on the LCD screen (see fig1.png).

Should I need to convert the data with the RGBA8888 format into the one with the RGB565? How should the “A” information be kept in the firmware in this case?

As for the alpha blending, you make me notice that I must implement a read function (following pixelGet function, for example) in my graphic driver (see drv_gfx_ili9327.zip). I will do that. Than you.

static GFX_Color pixelGet(const GFX_PixelBuffer* buf,
                          const GFX_Point* pnt)
{
    int i;
    i=2; //  <-- the break-point is set here
//for debugging with 0 optimization-level

    return 0;
}

You think that the RAM of ILI9327 is enough for the “Cache” background drawings.
Are the background data read from the RAM of ILI9327 by using the read function (such as pixelGet)?
However, it seems to me that the read function of this type is not needed, because the firmware does not stop at the break-point set inside the read function (see the codes shown above).
Moreover, the firmware repeats “reset” if the frame buffer is not set in the PIC's internal SRAM. It seems to me that the firmware cannot find the pointer to the frame buffer.

yts
post edited by yts - 2018/01/08 19:21:01

Attached Image(s)

#4
yts
Super Member
  • Total Posts : 561
  • Reward points : 0
  • Joined: 2005/09/06 17:45:30
  • Status: offline
Re: software alpha blending 2018/01/12 18:44:42 (permalink) ☼ Best Answerby MikeinAZ 2018/01/15 08:45:07
0
Hi MHGC;

The software alpha-blending is realized with the RGB565 format by implementing a LCD-RAM read function (pixelGet function).Smile: Smile

Thank you very much.
#5
Jump to:
© 2018 APG vNext Commercial Version 4.5