Texas Instruments

DirectShow filters for TI multimedia codecs

DShow release 1_10_00_05

Release Notes 2010-03-03

Introduction

This release of the DirectShow filters is targeted for OMAP35x EVM.

The DirectShow filters, when combined with the WinCE board support package and TI’s DVSDK for WinCE, gives developers the ability to run TI’s multimedia codecs within Windows CE Media Player and the DirectShow framework. Developers can use these as an example for developing their own DirectShow filters to exercise codecs managed by TI’s Codec Engine framework.

This document is divided into the following sections:

Features Supported In Current Release

Filters available:

-          MPEG2 decode (XDM 1.2)

-          MPEG4 decode (XDM 1.2)

-          H264 decode (XDM 1.2)

-          AAC decode (XDM 1.0)

-          MP3 decode (XDM 1.0)

The filters have been validated with the following components:

  • WinCE DVSDK release 1.00.00.05
    • Codec Engine 2.24
    • Codec Server 1.0 OMAP3530
    • DSP Link 1.61.04
    • DMAI 1.24.00
    • XDCTOOLS 3.10.05.61
  • WinCE Board Support Package (BSP) R6.14 from BSquare
  • WinCE 6.0 R3 with November 2009 update

What's New

Version 1.10.00

============

Added AAC parser and decode filters to allow AAC file playback

Added MP3 decode filter as an option a customer can enable if they choose to offload MP3 decoding onto DSP 

Added support for MP4/3GPP containers for the following formats:

            - H264 + AAC

            - MPEG4 + AAC

Improved performance of video filters using SDMA

Implemented quality control interface to drop decoded frames when frames are late

 

Version 1.00.00

============

Fixed video display issue when VRFB is enabled.

Added debug zone support for all dlls.

DShow Package Contents

This software drop contains the following subdirectories:

timm

Contains a dynamic library (DLL) written in C that calls APIs from DMAI and Codec Engine

filters

Contains the DirectShow decode filters

parser_dlls

Contains the (non-rebuildable) binaries of the DLLs for the MP4/3GPP and AAC parsers.

project

Contains a Visual Studio subproject that provides the registry and catalog entries associated with the filters, and optionally allows rebuild of the filters and timm library in the GUI

Installation and Usage (as add-on to the DVSDK 1.00.00.05)

-          Ensure you have the BSP and the WinCE DVSDK installed.

-          Unzip the file dshow_x_xx_xx_xx.zip into a directory of your choice. From here on, we will refer to the top-level directory of the unzipped package as <DSHOW_INSTALL_DIR>. To simplify the rebuild procedure, we recommend that you unzip the file into <DVSDK_INSTALL_DIR>, so that <DSHOW_INSTALL_DIR> would correspond to <DVSDK_INSTALL_DIR>\dshow_x_xx_xx_xx.

-          Open up your OS design in Visual Studio

-          If necessary, remove the bib and reg entries from the DVSDK Integration subproject in <DVSDK_INSTALL_DIR>/dvsdk_integration_X_XX_XX_XX/DVSDK_Integration.bib and DVSDK_Integration.reg corresponding to the following macros:

o       SYSGEN_TIMM

o       SYSGEN_ MPEG2_DECODE_FILTER

o       SYSGEN_MPEG4_DECODE_FILTER

o       SYSGEN_H264_DECODE_FILTER

-          Open <DVSDK_INSTALL_DIR>/dvsdk_integration_X_XX_XX_XX/DVSDK_Integration.bib in a text editor. Add the following line to the file in the ‘MODULES’ section, after replacing <DSHOW_INSTALL_DIR> with your installation path:

#include “<DSHOW_INSTALL_DIR>\project\dshow.bib

-          Open <DVSDK_INSTALL_DIR>/dvsdk_integration_X_XX_XX_XX/DVSDK_Integration.reg in a text editor. Add the following line to the file, after replacing <DSHOW_INSTALL_DIR> with your installation path:

#include “<DSHOW_INSTALL_DIR>\project\dshow.reg

-          Replace the following in <DVSDK_INSTALL_DIR>/dvsdk_integration_X_XX_XX_XX/prelink.bat:

