Institutionen för systemteknik Department of Electrical Engineering

Examensarbete

Design and Implementation of an Analog Signal Quality Measuring Software for Component Video

Examensarbete utfört i Informationskodning vid Tekniska högskolan i Linköping av

Carl Ljungström

LITH-ISY-EX--10/4206--SE Linköping 2010

Department of Electrical Engineering Linköpings tekniska högskola Linköpings universitet Linköpings universitet SE-581 83 Linköping, Sweden 581 83 Linköping

Design and Implementation of an Analog Video Signal Quality Measuring Software for Component Video

Examensarbete utfört i Informationskodning vid Tekniska högskolan i Linköping av

Carl Ljungström

LITH-ISY-EX--10/4206--SE

Handledare: Andreas Larsson Motorola AB Examinator: Robert Forchheimer isy, Linköpings universitet

Linköping, 9 November, 2010

Avdelning, Institution Datum Division, Department Date

Division of Information Coding Department of Electrical Engineering 2010-11-09 Linköpings universitet SE-581 83 Linköping, Sweden

Språk Rapporttyp ISBN Language Report category — ¤ Svenska/Swedish ¤ Licentiatavhandling ISRN ¤£ Engelska/English ¤£ Examensarbete LITH-ISY-EX--10/4206--SE ¤ C-uppsats Serietitel och serienummer ISSN ¤ D-uppsats Title of series, numbering — ¤ ¤ Övrig rapport ¤

URL för elektronisk version

http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-54371

Titel Design och implementering av utvärderingsmjukvara för signalkvalitet i analog Title komponentvideo Design and Implementation of an Analog Video Signal Quality Measuring Software for Component Video

Författare Carl Ljungström Author

Sammanfattning Abstract

An IP based set-top box (STB) is essentially a lightweight computer used to re- ceive video over the Internet and convert it to analog or digital signals understood by the television. During this transformation from a digital image to an analog video signal many different types of distortions can occur. Some of these distor- tions will affect the image quality in a negative way. If these distortions could be measured they might be corrected and give the system a better image quality. This thesis is a continuation of two previous theses where a custom hardware for sampling analog component video signals was created. A software used to com- municate with the sampling hardware and perform several different measurements on the samples collected has been created in this thesis. The analog video signal quality measurement system has been compared to a similar commercial product and it was found that all except two measurement methods gave very good results. The remaining two measurement methods gave acceptable result. However the differences might be due to differences in imple- mentation. The most important thing for the measurement system is to have consistency. If a system has consistency then any changes leading to worse video quality can be found.

Nyckelord Keywords set-top box, analog video, signal quality, component video, video quality measure- ment, RGB, YPbPr, subjective measuring

Abstract

An IP based set-top box (STB) is essentially a lightweight computer used to re- ceive video over the Internet and convert it to analog or digital signals understood by the television. During this transformation from a digital image to an analog video signal many different types of distortions can occur. Some of these distor- tions will affect the image quality in a negative way. If these distortions could be measured they might be corrected and give the system a better image quality. This thesis is a continuation of two previous theses where a custom hardware for sampling analog component video signals was created. A software used to com- municate with the sampling hardware and perform several different measurements on the samples collected has been created in this thesis. The analog video signal quality measurement system has been compared to a similar commercial product and it was found that all except two measurement methods gave very good results. The remaining two measurement methods gave acceptable result. However the differences might be due to differences in imple- mentation. The most important thing for the measurement system is to have consistency. If a system has consistency then any changes leading to worse video quality can be found.

v

Acknowledgments

I would like to thank Motorola for giving me the opportunity to do this thesis. A special thanks go to my supervisor Andreas Larsson at Motorola for his valuable support, opinions and suggestions. Another person to thank at the company is Tomas Franzon who helped me with the threads, GUI and other parts of the software. Two other Motorola thesis writers to thank are Kristofer Gustafsson and Johan Jakobsson that during each lunch break faced me in a good game of Foosball. A big thanks go to my family for all the help during my whole education, especially my mother and father but also my brothers. I would also like to thank my girlfriend Emilie Toresson for her support during the whole thesis. Without you this thesis would not be what it is. A final thanks go to my examiner Robert Forchheimer and my opponent Gustaf Johansson.

vii

Contents

1 Introduction 3 1.1 Background ...... 3 1.2 Purpose ...... 3 1.3 Delimitations ...... 4 1.4 Method ...... 4 1.5 Document overview ...... 5 1.6 Reading instructions ...... 5 1.7 Glossary ...... 6

2 Analog video signal theory 7 2.1 Frame rate ...... 8 2.2 Sync signal ...... 8 2.3 Interlace and progressive scanning ...... 8 2.4 Gamma correction ...... 9 2.5 Color spaces ...... 9 2.5.1 RGB ...... 9 2.5.2 YUV ...... 10 2.5.3 YIQ ...... 10 2.5.4 YPbPr ...... 10 2.6 Analog television system ...... 10 2.6.1 NTSC ...... 11 2.6.2 PAL ...... 12 2.6.3 SECAM ...... 12 2.7 Resolution ...... 12 2.7.1 Standard definition ...... 13 2.7.2 Enhanced definition ...... 13 2.7.3 High definition ...... 13 2.8 Analog video interfaces ...... 13 2.8.1 Composite video ...... 13 2.8.2 S-Video ...... 14 2.8.3 SCART ...... 14

ix x Contents

2.8.4 Component video ...... 14 2.9 Video signal composition ...... 14

3 Evaluation of subjective measuring methods 17 3.1 Introduction ...... 17 3.2 Pixel to pixel ...... 18 3.3 Subjective assessment ...... 19 3.3.1 Preparations ...... 19 3.3.2 DSIS ...... 20 3.3.3 DSCQS ...... 20 3.3.4 SSCQE ...... 21 3.3.5 SDSCE ...... 21 3.3.6 Contextual effects ...... 21 3.4 Objective perceptual measurements ...... 22 3.4.1 Color processing ...... 22 3.4.2 Multi-channel processing ...... 22 3.4.3 Contrast adaptation ...... 22 3.4.4 Contrast sensitivity ...... 22 3.4.5 Masking effects ...... 23 3.4.6 Pooling effects ...... 23 3.5 Engineering approach ...... 23 3.6 Metric comparison ...... 23

4 The sampling system 25 4.1 Overall system design ...... 25 4.2 VSH design ...... 25 4.3 VSH to computer communication ...... 26

5 Problem analysis 29 5.1 Vision of operation ...... 29 5.2 Measurement procedure ...... 29 5.3 Video distortion types ...... 30 5.3.1 Level error ...... 30 5.3.2 Frequency response distortion ...... 31 5.3.3 Non-linearity ...... 31 5.3.4 Noise ...... 31 5.3.5 Short time distortion ...... 31 5.3.6 Channel delay ...... 32 5.3.7 Sync delay and amplitude distortions ...... 32 5.3.8 Spatial distortion ...... 32 5.3.9 Horizontal sync jitter and wander ...... 32 5.3.10 Crosstalk ...... 32 5.4 Selection of distortions types to evaluate ...... 33 5.5 Requirements ...... 33 5.5.1 General requirements ...... 34 5.5.2 Measurement requirements ...... 34 Contents xi

5.5.3 GUI requirements ...... 35 5.5.4 Extra requirements ...... 36

6 Design 39 6.1 Design concepts ...... 39 6.2 Overall design ...... 39 6.3 Component design ...... 40 6.3.1 The main control ...... 40 6.3.2 Connection to the VSH ...... 40 6.3.3 Measurement methods ...... 40 6.3.4 The GUI ...... 41 6.3.5 File input and output ...... 41 6.4 Chosen design ...... 42

7 Implementation 43 7.1 Introduction to the implementation ...... 43 7.2 GUI ...... 43 7.2.1 Graph control ...... 44 7.3 VSH I/O library ...... 45 7.4 Worker thread library ...... 45 7.5 Main control library ...... 45 7.6 File I/O libraries ...... 45 7.6.1 Limits library ...... 46 7.6.2 Settings library ...... 46 7.6.3 Measurement report library ...... 46 7.6.4 Log file library ...... 46 7.7 Line tools library ...... 46 7.7.1 Find plane ...... 46 7.7.2 Find rising or falling edge ...... 47 7.7.3 Line extraction ...... 47 7.8 Measurement libraries ...... 48 7.8.1 Color bar measurement ...... 49 7.8.2 Noise measurement ...... 49 7.8.3 Shallow noise measurement ...... 51 7.8.4 Multiburst measurement ...... 51 7.8.5 Non-linearity measurement ...... 51 7.8.6 Short-time distortion measurement ...... 52 7.8.7 Horizontal sync measurement ...... 53 7.8.8 Channel delay ...... 54

8 GUI 55 8.1 Description of GUI design ...... 55 8.2 Usage scenario ...... 56 8.3 Evaluation of GUI ...... 56 8.3.1 Efficiency goal ...... 57 8.3.2 Utility goal ...... 57 xii Contents

8.3.3 Learnability goal ...... 58 8.3.4 Memorability goal ...... 59

9 Evaluation 61 9.1 Requirements ...... 61 9.2 Comparison between MOViA and VM6000 ...... 61 9.2.1 Color bars measurement ...... 63 9.2.2 Multiburst measurement ...... 63 9.2.3 Noise multiburst ...... 63 9.2.4 Non-linear measurement ...... 63 9.2.5 Short-time distortion measurement ...... 64 9.2.6 Horizontal sync measurement ...... 64 9.2.7 Conclusion ...... 64 9.3 Calculated tolerances ...... 65 9.3.1 Levels ...... 65 9.3.2 Noise and crosstalk ...... 65 9.3.3 Time ...... 65

10 Conclusion 67 10.1 Results ...... 67 10.2 Subjective measurements ...... 67 10.3 Performance ...... 68 10.4 Scalability ...... 68 10.5 Further work ...... 68 10.5.1 Measurement methods ...... 68 10.5.2 GUI ...... 68 10.5.3 Measurement reports ...... 69 10.6 Final thoughts ...... 69

Bibliography 71

A Glossary 75 List of Figures

2.1 Image created in a CRT by scanning across the screen in lines. . . 7 2.2 A typical video signal line with sync, front and back porch, color burst and video data...... 11 2.3 NTSC signal with vertical and horizontal sync signals [Ins07]. . . . 15 2.4 PAL/SECAM signal with vertical and horizontal sync signals [Ins07]. 15

3.1 Two images with the same PSNR value but different distortions. . 19

4.1 Overview of the video sampling system...... 25 4.2 Overview of the video sampling hardware...... 26

5.1 An example of a test pattern used for testing distortions...... 30

6.1 Overview of the software system...... 42

7.1 Overview implementation parts of the software system...... 44 7.2 Two different types of line extractions...... 48

8.1 Main window of MOViA...... 57 8.2 Result window of MOViA...... 58 2 Contents

List of Tables

7.1 Relation between measurement methods and the distortion types. . 48

9.1 Comparison between MOViA and VM6000 for 576i signal . . . . . 62 9.2 Comparison between MOViA and VM6000 for 720p signal . . . . . 62 9.3 Comparison between MOViA and VM6000 for 1080i signal . . . . 63 Chapter 1 Introduction

1.1 Background

An IP based set-top box (STB) is a unit used to receive TV through the Internet. It is essentially a small computer used to convert the digital video and data signals from the Internet and convert them to analog or digital signals understood by the TV. At the moment the market for STB is very strong and is expected to continue to grow [Wir08]. In the never ending quest for perfect image quality, higher and higher resolu- tions are used in modern TV’s. As a result the need for higher resolutions from the STB is also needed. But what good is resolution if the picture is distorted in some way? To ensure that the highest quality is produced and maintained one possible way is to measure the image quality produced by the STB. The image quality from an analog video signal is affected by the signal quality and therefore this could instead be measured. There are a few products available on the market for analog video signal measurements, but the price is high and the flexibility of these units are low. This thesis is a continuation of two previous theses where a custom hardware for sampling of analog signals was constructed. This hardware system consists of an FPGA which can sample four channels into a memory. The information is then transmitted to a specially designed software in a computer. The final product of this thesis is to be used internally at Motorola in Linköping for evaluating the video quality of STB’s.

1.2 Purpose

The purpose of this thesis is to develop a software for analyzing signal quality of component video signals (YPbPr and RGB) from an STB. The software should

3 4 Introduction use the custom hardware to sample analog video signals and analyze with several different methods.

• What measurements should be chosen in order to ensure good quality?

• Could subjective measurements be used instead of objective measurements?

• How should the chosen measurement methods be implemented in software?

• How should a GUI be created for maximum efficiency?

1.3 Delimitations

The final product of this thesis is only to be used internally at Motorola, as de- scribed earlier, and therefore some limitations are made to fit their requirements. All measurements are made on the analog outputs of the STB and the only thing this thesis will focus on is the conversion from digital signals to analog signals in a STB. All degradations in the image as a result of transmission errors, video decoding and such are not investigated. However these degradations in the image might affect the video signal and might also affect the measurement result. Only component formats, RGB and YPbPr, will be analyzed since a measurement unit for analyzing composite signals is already available. The investigation into subjec- tive measurements will only be on a theoretical level and no implementation will be made.

