The G2D API format enumeration describes G2D_RGB888 as a 24-bit RGB option (enum #10).
However attempts to use this, even for very simple blit operation yield errors for either invalid src or dst format.
g2d_blit_2d: Invalid src format 10!
There is no errata for lack of support for this. Should it work?
Tested on imx8mm.
Hi
I have the same problem. Can we have a folowup? Android 10 is my bsp base on
int ret;
void* g2dHandle = getHandle();
struct g2d_buf s_buf, d_buf;
struct g2d_surface s_surface, d_surface;
s_buf.buf_paddr = tmpBuf.mPhyAddr;
s_buf.buf_vaddr = tmpBuf.mVirtAddr;
d_buf.buf_paddr = dstBuf.mPhyAddr;
d_buf.buf_vaddr = dstBuf.mVirtAddr;
s_surface.format = G2D_RGB888;
s_surface.planes[0] = (long)s_buf.buf_paddr;
s_surface.left = 0;
s_surface.top = 0;
s_surface.right = src->width();
s_surface.bottom = src->height();
s_surface.stride = src->width();
s_surface.width = src->width();
s_surface.height = src->height();
s_surface.rot = G2D_ROTATION_0;
d_surface.format = (g2d_format)convertPixelFormatToG2DFormat(dst->format());
d_surface.planes[0] = (long)d_buf.buf_paddr;
d_surface.planes[1] = (long)d_buf.buf_paddr + dst->width() * dst->height();
d_surface.left = 0;
d_surface.top = 0;
d_surface.right = dst->width();
d_surface.bottom = dst->height();
d_surface.stride = dst->width();
d_surface.width = dst->width();
d_surface.height = dst->height();
d_surface.rot = G2D_ROTATION_0;
ret = mBlitEngine(g2dHandle, (void*)&s_surface, (void*)&d_surface);
if (ret == 0) {
mFinishEngine(g2dHandle);
}
confirmed that imx8mm doesn't support this, only imx8qxp and imx8qm support this format
refer to the gpu api, gpu should support this format, but what's your case? did you capture video as rgb888 from camera?