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.

Real-time streaming switching based on DM8168 decoding

I used DM8168 DVRRDK_03.00.00.00 to implement 2 channel H.264 or MPEG-4 decoding in real time. I have complete MPEG-4 decoding in one channel and H.264 decoding in the other channel.

there is a problem in our solution when I switch MPEG-4 decoding to H.264 decoding in one channel, and the other H.264 decoding maintaining in real time. The code as following:(channel 1, for example)

     DecLink_ChannelInfo   params_chan; 
     params_chan.chId = 1;
     IpcBitsOutHLOSLink_deleteChBufParams ipcBufDelPrms;
     DecLink_addChannelInfo params = {0};
     IpcBitsOutHLOSLink_createChBufParams ipcBufCreateParams;
     Int32 status = ERROR_NONE;

     OSA_mutexLock(&g_apiMutex);

      status = System_linkControl(decId, DEC_LINK_CMD_DELETE_CHANNEL,
                             &params_chan, sizeof(params_chan), TRUE);
     if (status == 0)
     {
          memset(&ipcBufDelPrms,0,sizeof(ipcBufDelPrms));
          ipcBufDelPrms.chId = 1;

          status = System_linkControl(ipcBitsOutHostId,
                           IPCBITSOUT_LINK_CMD_DELETE_CH_BUFFER,
                           &ipcBufDelPrms,
                           sizeof(ipcBufDelPrms), TRUE);
   }
   OSA_mutexUnlock(&g_apiMutex);

   OSA_mutexLock(&g_apiMutex);

    params.chId = 1;
     params.chInfo.width = 1920;
     params.chInfo.height = 1080;
     params.chInfo.scanFormat = 1;
     params.createPrm.targetMaxWidth = 1920;
     params.createPrm.targetMaxHeight = 1080;
     params.createPrm.defaultDynamicParams.targetFrameRate = 30;
     params.createPrm.defaultDynamicParams.targetBitRate = 4*1000*1000;
     params.createPrm.displayDelay = 2;
     params.createPrm.numBufPerCh = 6;
     params.createPrm.fieldMergeDecodeEnable = FALSE;
     params.createPrm.processCallLevel = FALSE;
     params.createPrm.dpbBufSizeInFrames = IH264VDEC_DPB_NUMFRAMES_AUTO;
     params.createPrm.algCreateStatus = DEC_LINK_ALG_CREATE_STATUS_CREATE;

     params.createPrm.format = IVIDEO_H264HP;
     params.createPrm.profile = IH264VDEC_PROFILE_ANY;

     status = System_linkControl(decId, DEC_LINK_CMD_CREATE_CHANNEL,
                           &params, sizeof(params), TRUE);

 if (0 == status)
        {
            memset (&ipcBufCreateParams,0,sizeof(ipcBufCreateParams));
            ipcBufCreateParams.chId = 1;
            ipcBufCreateParams.maxWidth  = 1920;
            ipcBufCreateParams.maxHeight = 1080;
            ipcBufCreateParams.numBufs = 2;
           
            status = System_linkControl(ipcBitsOutHostId,
                                        IPCBITSOUT_LINK_CMD_CREATE_CH_BUFFER,
                                        &ipcBufCreateParams,
                                      sizeof(ipcBufCreateParams), TRUE);

       }

   OSA_mutexUnlock(&g_apiMutex);

The running result :

 [host] 3623: IPCBITSOUT:Link[30000018]:
 [host] Flush Frame Sent for chId[1]
 [host] 3648: IPCBITSOUT:Link[30000018]:
 [host] Flush Frame Received for chId[1]
 [host] IPC_BITSOUT:BitBuffer Free.PoolID:1,Size:0x3F4800
 [host] 3652: IPCBITSOUT:Link[30000018]:
 [host] Ch buffer delete completed for chId[1].Total Time[29]
 [m3video] DEC : Delete CH1, Dummy Object queued !!!
 [m3video] DEC : Delete CH1 Got the Dummy Object queued !!!
 [m3video]  16450: DECODE: CH1: Decoder flush needed (0)!!!
 [m3video]  16450: DECODE: CH1: Decoder Flushing !!!
 [m3video]  16450: DECODE: CH1: Decoder Flushing !!!
 [m3video] 16474: IPCBITSIN:Link[1000001a]:
 [m3video] Flush Frame received for ch[1]
 [m3video]  16474: DECODE: CH1:
 [m3video] Queing flush Frame to processQ
 [m3video]  16474: DECODE: CH1:
 [m3video] Flush Frame Received in ProcessQue
 [m3video]  16476: DECODE: CH1:
 [m3video] Freeing flush Frame
 [m3video] 16476: IPCBITSIN:Link[1000001a]:
 [m3video] Flush Frame freed for ch[1]

segement fault.

This problem was caused by creating channel by debugging,or rather to the function DecLinkH264_algCreate( in decLink_h264.c line 794) result in the segement fault.

