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,
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 remainerror #10010: errors encountered during linking; "sv04.out" not builtgmake: *** [sv04.out] Error 1gmake: 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 1rcuRtcpContext_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 undefined7 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 undefined18 errors detected in the compilation of "../source/ggmbuf.c".gmake: *** [source/ggmbuf.obj] Error 1gmake: 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
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,
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 96a=rtpmap:96 H264a=framerate:15c=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
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
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
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.
Hongmei,
Thanks for all your help. Without you, we move tardily.
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