文档库 最新最全的文档下载
当前位置:文档库 › DM81xx_DVR_RDK_DemoGuide

DM81xx_DVR_RDK_DemoGuide

DM81xx_DVR_RDK_DemoGuide
DM81xx_DVR_RDK_DemoGuide

DM81xx DVR RDK Demo Guide

Version 1.0

For DVRRDK Ver 02.80.00.XX

Copyright ? Texas Instruments Incorporated. All rights reserved. Information in this document is subject to change without notice. Texas Instruments may have pending patent applications, trademarks, copyrights, or other intellectual property rights covering matter in this document. The furnishing of this documents is given for usage with Texas Instruments products only and does not give you any license to the intellectual property that might be contained within this document. Texas Instruments makes no implied or expressed warranties in this document and is not responsible for the products based from this document.

IMPORTANT NOTICE

Texas Instruments and its subsidiaries (TI) reserve the right to make changes to their products or to discontinue any product or service without notice, and advise customers to obtain the latest version of relevant information to verify, before placing orders, that information being relied on is current and complete. All products are sold subject to the terms and conditions of sale supplied at the time of order acknowledgment, including those pertaining to warranty, patent infringement, and limitation of liability.

TI warrants performance of its products to the specifications applicable at the time of sale in accordance with TI’s standard warranty. Testing and other qua lity control techniques are utilized to the extent TI deems necessary to support this warranty. Specific testing of all parameters of each device is not necessarily performed, except those mandated by government requirements.

Customers are responsible for their applications using TI components.

In order to minimize risks associated with the customer’s applications, adequate design and operating safeguards ought to be provided by the customer so as to minimize inherent or procedural hazards.

TI assumes no liability for applications assistance or customer product design. TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or other intellectual property right of TI covering or relating to any combination, machine, or process in which such products or services might be or are used. TI’s publication of information regarding any third party’s products or services does not constitute TI’s approval, license, warranty or endorseme nt thereof.

Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations and notices. Representation or reproduction of this information with alteration voids all warranties provided for an associated TI product or service, is an unfair and deceptive business practice, and TI is neither responsible nor liable for any such use. Resale of TI’s products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service, is an unfair and deceptive business practice, and TI is not responsible nor liable for any such use.

Also see: Standard Terms and Conditions of Sale for Semiconductor Products.

https://www.wendangku.net/doc/ff912227.html,/sc/docs/stdterms.htm

Mailing Address:

Texas Instruments

Post Office Box 655303

Dallas, Texas 75265

Copyright ? 2010, Texas Instruments Incorporated

Revision History

Version Date Revision History

0.1 29 Aug 2011 Demo Details Added

0.2 14 Sep 2011 Added details on McFW DVR Demo for new features

0.3 29 Sep 2011 Updated McFW DVR Demo details, Removed Chains Demo

0.4 28 Oct 2011 Updated as per new user inputs

0.5 02 Dec 2011 Updated as per new user inputs

0.6 30 Dec 2011 DM816x & DM814x demo guides merged. A single demo guide

applicable for DVR RDK release for all platforms

0.7 07 Feb 2012 Decoder only Application section updated

0.8 08Feb 2012 SCD/LMD user interface changes updated

0.9 16 Feb 2012 Snapshots removed, document cleaned up.

1.0 25 May 2012 Updated Menu Options, descriptions

TABLE OF CONTENTS

IMPORTANT NOTICE (2)

1Overview (5)

2Running the Main Applications (5)

2.1Multi-Channel Framework DVR Application (6)

2.1.1Generic Notes on Options Selection (7)

2.1.2Capture Settings (8)

2.1.3Encoder Settings (11)

2.1.4Decoder Settings (13)

2.1.5Display Settings (15)

2.1.6Audio Capture & Encode demo (19)

2.1.7Audio encode demo (19)

2.1.8Audio decode demo (19)

2.1.9Change Modes (8CH Usecase) (19)

2.1.10Audio Capture / Playback Settings (19)

2.2Decoder Only Application (VDEC + VDIS – SD/HD Decode Only) (23)

2.2.1Decode ->Display App and Demo options for Delete/Create decode channels (24)

1Overview

DVR RDK

for

implementing DVR products.

The document provides details on how to use the applications provided in this release package.

The applications included in the package are:

1.Multi Channel Framework DVR Application

Multi Channel FW Application is based on McFW APIs and demonstrates the

data flow for 16 CH Encode and Decode DVR

2.Multi Channel Decode Only Application

