GSG: OMAP35x DVEVM Running the Demos

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

^ Up to main OMAP35x DVEVM Getting Started Guide Table of Contents

This chapter explains how to run the software demos provided with the OMAP35x DVEVM.

Contents


Default Boot Configuration

Out of the box, the EVM boots from flash and starts the demos automatically after a few seconds when you power up the board. Note that you may receive an EVM that boots a simpler 'slide show' demo out of the box in place of the DVSDK demo, in which case to view the DVSDK demo you must use TFTP/NFS or otherwise reflash the board's filesystem with the DVSDK software (see note 2 below). If your board has come flashed with the DVSDK software it does not require an NFS mount or a TFTP server to run the standard demos. A DHCP server is required by default; the DHCP service provided by most routers is sufficient to run the demos. By default, the DHCP server obtains dynamic IP addresses.

The out-of-the-box boot parameters are listed in Section Booting From Flash using Board’s NAND Flash File System The following are alternate ways you may want to boot the board:


To abort the standard boot, press any key in the console window (see Section 2.10 on setting up the console window). Also see Section (Alternate Boot Methods)if you want to change the boot configuration.

NOTE

  1. If you already have an OMAP35x EVM hardware, but do not have any software flashed on the board, refer to the sections in the following order, to get started.
  2. If you already have a OMAP35x EVM with U-boot, kernel image and NAND flash file system, make sure you update the kernel and NAND flash file system images, in the NAND flash with the kernel image built for this DVSDK build and pre-built NAND flash file system image available under /home/<useracct>/dvsdk_#_##_##_##/targetfs folder on your Linux PC. For more information on rebuilding the linux kernel, refer section (Rebuilding the Linux Kernel). For more information on how to do get started, refer to the sections in the following order.


Starting the Standalone Demos

When you connect the EVM hardware, the pre-loaded examples run automatically on your video display if your board is flashed with the DVSDK software, alternatively you will see a 'slide show' demo. These examples decode audio and video. There are two ways to use the demos:

Once the EVM is booted, your video display should display the picture of the keypad as shown below. To use the demos in standalone mode, make sure you look at this initial screen that shows the function of various keys in the key pad diagram.

OMAP3530 EVM GSG Demos 01.JPG


Please note the following before looking at the functions of the keys:


Running the Standalone Demos

  1. Press "OK" on the keypad to move from the keypad interface diagram to the main menu screen, which looks like this:
Omap3x dvsdk demos main menu 3 01.jpg
  1. The Decode demo plays audio and video files you select
  2. The enocde demo performs a real time video capture, preview and encode
  3. Use the up and down arrows to change which demo is selected. Then, press "OK" to switch to the selected demo. Press “Stop” (S15 key on the key pad) to quit the demo. On quitting the demo, “Quitting the Demo” text is shown for a specific timeout period and the interface application is killed. In case of running in standalone mode, the EVM needs to be powered off and on, if you want to initiate the demos again
  4. Within a demo, you start at the settings screen, where you see the controls you can use to run the demo at the bottom of the screen and the current settings in the upper-right.
  5. Use the up and down arrows to move to a setting you want to change.
  6. Use the left and right arrows to cycle through the options until the setting you want is shown.
  7. While in decode demo menu, press "Play" to begin the decode demos. Press "Stop" to return to the main menu.
  8. While in encode demo menu, press "Rec" to begin the encode demos. Press "Stop" to return to the main menu.
  9. While the demo runs, data about the settings, processor load, and rates are shown. Static settings are on the right. Dynamic data reporting is on the left.
  10. This information overlays the video; as a result the video you see is darker than the actual video. To hide the information display so that you can better see the video, press the "INFO" button on the keypad. You can change the transparency of the OSD (overlay) while running a demo by using the left and right arrows on the remote.
  11. Press "Stop" or "Pause" when you want to end or pause a demo.
  12. Press "Stop" from the settings screen, you go back to the main menu

The demos use the Codec Engine to allow applications to run algorithms.


About the Decode Demo

