[技术讨论] GD32F450Z的IPA使用问题 -- 兆易的FAE麻烦解决下这个问题

[复制链接]
4586|2
 楼主| yunjie167 发表于 2021-9-7 15:39 | 显示全部楼层 |阅读模式
本帖最后由 tyw 于 2023-6-16 13:18 编辑

我的屏幕是480x272的RGB.
使用的是lvgl8.0
我发现底层绘图的时候IPA仅适合刷x1=0, x2=479, 高度为n的图片.
若屏幕上更新区域不是上述的特殊值, 使用IPA会显示的乱七八糟, 我也设置了destination_lineoff
但是它的效果是在本行间隔destination_lineoff个像素, 而不是换行填充一个矩形区域, 请问有谁知道ipa如何使用吗?
你们兆易的FAE有空写个demo演示下2D加速填充屏幕任意区域的demo吗???








                            tyw  注

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
 楼主| yunjie167 发表于 2021-9-7 15:41 | 显示全部楼层
贴上我的ipa代码
  1. void ipa_config(uint32_t src, uint32_t dst, u16 high, u16 width, u16 offset_x)
  2. {
  3.         ipa_destination_parameter_struct  ipa_destination_init_struct;
  4.         ipa_foreground_parameter_struct   ipa_fg_init_struct;

  5.         rcu_periph_clock_enable(RCU_IPA);

  6.         ipa_deinit();
  7.         /* configure IPA pixel format convert mode */
  8.         ipa_pixel_format_convert_mode_set(IPA_FGTODE);
  9.         /* configure destination pixel format */
  10.         ipa_destination_init_struct.destination_pf = IPA_DPF_RGB565;
  11.         /* configure destination memory base address */
  12.         ipa_destination_init_struct.destination_memaddr = dst;        //显存
  13.         /* configure destination pre-defined alpha value RGB */
  14.         ipa_destination_init_struct.destination_pregreen = 0;
  15.         ipa_destination_init_struct.destination_preblue = 0;
  16.         ipa_destination_init_struct.destination_prered = 0;
  17.         ipa_destination_init_struct.destination_prealpha = 0;
  18.         /* configure destination line offset */
  19.         ipa_destination_init_struct.destination_lineoff = offset_x;
  20.         /* configure height of the image to be processed */
  21.         ipa_destination_init_struct.image_height = high;
  22.         /* configure width of the image to be processed */
  23.         ipa_destination_init_struct.image_width = width;
  24.         /* IPA destination initialization */
  25.         ipa_destination_init(&ipa_destination_init_struct);

  26.         /* configure IPA foreground */
  27.         ipa_fg_init_struct.foreground_memaddr = src;        //临时绘制的缓存
  28.         ipa_fg_init_struct.foreground_pf = FOREGROUND_PPF_RGB565;
  29.         ipa_fg_init_struct.foreground_alpha_algorithm = IPA_FG_ALPHA_MODE_0;
  30.         ipa_fg_init_struct.foreground_prealpha = 0x0;
  31.         ipa_fg_init_struct.foreground_lineoff = 0;//offset_x;
  32.         ipa_fg_init_struct.foreground_preblue = 0x0;
  33.         ipa_fg_init_struct.foreground_pregreen = 0x0;
  34.         ipa_fg_init_struct.foreground_prered = 0x0;
  35.         /* foreground initialization */
  36.        
  37.         ipa_foreground_init(&ipa_fg_init_struct);
  38. }
buaazhy 发表于 2023-6-16 12:27 | 显示全部楼层
lineoff = 屏幕宽度-图片宽度,显示位置改变dest地址就可以了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

8

帖子

1

粉丝
快速回复 在线客服 返回列表 返回顶部