echo == Copy Direct Show Filters

del %_FLATRELEASEDIR%\H264VideoDecoder.dll

copy %dshow_install_dir%\filters\H264VideoDecoder\obj\ARMV4I\retail\H264VideoDecoder.dll %_TARGETPLATROOT%\FILES

copy %dshow_install_dir%\filters\H264VideoDecoder\obj\ARMV4I\retail\H264VideoDecoder.dll %_FLATRELEASEDIR%

del %_FLATRELEASEDIR%\MPEG2VideoDecoder.dll

copy %dshow_install_dir%\filters\MPEG2VideoDecoder\obj\ARMV4I\retail\MPEG2VideoDecoder.dll %_TARGETPLATROOT%\FILES

copy %dshow_install_dir%\filters\MPEG2VideoDecoder\obj\ARMV4I\retail\MPEG2VideoDecoder.dll %_FLATRELEASEDIR%

del %_FLATRELEASEDIR%\MPEG4VideoDecoder.dll

copy %dshow_install_dir%\filters\MPEG4VideoDecoder\obj\ARMV4I\retail\MPEG4VideoDecoder.dll %_TARGETPLATROOT%\FILES

copy %dshow_install_dir%\filters\MPEG4VideoDecoder\obj\ARMV4I\retail\MPEG4VideoDecoder.dll %_FLATRELEASEDIR%

 

with

 

echo == Copy Direct Show Filters

del %_FLATRELEASEDIR%\H264VideoDecoder.dll

copy %dshow_install_dir%\filters\H264VideoDecoder\obj\ARMV4I\retail\H264VideoDecoder.dll %_TARGETPLATROOT%\FILES

copy %dshow_install_dir%\filters\H264VideoDecoder\obj\ARMV4I\retail\H264VideoDecoder.dll %_FLATRELEASEDIR%

del %_FLATRELEASEDIR%\MPEG2VideoDecoder.dll

copy %dshow_install_dir%\filters\MPEG2VideoDecoder\obj\ARMV4I\retail\MPEG2VideoDecoder.dll %_TARGETPLATROOT%\FILES

copy %dshow_install_dir%\filters\MPEG2VideoDecoder\obj\ARMV4I\retail\MPEG2VideoDecoder.dll %_FLATRELEASEDIR%

del %_FLATRELEASEDIR%\MPEG4VideoDecoder.dll

copy %dshow_install_dir%\filters\MPEG4VideoDecoder\obj\ARMV4I\retail\MPEG4VideoDecoder.dll %_TARGETPLATROOT%\FILES

copy %dshow_install_dir%\filters\MPEG4VideoDecoder\obj\ARMV4I\retail\MPEG4VideoDecoder.dll %_FLATRELEASEDIR%

del %_FLATRELEASEDIR%\MP3AudioDecoder.dll

copy %dshow_install_dir%\filters\MP3AudioDecoder\obj\ARMV4I\retail\MP3AudioDecoder.dll %_TARGETPLATROOT%\FILES

copy %dshow_install_dir%\filters\MP3AudioDecoder\obj\ARMV4I\retail\MP3AudioDecoder.dll %_FLATRELEASEDIR%

del %_FLATRELEASEDIR%\AACAudioDecoder.dll

copy %dshow_install_dir%\filters\AACAudioDecoder\obj\ARMV4I\retail\AACAudioDecoder.dll %_TARGETPLATROOT%\FILES

copy %dshow_install_dir%\filters\AACAudioDecoder\obj\ARMV4I\retail\AACAudioDecoder.dll %_FLATRELEASEDIR%

-          Open the file <DVSDK_INSTALL_DIR>/setpaths.bat in your favorite text editor. Change the variable DSHOW_INSTALL_DIR to point it to <DSHOW_INSTALL_DIR>.

-          Copy the files in the <DSHOW_INSTALL_DIR>/parser_dlls/ directory to both the release directory and the FILES directory in your BSP (under %_TARGETPLATROOT%)

-          Copy the file <DSHOW_INSTALL_DIR>/project/dshow.pbcxml into the BSP under PLATFORM/EVM_3530/CATALOG/dvsdk_catalog to replace the existing one. This would enable the catalog entries associated with the DShow project.

