This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DVSDK4.02: Running dmai video encoder sample app gets error

Other Parts Discussed in Thread: DM3730

I tried to run the dmai video encoder sample app (video_encode_io1_dm3730.x470MV) for H264 or Mpeg4 that comes along with the DVSDK4.02 DM3730 package, but got errors like

==================

 Frame 27: Read UYVY frame size 691200 (720x480) from file
@2,913,695us: [+x40105000] OM - Memory_getVirtualAddress> Error: buffer (physAddr=0x8ca16225, size=0x64140) not found in translationcache

Ensure that you have registered this buffer with Memory_registerContigBuf()
@2,913,817us: [+7 T:0x40105000] OM - Memory_getVirtualAddress> Error: buffer (physAddr=0x8ca7f21b, size=0x18f60) not found in translationcache

Ensure that you have registered this buffer with Memory_registerContigBuf()
@2,913,878us: [+7 T:0x40105000] OM - Memory_getVirtualAddress> Error: buffer (physAddr=0x8ca99f9b, size=0x18f60) not found in translationcache

Ensure that you have registered this buffer with Memory_registerContigBuf()

 Frame 28: Read UYVY frame size 691200 (720x480) from file
@2,986,083us: [+7 T:0x40105000] OM - Memory_getVirtualAddress> Error: buffer (physAddr=0x8c9746a5, size=0x64140) not found in translationcache

==================

I saw some discussions on CodecEngine/H264 memory leak issue in this forum, but I'm wondering if it's fixed in DVSDK 4.02 release and how to make the dmai video encoder sample app working?

Thanks!

 

  • 0447.venc.log

    Can anyone help to take a look on the attached log file and guide me what the issue could be? 

    The dmai video encoder sample runs on customer DM3740 platform with command,

       sudo CE_DEBUG=3 DMAI_DEBUG=2 ./video_encode_io1_dm3730.x470MV -c h264enc -i output264.yuv -o temp -r 720x480 -n 30

    and the memory is configured as

       Linux : 0x80000000 - 0x89000000

       CMEM: 0x89000000 - 0x8c000000

       RESET_VECTOR: 0x8c000000 - 0x8c000080

       DDR2: 0x8c000080 - 0x8c600000

       DSPLINKMEM: 0x8c600000 - 0x8c700000

       DDRALGHEAP/POOLMEM: 0x8c700000 - 0x8E700000

    Thanks!

     

  • Hello,

    I don't know the exact reason for this error, and don't remember seeing this issue with default DVSDK setup. From the log, looks like you are running examples under ubuntu and i assume you have compiled all the TI packages either native on ubuntu target or have used ubuntu preferred cross compiler. If not, then you may run into issue with using prebuilt binaries from CS to Ubuntu. 

    I would suggest verify dependent components in ubuntu environment before trying the dmai examples. e.g DMAI depends on CMEM, CE, DSPLINK, LPM etc and make sure you are able to run the standalone examples for all these dependent components. If those examples runs fine then we can take a look at whats different in DMAI that can cause this issue. 

    Thanks

    Brijesh

  • Hi Brijesh,

    Thanks for your reply.

    I used the TI's Linux DVSDK4.02 package for DM3730 EVM, and rebuilt the whole package on Ubuntu 10.04 LTS 32-bit based host with CodeSourcery GCC toolchain arm-2009q1 as requested in release note.

    I did run DSPLINK and LPM examples that come along with the package, and all passed. I'm not sure if any example I can run to verify CMEM and CE partucularly. Do you have any suggestion?

     

  • From the log file, even frame 0 is having issues translating a buffer returned by the DSP.

    Just looking at frame 0, it looks like VIDENC1_process() is being called with two buffers

    • addr 0x89000000 size 691200 (maybe for input?)
    • addr 0x890a9000 size 345600 (maybe for output?)

    Upon return from VIDENC1_process(), the DSP is returning two buffers, one looks ok (phys addr 0x890a9000 size 1391 - maybe the encoded output?), but the other looks bad (phys addr 0x8c9746a5 size 409920).  You can see in the log that phys2virt translation fails.

    Can that be explained?  The way you're using the codec, are you expecting 2 buffers to be returned?

    Chris

  • Chris,

    The App passed two buffers, inBuf and outBuf, as shown in log

    Venc1_process: inBuf[0x89000000], outBuf[0x890a9000]

    The CE code, "videnc1_stubs.c", shows that DSP returns four buffers in its message. One for encoded buffer that is the output buffer we passed, and the other three are called "reconBufs" that seems like "reconstructed" buffers. Not sure how the "reconBufs" are created, by DSP?

    Source code is attached, return buffers are processed in function unmarshallMsg().

    2287.videnc1_stubs.txt

    thanks,

  • Exactly right.  I stopped early when I found the first buffer translate failing, but you're right there are actually 3 translations failing.

    Now that you mention reconstruction buffers, this post rang a bell:

    http://e2e.ti.com/support/embedded/f/354/p/42473/149956.aspx

    Probably depends on the codec, but if you don't need these reconstruction buffers, maybe you could set the create params' "VIDENC1_Params.reconChromaFormat = XDM_CHROMA_NA" to tell the codec you don't want these(?).

    Chris

  • Chris,

    Setting the params "VIDENC1_Params.reconChromaFormat = XDM_CHROMA_NA" didn't solve this issue. The codec still returns three reconstruction buffers that can not be translated. However, even with the error messagse, the encoded data seems correct. This problem can be easily reproduced on DM3730 EVM platform with prebuilt images comes along with the DVSDK4.02 release package if the CE_DEBUG is turned on.

    Is it a bug inside the codec? I tried the mpeg4 encoder, it has the same issue. Do you have any workaround or plan to fix it in the next release?

     

    Thanks,

     

  • Hi xin

        I have the same issue.

  • Hi,

        I just ran the application you mentioned as below & did not get any issues with DVSDK 4.02.00.06 on DM3730 platform. It encodes all the frame in the yuv file.

           ./video_encode_io1_dm3730.x470MV -c h264enc -i output264.yuv -o temp -r 720x480 -n 30

       At what frame issue starts appearing, your log shows 27, my stream had 27 frames and all encoded successfully.

       Could you help us to reproduce the problem, could input file related, can you share the input file.

    Best Regards

    Velan

    Need more information? Some Categories on TI's processor wiki of interest are -

    DVSDK4.x FAQ: http://processors.wiki.ti.com/index.php/DVSDK_4.x_FAQ