• 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) » C6000 Multicore DSP » Keystone Multicore Forum (C66, 66A, AM5) » H.264 Encoder and RTP
Share
C6000 Multicore DSP
  • Forums
  • Announcements
Options
  • Subscribe via RSS
Training Available
TI provides self-paced online training that introduces the primary components of the KeyStone II family of SoC devices.

  • KeyStone II SoC Overview >
  • KeyStone II Software Overview >
  • KeyStone II ARM Cortex-A15 Corepac Overview >
  • More Information >
  • Check out
    Multicore Mix blog
    • $core_v2_blog.Current.Name

      Geeks UNITE for Geek Pride Day

      Posted 10 hours ago
      by Lauren Reed1
      Happy Geek Pride Day from the Processors team! We wanted to celebrate...
    • $core_v2_blog.Current.Name

      OpenMP - All aboard!

      Posted 2 days ago
      by Debbie Greenstreet
      With so many end products today relying on multicore DSPs for...
    • $core_v2_blog.Current.Name

      A look back: Two years of Multicore Mix

      Posted 3 days ago
      by Lauren Reed1
      A big thank you to everyone who participated in our contest last...

    Forums

    H.264 Encoder and RTP

    This question is answered
    dp
    Posted by dp
    on May 09 2012 03:42 AM
    Intellectual975 points

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

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • dp
      Posted by dp
      on Jun 14 2012 05:57 AM
      Intellectual975 points

      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.

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

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Hongmei Gou
      Posted by Hongmei Gou
      on Jun 14 2012 11:14 AM
      Verified Answer
      Verified by dp
      Intellectual2960 points

      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

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • dp
      Posted by dp
      on Jun 15 2012 05:25 AM
      Intellectual975 points

      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

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • dp
      Posted by dp
      on Jun 20 2012 05:54 AM
      Intellectual975 points

      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

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Hongmei Gou
      Posted by Hongmei Gou
      on Jun 20 2012 10:20 AM
      Intellectual2960 points

      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

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Hongmei Gou
      Posted by Hongmei Gou
      on Jun 20 2012 17:41 PM
      Intellectual2960 points
      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.
      1452.dsp.zip
      2514.sv04.zip
      5460.RTPOutput.zip
      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
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • dp
      Posted by dp
      on Jun 21 2012 04:21 AM
      Intellectual975 points

      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 

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Vivek Chengalvala
      Posted by Vivek Chengalvala
      on Jun 21 2012 09:49 AM
      Intellectual1110 points

      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

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Hongmei Gou
      Posted by Hongmei Gou
      on Jun 21 2012 10:15 AM
      Intellectual2960 points

      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

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • dp
      Posted by dp
      on Jun 25 2012 06:28 AM
      Intellectual975 points

      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

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Hongmei Gou
      Posted by Hongmei Gou
      on Jun 27 2012 09:39 AM
      Verified Answer
      Verified by dp
      Intellectual2960 points

      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

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • dp
      Posted by dp
      on Jul 03 2012 03:30 AM
      Verified Answer
      Verified by dp
      Intellectual975 points

      Hongmei,

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

      Regards,

      dp

        

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • lei wang4
      Posted by lei wang4
      on Mar 20 2013 21:30 PM
      Prodigy250 points

      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

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    12
    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