The Decode demo plays speech,audio and video files you select. You can select a source video file or a source audio file or a source speech file. Use the left and right arrow buttons to choose from the demo files and the files created by the encode example, which are stored on the EVM’s NAND flash. The decoded signals are sent to your video display and speakers.

The supported video algorithms are MPEG4 Simple Profile (.m4v file extension) and H.264 Base Profile (.264 file extension).

The supported audio algorithms is AAC (.aac file extension).

The supported speech algorithms is G711 (.g711 file extension). By default the display output is LCD.

Table 3.1 Key Pad Buttons for Decode Demo

Key Pad Number Key Pad Function Mode Action Performed
S7/S9 Left/Right Setup Select a different file combination
S17/S8 Play or OK Setup Begin decode demo
S4 INFO Run Toggle information display
S7/S9 Left/Right Run Change information transparency level
S14 Pause Run Pause demo (press Play to resume)
S15 Stop Setup/Run Return to previous screen

The application runs on the ARM using Linux. The video and audio signals are passed to decoders by the Codec Engine.

To use this demo from the command line, see Section Running the Demos from Command Line.

About the Encode Demo

The encode demo previews captured content and encodes the captured video input as well as speech input according to the options selected. Use the left and right arrow buttons to choose from the encoder to be used and the files created by the encode example, which are stored on the EVM’s NAND flash. The captured signals are sent to your video display. Please note that the record duration is limited by the size of the EVM NAND Flash. In case of standalone mode, it is advisable to run the demos from SD/MMC card. In this case the target file system will reside in the SD/MMC card.

The supported video algorithms are MPEG4 Simple Profile (.m4v file extension) and H.264 Base Profile (.264 file extension).

The supported speech algorithm is G.711 Encoder (.g711 file extension)

By default the display output is LCD.

Table 3.1 Key Pad Buttons for Encode Demo

Key Pad Number Key Pad Function Mode Action Performed
S7/S9 Left/Right Setup Select a different file combination
S13/S8 Rec or OK Setup Begin Encode Demo/Start Recording
S4 INFO Run Toggle information display
S7/S9 Left/Right Run Change information transparency level
S14 Pause Run Pause demo (press Record to resume)
S15 Stop Setup/Run Return to previous screen

The application runs on the ARM using Linux. The video encode runs on the DSP and the encode demo application running on the ARM uses codec engine framework to communicate with DSP encoder algorithms.

To use this demo from the command line, see Section Running the Demos from Command Line.

Running the Demos from Command Line

You can run the demo applications from the Linux shell in a terminal window connected to the EVM board’s serial port. These are the same demos described in Section Starting the Standalone Demos.

If the demos are currently running you should stop them using the S15 key until you see the "Quiting demo interface..." screen.

Before running demo applications from the command line, the CMEM and accelerator kernel modules must be loaded. Use "lsmod" to see if they are loaded. If not, use the following commands to load these modules:

target $ cd /opt/dvsdk/omap3530
target $ ./loadmodules.sh

After running the demo, if you require unloading the kernel modules previously loaded, use the unloadmodules.sh. Using this shell script unloads the modules in the order it is required and resolves any internal dependencies.

target $ ./unloadmodules.sh

Note 1: While running decode, encode or interface applications from the command line, ensure that no two of these applications are running simultaneously. If this is not taken care of, then there could be memory leaks due to CMEM not freeing up the memory and eventually when applications are run multiple times, it could result in memory allocation failures.

Note 2: If the interface application is started on by default, on EVM power on, exit the interface application by pressing S8 in the startup screen to go to the demo menu and then press S15 for quitting the interface application.

Running the Decode Demos from Command Line

To see the command-line options for the demos, use one of the following commands with the -h or --help option:

target $ ./interface -h
target $ ./decode -h

Assuming you have gone through OMAP35x DVEVM Software Setup you can also find the list of command-line options in decode.txt available under /home/<useracct>/dvsdk_#_##_##_##/dvsdk_demos_#_##_##_##/omap3530/decode

The DVSDK provided video and audio files required for playback are available at /opt/dvsdk/omap3530/data/videos and /opt/dvsdk/omap3530/data/sounds folder respectively on the target file system.

