dm8127 A8 yuv420sp 送入到videoM3编码--已经解决

NULL link->ipcFrameoutHost->ipcFramesIn(vidoeFromHost)->enclink->ipcFramesOut(videoToHost)->ipcFramesInHost->SYSTEM_LINK_ID_INVALID

 

发现800万像素送入到videoM3编码jpeg报错:

 

 DMA: ChannelID allocated:4
 [m3video]  84148: IPC_FRAMES_IN   : Create in progress !!!
 [m3video]  84148: SYSTEM: Opening ListMP [HOST_IPC_OUT_23] ...
 [m3video]  84149: SYSTEM: Opening ListMP [HOST_IPC_IN_23] ...
 [m3video]  84151: SYSTEM: Opening MsgQ [HOST_MSGQ] ...
 [m3video] IPC_FRAMES_IN:HEAPID:0       USED:304
 [m3video]  84153: IPC_FRAMES_IN   : Create Done !!!
 [m3video]  84154: MERGE   : Create Done !!!
 [m3video]  84155: ENCODE: Create in progress ... !!!
 [m3video]  EncLink_codecCreateOutObj BitBuf Q Status
 [m3video] Empty Q 0 -> count 1, wrPtr 1, rdPtr 0
 [m3video] Full Q -> count 0, wrPtr 0, rdPtr 0
 [m3video]  EncLink_codecCreateOutObj BitBuf Q Status
 [m3video] Empty Q 0 -> count 2, wrPtr 2, rdPtr 0
 [m3video] Full Q -> count 0, wrPtr 0, rdPtr 0
 [m3video]  EncLink_codecCreateOutObj BitBuf Q Status
 [m3video] Empty Q 0 -> count 3, wrPtr 3, rdPtr 0
 [m3video] Full Q -> count 0, wrPtr 0, rdPtr 0
 [m3video]  EncLink_codecCreateOutObj BitBuf Q Status
 [m3video] Empty Q 0 -> count 4, wrPtr 4, rdPtr 0
 [m3video] Full Q -> count 0, wrPtr 0, rdPtr 0
 [m3video]  EncLink_codecCreateOutObj BitBuf Q Status
 [m3video] Empty Q 0 -> count 5, wrPtr 5, rdPtr 0
 [m3video] Full Q -> count 0, wrPtr 0, rdPtr 0
 [m3video]  EncLink_codecCreateOutObj BitBuf Q Status
 [m3video] Empty Q 0 -> count 6, wrPtr 6, rdPtr 0
 [m3video] Full Q -> count 0, wrPtr 0, rdPtr 0
 [m3video]  84346: ENCODE: Creating CH0 of 3296 x 2472, pitch = (3296, 3296) [PROGRESSIVE] [NON-TILED  ], bitrate = 24000 Kbps ...
 [m3video] ENCLINK_JPEG:HEAPID:0        USED:6328
 [m3video]  84348: ENCODE: All CH Create ... DONE !!!
 [m3video] ENCLINK:HEAPID:0     USED:6568
 [m3video]  84351: ENCODE: Create ... DONE !!!
 [m3video]  84353: IPC_BITS_OUT   : Create in progress !!!
 [m3video]  84356: IPC_BITS_OUT   : Create Done !!!
 [m3video]  JPGLINK: new targetframerate to set:15000 for bitrate 36000000
 [m3video]  JPGLINK: Run time parameters changed 0
 [m3video] 94265:!ERROR!:ENCLINK::links_m3video/iva_enc/encLink_jpeg.c:[215]::INTERNAL ERROR:-1
 [m3video] ALGPROCESS FAILED
 [m3video] JPEG Extended error 8000
 [m3video] 94265:WARN
 [m3video] ENCLINK:ERROR in Enclink_JPEGEncodeFrame.Status[-1]
 [m3video] 94265:WARN
 [m3video] ENC : IVAHDID : 0 ENCLINK:ERROR in EncLink_SubmitBatch.Status[-1]

 

终于调通yuv420sp的数据送入到videoM3 解码的代码了,

 status = IpcFramesOutLink_putFullVideoFrames(iFrameOutLinkId,&vidBufList);

打印日志ok,在调用rdk_SndFrameBufToVideoM3打印buff的前10个字节的日志,videoM3就不报错了,不打印这几行日志,videoM3报错;

奇怪!

 

 unsigned char *pbuff=(unsigned char *)g_pYuv420spBuf;
        int i=0;
        for(i=0;i<1;i++)
        {
           OSA_printf("yuv[%d]=%d\n",i,pbuff[i]);
        }

使用videoM3 编码1080p的数据,jpeg编码的图像有问题;如下:

dm8127 A8 yuv420sp 送入到videoM3编码--已经解决_第1张图片

 

偏绿的原因是传递到videoM3中的UV通道的addr和phyAddr指针没有赋值;

 

以下是从网上搜到的和我这个问题相关的内容;

http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/199290

How to pass a file from host to encoder

I have a file with raw YUV data that I would like to pass to the encoder. I can read the frames from the file on the host A8. How can I pass this data to the encoder through the ipcFramesOut Link.

I see that the API has two functions that I can use to write the frames.  I call IpcFramesOutLink_getEmptyVideoFrames(), write the data to the returned buffer and callIpcFramesOutLink_putFullVideoFrames() to send the data to the next link.  My problem is that there are no buffers returned from getEmptyVideoFrames() that I can write to.  I have configured the parameters in theSystem_LinkChInfo struct that is a part ofIpcFramesOutLinkHLOS_CreateParams with the correct frame information on initialization.

How can I get the system to allocate the buffers for me? Or if that is not possible, where would it be best for me to allocate it myself?

Thanks,
Robb

 

http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/270715

Thanks!

Is there any possibility that I set wrong parameters to IPCFrameOutLINK which can result this phenomenon?

Following is my parameters:

Part 1 : LINK parameters

    esipcFramesOutHostPrm0.baseCreateParams.inQueParams.prevLinkId         = SYSTEM_LINK_ID_INVALID;
    esipcFramesOutHostPrm0.baseCreateParams.inQueParams.prevLinkQueId      = 0;
    esipcFramesOutHostPrm0.baseCreateParams.numOutQue                      = 1;
    esipcFramesOutHostPrm0.baseCreateParams.numChPerOutQue[0]              = 1;
    esipcFramesOutHostPrm0.baseCreateParams.outQueParams[0].nextLink       = esipcFramesInVpssId0;
    esipcFramesOutHostPrm0.baseCreateParams.inputFrameRate                 = 60;    ////****~~~~
    esipcFramesOutHostPrm0.baseCreateParams.outputFrameRate                = 60;    ////****~~~~
    esipcFramesOutHostPrm0.baseCreateParams.notifyNextLink                 = TRUE;
    esipcFramesOutHostPrm0.baseCreateParams.notifyPrevLink                 = FALSE;
    esipcFramesOutHostPrm0.baseCreateParams.notifyProcessLink              = FALSE;
    esipcFramesOutHostPrm0.baseCreateParams.noNotifyMode                   = FALSE;

    esipcFramesOutHostPrm0.inQueInfo.numCh                                 = 1;
    esipcFramesOutHostPrm0.inQueInfo.chInfo[0].startX                      = 0;
    esipcFramesOutHostPrm0.inQueInfo.chInfo[0].startY                      = 0;
    esipcFramesOutHostPrm0.inQueInfo.chInfo[0].height                      = 720;
    esipcFramesOutHostPrm0.inQueInfo.chInfo[0].width                       = 1280;
    esipcFramesOutHostPrm0.inQueInfo.chInfo[0].pitch[0]                    = 2560;
    esipcFramesOutHostPrm0.inQueInfo.chInfo[0].bufType                     = SYSTEM_BUF_TYPE_VIDFRAME;
    esipcFramesOutHostPrm0.inQueInfo.chInfo[0].bufferFmt                   = 0;
    esipcFramesOutHostPrm0.inQueInfo.chInfo[0].codingformat                = 0;
    esipcFramesOutHostPrm0.inQueInfo.chInfo[0].memType                     = SYSTEM_MT_NONTILEDMEM;
    esipcFramesOutHostPrm0.inQueInfo.chInfo[0].dataFormat                  = SYSTEM_DF_YUV422I_YUYV;
    esipcFramesOutHostPrm0.inQueInfo.chInfo[0].scanFormat                  = SYSTEM_SF_PROGRESSIVE;//SYSTEM_SF_INTERLACED;//
    System_linkCreate(esipcFramesOutHostId0, &esipcFramesOutHostPrm0, sizeof(esipcFramesOutHostPrm0));

    esipcFramesInVpssPrm0.baseCreateParams.inQueParams.prevLinkId      = esipcFramesOutHostId0;
    esipcFramesInVpssPrm0.baseCreateParams.inQueParams.prevLinkQueId   = 0;
    esipcFramesInVpssPrm0.baseCreateParams.inputFrameRate              = 60;
    esipcFramesInVpssPrm0.baseCreateParams.noNotifyMode                = FALSE;
    esipcFramesInVpssPrm0.baseCreateParams.notifyNextLink              = TRUE;
    esipcFramesInVpssPrm0.baseCreateParams.notifyPrevLink              = TRUE;
    esipcFramesInVpssPrm0.baseCreateParams.numOutQue                   = 1;
    esipcFramesInVpssPrm0.baseCreateParams.numChPerOutQue[0]           = 1;
    esipcFramesInVpssPrm0.baseCreateParams.outQueParams[0].nextLink    = esmergeId0;
    esipcFramesInVpssPrm0.baseCreateParams.outputFrameRate             = 60;

