导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页

    G2D性能比较慢的问题(melis4.0)

    MR Series
    1
    1
    932
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • B
      Bruce_Gan LV 3 最后由 编辑

      在使用G2D,的填充接口,发现比其计算完的时间比SW还慢。
      同样BLEND 掐出的时间也是比 软算法的要慢好多。
      屏幕分辨率是1280*800 的ARGB格式 ,掐的是ioctl(lv_port_data.h_rotate, G2D_CMD_FILLRECT_H, (unsigned long)&info) 这接接口。需要4.9ms。
      LVGL 的Fill 软件算法只要1ms 。

      难道硬件G2D 就是要这么长时间么?

      FILL代码如下:

         g2d_fillrect_h info;
         memset(&info, 0, sizeof(g2d_fillrect_h));
          if (opa > LV_OPA_MAX) {
              info.dst_image_h.alpha = 255;
          } else {
              info.dst_image_h.alpha = opa;
              color.ch.alpha = opa;
          }
          info.dst_image_h.mode = G2D_PIXEL_ALPHA;
          info.dst_image_h.color = color.full;
          info.dst_image_h.format = G2D_FORMAT_ARGB8888;
          info.dst_image_h.clip_rect.x = draw_area->x1;
          info.dst_image_h.clip_rect.y = draw_area->y1;
          info.dst_image_h.clip_rect.w = draw_area_w;
          info.dst_image_h.clip_rect.h = draw_area_h;
          info.dst_image_h.width = disp_w;
          info.dst_image_h.height = disp_h;
          info.dst_image_h.align[0] = 0;
          info.dst_image_h.align[1] = info.dst_image_h.align[0];
          info.dst_image_h.align[2] = info.dst_image_h.align[0];
          info.dst_image_h.laddr[0] = (unsigned int)esMEMS_VA2PA(dest_buf);
          info.dst_image_h.laddr[1] = 0;
          info.dst_image_h.laddr[2] = 0;
          info.dst_image_h.use_phy_addr = 1;
      
          int ret;
          if(lv_port_data.h_rotate < 0) {
              lv_port_data.h_rotate = open("/dev/g2d", O_WRONLY);
          }
      
          ret = ioctl(lv_port_data.h_rotate, G2D_CMD_FILLRECT_H, (unsigned long)&info);
          if(ret < 0) {
              __err("ERROR: sunxifb_g2d_fill G2D_CMD_FILLRECT_H failed");
          }
          close(lv_port_data.h_rotate);
      
      1 条回复 最后回复 回复 引用 分享 0
      • 1 / 1
      • First post
        Last post

      Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

      行为准则 | 用户协议 | 隐私权政策