OpenASIC
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • \[\[global:header.users\]\]
    • \[\[global:header.groups\]\]
    • \[\[global:header.search\]\]
    • Register
    • Login

    求助 H.264 Video Encoder Demo [PYNQ]的demo运行异常

    Scheduled Pinned Locked Moved 交流讨论 | General Discussion
    2 Posts 2 Posters 10.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W Offline
      wjl3258
      last edited by wjl3258

      hello,
      最近在使用H.264 Video Encoder Demo [PYNQ]进行h.264的验证,但是根据http://www.openasic.org/topic/67/h-264-video-encoder-demo-pynq中readme的步骤进行操作,vlc端未能收到任何数据,使用的硬件也是PYNQ-Z1开发板,在运行使用VLC接收HDMI视频流_720p.ipynb时,可以看到下面的打印输出是正常的,但是使用wireshark或者在PYNQ-Z1端串口登录系统后使用netstat查看状态,都没有大量的数据传输。
      0_1573392101231_7a969c67-21d9-44fd-8802-0369759e04c2-image.png
      使用另外一个demo进行验证 使用VLC接收HDMI视频流_1080p.ipynb,出现如下错误
      RuntimeError Traceback (most recent call last)
      <ipython-input-6-128c56b52014> in <module>()
      1 with hdmi_in.configure(pixelformat=PIXEL_RGBA):
      ----> 2 hdmi_in.start()
      3 cma_recv = xlnk.cma_array((size,), dtype=np.uint8)
      4 result = xlnk.cma_array((size,), dtype=np.uint8)
      5 start = time.time()

      /opt/python3.6/lib/python3.6/site-packages/pynq/lib/video.py in start(self)
      1067
      1068 """
      -> 1069 self._vdma.readchannel.start()
      1070 return self._stopcontextmanager()
      1071

      /opt/python3.6/lib/python3.6/site-packages/pynq/lib/video.py in start(self)
      492 self._cache = _FrameCache(self._mode)
      493 for i in range(len(self._frames)):
      --> 494 self._frames[i] = self._cache.getframe()
      495
      496 self._writemode()

      /opt/python3.6/lib/python3.6/site-packages/pynq/lib/video.py in getframe(self)
      251 _FrameCache._xlnk = Xlnk()
      252 frame = _FrameCache._xlnk.cma_array(
      --> 253 shape=self._mode.shape, dtype=np.uint8)
      254 frame.original_freebuffer = frame.freebuffer
      255 frame.freebuffer = functools.partial(

      /opt/python3.6/lib/python3.6/site-packages/pynq/xlnk.py in cma_array(self, shape, dtype)
      294 elements = functools.reduce(lambda value, total: value * total, shape)
      295 length = elements * dtype.itemsize
      --> 296 buffer_pointer = self.cma_alloc(length)
      297 buffer = self.cma_get_buffer(buffer_pointer, length)
      298 array = np.frombuffer(buffer, dtype=dtype).reshape(shape)

      /opt/python3.6/lib/python3.6/site-packages/pynq/xlnk.py in cma_alloc(self, length, cacheable, data_type)
      238 buf = self.libxlnk.cma_alloc(length, cacheable)
      239 if buf == self.ffi.NULL:
      --> 240 raise RuntimeError("Failed to allocate Memory!")
      241 self.bufmap[buf] = length
      242 return self.ffi.cast(data_type + "*", buf)

      RuntimeError: Failed to allocate Memory!
      0_1573392268812_b2281872-81f5-4e39-af53-b263bdcf4af4-image.png

      调试过这个demo的同仁们有没有知道怎么解决这两个问题的么?
      谢谢☺

      Y 1 Reply Last reply Reply Quote 0
      • Y Offline
        yangyuf @wjl3258
        last edited by

        @wjl3258
        看如下网址:
        https://blog.csdn.net/yangyuf012/article/details/81277027?ops_request_misc=&request_id=&biz_id=102&utm_source=distribute.pc_search_result.none-task-blog-SOBAIDUWEB-0

        1 Reply Last reply Reply Quote -3
        • 1 / 1
        • First post
          Last post
        Copyright © 2016 OpenASIC.XinKai
        VIP Lab @Fudan University | XK Silicon