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\" ?
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.
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,
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?
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.
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.
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
Please find how to add libs (--library) from the screen capture attached below:
4670.LinkLib.zip
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**, HDCTand there are really difficulties.
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.
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
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 */
......
I've re-modify the sv04 project step by step follow aforementioned instructions.
The compile errors are snapshoted as follows:
Thanks.
dp