Running the Encode Demos from Command Line

Note 1: Please make sure that the input device is connected or else you may get the following error message."Error: Failed to create capture device"

To see the command-line options for the encode demos, use one of the following commands with the -h or --help option:

target $ ./interface -h
target $ ./encode -h

Assuming you have gone through OMAP35x DVEVM Software Setup you can also find the list of command-line options in encode.txt available under /home/<useracct>/dvsdk_#_##_##_##/dvsdk_demos_#_##_##_##/omap3530/encode

The encoded content will get stored in data/videos folder

Running the Encode Demos with De-interlacer from Command Line

Note 1: Please make sure that the input device is connected or else you may get the following error message."Error: Failed to create capture device".
Note 2: Please ensure that ARM frequency is at 720Mhz and DSP frequency at 520MHz to get D1 30 Frames per Second performance with H.264 and MPEG4 encode.

The standalone demos have de-interlacer enabled by default.To enable de-interlacer from command line follow the below steps.

target $ ./encode -v data/videos/davincieffect_422i.264 -d

Running the Video Encode examples

The video encode examples can also be executed from command line. The current encode examples only support file based encode.

If you wish to run the video encode examples, perform the following steps.

  1. Set up the OMAP35x DVEVM as given in section OMAP35x DVEVM Software Setup
  2. Rebuild the DVSDK software as mentioned in Rebuilding the DVSDK software for the target
  3. Copy the video encode application to your target NFS work area.
host $ cp /home/<useracct>/dvsdk_#_##_##_##/dmai_#_##_##_##/packages/ti/sdo/dmai/apps/video_encode_io1/linux/video_encode_io1_omap3530.x470MV 
   /home/<useracct>/workdir/filesys/opt/dvsdk/omap3530/.
host $ chmod +x /home/<useracct>/workdir/filesys/opt/dvsdk/omap3530/video_encode_io1_omap3530.x470MV
  1. The input files for video encode are available at /home/<useracct>/dvsdk_#_##_##_##/clips/omap3530/data/videos where ## are the version numbers.
  2. Example execution using the YUV files provided as part of DVSDK
    • MPEG4 Encoder
      target $ ./video_encode_io1_omap3530.x470MV -c mpeg4enc -i data/videos/davincieffect_qcif_422i.yuv -o output.m4v -r 176x144 -n 5 
    • H.264 Encoder
      target $ ./video_encode_io1_omap3530.x470MV -c h264enc -i data/videos/davincieffect_qcif_422i.yuv -o output.264 -r 176x144 -n 25 
  3. Use the –h option to determine the usage of the encode application and execute the encode application with the necessary parameters
 target $ ./video_encode_io1_omap3530.x470MV –h 

When you run the above command, you will get the following:

Usage: video_encode_io1_<platform> [options]

Options:

--benchmark Print benchmarking information

-b | --bitrate Bitrate used to process video stream [variable]

-c | --codec Name of codec to use

-e | --engine Codec engine containing specified codec

-h | --help Print usage information (this message)

-i | --input_file Name of input file containing raw YUV

-n | --numframes Number of frames to process [Default: 100]

-o | --output_file Name of output file for encoded video

-r | --resolution Video resolution ('width'x'height')

At a minimum the codec name, the resolution and the file names *must* be given

The table below provides values to guide you for filling the options:

Options MPEG4 SP Encode H.264 BP Encode
Name of the codec to use (-c or --codec) mpeg4enc h264enc
Resolution (-r or --resolution) As specified in the test parameters configuration file for the input As specified in the test parameters configuration file for the input
Number of frames to be encoded As specified in the test parameters configuration file for the input As specified in the test parameters configuration file for the input


Running the Video LoopBack example

The video LoopBack examples can also be executed from command line.

If you wish to run the video LoopBack examples, perform the following steps.

  1. Set up the OMAP35x DVEVM as given in section OMAP35x DVEVM Software Setup
  2. Rebuild the DVSDK software as mentioned in Rebuilding the DVSDK software for the target
  3. Copy the video LoopBack application to your target NFS work area.