Part 2 : Allocate Shared Region

    bufList.numFrames = 0;
    for (i = 0; i < VIDFRAME_MAX_FRAME_BUFS;i++)
    {
        status = Vsys_allocBuf(FRAMEBUF_HEAP_SR_ID, bufSize, 128, &thrObj->bufInfo[i]);
        if (ERROR_NONE == status)
        {
            bufList.numFrames++;
            pFrame                 = &bufList.frames[i];
            pFrame->channelNum     = 0;
            pFrame->fid            = 0;
            pFrame->frameHeight    = 720;
            pFrame->frameWidth     = 1280;
            pFrame->framePitch[0]  = 2560;
            pFrame->phyAddr[0][0]  = thrObj->bufInfo[i].physAddr;
            pFrame->addr[0][0]     = thrObj->bufInfo[i].virtAddr;
        }
    }
    status = IpcFramesOutLink_putFullVideoFrames(SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0, &bufList);

Part 3 : Video Data exchanging :

    while (FALSE == thrObj->exitFramesInOutThread)
    {
        bufList.numFrames = 0;
        status = IpcFramesOutLink_getEmptyVideoFrames(SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0, &bufList);
        OSA_assert(0 == status);
        if (bufList.numFrames)
        {
            //printf("Number of get empty: %d\n", bufList.numFrames);
            for(i = 0;i < bufList.numFrames;i++)
            {
                pFrame                 = &bufList.frames[i];
                pFrame->channelNum     = 0;
                pFrame->fid            = 0;
                pFrame->frameHeight    = 720;
                pFrame->frameWidth     = 1280;
                pFrame->framePitch[0]  = 2560;
                thrObj->bufSize        = (pFrame->frameHeight)*(pFrame->frameWidth)*2;

                unsigned long ppIndex = ioctl(devfd, 4, 0);
/*                printf("ipcFrames : [sn: %d] ppIndex = %d, virtual = %x, phyaddr = %x\n",
                        i, ppIndex, ppMemVirtAddr[ppIndex], ppMemPhyAddr[ppIndex]);//*/

                //memcpy(pFrame->addr[0][0], ppMemVirtAddr[ppIndex], bufSize);

                copy2D.srcPhysAddr = (unsigned long)ppMemPhyAddr[ppIndex];
                copy2D.dstPhysAddr = (unsigned long)pFrame->phyAddr[0][0];
                OSA_dmaCopy2D(&dmaHndl, &copy2D, 1);
            }
            status = IpcFramesOutLink_putFullVideoFrames(SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0, &bufList);
            OSA_assert(0 == status);
        }
        OSA_waitMsecs(4);
    }

 

