##Updated 09/18/2016 – New Video pass-through option for PMP >= 1.1.3

##Updated 05/11/2016 – Hardware decoding now usable for PMP >= 1.0.3

#Intro

Setting proper video levels in your video chain from Plex --> GPU --> TV is paramount to getting the best possible picture quality but the hows and whys are often a mystery. This tutorial aims to demystify what actually happens when you change video level settings. After reading this tutorial you should not only have a good understanding of what video level settings are best for your application but more importantly the why behind it.

#A Crash Course On color spaces

Video content made for consumption on a television are encoded in the Y’CbCr color space. As it turns out, our eyes are much more sensitive to changes in the brightness of an image (a fully de-saturated Black & White image) than they are to changes to the color of an image. This means that color information (the Cb & Cr components) can be compressed at a much higher rate compared to the brightness information (the Y’ component) with little to no loss in perceived picture quality with a significant reduction in storage space and bandwidth.

Although Y’CbCr is great for encoding color information for storage and transmission, it cannot be used to display that information; for that we need to convert to another color space called RGB. If you were to magnify the pixels of your TV you would see that each pixel is actually made up of three smaller sub-pixels: Red, Green and Blue. When each of these three sub-pixels are driven to various intensities, our brain combines them to visualize a single unique color – this is called an additive color system. The actual math to convert from the Y’CbCr to RGB color space is beyond the scope of this tutorial as it involves a matrix transformation who’s coefficients are defined by standards such as BT.709 for HDTV.

#Limited vs Full Video Levels

Now that we have a preliminary understanding of color spaces, lets talk about video levels. Video levels are 8bit values and thus range from values 0 - 255. TV video content is completely contained within the range 16 - 235 and we call this limited range. Anything from level 16 and below is treated as pure black (often called blacker-than-black) and anything from 235 - 255 is treated as pure white (often called whiter-than-white.) In contrast, PC’s generate video content using the Full 0-255 range where pure black is level 0 and pure white is level 255. When attempting to play limited TV video content on a PC that uses Full video levels (such is an HTPC), we can get undesirable results if we set our video levels incorrectly – such as complete loss of shadow detail (aka crushed blacks) or conversely really washed out colors.

The 8 images below show all the possible combinations of Full or Limited video levels in the chain from Plex --> GPU --> TV. After the images are tables that summarize the results and offer advice on the combination that should be used for your application. Note that the happy face was added so you can better visualize the scaling that may occur.

##Notable Occurences

Setting Plex to Full causes a color space transformation from Y’CbCr to RGB and the video levels are expanded from 16-235 to 0-255 – WtW & BtB are clipped in the process

Setting Plex to Limited causes only a color space transformation from Y’CbCr to RGB, video levels are kept as-is

Setting GPU to Full leaves the incoming video untouched, i.e. pass-through

Setting GPU to Limited causes the video to compress from 0-255 to 16-235

Setting your TV to Full or Limited defines where the TV expects Reference Black and Reference White to be: 0/255 for the former and 16/235 for the latter.

##Summary of Results

Full, Full, Full – Video Level CORRECT : WtW & BtW Clipped, Single scaling

Full, Full, Limited – Video Level WRONG : Crushed Blacks

Full, Limited, Full – Video Level WRONG : Washed Out Colors

Full, Limited, Limited – Video Level CORRECT : WtW & BtW Clipped, Double scaling

Limited, Full, Full – Video Level WRONG : Washed Out Colors

Limited, Full, Limited – Video Level CORRECT : WtW & BtB preserved, Zero scaling

Limited, Limited, Full – Video Level WRONG : Extreme Washed Out Colors

Limited, Limited, Limited – Video Level WRONG : Washed Out Colors

##Which Combination to Use

Out of the eight combinations, only three have correct video levels by the time they reach the TV:

Full,Full,Full – Both Desktop & Video Content will look correct but video content is also scaled during the Y’CbCr --> RGB color space transformation. BtB & WtW are clipped so calibration will be more difficult Full, Limited, Limited – This should be avoided since there are two levels of scaling which will likely cause unnecessary banding. Limited, Full, Limited – Best option for embedded video player as there is zero video content scaling during the Y’CbCr --> RGB color space transformation. BtB & WtW are preserved to make calibration easier. If using a Desktop it will look overly dark

#Pulling it All Together with Calibration

Go get the free AVSHD709 calibration media from HERE.

Make sure to grab the MP4 version and create a new Plex LIBRARY and call it ‘Calibration.’ Unzip the MP4 calibration videos into a top-level directory and point your Calibration library at it. Sort your Calibration library by ‘Folder’ otherwise it will look like a mess. If all you want to do is basic calibration: Video Levels (brightness/contrast), overscan, picture & tint then just keep the ‘Basic Calibration’ folder as well as the ‘Misc Patterns’ folders, especially the ones that have the grayscale ramps (smooth & step.) The one important thing this awesome calibration disk is missing is Audio sync test patterns. Fortunately you can find two great free ones HERE. Make sure to get the MP4 versions. If you used the Limited -> Full -> Limited combination (and disabled hardware decoding) you can verify everything is working by playing the Black Clipping Pattern and verifying that you can get levels below 16 to flash when you raise your TV’s brightness setting.

#Plex Media Player for Embedded Targets Configuration