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.

H.264 Encoder and RTP

Other Parts Discussed in Thread: SYSBIOS

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\"  ?

  • Hi dp,
    Can you please provide more details about your demo? Is it single channel (codec instance) with H.264 encoder? If it is encoder only, where is the YUV data coming from? Is the demo on evm6678l or DSPC8681?
    Assuming your target is single channel H.264 encoder_only and YUV data can come from TFTP, we can start with the transcode CCS example to bring in RTP processing:
    1) If it is Encode only, need to comment out the code for decoding in examples\transcode\source\videoTranscodeDecEnc.c. Also note that the code for reading YUV input for encoder is different from reading input for decoder. Please refer to dsp\siu\vct\siuVctEncode_xdm0p9.c to see how siuVct_ReadInputData() is used for reading YUV data for encoder. As the first step, we would recommend to keep the decoder and use H264 clip as the input.
    2) Additional components are needed for RTP processing. Please add the following items in Project Properties->C6000 Linker->File Search Path: --library
    "ti/mas/rfcs/ce66/rfcs_c.ae66"
    "ti/mas/vppu/ce66/vppu_c.ae66"
    "ti/mas/rcu/ce66/rcu_rfc355x_c.ae66"
    3) Replace TFTP-PUT with VPPU-TX for RTP processing
    In the current transcode example, siuVct_WriteOutputData() is called after the encoding to send the encoded output via TFTP. siuVct_WriteOutputData() then calls siuVctTftpPutData(), which then calls siu_put_tftp(). In order to support RTP processing, instead of calling siu_put_tftp(), vppuSendIn() should be used. 
    a) APIs for the VPPU component can be found in components\ti\mas\vppu\vppu.h. 
    b) vppuSendIn() use in sv01: dsp\siu\video\siuVigdkTxVideo.c siuTxVideoEncoderProcess() function.
    c) Call chanin from VPPU-TX: VPPU-TX --> RCU-TX --> NEU-TX. For comparion, the call chain with TFTP is: TFTP-TX-->NEU-TX.
    4) Create and open instances for VPPU and RCU 
    In order to use VPPU/RCU to support RTP processing, need to first ccreate and open their instances, similr to NEU has been used in video transcode example.
    a) Add VPPU/RCU instances and related variables in siuInst_t defined in dsp\siu\vct\src\siuVctLoc.h. 
    Reference in sv01: siuInst_t in dsp\siu\video\siuVigdkLoc.h, and below are some example instances:
    ...
    void *vppuInst;
    ...
    void  *rcuInst;
    ...
    b) Scan the funtion calls in dsp\siu\vct\src\siuVctInit.c for message processing, i.e., the for loop after "/* Execute messages */". If a function call is implemented in both dsp\siu\vct and another directory in dsp\siu, compare both implementations, and then modify/add the stuff needed for RTP processing (VPPU, RCU, and etc.). Using siuVideoMode() as the example, it's implemented in both dsp\siu\vct\src\siuVctInit.c and dsp\siu\video\siuVigdk.c. The following code may need to be added in dsp\siu\vct\src\siuVctInit.c for RTP processing:
    ...
    siu_new_vppu(chnum);
    siu_open_network (chnum, gg_vppu_ctable.vppuReceiveIn, inst->stateInst.video.vppuInst, TRUE);
    ...
    The above gives the basic idea of adding RTP processing in the transcode example. As we have not implemented it, there can be gaps. Please let us know if there are any difficulties.
    Thanks,
    Hongmei
  • Hongmei, thanks for your quick reply.
    I want EVM6678L do a single channel with H.264 encoder and output bitstream via RTP/RTCP, and the VLC on PC could play it real-timely.
    In the future, JPEG/MJPEG codec maybe added.
    And no audio codec.
    The YUV data may come from PC via ethernet or from other board via SRIO.
    As you say, in the first it's OK to keep the decoder and use H264 clip as the input.

    In the mcsdk_vide, especially sv01, there're too many abbreviation without explanation. such as siu, vigdk, mgb, and so on.
    It's very difficulty to understand and modify.

    My questions are:
    1. Transcode demo + RTP output, then VLC on PC could open rtsp stream from C6678 ?
    2. How to use VPPU/RCU/NEU module? Is there any sample code?
    3. How could I accelerate the process of estimating and implementing this demo ?

  • Hi dp,

    You mentioned the requirement of "real-time" for your demo. Then, what is the resolution for H.264 encoding? Is it QCIF, CIF, D1, or HD? What is your target frame rate?

    Thanks,

    Hongmei

  • Hi Hongmei,

    My demo is for evaluation, and my goal is H.264 encode 1080p at 15fps. 

    But at first, I need to get this demo done.

  • Hi dp,

    1080p H264 encoding@15fps needs 2-3 cores for the encoding itself. Since the transcode example in CCS is a single-core demonstration, it may not be suitable for further developing your demo.

    Instead, a better starting point would be sv04: codec integration and test application (http://processors.wiki.ti.com/index.php/MCSDK_VIDEO_2.0_CODEC_TEST_FW_User_Guide). sv04 supports mullti-core H.264BP encoding and also the mode of encoding only. Similar to the transcode example, it also uses TFTP for data I/O. Therefore, the steps 2)-4) for adding RTP support in our earlier reply are still applicable to sv04. sv04 is built with MinGW. After getting the sv04.out, it can be loaded in CCS and then debugged in the same way as a .out file from a CCS project.

    From sv04, the first step can be focusing on adding RTP for the encoded output while still using TFTP to get the YUV input. Then, the TFTP-GET can be replaced with a faster data input method.

    For your earlier questions: 1) RTP output can be played out via MPlayer on a PC, as demonstrated in MCSDK Video real-time demo (http://processors.wiki.ti.com/index.php/MCSDK_VIDEO_2.0_Demo_Guide). VLC should work also. 2) NEU module has been integrated an used in both the transcode example and sv04. Sample code of VPPU and RCU can be found from sv01.

    Thanks,

    Hongmei

  • Thanks Hongmei,

    My demo  will integrate other peripheral's driver ( such as srio, spi and so on) that are all ccs/bios based.  And I'm not familiar with MinGW-based-projects, and don't know how to modify or debug it.

    My questions are: 

    1. What's the difference between sv01 and sv04? What source files they include? How to add or modify codecs? why ti afford such MinGW-based-projects?

    2. Which demo should I start?  

  • Hi dp,

    sv01 is a full-fledged video demo which has such features as: 1) multiple C6678 video codecs (as seen @ dsp\vtk\codecs) are integrated, 2) supports multiple transcoding channels; 3) supports multiple resolutions from QCIF to 1080p; 4) supports three channel models: encode only, decode only, and transcode; 5) supports core-core transcoding and multi-core encoding/decoding; 6) demo runs in real-time.

    sv04 is developed for integrating and testing individual codecs with data IO via TFTP. It is single video channel, and each testing is for a single codec as configured in ...\dsp\siu\vct\tftp.cfg. Adding a codec to sv04 is straightforward as described in http://processors.wiki.ti.com/index.php/MCSDK_VIDEO_2.0_CODEC_TEST_FW_User_Guide#Integrating_new_Codec_into_the_build. In MCSDK Video 2.0, H264BP encoder and H264HP decoder have been integrated in sv04, and can be used as is.

    For your use case of 1-channel 1080p H264 encoding, we would like to recommend starting with sv04. One way to identify the source files is making sv04 with "FLAT=YES". After the compilation is completed, you can get the list of files from what are included in dsp\mkrel\sv04\flat directory. 

    If a source file of sv04 is modified, you can just rerun the make command to rebuild sv04.out. sv04 make instructions can be found from http://processors.wiki.ti.com/index.php/MCSDK_VIDEO_2.0_CODEC_TEST_FW_User_Guide#Make_Instructions. For sv04 debugging, as sv04.out is loaded through CCS, it can be debugged in the same way as a .out file from a CCS project.

    Thanks,

    Hongmei

  • Hi dp,

    We created a CCS project for sv04 as attached below. Please unzip it as ..\examples\sv04 directory and try it out. Detailed instructions can be found from <MCSDK video install diretory>\examples\sv04\Readme.txt.

    1881.sv04.zip

    Also please get the patch as described in http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/188748.aspx (3108.components.zip) if you saw the same issue as reported in the post.

    Hope this can help developing your demo. Please let us know if there are any issues.

    Thanks,

    Hongmei

  • Hongmei,
    Thanks for your work.
    I followed the steps 2)-4) to add RTP support for sv04, but there isn't "Project Properties->C6000 Linker->File Search Path". I try to add to "Project Properties->C/C++ General->Path and Symbols->Libraries", but it build err.
    Could make sure of that?
    dp

  • Hi dp,

    Please find how to add libs (--library) from the screen capture attached below:

    4670.LinkLib.zip

    Thanks,

    Hongmei

  • 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.

  • 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

  • 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

  • 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

  • Hi Hongmei, 

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

    The compile errors are snapshoted as follows: 

     Thanks.

     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.

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

  • 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

  • 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

  • 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

  • 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

  • Hi dp,
    Attached below please the patch for adding RTP processing in the SV04 CCS project. Please unzip sv04.zip as ..\examples\sv04 directory and dsp.zip as ..\dsp directory, and try it out.
    A few notes:
    1) tftp.cfg and multiclip.cfg are copied to examples\sv04\source directory, and therefore examples\sv04\Debug\sv04.out can be directly loaded and run without copying back to dsp\mkrel\sv04\flat. Please modify examples\sv04\source\tftp.cfg & multiclip.cfg for your setup and clip configuration.
    2) Code changes are made for supporting testing of H264BP encoder @ various resolutions: QCIF, CIF, D1, 720p, and 1080p without rebuilding sv04.out. In tftp.cfg, we can specify corresponding encResolution: 1080p, 720p, or non-HD. Then, after loading sv04.out, the following parameters can be changed in Watch window to configure resolution, frame rate, and bit rate: image_height; image_width; frame_rate; intra_frame_interval; bit_rate. These parameters are globals defined in dsp\siu\vct\codec\encoder\h264\vctH264EncClient.c.
    3) Several parameters can be adjusted according to your application, including 
    a) In dsp\siu\vct\src\siuVctVppu.c, frameRate is set to 15 using a global variable. It is used for calculating the increment of timestamp for frames.
    b) In dsp\siu\vct\src\SiuVctInit.c, VPPU config parameters are set in siuCommitState(), such as codingType, txInitTimeStamp, and inputStreamFormat
    c) In dsp\siu\vct\src\siuVctInit.c: TxSyncSrc is set to 0x00000064, and txInitTimeStamp is set to 0 using global variables.
    4) Verification: input data is from TFTP_GET as in the original sv04; encoded output is sent out as RTP packets through VPPU-RCU-NEU. The sent-out RTP packets can be captured via Wireshark. One example capture is attached below. To avoid RTP packet loss, especially for HD clips, please use Giga bit network card on your testing PC.
    The code changes can be found from diff of the baseline and the patch. Hope this can help develop your demo and add additional modules. Please let us know if there are any problems.
    Thanks,
    Hongmei
  • Thanks Hongmei,

    The demo could send rtp, but when I use vlc to receive rtp, vlc display in a mess.

    I use vlc to open sdp file as belows:

    m=video 32770 RTP/AVP 96
    a=rtpmap:96 H264
    a=framerate:15
    c=IN IP4 192.168.42.49 

     And more, could vlc receive rtp via url instead of sdp file ?

     

    dp 

  • dp,

    VLC typically has problem receiving H264 RTP stream (without additional hinting via container mov/avi/ts etc). VLC can however decode other codecs properly. Please use mplayer to receive the stream. You can invoke command line as mplayer sdp://sdpfile.sdp -fps 30

    Regards,

    Vivek

  • Hi dp,

    Using MPlayer as Vivek suggested, we verified QCIF playout with the attached batch file and sdp file. Please modify them accordingly to test with your setup. When testing with different resolutions, the last line of the sdp file such as "sprop-parameter-sets" needs to be set correspondingly. Some reference sdp files can be found from MCDSK Video release: demos\demoroot\Reference\config\demo1\sdp: for CIF & QCIF

    demos\demoroot\Reference\config\demo2\sdp: for 1080p

    0218.H264Play.zip

    Thanks,

    Hongmei

  • Hi Hongmei & Vivek,

    Following your instructions, mplayer could get and play RTP at 1920x1088 well. However, still some questions:
    1.how to calc the fps at the pc side ?
    2.Since the frame_rate is determined by encoder power of core, what's meaning of the frame_rate which is defined in vctH264EncClient.c ?
    3.when use multicore(such as 4 cores, in tftp.cfg) to do H.264 encoder, mplayer display mess, what's wrong ?

    Thanks.

    dp

  • Hi dp,

    There are several factors for the frame rate the system can achieve:

    1) Frame rate of the input (determined by the SRIO throughput in your case)

    2) Cycle performance of the codec and the CPU clock (H264BP encoder is a multi-core codec, and the desired FPS for a particular resolution, e.g. 1080p@30fps, can be achieve by using multiple cores as needed)

    frame_rate in vctH264EncClinet.c is applied to two dynamic parameters of the codec: refFrameRate and targetFrameRate. Along with another dynamic parameter targetBitRate, they are used for rate control inside the encoder.

    So, if the target frame rate of a system is 1080p@15fps, we need to have: 1) 1080p input is coming at 15fp; 2) frame_rate in vctH264EncClinet.c is configured as 15fps; 3) 2-3 cores used for the encoding; 4) frameRate in siuVctVppuPutData() is set as 15fps to get the corresponding timestamp increment.

    For issue #3 with multicore testing, please make the following change in siuVctEncode_xdm0p9.c to resolve it:

    Currently master core calls siuVct_WriteOutputData() multiple times (one per core) to send the output data. Instead of this, master core shall assemble the output data from Core 0 to Core N in a big buffer, and then call siuVct_WriteOutputData() just once to send out the assembled output data for the frame.

    Thanks,

    Hongmei

  • Hongmei,

    Thanks for all your help. Without you, we move tardily.

    Regards,

    dp

      

  • hi, dp.

    I also met the same problem. I want to add AVS in this project. 

    just like you, I hope create a project not use minGw, can you give me some advice?

    thank you

  • Hi,Hongmei:

    I download the sv04  ccs project which you supply in the attached files .But when I

    compiled errors come like below:

    js: "C:/ti/framework_components_3_22_00_05/fctools/packages/xdc/runtime/System.xs", line 52: xdc.services.global.XDCException: xdc.cfg.USE_MODULE_PARAMETER_ERROR: The first parameter of an xdc.useModule() call must be a string
        "C:/ti/bios_6_32_05_54/packages/ti/sysbios/xdcruntime/Settings.xs", line 93
        "C:/ti/bios_6_32_05_54/packages/ti/sysbios/BIOS.xs", line 247
        "C:/ti/bios_6_32_05_54/packages/ti/sysbios/family/c64p/Hwi.xs", line 97
        "C:/ti/bios_6_32_05_54/packages/ti/sysbios/hal/Hwi.xs", line 59
        "C:/ti/bios_6_32_05_54/packages/ti/sysbios/family/c66/Cache.xs", line 248
        "C:/ti/bios_6_32_05_54/packages/ti/sysbios/hal/Cache.xs", line 53
        "C:/ti/framework_components_3_22_00_05/packages/ti/sdo/fc/memutils/package.xs", line 93
    gmake.exe: *** [package/cfg/sv04_pe66.xdl] Error 1
    js: "C:/ti/xdctools_3_25_02_70/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.
    gmake: *** [configPkg/compiler.opt] Error 1
    gmake: Target `all' not remade because of errors.

    I think I set correctly like below settings ,I don't know where make mistake my ccs version is CCS5.4.1

  • Hi David,

    MCSDK Video uses lite package of Framework Components (without fctools directory), and picks up XDAIS, EDMA3LLD, XDC from their own installers. Can you please try renaming or removing fctools under your FC installation directory (e.g., C:/ti/framework_components_3_22_00_05), and then clean and rebuild the project?

    Thanks,

    Hongmei

  • Hongmei Gou said:

    Hi David,

    MCSDK Video uses lite package of Framework Components (without fctools directory), and picks up XDAIS, EDMA3LLD, XDC from their own installers. Can you please try renaming or removing fctools under your FC installation directory (e.g., C:/ti/framework_components_3_22_00_05), and then clean and rebuild the project?

    Thanks,

    Hongmei

    Hi,Hongmei:

    My project has been compiled successfully.Thanks.But I have another new problem that

    I cannot download the mcsdk_video_2_0_0_10 which is needed by the project,I just can download

    the latest version from ti.com instead of the old one.Would you give me that link? thanks.

  • Hi David,

    Below please find the link: 

    http://software-dl.ti.com/sdoemb/sdoemb_public_sw/mcsdk_video/02_00_00_10/index_FDS.html

    Thanks,

    Hongmei

  • Hi,Hongmei:

    Thanks,I get the version what I want.

    Does the sv04ccs project you supply only suit for TCI6638 ?

    I know that the mcsdk video is applied on DSPC8681E or EVM6678.I am not sure

    on tci6638 which has 6678 core and A15 core.

  • Hi,Hongmei:

    Now I have succeeded building  sv04.out.Before I run sv04.out I have some

    questions needed to be resolved.To be more exact,I am not sure whether the project

    sv04ccs you supplied can be run on DSPC8681E instead of 6678EVM.Because I

    have no 6678EVM but DSPC8681E on my hand.Also,I find that the MCSDK VIDEO UG

    tell some steps to show how to setup hardware for 6678EVM.So,I want to know the similar 

    steps for DSPC8681E to run sv04.out.

    1.

    How to determine the mac address of DSP ? I know that the tftp.cfg give an sample mac address.

    But I don't think it's right for my DSPC8681E board.The origin mac address parameter is

    As to datasheet of DSPC8681E,there are four DSPs on board and only DSP0

    can connect with the devices outside the DSPC8681E.dsp1 dsp2 and dsp3 all

    connect with DSP0.  So,exactly ,what's the mac address of the DSP0?

    Without that mac address I cannot set the parameter of localmacaddress in the tftp.cfg.

    2.

    I noted that you must set the boot mode of 6678EVM with ROM Ethernet Boot in the User Guide.

    But as to DSPC8681E, How to set the boot mode of 8681? I cannot find the same mode(ROM Ethernet Boot)

    in datasheet of 8681.Below is the boot mode of 8681.

    So,Is it necessary to set boot mode with ROM Ethernet Boot?

    Hongmei,Above are two points which I can think of before I run sv04.out on DSPC8681E.I think

    they are not enough.If you know them please inform me.Thanks.Without the answers of above

    two questions I don't know how to run sv04.out.

  • Hi,Hongmei:

    I run sv04.out on tci6638 dsp_6678.it hung up in the siuGmacnduInit

    when I call siuNduStart in the siuSwInit and in the siuMain.

    The program cannot reach the siuVctRunTask.I don't know why?

    I connect my PC and 6678 DSP with a cisco router .

  • Hi David,

    Which device would you like to run MCSDK Video: DSPC8681E or TCI6638? Please also provide some details about your application, such as what codecs will be used? What is the resolution and FPS? What is the data IO? 

    The latest MCSDK Video (http://software-dl.ti.com/sdoemb/sdoemb_public_sw/mcsdk_video/02_02_00_33/index_FDS.html) has provided out of box demos for DSPC8681E over PCIe. On the other hand, the sv04 CCS project you asked is based on an old release of MCSDK Video and supports TFTP data IO only. What is the motivation of using this old sv04 CCS project?

    Thanks,

    Hongmei

  • Hi,Hongmei:

    My goal is run a demo TFTP input + H264 HP encode + RTP tx.Then I can

    using mplayer or vlc to display the bitstream in real-time.I think sv04ccs meet my

    need.So I want to run sv04ccs you supply,But I don't have 6678EVM,

    I just have DSPC8681E and tci6638.

    Would you please reply my question below one by one ? thank you very much.

    1.

    My target is to run sv04ccs project supplied by you not the latest mcsdk video.

    Because sv04ccs project is what I really need.it not only include the encode/decode

    but also sending bitstream by RTP .The most important thing is that it is a CCS project

    which I can run directly on CCS using jtag.

    If I run the latest mcsdk video I have to make more changes to achieve my goal.Only if

    you can supply a ccs project like sv04ccs which include H264 encode and RTP sending.

    Can you supply me a ccs project like sv04ccs (support h264 encode and rtp) which can

    run smoothly on DSPC8681E or TCI6638?

    2.

    Do you try to run the sv04ccs project you supply on DSPC8681E or TCI6638?

    How is it? Can you run sv04ccs successfully on DSPC8681E or tci6638?

    Does that sv04ccs project only support EVM6678 not support DSPC8681 or tci6638?

     

  • Hi David,

    Thanks for the clarification. 

    The sv04ccs project was developed and verified for EVM6678. We didn't run it on DSPC8681E or TCI6638. Migration is needed in order to run it for DSPC8681E or TCI6638, especially TCI6638 since the underlying PDK is different.

    As for your request on sv04ccs project for DSPC8681E or TCI6638, can you please contact your local FAE or sales to submit the request?

    Thanks,

    Hongmei

  • hi Hongmei,

    I use the mcsdk_video_2_1_0_8, and I have build the sv04 project successfully following the link http://processors.wiki.ti.com/index.php/MCSDK_VIDEO_2.0_CODEC_TEST_FW_User_Guide#Integrating_new_Codec_into_the_build , and I have  also got the source code, now I want to new a ccs project for sv04  myself (I know you have given a sv04 ccs project, but when I build it,there are some errors). For my sv04 ccs project, I need add some predefined  symbols to my ccs project,  I use the makefile from path ”C:\ti\mcsdk_video_2_1_0_8\dsp\mkrel “,

    I find this predefined  symbols in the makefile:

    #sv04: VIDEO HD framework on Shannon
    sv04_restrict =
    sv04_invar = BUILD_TYPE=HDCT RTP=YES\
    BERT_DEF=NO_BERT \
    CPUTYPEDIR=shannon XDAIS=YES\
    NEU=YES \
    SCHEDULER=GG_BIOS \
    NUMCH=2\
    LASTREGCH=2 FIRSTAUXCH=2\
    MAX_PROF_SIZE=37 \
    GMAC=YES \
    ENDIAN=LITTLE JOULE=YES BIOS=YES NUMSL=2 NUMPKTCH=0 \
    MCS_DATA=NO CPU_NCORES=8 RELMSG=YES \
    NUMREDUNCH=0 \
    VMMCOMP=NO TIMER_BASED_TDM=YES TIMER_BASED_TDM_EXT=NO CSL=NO \
    VTK_REDUCE_MIPS=YES H264BP_DEC=NO H264MP_DEC=NO MPEG2MP_DEC=NO MPEG4_DEC=NO H263_DEC=NO \
    H264BP_ENC=NO MPEG4_ENC=NO H263_ENC=NO BIOSIPC=YES IPCREGBAR=NO H264HP_DEC=NO \
    PA_SS=YES TSIP_LLD=NO EDMA_LLD=NO ABI=ELF C66X_AS_C64X=NO

    for my sv04 project, I will add all of this to the predefined  symbols of ccs buld  property. Is it right? And in addition to this, is there other config which need I do?

    Regards,

    Si

  • Hi Si,

    Can you please let us know what errors are reported when you build the sv04 ccs project provided earlier in this post? It may be easier to debug the existing project instead of creating your own from scratch.

    As for the symbols defined in the makefile, they are not directly used in the code and therefore cannot be used as is in the CCS project as predefined symbols.

    Thanks,

    Hongmei

  • Hi Hongmei,

    here is the error:

    DATA_FAR_NONSHARED section size is a little small.

    Osal_paMtCsEnter and Osal_paMtCsExit are defined in dsiunwosal.c, I can find it. why it says undefined. Need I

    reinstall  pdk_C6678_1_0_0_17 which is the default config. I  have  install  the  old

    version mcsdk_video_2_0_0_10. Can you help me sovle this problem?

    Best Regards,

    Si

  • Hi Hongmei,

    May be my pdk_C6678 version is not right, can you give me the download link of mcsdk which inculde  pdk_C6678_1_0_0_17?

    Regards,

    Si

  • Si, in a quick look I found it in mcsdk_video_2_1_0_3 .. so around this MCSDK video version we used PDK 1.0.0.17

    thanks,

    Paula

  • Hi  Hongmei, Paula:

    Thanks for your help, now I can run H264 encode well, tftp get yuv, encode,and send rtp to pc. 

    Now I want to run H264 decode based on sv04. The flow is:

    PC send rtp to dsp decoder, dsp decode and then send yuv to pc from tftp.

    I have some questions:

    Q1:siuVct_WriteOutputData can config TFTP or VPPU output, but siuVct_ReadInputData  is just  set as TFTP input, there is no vppu input, how can I receive the rtp stream from pc.

    Q2: for decoder, how can I set the udp port which can communicates with PC,I can't find the place in the code for configing the udp port.

    Best Regards,

    Si

  • hi all,

    can anybody help me? Thanks very much!

    Si