1.4 Method

This thesis is based on literature but the main part is an empirical investigation since very little literature is available on this type of products. The investigation is performed as an iterative development process but when it comes to the devel- opment of the measurement methods there are a few steps needed for each of the iterations. The first step is to find as much information available as possible about the distortions to be measured. Where and when do they occur in the picture? What image pattern is needed to recreate the distortions in order to measure them? Some types of distortions are already well known and documented so for those this step might not be needed. When it is fully understood where and when the distortion occurs the next step is to simulate this. A method is then created to find and measure the distortions. All this work is performed in Matlab [Mat] since many functions needed for the measurements are already available. This phase may need some iterations until the best method is created. The next part is to implement the function in the final product. This should now be very straightforward after all the testing. However some extra work will be needed since some functions in Matlab are available from start and these needs to be recreated in the new software. 1.5 Document overview 5

Finally the last step is to test the product with real data and compare with a commercial measurement product to ensure that it measures the distortions correctly.

1.5 Document overview

Chapter 1 gives a short introduction and specifies the objectives of this thesis.

Chapter 2 is an introduction into how analog video signals are created and the different types of signals.

Chapter 3 provides an evaluation of subjective measuring methods to see if these could be used instead of the normal objective methods for video quality measurements.

Chapter 4 describes the sampling system and how each part connects and com- municates.

Chapter 5 breaks down the problem to several different types of distortions that are interesting to measure. This chapter also contains a list of requirements on the sampling system.

Chapter 6 presents the overall design of the software used to collect and measure video signals.

Chapter 7 describes how the design is used to create an implementation of the software.

Chapter 8 describes how the GUI was designed and implemented.

Chapter 9 contains an evaluation of the finished system.

Chapter 10 provides a final conclusion and discusses where further work can be performed.

1.6 Reading instructions

Depending on the background of the reader a few chapters might be skipped if adequate knowledge exists about analog video systems.

• Chapter 2 will give a short introduction into analog video systems needed to understand the rest of the thesis.

• If subjective measurements interest the reader, chapter 3 will give a short introduction and provide the current status of the field.

• For those only interested in how the system was designed and implemented chapter 6 will provide a good start. 6 Introduction

1.7 Glossary

Each of the abbreviations are described the first time they are used but for a complete list see appendix A. Chapter 2 Analog video signal theory

In almost every home today there is a television and there are many different ways available for receiving a video signal. Both analog and digital transmissions are available nowadays, however more and more countries are changing to digital transmission since this offers better image and higher resolutions [Sil09]. In the beginning of the television era there were only analog signals available, the screens were monochrome and the audio in mono. Since the monochrome screens only requires a single signal for video and one signal for sound the need for bandwidth is very moderate.

Figure 2.1. Image created in a CRT by scanning across the screen in lines.

The first televisions contained a cathode ray tube, CRT, which is a large vac- uum tube with an electron gun at the back. This electron gun sends out electrons toward the front of the screen where a fluorescent layer is applied. When the elec- trons hit the fluorescent layer a light is produced in that spot. If electro magnets are added in such way that the electron beam can be deflected both horizontally and vertically the beam can reach the whole screen. By moving or scanning the electron beam horizontally across the screen an image is created [Jac01, p. 8]. For an example of the scanning method see figure 2.1.

7 8 Analog video signal theory

The monochromatic screens only contained one electron gun and one type of material on the glass screen. Depending on the amount of electrons hitting the screen the intensity could be changed at any point on the screen. In color screens there are three electron guns and for each pixel on the screen three different types of material. The three guns and materials create red, blue and green color and by mixing these three any color can be created. Each of the color parts in a pixel is called a sub pixel and since the color screens need three colors each pixel consist of three sub pixels. In order to guide the different electro guns to the right part of the pixel a grille or mask is used depending on the layout of the sub pixels.

2.1 Frame rate

Since the electron guns only can illuminate one point at a time it needs to update the entire screen at least 24 times per second in order to minimize motion artifacts. In a normal CRT the frame rate is 25-29.97 Hz depending on the type of television system. In a modern television or computer screen the update frequencies is usually between 65-100 Hz and sometimes even more. This high frame rate is however also an effect of using progressive scanning. See chapter 2.3 for more information about progressive scanning. [Jac01, p. 8]

2.2 Sync signal

In the CRT the image is drawn as a series of sweeps or lines over the screen as shown in figure 2.1. For every new line the electro gun needs to be reset to the start of the line. This action requires a horizontal sync signal to be inserted between every line. Every time the last line of the screen is drawn the electro gun also needs to be reset to the top of the screen, for this a vertical sync signal is needed. [Jac01, p. 7]

2.3 Interlace and progressive scanning

Interlaced scanning is a way to reduce the bandwidth of the signal without too much loss of information. Instead of drawing all the lines in the image every time the image is updated, only every second line is updated. The signal contains two fields, one field contains the odd lines and one field the even lines. For example if the screen is updated at 25 Hz the signal needs to contain 25 full frames or 50 fields for each second. The opposite to interlace scanning is the progressive scanning that draws all lines on the screen at each update. When using progressive scanning the frame rate needs to be higher or flicker can occur. This is usually solved in TV’s by doubling the update rate and showing one frame twice. The progressive scanning will also require more bandwidth since more data is needed at any given time. When using interlaced scanning for the CRT the video is not perceived as de- graded but on screens with progressive scanning the video with interlaced scanning 2.4 Gamma correction 9 can create artifacts in fast moving objects. This is because the two fields differ in time and creates a shift in the image for every second line. This distortion can be removed by using a filter but the end result will never be as good as progressive scanning. [Jac01, p. 8]

2.4 Gamma correction

The intensity of most displays is not linear to the input signal but instead propor- tional to some power, also called gamma. The non-linear transfer function results in the bright parts becoming extended and the dark parts compressed. However this effect can be used to minimize noise in transmission. The video signal is "gamma corrected" to have a linear output from the screen. Since a channel with gamma corrected signal differs from one that is not cor- rected it is usually marked with an accent, for example R’. The transfer function γ from non-gamma corrected signal to gamma corrected signal is: Vout = Vin. In old systems gamma values between 2.2 and 2.8 were used but in modern systems a value of 1/0.45 is normally used. [Jac01, p. 32]

2.5 Color spaces

Color spaces are numerical representations of a set of colors. This representation can be made in many different ways. For computers the most commonly used representation is RGB and for video systems YIQ, YUV, Y+C, YPbPr and YCbCr are more common. However RGB is also used in video systems but is less common than the other color spaces. Not all color spaces are described in this section, instead an overview of the most common ones are given.

2.5.1 RGB The RGB uses the three primary colors red, green and blue additively to create a desired color. This system is mostly used for computer graphics since the displays are usually directly connected to the computer and the signals and therefore bandwidth is not a problem. In video systems the RGB system is not as good since it requires the same amount of bandwidth for each of the components. If the RGB color space would be used for television transmissions the bandwidth requirement would be much higher. The RGB color space is also slower when manipulating video. For example changing the illumination of an image. For every pixel in the frame each color component in RGB needs to be read, edited and stored. In a system where illu- mination and color are separated this is much simpler since only the illumination needs to be edited. This optimizes some operations by 60 % when illumination is separated from color, however there are some operations that are faster with RGB but these are not as common. [Jac01, p. 15] 10 Analog video signal theory

2.5.2 YUV The YUV color space contains a luminance value (Y) and two color values (U and V). This color space is used by PAL, NTSC and SECAM composite video systems. For monochromatic systems only the luminance value is used and the color parts have been added in such way that they do not interfere with the luminance. To convert from RGB to YUV the following equation is used [Jac01, p. 16]:

Y = 0.299 × R0 + 0.587 × G0 + 0.114 × B0 U = 0.492 × (B0 − Y 0) V = 0.877 × (R0 − Y 0)

2.5.3 YIQ The YIQ color space is used by some NTSC systems where the I stand for "in phase" and Q for "quadrature" referring to the transmission method used. To describe I and Q the UV part of the YUV color space can be seen as a plane with U and V as horizontal and vertical axes. The I and Q are then two new vectors in the plane rotated 33◦from U and V respectively. The YIQ can therefore be seen as a YUV color space but with a change of basis. To convert from YUV to YIQ the following equation is used [Jac01, p. 17]:

        I 0 1 cos(33) sin(33) U = Q 1 0 −sin(33) cos(33) V

2.5.4 YPbPr The YPbPr color space is similar to YUV but the color channels have been scaled to use more signal amplitude since the color space was developed for sending each component part separately. There are two different equations for SDTV and HDTV used to convert between RGB and YPbPr. The YCbCr color space is a digital version of the YPbPr color space.

2.6 Analog television system

In early analog broadcasting systems there were a need to transmit the video sig- nals on a radio frequency. As stated earlier the first screens where only monochro- matic screens and this means that only luminance and sound needed to be trans- mitted. The problem was solved by coding the video as the amplitude of a carrier frequency. The higher the amplitude, the more intensity on the current beaming point of the screen. However when color needed to be added this resulted in the creating of some different systems around the world. Although different there are a few things all of them have in common. In the new system both the old monochromatic system 2.6 Analog television system 11

Figure 2.2. A typical video signal line with sync, front and back porch, color burst and video data. and the new color system needed to be supported. To solve this problem the was added as a sub carrier frequency to the luminance and together they create a signal that works on both systems. Since most systems chose to use the YUV color space the color components U and V were combined into C and added to Y using the following equation:

C = Usin(ωt) + V cos(ωt) (2.1) The size of U and V in YUV were experimentally chosen so that when the U and V parts are added to Y they do not exceed the maximum and minimum levels for the monochromatic receivers. An excursion of 20% above or below the Y levels by a modulated sub carrier with U and V were found to be permitted. The receiver of the video signal needs to have a reference burst for the C signal called color burst. When demodulating the signal it is compared to the color sync in order to find at what phase the chrominance signal is. See figure 2.2 for an example of a color line with sync, front and back porch, color burst and active video data. The color burst is only present in color systems since it is only needed to enable the addition of color to a signal. In more modern signal types such as component signals the chrominance and luminance do not need to be mixed since they are sent on different channels. Because the signals are not modulated the color burst is not needed. The different frame rates for each of the systems are linked to the frequency of the power grid in different countries. By matching the frame rate to the frequency of the power grid a type of interference that created rolling bars over the screen was avoided.

2.6.1 NTSC In the USA a system called NTSC (National Television System Committee) was created for transmitting video signals but the first version had no support for color. At the time the frame rate was 30 Hz and it used 525 lines per image. After some 12 Analog video signal theory debate about whether or not the new color system should be backward compatible with monochromatic screens it was decided that it should. A new standard was created based on the old with an adjustment of the frame rate to 29.97 Hz. A problem with NTSC is that it can create hue errors, or color shifts, under poor transmission conditions and is therefore sometimes referred to as "Never The Same Color". NTSC is used in several countries around the world including United States, Canada and Japan. [Jac01, p. 239]

2.6.2 PAL

PAL (Phase Alternating Line) system was created since the NTSC 60 Hz field rate did not match the 50 Hz power grid in Europe. In PAL the problem with color phase shift present in NTSC is solved by reversal of one of the phases every other line in the chrominance part, hence the name. In the beginning the system relied on the eye to average out the hue error but in later systems a delay line is implemented to combine the two phases in the chrominance. The PAL system uses 625 lines per frame and 50 Hz frame rate. [Jac01, p. 262]

2.6.3 SECAM

The SECAM (Sequentiel Couleur Avec Mémoire or "Sequential Color with Mem- ory") system was developed in France and is similar to PAL in that it uses 625 lines and 50 Hz but instead of sending chrominance as one combined part it sends each color part on every other line. Since this creates a problem when receiving the transmission a memory was added to the receiver to store the last line at the receiver in order to be able to mix all parts together. Since the chrominance is sent on two different signals it uses the YDbDr color space instead of YUV in PAL and NTSC as this is better when the chrominance signal is separated. This color space is only a scaled version of YUV color space. The SECAM system is used in several parts of the world but is now being phased out and replaced by PAL or digital transmissions. [Jac01, p. 287]

2.7 Resolution

In the analog broadcasting system only one resolution was available but with digital broadcasting, signals can be transmitted in different screen resolutions de- pending on the source and screen used. The resolutions are referred to with a code. The first number is the number of horizontal lines and after this a letter depending on the type of scanning is added. For example "576i" refers to the size 720x576 and the letter "i" means that it uses interlaced scanning. If the last letter is a "p" it would mean that the source uses progressive scanning. One more number can be added after the scanning, for example "576i25" meaning 25 Hz frame rate. 2.8 Analog video interfaces 13

2.7.1 Standard definition Standard definition (SDTV) refers to the analog resolutions used in analog tele- vision systems. However in modern digital systems these resolutions can also be used. The resolutions are referred to as "480i" and "576i" for NTSC and PAL respectively. Only these two resolutions are referred to as PAL and NTSC. Even though higher resolutions share the size or frame rate these are not referred to as NTSC or PAL.

2.7.2 Enhanced definition Enhanced definition (EDTV) uses the same resolution as in standard definition but instead of using interlaced scanning it uses progressive scanning. These resolutions are referred to as "480p" and "576p" for 59.94Hz and 50Hz respectively. Since every frame contains a full update of the screen the bandwidth needs to be twice as large as for SDTV.