3.Multi Channel Capture, Encode Application

4.Multi Channel Capture, Display Application

Note

o Several applications are made available to exercise the capability of DVR Multi Channel Framework. Few applications might not be supported in different

release versions / platforms

o Demo guide is common for DM81xx platforms. All usecase / options are not valid in all platforms. Refer release notes on application specification

supported on specific platforms.

2Running the Main Applications

?On the console screen, go to the directory

/opt/dvr_rdk/ti816x/ (or) /opt/dvr_rdk/ti814x

and run the scripts as below:

$cd /opt/dvr_rdk/ti816x/

$./init.sh

“init.sh” initializes the shared regions and load s the required

kernel modules

?Then run the load.sh script and the output would be as shown after the command:

$./load.sh

“load.sh” uses firmware load utility to load the VPSS and Video

M3 executables. Also, it sets up the remote debug print utility

to receive the prints from M3 and DSP cores on A8.

2.1 Multi-Channel Framework DVR Application

This application displays a sample use of the TI Multi-channel framework APIs

Steps to run this particular application are as below:

1.On the console screen, and run the script below

$./run.sh

2.On running the above script you should see a user menu

1: VCAP + VENC + VDEC + VDIS - Progressive SD Encode + Decode

3: VCAP + VENC + VDIS - SD Encode ONLY

4: VCAP + VENC + VDIS - HD Encode ONLY

5: VDEC + VDIS - SD/HD Decode ONLY

6: VCAP + VDIS - NO Encode or Decode

There will be a set of Custom demos also shown on the user menu.

3.To execute any application enter as input. If you want to run a Progressive

Capture / Encode / Decode / Display demo, press 1.

This user guide explains supported controls with respect to use case 1.

4.After choosing option 1 of the above options, you will be shown the default

channel details showing the number of primary & secondary channels

. For Example

--------------- CHANNEL DETAILS-------------

Capture Channels => 16

Enc Channels => Primary 16, Secondary 16

Dec Channels => 16

Disp Channels => 32

5.After each of the above step you will be asked whether to enable file write mode

or not. To enable press …y? and then you will be asked the location where u want

to save the file.

First user would be asked to enable file write of SCD block Meta data. User can

enable file write of a particular channel. Once user has chosen this option, user

would be asked to enable file write of bit stream.

This provides option of writing captured video to a location in file system

disk or nfs>. User can choose to write the captured video data for a later

analysis. No read back is provided. By default, only 1 channel write for each

stream type is enabled.

To disable file write mode just enter …n?.

6.If you choose to give a input file of your own stream to see the decoder box

functionality, enter 5 and fill the location of the streams as per instructions

required to be decoded as shown below: This use-case has been described in

Section 2.2

7.After either of the above choices, you should be able to see the outputs.

2.1.1 Generic Notes on Options Selection

?Channel numbers will vary depending upon the usecase executed. On UI input, min~max range of channels specific to usecase will be displayed. User

should select the channels according to that range.

?Netra HD encoder demo is the 4 channel Vcap+VEnc+VDis demo application (Demo option 4 in user menu). In this demo 4 channels are captured via 4

different TVPs. In this demo 0th channel of each TVP is feed video input to 4

capture channels. Below list shows the logical to physical channel mapping.

?Channel numbers might vary in your actual run depending on use case executed.

?Few UI options, explicitly display message informing the availability of the feature on specific usecase. Selecting an invalid option will end up in

undefined behavior.

?The data flow of individual usecases will be part of McFW user guide (or) release notes. Also, the specific usecase files in mcfw source directory have

an ASCII data flow diagram at the top of the file. For e.g.,

mcfw\src_linux\mcfw_api\usecases\ti814x\multich_progressive_4d1_vcap_ve

nc_vdec_vdis.c has the data flow diagram for 814x –4D1 progressive

usecase.

2.1.2 Capture Settings

Capture settings can be controlled using “Capture Settings” UI option as explained below.

Note: These settings are not applicable for use cases not involving CAPTURE

1.Disable channel

It disables a particular channel at the capture; hence you would not be able to see the channels live output and the decoded output on the displays.

2.Enable channel

It enables a previously disabled channel at the capture; hence you would be able to see the channels live output and the decoded output on the displays.

3.OSD Window position

Position of the OSD window can be varied by specifying the window number (0 or 1 or 2), and the new position coordinates(X, Y) for that window. After which you will have the OSD window at your desired position.

Note: OSD settings are not valid on all use cases.

4.OSD Window size