host $ cp /home/<useracct>/dvsdk_#_##_##_##/dmai_#_##_##_##/packages/ti/sdo/dmai/apps/video_loopback/linux/video_loopback_omap3530.x470MV 
   /home/<useracct>/workdir/filesys/opt/dvsdk/omap3530/.
host $ chmod +x /home/<useracct>/workdir/filesys/opt/dvsdk/omap3530/video_loopback_omap3530.x470MV
target $ ./video_loopback_omap3530.x470MV -O auto 
  1. Use the –h option to determine the usage of the loopback application and execute the encode application with the necessary parameters
 target $ ./video_loopback_omap3530.x470MV–h 

When you run the above command, you will get the following:

Usage: video_loopback_<platform> [options]

Options:

-n | --numframes Number of frames to process [Default: 0 (infinite)]

-O | --display_output Video output to use (see below)

--benchmark Print benchmarking information

-h | --help Print usage information (this message)

composite [Default]

svideo

component

auto (select video output by reading sysfs)


Running the Video LoopBack with De-Interlacer example

The video LoopBack with De-Interlacer examples can also be executed from command line.

If you wish to run the video LoopBack with De-Interlacer examples, perform the following steps.

  1. Set up the OMAP35x DVEVM as given in section OMAP35x DVEVM Software Setup
  2. Rebuild the DVSDK software as mentioned in Rebuilding the DVSDK software for the target
  3. Copy the video LoopBack with De-Interlacer application to your target NFS work area.
    host $ cp /home/<useracct>/dvsdk_#_##_##_##/dmai_#_##_##_##/packages/ti/sdo/dmai/apps/video_loopback_deinterlacer/linux/video_loopback_deinterlacer_omap3530.x470MV 
    
/home/<useracct>/workdir/filesys/opt/dvsdk/omap3530/. host $ chmod +x /home/<useracct>/workdir/filesys/opt/dvsdk/omap3530/video_loopback_omap3530.x470MV
target $ ./video_loopback_deinterlacer_omap3530.x470MV -c deinterlacer -e encode -O auto 
  1. Use the –h option to determine the usage of the loopback with De-Interlacer application and execute the encode application with the necessary parameters
 target $ ./video_loopback_deinterlacer_omap3530.x470MV –h 

When you run the above command, you will get the following:

-n | --numframes Number of frames to process [Default: 0 (infinite)]

-O | --display_output Video output to use (see below)

--benchmark Print benchmarking information

-c | --codec Name of codec to use

-e | --engine Codec engine containing specified codec

-h | --help Print usage information (this message)

composite [Default]

svideo

component

auto (select video output by reading sysfs)


Running the Image Encode example

The image encode examples are not available as standalone applications, but can be executed from command line. The current image encode example only support file based encode.

If you wish to run the image encode example, perform the following steps.

  1. Set up the OMAP35x DVEVM as given in section OMAP35x DVEVM Software Setup.
  2. Rebuild the DVSDK software as mentioned in section Rebuilding the DVSDK software for the target
  3. Copy the image encode application to your target NFS work area.
host $ cp /home/<useracct>/dvsdk_#_##_##_##/dmai_#_##_##_##/packages/ti/sdo/dmai/apps/image_encode_io1/linux/image_encode_io1_omap3530.x470MV 
   /home/<useracct>/workdir/filesys/opt/dvsdk/omap3530/.
host $ chmod +x /home/<useracct>/workdir/filesys/opt/dvsdk/omap3530/image_encode_io1_omap3530.x470MV
  1. The input files are already available under folderhome/<useracct>/workdir/filesys/opt/dvsdk/omap3530/data/images for pre-built filesystem images.
    • The input files for image decode are also available at at /home/<useracct>/dvsdk_#_##_##_##/clips/omap3530/data/images, where ## are the version numbers.
  2. An example execution using the YUV files provided as part of DVSDK is given below.
    • Execute the image encode DMAI example application. If you look at the “Testparams.cfg” as mentioned in step 4b, the input file color space format is YUV422 ILE. If you look at step 6, the default input color space is 422P. Hence it is important to set the input color space to 3, which is equivalent to YUV422 ILE.