2.7.3 High definition High definition (HDTV) has been used as a name for many types of resolutions but nowadays the minimum resolution is "720p" for HDTV. The resolutions "1080i", "1080p" and "2160p" are all HDTV. However "2160p" and larger are not commonly used in commercial TV applications at the time of writing this thesis. The ITU institution describes HDTV in the following way:

"A high-definition system is a system designed to allow viewing at about three times the picture height, such that the system is virtually, or nearly, transparent to the quality of portrayal that would have been perceived in the original scene or performance by a discerning viewer with normal visual acuity." [ITU02b, p. 1]

2.8 Analog video interfaces

In old television systems the only way to receive a signal was through an antenna or cable. For modern television systems there are several different ways to receive a video signal with varying quality. All these connection types are a result of the introduction of devices connected to the TV such as VHS, DVD, STB and their need for better connection types.

2.8.1 Composite video Composite video is the signal type used in analog SDTV signals before it is mod- ulated with an RF-signal and transmitted. The composite signal is sometimes referred to as CVBS where the letter refers to Color, Video, Blank and Sync. The signal is normally transmitted over a single cable with RCA connectors at each end. Sound is transmitted separately in either mono or stereo. 14 Analog video signal theory

2.8.2 S-Video In a TV receiving a composite signal the signal is split into the luminance (Y) and chrominance (C) parts. However this separation is rarely perfect and to resolve this problem S-Video is similar to composite video but Y and C are separated into two different cables. The sync signals and other signals are sent on the Y cable together with the luminance. [Jac01, p. 66]

2.8.3 SCART SCART, also known as Peritel or Euroconnector, is a connection type used in Eu- rope allowing transmission of composite, S-Video, RGB and stereo sound. However not all these signal types can be sent at the same time but composite and sound is always available. There are several different types of SCART cables and the pins at the connector are also used for different signals depending on the signal type is used. [Jac01, p. 67]

2.8.4 Component video Component video refers to YPbPr and RGB since the three parts are separated and sent on different cables. YPbPr is sent on three cables with RCA or BNC connectors [Jac01, p. 77]. Sound is transmitted separately. The Y-channel con- tains the vertical and horizontal sync signals. RGB is most commonly sent over a SCART-cable but can be sent with three cables as YPbPr. Depending on the type of RGB signal the sync signals can be sent either on the green channel, on all channels or a separate signal is used as sync. [Jac01, p. 71]

2.9 Video signal composition

Any video signal, independent of the transmission type, is sent as a series of lines. In order to know where a line starts a horizontal sync signal is used. A vertical sync is also needed in order to know when a new frame or image is started. The vertical sync is a series of special lines and depending on the signal used these vary. When creating a signal the first lines of the signal contain the vertical sync signal. After the vertical sync some empty lines are sent and then lines with actual image data are sent. If an interlaced signal is used a special type of vertical sync signal is used to mark where the second frame starts. After this, the second frame active image lines are sent. At the end of an image or field a series of equalizing pulses are sent to prepare for the vertical sync or field sync. These signals were used for old televisions to maintain the horizontal sync during the vertical sync. In figure 2.3 and 2.4 the signal composition for NTSC and PAL respectively can be seen. Only a selection of the lines in an image is shown and the start of each vertical sync is marked with a vertical dashed line. 2.9 Video signal composition 15

Figure 2.3. NTSC signal with vertical and horizontal sync signals [Ins07].

Figure 2.4. PAL/SECAM signal with vertical and horizontal sync signals [Ins07].

Chapter 3 Evaluation of subjective measuring methods

In this chapter a brief introduction into subjective measurement methods is given with an evaluation of the current status of the field.

3.1 Introduction

Several different methods for measuring quality are already available for video signals. Most of these methods are either adapted from methods to measure images or can be used for images, but the main focus in this thesis is video measurement. These measurement methods are for the most part used to assess codec quality. Although the main part of this report is about measuring low level analog video signals, some errors in the low level signals might not have any effect on the end users perception of image quality. And some errors might look insignificant at the low level but very perceivable by the end user. In order to measure the actual video data using the analog video signal an image needs to be created for every frame. The transformation from analog video signal to the image based digital representation should be done in such a way that any distortion created in the transformation is minimized. The simplest methods for measuring video and image quality are objective measures. These methods are usually straightforward and can prove usable for some types of codec’s and distortions but they are not perfectly matched with what a human perceives as good quality. Because objective methods only work well in some cases subjective assessments were created as a way to use real persons and show images or video and have them rated according to some scale. The most sophisticated method so far is a more advanced engineering approach that simulates the human visual system (HVS) called objective perceptual assess- ment.

17 18 Evaluation of subjective measuring methods

Another method is to use a mixture of both objective methods and subjec- tive assessments, called engineering approach. This method consists of different algorithms that search for distortions known to cause a lower score in subjective assessment.

3.2 Pixel to pixel

The most famous pixel based measurements are mean squared error (MSE) and signal-to-noise ratio (PSNR). The PSNR measurement is a logarithmic represen- tation of the MSE measurement [RR06]. These methods were originally used to compare two pictures but they can also be used for video, however MSE ignores all temporal movement and distortions in a video unless it leads to the creation of spatial distortions as well.

1 XY XX MSE = [A − B ]2 (3.1) X × Y i,j i,j j=0 i=0

1 XT XY XX MSE = [A − B ]2 (3.2) video X × Y × T i,j,k m,n,t k=0 j=0 i=0

MAX2 PSNR = 10 log I (3.3) video 10 MSE The equations used for calculating of MSE and PSNR can be seen in equa- tion 3.1 to 3.3. Equation 3.1 is used to calculate MSE for pictures of size X × Y and equation 3.2 is used for calculating MSE for video of size X ×Y with T frames. The last equation 3.3 is used to calculate the PSNR value for either movies or pic- tures, depending on which MSE is used. The value MAXI is the highest possible pixel value [RR06]. MSE based measurements are only a crude approximation of a human observer because it uses pixel to pixel comparison. Humans perceive the distortions differ- ently depending on the kind of distortion and it’s location. For instance the HVS is less sensitive to distortions in high frequency areas of the image compared to low frequency areas [WM08]. In figure 3.1 two images with the same PSNR value is shown. However the left image contains high frequency noise in the bottom part of the image and the right image side contain low frequency noise inserted into the top part of the image [RR06]. This shows that the PSNR value cannot always be trusted as a way to find distortions in images or . Even though there are some problems with MSE, it is still widely used because of it’s simple design and computational speed [RR06]. Many scientists have also developed a familiarity with the correlation between different results and amount of distortions. Minimizing the MSE function is also relatively simple [WM08]. Although a number of different methods for pixel to pixel measurement have been tested and some of these have worked quite well for some compressions or type of distortion they were still not reliable across different techniques [RR06]. 3.3 Subjective assessment 19

Figure 3.1. Two images with the same PSNR value but different distortions.

3.3 Subjective assessment

Subjective assessment determines the quality or impairment of video by showing real persons a program-like video in sessions [ITU01]. The ITU has created a recommendation [ITU02a] for subjective assessment of television image quality. The recommendation contains information about viewing conditions, test material, observers, the different methods etc. This is the most used reference when making subjective assessments and is the main source of information for this section.

3.3.1 Preparations There are two different types of subjective measures; one measures the quality under optimum conditions and one under non-optimum conditions. Non-optimum conditions occur when the image for example is distorted by packet-loss, bad transmission, etc. The optimum type is the only one we will look at since we are not interested in how the information is sent to the STB, only the conversion from digital to analog signals. In order to conduct a subjective assessment in a way that it can be repeated and correct even when tested in other places ITU has created a list of viewing conditions. This defines what luminance is needed, distance to screen, room illu- mination etc. Many different test material or test clips can be used depending on what kind of assessment performed. In any test at least some non-critical material and some critical material should be included. The critical material are of the type where distortions is more likely to appear and non-critical material is the opposite. Both are needed since it is not possible to extract information about critical performance from non-critical material but the other way is possible. During the assessment at least 15 observers should be used and they should not be experts (i.e. they should not be working with quality assessment or other 20 Evaluation of subjective measuring methods types of television quality). All observers should have their vision checked before any sessions. They should also be checked for normal color vision. These tests are performed in such a way that the results from the subjective assessment depend on the system under test and not the user’s vision. It is an important part of every session to instruct the observer the same way in order to minimize user errors. The least errors are produced when having a written explanation and after this any remaining questions are answered. For every session there are some "dummy presentations" in the beginning show- ing the kinds of impairment that might be in the test. These "dummy presenta- tions" should not be included with the result as they are only used to stabilize the observer. A random order should be used for the videos during the subjective assessment in order to minimize the errors from switching between videos.

3.3.2 DSIS The Double-Stimulus Impairment Scale (DSIS) method is a cyclic method that first show a reference video and then video from the device under test. Before, between and after any video a gray image is shown in order to remove any memory effects in the HVS. After the two videos the user is asked to vote according to a grading scale. There is also a second method where the cycle is repeated twice and the voting is performed during the last cycle. This method is more time consuming but might be useful in cases where impairments are small. The scale used in DSIS use words to describe the distortions and range from "Imperceptible" to "Very annoying". It should be noted that the lowest score on the grading scale is not necessarily contained in the set of images shown. Instead users should make an overall assessment of impairment and express these according to the wordings in the scale. A session should only last as long as up to half an hour including any prepa- rations. If lasting longer the risk increases that the observer might get tired.

3.3.3 DSCQS The Double-Stimulus Continuous Quality-Scale (DSCQS) is available in two dif- ferent variants. The first variant uses one observer and one screen where the user can switch between two different video streams. One video stream contains the reference and the other is the impaired video stream. The observer freely switches between the two videos until the user have a mental assessment of the quality of both video streams. After this the observer votes according to a scale. In the second variant there are a number of observers watching the same screen and the streams are automatically switched between the two video streams. And after this the voting is performed. Both methods can be repeated several times depending on the length of the sequences. The voting scale of DSCQS also use words to describe the distortions but differ from DSIS since it range from "Exellent" to "Bad". The scores from DSCQS should not be translated to those of DSIS as the span of DSCQS is not the same. Any 3.3 Subjective assessment 21 score from the DSCQS method should not be interpreted as an absolute score but instead as a relative score between the two streams.

3.3.4 SSCQE The Single Stimulus Continuous Quality Evaluation (SSCQE) is a result of digital television where impairments are scene-dependent and time-varying. The short sequences in DSIS and DSCQS might miss some of the impairment and therefore longer sequences are needed. A problem that occurs when using longer sequences is that humans tend to only vote on the last 10 to 15 second. To fix this problem votes are made during the whole sequence using a slider mechanism that samples the user’s voting twice a second. In SSCQE no reference is shown and therefore it is important to make the observer aware of the correlation between the slider level and the voting scale. One problem with SSCQE is that there is a delay between a change in impairment and the change of the slider level. Another problem is the fact that humans quickly respond to negative changes to the image quality but is slow to revert back after these have disappeared.

3.3.5 SDSCE The Simultaneous Double Stimulus for Continuous Evaluation (SDSCE) is a method that derives from SSCQE but have some differences in the presentation of video and the voting. The observers watch both the reference and the impaired video at the same time. If the format is small one screen can be used, otherwise two separate screens should be used. The observer should assess the difference between the two video streams and vote on the fidelity by use of a slider. Before any session starts it is important that a training phase, a demonstra- tion session and a mock test should be conducted. The training phase should include written instructions to the observer in order to minimize any bias from the test administrator. During the demonstration session the observer should be made acquainted with the voting procedure. In the mock test different kinds of impairment should be included and after this has finished the test administrator should check that the voting from the mock test where the reference is shown on both screens are close to the top of the scale. If this is not so the session should be restarted and any questions from the observer answered.

3.3.6 Contextual effects During any testing the sequences should be in a random order to minimize any contextual effects. However even if random orders are used this can still occur. If for example a strongly impaired video is shown after a series of less impaired videos, observers might rate this to a lower score than they would have otherwise. Some testing has been done on this and the best method to use is the DSCQS if minimal contextual effect is required. The DSIS and other comparing methods have evident effects and the method with most contextual effects is the DSIS version two. 22 Evaluation of subjective measuring methods

3.4 Objective perceptual measurements

The HVS is a very complex apparatus and so far, even thought much investigation has gone into this, there is still a lot to learn. However there are a number of psychophysical effects that have been isolated as more or less important. These effects are carried out more or less as a sequential process [RR06, p. 160].

3.4.1 Color processing One of the first stages is when the light hits the eye and is received by the rods and cones in the retina. The rods are highly sensitive to low light and do not contribute much to the color vision. Cones on the other hand are less sensitive to light and are available in three types, short wavelength sensitive S-cones, middle wavelength sensitive M-cones and long wavelength sensitive L-cones. These three types of cones make up the color vision of the eye but each cone is color blind in the way that it loses all information about any wavelength. However since there are three different types of cones the eye can match any color by the use of trichromacy. In the model this is simulated by dividing any image into one achromatic and two chromatic channels. In this step the luminance-masking or lightness non- linearity of the HVS can also be taken care of by a filter. [RR06, p. 161]

