[4 of 6] The Advantage of ‘Build-To-Lossless’

The feature ‘Build to  Lossless’ promises better interactivity at lower bandwidth consumption and pixel perfect quality. Starting with Citrix 7.18, when the user sets a policy for visual quality to ‘Build to lossless’, H.264 or H.265 is used instead of JPEG right after user interaction which forms the bulk of response. This is followed up with smaller updates to the screen resulting in ‘sharpening’ of the desktop image.

The use-case

This feature provides superior image quality in situations where there are constrains on available bandwidth. It can be best leveraged when users are working with transient content. As we have seen in earlier parts in this blog series, the choice of YUV 4:2:0 can result in distortion in text and also for content with fine lines. Choosing YUV 4:4:4 improves image quality significantly but at the cost of more bandwidth utilization. However, users can get even better image quality at lower bandwidth utilization by enabling visual quality to build to lossless.

How it works

We can enable the feature by setting the following policies in studio:

  • Optimize for 3D graphics workload ->Enabled
  • Enable this policy to use NVFBC (NVIDIA Direct FB access) and also NVENC (NVIDIA Encoding).
  • Use video codec for compression -> For the entire screen
    Visual Quality ->Build to Lossless
  • Use hardware encoding ->Enabled



During a user session, content such as a 3D model, video or as simple as users scrolling spreadsheet, is initially displayed at low quality to improve overall interactivity. Once the user input has stopped, the screen is updated with transient images that are smaller in size that results in sharpening of the image to a point that it is lossless.

Image Quality

We set out to measure the image quality offered by the build to lossless feature. Like before, we will use multi-scale structural similarity index (SSIM) to measure color accuracy of the received image on endpoint compared to the one displayed by VDI desktop. Let’s take a look at our “quick brown fox” image comparison with visual quality set to ‘build to lossless’.

As you can see from the heatmap and SSIM score, the image on client side is 99.99% identical to the one rendered on VDI desktop.

If we compare SSIM heatmaps between H.264 YUV4:2:0, H.264 YUV 4:4:4 and H.264 YUV 4:2:0 with build to lossless, setting visual quality to build to lossless gives us the best possible image quality.

We can also set visual quality to ‘Build-to-lossless’ in combination with H.265 codec. Additional policy settings need to be in place in order to enable H.265 video codec. For details on H.265, you may refer to part 3 of this blog series. Similar to H.264 and as evidenced by the heatmap image and SSIM index comparison below, the build to lossless provides near perfect image quality irrespective of the choice of video codec.

Considering the observed data, it is safe to conclude that ‘Build to lossless’ feature indeed gives us near lossless image quality in case of static images.

Bandwidth consumption

Let’s go to other extreme and evaluate with a 720p video playback in windowed mode. This will tell us the ramifications on bandwidth consumption.

CODEC Visual Quality Encoder CPU Total FPS MB transferred
Bitmap JPG/RLE Medium 7% 3693 355MB
H.264 YUV420 Medium 2% 3736 220MB
H.264 YUV444 Medium 3% 3728 655MB
H.264 Build To lossless 5% 3642 195MB
Bitmap JPG/RLE High 8% 3633 610MB
H.264 YUV420 High 2% 3719 210MB
H.264 YUV444 High 4% 3716 690MB

Table 1: Bandwidth comparison between Bitmap Codec, H.264 Video codec with BTL off and H.264 Video codec with BTL on

As seen in the table above, we use bandwidth utilization resulting from bitmap codec as our baseline. Using H.264 video codec and ‘build-to-lossless’ results in about 45% savings in bandwidth compared to bitmap codec. A comparison with H.264 YUV 4:2:0 with visual quality set to medium shows slightly reduced bandwidth utilization ranging to about 11%. The biggest difference is observed when H.264 YUV 444 is used as video codec. In this case, build to lossless demonstrates a whopping 70% savings in bandwidth utilization.

Now, consider if visual quality is set to ‘high’ instead of ‘medium’. The bitmap codec now uses about 72% more network bandwidth. In this context, the advantage of build to lossless is even more.  The bandwidth savings with H.264 YUV 4:2:0 and H.264 YUV 4:4:4 are about the same as when visual quality is set to ‘medium’.

Using H.264 as video codec with visual quality set to ‘Build to lossless’ gives us the most efficient use of available network bandwidth.

CODEC Visual Quality Encoder CPU Total FPS MB transfered
Bitmap JPG/RLE Medium 7% 3693 355MB
H.265 YUV420 Medium 2% 3766 180MB
H.265 Build To Lossless 5% 3796 175MB
Bitmap JPG/RLE High 8% 3633 610MB
H.265 YUV420 High 3% 3780 185MB

Table 2: Bandwidth comparison between Bitmap Codec, H.265 Video codec with BTL off and H.265 Video codec with BTL on

H.265 with ‘build to lossless’ yields about 50% lower bandwidth utilization when compared with Bitmap codec with visual quality set to ‘medium’. When the visual quality is set to ‘High’, bitmap codec uses much more network bandwidth. Thus, we get about 71% savings in bandwidth utilization. Compared to H.265 YUV 4:2:0, the bandwidth utilization is marginally lower irrespective of visual quality setting.

H.265 combined with visual quality set to Build to lossless provides us best possible utilization of network bandwidth and image quality.

While ‘build to lossless provides the user with the lower bandwidth consumption and better image quality, users may need to get used to the ‘sharpening effect’. It occurs when user is idle and the image on the screen reaches an optimal image quality with transient updates. This is the best possible compromise between visual quality, performance and bandwidth consumption which finally leads to the best achievable user experience.

If you would like to view the on demand recording of our GTC session on choosing the right protocol for your VDI environment , click here

About the Author

Leave a Reply

Your email address will not be published. Required fields are marked *