target $ ./image_encode_io1_omap3530.x470MV –c jpegenc –e encode -i data/images/remi003_422i.yuv -o Output.jpeg –r 720x576 -–iColorSpace 3 
         -–oColorSpace 1
    • Please note that the setting of the output color space format to YUV422 ILE (oColorSpace value set to 3) is not supported.
  1. Use the –h option to determine the usage of the encode application and execute the encode application with the necessary parameters
target $ ./image_encode_io1_omap3530.x470MV –h

When you run the above command, you will get the following:

Usage: image_encode_io1_<platform> [options]

Options:

--benchmark Print benchmarking information

-c | --codec Name of codec to use

-e | --engine Codec engine containing specified codec

-h | --help Print usage information (this message)

-i | --input_file Name of input file to decode and perform cache maintenance.

-o | --output_file Name of output file containing raw YUV

-r | --resolution Image resolution ('width'x'height')

| --qValue Q compression factor, from 0 (lowest quality) to 100 (highest quality). [default: 75]

--iColorSpace Colorspace used by input file [1: 422P (default), 2: 420P, 3: UYVY]

--oColorSpace Colorspace of encoded output [1: 422P (default), 2: 420P, 3: UYVY]

At a minimum resolution, codec name, and the file names *must* be given.

Use the following values for the test file chosen above:

Options JPEG Encode
Name of the codec to use (-c or --codec) Jpegenc
Resolution (-r or --resolution) As specified in the test parameters configuration file for the input


Running the Audio, Video and Image Decode examples

The decode examples performs the decode operations using the codec server and stores the decoded output in the chosen file in YUV format for image/video and PCM format for audio. These examples are executed from the command line.

NOTE: Since the decoded output is a raw YUV or PCM stream, the output file size will be in hundreds on Megabytes for video and hence ensure that the output is stored in the NFS (Network file system) and not on the NAND flash.

If you wish to run the decode examples, perform the following steps.

  1. Set up the OMAP35x DVEVM as given in section OMAP35x DVEVM Software Setup.
  2. Rebuild the DVSDK software as mentioned in Rebuilding the DVSDK software for the target
  3. Copy the decode example applications to your target NFS work area.
host $ cp /home/<useracct>/dvsdk_#_##_##_##/dmai_#_##_##_##/packages/ti/sdo/dmai/apps/video_decode_io2/linux/video_decode_io2_omap3530.x470MV 
   /home/<useracct>/workdir/filesys/opt/dvsdk/omap3530/

host $ cp /home/<useracct>/dvsdk_#_##_##_##/dmai_#_##_##_##/packages/ti/sdo/dmai/apps/audio_decode_io1/linux/audio_decode_io1_omap3530.x470MV 
   /home/<useracct>/workdir/filesys/opt/dvsdk/omap3530/

host $ cp /home/<useracct>/dvsdk_#_##_##_##/dmai_#_##_##_##/packages/ti/sdo/dmai/apps/image_decode_io1/linux/image_decode_io1_omap3530.x470MV 
   /home/<useracct>/workdir/filesys/opt/dvsdk/omap3530/

host $ chmod +x /home/<useracct>/workdir/filesys/opt/dvsdk/omap3530/video_decode_io2_omap3530.x470MV
host $ chmod +x /home/<useracct>/workdir/filesys/opt/dvsdk/omap3530/audio_decode_io1_omap3530.x470MV
host $ chmod +x /home/<useracct>/workdir/filesys/opt/dvsdk/omap3530/image_decode_io1_omap3530.x470MV
  1. Use the –h option to determine the usage of the decode example applications and execute the decode example applications with the necessary parameters
target $ ./video_decode_io2_omap3530.x470MV –h
 target $ ./audio_decode_io1_omap3530.x470MV –h
 target $ ./image_decode_io1_omap3530.x470MV –h
  1. The input files for audio decode are available at/home/<useracct>/dvsdk_#_##_##_##/clips/omap3530/data/sounds
  2. The input files for video decode are available at /home/<useracct>/dvsdk_#_##_##_##/clips/omap3530/data/videos
  3. The input files for image decode are available at /home/<useracct>/dvsdk_#_##_##_##/clips/omap3530/data/images, where ## are the version numbers.
  4. Given below is the example execution using the media files included in DVSDK. Unless otherwise specified, the DMAI video decode examples support default video output resolution of 720x480 and the number of frames decoded is 100. The DMAI image examples support decoded image output color space as YUV 4:2:2 ILE
    • MPEG4 SP Decoder