-          Under the Catalog Items View, hit the “refresh catalog tree” button, then enable the following under Third Party->Texas Instruments->Multimedia Framework->DirectShow filters

o       MMF:TI:TIMM

And any of the following filters based on your needs:

o       MMF:TI:H264_DECODE_FILTER

o       MMF:TI:MPEG2_DECODE_FILTER

o       MMF:TI:MPEG4_DECODE_FILTER

o       MMF:TI:AAC_DECODE_FILTER

o       MMF:TI:AAC_PARSER_FILTER

o       MMF:TI:MP3_DECODE_FILTER (useful only if you have support for MP3 decode in your DSP server image. See MP3 Support section below)

o       MMF:TI:MP4_3GPP_DEMUX_FILTER

-          Under the Catalog Items View, ensure that the following have been enabled under Third Party->Texas Instruments->Multimedia Framework:

o       MMF:TI:CMEM

o       MMF:TI:DSPLINK

o       MMF:TI:CS

-          Select Build->Advanced Build Commands->Build Current BSP and Subprojects. This will rebuild your BSP and export the DirectShow filter binaries. Note: the prebuilt binaries were compiled against the original codec server in DVSDK 1.00.00.05, and a rebuild of the filters may be necessary if the codec server has been changed or if you are using a newer version of the DVSDK. See the next section for rebuild procedure if a rebuild of the filters is necessary.

-          After building your OS image, load the image onto the EVM and run the Windows CE Media Player. Open up the video clip of your choice and it will be played using one of TI codecs when possible.

Rebuilding the decode filters

If you wish to make changes to the filters (or if the codec server was changed), here are some instructions on how to rebuild them.

-          Open up your OS design in Visual Studio

-          Select Project->Add existing subproject from the menu. Open <DSHOW_INSTALL_DIR>/project/dshow.pbpxml.

-          Select Project->Set Subproject Build Order and make sure dshow is build before the DVSDK Integration subproject. If you have other subprojects from the DVSDK opened, refer to the Getting Started Guide for build order details.

-          To avoid duplicating bib entries, comment out the following line from <DVSDK_INSTALL_DIR>/dvsdk_integration_X_XX_XX_XX/DVSDK_Integration.bib:

;#include “<DSHOW_INSTALL_DIR>\project\dshow.bib

-          To avoid duplicating registry entries, comment out the following line from <DVSDK_INSTALL_DIR>/dvsdk_integration_X_XX_XX_XX/DVSDK_Integration.reg:

;#include “<DSHOW_INSTALL_DIR>\project\dshow.reg

-          Under the Catalog Items View, enable the following under Third Party->Texas Instruments->Multimedia Framework->DirectShow filters

o       MMF:TI:TIMM

And any of the following filters based on your needs (only filters that are enabled will be rebuilt):

o       MMF:TI:H264_DECODE_FILTER

o       MMF:TI:MPEG2_DECODE_FILTER

o       MMF:TI:MPEG4_DECODE_FILTER

o       MMF:TI:AAC_DECODE_FILTER

o       MMF:TI:MP3_DECODE_FILTER (useful only if you have support for MP3 decode in your DSP server image. See MP3 Support section below)

-          Open the file <DSHOW_INSTALL_DIR>/setpaths.bat in your favorite text editor. Set all environment variables *_INSTALL_DIR to point to the installation directories of the various TI software needed for rebuilding the filters. It is important to set these correctly for otherwise the build will fail. NOTE: If you have the Directshow filters installed as a subdirectory within TI’s DVSDK, setpaths.bat will automatically look at the one that is located in the top-level directory of the DVSDK (let’s denote this directory by <DVSDK_INSTALL_DIR>) and use the existing installation directories specified in that file. In this case, there is no need to modify DSHOW_INSTALL_DIR>/setpaths.bat.

-          Select Build->Advanced Build Commands->Build Current BSP and Subprojects. This will rebuild your BSP and the DirectShow filters. Note that any errors when building the DirectShow filters will NOT appear in the Build window. They will however be logged in the build.log file under the <DSHOW_INSTALL_DIR>/project directory. This is because the build is done using a batch file in the background. So make sure you check the build.log file in the <DSHOW_INSTALL_DIR>\project directory for errors even when the build looks successful in Visual Studio.