Note: Please refer to the source code to get the usage of VCAP_OSDWINPRM

5.OSD Window transparency

User can enable or disable transparency of the OSD window by selecting this option.

Currently, the transparency value is 0 (Luma value is 0 and Chroma value is 0). This means if the OSD overlaying content has value of 0 and transparency is enabled, the pixels with value 0 will become transparent.

Note: In current application, the sample OSD content does not have any 0x0 pixels, so the effect of enable/disable transparency is not noticed.

6.OSD Window global alpha

The OSD Window global alpha can be set by this option, entered value will be valid for the complete overlay content.

User can set the value from 0 to 128. The value entered is U1Q7 format where the MSB is integer value and other seven bits are fraction.

7.OSD Window enable/disable

OSD window itself can be enabled\disabled using this option.

8.Detect video

The input video format (PAL/NTSC) will be detected and notified with this option.

9.Dynamic resolution change

This option allows changing the resolution of primary/secondary channels to pre-defined resolutions (D1, VGA, HALD-D1, CIF and QCIF)

This option is not valid on ALL use-cases.

a.SCD mode selection

To select different SCD modes on a particular channel, this option can be used. Following different modes are supported.

In the dvr_rdk release version 02.80.00.10,motion detection has to be enabled with tamper detection. SCD motion detection only mode i.e. ALG_LINK_SCD_DETECTMODE_MONITOR_BLOCKS, is not supported. Motion detection works fine when it is enabled with tamper detection i.e. SCD mode ALG_LINK_SCD_DETECTMODE_MONITOR_BLOCKS_AND_FRAME.

b.SCD frame sensitivity

Internal threshold for tamper tolerance. Takes values in the range of 0-6 where 0 is lowest and 6 is the maximum sensitivity.

c.SCD ignore lights OFF flag

Set to 1 to ignore sudden, significantly darker avg. scene luminance

d.SCD ignore lights ON flag

Set to 1 to ignore sudden, significantly brighter avg. scene luminance.

e.Live Motion Detection (LMD) Configuration

To activate Live Motion Detection (LMD), CIF stream path should be always activated as LMD works on CIF stream only.

In the SCD/LMD algorithm, motion detection happens on (32x12)/ (32x10) pixel block in PAL/NTSC input respectively.

In the current demo application, SCD/LMD configuration is done at tile level. Each frame is divided in to a set of 3x3 tiles (Max 9-tiles).

User can select any of the tiles starting from 0 - 8 (topLeft - bottomRight). Once the tile is selected, user can update block config of all the blocks within that tile.

To enable motion detection in any of the tiles of the frame, user can select option “e” in the capture settings.

Condition checks have been added to take care of left and bottom boundary. Once the block boundaries are decided, user is asked to input SCD tile enable/disable option. If the tile is enabled, user is asked to input sensitivity. Refer SCD reference document for further details on SCD.

Note: Option “p” can be used to navigate to a preview menu.

f. BlindArea/PrivacyMask Configuration

User is required to input chanId and MaskWindowId. Windows Co-ordinates, Color and Size are default. Please refer demo_blindArea.c file for default values g. Print SCD frame status

Prints the Tamper detect status for all the channels

2.1.3 Encoder Settings

1.Disable channel

It disables encode of a particular channel; hence you would not be able to see the channel?s decoded output on the display.

2.Enable channel

It enables a previously disabled encode of a particular channel, hence you would be able to see the channel?s decoded output on the display.

3.Change bit-rate

This option allows you to modify the output bit-rate of a particular encode channel.

4.Change frame-rate

This option allows you to modify the output frame-rate (fps) of a particular encode channel.

5.Change I-frame interval (GOP ratio)

This option allows you to modify the Interval between two consecutive intra frames. Example Values:

0 - Only first frame to be intra coded

1 - No inter frames (all intra frames)

N - One intra frame and N-1 inter frames, where N > 1

6.Force I-frame

Force the current (immediate) frame to be encoded as an Intra coded frame for a particular channel.

7.Change QP I-frame/JPEG Quality Factor

This option handles two cases,

i)To set the Quantization parameters for the I/IDR frames, for the specific

H264 channels

This option allows you to modify the initial/Maximum/Minimum quantization parameter for I/IDR frames.

ii)JPEG quality factor can be controlled for the JPEG specific channels also This option allows you to modify the quality of the JPEG output. Set this parameter to 2 for lowest quality and 97 for best quality.

8.Change QP P-frame

To set the Quantization parameters for the P frames, for the specific H264 channels This option allows you to modify the initial/Maximum/Minimum quantization parameter for P frames.

