• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Digital Signal Processors (DSP) » DaVinci™ Video Processors » DM816x, C6A816x and AM389x Processors Forum » DM8168 Video Capture from FPGA using VIN0 and send video out using VOUT0
Share
DaVinci™ Video Processors
  • Forums
  • Announcements
Options
  • Subscribe via RSS

Forums

DM8168 Video Capture from FPGA using VIN0 and send video out using VOUT0

This question is answered
Bonzai
Posted by Bonzai
on Feb 07 2012 19:41 PM
Intellectual835 points

Hi all,

 I want to capture video data from FPGA using VIN0 ports, performing image compressor and then send back compressing video data to FPGA using VOUTo port.  is it possible?

DM8186                                      FPGA

VOUT0[0..29]  -----------------> VOUT0[0..29]

VIN0[0..23]  <-------------------- VIN0[0..23]

Thanks,

Bonzai

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Brijesh Jadav
    Posted by Brijesh Jadav
    on Dec 26 2012 03:44 AM
    Genius10765 points

    Hi,

     

    It is possible, you can treat your compressed data as if it is RGB888 data and capture it, it will be stored as RGB888, is that ok?

     

    Regards,

    Brijesh Jadav

    Please mark this post as answered via the Verify Answer button below if you think it answers your question.  Thanks!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Shary Li
    Posted by Shary Li
    on Dec 27 2012 04:51 AM
    Intellectual925 points

    Hi, Brijesh.

     I don't change anything, but it's OK now. I don't know why.

     I want to write the capture data into file.  So I use ipcFramesOutVpssToHostPrm and ipcFramesInHostPrm.

    But it can not receive any data. what's wrong?

     [m3vpss ]  *** CAPTURE Statistics ***
     [m3vpss ] 42661: CAPTURE: Queued to driver = 12, Dequeued from driver = 12
     [m3vpss ] CAPTURE [0] Buf Q Status
     [m3vpss ] Empty Q -> count 0, wrPtr 0, rdPtr 0
     [m3vpss ] Full Q -> count 12, wrPtr 12, rdPtr 0
     [m3vpss ] 
     [m3vpss ]  *** [NSF0] NSF Statistics ***
     [m3vpss ] 42661: NSF: Rcvd from prev = 0, Returned to prev = 0
     [m3vpss ] NSF Out [0] Buf Q Status
     [m3vpss ] Empty Q -> count 0, wrPtr 0, rdPtr 0
     [m3vpss ] Full Q -> count 0, wrPtr 0, rdPtr 0

     

    8168 DVR_RDK
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Brijesh Jadav
    Posted by Brijesh Jadav
    on Dec 27 2012 08:37 AM
    Genius10765 points

    Hi,

    Did you check your capture statistics and if it is all correct?

    Regards,

    brijesh

    Please mark this post as answered via the Verify Answer button below if you think it answers your question.  Thanks!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Badri Narayanan
    Posted by Badri Narayanan
    on Dec 27 2012 08:55 AM
    Mastermind24065 points

    The logs indicate the link after capture link is not getting notification.Pls share .c file of your latest usecase. Do you have an application thread on A8 that does

    Vcap_getFullVideoFrames & Vcap_putEmptyVideoFrames

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Shary Li
    Posted by Shary Li
    on Dec 27 2012 19:05 PM
    Intellectual925 points

    Hi, I test capture-display, the capture Link is OK.

    8168 DVR_RDK
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Shary Li
    Posted by Shary Li
    on Dec 27 2012 19:12 PM
    Intellectual925 points

    CaptureLink_CreateParams           capturePrm;
        NsfLink_CreateParams               nsfPrm;
        IpcFramesOutLinkRTOS_CreateParams  ipcFramesOutVpssToHostPrm;
        IpcFramesInLinkHLOS_CreateParams   ipcFramesInHostPrm;

        CaptureLink_VipInstParams         *pCaptureInstPrm;
        CaptureLink_OutParams             *pCaptureOutPrm;

        UInt32 vipInstId;
        UInt32 i,j, chId;
        UInt32 numSubChains;

        MULTICH_INIT_STRUCT(IpcFramesOutLinkRTOS_CreateParams ,ipcFramesOutVpssToHostPrm);
        MULTICH_INIT_STRUCT(IpcFramesInLinkHLOS_CreateParams  ,ipcFramesInHostPrm);
        MULTICH_INIT_STRUCT(NsfLink_CreateParams, nsfPrm);

        MultiCh_detectBoard();

        System_linkControl(
            SYSTEM_LINK_ID_M3VPSS,
            SYSTEM_M3VPSS_CMD_RESET_VIDEO_DEVICES,
            NULL,
            0,
            TRUE
            );

        System_linkControl(
            SYSTEM_LINK_ID_M3VIDEO,
            SYSTEM_COMMON_CMD_SET_CH2IVAHD_MAP_TBL,
            &systemVid_encDecIvaChMapTbl,
            sizeof(SystemVideo_Ivahd2ChMap_Tbl),
            TRUE
            );

        gVcapModuleContext.captureId                 = SYSTEM_LINK_ID_CAPTURE;
        gVcapModuleContext.nsfId[0]                  = SYSTEM_LINK_ID_NSF_0;
        gVcapModuleContext.ipcFramesOutVpssToHostId  = SYSTEM_VPSS_LINK_ID_IPC_FRAMES_OUT_1;
        gVcapModuleContext.ipcFramesInHostId         = SYSTEM_HOST_LINK_ID_IPC_FRAMES_IN_0;

        CaptureLink_CreateParams_Init(&capturePrm);

        capturePrm.outQueParams[0].nextLink   = gVcapModuleContext.nsfId[0]; // gVcapModuleContext.ipcFramesOutVpssToHostId;
       // numSubChains                          = 2;
        capturePrm.numVipInst                 = 1;

        capturePrm.tilerEnable                = FALSE;
       // capturePrm.numBufsPerCh               = 10;
       // capturePrm.numExtraBufs               = 6;
        capturePrm.maxBlindAreasPerCh         = 4;

        for(vipInstId=0; vipInstId<capturePrm.numVipInst; vipInstId++)
        {
            pCaptureInstPrm                     = &capturePrm.vipInst[vipInstId];
            pCaptureInstPrm->vipInstId          = (SYSTEM_CAPTURE_INST_VIP0_PORTA + vipInstId)%SYSTEM_CAPTURE_INST_MAX;
            pCaptureInstPrm->videoDecoderId     = SYSTEM_DEVICE_VID_DEC_TVP7002_DRV; 

           pCaptureInstPrm->inDataFormat       = SYSTEM_DF_YUV422P;
            pCaptureInstPrm->standard           = SYSTEM_STD_1080P_60;
            pCaptureInstPrm->numOutput          = 1;

            pCaptureOutPrm                      = &pCaptureInstPrm->outParams[0];
            pCaptureOutPrm->dataFormat          = SYSTEM_DF_YUV422I_YUYV;
            pCaptureOutPrm->scEnable            = FALSE;
            pCaptureOutPrm->scOutWidth          = 0;
            pCaptureOutPrm->scOutHeight         = 0;
            pCaptureOutPrm->outQueId            = 0;
        }

            NsfLink_CreateParams_Init(&nsfPrm);
         nsfPrm.bypassNsf                    = TRUE;
         nsfPrm.inputFrameRate               = 60;
         nsfPrm.outputFrameRate              = 60;
         nsfPrm.tilerEnable                  = FALSE;
         nsfPrm.inQueParams.prevLinkId       = gVcapModuleContext.captureId;
         nsfPrm.inQueParams.prevLinkQueId    = 0;
         nsfPrm.numOutQue                    = 1;
            nsfPrm.outQueParams[0].nextLink     = gVcapModuleContext.ipcFramesOutVpssToHostId;
         nsfPrm.numBufsPerCh                 = 6;

         /*  ipcFrames  */
         ipcFramesOutVpssToHostPrm.baseCreateParams.noNotifyMode                = TRUE; //FALSE;
         ipcFramesOutVpssToHostPrm.baseCreateParams.notifyNextLink              = FALSE; //TRUE;
         ipcFramesOutVpssToHostPrm.baseCreateParams.notifyPrevLink              = TRUE;
         ipcFramesOutVpssToHostPrm.baseCreateParams.inQueParams.prevLinkId      = gVcapModuleContext.nsfId[0]; // gVcapModuleContext.captureId;
         ipcFramesOutVpssToHostPrm.baseCreateParams.inQueParams.prevLinkQueId   = 0;
         ipcFramesOutVpssToHostPrm.baseCreateParams.outQueParams[0].nextLink    = gVcapModuleContext.ipcFramesInHostId;

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

         ipcFramesInHostPrm.cbCtx = &gVcapModuleContext;
         ipcFramesInHostPrm.cbFxn = Vcap_ipcFramesInCbFxn;

         System_linkCreate (gVcapModuleContext.captureId, &capturePrm, sizeof(capturePrm));
          System_linkCreate(gVcapModuleContext.nsfId[0], &nsfPrm, sizeof(nsfPrm));
         System_linkCreate(gVcapModuleContext.ipcFramesOutVpssToHostId, &ipcFramesOutVpssToHostPrm, sizeof(ipcFramesOutVpssToHostPrm));
         System_linkCreate(gVcapModuleContext.ipcFramesInHostId, &ipcFramesInHostPrm, sizeof(ipcFramesInHostPrm));
     }

    The thread is VcapVenc_ipcFramesCreate(usecase) which will get rid of display.

    8168 DVR_RDK
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Badri Narayanan
    Posted by Badri Narayanan
    on Dec 27 2012 20:47 PM
    Mastermind24065 points

    You have to add Vcap_start.ALso you have to modify /dvr_rdk/demos/mcfw_api_demos/mcfw_demo/demo_vcap_venc_vdis_ipc_frames_exch.c

    Comment out call to Vdis_putFullVideoFrames & Vdis_getEmptyVideoFrames..Also make sure you are invoking VcapVenc_ipcFramesCreate

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Badri Narayanan
    Posted by Badri Narayanan
    on Dec 27 2012 22:14 PM
    Mastermind24065 points

    What is the problem you are facing

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Shary Li
    Posted by Shary Li
    on Dec 27 2012 22:34 PM
    Intellectual925 points

    Hi, it stops  in  [m3video]  Channel:0 inputframerate:30 targetfps:30.        And it seems not receive data.   Can you help me.

    [host] MCFW_IPCBITS:VcapVencVdecVdis_ipcBitsSendFxn:Entered... [m3video]  44348: IPC_IN_M3   : Create in progress !!!
     [m3video]  44348: SYSTEM: Opening ListMP [VPSS-M3_IPC_OUT_0] ...
     [m3video]  44348: SYSTEM: Opening ListMP [VPSS-M3_IPC_IN_0] ...
     [m3video]  44350: IPC_IN_M3   : Create Done !!!
     [m3video]  44351: ENCODE: Create in progress ... !!!
     [m3video]  44428: ENCODE: Creating CH0 of 1920 x 1080, pitch = (1920, 1920) [PROGRESSIVE] [NON-TILED  ], bitrate = 2000 Kbps ...

     [host] IpcBitsInLink_tskMain:Entered
     [host]  3770: IPC_BITS_IN   : Create in progress !!!

     [host]  3770: IPC_BITS_IN   : ListMPOpen start !!!

     [host]  3770: SYSTEM: Opening ListMP [VIDEO-M3_IPC_OUT_28] ...
     3772: SYSTEM: Opening ListMP [VIDEO-M3_IPC_IN_28] ...

     [host]  3773: IPC_BITS_IN   : ListMPOpen done !!!

     [host]  3775: IPC_BITS_IN   : System_linkGetInfo done !!!

     [host]  3775: IPC_BITS_IN   : Create Done !!!
     DEMO: No video detected at CH [0] !!!

     =============
     Run-Time Menu
     =============

     1: Capture Settings
     2: Encode  Settings
     3: Decode  Settings
     4: Display Settings
     5: Audio   Capture / Playback Settings

     6: Audio Capture <TVP5158> & Encode <AAC-LC> demo
     7: Audio encode demo <AAC-LC File In/Out>
     8: Audio decode demo <AAC-LC File In/Out>

     i: Print detailed system information
     s: Core Status: Active/In-active

     e: Stop Demo

     Enter Choice:  [m3video] ENCLINK_H264:HEAPID:0 USED:13808
     [m3video] ENCLINK_H264:HEAPID:3        USED:9535488
     [m3video]  44473: ENCODE: All CH Create ... DONE !!!
     [m3video] ENCLINK:HEAPID:0     USED:13928
     [m3video] ENCLINK:HEAPID:2     USED:16588800
     [m3video] ENCLINK:HEAPID:3     USED:9535488
     [m3video]  44474: ENCODE: Create ... DONE !!!
     [m3video]  Channel:0 inputframerate:60 targetfps:30
     [m3video]  44475: IPC_BITS_OUT   : Create in progress !!!
     [m3video]  44477: IPC_BITS_OUT   : Create Done !!!
     [m3video]  Channel:0 inputframerate:30 targetfps:30

    8168 DVR_RDK
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Badri Narayanan
    Posted by Badri Narayanan
    on Dec 28 2012 01:02 AM
    Mastermind24065 points

    In the file you shared the issue is in file mcfw_cap_enc.txt

    capturePrm.outQueParams[0].nextLink = gMultiCh_VcapVencVdisObj.ipcOutVpssId is wrong. CHange it to

    capturePrm.outQueParams[0].nextLink =  gVcapModuleContext.nsfId

    Also make sure you modify VcapVenc_ipcFramesSendRecvFxn to comment out Vdis_putFullVideoFrames & Vdis_getEmptyVideoFrames

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Shary Li
    Posted by Shary Li
    on Dec 28 2012 01:08 AM
    Intellectual925 points

    Hi, Badri.

    I have changed the nextLink to nsfId[0].

    I don't need to send data to A8, so I don't use VcapVenc_ipcFramesCreate(useCase);

    I need to write 264 file, so I only use the thread VcapVenc_bitsWriteCreate();

    the result is same.

    8168 DVR_RDK
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
123
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use