https://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/277735

DM8168 IpcFramesOutLink

Hi, 

In my usecase,I use  the ipcFramesOutHost Link and ipcFramesInVpss link ,and I invoke Vsys_allocBuf() to allocateshard region firstly,then,pass it to  ipcFramesOut_putFullFrames.

I create a thread just work in this way "IpcFramesOutLink_getEmptyVideoFrames--->IpcFramesOutLink_putFullVideoFrames" ,and I just get 30frames per second,

I want to know what causes this phenomenon,my test code is like following:

Looking forward to your reply.

static Void *Chains_ipcFramesGetPutFxn(Void *prm)
{
    Chains_IpcFramesCtrlThrObj *thrObj = (Chains_IpcFramesCtrlThrObj *) prm;
    VIDFrame_BufList  bufList;
    VIDFrame_Buf      *pFrame;
    Int32             i = 0;
    Int32             status;
    Int32             bufSize = 1280 * 720 * 2;

    ///////////////////////////////////////////////////////////////////////////////////////

    if (FALSE == bHasAllocSRBuf)
    {
  bufList.numFrames = 0;
  for (i = 0; i < VIDFRAME_MAX_FRAME_BUFS;i++)
  {
   status = Vsys_allocBuf(FRAMEBUF_HEAP_SR_ID, bufSize, 128, &thrObj->bufInfo[i]);
   if (ERROR_NONE == status)
   {
    bufList.numFrames++;
    pFrame                 = &bufList.frames[i];
    pFrame->channelNum     = 0;
    pFrame->fid            = 0;
    pFrame->frameHeight    = 720;
    pFrame->frameWidth     = 1280;
    pFrame->framePitch[0]  = 2560;
    pFrame->phyAddr[0][0]  = thrObj->bufInfo[i].physAddr;
    pFrame->addr[0][0]     = thrObj->bufInfo[i].virtAddr;
   }
  }
  status = IpcFramesOutLink_putFullVideoFrames(SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0, &bufList);
  OSA_assert(0 == status);

  bHasAllocSRBuf = TRUE;

  printf ("ipcFrame   7777777777777777777777         put succefully...\n");
    }

    /////////////////////////////////////////////////////////////////////////////////////////////

    while (FALSE == thrObj->exitFramesInOutThread)
    {
     status = IpcFramesOutLink_getEmptyVideoFrames(SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0, &bufList);
     OSA_assert(0 == status);
     printf("[%13.6f]numFrames = %d\n", ELAPSE_TIME, bufList.numFrames);

        if (bufList.numFrames)
        {
            status = IpcFramesOutLink_putFullVideoFrames(SYSTEM_HOST_LINK_ID_IPC_FRAMES_OUT_0, &bufList);
         OSA_assert(0 == status);
        }
        OSA_waitMsecs(4);
    }
}//*/

 

dm8127 MCFW link problem

http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/262406

hi,

appro dm8127 3.2 RDK!

I want to get YUV image in A8 and do some proces in the YUV image. Then  send the YUV back to M3Vpss. so the flow is:

camera link--->Dup--->Merger LInk-->IpcFramesOutLinkRTOS-->IpcFramesInLinkHLOS--> IpcFramesOutLinkHLOS-->IpcFramesInLinkRTOS-->swosd-->ipcOutVpss-->ipcInVideo

