NAME
       decode - decode video and/or audio or speech files

SYNOPSIS
       decode [options...]

DESCRIPTION
       This demo uses the Codec Engine to decode data from files and output
       the uncompressed data using peripheral device drivers. Video and speech
       files are supported.  All files must consist of raw encoded frames of
       data (elementary streams).

       You must supply at least one file for the demo to run.

       The DM350MM and CMEM kernel modules need to be inserted for this demo
       to run.  Use the script 'loadmodules_hd.sh' to make sure both kernel
       modules are loaded with adequate parameters.

OPTIONS
       -v <video file>, --videofile <video file>
             Decodes a video file.  The demo detects which type of video file
             is supplied using the file extension.  Supported video algorithms
             are:

                 MPEG4 SP (.mpeg4 or .m4v extension)
                 H.264 HP (.264 extension)

       -s <speech file>, --speechfile <speech file>
             Decodes the speech file. The demo detects which type of speech
             file is supplied using the file extension. The only supported
             speech algorithm as of now is G.711 (.g711 extension).

       -y <1-3>, --display_standard <1-3>
             Sets the resolution of the display. Clips larger than the display
             will be center clamped, and clips smaller than the display will
             be centered.

                    1       D1 @ 30 fps (NTSC) [Default]
                    2       D1 @ 25 fps (PAL)
                    3       720P @ 60 fps

       -l, --loop
             If this option is selected, the demo will restart at the
             beginning of a file (or files) when the end is reached. If this
             option is not selected (which is the default) the demo will quit
             once the end of the file (or files) has been reached.

       -o, --osd
             Enables the On Screen Display for data visualization. If this
             option is not passed, the data will be output to stdout instead.

       -k, --keyboard
             Enables the keyboard input mode which lets the user input
             commands using the keyboard in addition to the IR remote control
             interface. At the prompt type 'help' for a list of available
             commands.

       -t <seconds>, --time <seconds>
             The number of seconds to run the demo. Defaults to infinite time.

       -h, --help
             This will print the usage of the demo.

EXAMPLE USAGE
       First execute this script to load the kernel modules required:
             ./loadmodules_hd.sh

       General usage:
             ./decode -h

       H264 HP  video on a 720p display and G.711 speech decode with OSD:
             ./decode -s test.g711 -v test.264 -o -y 3

       MPEG4 NTSC video decode only with keyboard interface on component output:
             ./decode -v test.mpeg4 -k -y 1 

COPYRIGHT
       Copyright (c) Texas Instruments Inc 2009

       Use of this software is controlled by the terms and conditions found in
       the license agreement under which this software has been supplied or
       provided.

KNOWN ISSUES

VERSION
       2.0

CHANGELOG
       1.2, 1.3:
             In order to support multiple display resolutions on this platform
             the '-y' flag was added.

             Showing the OSD is now selectable using the '-o' switch. If this
             option is not set the data will be written to stdout.

             The file loader is now in a separate thread, allowing I/O to be
             done in parallel with the video decoding.

       1.1:
             The display thread now uses the H/W resizer peripheral to fill
             the display frame buffers. This change reduces the ARM CPU load
             significantly as memcpy() is no longer used.

       1.0:
             The 'video' thread has been broken up into a 'video' thread and
             a 'display' thread to add another layer of buffering in case a
             sequence of frames are particularly demanding. The drawback is
             an extra memory copy of the buffer on the ARM side increasing
             the ARM CPU load of the demo. As an added benefit this demo
             can now support variable sized video clips.

             The demo now has a keyboard interface (-k) which lets
             you input the same commands as you would have input using the
             remote control in the past.

             The demo now supports interlaced mpeg2 clips, completing the
             support for mpeg2 main profile.

SEE ALSO
       For documentation and release notes on the individual components see
       the html files in the host installation directory.