So what's the bug when I set the parameters or other errors for switching MPEG-4 decoding to H.264 decoding?

  • Could you please migrate to 03.50.xx.xx release? There were some bug fixes in Dec, IPCbits Out link and Vdec layer related to decode channel delete/create.

  • Thank you!

    But How could I get the  03.50.xx.xx release code?

  • The segmentation fault is on A8 and the DecLink_algCreate is executed on M3. Are you saying executing DecLink_algCreate is causing segmentation fault on A8. Are you sure about this. There is no bug fix from RDK 3.0 and above that can resolve this issue. You should migrate to RDK 4.0 as RDK 3.0 is not supported but can you first explain more details. Are you always seeing this issue ? Can you register at SEG FAULT signal handler and get a backtrace ?

  • Yes, The DecLink_algCreate is executed on M3. The bug is caused by the buffer memory creating for decoding on M3.But I'm not sure segement fault on the A8. It came the segement fault when the program executed on the fuction  DecLink_algCreate(I marked some  information on the function DecLink_algCreate ). So I surmised M3 error resulting in the segement fault. I also tried other switching for the decoding.

    Now I modified the code on A8, to implement switching H.264 to MPEG-4 decoding. The running result was different from switching MPEG-4 to H.264 decoding, it was convident for debugging.

    The resule is:

     [host]
    167195: IPCBITSOUT:Link[30000018]:
     [host] Flush Frame Sent for chId[1]
     [host]
    167213: IPCBITSOUT:Link[30000018]:
     [host] Flush Frame Received for chId[1]
     [host] IPC_BITSOUT:BitBuffer Free.PoolID:1,Size:0x3F4800
     [host]
    167218: IPCBITSOUT:Link[30000018]:
     [host] Ch buffer delete completed for chId[1].
    ###Bit buff of size from the SR # 1 : 4147200

     [host] IPC_BITSOUT:BitBuffer Alloc.PoolID:1,Size:0x3F4800
     [host] IPCBITSOUTLINK:Translated Addr Virt:0x41763880 To Phy:0x883f48801
     [m3video] DEC : Delete CH1, Dummy Object queued !!!
     [m3video] DEC : Delete CH1 Got the Dummy Object queued !!!
     [m3video]  180027: DECODE: CH1: Decoder flush needed (0)!!!
     [m3video]  180027: DECODE: CH1: Decoder Flushing !!!
     [m3video]  180028: DECODE: CH1: Decoder Flushing !!!
     [m3video] 180035: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame received for ch[1]
     [m3video]  180035: DECODE: CH1:
     [m3video] Queing flush Frame to processQ
     [m3video]  180036: DECODE: CH1:
     [m3video] Flush Frame Received in ProcessQue
     [m3video]  180039: DECODE: CH1:
     [m3video] Freeing flush Frame
     [m3video] 180039: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame freed for ch[1]
     [m3video] 
     [m3video]  *** Decode Statistics ***
     [m3video]  180056: DEC: Rcvd from prev = 17153, Returned to prev = 17152
     [m3video] DEC Out  BufExt Q Status
     [m3video] Empty Q 0 -> count 3, wrPtr 132, rdPtr 129
     [m3video] Empty Q 1 -> count 0, wrPtr 130, rdPtr 130
     [m3video] Full Q -> count 0, wrPtr 11, rdPtr 11
     [m3video] 
     [m3video] 180057:ERR::linkID:10000022::channelID:1::errorCode:-3::FileName:links_m3video/iva_dec/decLink_mpeg4.c::linuNum:636::errorCondition:(NULL != hObj->algHandle)
     [m3video] DECLINK_MPEG4:HEAPID:0       USED:1640
     [m3video] DEC : Delete CH1 Got the Dummy Object queued !!!
     [m3video] DEC : Delete CH1, Dummy Object queued !!!
     [m3video] DECLINK: ERROR!!! During Channel Open, Need more memory to open new CH1; Delete a few other channels and try again
     [m3video] 
     [m3video]  *** Decode Statistics ***
     [m3video]  180061: DEC: Rcvd from prev = 17153, Returned to prev = 17152
     [m3video] DEC Out  BufExt Q Status
     [m3video] Empty Q 0 -> count 3, wrPtr 132, rdPtr 129
     [m3video] Empty Q 1 -> count 0, wrPtr 0, rdPtr 0
     [m3video] Full Q -> count 0, wrPtr 11, rdPtr 11

    It indicates that the condition (fxns->algInit(alg, memTab, p, params) == IALG_EOK) (in  alg_create.c line 74) is not established. Moreover, I only used two channels, and created the channle after deleting it, why are the channels memory not enough ?

  • There is something seriously wrong either with your memory map or your board memory configuration.

    1.Have you modified the default memory map of DVR RDK ?

    2. Are you using 1G or 2G configuration ? What is the Linux memory size you are using

    3.Are you running on UD DVR reference design h/w or your own board.

     

    TO debug this issue check the following:

    1. Create decoder with lesser number of output buffers like 5 or 6. 16 buffers per channel is too much.

    2. Create decoder link with algCreateStatus to to ALG_CREATE_NONE so that no algorithm is created for that channel and check the memory consumed after creating each codec by doing Vsys_printDetailedStatistics before and after creation and check the free memory printed.

     

     

  • Thanks for your replying, Badri.
    The demo reference is obtained by the third party of TI. Maybe they modified some chips divers and configurations. The Linux memoey size I used is 1002MB.
    Now I  modified some configurations according to your suggestion:

      UInt32 status = 0;
      DecLink_ChannelInfo   params_chan; 

      IpcBitsOutHLOSLink_deleteChBufParams ipcBufDelPrms;
      gread = 0;

      OSA_mutexLock(&g_apiMutex);
      params_chan.chId = 1;
      status = System_linkControl(decId, DEC_LINK_CMD_DELETE_CHANNEL,
                    &params_chan, sizeof(params_chan), TRUE);

      if (status == 0)
      {
       printf("Vdec_deleteChn status = %d \n",status);

       memset(&ipcBufDelPrms,0,sizeof(ipcBufDelPrms));
       ipcBufDelPrms.chId = 1;

       status = System_linkControl(ipcBitsOutHostId,
        IPCBITSOUT_LINK_CMD_DELETE_CH_BUFFER,
        &ipcBufDelPrms,
        sizeof(ipcBufDelPrms), TRUE);
       printf("Vdec_deleteChn Buffer status = %d \n",status);
      }
      OSA_mutexUnlock(&g_apiMutex);


      DecLink_addChannelInfo params = {0};
      IpcBitsOutHLOSLink_createChBufParams ipcBufCreateParams;
     
      OSA_mutexLock(&g_apiMutex);
      params.chId = 1;
      params.chInfo.width = 1920;
      params.chInfo.height = 1080;
      params.chInfo.scanFormat = 1;
      params.createPrm.targetMaxWidth = 1920;
      params.createPrm.targetMaxHeight = 1080;
      params.createPrm.defaultDynamicParams.targetFrameRate = 30;
      params.createPrm.defaultDynamicParams.targetBitRate = 4*1000*1000;
      params.createPrm.displayDelay = 2;
      params.createPrm.numBufPerCh = 6;
      params.createPrm.fieldMergeDecodeEnable = FALSE;
      params.createPrm.processCallLevel = FALSE;
      params.createPrm.dpbBufSizeInFrames = IH264VDEC_DPB_NUMFRAMES_AUTO;
      params.createPrm.algCreateStatus = DEC_LINK_ALG_CREATE_STATUS_CREATE_DONE;  //DEC_LINK_ALG_CREATE_STATUS_CREATE;

      params.createPrm.format = IVIDEO_MPEG4ASP; //IVIDEO_H264HP; //
      params.createPrm.profile = 0;  //IH264VDEC_PROFILE_ANY;//


      System_linkControl(decId, DEC_LINK_CMD_PRINT_BUFFER_STATISTICS,
                                NULL, 0 , TRUE);

      printf("Before Creating Vdec_CreateChn status = %d \n",status);

      if (0 == status)
      {
       status = System_linkControl(decId, DEC_LINK_CMD_CREATE_CHANNEL,
        &params, sizeof(params), TRUE);
       printf("After Creating Vdec_CreateChn status = %d \n",status);

       System_linkControl(decId, DEC_LINK_CMD_PRINT_BUFFER_STATISTICS,
        NULL, 0 , TRUE);

       // if (0 == status)
       {
        memset (&ipcBufCreateParams,0,sizeof(ipcBufCreateParams));
        ipcBufCreateParams.chId = 1;
        ipcBufCreateParams.maxWidth  = 1920;
        ipcBufCreateParams.maxHeight = 1080;
        ipcBufCreateParams.numBufs = 2;

        status = System_linkControl(ipcBitsOutHostId,
         IPCBITSOUT_LINK_CMD_CREATE_CH_BUFFER,
         &ipcBufCreateParams,
         sizeof(ipcBufCreateParams), TRUE);

        printf("After Creating Vdec_CreateChn  Buffer status = %d \n",status);

        gread = MPEG4_FILE_READ;
       }
      }

      OSA_mutexUnlock(&g_apiMutex);

    The running result is as follows:

    Vdec_deleteChn status = 0
     [host]
    9468: IPCBITSOUT:Link[30000018]:
     [host] Flush Frame Sent for chId[1] [m3video]  7***************************************************Close Channel
     [m3video] DEC : Delete CH1, Dummy Object queued !!!
     [m3video] DEC : Delete CH1 Got the Dummy Object queued !!!
     [m3video]  22324: DECODE: CH1: Decoder flush needed (0)!!!
     [m3video]  22324: DECODE: CH1: Decoder Flushing !!!
     [m3video]  22324: DECODE: CH1: Decoder Flushing !!!

     [host]
    9487: IPCBITSOUT:Link[30000018]:
     [host] Flush Frame Received for chId[1]
     [host] IPC_BITSOUT:BitBuffer Free.PoolID:1,Size:0x3F4800
     [host]
    9491: IPCBITSOUT:Link[30000018]:
     [host] Ch buffer delete completed for chId[1].Total Time[23]Vdec_deleteChn Buffer status = 0
    Before Creating Vdec_CreateChn status = 0
     [m3video] 22333: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame received for ch[1]
     [m3video]  22333: DECODE: CH1:
     [m3video] Queing flush Frame to processQ
     [m3video]  22333: DECODE: CH1:
     [m3video] Flush Frame Received in ProcessQue
     [m3video]  22335: DECODE: CH1:
     [m3video] Freeing flush Frame
     [m3video] 22335: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame freed for ch[1]
     [m3video] 
     [m3video]  *** Decode Statistics ***
     [m3video]  22352: DEC: Rcvd from prev = 859, Returned to prev = 858


    9496:!!!SLAVE CORE [VIDEO-M3] DOWN!!!
    SystemLink_copySlaveCoreExceptionContext:146
    mmap of [0xbe9c0000:36864]
    mmap virt addresss:0x4031b000
    munmap of [0x4031b000:36864]
    SystemLink_copySlaveCoreExceptionContext:153
     [m3video] DEC Out  BufExt Q Status
     [m3video] Empty Q 0 -> count 3, wrPtr 49, rdPtr 46
     [m3video] Empty Q 1 -> count 0, wrPtr 46, rdPtr 46
     [m3video] Full Q -> count 0, wrPtr 258, rdPtr 258
     [m3video]  22353: Assertion @ Line: 2677 in links_m3video/iva_dec/decLink_common.c: params->createPrm.algCreateStatus == DEC_LINK_ALG_CREATE_STATUS_CREATE : failed !!!
    Segmentation fault.

    How could I do on the next step? Thank you!

  • Linux mem=1002M is not a supported configuration in DVR RDK. Did you make the memory map change or did the third party make the change ?Pls share the map file.Also are you sure your board is populated with 2GB memory and all memory range is accessible. Have you done some memory test to confirm entire 2GB is accessible.

    Regarding your changes

      params.createPrm.algCreateStatus = DEC_LINK_ALG_CREATE_STATUS_CREATE_DONE;  //DEC_LINK_ALG_CREATE_STATUS_CREATE;

     THis should be

      params.createPrm.algCreateStatus = DEC_LINK_ALG_CREATE_STATUS_DONOT_CREATE;

    Also don't invoke

     System_linkControl(decId, DEC_LINK_CMD_PRINT_BUFFER_STATISTICS,                             NULL, 0 , TRUE);

    it doesn't print free memory.

    Use System_linkControl(SYSTEM_LINK_ID_M3VIDEO ,SYSTEM_COMMON_CMD_PRINT_STATUS and send it to link.Make sure to set printHeapStatus to TRUE. 

  •  Thank you for your reply and look forward to receive further message.

    Maybe the third party modified the memory map, because the solution and some peripheral drivers would be some deifferences from the TI Demo,  bue the core could not be modified.

    I corrected the configuration for the algCreateStatus and printHeapStatus.

    The result is as follows:

     [host]
    5007: IPCBITSOUT:Link[30000018]:
     [host] Flush Frame Sent for chId[1] [m3video] DEC : Delete CH1, Dummy Object queued !!!
     [m3video] DEC : Delete CH1 Got the Dummy Object queued !!!
     [m3video]  17860: DECODE: CH1: Decoder flush needed (0)!!!
     [m3video]  17860: DECODE: CH1: Decoder Flushing !!!
     [m3video]  17861: DECODE: CH1: Decoder Flushing !!!

     [host]
    5029: IPCBITSOUT:Link[30000018]:
     [host] Flush Frame Received for chId[1]
     [host] IPC_BITSOUT:BitBuffer Free.PoolID:1,Size:0x3F4800
     [host]
    5033: IPCBITSOUT:Link[30000018]:
     [host] Ch buffer delete completed for chId[1].Total Time[26] [m3video] 17871: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame received for ch[1]
     [m3video]  17871: DECODE: CH1:
     [m3video] Queing flush Frame to processQ
     [m3video]  17872: DECODE: CH1:
     [m3video] Flush Frame Received in ProcessQue
     [m3video]  17874: DECODE: CH1:
     [m3video] Freeing flush Frame
     [m3video] 17875: IPCBITSIN:Link[1000001a]:
     [m3video] Flush Frame freed for ch[1]
    Vdec_deleteChn Buffer status = 0
     [m3video] 
     [m3video]  17892: LOAD: CPU: 7.5% HWI: 0.5%, SWI:0.5%
     [m3video] 
     [m3video]  17892: LOAD: TSK: IPC_OUT_M30         : 0.2%
     [m3video]  17892: LOAD: TSK: IPC_BITS_IN0        : 0.1%
     [m3video]  17892: LOAD: TSK: DEC0                : 5.2%
    Before Creating Vdec_CreateChn status = 0


    5070:!!!SLAVE CORE [VIDEO-M3] DOWN!!!
    SystemLink_copySlaveCoreExceptionContext:146
    mmap of [0xbe9c0000:36864]
    mmap virt addresss:0x40073000
    munmap of [0x40073000:36864]
    SystemLink_copySlaveCoreExceptionContext:153
     [m3video]  17892: LOAD: TSK: DEC_PROCESS_TSK_0   : 0.6%
     [m3video]  17892: LOAD: TSK: MISC                : 0.4%
     [m3video] 
     [m3video]  17892: SYSTEM  : FREE SPACE : System Heap      = 6274696 B, Mbx = 10239 msgs)
    Segmentation fault
    root@dm816x:~#  [m3video]  17892: SYSTEM  : FREE SPACE : SR0 Heap         = 11003648 B (10 MB)
     [m3video]  17893: SYSTEM  : FREE SPACE : Frame Buffer     = 174242688 B (166 MB)
     [m3video]  17893: SYSTEM  : FREE SPACE : Bitstream Buffer = 348698496 B (332 MB)
     [m3video]  17893: SYSTEM  : FREE SPACE : Tiler 8-bit      = 102907904 B (98 MB)  - TILER ON
     [m3video]  17894: SYSTEM  : FREE SPACE : Tiler 16-bit     = 119748224 B (114 MB)  - TILER ON
     [m3video] 
     [m3video]  17906: LOAD: CPU: 7.5% HWI: 0.5%, SWI:0.5%
     [m3video] 
     [m3video]  17907: LOAD: TSK: IPC_OUT_M30         : 0.2%
     [m3video]  17907: LOAD: TSK: IPC_BITS_IN0        : 0.1%
     [m3video]  17907: LOAD: TSK: DEC0                : 5.2%
     [m3video]  17907: LOAD: TSK: DEC_PROCESS_TSK_0   : 0.6%
     [m3video]  17907: LOAD: TSK: MISC                : 0.4%
     [m3video] 
     [m3video]  17907: SYSTEM  : FREE SPACE : System Heap      = 6274696 B, Mbx = 10238 msgs)
     [m3video]  17907: SYSTEM  : FREE SPACE : SR0 Heap         = 11003648 B (10 MB)
     [m3video]  17907: SYSTEM  : FREE SPACE : Frame Buffer     = 174242688 B (166 MB)
     [m3video]  17907: SYSTEM  : FREE SPACE : Bitstream Buffer = 348698496 B (332 MB)
     [m3video]  17908: SYSTEM  : FREE SPACE : Tiler 8-bit      = 102907904 B (98 MB)  - TILER ON
     [m3video]  17908: SYSTEM  : FREE SPACE : Tiler 16-bit     = 119748224 B (114 MB)  - TILER ON
     [m3video] 
     [m3video]  *** Decode Statistics ***
     [m3video]  17909: DEC: Rcvd from prev = 177, Returned to prev = 176
     [m3video] DEC Out  BufExt Q Status
     [m3video] Empty Q 0 -> count 3, wrPtr 107, rdPtr 104
     [m3video] Empty Q 1 -> count 0, wrPtr 75, rdPtr 75
     [m3video] Full Q -> count 0, wrPtr 123, rdPtr 123
     [m3video]  17922: Assertion @ Line: 2677 in links_m3video/iva_dec/decLink_common.c: params->createPrm.algCreateStatus == DEC_LINK_ALG_CREATE_STATUS_CREATE : failed !!!

    The attachments are the map file of M3VPSS, M3Video program, and the makefile on the A8. I'm sorry I don't know how to get the map file of A8.

    Could you help me analyze the running results and the  attachments?

     

  • Thank you, Badri. I have  solved the problem with your help. 

    But there comes another problem:

    when I switch H.264 decoding to MPEG-4 decoding, I delete the decode channel and the ipcBuf, and then create the same decode channel and the ipcBuf. How could I read the stream date from MPEG-4 files to ipcBuf?

     I find the previous thread  could not work, which does the work of IpcBitsOutLink_getEmptyVideoBitStreamBufs, read file, and IpcBitsOutLink_putFullVideoBitStreamBufs. 

     Looking forward to receive further message.

     

     

  • The A8 thread that reads stream should be informed about new stream type. Have you taken care this?

    How are you providing MPEG-4 stream information on A8 side? Initially you would have provided details of H264 decode channel e.g codec type, height, width etc. Once you change to MPEG4 this information needs to be updated.

  • Yes,all you said have done. Thank you, Ritesh.

    On the A8 side, I send a new frame of MPEG-4 stream on every decoding. On the channel_create, I have modified the codec type, height, width, and displayDelay etc.  

    I also test  the MPEG-4 file when I used the channel for MPEG-4 decoding on the decLink_create(do not switch to MPEG-4 decoding), it's OK.

    When I swith decoding H.264 decoding to MPEG-4 decoding, if do not read MPEG-4 file, it says no error, but the channel has no display, because there is no stream to the channel. But if read the tested MPEG-4 file in the previous thread of H.264 file reading, it displays error video pictures, including the error Y and the error Chrom.

    The running result is:

     [m3video] 17351:DECLINK::links_m3video/iva_dec/decLink_mpeg4.c:[289]::INTERNAL ERROR:-1
     [m3video] ALGPROCESS FAILED:STATUS
     [m3video] outArgs->viddec3OutArgs.extendedError for channel 1 Error: 0x21004
     [m3video] 17351:WARN
     [m3video] DECLINK:ERROR in Declink_mpeg4DecodeFrameBatch.Status[-1]

  • Do you have header information generated for the MPEG 4 file? How do you pass MPEG-4 file details name etc.? Are you keeping this info in the main ini file, provided at the start of the demo.

    I think frames that is being fed to decoder is corrupted and hence returning with header error. Could you cross verify frame sizes and header info generated from app?

  • The H.264 file or MPEG-4 file reading might be different from TI's demo in our project.

    I  verified crossing the frame sizes for H.264 decoding(such as switching from 1080P to 720P,and then switching from 720P to 1080P) in my previous cases, it's OK.

    I decode the H.264  or MPEG-4 header on A8 by my own header parsing function for every frame, so I do not need the head file.

    MPEG-4 file name is passed  in the condition of  a command of switching decoding. If the condition is established, it will read MPEG-4 file, otherwise it will read H.264 file. 

    I will verify crossing the frame sizes for MPEG-4 decoding.  

    Thanks and regards! 

  • I verified crossing the frame sizes for MPEG-4 decoding, it 's OK.

    But when I switched from H.264 decoding to MPEG-4 decoding, if the MPEG-4 stream frame size was 4cif or below, it would come an error picture of the stream. If the  MPEG-4 stream frame size was 720p, it would not come the picture of the MPEG-4 file, and the result:

    934170:!!!SLAVE CORE [VIDEO-M3] DOWN!!!
    SystemLink_copySlaveCoreExceptionContext:146
    mmap of [0xbe9c0000:36864]
    mmap virt addresss:0x400ef000
    munmap of [0x400ef000:36864]
    SystemLink_copySlaveCoreExceptionContext:153
     [m3video]  947011: Assertion @ Line: 875 in links_m3video/iva_dec/decLink_common.c: (freeFrameInfo->pVdecOrgFrame == NULL) && (freeFrameInfo->vdecRefCount > 0) : failed !!!

    Could you help me analyze the running result? Thanks.