9.Change RateControl Algorithm(CBR/VBR)

This option allows you to change the rate control algorithm from the default VBR to CBR for a particular channel.

0.Take a JPEG Snapshot

By using this option, you would be able to take the MJPEG snapshot of the current (immediate) frame. For Example: If the MJPEG target framerate is set to 0 and file writes are enabled. Then this option will dump a single frame every time pressed for

a particular channel

a.Bitrate Switching Interval: VBRDuration

Increasing this value will make VBR wait for longer time before switching bit-rate state. This parameter is used only when maxBitRate is greater than 1.5 times of targetBitRate

Note: the above option is just for debugging purposes.

b.VBR Sensitivity

It controls the amount by which the bit-rate increases over the average bitrate when transition happens to high complexity state

Note: the above option is just for debugging purposes

i. To print the current values of Bit-rate, Frame rate and the I-Frame interval for a

particular channel.

2.1.4 Decoder Settings

1.Disable channel

It disables decode of a particular channel hence you would not be able to see the decoded display.

2.Enable channel

It enables a previously disabled decode of a particular channel after which you will be able to see the decoded display of a particular channel

3.Create Channel

It enables you to create a channel dynamically, explained in detail in section 2.2.1 4.Delete Channel

It enables you to delete a channel dynamically, explained in detail in section 2.2.1 5.Switch File

It enables you to switch to a different file for playback dynamically, explained in detail in section 2.2.1

This option enables us to:

a.Switch channel resolution runtime

Dec link and Demo app supports runtime resolution change. For example, A channel created with D1 can be closed and open for HD resolution

b.Dynamically switch codec Alg type

Dec link and Demo app supports runtime codec type change. For example, A channel created with H264 can be closed and open for MPEG codec Type

Note – 3,4,5 options is not valid for all use cases.

6.Enable/Disable Decoder Error Reporting

It allows you to enable/disable error reporting console prints per channel wise.

7.b: Get decoder buffer stats

Prints decoder buffer statistics

Note: Support 32ch H264 HD @ lower FPS

“numBufPerCh” in DecLink_ChCreateParams need to be configured with lower values such as 2 or 3 here

Please use an ini file to start the demo app, or set by App, with following channel configuration

?First 6ch -> HD

?Next 6ch -> 720p

?Remaining 20 -> D1

?This will help to allocate all different size buffers (HD, 720p, D1 & CIF) on Linux side

?Set DecLink_ChCreateParams. algCreateStatus = 0 for the unwanted channels

A new parameter “algCreateStatus” has been added in the DecLink_ChCreateParams(), where it can take values either 0 or 1. This will allow the App to DO NOT create the codec instance and output buffers in certain channels ?If algCreateStatus = 0: Only the partial channel gets created, neither codec instance nor the output buffers will be getting created. App will be able to

make this channel fully functional dynamically by calling

DEC_LINK_CMD_CREATE_CHANNEL API

?If algCreateStatus =1: Fully functional channel will be created with Both codec instance and the output buffers created, ready to operate

Dynamically create/delete channels supported only in NON-TILED mode as Ducati Tiler memory allocation doesn?t support run time memory allocation & free

2.1.5 Display Settings

It allows the user to hide the display of a particular channel.

2.Enable channel

It enables the user to show back a previously disabled/hidden display of a particular channel.

3.Switch Layout

This option allows the user to change the display layout of display of the channels.

On selecting a particular layout, you will notice that the layout has changed as per the layout selected at all displays Live.

4.Switch Channels

This option allows you to re-map of the channels in the present layout. The user

needs to only give the start channel number that should get displayed on the top left window (Window 0) for each display; other channels to the rest of the windows are

calculated by incrementing the channel number.

5.Change resolution

This option allows you to change the display output resolution for all the mentioned output displays. Supported resolution changes are 1080P60, 720P60, XGA, SXGA, NTSC or PAL

Live-Bypass based settings

Under display setting the following options are provided. This option is valid only for few use cases & using this option on unsupported use case will have no effect or undefined behavior.

6.Switch Queue(ONLY FOR SD Display)

User can switch the content to be displayed by the display link by selecting the queueID. In the demo,

The display queue 0 corresponds to mosaic view (SwMs output)

The display queue 1 corresponds to live bypass view (Capture output)

By selecting QueueID 0 or QueueID 1 user can switch at runtime between Mosaic and Live views.

7.Switch Channel(ONLY FOR Enc HD Usecase)

