如何使用D13X 的 GE的格式转换,例如ARGB8888转RGB565
离线
屏幕显示不是可以直接配置成RGB565的吗?为什么要转?
离线
1. 参考设置图像搬移blt参数中的src和dst的format即可,实现不同格式的转换:
https://gitee.com/artinchip/luban-lite/blob/master/packages/artinchip/mpp/mpp_test/pic_dec_test.c
2. pic_dec_test.c中图像搬移代码示例,可以设置原图和目标图的format不一样
blt.src_buf.buf_type = MPP_PHY_ADDR;
blt.src_buf.phy_addr[0] = (u32)(long)src_buf;
blt.src_buf.format = info->format; // MPP_FMT_ARGB_8888
blt.src_buf.stride[0] = info->stride; // src stride信息要填写正确, 需要 8 bytes对齐
blt.src_buf.size.width = info->width;
blt.src_buf.size.height = info->height;
blt.dst_buf.buf_type = MPP_PHY_ADDR;
blt.dst_buf.phy_addr[0] = (u32)(long)dst_buf;
blt.dst_buf.format = info->format; // MPP_FMT_RGB_R65
blt.dst_buf.stride[0] = info->stride; // dst stride信息要填写正确, 需要 8 bytes对齐
blt.dst_buf.size.width = info->width;
blt.dst_buf.size.height = info->height;
ge_bitblt(&blt);
离线