3.4.2 Multi-channel processing The HVS is tuned to different ranges of spatial frequencies which are separated into different channels. This separation can be created by a multi-resolution filter bank such as the cortex transform [Wat87]. This transform can be adjusted over a wide range and is quite flexible. Wavelet decomposition can also be used for the same effect and have the advantage of being simple to implement in a computer. There are also one or two temporal low-pass filters and a temporal band-pass filter used to process different object velocities and temporal frequencies. [RR06, p. 161]

3.4.3 Contrast adaptation The Weber-Fechner law states that the response of an HVS is not dependent on the absolute level of luminance but instead on what relation it has to the surrounding background. Contrast is defined as this relative variation but is quite difficult to model in the HVS as it varies depending on the location in the image. The per- ceived contrast is also sensitive to the luminance and color of the location. [RR06, p. 161]

3.4.4 Contrast sensitivity One of the most important parts in the HVS is the contrast sensitivity function (CSF) which shows a correlation between the spatial frequency and the perceived contrast. As the spatial frequencies get higher the contrast decreases, but in color 3.5 Engineering approach 23 images the CFS is more complex. This problem is usually solved by using a different CFS for each channel. The HVS is also sensitive to temporal frequencies and can be described by temporal sensitivity functions. These have the form of a low-pass or band-pass filter. There is also an interaction between the spatial and the temporal filter described by the spatio-temporal sensitivity functions. [RR06, p. 162]

3.4.5 Masking effects Sometimes one stimulus can’t be detected because of the presence of another, see the left image in figure 3.1 for example. And sometimes a stimulus cannot be seen without the presence of another, this is called facilitation. There are several different types of masking including the following: contrast masking, edge masking, texture masking and temporal masking. [RR06, p. 162]

3.4.6 Pooling effects The last stage in the brain is where the information from different channels is collected together, this is called pooling. There is not much known about this process but often this is simulated by a summing over all channels to get a single rating of distortion. [RR06, p. 161]

3.5 Engineering approach

Although methods based on objective perceptual measurements are potentially more accurate they might sometimes be more versatile than necessary. The engi- neering approach is a way of creating algorithms in which prior knowledge about compression artifacts and simple vision models are used to find any impairment to the video. This approach might not be as versatile but can sometimes be very precise and effective for a given application area. Some examples of engineer- ing approach is to look at video blocking effect, color bleeding, staircase effects, ringing, etc.

3.6 Metric comparison

It is generally accepted that the best method to use is a subjective assessment but in some cases there might not be enough time or resources to conduct such a test. In these cases some sort of automatic algorithm is needed. There are many different methods available for each of the different test cate- gories, but any attempt to find the best one of these would only lead to a lot of unnecessary implementation. In order to find which of all the test methods are the best to use, the Video Quality Experts Group (VQEG) has started doing tests of a lot of different methods. Their first test was conducted between 1997 and 2000 as phase one. Ten different methods were tested and compared both against each other but also against PSNR. The result showed that: 24 Evaluation of subjective measuring methods

• No model could replace subjective assessment.

• No model outperformed any of the other in all conditions.

• No model outperformed PSNR in all conditions.

A second test, phase two, was conducted between 2000 and 2004 as a follow-up of the first phase. The second phase used a much broader field of distortions and focused on distribution of digital media. Six different methods were evaluated by the VQEG in contrast to the first tests that were conducted by the creators individually. The result of the test was that four method performed better than PSNR and one methods correlated to 94% of the subjective assessments [RR06, p. 171]. This is much better than the PSNR with only 70% correlation to subjective assessments. The four best methods are:

• NTIA / ITS • British Telecom • Yonsei University / SK Telecom • CPqD Although this is a very good result for the testing it still shows that it is better to use subjective assessment than any objective methods. However there is a very small difference between the two and in some instances it might be better to use objective perceptual measurements. There is still a lot to be done in order to fully remove the need for any humans in the testing of video quality in a product. Chapter 4 The sampling system

In this chapter a brief explanation is made of the overall system used for sampling analog signals and how this connects to the computer. Since this thesis is a continuation of a thesis by Löfgren [Löf08] in which the sampling system was created, any information about the sampling system not found in this section can be found there. The video sampling hardware is referred to as VSH further on.

4.1 Overall system design

The VSH has a connection for a SCART cable and four RCA connectors. These are connected to an STB or other device to be measured. The device under test, DUT, is setup in such way that it outputs a special test image signal. The VSH is connected to a computer via USB and on the computer a video quality mea- surement program, called MOViA, is running. This is connected to the VSH via the USB port and requests information and does all the measuring on the signal received. See figure 4.1 for visualization of the overall system design.

Figure 4.1. Overview of the video sampling system.

4.2 VSH design

The VSH consists of a specifically designed PCB assembly with a Spartan 3 FPGA as the main processor. Connected to the FPGA are four 12-bit high speed analog-

25 26 The sampling system to-digital converters, also called ADC. The FPGA is clocked at 100 MHz and samples the ADC at 100 MSPS into two 36 bit wide synchronous SRAM with 16 Mbit each. Each memory stores two channels, one channel from bit 0 to 11 and another from bit 12 to 23. Since there are 12 bits still available per memory some extra data could be stored in these bits, but at the moment no such function is available. A total of 444444 samples or 4,44 ms can be stored in RAM since the sampling speed is 100 MSPS. Four channels are available to the VSH because sampling of RGB requires all four channels. The RGB signals do not contain any sync signal and therefore sync information is extracted from the composite signal from the SCART. If the sync signal would be contained inside the RGB signal only three channels wold be needed. For YPbPr only three signals are needed since the sync is sent on the Y channel. Since there are only four ADC and two different signal types a video multiplexer is available to select if signals from the SCART or RCA connectors should be sampled. A sample rate of 100 MSPS is required since the highest bandwidth in the video signals reach 30 MHz and in order to sample these correctly a sample rate of at least 60 MSPS would be needed to avoid aliasing as stated in the Nyquist- Shannon sampling theorem. By using an even higher sampling rate than 60 MSPS the aliasing is minimized even more.

Figure 4.2. Overview of the video sampling hardware.

4.3 VSH to computer communication

In order to communicate with the computer an FTDI FT245R in the VSH is used to translate the parallel signals to USB signals. On the computer side a special 4.3 VSH to computer communication 27 driver is used to communicate with the FT245R. This driver is supplied by FTDI and cannot be changed. The FT245R chip can only handle 8 bit data and therefore a special communi- cation protocol is used, for more information about the protocol see the previous thesis [Joh07, p. 10] [Löf08, p. 35].

Chapter 5 Problem analysis

In this chapter the problem of creating a video signal quality measuring software is investigated and what requirements are needed.

5.1 Vision of operation

The system as a whole is to be used as a tool for assessing the quality of analog video signals from an STB. There is a need for it to be fast, simple and easy to configure. Above all it needs to be very robust and correct in it’s measurements since the measurements made will guide the further development of the STB.

5.2 Measurement procedure

During any signal quality measurement a static image or video stream is played by the DUT. Depending on the type of DUT this can be performed in different ways. The video or image information is converted in the DUT to a series of lines and sent out via RGB or YPbPr signals to the VSH where it is sampled by the ADC’s. The image or video stream contains all the patterns needed for all the measurements methods. The different patterns are present over several lines in order to minimize any distortion between the different types of patterns. All measurements should be made as close to the vertical middle of a pattern in order to minimize this type of distortion. A set of test patterns for both RGB and YPbPr were already available at the start of the thesis. The test pattern used cannot be included with the thesis due to copyright issues. However an example of a test pattern for only RGB is shown in figure 5.1. The different types of patterns in order from top to bottom are: color bar, multiburst, short-time distortion, non-linearity, shallow ramp, 100 % level and 0 % level.

29 30 Problem analysis

Figure 5.1. An example of a test pattern used for testing distortions.

5.3 Video distortion types

There are many different types of distortions that can occur in a video signal but not all of them affect the perceived quality of the image. In order to measure the quality of any video there is a need to know the most common distortions. All of the distortion types in this list are well known and are generally measured when evaluating video quality. As described earlier there where already a set of test patterns available at the start of the thesis and this limited the amount of distortion types that could be tested. However since the distortions types available to measure the quality of a signal cover the basic test needed in order to evaluate a device, no new distortion types were researched. Because of this the list is not by any means exhaustive or sorted in any order.

5.3.1 Level error

The levels in the video signal are specified to certain values and if these are not reproduced correctly color shifts and/or illumination errors can occur in the video. A simple way to test for errors in the levels is to analyze a line with some color bars and check these against their specified values. This test allows the user to test the level and if necessary correct this before continuing to other tests since a level error can affect other tests. 5.3 Video distortion types 31

5.3.2 Frequency response distortion If the frequency response of a DUT is not correct several different types of signal distortions can occur. The frequency distortions can affect the image in many different ways depending on the type. [PAL99, p. 31] These types of distortions are usually tested with a line of sinusoidal form with increasing frequency over the length of the line. Another way to test the frequency response is by using a few isolated frequency bursts of different frequencies on a line, also called multiburst. When assessing the quality of frequency response the amplitude and final frequency is the most interesting.

5.3.3 Non-linearity If a DUT creates amplitude dependent distortions this is often referred to as non- linearity distortions. Small distortions in the illumination is not noticed by most people but if larger non-linear distortions exist this can be seen as crushing and clipping of illumination [PAL99, p. 50]. Distortions in color channels can result in color shifts which can be more noticeable. This type of distortion can be measured with a line containing ramps from the lowest value to the highest value possible for the each of the channels.

5.3.4 Noise Noise is in this context electronic noise usually created as an effect of thermal noise and results in grainy or snowy image [PAL99, p. 58]. The addition of noise in a video signal can in low frequency areas give distortions but in more high frequency areas this distortion might not be noticed, see figure 3.1 in chapter 3. However since this distortion is visible in low frequency parts and gives a good overall evaluation of the DUT this is a very interesting measurement. The simplest way to measure the noise in a signal is to use a line with a constant signal since any errors in the line must be from noise. However this measurement can miss some low frequency noise and quantization noise in the signal and therefore another measurement is made on a line with a slowly rising ramp. [ITU90, p. 10]

5.3.5 Short time distortion Short time distortions are distortions created in fast changing parts of the signal. Either by insertion of delays, overshoots, undershoots or long settling times in the signal. The distortions can on the image level be seen as fuzzy vertical edges and ringing that can create distortions in the chrominance near vertical edges [Glo01, p. 151]. In order to measure these distortions a line with a short pulse and a "bar" is used. The bar is a long vertical part with the same color, in this instance it is white, see pattern three in figure 5.1. This type of measurement is called K2T measurement since the pulse is 2T wide where T is proportional to the bandwidth of the signal. A K2T-value of 3 % is noticeable by most people and for SDTV signals a maximum limit of 3 % K2T-value is specified by ITU. [ITU90, p. 36] 32 Problem analysis

5.3.6 Channel delay

Channel delays are created when one or more channels in a component video signal are delayed relative to another channel. This distortion can result in distortion of edges depending on how large the delay is [Glo01, p. 4]. The delay can be a result of different signal path lengths for each of the channels or inequality of components. To measure this delay any type of signal with equal signal on all channels can be used, however the simplest signal is a frequency sweep since this tests all frequencies at once. [Glo01, p. 47]

5.3.7 Sync delay and amplitude distortions

Delay and amplitude errors in sync signals can give a wide range of errors. However some distortions can occur without notice since most televisions correct for small distortions in sync signals. Measuring sync delays is done on any line and if back and front porch length and amplitude measurements are needed a signal with at least some amplitude above black level is needed in order to detect what part is active signal and not.

5.3.8 Spatial distortion

This type of distortion is usually caused by undesired rescaling, cropping or off- set in the video image. To measure any spatial distortions a comparison among each point in the video and a reference image is needed. If the video image is unevenly rescaled objects in view can appear stretched or compressed. Cropping can remove important parts of video images such as subtitles or other important information. [Glo01, p. 88]

5.3.9 Horizontal sync jitter and wander

Jitter is a short-term instability of a signal compared to a perfect reference and wander is a long-term drift of a signal in the range of 10 to 20 Hz. This type of distortion can lead to sync problems. [Glo01, p. 92]

5.3.10 Crosstalk

Crosstalk is created when two or more channels affect each other in such a way that the signals from one channel is mixed with another by some amount. This can lead to ghost effects in the image from both illumination and colors depending on the type of distortion [Glo01, p. 42]. Crosstalk is measured by sending some type of signal on only one channel, leaving the other two blank and measuring these two for any change in the signal. This measurement is repeated two times until all channels have been used as a source for the cross-talk. 5.4 Selection of distortions types to evaluate 33

5.4 Selection of distortions types to evaluate

Since there is only a limited amount of time for this work only some of all dis- tortion types will be assessed in this thesis. And since the test-signal patterns already existed there were a limited number of measurements that could be used. Depending on the probability of a distortion and it’s effect when occurring a few distortions types have been selected for measurement development. The selected distortions to be evaluated are:

• Level error

• Frequency response distortions

• Non-linearity

• Noise

• Short time distortions

• Horizontal sync delay and sync amplitude distortions

The level error has been selected since it affects other measurements and is the most probable error to exist in a video signals. Frequency response distortions can also affect many other measurements and gives a good representation of the system as a whole. Non-linearity distortions have been selected since it can give noticeable errors in the signal. Noise can affect some types of signals but not all. However it gives a good representation of the quality of a signal. Short time distortions have been selected since these types of distortions can affect the signal and is more usual in HDTV signals because of the higher bandwidth. Horizontal sync delay and amplitude distortions are very simple to measure and are therefore also evaluated.

5.5 Requirements

This chapter contains a list of requirement on the software to be developed. By using detailed and exact requirement the development process is simplified since unnecessary implementation is minimized. Which of these requirements where eventually implemented can be seen in chapter 9.

R0 Example requirement

This example illustrates what a requirement looks like. Each re- quirement has a unique number, a title and a more extensive ex- planation and in some cases a motivation behind the requirement. 34 Problem analysis

5.5.1 General requirements These requirements are not specific to any part of the program but indirectly affect the software development.

R1 Sampling hardware

Video signals should be sampled by the pre-existing hardware.

R2 Video sample transfer

Sampled video signals should be transferred from sampling hard- ware to PC.

R3 Subjective analysis

A small study of implementing subjective analysis should be conducted.

R4 Comparison to existing equipment

The final product should be compared to existing commercial video analysis equipment.

5.5.2 Measurement requirements The requirements in this section are used to perform parts of the signal quality measurements.

R5 YPbPr video

The software should be able to sample and measure YPbPr video at 1080i, 720p, 576p and 480p.

R6 RGB

The software should be able to sample and measure RGB video at 576i and 480i. 5.5 Requirements 35

R7 Color bars measurement

The software should be able to detect and measure color bar levels.

R8 Frequency response measurement

The software should be able to measure frequency response.

R9 Noise measurement

The software should be able to measure noise.

R10 Linearity measurement

The software should be able to measure linearity.

R11 Short-time distortion measurement

The software should be able to measure short-time distortion.

R12 Calculate uncertainties

Calculate uncertainties in input video signal samplings.

5.5.3 GUI requirements For the GUI specific part these requirements exist.

R13 Present measurements

The GUI should be able to present measurements results for the user to review. 36 Problem analysis

R14 Present calculated uncertainties

The GUI should be able to present calculated uncertainties that exist from the sampling hardware.

R15 Select input type

User should be able to select input type.

R16 Limits loading

Read high/low limit values for measurements from file.

R17 Measurement report

Write measurements from testing to report.

5.5.4 Extra requirements If time permits these requirements may be implemented.

R18 Sync timing measurement

The software should be able to measure sync timing.

R19 Sync levels measurement

The software should be able to measure sync levels.

R20 Cross talk measurement

The software should be able to measure cross talk.

R21 Channel delay measurement

The software should be able to measure channel delay. 5.5 Requirements 37

R22 Low resolution picture

The GUI should be able to present a low resolution picture in real-time.

Chapter 6 Design

In this chapter the design of the video signal quality measurement software is discussed. First an overview of the system is described and then each part of the system is discussed in more detail. Finally the chosen design to be implemented is described.

6.1 Design concepts

During the design and later the implementation several aspects need to be con- sidered and all these are reflected in the final design. In order to minimize the amount of common errors and ensure good portability the software was developed with design patterns and design principles where this was applicable. Above all one pattern is used more than others - encapsulate the things that change [FF04, p. 9]. This principle is used since the question is not whether the software is going to change but rather when it’s going to change and where. Most software is at some point changed and in order to minimize any work during the change the thing that is most likely to change is encapsulated.

6.2 Overall design

In order to create software able to receive and measure analog video signals a number of different components were needed. There is a need for a component with the ability to communicate with the VSH in order to send commands and receive sampled data, for more information see chapter 4. The measurement methods used in the program also need to be created as separate components. A GUI needs to be developed to ensure that the user can interact with the program. During the running of the program different files also need to be read and written, this will be performed by a component. And

39 40 Design

finally one component responsible for combining all these parts together needs to be created. All of these components are listed below without any order of importance:

• A main control to combine all components

• Connection via USB to the VSH

• Measurement methods

• A graphical user interface

• File input and output

6.3 Component design

Each of these components is either one library or divided into several libraries depending on the type of component.

6.3.1 The main control This component is used to connect all the other components into a single group that is connected to the GUI. This can later be changed if a GUI is not needed. The main control utilizes the facade pattern [EGV02, p. 185] and creates a facade for all it’s subsystem in order to minimize the complexity of the system.

6.3.2 Connection to the VSH In order to communicate the VSH has a FTDI chip functioning as a USB-to-parallel converter. A special driver is used with the software since this was already available from FTDI. In order to ensure that any changes to this driver in the future would not affect the rest of the system this component is used as an adapter between the main control and the FTDI driver. All communication to and from the VSH will go through this library and it will also control what is allowed and not. However since there is a communication protocol used to communicate with the VSH some extra functions are needed and the component is therefore not only an adapter but also adds some functionality and combines this to more general functions. This can therefore be seen as a combination of a facade pattern and an adapter pattern [EGV02, p. 139].

6.3.3 Measurement methods There are a lot of different measurement methods used and the only thing they have in common is the fact that they measure some distortion and output a result from this. Therefore all measurement methods will be divided into different libraries inheriting from an abstract measurement library that defines the methods used by all measurement methods. 6.3 Component design 41

All of the measurement libraries contain similar parts used to perform op- erations on a line, such as finding a plane or rising edge. These parts can be encapsulated into a special library used by all the measurement libraries. If a better way to improve these methods is found there is no need to change this in all of the measurement libraries.

6.3.4 The GUI The GUI is used by the user to interact with the software and visualize complex data. Since any measurement or other functions could require a long time to finish this might lead to lock-ups of the GUI. This behavior is unwanted and therefore all heavy computations need to be placed in a separate thread running in parallel with the GUI thread. By using separate threads the GUI would still function as normal even if long computations are needed.

6.3.5 File input and output The software needs a way to handles any file input and output since settings and limits need to be read and log files need to be written. This component is most easily created as a set of libraries with different responsibility since the only thing combining them is the fact that they will read or write files.

Log files During the development of the software text logs will need to be created to test different parts of the program. When the software is finished log files will also need to be created in some instances since this will be used to save data but also to aid any bug searching.

Setting files Since some functions might change over time but not necessarily each time the program is used, a set of setting files will be used for changing these settings. These files can be edited easily since they use syntax readable by humans compared to other types of files.

Limit files For any measurement made in the system there will be a lot of measurement values created and these needs to be compared with limits in order to check whether the values are within limits. These files should, like the settings files also be easy to edit by a user at any time.

Report creator After the measurements are done and the measurements have been compared to the limits a report needs to be created. This report should contain all the information from the measurements and the results from the comparison with the limits. 42 Design

6.4 Chosen design

The chosen design and the connection among each of the different components in the system can be seen in figure 6.1. The thread and FTDI blocks are not real components but rather there to show how the components are connected. A connection between two parts does not indicate inheritance but rather what parts are communicating with each other.

Figure 6.1. Overview of the software system. Chapter 7 Implementation

This chapter describes how the chosen design has been implemented in reality and what problems did occur.

7.1 Introduction to the implementation

The implementations used in this thesis have been created in Microsoft Visual Studio C++ and use the built in Microsoft Foundation Class Library or MFC. The MFC is mostly used to create the GUI and by separating the GUI from the main system the system is more portable to another system. However the final implementation created for this thesis is only to be used in Microsoft Windows and therefore this portability has yet to be tested. In figure 7.1 the connection among each of the components is illustrated. This figure does not show any inheritance except for the abstract measurement method, but instead only shows how the system is connected and what parts communicate with each other. The "Thread"-objects are not libraries in the real implementation. They are there to show were a new thread is used, all functions below a "Thread"- object is part of that thread.

7.2 GUI

The GUI uses the built in functions in MFC to create the view used by the end user to interact with the program. The user has the ability to connect and initialize the environment and visualize the current sampled line as a graph. The graph updates in real time and can be zoomed and inspected to ensure the right line is selected and that the signal is not corrupted. Separate from the main GUI dialog is also a result dialog used to show the results after each measurement. This dialog is intended to be used in parallel with the main GUI dialog and therefore needs to be in a separate thread. If this window

43 44 Implementation

Figure 7.1. Overview implementation parts of the software system.

was not in a separate thread it would lock the main GUI dialog from being used. For more information about design of the GUI, see chapter 8.

7.2.1 Graph control This library is used by the GUI in order to create the graph visualizing the current selected line. Since there is no function in MFC to create graphs this needed to be created from scratch. During the update of the GUI it creates a reference to a "canvas" and sends this to the graph control to paint on, it also requests the current line data from the main control and sends to the graph control. The graph control contains four graph objects, where each is responsible for drawing a specific channel. The graph control redirects the "canvas" and the current line data to the correct graph object which in turn draws the graph depending on the 7.3 VSH I/O library 45 current position and zoom level. After the graph control is finished it returns to the GUI and draws the "canvas" onto the screen.

7.3 VSH I/O library

Most of the low level functions in this component were already developed during the two previous thesis developments. However this code was developed in Visual Basic and a conversion to C++ was needed. During the conversion some bug-fixing and improvements were added to the code in order to both optimize performance and to ensure that any errors in the communication were caught and handled. This component is also responsible for maintaining which state the connection is in, connected, initialized or disconnected. This is important since each time the system is started a PLL on the VSH needs to be set-up in order for the system to function. The PLL converts the 10 MHz clock signal from a stable crystal up to 100 MHz used by the system. If this component is not set-up correctly at the start of the system some parts of the FPGA will not get the clock sources it needs.

7.4 Worker thread library

The worker thread is used to connect the main library with the main control library. All the communication with the thread is made with windows messages since these do not need any synchronization between the threads [Cor09]. To use windows messages a function needs to be created in the thread and we do not want to bind the main control to this function since in the future another GUI or system might be used in later development. The worker thread ensures that the main control is decoupled from any thread functions. The library also manages all functions of the thread such as initialization and termination.

7.5 Main control library

Since the program needs to be portable to any GUI this library acts as a facade for the main working parts of the system. The main control contains a set of high level function and any library using the main control do not care about how the lower levels are implemented.

7.6 File I/O libraries

During any usage of the software different files need to be read and written and this part of the program ensures that this is possible. A helper library for reading INI- files is used for some of the file readers. This library has been created by Carsten Breuer and is released under the LGPL [Fou08] meaning it can be incorporated into commercial software. 46 Implementation

7.6.1 Limits library Limits are needed to compare with the measurement results. The values are stored in an INI-file where the different measurement methods are divided into sections for each resolution. The keys are defined as (name of result value)_(channel 1- 3)_(Low/High/Ref)=(value). For example Level_White_CH1_Low=679. The channel number is for YPbPr the first three channels and RGB the three last channels but the numbering is always from 1 to 3 in the limits file.

7.6.2 Settings library To ensure that some rarely changed settings of the program can still be changed without recompiling the program a set of settings files are used. The setting files use the INI-library like the limits library to read INI-files but the sections and keys are not as uniform as the limit files. It’s important that all the settings files exist and contain all their parameters or the program will not function. One possible solution to missing files or settings can be to recreate a default setting at start-up. However since this might lead to errors in measurement results if the wrong values are used, this has to be done manually.

7.6.3 Measurement report library After the measurements have been performed a report can be created to save the results into a file. This file either contains all results from all measurements or only from one measurement. The data is saved as comma-separated values or CSV. This file format can easily be imported into Excel document or similar spreadsheet program.

7.6.4 Log file library During the development the log file library was used to help debugging complex methods but also to save sampled data. The library can output different types of data into a simple text file. Sampled signal data from each measurement is also stored using this library.

7.7 Line tools library

This library is called "Line Tools" since all of the operations in the class operate on a line in some way. This class does not need to be initiated but instead contains global functions much like the Math class in C++. The class can be seen as a toolbox containing a set of tools used for different circumstances.

7.7.1 Find plane This function is used to find planes in the signal. A plane in this instance is a part of the line where the signal is stationary at a level during some time. Both the 7.7 Line tools library 47 length of the plane and the limit deviation from the plane allowed can be changed. Since each plane is different these values will need to be changed depending on the type of line. The limit is set as a percentage allowed to diff from the current positions mean level. The function is called with the plane length, the plane limit and a start point of a line. For each step forward the function calls a helper function to check if the current position is a plane or not. If not, the position is incremented and the plane check is performed again. This loop continues until a plane is found or the end of the line is reached. An optimization to the code is to step longer steps for each iteration but this might lead to missed planes and testing have shown that the current code is fast enough and therefore stability is chosen over speed. A similar function is also available but instead of traversing forward this func- tion is used to traverse backward along a line.

7.7.2 Find rising or falling edge The rising and falling edge finder is used to find changes in the signal such as rising or falling parts of the signal. Similar to the "Find plane" function the rising or falling edge functions are called with a start position but also a trigger value. The function increments along the line until the current position value is either below or above the trigger value depending on the type of edge sought. A different method using convolution to find the edges have been tested but this did not work well for all types of edges. If this method could be optimized it might give better results in some instances. However testing done on the simpler method described above have shown that it is very stable and unlikely to miss edges. The functions are also available both as a forward and backward traversing version depending on the need.

7.7.3 Line extraction At each sampling a preset number of samples is stored in the memory of the VSH and then transmitted to the computer. These samples start at the sync of the selected line and end a bit after the next sync. Since only parts of all the samples are needed a "line extraction" is performed after each measurement. The line extraction extracts two different parts from the current line. One part is called a "full" extraction and contains all the samples between the current sync and the next sync. The second part is a "sized" extraction with only the active data part of the line. See figure 7.2 for an example extraction of a video line. When the full extraction is performed there are a lot of parts needed to be found in the line. The sync start and end is found, depending on the type of input this can either be a simple negative pulse or a negative/positive-level change. After the sync information is found the back porch can be found since the end of the sync is equal to the start of the back porch. The end of the back porch is then found and this is equal to the start of the active video part. 48 Implementation

Figure 7.2. Two different types of line extractions.

Now the function jumps to the next sync that can be found since the first sync level has been found. Here the sync start is equal to the end of the front porch of the next sync and by working backward the start of the front porch and the end of the active video part can be found. Now all parts have been isolated and the video can be cut into parts. This complex method to find all parts only needs to be performed when the full extrac- tion is performed and then sized extraction can use this data to cut out the parts needed.

7.8 Measurement libraries

The different distortion types selected in section 5.4 was used to create a set of different measurement methods. In order to understand the relation between the measurement methods and the distortion types see table 7.1.

Distortion type Measurement method Level error Color bar measurement Frequency response distortions Multiburst measurement Non-linearity distortion Non-linearity measurement Noise Noise and Shallow noise measurement Short-time distortions Short-time distortions measurement Horizontal sync distortions Horizontal sync measurement

Table 7.1. Relation between measurement methods and the distortion types. 7.8 Measurement libraries 49

All measurement libraries inherit from an abstract measurement library, this makes all measurements interchangeable. If one measurement is used at any part of the program any other measurement library can be used in the same place. It also minimizes the need for memory since only the used measurement library need to be instantiated at any given time, even if all of the libraries are used.

7.8.1 Color bar measurement A color bar measurement is one of the simplest of all the measurements. The measurement uses the "sized" vector and since the bar contains nine bars with different color with the same size the only thing to do is to calculate the center position of each bar and measure this value compared to the black level from the back porch on each channel.

7.8.2 Noise measurement The noise measurement uses a white bar over the full visible part of the line. The "sized" vector is used and using the mean the line is placed around zero. After this a high-pass filter is applied to the vector in order to remove any tilt, ramp or other slow moving distortions. This filter has a cutoff frequency equal to 1/50 of the maximum bandwidth of the input signal. The next part of the measurement is divided into three parts, one filtered with a unified weighting filter, one filtered with a low-pass filter and one without any filtering. Even though the "unfiltered" is actually filtered by the previously discussed high-pass filter it’s more intuitive if it’s called this way since all are filtered by this filter but only two parts are further filtered. After the three parts have been created and filtered each part is measured with a root mean square and a signal-to-noise measurement. Each of these measurements are described below.

Unified weighting filter The first part uses a unified weighting filter. The ITU recommends the use of this type of filter since it better matches the way humans detect noise in a typical viewing condition [ITU90, p. 24]. The filter is defined as follows:

1 + [(1 + 1 ) ωτ ]2 A = 10 log a (7.1) 1 2 1 + [ a ωτ ] a = 4.5 (7.2) 1 τ = (7.3) fbandwidth

The value τ in the equation is in the original ITU Recommendation set to 245 ns. This value is close to the period time of the bandwidth of an NTSC or PAL signal. Since this filter also needs to be applied to signals with higher input 50 Implementation bandwidth the function needs to be changed. In the version seen above the filter depends on the bandwidth of the signal to calculate τ. This value has been experimentally chosen and the results have not been fully tested. However the tests performed during the development seems to show that this method produce typical results.

Low-pass filter

As a counterweight to the cases were the unified weighting filter does not show the signal noise a simple low-pass filter is also used on the same vector to create a separate measurement. The low-pass filter is set to the bandwidth of the signal. If there is any noise above the bandwidth the image should not be affected by this but the measurement result will be. To minimize the error from high frequencies these are removed.

Root mean square

The root mean square, or RMS, is usually used to calculate a mean for signals with both positive and negative values. The following equation is used to calculate the RMS value, where n is the amount of samples and xi is the sample at position i: v u u 1 Xn RMS = t x2 (7.4) n i i=1

Signal-to-noise ratio

Signal to noise, or SNR, is a measurement method generally used for noise mea- surements. The equation used to calculate SNR is the following:

P SNR = 10 log signal (7.5) PNoise

The PSignal value is the reference value used for the signal, in this instance the level is 100 % white, or 700 mV. The other variable, PNoise is RMS noise in the signal.

Calculating RMS and SNR

In the final part of the measurement each of the three parts are used to calculate both an RMS and an SNR value. The unified weighting filter shows the noise most likely to affect the end user, the low-pass filtered noise shows the noise that might affect the end user and finally the unfiltered noise shows the overall noise in the system. 7.8 Measurement libraries 51

7.8.3 Shallow noise measurement The shallow noise measurement is almost equal to the normal noise measurement but since it measures a slowly rising ramp this needs to be removed first. Opposite to the normal noise measurement the high-pass filter is applied first to remove all tilts and the shallow rising ramp and then a mean is found. The high-pass filter has a cutoff frequency equal to 1/30 of the input signal bandwidth. This value is experimentally chosen so it only removes the ramp and other signals but not the noise. After the filter the mean value is found and removed from the signal. Finally the unified weighting filter, low-pass filter and non filtered parts are created and measured with RMS and SNR exactly like in the standard noise measurement.

7.8.4 Multiburst measurement In the multiburst measurement the frequency and amplitude for each of the burst need to be found. The frequencies of the bursts are easily found by using a Fast Fourier transform, or FFT. Here the six most significant peaks are selected and the frequencies of these are calculated. The next step is to find the amplitude for each of the bursts and compare them with a reference amplitude. The reference amplitude is defined with two different levels before the bursts and these levels are easily found by searching for the lowest and highest plane in the active video part of the line. The bursts are placed after these and using a method of finding the start of each burst and then a plane between the current and the next burst, all of the bursts can be found. The amplitude is calculated as the difference between the highest and the lowest level in the burst. A better method for finding the burst would be to create an ideal sinus wave from the frequency found for each burst. The ideal sinus wave would be used as the kernel for a convolution over the line. After this the result would show where the burst was placed. This method was not tested due to time limits and remains to be implemented in the future. However the current method have during testing been very stable and therefore an improved method might not be necessary.

7.8.5 Non-linearity measurement A non-linearity measurement uses the "full" part of the line. There are two types of measurements, one for the Y channel in YPbPr and one for the rest. The two measurement methods are used since the signal on the Y channel is so different that creating one method for all types is not practical. When measuring the Y channel the highest level in the signal and the black level are found. The levels found are used to find the ramp by searching from the back porch and forward until the start of the ramp is found at 10 % of the difference between the maximum level and the black level. When this position is found the start of the ramp has been found and the end of the ramp is found by searching forward until 90 % of the difference between the maximum level and black level has been found. 52 Implementation

For all RGB channels and the Pb- and Pr-channel another similar method is used. In this method the black level or the front porch is stored and the maximum position and level in the signal is found. The difference between the black level and the maximum level is stored and the positions containing 90 % and 10 % of the black level plus the difference value are stored. By using this method the ramp for each of the channels can be found. After each of the ramps have been found they need to be measured and com- pared to a linear reference. The reference is created by using a least square method on the ramp. The ramp is divided into five equal steps and each step is then com- pared with the reference. Each comparison is then divided with the largest step found giving a percentage deviation from the reference.

7.8.6 Short-time distortion measurement The short-time distortion measurements use the "full" part of the line. The pattern consists of a pulse and a bar. The pulse is used to calculate the K2T value and the bar is used to calculate over- and undershoot, rise and fall times and settling times. For YPbPr only one K2T value is calculated for the Y channel but for RGB the K2T is calculated for all three channels due to the test pattern used. Each of these measurements are divided into sections and described below.

K2T value The K2T value is calculated using the following equations [Sch69] [ITU90, p. 31]:

1 T = (7.6) fbandwidth HAD − 2T K0 = (7.7) 2T 10T X8T a × t K00 = (7.8) 2T 8T t=2T 0 00 K2T = max(K2T ,K2T ) (7.9)

Here the variable HAD is equal to the distance between the rising edge and the falling edge of the pulse. The edges are measured at 50 % of the height of the pulse. The variable a is equal to the distortion of the pulse compared to the black level. 0 00 The K2T value is used to check that the pulse is not to wide and the K2T value is used to check that the pulse settles fast and does not have to much over- or undershoot. The implementation of the measurement is quite simple, the pulse needs to be found and the highest value measured. After this the rising and falling edges are found using 50 % of the maximum value. Using these values the two K2T parts 0 00 can be calculated and the maximum value of K2T and K2T is used as the K2T value. 7.8 Measurement libraries 53

Over- and undershoot The overshoot is measured by finding the stable level of the bar and the rise and fall of the bar. By comparing the highest amplitude at the rise to the stable amplitude of the bar, the overshoot can be calculated into a percentage value. Likewise the undershoot is calculated by comparing the highest negative amplitude at the fall of the bar with the amplitude of the bar and converting it to percent.

Rise and fall time The rise and fall times are calculated using the amplitude of the bar as a reference. The rise is then equal to the time to rise from 10 % to 90 % of the reference amplitude. And the fall time is calculated as the time from 90 % down to 10 % of the reference amplitude.

Settling time Settling time for the bar is calculated using the maximum position of the overshoot and undershoot in the signal. These positions are used as start position and the end is found by searching for a plane with a maximum of 5 % error compared to a reference. For rise settling time the bar level is used as a reference level and for fall settling time the black level is used as the reference level.

7.8.7 Horizontal sync measurement The horizontal sync measurement is a more exact version of the line extraction function but instead of cutting out different parts it measures width and levels on different parts of the line. Depending on the type of resolution different measure- ments are performed. This is due to the fact that three different standards are used, one for EDTV [ITU07] and two for HDTV [SMP01] [SMP08]. SDTV is not tested since a measurement method for this is already available. For all resolutions the sync to sync length is measured and used together with the maximum amount of lines for an input to calculate the frame frequency. The sync rise and fall times are also measured for all resolutions.

EDTV For EDTV the sync width and level need to be measured. For any measurements made on the sync both on EDTV and HDTV the 50 % value of either the rise or fall is used to calculate the width of the sync. The horizontal blanking width or the length from the start of the front porch to the end of the back porch also needs to be measured. This measurement uses the front porch width which also needs to be measured.

HDTV Since HDTV have both positive and negative sync signals the width and level need to be measured. After the levels have been measured the difference between both 54 Implementation signals needs to be calculated. Both the value for the sync to active video start and the value for the sync to the active video end also needs to be measured.

7.8.8 Channel delay The channel delay is calculated by using the same signal on all of the channels and comparing them two at a time. When comparing two channels the signal is shifted parallel to the other until a minimum between two lines is reached. However since the sampling frequency of the system is 100 MSPS, the time between two samples is 10 ns and this is not enough to measure the channel delay. For most input signals the channel delay must be below 10 ns and if the measurements have an tolerance of 10 ns the result will not be good enough. In order to implement this measurement the VSH would need to be upgraded to a higher sampling frequency. The FPGA could be run at a higher frequency and the PLL used to create the 100 MHz clock signal can be altered to give a higher frequency. However the ADC used is limited to a maximum of 100 MSPS. Chapter 8 GUI

In this chapter the GUI design is described and evaluated. Even though the main focus of this thesis is more on the technical aspect of measuring video signals the system will still be used by humans. During the development an iterative design method has been used [JPS02, p. 64]. At first several simple designs are created and evaluated. Depending on the result improvements are made and a set of new designs might also be created. This cycle is repeated until only one final design is reached.

8.1 Description of GUI design

The GUI consists of a main window with a graph and buttons to control the flow of the program. Another window is used to present the results from the measurements and these two can be run in parallel since they use two different treads. In figure 8.1 the main window of the program is shown. The graphs on the left are used to show the four sampled signals. On the right are a set of buttons used to control most of the functions in the program. The functions available here are the most commonly used. Other less used functions can be found by right-clicking the title bar at the top of the window. This type of menu is unorthodox but the users of the program were familiar with this type of menu and therefore this can still be used. At the bottom of the screen a slider is available to select the current line to be sampled. At the right bottom side a log shows the current state of the software. This can be used to give feedback to the user in a way that is not otherwise possible. If message windows are used a lot of unnecessary mouse clicks will be needed and therefore a log window is better. In the window in figure 8.2 the measurement results are shown in a list. De- pending on the type of measurement type selected in the list at the top left the measurement list will change to show the correct measurement results. The results shown in the window have different colors depending on whether they are within

55 56 GUI the limits or not. Several different view options are available for the measurement results. The results can be shown as absolute values, relative values from a reference, percent of reference value or percentual difference relative to reference value. After all the measurements are made the results can be saved to a report. This is either made on the current measurement result selected or on all measurement results by clicking two different buttons at the bottom of the window.

8.2 Usage scenario

A normal usage scenario for the program is when making measurements with all measurement types. When performing this task the following steps are needed: First the program is connected to the VSH by clicking "Auto connect". The system will take a few seconds to set up the connection. After the connection is set up the system is ready to be used. The type of input signal needs to be selected in the combo box at the top right and all measurement types in list below need to be selected. By clicking on the "Auto measure" button all the measurements are performed on the current input. This will take up to one minute and then a message will inform if all measurements where successful or not. When all measurements are finished the results can be reviewed in the result window by clicking "Show results".

8.3 Evaluation of GUI

The goal of the interaction design is to make the system fulfill good efficiency. However in order to perform a task efficiently it’s also important to ensure that the right task is performed. Further the user will not perform efficiently until the program is fully understood. And if the program handling is not easy to remember between each use, efficiency will be lowered. In order to ensure good efficiency the following usability goals have been chosen and evaluated [JPS02, p. 15]: • Efficient to use (Efficiency) • Have good utility (Utility) • Easy to learn (Learnability) • Easy to remember how to use (Memorability) The efficiency goal describes how well the system supports the user to carry out their task. The utility goal refers to how well the system provides the right kind of functions to enable the users to do the task they want to perform. Easy to learn and easy to remember goals are wanted for all programs since a steep learning curve will hinder the user from performing a task. This is since most users don’t like spending a lot of time to learn a new system [JPS02, p. 16]. A system requiring the user to relearn each time the system is used is probably a system with non-logical and long combinations of tasks. If these exist they should be found and changed since this will hinder the user. 8.3 Evaluation of GUI 57

Figure 8.1. Main window of MOViA.

8.3.1 Efficiency goal There are several steps needed to perform a measurement on a system and this could be minimized by making one big button with the text "Test signal". However since the users want to be able to make measurements with only a few measurement types or to see the sampled signal in the window before measuring, the GUI needs to be more complex. This however might lead to the need of more complex combinations of actions to perform a task. The current GUI has been designed to support the user as much as possible and buttons have good descriptions of their usage.

8.3.2 Utility goal In order to know if the task can be performed by using the MOViA it’s important to know what task is required to be performed by the system. The user wants to be able to evaluate the component signal quality of a product, in this case a set-top box, and find if any distortions exist in the signal. This task can be performed in the system since it enables the user to sample analog component signal and make measurement on the signal. The measurements give a result which is compared to some limits and either give a feedback whether the signal contains a distortion or are within limits. 58 GUI

Figure 8.2. Result window of MOViA.

The system can perform the required functions, and the system provides the right tools to do so but how well can the user really perform the task? Is there anything hindering the user from performing the task or slowing down the per- formance of the task? These questions are outside of the scope of this thesis and would need interviews or observations to find out.

8.3.3 Learnability goal One difference between the MOViA system and a commercial program used by end users is that the average computer knowledge of users are higher for the MOViA system. This makes the design easier since a minimum level of technical experience can be expected. However many parts of a design are the same independent of the technical experience of the user. The system needs to be simple to minimize the work time and allow the user to perform other work tasks. The system will only need five button clicks to make all possible measurements on a signal type. To save the data to a report file the user will need to make one more click to finish the task. A simple way to test if a system is easy to learn is the "ten-minute rule". This rule states that a user should be able to learn the system within ten minutes. However this should not be considered for very complex systems since it’s not possible for the system to teach the user in such short time. Instead the system should use the users existing knowledge. In the current case one should expect that a user has knowledge about analog video signals and the different distortions and measurement methods. [JPS02, p. 16] During a demo of the MOViA system a set of potential users have been in- 8.3 Evaluation of GUI 59 structed how the program functions in less than ten minutes. Since this goal has been reached the system should be considered easy to learn.

8.3.4 Memorability goal If the system is easy to learn the user will not need to remember what task is needed between the usage of the system. In most cases a small learning step is needed before the user knows how to use the system. The user can be helped to remember how to perform tasks through meaningful icons, command names and menu options [JPS02, p. 17]. The icons are lacking in the current system but command names and menu options have been considered with easy usage in mind and should be easy to understand. This combined with the fact that the learnability goal has been reached the memorability should be high.

Chapter 9 Evaluation

This chapter describes how well the finished system meets the previously described requirements. Also the system is evaluated against a commercial product used to measure video signal quality. And finally the calculated tolerance of the system is presented.

9.1 Requirements

In section 5.5 all of the requirements of the system are discussed and now it’s time to look at what requirements were really meet. All of the general requirements and measurement requirements have been met. The GUI requirements have also been meet except one, R14, where the calculated uncertainties should be in the GUI. This was not very practical and was chosen not to be included for the final system. Two extra requirements were also meet, R18 and R19, where horizontal sync timing and levels are measured. The crosstalk measurement could have been implemented but due to time limitations this was chosen not to be implemented. The remaining extra requirements were not implemented due to limitations in the VSH.

9.2 Comparison between MOViA and VM6000

In order to evaluate the product and to ensure that all measurements are within reasonable values the system is compared with a Tektronix VM6000, "Automated Video Measurement Set" [Tek07]. This unit was in an earlier test used to evaluate a specific software on a specific STB. By using the same software and STB for testing with the MOViA system a comparison can be made between the two units. The VM6000 is used as a reference and is considered correct even though there might be errors in it’s measurement

61 62 Evaluation

Type Typical value range Max diff. Average diff. Unit Color bar level 0 to 700 -6,25 1,98 mV Multiburst freq. 0 to 5 0,01 0,004 MHz Multiburst amp. -3 to 1 1,48 0,05 dB Multiburst flag 0 to 300 3,03 -1,71 mV Noise SNR 50 to 80 2,04 1,52 dB Non-linear value 0 to 10 3,33 1,31 % S.t. Dist. time 0 to 200 7,12 2,22 nS S.t. Dist. percent 0 to 5 1,46 -0,80 % S.t. Dist. K2T 0 to 5 0,63 0,44 %

Table 9.1. Comparison between MOViA and VM6000 for 576i signal

Type Typical value range Max diff. Average diff. Unit Color bar level 0 to 700 9,38 -1,94 mV Multiburst freq. 0 to 5 0,15 0,01 MHz Multiburst amp. -3 to 1 1,43 -0,47 dB Multiburst flag 0 to 300 3,36 0,48 mV Noise SNR 50 to 80 13,4 9,09 dB Non-linear value 0 to 10 2,90 0,17 % S.t. Dist. time 0 to 200 3,43 -0,21 nS S.t. Dist. percent 0 to 10 1,74 1,19 % S.t. Dist. K2T 0 to 5 0,27 – % H. sync, short time 0 to 1000 7,00 3,50 nS H. sync, long time 1000 to 25000 68,8 -38,8 nS

Table 9.2. Comparison between MOViA and VM6000 for 720p signal

values too. The original values measured cannot be presented due to a non- disclosure agreement. Three separate types of signals are measured and compared between the re- spective measurement evaluation systems. The first signal type is 576i using RGB color space, the second signal type is a 720p signal using YPbPr color space and last a 1080i signal using YPbPr color space is also compared. These three signal types should give a good spread and minimize any errors in the comparison. Values in table 9.1, 9.2 and 9.3 contain several types of measurements and their respective values. The different types of values in the tables are groups of different values and each group have a "Max diff." and a "Average diff." value. The "Max diff." is the worst case difference in value between the MOViA and the VM6000 whereas the "Average diff." is a mean value over several values showing the average difference between values from the MOViA and the VM6000. Each measurement in the MOViA system has been performed eight times and then these measurements have been averaged. This method is used to minimize any error in the measurement method. 9.2 Comparison between MOViA and VM6000 63

Type Typical value range Max diff. Average diff. Unit Color bar level 0 to 700 9,17 -2,31 mV Multiburst freq. 0 to 5 0,10 0,02 MHz Multiburst amp. -3 to 1 1,28 -0,38 dB Multiburst flag 0 to 300 4,37 -1,92 mV Noise SNR 50 to 80 10,4 -5,83 dB Non-linear value 0 to 10 3,31 -0,71 % S.t. Dist. time 0 to 200 9,43 -0,38 nS S.t. Dist. percent 0 to 10 2,03 1,25 % S.t. Dist. K2T 0 to 5 0,04 – % H. sync, short time 0 to 1000 6,00 -2,00 nS H. sync, long time 1000 to 30000 200 -110 nS

Table 9.3. Comparison between MOViA and VM6000 for 1080i signal

9.2.1 Color bars measurement For all the signals the values for color bar are very good since the difference is below 1,5 % over the full range. The average difference percentage is even better with a maximum of 0,33 % for 1080i.

9.2.2 Multiburst measurement The multiburst frequency values are very good with only a small difference between the MOViA and VM6000. The amplitude measurement for each burst is worse with quite a large worst case diff in the measurement. This difference might be due to the fact that the MOViA uses a different measurement method than the VM6000. The average difference is much better, especially for 576i signals. When comparing the flag levels between the two systems similar value as seen in the color bar measurement are found, but here the difference is even smaller.

9.2.3 Noise multiburst Noise measurements are quite good compared to the VM6000 and the 576i signal produced very good values with low difference. This type of measurement is af- fected by the types of filtering used before measuring the noise and therefore this value can be difficult to compare.

9.2.4 Non-linear measurement The non-linear measurement is not so good when comparing the two systems. This might be due to the fact that MOViA uses a least square method to calculate the reference and this approach might not be the same in the VM6000. It might also be due to some other difference between the two systems. However the average 64 Evaluation error is quite good and the measurement is still useful as long as the worst case values are considered.

9.2.5 Short-time distortion measurement This measurement is divided into three groups where the first, "S.t. Dist. time" contains rise, fall and settling times for the bar. The second "S.t. Dist. percent" contains the overshoot and undershoot values and the last, "S.t. Dist. K2T" contain only the K2T value. The minimum error in time of a signal is 10 nS since this is the length between two samples in MOViA. Since the error is below this value it can be considered very good when compared to the VM6000. Percent values are quite good since the measurements might differ in the choos- ing of an overshoot or undershoot value. The reference value might also be calcu- lated in different ways. The K2T values are very good with low differences compared to the VM6000. For RGB the K2T value is calculated for each channel and the values are averaged into one value. This value is a little smaller than the worst case value but the small difference between the two shows that the K2T value is quite stable over all channels.

9.2.6 Horizontal sync measurement This measurement is not available for RGB but for YPbPr the measurements are split into two groups with long and short time measurements. The short measurements are below 1 µS and the long measurements are over 1 µS. The values for short time measurements are below the limit of 10 nS between two samples in MOViA and are therefore considered to be very good. The average error is even lower and this might be due to the fact that any distortions in the image can also affect the time measurements, creating small differences in the time measurements. For long time measurements the difference is higher but this does not affect the measurements as much since the measured values are higher. The percentage difference are within the same level as the short values.

9.2.7 Conclusion Most of the measurements were found to be very good or at least good when comparing the two systems. However some measurements differ between the two and the largest difference is in non-linear measurement. This might be due to the fact that each implementation is different. Another explanation is that the VM6000 can also have an error in it’s measurements but this is not very likely. Even if there are differences in the measurements of each system it is important that the measurements give the same result at each measurement. If this is the case any changes in the DUT will be detected since it will give worse value. 9.3 Calculated tolerances 65

9.3 Calculated tolerances

In any analog system the signals are distorted and since the VSH is used to measure the distortions in a set-top box the internal distortions in the VSH needs to be low. It is also important to know what the limits of the system are since this need to be taken into consideration during the evaluation of any measurement result. Many parts of the VSH have been tested in the previous thesis and therefore these don’t need to be measured. However the software will also affect the result during different parts of the measurements and this needs to be calculated.

9.3.1 Levels During the analog sampling a non-linear distortion is added to the signal and at the worst case this distortion has been calculated to 0,007 % [Löf08, p. 45]. This distortion is in the digital representation of the analog value. The digital representation is between 0 and 4095 of the real analog value caused by the ADC using 12 bits. In order to do any measurements on the analog values the digital value needs to be converted into an analog value again. Since this part was not included in the previous thesis, the system needed to be measured in order to map the analog values to the digital representation. This measurement was conducted by inputing different DC-levels into the VSH and sampling the signal. After the signal had been sampled the correlation between analog values and digital values could be found for each channel. However since this conversion is not completely exact it will add a small dis- tortion to the converted analog signal, this distortion has been calculated to 0,64 mV. The previously described distortion of 0,007 % in the digital representation is equal to a worst case of 0,14 mV. If both these values are combined the maximum distortion is 0,78 mV or 0,038 %.

9.3.2 Noise and crosstalk The VSH has a theoretic SNR of 73,8 dB but in a simulation this value was found to be affected by phase noise from the PLL lowering the value to 72,48 dB [Löf08, p. 44]. The noise is also affected by crosstalk from other channels. For low frequen- cies on the other channels the crosstalk will be as low as -64,8 dB but for high frequencies the value might go up to -58,2 dB [Löf08, p. 45].