User can switch the content to be displayed by the display link by selecting the chanID in the demo. User can switch channel of either HDMI 0 or 1 by selecting respective HDMI.

8.Switch SDTV channel (ONLY for progressive demo)

When in live bypass view, the user can additionally select the capture channel to be displayed and switch between capture channels at runtime.

This option is applicable only for SD display link and only when in “Live bypass view” mode.

9.2x digital zoom in top left

This option can magnify the top left (from point 0%, 0% to point 50%, 50%) corner of the window for 2 times. It applies on the window 0. Please reference the API to see how to apply on other window.

a.2x digital zoom in center

This option can magnify the center (from point 25%, 25% to point 75%, 75%) of the window for 2 times. It applies on the window 0. Please reference the API to see how to apply on other window.

b.Avsync Pause

This option enables a pause on all channels being displayed

c.Avsync Timescale Play

This option is for trickplay mode of playing slow or faster than usual speed.

1000 = 1x

d.Avsync Step Fwd

Pause & display frame by frame every-time this option is pressed

e.Avsync Normal Play

Undo a pause, and return to normal playback

f.Avsync Seek Play

Seek forward based on entering time

g.Avsync Reset Player timer

This option can be ignored. It is used to API debugging purposes only.

h.Avsync Set Player State Play

Reset, Step Fwd play or Scan Play to normal

i.Avsync Scan Play

Playback based on playing by only I-Frames

j.SwMS flush frames

This option can be ignored. It is used to API debugging purposes only. k.Run Grpx fbdev demo

2.1.6 Audio Capture & Encode demo

AAC-LC File In -> Encode -> AAC File Out

User need not provide any parameter.

Example Usage:

To enable capture & encode & store aac output of captured channels

?Select Option 6 after starting custom encode demo

?ch*.aac files will be generated in current execution directory

2.1.7 Audio encode demo

PCM File In -> Encode -> AAC-LC File Out

Parameters to provide – bitrate, sample rate, num of channels

Bit rate depends on encoder?s allowed bitrate range for a specific sample rate

Example Usage:

To enable file based encode.

?Select Option 7 after starting custom encode demo

?Give input file name. Eg - input_16k_mono.pcm

?Give output file name. E.g – out.aac

?Give Bitrate – E.g – 24000

?Give Num Of channels – E.g – 1

?Give Sample Rate – E.g – 16000

?Encoding will start & message will get printed after encode completes

?Encode can be stopped by selecting same option.

2.1.8 Audio decode demo

PCM File In -> Decode -> PCM File Out

Parameter – DesiredChannelMode

Example Usage:

To enable file based decode.

?Select Option 8 after starting custom encode demo

?Give input file name. Eg - input_16k_stereo.aac

?Give output file name. E.g – out.pcm

?Give Num Of channels – E.g – 2

?Decode will start & message will get printed after decode completes

?Decode can be stopped by selecting same option.

2.1.9 Change Modes (8CH Usecase)

In 8 CH usecase, there are different modes of captured resolutions like 2D1 + 6 CIF,

8 D1 etc. These modes can be selected using “Change modes” .

2.1.10 Audio Capture / Playback Settings

Audio capture and playback are integrated with Progressive SD Encode + Decode demo. Sub menu available for setting audio storage path, audio capture start/stop, audio play start/stop & statistics. User need to set the valid file storage path before proceeding for Audio capture/playback.

Following audio configuration is available on DM816X EVM Board:

Upto 16 channels audio capture and 1 channel playback is supported in this version.

Audio capture/playback with G711 encoding/decoding.

Audio is captured at 16 KHz and encoded using 8-bits ulaw. Playback happens at same sampling rate using 8-bits ulaw decode. If testing with any PC software at audio out end, configure the PC software for 16 KHz and 8-bit ulaw.

By default, 16 channels capture is configured in the linux kernel as well as the application. Need to ensure that DVRRDK hardware ver 0.3A or above (Or DM8168 EVM VS Daughter Card Rev C) is used

Note - Any operation with audio is possible only when video capture is enabled and running. Audio settings will fail if tried before video capture.

Audio settings menu screen shot is shown below –

Capture, playback operations will fail as shown below until a proper storage path is provided. So, the first operation should be setting audio storage path.

User should set audio recording directory - can point to nfs or hdd. Application will try to create this directory if not existing already. If creation fails for some reason, it prints error message. User should again select storage path setting option and provide a valid path. This is one time operation on app execution. Still user can switch to a different storage path on same session.

相关文档