<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Stream encoding in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Stream-encoding/m-p/1671200#M207731</link>
    <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;According to the comment in the code as below:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;/* Creates a new DMA buffer allocator.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;*&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;* This uses one of the several available i.MX DMA allocators internally. Which&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;* one is used is determined by the build configuration of libimxdmabuffer.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;*&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;* &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/197964"&gt;@Param&lt;/a&gt; error If this pointer is non-NULL, and if an error occurs, then the integer&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;the pointer refers to is set to an error code from errno.h. If creating&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;the allocator succeeds, the integer is not modified.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;* @return Pointer to the newly created DMA allocator, or NULL in case of an error.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;*/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ImxDmaBufferAllocator&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt; &lt;SPAN&gt;imx_dma_buffer_allocator_new&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;int&lt;/SPAN&gt; &lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;error&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;It seems that the only thing being related to the allocation of dma buffer is the allocator. When I compiled the libimxdmabuffer, I did not specified which allocator to used because I have no idea which one I should use.&lt;/P&gt;&lt;P&gt;Question: I am now using imx8m plus, what allocator should I use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 16 Jun 2023 15:03:33 GMT</pubDate>
    <dc:creator>Lunsheng</dc:creator>
    <dc:date>2023-06-16T15:03:33Z</dc:date>
    <item>
      <title>Stream encoding</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Stream-encoding/m-p/1666996#M207395</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am now using the&amp;nbsp;&lt;SPAN&gt;libimxvpuapi on an imx8m plus board to do YUV2H264 encoding. I refer to example/encode-example.c. However, I encountered the failure to allocate dma buffer at the line of function call&amp;nbsp;imx_dma_buffer_allocate() as below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ctx-&amp;gt;stream_buffer = imx_dma_buffer_allocate(&lt;BR /&gt;ctx-&amp;gt;allocator,&lt;BR /&gt;ctx-&amp;gt;enc_global_info-&amp;gt;min_required_stream_buffer_size,&lt;BR /&gt;ctx-&amp;gt;enc_global_info-&amp;gt;required_stream_buffer_physaddr_alignment,&lt;BR /&gt;0&lt;BR /&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I get a exception at this call and a print "Bus error" without any detailed informaiton.&lt;/P&gt;&lt;P&gt;Would you please help check what the root cause it is?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 13:35:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Stream-encoding/m-p/1666996#M207395</guid>
      <dc:creator>Lunsheng</dc:creator>
      <dc:date>2023-06-09T13:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Stream encoding</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Stream-encoding/m-p/1667531#M207431</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are using a processor instruction with an address that does not satisfy its alignment requirements. Check your code to avoid this bus error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jun 2023 14:45:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Stream-encoding/m-p/1667531#M207431</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2023-06-12T14:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Stream encoding</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Stream-encoding/m-p/1671200#M207731</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;According to the comment in the code as below:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;/* Creates a new DMA buffer allocator.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;*&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;* This uses one of the several available i.MX DMA allocators internally. Which&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;* one is used is determined by the build configuration of libimxdmabuffer.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;*&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;* &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/197964"&gt;@Param&lt;/a&gt; error If this pointer is non-NULL, and if an error occurs, then the integer&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;the pointer refers to is set to an error code from errno.h. If creating&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;the allocator succeeds, the integer is not modified.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;* @return Pointer to the newly created DMA allocator, or NULL in case of an error.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;*/&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ImxDmaBufferAllocator&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt; &lt;SPAN&gt;imx_dma_buffer_allocator_new&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;int&lt;/SPAN&gt; &lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;error&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;It seems that the only thing being related to the allocation of dma buffer is the allocator. When I compiled the libimxdmabuffer, I did not specified which allocator to used because I have no idea which one I should use.&lt;/P&gt;&lt;P&gt;Question: I am now using imx8m plus, what allocator should I use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 15:03:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Stream-encoding/m-p/1671200#M207731</guid>
      <dc:creator>Lunsheng</dc:creator>
      <dc:date>2023-06-16T15:03:33Z</dc:date>
    </item>
  </channel>
</rss>