target $ ./video_decode_io2_omap3530.x470MV  -c mpeg4dec –i data/videos/davincieffect_ntsc_1.m4v -o mpeg4_test_output.yuv
    • H.264 BP Decoder
target $ ./video_decode_io2_omap3530.x470MV  -c h264dec –i data/videos/davincieffect_ntsc_1.264 -o h264_test_output.yuv
    • MPEG2 MP Decoder
 target $ ./video_decode_io2_omap3530.x470MV  -c mpeg2dec –i data/videos/davincieffect_ntsc_1.m2v -o mpeg2_test_output.yuv
    • JPEG Decode
 target $ ./image_decode_io1_omap3530.x470MV –c jpegdec -i data/images/remi003_422i.jpg -o jpeg_test_output.yuv

The resolution is 720x576 and the decoded output color space format is YUV422 ILE.

    • AAC Audio Decode
 target $ ./audio_decode_io1_omap3530.x470MV -c aachedec -i data/sounds/davincieffect_HEv2.aac -o aac_test_output.pcm


Executing DMAI Sample Applications

The following DMAI applications are supported in the DVSDK 3.01. These applications can be found under <your_dvsdk_installation>/dmai_2_05_00_xx/packages/ti/sdo/dmai/apps



For executing these application, use the following command for usage

target $ ./<dmai_executable>_omap3530.x470MV --help
or
target $ ./<dmai_executable>_omap3530.x470MV -h


Executing Codec Engine Examples

There are many codec engine examples and they can be found under <your_dvsdk_installation_dir>\codec_engine_x_yy_zz_bb\examples\ti\sdo\ce\examples\apps


We assume you have your DVEVM properly set up, and that you are able to mount an NFS.


You must pass the MEM=80M (or less than 80M) parameter to your Linux kernel from your u-boot prompt.


Copy the necessary files into a directory visible from the DVEVM board (e.g. an NFS or SD card mount, etc). Those files are:


Build, Install and Execute the CE examples

OR
You could use the following command from the top level Makefile in the DVSDK installation directory

host $ make ce_examples_clean
host $ make ce_examples


When you run the script, you should see the following output:

    target $ ./loadmodules.sh
    cmem initialized 3 pools between 0x87800000 and 0x88000000
    dsplinkk: no version for "struct_module" found: kernel tainted.
    DSPLINK Module (1.61) created on Date: XXX XX XXXX Time: XX:XX:XX
    target $ ./app_remote.xv5T

You will see several output lines:

    App-> Application started.
    CEapp-> Allocating contiguous buffer for 'input data' of size 1024...
    CEapp-> Contiguous buffer allocated OK (phys. addr=0x87fff000)
    CEapp-> Allocating contiguous buffer for 'encoded data' of size 1024...
    CEapp-> Contiguous buffer allocated OK (phys. addr=0x87ffe000)
    CEapp-> Allocating contiguous buffer for 'output data' of size 1024...
    CEapp-> Contiguous buffer allocated OK (phys. addr=0x87ffd000)
    App-> Processing frame 0...
    App-> Processing frame 1...
    App-> Processing frame 2...
    App-> Processing frame 3...
    App-> Processing frame 4...
    App-> Finished encoding and decoding 4 frames
    App-> Application finished successfully.


E2e.jpg For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article GSG: OMAP35x DVEVM Running the Demos here.
Hyperlink blue.png Links
ARM Microcontroller MCU ARM Processor Digital Media Processor Digital Signal Processing Microcontroller MCU Multi Core Processor
Ultra Low Power DSP 8 bit Microcontroller MCU 16 bit Microcontroller MCU 32 bit Microcontroller MCU

Leave a Comment
Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox