Via Unichrome TV Output Testing

Terry Barnaby - BEAM Ltd

29/11/04 - 20/4/05

Introduction

This page provides some information on performing some basic testing for TV output display quality when displaying MPEG video. I got fed up with trying to compare TV quality, especially interlace motion artifacts, with random film clips and generated a simple MPEG test video. On this site is the simple test MPEG file I created together with information on what it can show about the quality of MPEG video display.
The tests were primarily created to test Interlaced PAL TV output, but it may also be useful for testing the de-interlacing systems used when displaying on standard progressive computer monitors.

MPEG Test Video

Interlace Test file
The MPEG Video consists of a PAL 4:3 720x576 interlaced picture with a frame rate of 25Hz. The Video has the following features:

The upper portion of the display has horizontal lines displayed. On the left hand side red lines are displayed every other line starting at 1 so that they appear in the bottom interlaced field. On the right hand side green lines are displayed on every other line starting at 0 so that they appear in the top interlaced field.
  1. Both red and green lines should be present. If only one colour is present then one of the interlaced fields has been lost. The red and green areas should flicker, quite a lot, at 25Hz.
  2. The horizontal lines should be distinct and evenly spaced. If there is bunching or indistinct lines then this shows that some form of vertical scaling or filtering is in use.
  3. Where the red and green lines meet up at the centre, you should see that they are displaced one line apart.
The lower portion of the display contains vertical red and green lines. The top half contains red lines every other pixel starting at 0. The bottom half contains green lines every other pixel starting at 1.
  1. The vertical lines should be distinct and evenly spaced. If there is bunching or indistinct lines then this shows that some form of horizontal scaling or filtering is in use.
  2. Where the red and green lines meet up at the centre, you should see that they are displaced one line apart.
In the centre black box there is a diagonal white line to the top right.
  1. The edge of this diagonal should be smooth with no jagged bits. If it is jagged it shows that only one interlaced field is being displayed or the top and bottom fields are swapped. If it has occasional jagged bits it shows that some form of image scaling is in use.
In the centre of the display there is a vertical white bar. This moves from the left to the right of the display 1 pixel per frame and repeats.
  1. The white bar should have smooth vertical sides. If it is jagged with alternate interlaced lines offset to one another this shows that the display has not been de-interlaced correctly. In this case both interlaced fields are being displayed at the same time rather than one after the other.
  2. The white bar should move smoothly from left to right. If it is slightly jumpy, then this could indicate that both interlaced fields are being displayed at the same time rather than one after the other. If it is very jumpy this would indicate that the interlaced fields are being displayed in the wrong order.
  3. If the bar is sometimes smooth and then jumpy, this indicates that the output display is not fully in sync with the incoming video stream and the video output is jumping from correct field order to reverse field order.

MPEG2 Video Test Files


File
Description
interlace_test2.mpeg
This contains the interlace test video (about 4MBytes)
interlace_test2_rev.mpeg
This contains the interlace test video with the odd and even interlaced fields displayed in the wrong order in time. (about 4MBytes)

How the video is played

With MythTv you can use the command "mythtv interlace_test2.mpeg"
With Xine you can use the command "xine -f -l interlace_test2.mpeg" (The -l causes the video to loop, -f is full screen mode useful for TV's).
With Mplayer you can use the command "mplayer interlace_test2.mpeg"

Note that setting fullscreen mode picture sizes and aspect ratio will change the displayed image.

How The Video was generated

The video was generated using a simple 'C' program, tvTestPattern.c, that generates raw RGB frame data.
"tvTestPattern > f.raw"
The raw data from this was passed through "ffmpeg" to generate the MPEG2 video and audio files. The Audio was necessary for playing with "mythtv".
"ffmpeg -f rawvideo -pix_fmt rgb24 -s 720x576 -aspect 4:3 -i f.raw -f s16le -ac 2 -i /dev/zero -shortest -target dvd -b 4000 -ab 128 -ildct -ilme -y interlace_test2.mpeg"

Web Sites for Sources

Unichrome Graphics driver development
http://unichrome.sourceforge.net/
DRI Web site
http://sourceforge.net/projects/dri/