9.3.3 Time Since the VSH uses a 100 MHz clock to sample values from the analog signals any two samples will have a minimum of 10 nS between them. Since this is the lower limit of the system any time measurements will be within ±10 ns.

Chapter 10 Conclusion

In this chapter a final conclusion is given of the investigation, design and imple- mentation during this thesis. Some advice for further development is also given and some final thoughts about the whole thesis are given.

10.1 Results

A fully functional analog video signal quality measurement system has been devel- oped and in section 9.2 a comparison between the final system and a commercial product has been made. During this evaluation it has been found that most measurements are within good levels except two measurements that were a bit dif- ferent compared to the commercial product. The non-linear measurement values and the multiburst amplification have a bit to high values when compared to the commercial product. These differences in measurement values might be due to differences in the implementation of the measure methods in the two systems and not due to the fact that there is an error in the system developed. If the system is used more as an overview of the signal quality in the DUT rather than looking at specific measurements the values are very good. However most of the measurements of the system are very good and the system can therefore be used even when looking at specific measurements, as long as the differences are taken into consideration when the measurement values are evaluated.

10.2 Subjective measurements

The measurements by the system in this thesis are performed on the full analog video signal and not only the actual video data. The video signal does however affect the video image but for the current measurement method subjective mea- surements methods will not be suitable. If a measurement method for checking only the quality of the video image data is required a subjective assessment or an

67 68 Conclusion objective perceptual measurement could be considered as a complement to simple objective measurements. No current objective perceptual measurement is better than subjective assessment for all types of video. However one objective perceptual measurement is known to be better than PSNR with a correlation to subjective assessment of 94 % compared to 70 %.

10.3 Performance

Since the system has been developed with measurement quality as primary focus the speed might have been sacrificed during the implementation. A full measure- ment with all measurement methods on a modern computer will take less than two minutes and that can still be considered quite good. If only one measurement method is tested the measurement will be much faster and take only a few seconds.

10.4 Scalability

The system has been developed with scalability and further development in mind. If for example more measurement methods need to be added the integration work will be very small. The GUI is also removable if another type of interface is required in the future. This feature might be useful if the system is integrated into an automatic test system or as a part of another program.

10.5 Further work

Many additional features of the system have been found during the development but due to time limitations these have not been included. Here, a few of these are discussed as examples for further development.

10.5.1 Measurement methods A few more measurement methods could be included into the program such as a cross-talk measurement described in section 5.3.10 because this will give an indication of how well the system keeps each channel separated. Another measurement method that should be included is the channel delay measurement but this could not be implemented due to limitations in the hard- ware. A hardware with a higher sampling rate would be needed in order to use this method since the current sampling rate is too low.

10.5.2 GUI The GUI could be further developed by combining the result window into the main GUI and use some way to switch between the graph view and the result view. This would probably give a better overview than the current system with two windows. It would also minimize the complexity of the system since only one thread would be needed for the GUI. 10.6 Final thoughts 69

The current graph in the GUI used to view the current line signal sampled in the VSH is quite simple and could be replaced with a more advanced graph. One feature could be to enable better zoom, scrolling and selection of specific samples. Other features could include normal oscilloscope measurements such as level, time, frequency, period, rise and fall time etc. These measurements could be selected and performed in the GUI by the user. This would give the system even more use since manual measurements could be made in the system. Since many measurements create sets of complex data such as the FFT another part of the GUI could be constructed to view these sorts of data in a graph for simpler overview.

10.5.3 Measurement reports One further development of the system would be to create better measurement reports. In the current system a comma-separated file can be created from the measurement results. A further development might be to create and save in differ- ent formats such as pdf, html etc. Even the content could be changed to contain more information about the measurements and the tolerance of each measurement.

10.6 Final thoughts

Even if the sampling system compares very well to the commercial product it is not a perfect system. However any system dealing with analog signal will have errors in it and the important thing to consider is that the system gives the same result over and over so it can be used as a reference. If any errors are created in the DUT during it’s development this must be noticed by the measurement system. The system developed can be considered good since it is found to be stable during measurements and this makes it usable as a reference when comparing different versions of a DUT. What has a start must have an end. With these words I would like to once more thank all the people who helped me during this master thesis.

Bibliography

[Cor09] Microsoft Corporation. About messages and message queues. http:// msdn.microsoft.com/en-us/library/ms644927(VS.85).aspx, 2009. [Online; accessed 2-Feb-2009].

[EGV02] Ralph Johnson Eric Gamma, Richard Helm and John Vlissides. Design Patterns - Elements of Reusable Object-Oriented Software. Addison- Wesley, 1st edition edition, October 2002.

[FF04] Eric Freeman and Elisabeth Freeman. Head First Design Patterns. O’reilly, 1st edition edition, October 2004.

[Fou08] Free Software Foundation. GNU lesser general public license. http: //www.gnu.org/licenses/lgpl.html, August 2008. [Online; accessed 14-Jan-2009].

[Glo01] Glossary: Video terms and acronyms. http://www.tek.com/ Measurement/App_Notes/25_15215/eng/, Tektronix, 2001. [Online; accessed 15-Jan-2009].

[Ins07] National Instruments. Video signal measurement and generation funda- mentals. http://zone.ni.com/devzone/cda/tut/p/id/4750, January 2007. [Online; accessed 22-Jan-2009].

[ITU90] Transmission performance of television circuits designed for use in in- ternational connections. Technical report, ITU, June 1990. ITU Rec- ommendation J.61.

[ITU01] Objective perceptual video quality measurement techniques for digital cable television in the presence of a full reference. Technical report, ITU, 2001. ITU Recommendation J.144.

[ITU02a] Methodology for the subjective assessment of the quality of television pictures. Technical report, ITU, 2002. ITU Recommendation BT.500- 11.

71 72 Bibliography

[ITU02b] ITU. Parameter values for the HDTV* standards for production and international programme exchange. Technical report, ITU, 2002. REC- OMMENDATION ITU-R BT.709-5. [ITU07] Studio parameters of 625 and 525 line progressive television systems. Technical report, ITU, 2007. RECOMMENDATION ITU-R BT.1358- 1. [Jac01] Keith Jack. Video Demystified - A handbook for the Digital Engineer. LLH Technology Publishing, Eagle Rock, VA 24085, 3rd edition edition, 2001. [Joh07] Stefan Johansson. FPGA implemented solutions for an IPTV set-top- box functional tester. Master’s thesis, Linköping University, 11 2007. [JPS02] Yvonne Rogers Jennifier Preece and Helen Sharp. Interaction design: beyond human–computer interaction. John Wiley and Sons, Inc, 1st edition edition, 2002. [Löf08] Henrik Löfgren. Construction of an FPGA based HD-video measure- ment system. Master’s thesis, Linköping University, 09 2008.

[Mat] The MathWorks. Matlab R - the language of technical computing. http: //www.mathworks.com/products/matlab/. [Online; accessed 12-Nov- 2008]. [PAL99] PAL systems - television measurements. http://www.tek.com/ Measurement/App_Notes/25_7075/eng/25W_7075_3.pdf, Tektronix, September 1999. [Online; accessed 30-Jan-2009]. [RR06] Wu Hong Ren and Rao Kamisetty Ramamohan. Digital video image quality and perceptual coding. CRC/Taylor and Francis, 2006. [Sch69] Hans Schmid. How to determine the 2T pulse K factor of TV facili- ties without the aid of an oscilloscope graticule. IEEE transactions on broadcasting, vol. bc-15, no. 1, IEEE, March 1969. [Sil09] Robert Silva. HDTV FAQs - what is the difference between digital tv and analog tv? http://hometheater.about.com/cs/beforeyoubuy/ a/aahdarcfaq1a.htm, 2009. [Online; accessed 29-Jan-2009]. [SMP01] 1280 x 720 progressive image sample structure - analog and digital repre- sentation and analog interface. Technical report, SMPTE, 2001. SMPTE 296M-2001. [SMP08] 1920 x 1080 image sample structure, digital representation and digital timing reference sequences for multiple picture rates. Technical report, SMPTE, 2008. SMPTE 274M-2008. [Tek07] Tektronix. Automated video measurement set: VM6000. http://www2. tek.com/cmswpt/psdetails.lotr?ct=PS&ci=13385&cs=psu&lc=EN, October 2007. [Online; accessed 19-Jan-2009]. Bibliography 73

[Wat87] Andrew B. Watson. The cortex transform: Rapid computation of simu- lated neural images. Comput. Vision Graph. Image Process., 39(3):311– 327, 1987. [Wir08] Business Wire. Strategy analytics: US IPTV revenues to hit $13.7 bil- lion in 2012. http://findarticles.com/p/articles/mi_m0EIN/is_ 2008_March_4/ai_n24362087, March 2008. [Online; accessed 3-Oct- 2008].

[WM08] Stefan Winkler and Praveen Mohandas. The evolution of video quality measurements from PSNR to hybrid metrics. http://ieeexplore. ieee.org/stamp/stamp.jsp?arnumber=04550731, IEEE, Symmetri- com, San Jose, CA 95131, September 2008. [Online; accessed 2-Feb- 2009].

Appendix A Glossary

ADC Analog-to-Digital Converter, a device used to convert contin- uous analog signals to a discrete digital signals.

CRT Cathode Ray Tube, an old type of television.

CSF Contrast Sensitivity Function, a part of the HVS which shows a correlation between the spatial frequency and the perceived contrast. See section 3.4.4.

CVBS Color Video Blank and Sync, an analog video signal with all video parts in one signal. See section 2.8.1.

DSCQS Double-Stimulus Continuous Quality-Scale, a subjective as- sessment method. See section 3.3.3.

DSIS Double-Stimulus Impairment Scale, a subjective assessment method. See section 3.3.2.

DUT Device Under Test, the system tested in some way, for exam- ple a DVD, VHS or STB.

DVD Digital Versatile Disc or Digital Video Disc, is a disk-based video system.

EDTV Enhanced Definition Television, low resolution signals with progressive scanning instead of interlaced scanning. See sec- tion 2.7.1.

FFT Fast Fourier Transform, a fast method used to convert discrete signals from the time domain to the frequency domain.

75 FPGA Field-Programmable Gate Array, a programmable logic circuit.

GUI Graphical User Interface, is an interface that allows the user to interact with a program.

HDTV High Definition Television, high resolution signals. See sec- tion 2.7.1.

HVS Human Visual System, a part of the central nervous system allowing humans to see.

ITU International Telecommunication Union, a international orga- nization that establish standards for international radio and telecommunications.

K2T A type of measurement used to measure short-time distor- tions. See section 7.8.6.

LGPL GNU Lesser General Public License, a free software license that enables open source software applying the license to be used in both free and commercial products.

MFC Microsoft Foundation Classes, a library that wraps some parts of the windows API in C++ classes.

MSE Mean Squared Error, a value calculated to compare the qual- ity of two images.

MSPS Mega Samples Per Second

NTSC National Television System Committee, an analog video sys- tem used in US etc. for television. See section 2.6.1.

PAL Phase Alternating Line, analog video system used in Europe etc. for television. See section 2.6.2.

PCB Printed Circuit Board, a board used to support and connect electronic components.

PLL Phase-locked loop, a system used to increase the frequency of a clock signal.

PSNR Peak Signal-to-Noise Ratio, a value calculated to compare the quality of two images.

RCA Radio Corporation of America, a type of electric connector used for audio and video signals.

76 RGB Red Green Blue color space, see section 2.5.1.

RMS Root Mean Square, a measurement method giving a magni- tude of a positive and negative signal. See section 7.8.2.

SCART Syndicat des Constructeurs d’Appareils Radiorécepteurs et Téléviseurs, a type of cable used for composite and RGB. See section 2.8.3.

SDSCE Simultaneous Double Stimulus for Continuous Evaluation, a subjective assessment method. See section 3.3.5.

SDTV Standard Definition Television, low resolution signals with in- terlaced scanning. See section 2.7.1.

SECAM Sequentiel Couleur Avec Mémoire or Sequential Color with Memory, analog video system used in Europe etc. for televi- sion. See section 2.6.3.

SNR Signal-to-Noise Ratio, a measurement of the ratio between signal power and the disturbing noise power. See section 7.8.2.

SRAM Static random access memory, a type of semiconductor memory.

SSCQE Single Stimulus Continuous Quality Evaluation, a subjective assessment method. See section 3.3.4.

STB Set-top box is a device connected to an external signal source, such as the Internet, converting these signals into signals un- derstood by a television.

USB Universal Serial Bus, a standardized high speed serial data buss for connecting units to a computer.

VHS Video Home System, an old cassette-based video system.

VQEG Video Quality Experts Group, is a group of experts in the field of video quality assessment.

VSH Video Sampling Hardware, a custom hardware developed in two an earlier theses. See section 4.2.

YCbCr Similar to YPbPr but for digital signals, see section 2.5.4.

YIQ Similar to YUV but with different color parts, see sec- tion 2.5.3.

77 YPbPr Similar to YUV but scaled to use more signal amplitude, see section 2.5.4.

YUV A color space used to separate luminance and color, see sec- tion 2.5.2.

78