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.

TDA2EXEVM: TIDL_OD inData & inHeader generation

Part Number: TDA2EXEVM

Hi,

I want to generate the inData and inHeader for TIDL_OD by using my own video.

I use the same way as generating the segmentation use-case video.

My own file on the seg use-case works, but i will show the below error on the OD use-case.

[IPU1-0] 1301.978649 s: Assertion @ Line: 220 in nullSrcLink_tsk.c: frameLength < bitstreamBuf->bufSize : failed !!!
[IPU1-0] 1301.979167 s: Assertion @ Line: 220 in nullSrcLink_tsk.c: frameLength < bitstreamBuf->bufSize : failed !!!
[IPU1-1] 1301.923900 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
[IPU1-1] 1301.924052 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 655360 B (640 KB), Free size = 643328 B (628 KB)
[HOST ] 1301.924388 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
[HOST ] 1301.924418 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 6291456 B (6144 KB), Free size = 6224776 B (6078 KB)

Is there any difference between the input format of the two use-case?

Thank you in advance.

Best Regards,

Eric Lai

  • Hi Eric,

    the "frameLength < bitstreamBuf->bufSize : failed !!!" error might indicate that the index file was wrong.
    Can you check if this thread can help:
    e2e.ti.com/.../639881

    Regards,
    Yordan
  • Hi Yordan,

    Thank you for your response.

    This thread face the same problem with me, but i can not figure out how to solve it.

    I have ffmpeg.exe,ffprobe.exe,and sizeBin.exe and input.mp4 inside my folder.

    And I use the below .bat file:

    del inHeader
    del index.idx
    del inData
    ffmpeg.exe -i input.mp4 -ss 00:00:00 -t 00:04:00 -s 1024x512 -r 15 -vcodec libx264 -vb 50000k -qmax 20 -x264opts bframes=0 -bsf:v h264_mp4toannexb -an inData.h264
    ffprobe.exe -show_packets inData.h264 > index.idx
    sizeBin.exe index.idx inHeader
    rename inData.h264 inData
    del index.idx

    it can generate the inData & inHeader file which can be use for seg use-case but not for OD use-case.

    did i need to modify the .bat file?

    Best Regards,
    Eric Lai
  • Hello Eric,

    What are the names of index and data files kept in SD card?
    I see in use case file it should be suffixed with "_OD".

    /* SetFileRxPrm sets the file open to inHeader and inData overriding the same*/
    strncpy(pUcObj->NullSourcePrm.channelParams[0].nameDataFile, "inData_OD", 260);
    strncpy(pUcObj->NullSourcePrm.channelParams[0].nameIndexFile, "inHeader_OD", 260

    If you are already setting correct name, please check if inheader file generated is non-zero.
  • Hi Prasad,

    I check and my file name is right.
    For example I just rename the inData_semSeg to inData_OD and also the header file.
    But the segmentation input file running on the OD usecase will show the above error I mentioned.

    Below is the log before the error message ,i think the header file read successfully.

    [IPU1-0] 1295.382358 s: FILE: Reading file [inHeader_OD] ...
    [IPU1-0] 1295.383700 s: FILE: File read Done. [992 bytes]
    [IPU1-0] 1295.411517 s: DECODE: Create in progress ... !!!
    [IPU1-0] 1295.653449 s: DECODE: Creating CH0 of 768 x 320 [1] [0],target bitrate = 10000 Kbps ...
    [IPU1-0] 1295.654212 s: DECODE: All CH Create ... DONE !!!
    [IPU1-0] 1295.656103 s: DECODE: Create ... DONE !!!
    [IPU1-0] 1295.656530 s: VPE: Create in progress !!!
    [IPU1-0] 1295.745592 s: VPE: Loading Down-scaling Co-effs
    [IPU1-0] 1295.745836 s: VPE: Co-effs Loading ... DONE !!!
    [IPU1-0] 1295.746050 s: VPE: Create Done !!!
    [IPU1-0] 1295.747148 s: IPC_OUT_0 : Create in progress !!!
    [IPU1-0] 1295.747544 s: IPC_OUT_0 : Create Done !!!
    [HOST ] 1295.747727 s: IPC_IN_0 : Create in progress !!!
    [HOST ] 1295.748002 s: IPC_IN_0 : Create Done !!!
    [HOST ] 1295.748154 s: ALGORITHM: Create in progress (algId = 12) !!!
    [HOST ] 1295.754285 s: UTILS: DMA: Allocated CH (TCC) = 0 (0)
    [HOST ] 1295.754315 s: UTILS: DMA: 0 of 1: Allocated PaRAM = 0 (0x43305600)
    [HOST ] 1295.754315 s: ALGORITHM: Create Done (algId = 12) !!!
    [HOST ] 1295.754437 s: IPC_OUT_3 : Create in progress !!!
    [HOST ] 1295.754437 s: IPC_OUT_3 : Create Done !!!
    [EVE4 ] 1295.754712 s: IPC_IN_0 : Create in progress !!!
    [EVE4 ] 1295.755474 s: IPC_IN_0 : Create Done !!!
    [EVE4 ] 1295.756176 s: ALGORITHM: Create in progress (algId = 14) !!!
    [HOST ] 1297.144482 s: IPC_OUT_2 : Create in progress !!!
    [HOST ] 1297.144512 s: IPC_OUT_2 : Create Done !!!
    [DSP1 ] 1297.143811 s: IPC_IN_3 : Create in progress !!!
    [DSP1 ] 1297.144360 s: IPC_IN_3 : Create Done !!!
    [EVE3 ] 1297.144756 s: IPC_IN_0 : Create in progress !!!
    [EVE3 ] 1297.145549 s: IPC_IN_0 : Create Done !!!
    [EVE3 ] 1297.146251 s: ALGORITHM: Create in progress (algId = 14) !!!
    [EVE4 ] 1297.142530 s: ALGORITHM: Create Done (algId = 14) !!!
    [EVE4 ] 1297.143079 s: IPC_OUT_0 : Create in progress !!!
    [EVE4 ] 1297.143445 s: IPC_OUT_0 : Create Done !!!
    [HOST ] 1298.536326 s: IPC_OUT_1 : Create in progress !!!
    [HOST ] 1298.536356 s: IPC_OUT_1 : Create Done !!!
    [DSP1 ] 1298.535746 s: IPC_IN_2 : Create in progress !!!
    [DSP1 ] 1298.536173 s: IPC_IN_2 : Create Done !!!
    [EVE2 ] 1298.536600 s: IPC_IN_0 : Create in progress !!!
    [EVE2 ] 1298.537394 s: IPC_IN_0 : Create Done !!!
    [EVE2 ] 1298.537882 s: ALGORITHM: Create in progress (algId = 14) !!!
    [EVE3 ] 1298.534252 s: ALGORITHM: Create Done (algId = 14) !!!
    [EVE3 ] 1298.534770 s: IPC_OUT_0 : Create in progress !!!
    [EVE3 ] 1298.535167 s: IPC_OUT_0 : Create Done !!!
    [HOST ] 1299.944702 s: IPC_OUT_0 : Create in progress !!!
    [HOST ] 1299.944732 s: IPC_OUT_0 : Create Done !!!
    [DSP1 ] 1299.944030 s: IPC_IN_1 : Create in progress !!!
    [DSP1 ] 1299.944580 s: IPC_IN_1 : Create Done !!!
    [EVE1 ] 1299.944976 s: IPC_IN_0 : Create in progress !!!
    [EVE1 ] 1299.945769 s: IPC_IN_0 : Create Done !!!
    [EVE1 ] 1299.946501 s: ALGORITHM: Create in progress (algId = 14) !!!
    [EVE2 ] 1299.942719 s: ALGORITHM: Create Done (algId = 14) !!!
    [EVE2 ] 1299.943298 s: IPC_OUT_0 : Create in progress !!!
    [EVE2 ] 1299.943664 s: IPC_OUT_0 : Create Done !!!
    [DSP1 ] 1301.346794 s: IPC_IN_0 : Create in progress !!!
    [DSP1 ] 1301.347343 s: IPC_IN_0 : Create Done !!!
    [DSP1 ] 1301.347709 s: ALGORITHM: Create in progress (algId = 36) !!!
    [DSP1 ] 1301.359269 s: ALGORITHM: Create Done (algId = 36) !!!
    [DSP1 ] 1301.359452 s: IPC_OUT_0 : Create in progress !!!
    [DSP1 ] 1301.359543 s: IPC_OUT_0 : Create Done !!!
    [DSP1 ] 1301.924510 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [DSP1 ] 1301.924540 s: SYSTEM: Heap = LOCAL_L2 @ 0x00800000, Total size = 227264 B (221 KB), Free size = 65600 B (64 KB)
    [DSP1 ] 1301.924601 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 524288 B (512 KB), Free size = 498192 B (486 KB)
    [DSP2 ] 1301.924723 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [DSP2 ] 1301.924784 s: SYSTEM: Heap = LOCAL_L2 @ 0x00800000, Total size = 227264 B (221 KB), Free size = 227264 B (221 KB)
    [DSP2 ] 1301.924815 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 524288 B (512 KB), Free size = 514544 B (502 KB)
    [EVE1 ] 1301.345269 s: ALGORITHM: Create Done (algId = 14) !!!
    [EVE1 ] 1301.346031 s: IPC_OUT_0 : Create in progress !!!
    [EVE1 ] 1301.346428 s: IPC_OUT_0 : Create Done !!!
    [EVE1 ] 1301.925089 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [EVE1 ] 1301.925333 s: SYSTEM: Heap = LOCAL_L2 @ 0x40020000, Total size = 22528 B (22 KB), Free size = 1280 B (1 KB)
    [EVE1 ] 1301.925730 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 262144 B (256 KB), Free size = 236240 B (230 KB)
    [EVE2 ] 1301.926523 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [EVE2 ] 1301.926767 s: SYSTEM: Heap = LOCAL_L2 @ 0x40020000, Total size = 22528 B (22 KB), Free size = 1280 B (1 KB)
    [EVE2 ] 1301.927164 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 262144 B (256 KB), Free size = 236240 B (230 KB)
    [EVE3 ] 1301.927896 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [EVE3 ] 1301.928109 s: SYSTEM: Heap = LOCAL_L2 @ 0x40020000, Total size = 22528 B (22 KB), Free size = 1280 B (1 KB)
    [EVE3 ] 1301.928506 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 262144 B (256 KB), Free size = 236240 B (230 KB)
    [EVE4 ] 1301.929238 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [EVE4 ] 1301.929451 s: SYSTEM: Heap = LOCAL_L2 @ 0x40020000, Total size = 22528 B (22 KB), Free size = 1280 B (1 KB)
    [EVE4 ] 1301.929848 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 262144 B (256 KB), Free size = 236240 B (230 KB)
    [IPU2 ] 1301.930458 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [IPU2 ] 1301.930610 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 262144 B (256 KB), Free size = 250104 B (244 KB)
    [IPU1-0] 1301.359635 s: IPC_IN_0 : Create in progress !!!
    [IPU1-0] 1301.360672 s: IPC_IN_0 : Create Done !!!
    [IPU1-0] 1301.362014 s: ALGORITHM: Create in progress (algId = 1) !!!
    [IPU1-0] 1301.363173 s: UTILS: DMA: Allocated CH (TCC) = 48 (48)
    [IPU1-0] 1301.363295 s: UTILS: DMA: 0 of 1: Allocated PaRAM = 48 (0x63304800)
    [IPU1-0] 1301.379521 s: ALGORITHM: Create Done (algId = 1) !!!
    [IPU1-0] 1301.379765 s: DISPLAY: Create in progress !!!
    [IPU1-0] 1301.380314 s: DISPLAY: Create Done !!!
    [IPU1-0] 1301.380894 s: GRPXSRC: Create in progress !!!
    [IPU1-0] 1301.921826 s: GRPXSRC: Create Done !!!
    [IPU1-0] 1301.922222 s: DISPLAY: Create in progress !!!
    [IPU1-0] 1301.922741 s: DISPLAY: Create Done !!!
    [IPU1-0] 1301.922924 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [IPU1-0] 1301.923046 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 262144 B (256 KB), Free size = 242616 B (236 KB)
    [IPU1-0] 1301.923198 s: SYSTEM: Heap = SR_OCMC @ 0x00000000, Total size = 0 B (0 KB), Free size = 0 B (0 KB)
    [IPU1-0] 1301.923351 s: SYSTEM: Heap = SR_DDR_CACHED @ 0x89d03000, Total size = 368037888 B (350 MB), Free size = 180862464 B (172 MB)
    [IPU1-0] 1301.923534 s: SYSTEM: Heap = SR_DDR_NON_CACHED @ 0xbfc00000, Total size = 127360 B (0 MB), Free size = 92800 B (0 MB)
    [IPU1-0] 1301.930915 s: DISPLAY: Start in progress !!!
    [IPU1-0] 1301.931007 s: DISPLAY: Start Done !!!
    [IPU1-0] 1301.931891 s: DISPLAY: Start in progress !!!
    [IPU1-0] 1301.931983 s: DISPLAY: Start Done !!!
    [IPU1-0] 1301.940096 s:
    [IPU1-0]
    [IPU1-0] ====================
    [IPU1-0] Chains Run-time Menu
    [IPU1-0] ====================
    [IPU1-0]
    [IPU1-0] 0: Stop Chain
    [IPU1-0]
    [IPU1-0] 1: Pause Chain
    [IPU1-0] 2: Resume Chain
    [IPU1-0]
    [IPU1-0] p: Print Statistics
    [IPU1-0]
    [IPU1-0] Enter Choice:
    [IPU1-0]
    [IPU1-0] 1301.978649 s: Assertion @ Line: 220 in nullSrcLink_tsk.c: frameLength < bitstreamBuf->bufSize : failed !!!
    [IPU1-0] 1301.979167 s: Assertion @ Line: 220 in nullSrcLink_tsk.c: frameLength < bitstreamBuf->bufSize : failed !!!
    [IPU1-1] 1301.923900 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [IPU1-1] 1301.924052 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 655360 B (640 KB), Free size = 643328 B (628 KB)
    [HOST ] 1301.924388 s: SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [HOST ] 1301.924418 s: SYSTEM: Heap = LOCAL_DDR @ 0x00000000, Total size = 6291456 B (6144 KB), Free size = 6224776 B (6078 KB)
    [IPU1-0] 1343.974714 s: UTILS: MBX: Utils_mbxSendCmd(): Msg Alloc Failed (0)! !!
    [IPU1-0] 1344.004727 s: UTILS: MBX: Utils_mbxSendCmd(): Msg Alloc Failed (0)! !!
    [IPU1-0] 1344.007716 s: UTILS: MBX: Utils_mbxSendCmd(): Msg Alloc Failed (0)! !!
    [IPU1-0] 1344.040718 s: UTILS: MBX: Utils_mbxSendCmd(): Msg Alloc Failed (0)! !!

    I am sorry for the long log file.But i think this can help you to understand my question.
    Thank you.

    Best Regards,
    Eric Lai
  • Hi Eric ,

    Can you print the size and let us know .

    your input file would be a .h264 encoded file , we set the buffersize as width*height. 

    All buffers are allocated of buffersize , we compare the Frame length to be read to the buffersize.

    Please print both of the value before assert in line no 220 of vision_sdk\links_fw\src\rtos\links_common\nullSrc\nullSrcLink_tsk.c  

    Regards

    Chetan.M

  • Eric,

    I see below resolution configured in the use-case. In your .bat file you are using different resolution. Can you please change and try?
    #define TIDL_OD_INPUT_WIDTH (768)
    #define TIDL_OD_INPUT_HEIGHT (320)
  • Hi Prasad and Chetan,

    Thank you for your response.
    My problem is solved.
    One more question please,in the TIDL_OD use-case,there is a VPE link.
    I thought it is for the scaling on the input frame.
    But from the above discussion , i now understand that we need to feed
    the video size which should be the same with the network input.
    So it is not for scaling? What is the function of VPE link in this case?
    Thank you!

    Best Regards,
    Eric Lai
  • Hello Eric,

    Ideally you should open new thread for different issue.

    Anyway VPE link scaling is happening after data is received and decoded, hence null source link expects data in configured resolution.
  • Hello Eric ,


    In this case VPE is not used for scaling ,
    We use vpe to remove the STRIDE added by decoder .
    Some ALG handles stride some dont , So here Decoder stride is not taken care hence VPE is used .

    Regards
    Chetan.M
  • Hi Prasad and Chetan,

    Thank you so much.

    Best Regards,
    Eric Lai