NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

MCSDK VIDEO VA 2.x Getting Started PCIe Demo Guide

From Texas Instruments Wiki
Jump to: navigation, search

TIBanner.png


MCSDK Video

(Multicore Video Infrastructure Demo Built on MCSDK)

Version 2.x

Getting Started Guide for PCIe based Demos

Last updated: 07/28/2014


Introduction[edit]

c66x-multicore.jpg

The MCSDK Video 2.x based on PCIe is built leveraging two SDKs.

  1. BIOS-MCSDK [SDK is DSP internal and provides platform abstraction, networking, inter-core communication, etc. For more details, please see BIOS MCSDK Getting Started Guide and BIOS MCSDK User Guide
  2. Desktop Linux SDK [SDK abstracts the messaging, PCIe transport and data I/O between host processor and DSP. For more details please see Desktop Linux SDK Getting Started Guide and Desktop Linux SDK Development Guide].

MCSDK Video 2.x provides video specific software modules and video codecs and analytics algorithms along with several out of box demos. MCSDK Video 2.x application (along with the SDKs) provides complete development environment [host + DSP] to offload real-time video applications to TI C66x multi-core DSPs. Recommended development setup is to have a Linux PC with PCIe TI Multicore DSP Cards installed, running Ubuntu 12.04 LTS. Depending on the demo requirement a powerful PC might be required. Our setup used to verify the real-time display demos (e.g., JPEG2000, AVCIU) is documented further along in the document. 

Specifically, this Getting Started Guide for PCIe based Demos provides information needed for running out of box MCSDK Video demos via PCIe on a Linux PC and rebuilding MCSDK Video DSP builds on a Linux PC. By the end of this Getting Started Guide the user should have:

  • Installed MCSDK and Desktop Linux SDK Software
  • Installed MCSDK Video Software
  • Run MCSDK Video demos via PCIe
  • Rebuilt MCSDK Video DSP application if needed


Helpful tips image.jpg

Useful Tip

After completing the material in this Getting Started Guide for PCIe based Demos, it is recommended the user continue on to the Getting Started Guide for TFTP based Demos for additional information on running MCSDK Video demos over TFTP.


Supported Devices/Platforms[edit]

This release supports the following Texas Instrument devices/platforms:

Platform Development Kit Supported Devices Supported EVM
C6678 TMS320C6678, TMS320TCI6608

TMDXEVM6678LXE, Advantech DSPC-8681E, Advantech DSPC-8682E


Supported Demos[edit]

Listed below are PCIe Based Demos which run on Advantech Lightning PCIe DSP Cards (Advantech DSPC-8681E Advantech DSPC-8682E). The video analytics demos are also verified on TMDXEVM6678LXE with PCIe adapter card.

Demo Name Demo Details
JPEG2000 Decoding Demo This demo shows real-time JPEG2000 decoding. For the packaged configuration, 24 cores of DSPC-8681E are used for the decoding. Each core receives its JPEG2000 frames from the Linux PC via PCIe, decodes it, and then sends the decoded data back to the Linux PC via PCIe for either display or file saving.
AVC-Intra 100 Encoder with 10bit YUV 422 @ 1080p60 This demo shows AVC-Intra-100 encoding across multiple cores and multiple chips. Raw YUV data is preloaded into RAMdisk (HDD cannot support real-time disk read to have 1080p60). Within each device, core 0 operates as a master core and cores 1-7 operate as slave cores. Three Devices are necessary to achieve 60fps and X86 interacts with three master cores for encoding. Reorder Queue on X86 takes care of out-of-order encoding of frames by the three devices. We use mplayer2 running on Linux Desktop to decode and display AVC-Intra encoded content in real time
JPEG2000 Transcoding with 10bit YUV 422 @ 1080p60 This demo shows JPEG2000 encoding across multiple cores and multiple chips. Raw YUV data is preloaded into RAMdisk (HDD cannot support real-time disk read to have 1080p60). Each core operates independently to first do a JPEG2K Encode and immediately do JPEG2K Decode and convert YUV to RGB to prepare of display. Dual Octal cards are necessary to achieve 60fps and X86 interacts with each of the 128 cores to achieve transcoding. Reorder Queue on X86 takes care of out-of-order encoding of frames by the devices. We use OpenGL display thread running on Linux Desktop to receive the transcoded RGB and display in real time
HEVC Transcoding This demo shows HEVC encoding and decoding across multiple cores and multiple chips.
MPEG2 to H264HP transcoding This demo shows MPEG2 to H264HP transcoding. Host sends MPEG2 encoded bit stream to DSP, which decodes the bitstream to YUV data and sends the YUV data back to Host. Host then sends the decoded YUV data to DSP, which encodes it as H264HP bit stream. DSP sends the encoded H264HP bit stream back to host.
H264HP Decoding --> YUV scaling --> HEVC Encoding Demos This demo shows 1080p H264HP decoding, YUV scaling from 1080p to 720p, and then 720p HEVC encoding. Host sends 1080p H264HP encoded bit stream to DSP, which decodes the bitstream to YUV data and sends the YUV data back to Host. Host then sends the decoded YUV data to DSP, which does 1080p to 720p scaling and sends the scaled YUV back to host. After that, host sends the scaled YUV data to DSP, which encodes it as HEVC bit stream. DSP sends the encoded HEVC bit stream back to host.
Codec Integration and Evaluation Demo Video and Image Codecs published on the web are integrated into the framework. For each of the Codecs, the master core receives data from Linux PC via PCIe, processes the frame (along with slave cores when applicable), and then sends the processed frame back to Linux PC via PCIe for output to a file.
16-Channel Video Analytics Demo (Supported in MCSDK Video 2.2.0.39 Release Onwards) This demo illustrates 16-Channel Video Analytics (VA) @QVGA resolution running across multiple core of C667x DSP. Two VA channels are statically mapped on each core of C667x. RAW YUV frames, for each channel, are read from file and sent over PCIe to appropriate core. After frame processing, result is sent back to host over PCIe which can be written into file or displayed after overlaying on input frame. Four different algorithms (Tamper Detect, Object Count, Trip Zone and Motion Detect) are supported. Note: For VA demo SV05 DSP binary needs to be used. (review)


Hardware/OS Requirement[edit]

Please refer to Pre-requisites of Desktop Linux SDK for hardware and OS requirement.

Real-time video demos (e.g., AVCIU encoding, JPEG2000 transcoding, JPEG2000 decoding, and HEVC transcoding) require high-end PCs. The table below lists the hardware components used in our video demo validation.


PC component Why it is needed
Antec Twelve Hundred V3 Black Steel ATX Full Tower Unbeatable Gaming Case A big gaming case to physically be able to fit the octal cards and also have enough airflow for cooling.
CORSAIR CMPSU-750TX 750W ATX12V v2.2 SLI Certified CrossFire Ready 80 PLUS Certified Active PFC Compatible with Core i7
Power supply suitable for both American & European voltage (110v, 240v)
Intel Core i7-3770S Ivy Bridge 3.1GHz (3.9GHz Turbo) LGA 1155 65W Quad-Core Desktop Processor Intel HD Graphics 4000 BX80637I73770S
Intel processor compatible with the mother board
PNY VCQ2000D-PB Quadro 2000D 1GB 128-bit GDDR5 PCI Express 2.0 x16 Workstation Video Card
Graphics card that supports 10 bit deep color display that has Linux Drivers
ASUS P8Z77-V PREMIUM LGA 1155 Intel Z77 HDMI SATA 6Gb/s USB 3.0 ATX Intel Motherboard with Thunderbolt Has multiple PCIe Gen3 slots
G.SKILL Ripjaws Z Series 32GB (4 x 8GB) 240-Pin DDR3 SDRAM DDR3 1600 (PC3 12800) Desktop Memory Model F3-12800CL10Q-32GBZL 32GB of RAMdisk - so we can preload raw data into RAMdisk (at least 500 frames of 10bit YUV 422). We cannot read from HDD to achieve 60fps.
Western Digital Caviar Black WD1002FAEX 1TB 7200 RPM 64MB Cache SATA 6.0Gb/s 3.5" Internal Hard Drive -Bare Drive 1 TB HDD to store raw YUV content and other test clips for development
Dell UltraSharp U3011 30" Black 7ms IPS-Panel Height, Swivel Adjustable Widescreen LCD Monitor Monitor that can display deep color (10bit) and operate @ 1080p60


Software Installation[edit]

This section will walk you through installing the software components required for MCSDK Video. The overall steps are:

  1. Install the Desktop Linux SDK
  2. Install Required Linux Packages
  3. Install the BIOS MCSDK
  4. Install the MCSDK Video 2.x
  5. Install Active Perl



Installing the Desktop Linux SDK[edit]

Please refer to MCSDK Video product download page MCSDK Video download to download the version of Desktop Linux SDK.

After downloading the Linux installer, (desktop-linux-sdk_<version>_setuplinux.bin), please change the attribute of the installer to executable and run the installer as shown below. Details of Desktop Linux SDK installation can be found from Desktop Linux SDK Installation
<syntaxhighlight lang="bash"> chmod +x desktop-linux-sdk_<version>_setuplinux.bin ./desktop-linux-sdk_<version>_setuplinux.bin </syntaxhighlight>


Installing Required Linux Packages[edit]

  • libpciaccess-dev

<syntaxhighlight lang="bash"> sudo apt-get install libpciaccess-dev </syntaxhighlight>

  • binutils-dev

<syntaxhighlight lang="bash"> sudo apt-get install binutils-dev </syntaxhighlight>

  • freeglut3-dev

<syntaxhighlight lang="bash"> sudo apt-get install freeglut3-dev </syntaxhighlight>

  • mplayer2

<syntaxhighlight lang="bash"> sudo apt-get install mplayer2 </syntaxhighlight>

The following package is required for MCSDK Video 2.2.

  • libglew1.6-dev

<syntaxhighlight lang="bash"> sudo apt-get install libglew1.6-dev </syntaxhighlight>


Installing the BIOS Multicore Software Development Kit[edit]

Note that BIOS MCSDK is needed only for recompiling DSP builds. This step can be bypassed for just running the out of box demos.

Please refer to MCSDK Video product download page MCSDK Video download to download the version of BIOS MCSDK. After downloading the Linux installer, (bios_mcsdk<version>_setuplinux.bin), please change the attribute of the installer to executable and run the installer as shown below. <syntaxhighlight lang='bash'> chmod +x bios_mcsdk<version>_setuplinux.bin ./bios_mcsdk<version>_setuplinux.bin </syntaxhighlight>

The following components of BIOS-MCSDK must be installed to support the MCSDK VIDEO.

  • PDK C6678
  • EDMA3-LLD
  • SYS/BIOS
  • XDC tools
  • IPC

Select MCSDK components snap shot:

BIOS-MCSDK-Linux-setup-01.png

BIOS-MCSDK-Linux-setup-02.png



Installing the MCSDK Video 2.x[edit]

The MCSDK Video installer allows you to choose the installation directory and selected the components to be installed. Once the installation is complete, the MCSDK Video components will be installed in the specified installation directory.


After downloading the Linux installer (mcsdk_video_<version>_setuplinux.bin), please change the attribute of the installer to executable and then run the installer as shown below.
<syntaxhighlight lang="bash"> chmod +x mcsdk_video_<version>_setuplinux.bin ./mcsdk_video_<version>_setuplinux.bin </syntaxhighlight>


Major Steps of MCSDK Video Installation
  • Step-1: Welcome Screen and Click Next

LinuxInstall1.png


  • Step-2: Select Destination Folder and Click Next

LinuxInstall2.png


  • Step-3: Select Components and Click Next

For running demos with pre-built DSP images, the only component needed is MCSDK Video as shown below:

LinuxInstall3_2.png


To rebuild the DSP builds, all the components from MCSDK Video 2.x are required.

LinuxInstall3.png

  • Step-4: Click Next to copy the Components selected in Step-2 to the Destination Folder specified in Step-1

Screenshot_CopyComponents.png


  • Step-5: Click Finish to complete installation

Screenshot_InstallationComplete.png


Install Active Perl[edit]

Note that Active Perl is needed only for recompiling DSP builds. This step can be bypassed for just running the out of box demos. Active Perl (5.14.2.1402) can be downloaded from Active Perl 5.14.2.1402. Install it by following Active Perl installation instructions.


Running MCSDK Video Demos via PCIe[edit]

In MCSDK Video 2.x, multiple video demos are provided to uses PCIe as the data IO to achieve real-time video encoding/decoding/scaling on a Linux PC with PCIe multiple core DSP cards installed. This section provides instructions on how to run these video demos using the pre-built DSP image included in the release package. The major steps of running video demos include:

  • Build MCSDK Video Host Application to Execute on Linux PC
  • Install and Run Video Demos
  • Reconfigure Demos when Needed


Where to find the demos[edit]

Demo Name Demo Location inside MCSDK Video Release Package
AVCIU Encoding Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_avciuenc_demo
JPEG2000 Transcoding Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_j2x_demo
JPEG2000 Decoding Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_j2kdec_demo
H264BPMP Decoder Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_h264bpmpdec_demo
H264HP Decoder Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_h264hpdec_demo
MPEG2 Decoder Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_mpeg2dec_demo
MPEG4 Decoder Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_mpeg4dec_demo
JPEG Decoder Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_jpegdec_demo
H264HP Encoder Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_h264hpenc_demo
MPEG2 Encoder Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_mpeg2enc_demo
MPEG4 Encoder Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_mpeg4enc_demo
JPEG Encoder Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_jpegenc_demo
H265 (HEVC) Encoder Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_h265enc_demo
H265 (HEVC) Decoder Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_h265dec_demo
H265 (HEVC) Transcoding Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_h265transcode_demo
MPEG2 to H264HP Transcoding Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_mpeg2dec_h264hpenc_demo
Multi-channel H264HP Encoding Demo mcsdk_video_2_x_x_x/demos/codecs/pcie_h264hpenc_multichan_demo
Multi-channel Video Analytics Demo (supported from MCSDK Video 2.2.0.38) mcsdk_video_2_x_x_x/demos/va/pcie_dmval_demo


Getting Started from Desktop Linux SDK[edit]

PCIe based video demos are built on Desktop Linux SDK. Before running video demos, please visit Desktop Linux SDK Getting Started Guide to install, setup, and run Desktop Linux SDK out of box demos.

Note that video demos requires using larger and pre-reserved contiguous memory allocation (520MB needs to be pre-reserved to run video demos, with 8 MB set aside for Consistent memory allocation) which is provided from Desktop Linux SDK Contiguous Memory Allocation. For multi-channel use cases, the increasing number of codec channels requires even larger pre-reserved contiguous memory allocation, e.g., 656 MB is needed to run 4 channels per chip while 848 MB is needed to run 8 channels per chip.

Running video demos also requires installing cmem autoload and setting permissions for pcie access as described at Desktop Linux SDK CMEM Autoload and Setup udev.

Whenever the above CMEM configuration is changed via Desktop Linux SDK, please ensure to rebuild MCSDK Video host application following the instructions in the next section: Build MCSDK Video Host Application to Execute on Linux PC.


Build MCSDK Video Host Application to Execute on Linux PC[edit]

This section will walk you through how to make MCSDK Video host application binaries so that the video demos can be run on a Linux PC. The overall steps are:

  1. Set up Environment Variable
  2. Build Desktop Linux SDK Host Modules
  3. Build MCSDK Video Host Application Modules



Setting up Environment Variable[edit]

Modify <MCSDK Video Install Dir>/host/setEnv.sh to set the installation directory of Desktop Linux SDK and MCSDK Video. For example, if Desktop Linux SDK is installed at /home/alice/ti/desktop-linux-sdk_01_00_00_07 and MCSDK Video is installed at /home/alice/ti/mcsdk_video_2_1_0_8, modify setEnv.sh as shown below

#!/bin/sh

export DESKTOP_LINUX_SDK_DIR=/home/alice/ti/desktop-linux-sdk_01_00_00_07
export MCSDK_VIDEO_DIR=/home/alice/ti/mcsdk_video_2_1_0_8

Then, run the following commands to set up the environment:
<syntaxhighlight lang="bash"> cd host source setEnv.sh </syntaxhighlight>


Building Desktop Linux SDK Host Modules[edit]

Runt the following commands to build Desktop Linux SDK:
<syntaxhighlight lang="bash"> cd host ./makeCleanSdk.sh ./makeSdk.sh </syntaxhighlight>

Sample console display after running ./makeCleanSdk.sh:

make -C  /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv clean
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv'
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv'
make -C  /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem clean
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem'
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem'
make -C  /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem/module clean
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem/module'
make -C /lib/modules/3.2.0-29-generic-pae/build M=/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem/moduleclean
make[2]: Entering directory `/usr/src/linux-headers-3.2.0-29-generic-pae'
  CLEAN   /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem/module/.tmp_versions
  CLEAN   /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem/module/Module.symvers
make[2]: Leaving directory `/usr/src/linux-headers-3.2.0-29-generic-pae'
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem/module'
make -C  /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox/host clean
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox/host'
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox/host'
make -C  /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr clean
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr'
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr'
make -C  /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/dnldmgr clean
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/dnldmgr'
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/dnldmgr'
make -C  /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/sync clean
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/sync'
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/sync'
make -C  /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/demos/filetestdemo/host clean
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/demos/filetestdemo/host'
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/demos/filetestdemo/host'
make -C  /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/demos/dsp_utils clean
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/demos/dsp_utils'
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/demos/dsp_utils'

Sample console display after running ./makeSdk.sh:

make -C /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv'
gcc -Werror -ggdb  -I . -I inc -I ../ -I shared -I ../sync -D _FILE_OFFSET_BITS=64  -c src/pciedrv.c -o obj/pciedrv.o
ar rcs lib/pciedrv.a obj/pciedrv.o
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv'
make -C /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem'
gcc -Werror  -I . -I inc -I .. -I ../config -I module -D _FILE_OFFSET_BITS=64  -c src/cmem_drv.c -o obj/cmem_drv.o
ar rcs lib/cmem_drv.a obj/cmem_drv.o
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem'
make -C /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem/module
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem/module'
make -C /lib/modules/3.2.0-29-generic-pae/build M=/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem/module modules
make[2]: Entering directory `/usr/src/linux-headers-3.2.0-29-generic-pae'
  CC [M]  /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem/module/cmem.o
  LD [M]  /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem/module/cmem_dev.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem/module/cmem_dev.mod.o
  LD [M]  /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem/module/cmem_dev.ko
make[2]: Leaving directory `/usr/src/linux-headers-3.2.0-29-generic-pae'
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem/module'
make -C /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox/host
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox/host'
gcc -ggdb -I .. -I ../inc -I ../.. -I ../../pciedrv  -I ../../config -D MAILBOX_ON_HOST -c src/mailBox_host.c -o obj/mailBox_host.o
gcc -ggdb -I .. -I ../inc -I ../.. -I ../../pciedrv  -I ../../config -D MAILBOX_ON_HOST -c ../src/mailBox.c -o ../obj/mailBox.o
ar rcs lib/mailBox.a  obj/mailBox_host.o  ../obj/mailBox.o
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox/host'
make -C /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr'
gcc  -ggdb -I . -I .. -I ../config -c src/bufmgr.c -o obj/bufmgr.o
ar rcs lib/bufmgr.a obj/bufmgr.o
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr'
make -C /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/dnldmgr
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/dnldmgr'
gcc -Werror -ggdb   -I . -I inc -I .. -I ../pciedrv -I ../driver/module -c src/dnldmgr.c -o obj/dnldmgr.o
ar rcs lib/dnldmgr.a obj/dnldmgr.o
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/dnldmgr'
make -C /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/sync
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/sync'
gcc  -ggdb -I . -I ..  -c src/syncLock.c -o obj/syncLock.o
gcc  -ggdb -I . -I ..  -c src/syncBarr.c -o obj/syncBarr.o
ar rcs lib/sync.a obj/syncLock.o obj/syncBarr.o
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/sync'
make -C /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/demos/filetestdemo/host
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/demos/filetestdemo/host'
gcc -ggdb -I ../../../sdk -I ../../../sdk/pciedrv -I ../../../sdk/cmem -I ../../../sdk/mailBox -I ../../../sdk/bufmgr -I inc -I ../inc -D MAILBOX_ON_HOST -D BUF_DEBUG -D DEMO_VERBOSE -c src/demo_filetest.c -o obj/demo_filetest.o
gcc -ggdb obj/demo_filetest.o ../../../sdk/pciedrv/lib/pciedrv.a ../../../sdk/cmem/lib/cmem_drv.a ../../../sdk/mailBox/host/lib/mailBox.a ../../../sdk/bufmgr/lib/bufmgr.a ../../../sdk/dnldmgr/lib/dnldmgr.a -o bin/demo_filetest -lpciaccess -lpthread -lrt -lbfd
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/demos/filetestdemo/host'
make -C /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/demos/dsp_utils
make[1]: Entering directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/demos/dsp_utils'
gcc -I ../../sdk -I ../../sdk/pciedrv -I ../../sdk/dnldmgr -I inc -I ../../sdk/cmem  -c src/argparse.c -o obj/argparse.o
gcc -I ../../sdk -I ../../sdk/pciedrv -I ../../sdk/dnldmgr -I inc -I ../../sdk/cmem  -c src/dsp_utils.c -o obj/dsp_utils.o
gcc  obj/argparse.o obj/dsp_utils.o ../../sdk/dnldmgr/lib/dnldmgr.a ../../sdk/pciedrv/lib/pciedrv.a ../../sdk/cmem/lib/cmem_drv.a ../../sdk/sync/lib/sync.a  -o bin/dsp_utils -lpciaccess -lpthread -lbfd
make[1]: Leaving directory `/home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/demos/dsp_utils'

Building MCSDK Video Host Application Modules[edit]

If you are using single C6678 EVM with AMC to PCIe Adapter Card (i.e., TMDSEVM6678L with TMDXEVMPCI), please enable the following line in <MCSDK Video Install Dir>/host/src/dspMemMap.h before proceeding further. (review) <syntaxhighlight lang="bash">

  1. define SINGLE_DSP_EVM_BUILD

</syntaxhighlight>

Run the following commands to build MCSDK Video host application:
<syntaxhighlight lang="bash"> cd host ./makeCleanVideoApp.sh ./makeVideoApp.sh </syntaxhighlight>
After the compilation is completed, bin and obj folders will be created under <MCSDK Video Install Dir>/host. MCSDK Video host binary "demo_c667x" can be found from host/bin directory.

gcc -Wall -ggdb -D_FILE_OFFSET_BITS=64 -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/config -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk -I iface -I src -D MAILBOX_ON_HOST -c src/dataSrc/FileReader.c -o obj/dataSrc/FileReader.o
gcc -Wall -ggdb -D_FILE_OFFSET_BITS=64 -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/config -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk -I iface -I src -D MAILBOX_ON_HOST -c src/deviceIO/DeviceIO.c -o obj/deviceIO/DeviceIO.o
gcc -Wall -ggdb -D_FILE_OFFSET_BITS=64 -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/config -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk -I iface -I src -D MAILBOX_ON_HOST -c src/deviceIO/DeviceIOTx.c -o obj/deviceIO/DeviceIOTx.o
gcc -Wall -ggdb -D_FILE_OFFSET_BITS=64 -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/config -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk -I iface -I src -D MAILBOX_ON_HOST -c src/deviceIO/DeviceIORx.c -o obj/deviceIO/DeviceIORx.o
gcc -Wall -ggdb -D_FILE_OFFSET_BITS=64 -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/config -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk -I iface -I src -D MAILBOX_ON_HOST -c src/scheduler/Scheduler.c -o obj/scheduler/Scheduler.o
gcc -Wall -ggdb -D_FILE_OFFSET_BITS=64 -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/config -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk -I iface -I src -D MAILBOX_ON_HOST -c src/reorder/Reorder.c -o obj/reorder/Reorder.o
gcc -Wall -ggdb -D_FILE_OFFSET_BITS=64 -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/config -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk -I iface -I src -D MAILBOX_ON_HOST -c src/dataSnk/FileWriter.c -o obj/dataSnk/FileWriter.o
gcc -Wall -ggdb -D_FILE_OFFSET_BITS=64 -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/config -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk -I iface -I src -D MAILBOX_ON_HOST -c src/dataSnk/Display.c -o obj/dataSnk/Display.o
gcc -Wall -ggdb -D_FILE_OFFSET_BITS=64 -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/config -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk -I iface -I src -D MAILBOX_ON_HOST -c src/utils/utils.c -o obj/utils/utils.o
gcc -Wall -ggdb -D_FILE_OFFSET_BITS=64 -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/config -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk -I iface -I src -D MAILBOX_ON_HOST -c src/algs/j2kenc/j2eDynCfg.c -o obj/algs/j2kenc/j2eDynCfg.o
gcc -Wall -ggdb -D_FILE_OFFSET_BITS=64 -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/config -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk -I iface -I src -D MAILBOX_ON_HOST -c src/parseArgs.c -o obj/parseArgs.o
gcc -Wall -ggdb -D_FILE_OFFSET_BITS=64 -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/config -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk -I iface -I src -D MAILBOX_ON_HOST -c src/algs/alg.c -o obj/algs/alg.o
gcc -Wall -ggdb -D_FILE_OFFSET_BITS=64 -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/config -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk -I iface -I src -D MAILBOX_ON_HOST -c src/demoDrv.c -o obj/demoDrv.o
gcc -Wall -ggdb -D_FILE_OFFSET_BITS=64 -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/config -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk -I iface -I src -D MAILBOX_ON_HOST -c src/demoBufferPools.c -o obj/demoBufferPools.o
gcc -Wall -ggdb -D_FILE_OFFSET_BITS=64 -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/config -I /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk -I iface -I src -D MAILBOX_ON_HOST -c src/main.c -o obj/main.o
gcc obj/dataSrc/FileReader.o obj/deviceIO/DeviceIO.o obj/deviceIO/DeviceIOTx.o obj/deviceIO/DeviceIORx.o obj/scheduler/Scheduler.o obj/reorder/Reorder.o obj/dataSnk/FileWriter.o obj/dataSnk/Display.o obj/utils/utils.o obj/algs/j2kenc/j2eDynCfg.o obj/parseArgs.o obj/algs/alg.o obj/demoDrv.o obj/demoBufferPools.o obj/main.o /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/pciedrv/lib/pciedrv.a /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/cmem/lib/cmem_drv.a /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/mailBox/host/lib/mailBox.a /home/xghdv501/ti/desktop-linux-sdk_01_00_00_07/sdk/bufmgr/lib/bufmgr.a  -o bin/demo_c667x -lpciaccess -lpthread -lbfd -lrt -lglut -lGL -lGLEW


Prepare the EVM[edit]

If you are using ADVANTECH LIGHTNING DSPC-8681E and DSPC-8682E cards, please proceed to the next chapter.

If you are using single C6678 EVM with AMC to PCIe Adapter Card (i.e., TMDSEVM6678L with TMDXEVMPCI), please follow the instructions below to set up the hardware, and then proceed to the next chapter.

Step 1: IBL Flash
Follow instructions at MCSDK IBL to update the IBL EEPROM image from BIOS MCSDK version 2.1.2.5. For the IBL flash, only steps 1-9 are needed. In step 1 of IBL flash, please unzip I2crom_0x51_c6678_le.zip to obtain and use an updated i2crom_0x51_c6678_le.bin, in which the BAR region sizes have been tuned for the use case of video demos.


Step 2: Hardware Setup
Follow the guidelines at Hardware Setup for TMDSEVM6678 with TMDXEVMPCI to install and check the hardware.



Install and Run Video Demos[edit]

This section will walk you through how to install and run a video demo. The overall steps include

  • Install a Video Demo
  • One-time Setup and Initialization
  • Run a Video Demo


Install a Video Demo[edit]

Before running the demo, ensure installation directory of Desktop Linux SDK and MCSDK Video is correctly set in <MCSDK Video Install Dir>/demos/[codecs or va]/pcie_xxx_demo/scripts/setDemoEnv.sh. For example, if Desktop Linux SDK is installed at /home/alice/ti/desktop-linux-sdk_01_00_00_07 and MCSDK Video is installed at /home/alice/ti/mcsdk_video_2_1_0_8, modify setDemoEnv.sh as shown below

#!/bin/sh

export DESKTOP_LINUX_SDK_DIR=/home/alice/ti/desktop-linux-sdk_01_00_00_07
export MCSDK_VIDEO_DIR=/home/alice/ti/mcsdk_video_2_1_0_8
...

Then, run the following commands to set up the environment variable if this has not been done before. <syntaxhighlight lang="bash"> cd demos/[codecs or va]/pcie_xxx_demo/scripts source setDemoEnv.sh </syntaxhighlight>

After that, run the following command to prepare the scripts which are needed for running the demo: <syntaxhighlight lang="bash"> cd demos/[codecs or va]/pcie_xxx_demo/scripts ./installDemo.sh </syntaxhighlight>

After this, all the scripts for running the demo will exist at the folder of demos/[codecs or va]/pcie_xxx_demo/scripts, as shown below for H264HP encoder demo.

xghdv501@QuadShannonDemoPC3:~/ti/mcsdk_video_2_2_0_38/demos/codecs/pcie_h264hpenc_demo/scripts$ ll
total 56
drwxr-xr-x 3 xghdv501 xghdv501 4096 Apr  5 17:21 ./
drwxr-xr-x 4 xghdv501 xghdv501 4096 Feb 26 11:42 ../
drwxr-xr-x 2 xghdv501 xghdv501 4096 Apr  5 17:21 bootcfg/
-rw-r--r-- 1 xghdv501 xghdv501 8430 Apr  5 17:21 codecParams.cfg
-rwxr-xr-x 1 xghdv501 xghdv501  193 Apr  5 17:21 demoSave2File.sh*
-rwxr-xr-x 1 xghdv501 xghdv501  411 Apr  5 17:21 dnld_dsp.sh*
-rwxr-xr-x 1 xghdv501 xghdv501  436 Apr  5 17:21 init_dsp.sh*
-rwxr-xr-x 1 xghdv501 xghdv501 2902 Feb 25 23:12 installDemo.sh*
-rw-r--r-- 1 xghdv501 xghdv501   85 Apr  5 17:21 multiClip.cfg
-rwxr-xr-x 1 xghdv501 xghdv501  458 Apr  5 17:21 reset_dsp.sh*
-rw-r--r-- 1 xghdv501 xghdv501  328 Feb 26 11:52 setDemoEnv.sh
-rwxr-xr-x 1 xghdv501 xghdv501  124 Feb 25 23:12 uninstallDemo.sh*


One time Setup and Initialization[edit]

Every time after rebooting the PC, first do "source setDemoEnv.sh" if that has not been done after the rebooting. <syntaxhighlight lang="bash"> cd demos/[codecs or va]/pcie_xxx_demo/scripts source setDemoEnv.sh </syntaxhighlight>

Then, initialize the DSPs by running the following commands, with CPU frequency specified for DSP initialization. <syntaxhighlight lang="bash"> cd demos/[codecs or va]/pcie_xxx_demo/scripts ./init_dsp.sh <cpu_frequency> </syntaxhighlight>

The argument of the above command indicates the CPU frequency to be used for the demo. For example, execute the following command to do DSP initialization with 1.25GHz operation. <syntaxhighlight lang="bash"> ./init_dsp.sh 1250 </syntaxhighlight>

This init_dsp command automatically detects the number of TI PCI devices and prints the information out. For example, executing the command on Quad C6678 DSPC 8681 card will show the following TI PCI device information in the console display.

Number of devices: 4
Device: 0 : dspc8681

boot config file initcfg_1250.txt
 DSP boot config addr 0x86ff00
 DSP boot config size in bytes 8
Boot config words: 0xbabeface,
Boot config words: 0x19,
 Overriding image entry point with input 860000 Download image success !
Device: 1 : dspc8681

boot config file initcfg_1250.txt
 DSP boot config addr 0x86ff00
 DSP boot config size in bytes 8
Boot config words: 0xbabeface,
Boot config words: 0x19,
 Overriding image entry point with input 860000 Download image success !
Device: 2 : dspc8681

boot config file initcfg_1250.txt
 DSP boot config addr 0x86ff00
 DSP boot config size in bytes 8
Boot config words: 0xbabeface,
Boot config words: 0x19,
 Overriding image entry point with input 860000 Download image success !
Device: 3 : dspc8681

boot config file initcfg_1250.txt
 DSP boot config addr 0x86ff00
 DSP boot config size in bytes 8
Boot config words: 0xbabeface,
Boot config words: 0x19,
 Overriding image entry point with input 860000 Download image success !

Note that the above "init_dsp.sh" needs to executed just once after powering up the demo Linux PC with a PCIe TI Multicore DSP Card installed.


Preparing for Video Demos[edit]

Note that input clips are not provided for JPEG2000 transcoding and AVCIU encoding in the MCSDK Video package Before running these demo, make sure the input clip is available and its location is correctly updated in demos/codecs/pcie_xxx_demo/scripts/multiClip.cfg. For the other demos, the input clips are provided at demos/[codecs or va]/pcie_xxx_demo/testVecs/input with corresponding multiClip*.cfg, and therefore can be run as is.

Creating input clips for JPEG2000 transcoding and AVC Intra encoding demos

The input clips for JPEG2000 transcoding and AVC Intra encoding demos shall be 1920x1080 10-bit 4:2:2 YUV clips. To create such input clips, please follow the steps below:

Alternatively if you have compressed YUV 4:2:2, 10bpp streams (e.g. ProRes streams), please use the following command to decode "ffmpeg –i sample.XXX –pix_fmt yuv422p10le –y output.yuv".

Number of DSPs needed for running the demos in real-time

In order to run the demos in real-time, the number of DSPs needed is different. The table below lists the number of DSPs required for running individual demos in real-time.
To achieve real-time performance, please specify the number of DSPs for the command of "./dnld_dsp.sh". Also please modify demoDisplay.sh to specify the DSP cores (-t option) used for the demo when needed. Using JPEG2000 Transcoding Demo as the example, the packaged demoDisplay.sh has "-t 0:31" for Quad C6678. When one Octal card is available, "-t 0:63" can be used to achieve 30fps JPEG2000 transcoding. When two Octal cards are available, "-t 0:127" can be used to achieve 60fps JPEG2000 transcoding.

Real-time Demo Number of DSPs
AVCIU Encoding Demo (10-bit) 3   DSPs (24  DSP cores) for 60fps
JPEG2000 Transcoding Demo (10-bit) 16 DSPs (128 DSP cores) for 60fps 
8   DSPs (64   DSP cores) for 30fps
4   DSPs (32 DSP cores) for 15fps
JPEG2000 Decoding Demo (8-bit) 3   DSPs (24   DSP cores) for 24fps
HEVC transcoding Demo (supported in MCSDK Vide 2.2) Codecs are in Alpha stage, channel density TBA


Run Video Demos[edit]

For running a video demo, first reset DSP, then download sv04, and finally execute the demo:

Run a demo with output saved to file (applicable to all the demos)

<syntaxhighlight lang="bash"> cd demos/[codecs or va]/pcie_xxx_demo/scripts ./reset_dsp.sh <cpu_frequency> ./dnld_dsp.sh <num_dsps> for sv04 demos, ./dnld_dsp_sv05.sh <num_dsps> for sv05 demos ./demoSave2File.sh </syntaxhighlight>

Console display after running ./reset_dsp.sh 1250 for one DSPC-8681E:

Num of devices 4

 Iterations waited for entry point to clear 1
Dsp 0:  DSP Reset success !

 Iterations waited for entry point to clear 1
Dsp 1:  DSP Reset success !

 Iterations waited for entry point to clear 1
Dsp 2:  DSP Reset success !

 Iterations waited for entry point to clear 1
Dsp 3:  DSP Reset success !
Number of devices: 4
Device: 0 : dspc8681

boot config file initcfg_1250.txt
 DSP boot config addr 0x86ff00
 DSP boot config size in bytes 8
Boot config words: 0xbabeface,
Boot config words: 0x19,
 Overriding image entry point with input 860000 Download image success !
Device: 1 : dspc8681

boot config file initcfg_1250.txt
 DSP boot config addr 0x86ff00
 DSP boot config size in bytes 8
Boot config words: 0xbabeface,
Boot config words: 0x19,
 Overriding image entry point with input 860000 Download image success !
Device: 2 : dspc8681

boot config file initcfg_1250.txt
 DSP boot config addr 0x86ff00
 DSP boot config size in bytes 8
Boot config words: 0xbabeface,
Boot config words: 0x19,
 Overriding image entry point with input 860000 Download image success !
Device: 3 : dspc8681

boot config file initcfg_1250.txt
 DSP boot config addr 0x86ff00
 DSP boot config size in bytes 8
Boot config words: 0xbabeface,
Boot config words: 0x19,
 Overriding image entry point with input 860000 Download image success !

Console display after running ./dnld_dsp.sh 4 for one DSPC-8681E:

boot config file ./bootcfg/bootcfg_0.txt
 DSP boot config addr 0x800000
 DSP boot config size in bytes 20
Boot config words: 0xbabeface,
Boot config words: 0x0,
Boot config words: 0x3,
Boot config words: 0x12345678,
Boot config words: 0x90abcdef,
 Overriding image entry point with input c000000 Download image success !

boot config file ./bootcfg/bootcfg_1.txt
 DSP boot config addr 0x800000
 DSP boot config size in bytes 20
Boot config words: 0xbabeface,
Boot config words: 0x1,
Boot config words: 0x3,
Boot config words: 0x12345678,
Boot config words: 0x90abcdef,
 Overriding image entry point with input c000000 Download image success !

boot config file ./bootcfg/bootcfg_2.txt
 DSP boot config addr 0x800000
 DSP boot config size in bytes 20
Boot config words: 0xbabeface,
Boot config words: 0x2,
Boot config words: 0x3,
Boot config words: 0x12345678,
Boot config words: 0x90abcdef,
 Overriding image entry point with input c000000 Download image success !

boot config file ./bootcfg/bootcfg_3.txt
 DSP boot config addr 0x800000
 DSP boot config size in bytes 20
Boot config words: 0xbabeface,
Boot config words: 0x3,
Boot config words: 0x3,
Boot config words: 0x12345678,
Boot config words: 0x90abcdef,
 Overriding image entry point with input c000000 Download image success !

At the end of executing ./demoSave2File.sh, the output file is created under demos/[codecs or va]/pcie_xxx_demo/testVecs/output directory with Test Complete displayed in console:

 Test Complete.


Run a demo with output displayed (applicable to JPEG2000 decoding, JPEG2000 transcoding, AVCIU encoding, HEVC Transcoding, MPEG2 to H264HP Transcoding, and Video Analytics)

<syntaxhighlight lang="bash"> cd demos/[codecs or va]/pcie_xxx_demo/scripts ./reset_dsp.sh <cpu_frequency> ./dnld_dsp.sh <num_dsps> for sv04 demos, ./dnld_dsp_sv05.sh <num_dsps> for sv05 demos ./demoDisplay.sh </syntaxhighlight>

In demoDisplay.sh, <iter> (-i) specifies the number of iterations the input clip will be decoded/transcoded/encoded/analyzed. The output will be displayed on the PC for the number of iterations specified.

Run multi-channel Video Analytics demos (review)

For video analytics, multiple channels can be scheduled on each DSP core depending upon available CPU bandwidth. For example, for the use case of 16-Channel video analytics, two channels are scheduled on each of the eight C6678 cores. In the release package, scripts/configuration are also provided to run 2-channel, 8-channel, and 16-channel video analytics, in both file to file mode and display mode.

Multi-channel video analytics saving the output to file: <syntaxhighlight lang="bash"> cd demos/va/pcie_dmval_demo/scripts ./reset_dsp.sh <cpu_frequency> ./dnld_dsp_sv05.sh <num_dsps> ./demoSave2File_*chan.sh </syntaxhighlight> After the demo is completed, multiple output files can be found under demos/va/pcie_dmval_demo/testVecs/output directory.

Multi-channel video analytics displaying the output: <syntaxhighlight lang="bash"> cd demos/va/pcie_dmval_demo/scripts ./reset_dsp.sh <cpu_frequency> ./dnld_dsp_sv05.sh <num_dsps> ./demoDisplay_*chan.sh </syntaxhighlight> By default, only output of channel 0 is displayed. In order to display the rest of the channels, please use the UP key to increment the channel number or the DOWN key to decrement the channel number.

Demo Reconfiguration When needed[edit]

Codec and Video Analytics Re-configuration[edit]

After installing a demo, multiClip.cfg and codecParams.cfg/vaParams*.cfg can be found under demos/[codecs or va]/pcie_xxx_demo/scripts directory. They can be modified to reconfigure a test when the input clip and/or codec and video analytics parameters are updated.

Edit multiClip.cfg

Modify multiClip.cfg using the following format:

<input_file1>
<output_file1>
<number_of_frames1>
<input_file2>
<output_file2>
<number_of_frames2>
... 
Edit codecParams.cfg for video codecs

Modify codecParams.cfg when codec static/dynamic parameters and inArgs (applicable to JPEG2K Encoder only) need to be updated. Use the following format, and Comment shows the parameter name as in the codec public header files.

<ParameterName> = <ParameterValue> # Comment 
Edit vaParams*.cfg for video analytics (review)

Modify vaParams*.cfg when static parameters need to be updated for video analystics. Use the following format, and Comment shows the parameter name as in the video analystics public header files.

static_param<number> = <ParameterValue> # Comment 


Demo Re-configuration[edit]

After installing a demo, demoxxx.sh can be found under demos/[codecs or va]/pcie_xxx_demo/scripts directory. In these scripts, Host application "demo_c667x" is called for running the demos.

The configuration parameters for the host application are as follows: (review)

  • <dsp-image> (-d): location of the DSP image
  • <channel> (-s): channel name
  • <algorithm> (-a): supported algorithms
  • <codec-params> (-c): configuration file for the codec(s) and video analytics, e.g., codecParams.cfg
  • <file-config> (-f): input/output clip configuration file, e.g., multiClip.cfg
  • <team-mapping> (-t): list of node IDs comprising a algorithm processing team. The first node in list is assumed to be the master node
  • <width> (-w): video width
  • <height> (-h): video height
  • <chanid> (-C) (optional): channel id
  • <iter> (-i) (optional): number of iterations to run the demo
  • <display-width> (-x) (optional): display width when the demo application sends the frames to the display
  • <display-height> (-y) (optional): display height when the demo application sends the frames to the display
  • <display-rate> (-r) (optional): display frame rate when the demo application sends the frames to the display
  • <frameoverlay> (-F) (optional): overlay the output meta data on the input frame or not


Congratulations! At this time, you already should have finished running out of box demos. The following section is for recompiling DSP build.  

Rebuild MCSDK Video Demo Build[edit]

To rebuild MCSDK video DSP application, follow the two steps below to set up environment variables and then rebuild the application. These steps are needed only when there are changes in the DSP source code and therefore the DSP image needs to be recompiled.

Set up environment variables[edit]

Under the installation directory of the MCSDK Video, go to <MCSDK Video Install Dir>/dsp/mkrel and run the following command to set up environment variables. Before running this command, ensure all the components/tools described above are installed. Also modify dsp/mkrel/setupenvMsys.sh as needed to point to the correct path of the installed components/tools. If the TI tools required for MCSDK Video are installed at the default directory, simply set the installation directory of required TI tools (TI_TOOL_DIR) and Active Perl (PERL_ROOT) at the beginning of setupenvMsys.sh.

<syntaxhighlight lang="bash"> cd dsp/mkrel source setupenvMsys.sh </syntaxhighlight>

"setupenvMsys.sh" will check if all the required components and tools are available at the specified locations. If not, please double check if all the required components/tools are installed and if their path information in dsp/mkrel/setupenvMsys.sh is correct.

Make DSP Image[edit]

Use the following commands to rebuild the DSP applications.

Rebuild sv04 build for video codecs

<syntaxhighlight lang="bash"> cd dsp/mkrel make sv04 </syntaxhighlight>

The build command make sv04 will produce directory: dsp/mkrel/sv04 with two files: sv04.out and sv04.map.

Rebuild sv05 build for video analytics (review)

<syntaxhighlight lang="bash"> cd dsp/mkrel make sv05 </syntaxhighlight>

The build command make sv05 will produce directory: dsp/mkrel/sv05 with two files: sv05.out and sv05.map.

Helpful tips image.jpg

Useful Tip

1. If a source debugger requires all source files to be combined into a single directory, "FLAT=YES" may be added in the make command line, which will create the directory dsp/mkrel/[sv04 or sv05]/flat containing all source and header files used for the build.
2. After making the first build, if there is no source file change in dsp/components directory, "RTSCBYPASS=YES" may be added in the make command line, which will bypass compiling the components. If there is no source file change in dsp/ggcfg/build/hdg/[sv04 or sv05]/bios directory, "BIOSCFGPKGBYPASS=YES" may be added in the make command line, which will bypass compiling the BIOS configuration package.


Internals to PCIe Based MCSDK Video Demo[edit]

For users who are interested in how the PCIe based MCSDK video demos are developed, please refer to the following link for the development guide:


Useful Resources and Links[edit]

Product Download and Updates[edit]

For product download and updates, please visit the links listed in the table below.

Product Download Link
MCSDK Video (2.1 GA) Download http://software-dl.ti.com/sdoemb/sdoemb_public_sw/mcsdk_video/latest/index_FDS.html
MCSDK Video (2.2 Alpha) Download http://software-dl.ti.com/sdoemb/sdoemb_public_sw/mcsdk_video/02_02_00_33/index_FDS.html
BIOS MCSDK Download http://software-dl.ti.com/sdoemb/sdoemb_public_sw/bios_mcsdk/02_01_02_05/index_FDS.html
Desktop Linux SDK Download http://software-dl.ti.com/sdoemb/sdoemb_public_sw/desktop_linux_sdk/01_00_00_07/index_FDS.html
C6678 Codec Download http://software-dl.ti.com/dsps/dsps_public_sw/codecs/C6678/index.html


MCSDK Video Instructions[edit]

Please visit the links below to install MCSDK Video, run the video demos, and get the details on how the MCSDK Video demos are developed.

Wiki Links
Getting Started Guide for PCIe demos MCSDK Video Getting Started for PCIe based Demos
Desktop Linux SDK Getting Started
Getting Started Guide for TFTP demos MCSDK Video Getting Started for TFTP based Demos
Development Guide MCSDK Video Development Guide


Technical Support[edit]

For technical discussions and issues, please visit the links listed in the table below.

Forum/Wiki Link
C66x Multicore forum http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639.aspx
Multimedia Software Codecs forum http://e2e.ti.com/support/embedded/multimedia_software_codecs/default.aspx
TI-RTOS forum http://e2e.ti.com/support/embedded/f/355.aspx
Code Composer Studio forum http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/3131.aspx
TI C/C++ Compiler forum http://e2e.ti.com/support/development_tools/compiler/f/343/t/34317.aspx
Embedded Processors wiki http://processors.wiki.ti.com

NoteNote: When asking for help in the forum you should tag your posts in the Subject with “MCSDK VIDEO”, the part number (e.g. “C6678”) and additionally the component (e.g. “NWAL”).



E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article MCSDK VIDEO VA 2.x Getting Started PCIe Demo Guide here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article MCSDK VIDEO VA 2.x Getting Started PCIe Demo Guide here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article MCSDK VIDEO VA 2.x Getting Started PCIe Demo Guide here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article MCSDK VIDEO VA 2.x Getting Started PCIe Demo Guide here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article MCSDK VIDEO VA 2.x Getting Started PCIe Demo Guide here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article MCSDK VIDEO VA 2.x Getting Started PCIe Demo Guide here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article MCSDK VIDEO VA 2.x Getting Started PCIe Demo Guide here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article MCSDK VIDEO VA 2.x Getting Started PCIe Demo Guide here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article MCSDK VIDEO VA 2.x Getting Started PCIe Demo Guide here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity