Tuesday, March 6, 2012

Introducing a DirectShow YUV source filter

This post introduces a YUV source filter that can be used to load standard YUV test sequences into the DirectShow environment. Certain YUV test sequences (such as the Foreman sequence pictured on the left) have become widely used by researchers and developers active in the video coding field and many of them are currently available here.

The YUV source filter is part of the Video Processing Project and the source can be downloaded and reused under a BSD license.


Once registered with the OS (regsvr32), the YUV source filter appears under the DirectShow filters category in GraphStudio.
















Once inserted into the graph, the user must select the YUV file in the IFileSourceFilter dialog:













The output pin of the YUV source filter can then be rendered.

Since the YUV file format of the test sequence videos contains no information regarding image dimensions and framerate, these must be manually configured using the property page of the filter. In the case where these are not configured correctly, the application may of course crash.

An attempt has been made to auto-configure the filter using a naming convention: If the filename contains CIF, QCIF, or a string of the form <<width>>x<<height>>, the dimensions of the filter are automatically configured. This approach may be refined/improved at a later stage if required.


3 comments:

  1. Hi i am facing the issue in building the YUV source filter with visual studio 2008 and microsoft SDK for Windows 7 installed on windows XP

    YuvSource.cpp(41) : fatal error C1083: Cannot open include file: 'shared\Conversion.h': No such file or directory

    \StringUtil.h(25) : fatal error C1083: Cannot open include file: 'atlconv.h': No such file or directory

    kindly get me out of this
    Thanks in advance

    ReplyDelete
  2. I have learned many thins in this experiment, now i am looking for support to higher resolution like NTSC, PAL, 720 and 1080.

    Can you help me on this.

    ReplyDelete
  3. Hi Arun, have you tried renaming the file to e.g. filename_1280x720.yuv?

    ReplyDelete