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.

  • Resolved

H.264 Encoder and RTP

I want a demo that do H.264 encoder and send bitstream in RTP packet to Host. Where can I got it ? 

I study sv01, but it's complicated. 

My question is:

1. sv01 is build based on mingw, how to convert it to a ccs_based project? and then modify and debug?

2. It seems that there's RTP lib in sv01. How to add RTP to  transcode demo or "C:\Program Files\Texas Instruments\Codecs\C66x_h264venc_01_24_00_01_ELF\packages\ti\sdo\codecs\h264venc\App\Client\Build\TestAppEncoder\"  ?

  • In reply to Hongmei Gou:

    Hongmei, sorry to disturb u. 

    I've modified sv04_ccs following step2~4, but havn't compile success.

    "gg_rcu_ctable、vppuContext " are defined in ggvideocfg.c,  if I add ggvideocfg.c to sv04, siuVigdkLoc.h will be included, whichi is conflicted with siuVctLoc.h.

    Are there documents that describe the flow of sv01/sv04/RTP? 

    I'm not familiar with the flow of the program and just follow your instructions.

    what's the relations of siu_*** and vppu ? and also so many abbreviation without explaination, such as gg**, siu**, HDCT
    and  there are really difficulties.

  • In reply to dp:

    Hi dp,

    ggVideocfg.c and ggVideoCfg.h are used for sv01, while ggCodecTestCfg.c and ggCodecTestCfg.h are for sv04. So, instead of add ggVideocfg.c to sv04, we can add gg_rcu_ctable, vppuContext, and etc. in ggCodecTestCfg.*, similar to what have been included in ggVideocfg.* When making such addition to ggCodecTestCfg.* for sv04, further changes can be needed for the following sv04 files: dsp\ggcfg\build\hdg\sv04\ggswcfg.h; examples\sv04\source\ggmemdef.c; examples\sv04\include\ggmemmap.h; examples\sv04\linker.cmd. You can refer to their corresponding files in sv01 for the code changes needed: dsp\ggcfg\build\hdg\sv01: ggswcfg.h; ggmemdef.bec; ggmemmap.beh; ggvf0.becmd.

    Please try with the above changes to see if the compilation can go through.

    Thanks,

    Hongmei

  • In reply to Hongmei Gou:

    Hongmei,
    I have compared and modify \sv04\ggswcfg.h, and add gg_rcu_ctable, but it compile error
    Error: not define "gmpAllocGmc", "gmpFreeGmc", "siuRxVideoPost",
    I add siuVigdkCodecMgr.c to solve this error.
    what's the meaning of "Vigdk"?
    what's the file of *.beh *.bec? Do I need to add #define and MACRO from *.beh to ggmemmap.h?
    How to understand the flow quickly?
    Thanks.
    dp

  • In reply to dp:

    Hi dp,

    Since you are using only VPPU-Tx, you can replace gmpAllocGmc, gmpFreeGmc, and siuRxVideoPost with NULL in vppuContext after adding it in dsp\gg\ggCodecTestCfg.c. Those functions are used only by VPPU-Rx. Meanwhile, please remove siuVigdkCodecMgr.c from your project. *Vigdk files are for sv01.

    sv01 is a multi-core and multi-channel application. *.beh, *.bec, *.becmd files are parsed by Active Perl during the making process so that .c, .h, and .cmd files can be generated for multi-core and multi-channel use case. One example is shown as below. For the transcode and sv04 CCS projects, since there are at most two channels, we are directly using .c, .h, and .cmd files. 

    Example:

    In dsp\ggcfg\build\hdg\sv01\ggvf0.becmd:

    /*----------------------------------------------------------------------------*/
    /* foreach $ch in (1..NUMCH) expand */
    /*----------------------------------------------------------------------------*/
    DATA_CH$(ch) : origin = $(0xF0000000 + (($(ch)-1) * 0xB00)), length = 0xB00 /* Remember to change ggmemmap.beh */
    /* endfor $ch */

    dsp\mkrel\c64x\ggvf0.cmd which is generated when making sv01:

    /*----------------------------------------------------------------------------*/
    /* Expanding $ch = 1 */
    /*----------------------------------------------------------------------------*/
    DATA_CH1 : origin = 4026531840, length = 0xB00 /* Remember to change ggmemmap.beh */
    /* End expansion $ch = 1 */
    /* Expanding $ch = 2 */
    /*----------------------------------------------------------------------------*/
    DATA_CH2 : origin = 4026534656, length = 0xB00 /* Remember to change ggmemmap.beh */
    /* End expansion $ch = 2 */
    /* Expanding $ch = 3 */
    /*----------------------------------------------------------------------------*/
    DATA_CH3 : origin = 4026537472, length = 0xB00 /* Remember to change ggmemmap.beh */
    /* End expansion $ch = 3 */

    ......

    Thanks,

    Hongmei

  • In reply to Hongmei Gou:

    Hi Hongmei, 

    I've re-modify the sv04 project step by step follow aforementioned instructions.

    The compile errors are snapshoted as follows: 

     Thanks.

     dp 

  • In reply to dp:

    Hi,

    the above "undefine symbol" error has been avoid by adding correspond libary.

    But there still "undefine symbol" errors, and I don't know which library to be included.

    /************************************************/

    **** Build of configuration Debug for project sv04ccs ****
    C:\Program Files\Texas Instruments\ccsv5\utils\gmake\gmake -k all
    'Building target: sv04.out'
    'Invoking: C6000 Linker'
    "C:/Program Files/Texas Instruments/C6000 Code Generation Tools 7.2.4/bin/cl6x" -@"ccsLinker.opt" -o "sv04.out"

     undefined                first referenced 
     symbol                         in file 
     ---------               ---------------- 
     Osal_paMtCsEnter    C:\Program Files\Texas Instruments\pdk_C6678_1_0_0_20\packages\ti\drv\pa\lib\ti.drv.pa.ae66<pa.oe66> 
     Osal_paMtCsExit      C:\Program Files\Texas Instruments\pdk_C6678_1_0_0_20\packages\ti\drv\pa\lib\ti.drv.pa.ae66<pa.oe66> 

     Sa_chanClose          C:\Program Files\Texas Instruments\nwal_c66x_1_0_0_1\ti\drv\nwal\lib\ti.drv.nwal.sa.ae66<nwal_sec.oe66> 
    >> Compilation failure
    Sa_chanGetBufferReq C:\Program Files\Texas Instruments\nwal_c66x_1_0_0_1\ti\drv\nwal\lib\ti.drv.nwal.sa.ae66<nwal_sec.oe66>
     Sa_chanGetID          C:\Program Files\Texas Instruments\nwal_c66x_1_0_0_1\ti\drv\nwal\lib\ti.drv.nwal.sa.ae66<nwal_sec.oe66> 
     Sa_close                 C:\Program Files\Texas Instruments\nwal_c66x_1_0_0_1\ti\drv\nwal\lib\ti.drv.nwal.sa.ae66<nwal_init.oe66> 
     Sa_create                C:\Program Files\Texas Instruments\nwal_c66x_1_0_0_1\ti\drv\nwal\lib\ti.drv.nwal.sa.ae66<nwal_sec.oe66> 
    Sa_downloadImage     C:\Program Files\Texas Instruments\nwal_c66x_1_0_0_1\ti\drv\nwal\lib\ti.drv.nwal.sa.ae66<nwal_sec.oe66> 
     Sa_getBufferReq       C:\Program Files\Texas Instruments\nwal_c66x_1_0_0_1\ti\drv\nwal\lib\ti.drv.nwal.sa.ae66<nwal_sec.oe66> 
     Sa_resetControl        C:\Program Files\Texas Instruments\nwal_c66x_1_0_0_1\ti\drv\nwal\lib\ti.drv.nwal.sa.ae66<nwal_sec.oe66> 
     Sa_start                  C:\Program Files\Texas Instruments\nwal_c66x_1_0_0_1\ti\drv\nwal\lib\ti.drv.nwal.sa.ae66<nwal_sec.oe66> 
     getRfcAPI                C:\Program Files\Texas Instruments\mcsdk_video_2_0_0_10\components\ti\mas\vppu\ce66\vppu_c.ae66<vppu.oe66> 
     rcuContext               C:\Program Files\Texas Instruments\mcsdk_video_2_0_0_10\components\ti\mas\rcu\ce66\rcu_rfc355x_c.ae66<rcutxrx.oe66>
     rcuRtcpContext         C:\Program Files\Texas Instruments\mcsdk_video_2_0_0_10\components\ti\mas\rcu\ce66\rcu_rfc355x_c.ae66<rcurtcp.oe66>
     rfcGetMaxInstSize     C:\Program Files\Texas Instruments\mcsdk_video_2_0_0_10\components\ti\mas\vppu\ce66\vppu_c.ae66<vppuinit.oe66> 
     siu_new_vppu          ./siuVctInit.obj 

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "sv04.out" not built
    gmake: *** [sv04.out] Error 1
    gmake: Target `all' not remade because of errors.

    /*************************************************/ 

  • In reply to dp:

    Hi dp,

    From your log, you are using "pdk_C6678_1_0_0_20". However, MCSDK Video 2.0 is built on pdk_C6678_1_0_0_17. Please correct this, and the undefined symbols for PA and NWAL should be resolved after that.

    For getRfcAPI and rfcGetMaxInstSize, they are from components\ti\mas\rfcs module. Can you please check if "ti/mas/rfcs/ce66/rfcs_c.ae66" in linked in the project?

    For rcuContext  and  rcuRtcpContext, they are in dsp\gg\ggCodecTestCfg.c, but commented out for sv04. Please include them by doing the following:

    rcuContext:

    In dsp\ggcfg\build\hdg\sv04\ggswcfg.h:

    //#define GG_INCLUDE_RTP --> #define GG_INCLUDE_RTP

    Also please replace the following entries in rcuContext (ggCodecTestCfg.c) with NULL: siu_video_stm_search, siuVigdkReportPktViolation, gmpAllocGmc, gmpFreeGmc, gmpCreate, gmpDelete, gmpWrite, gmpRead

    rcuRtcpContext: 

    In ggCodecTestCfg.c:

    ...

    #if 0 --> #if 1
    rcuRtcpContext_t rcuRtcpContext = {

    ...

    I am assuming RTCP is not required for your demo. So, you can set the entries to NULL or  0 if there are any compilation/linking error related to entries in rcuRtcpContext.

    For siu_new_vppu, please add dsp\siu\ecodrv\siuvppu.c to the project. In this file, you can comment out the code inside siuVppuGetStats(). siu_open_vppu needs to be simplified for VPPU_TX only.

    Thanks,

    Hongmei

  • In reply to Hongmei Gou:

    Hi,

    After adding dsp\siu\ecodrv\siuvppu.c to the project, there are errors like below:
    /***********************************************/
    "../siuvppu.c", line 169: error #20: identifier "siuVideoChannelOperation_t" is undefined

    "../siuvppu.c", line 179: error #20: identifier "gg_rcu_ctable" is undefined
    >> Compilation failure
    "../siuvppu.c", line 190: error #20: identifier "siuVideoChannelOperation_t" is undefined
    "../siuvppu.c", line 199: error #20: identifier "SIU_CHTYPE_ENCODER" is undefined
    "../siuvppu.c", line 228: error #20: identifier "siuVideoChannelOperation_t" is undefined
    "../siuvppu.c", line 232: warning #225-D: function declared implicitly
    "../siuvppu.c", line 242: error #20: identifier "siuVideoChannelOperation_t" is undefined
    "../siuvppu.c", line 247: error #20: identifier "SIU_CHTYPE_DECODER" is undefined
    7 errors detected in the compilation of "../siuvppu.c".
    gmake: *** [siuvppu.obj] Error 1
    'Building file: ../source/ggmbuf.c'
    'Invoking: C6000 Compiler'
    "C:/Program Files/Texas Instruments/C6000 Code Generation Tools 7.2.4/bin/cl6x" -@"source/ggmbuf_ccsCompiler.opt"
    "../source/ggmbuf.c", line 621: error #20: identifier "GG_RCU_B0_C1_START" is undefined
    "../source/ggmbuf.c", line 621: error #42: expression must have arithmetic or pointer type

    "../source/ggmbuf.c", line 621: error #20: identifier "GG_RCU_B0_C1_L" is undefined
    >> Compilation failure
    "../source/ggmbuf.c", line 622: error #20: identifier "GG_RCU_B1_C1_START" is undefined
    "../source/ggmbuf.c", line 622: error #42: expression must have arithmetic or pointer type
    "../source/ggmbuf.c", line 622: error #20: identifier "GG_RCU_B1_C1_L" is undefined
    "../source/ggmbuf.c", line 623: error #20: identifier "GG_RCU_B2_C1_START" is undefined
    "../source/ggmbuf.c", line 623: error #42: expression must have arithmetic or pointer type
    "../source/ggmbuf.c", line 623: error #20: identifier "GG_RCU_B2_C1_L" is undefined
    "../source/ggmbuf.c", line 1580: error #20: identifier "GG_RCU_B0_C2_START" is undefined
    "../source/ggmbuf.c", line 1580: error #42: expression must have arithmetic or pointer type
    "../source/ggmbuf.c", line 1580: error #20: identifier "GG_RCU_B0_C2_L" is undefined
    "../source/ggmbuf.c", line 1581: error #20: identifier "GG_RCU_B1_C2_START" is undefined
    "../source/ggmbuf.c", line 1581: error #42: expression must have arithmetic or pointer type
    "../source/ggmbuf.c", line 1581: error #20: identifier "GG_RCU_B1_C2_L" is undefined
    "../source/ggmbuf.c", line 1582: error #20: identifier "GG_RCU_B2_C2_START" is undefined
    "../source/ggmbuf.c", line 1582: error #42: expression must have arithmetic or pointer type
    "../source/ggmbuf.c", line 1582: error #20: identifier "GG_RCU_B2_C2_L" is undefined
    18 errors detected in the compilation of "../source/ggmbuf.c".
    gmake: *** [source/ggmbuf.obj] Error 1
    gmake: Target `all' not remade because of errors.
    /***********************************************/

    The siuVideoChannelOperation_t is defined in siuvigdkloc.h.
    Should I include siuvigdkloc.h or modify siuVctLoc.h ?
    And how about GG_RCU_B*** errors ?

    Regards,
    dp

  • In reply to dp:

    Hi Hongmei,

    I add following code to siuEncapConfig() in \dsp\siu\vct\src\siuVctInit.c

    if(inst->net.rcuInst == NULL) { /* NEW&OPEN for RCU go together */
    siu_new_rcu (message->header.chnum);
    siu_open_rcu (message->header.chnum);
    }
    siu_rtp_encap_config (inst, &message->msg_body.encap_config.encap_params.rtp);

    and add siurtpinit.c to sv04 project, but cannot find the head file:

    #include <ti/mas/fiu/fiu.h>


    Thanks,

    dp

  • In reply to dp:

    Hi dp,

    We are working on adding RTP in sv04, and have successfully built the .out file. DSP can also send out RTP packets for the encoded frames. We are in the process of reviewing and finalizing the changes. We will provide an updated package once it is ready.

    Thanks,

    Hongmei

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.