however, the M3 program get an error in IpcFramesInLink_putEmptyFrames. the following is the log info

 [m3vpss ] Command 1 recived from HOST A8
 [m3vpss ]  5615: CAMERA: Fields = 2 (fps = 0), Total Resets = 0 (Avg 0 ms per reset)

 [host] MCFW_IPCFRAMES: Callback function:App_ipcFramesInCbFxn
 [host] MCFW_IPCFRAMES:Received first frame notify...
 [host] MCFW_IPCFRAMES:VIDFRAMELIST_INFO:FullFrameList  numFullFrames:2
 [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:0    fid:0   frameWidth:1920 frameHeight:1080        timeStamp:5708   virtAddr[0][0]:(nil)    phyAddr[0][0]:0xb841c500
 [host] MCFW_IPCFRAMES:VIDFRAME_INFO:chNum:1    fid:0   frameWidth:720  frameHeight:480 timeStamp:5708  virtAddr[0][0]:(nil)     phyAddr[0][0]:0xb9beb500
 [host] Vdis_getEmptyVideoFrames:status 0 Num:0

 [host] MCFW_IPCFRAMES:App_ipcFramesSendRecvFxn:INFO: periodic print.. [m3video]  Channel:0 inputframerate:30 targetfps:60
 [m3vpss ]  5745: Assertion @ Line: 562 in links_common/ipcFramesIn/ipcFramesInLink_tsk.c: pListElem->frameBuf.phyAddr[0][0] == pFrameBuf->addr[0][0] : failed !!!

 [host] MCFW_IPCBITS: Callback function:App_ipcBitsInCbFxn
 [host] MCFW_IPCBITS:App_ipcBitsRecvStreamFxn:INFO: periodic print.. [m3video]  Channel:1 inputframerate:15 targetfps:60

 

the following is the code:

    /* Merge Link params */
 #ifdef YUV_FRAMES_TO_A8
    mergePrm[CAM_STREAM_MERGE_IDX].numInQue = 2;
 #else
 mergePrm[CAM_STREAM_MERGE_IDX].numInQue = 3;
 #endif
    mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[0].prevLinkId = dupId[MJPEG_DUP_LINK_IDX];
    mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[0].prevLinkQueId = 0;
    if(gUI_mcfw_config.glbceEnable)
  mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[1].prevLinkId = ispId;
    else
    {
     #ifdef RAW_FRAMES_TO_A8
  mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[1].prevLinkId = ispId;
  #else
  mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[1].prevLinkId = gVcamModuleContext.cameraId;
  #endif
  
    }

    mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[1].prevLinkQueId = 1;
 #ifdef YUV_FRAMES_TO_A8
 //none
 #else
    mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[2].prevLinkId = dupId[MJPEG_DUP_LINK_IDX];
    mergePrm[CAM_STREAM_MERGE_IDX].inQueParams[2].prevLinkQueId = 1;
 #endif
//    mergePrm[CAM_STREAM_MERGE_IDX].outQueParams.nextLink = gVsysModuleContext.swOsdId;
    mergePrm[CAM_STREAM_MERGE_IDX].notifyNextLink = TRUE;
#ifdef YUV_FRAMES_TO_A8
 mergePrm[CAM_STREAM_MERGE_IDX].outQueParams.nextLink = gVcamModuleContext.ipcFramesOutVpssToHostId;

 /* Set ipcFramesOutVpss link info */
 ipcFramesOutVpssToHostPrm.baseCreateParams.noNotifyMode = TRUE;
 ipcFramesOutVpssToHostPrm.baseCreateParams.notifyNextLink = FALSE;
 ipcFramesOutVpssToHostPrm.baseCreateParams.notifyPrevLink = TRUE;
 ipcFramesOutVpssToHostPrm.baseCreateParams.inQueParams.prevLinkId = mergeId[CAM_STREAM_MERGE_IDX];
 ipcFramesOutVpssToHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
 ipcFramesOutVpssToHostPrm.baseCreateParams.outQueParams[0].nextLink = gVcamModuleContext.ipcFramesInHostId;
 ipcFramesOutVpssToHostPrm.baseCreateParams.processLink       =  SYSTEM_LINK_ID_INVALID; //johnlin add

 ipcFramesInHostPrm.baseCreateParams.noNotifyMode = TRUE;
 ipcFramesInHostPrm.baseCreateParams.notifyNextLink = FALSE;
 ipcFramesInHostPrm.baseCreateParams.notifyPrevLink = FALSE;
 ipcFramesInHostPrm.baseCreateParams.inQueParams.prevLinkId = gVcamModuleContext.ipcFramesOutVpssToHostId;
 ipcFramesInHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
 ipcFramesInHostPrm.baseCreateParams.outQueParams[0].nextLink =SYSTEM_LINK_ID_INVALID;//gVsysModuleContext.swOsdId;//SYSTEM_LINK_ID_INVALID;
 ipcFramesInHostPrm.exportOnlyPhyAddr = TRUE;

 ipcFramesInHostPrm.cbCtx = &gVcamModuleContext;
 ipcFramesInHostPrm.cbFxn = Vcam_ipcFramesInCbFxn;

 ipcFramesOutHostPrm.baseCreateParams.noNotifyMode = TRUE;
 ipcFramesOutHostPrm.baseCreateParams.notifyNextLink = FALSE;
 ipcFramesOutHostPrm.baseCreateParams.notifyPrevLink = FALSE;
 ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkId = SYSTEM_LINK_ID_INVALID;
 ipcFramesOutHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
 ipcFramesOutHostPrm.baseCreateParams.outQueParams[0].nextLink = gVdisModuleContext.ipcFramesInVpssFromHostId;

 ipcFramesInVpssFromHostPrm.baseCreateParams.noNotifyMode = TRUE;
 ipcFramesInVpssFromHostPrm.baseCreateParams.notifyNextLink = TRUE;
 ipcFramesInVpssFromHostPrm.baseCreateParams.notifyPrevLink = FALSE;    
 ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkId = gVdisModuleContext.ipcFramesOutHostId;
 ipcFramesInVpssFromHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
 ipcFramesInVpssFromHostPrm.baseCreateParams.outQueParams[0].nextLink = gVsysModuleContext.swOsdId;
#else
 mergePrm[CAM_STREAM_MERGE_IDX].outQueParams.nextLink = gVsysModuleContext.swOsdId;
#endif

    /* SWOSD Link Params */
#ifdef YUV_FRAMES_TO_A8
 swosdPrm.inQueParams.prevLinkId = gVcamModuleContext.ipcFramesInHostId;//gVdisModuleContext.ipcFramesInVpssFromHostId; //johnlin
#else
 swosdPrm.inQueParams.prevLinkId = mergeId[CAM_STREAM_MERGE_IDX];
#endif
   
    swosdPrm.inQueParams.prevLinkQueId = 0;
    swosdPrm.outQueParams.nextLink = ipcOutVpssId;
    swosdPrm.frameSync = 0;                                // frame sync is
                                                           // not required
    swosdPrm.frameSycChId = 0;                             // not used

    /* IPC Out VPSS link params */
    ipcOutVpssPrm.inQueParams.prevLinkId = gVsysModuleContext.swOsdId;
    ipcOutVpssPrm.inQueParams.prevLinkQueId = 0;
    ipcOutVpssPrm.numOutQue = 1;
    ipcOutVpssPrm.outQueParams[0].nextLink = ipcInVideoId;
    ipcOutVpssPrm.notifyNextLink = TRUE;
    ipcOutVpssPrm.notifyPrevLink = TRUE;
    ipcOutVpssPrm.noNotifyMode = FALSE;

    /* IPC In VIDEO params */
    ipcInVideoPrm.inQueParams.prevLinkId = ipcOutVpssId;
    ipcInVideoPrm.inQueParams.prevLinkQueId = 0;
    ipcInVideoPrm.numOutQue = 1;
    ipcInVideoPrm.outQueParams[0].nextLink = gVencModuleContext.encId;
    ipcInVideoPrm.notifyNextLink = TRUE;
    ipcInVideoPrm.notifyPrevLink = TRUE;
    ipcInVideoPrm.noNotifyMode = FALSE;

 

 Ti_mcfw_ipncframes.c

 

static Void * App_ipcFramesSendRecvFxn(Void * prm)
{
     App_IpcFramesCtrlThrObj *thrObj = ( App_IpcFramesCtrlThrObj *) prm;
    static Int printStatsInterval = 0;
    VIDEO_FRAMEBUF_LIST_S bufList;
    Int status;

#ifdef CUSTOM_SD_DEMO
    App_ipcFramesFileOpen();
#endif

    OSA_printf("MCFW_IPCFRAMES:%s:Entered...",__func__);
    OSA_semWait(&thrObj->framesInNotifySem,OSA_TIMEOUT_FOREVER);
    OSA_printf("MCFW_IPCFRAMES:Received first frame notify...");
    while (FALSE == thrObj->exitFramesInOutThread)
    {
        status =  Vcam_getFullVideoFrames(&bufList,0);   

        OSA_assert(0 == status);
        if (bufList.numFrames)
        {
             App_ipcFramesPrintFullFrameListInfo(&bufList,"FullFrameList");
#ifdef CUSTOM_SD_DEMO
             App_ipcFrameFileWrite(&bufList);
#endif
            status = Vdis_putFullVideoFrames(&bufList);    

            OSA_assert(0 == status);
        }
        status =  Vdis_getEmptyVideoFrames(&bufList,0);    

        OSA_assert(0 == status);

  OSA_printf("Vdis_getEmptyVideoFrames:status %d Num:%d \n",status,bufList.numFrames);

  if (bufList.numFrames)
        {
            App_ipcFramesPrintFullFrameListInfo(&bufList,"EmptyFrameList");
            status = Vcam_putEmptyVideoFrames(&bufList);
            OSA_assert(0 == status);
        }
#ifdef IPC_FRAMES_DEBUG
        if ((printStatsInterval % MCFW_IPCFRAMES_INFO_PRINT_INTERVAL) == 0)
        {
            OSA_printf("MCFW_IPCFRAMES:%s:INFO: periodic print..",__func__);
        }
#endif
        printStatsInterval++;
        OSA_waitMsecs(MCFW_IPCFRAMES_SENDRECVFXN_PERIOD_MS);
    }
#ifdef CUSTOM_SD_DEMO
    if(gApp_ipcFramesCtrl.fileFrameWriteEnable)
    {
        if(gApp_ipcFramesCtrl.fileFrameWriteState==FILE_WRITE_RUNNING)
        {
            fclose(gApp_ipcFramesCtrl.fp);
            OSA_printf(" Closing file [%s] for CH%d\n", gApp_ipcFramesCtrl.fileFrameWriteName, gApp_ipcFramesCtrl.fileFrameWriteChn);
        }
    }
#endif
    OSA_printf("MCFW_IPCFRAMES:%s:Leaving...",__func__);
    return NULL;
}

 

 What should I do? Is there something that I miss to config? Or the current config is wrong?  It's very strange. The custom dm8127 board work fine in the lowpower mode. However if I change the flow to get the YUV data in A8, the M3 vpss stop work after get the following assert.  Any suggestion would be  grateful. Thanks

 

 


typedef struct
{
    UInt32              bufType; /**< see System_BufType */
    UInt32              codingformat; /**< Video coding format - IVIDEO_H264BP, IVIDEO_H264MP,...*/
    UInt32              dataFormat; /**< see System_VideoDataFormat */
    UInt32              memType; /**< see System_MemoryType - Tiled / non-tiled */
    UInt32              startX; /**< Start x position */
    UInt32              startY; /**< Start x position */
    UInt32              width; /**< channel resolution - width */
    UInt32              height; /**< channel resolution - height */
    UInt32              pitch[SYSTEM_MAX_PLANES]; /**< Pitch for various formats / planes  */
    UInt32              scanFormat; /**< see System_VideoScanFormat */
} System_LinkChInfo;


/**
 * \brief LINKs output queue information
 *  Specifies a place holder that describe the output information of the LINK
 */
typedef struct
{
    UInt32              numCh;
    /**< No of channel that would be sent out */
    System_LinkChInfo   chInfo[SYSTEM_MAX_CH_PER_OUT_QUE];
    /**< Each channels configurations */

} System_LinkQueInfo;

 

1080p的图像;

    UInt32              startX=32; /**< Start x position */
    UInt32              startY=24; /**< Start x position */
    UInt32              pitch[SYSTEM_MAX_PLANES]; /**< Pitch for various formats / planes  */
 pitch[0]=2048,pitch[1]=2048

 

你可能感兴趣的:(dm8127 A8 yuv420sp 送入到videoM3编码--已经解决)