-          Any future rebuild of the DirectShow filters can be done either using the GUI by right-clicking on the dshow subproject in the Solution Explorer and selecting “Build”, or it can be done via the command line. We suggest using the command line if you are making modifications to the filters, as it is more flexible (and faster!).

o       To rebuild via the command line, you can do as follows:

·         Select "Build->Open Release Directory in Build window" and open up a build window

·         cd into the directory <DSHOW_INSTALL_DIR>. Enter

builddshow.bat

into the build window. This will rebuild both the TIMM DLL and the filter DLLs

o       After you have rebuilt the filters, rebuild your OS image (makeimg) with the rebuilt DLLs.

-          After building your OS image, load the image onto the EVM and run the Windows CE Media Player. Open up the video clip of your choice and it will be played using one of TI codecs when possible.

MP3 Support

To accelerate MP3 playback using the DSP, you need to ensure that the MP3 codec is part of the DSP codec server image. Because the MP3 codec is licensed differently, it is typically not bundled with the DVSDK out-of-box. To add the MP3 codec to your DSP server image, see http://tiexpressdsp.com/index.php/How_do_I_Integrate_new_codecs_into_DVSDK. You will need to follow the instructions in the sections “How to download MP3 decoder”, “How to install mp3 package” and “Changes for the Codec Server”. Follow the instructions in the WinCE DVSDK Software Setup Getting Started Guide on how to rebuild the codec server.

Then rebuild the TIMM library against the new codec server. Finally, copy the server image file (cs.x64P) into your release directory to replace the existing one. It is also a good idea to replace the same file in the %_TARGETPLATROOT%\FILES directory as well so that the next time the BSP is rebuilt the new server image would be automatically used.

Voila. If you now enable the MP3 decode filter in the catalog items, MP3 playback would be performed on the DSP.

Upgrade and Compatibility Information

This update is provided as an add-on to the WinCE DVSDK 1.0. See this section for installation instructions.

Host Support

This release supports installation and development on Windows XP workstations.

Dependencies

The only known dependencies are listed here.

Device Support

This release supports the Texas Instruments OMAP3530 SoC as well as the OMAP35x Evaluation Module (EVM).

Validation Information

The validation of the filters is done on OMAP35x EVM, and consists of the following:

  • Play AVI files with MPEG2, MPEG4 and H264 video decoder and MP3 audio decoder using the Windows CE Media Player
  • Play MP4 files with MPEG4, H264 and AAC content using the Windows CE Media Player
  • Play MP3 and AAC audio files using the Windows CE Media Player

Known Issues and Limitations

  • Playback performance for high resolution video clips may be low when the bitrate is high (e.g. >= 4Mbps for H264). You can check the bitrate of a clip using an application such as Avicodec (http://avicodec.duby.info/)
  • Directshow filters cannot be run at the same time as DMAI applications, due to lack of an arbitrator of DSPLINK resources.
  • When VRFB is enabled, an exception will occur if the screen is rotated while video is running. It is suggested to close down the Windows CE Media Player before performing a rotation.
  • Video flickers and CPU load goes up to 100% when running display at 1280x720 resolution with DVI and VRFB enabled on the OMAP35x EVM
  • Due to a screen tearing issue observed in the display driver, the display worker thread in the video filters sleeps for 20 ms between frames to throttle the output.
  • Performance of audio filters could be further optimized – currently moving MP3 decoding to the DSP does not result in any significant reduction in CPU load on the ARM.

Fixed Defects

None

Technical Support and Product Updates

A design document of the filters in pdf format is provided at the top level of the installation directory. This is a snapshot of the continuously evolving wiki site on the filters.

Please register your EVM serial number as instructed on the printed Read Me 1st Card in order to download the updated software release as soon as it becomes available.

  • For questions and support on DirectShow in general, please visit the MSDN website.
  • For questions and support related to TI codec usage, including the Codec Engine framework, refer to the TI ExpressDSP wiki.