VQ Analyzer — Guided Tour. “YUV Viewer” functionality.

Julia Kulygina
Nov 21 · 5 min read
VQ Analyzer ver.4.2. Overview.
VQ Analyzer ver.4.2. Overview.
pic 1. VQ Analyzer ver.4.2. Overview.

I bet you’ll agree with me that it’s worth to visit unknown interesting places. Especially if you are guided by experienced locals.

By this article, we are starting our series VQ Analyzer (Video Codec Analyzer) — Guided Tour! Where we will describe some very interesting but not obvious features of our video bitstream analyzer.

A few words about the VQ Analyzer itself.

The VQ Analyzer is a graphical video bitstream analysis tool, supporting the following video coding standards:

  • HEVC: (ISO/IEC 23008–2 MPEG-H Part 2 or ITU-T H.265), 8/10-bit;
  • HEVC: RExt extension, 8/10/12-bit, 4:0:0/4:2:0/4:2:2/4:4:4;
  • HEVC: SCC extension, conform to HM + SCM 8.6 in reference code;
  • HEVC Scalable/Multiview Extension;
  • AV1, SHA-1 (Version 1.0.0 Errata.1): add4b15580e410c00c927ee366fa65545045a5d9;
  • Google’s VP9, profiles 0,1,2,3, 4:2:0/4:2:2/4:4:0/4:4:4, 8/10/12-bit;
  • AVC: (H.264/AVC, ISO/IEC 14496–10, MPEG-4 Part 10);
  • MPEG2 (ISO/IEC 13818–2 Part 2), 4:2:0/4:2:2, 8-bit;
  • and containers: MKV, MP4, MMT(ARIB STD-B60 1.0), MPEG2 TS/PS, AVI, ASF, FLV, IVF.

Once a bitstream is loaded, the tool allows you to inspect each major step of the decoding process. You can analyze any syntax element graphically and numerically. Each structure of the coded image can be explored. The tool can be used not only for a production purpose when you debug a developed encoder or decoder. Owing to the VQ Analyzer has extensive visualization ability it can be a great source and reference tool for studying any video codec standards such as HEVC/H.265, VP9, AVC/H.264, MPEG2, AV1, and sooner VVC which will be supported by VQ Analyzer early in 2020.

So. Let’s start our tour!

Our guide for today is Julia Kulygyna one of the software engineers who create and maintain VQ Analyzer. And today’s tour will be into the YUV Viewer.

YUV Viewer

It is part of the VQ Analyzer project and is designed to work with YUV files. In the future, we will talk about the YUV Viewer and mean it precisely as one of the VQ Analyzer modules.

Opening YUV file

YUV Viewer allows you to view various types of raw YUV data. Just drag and drop your YUV file into Analyzer or go through the File menu “Open Bitstream…” item.

VQ Analyzer ver.4.2 Opening YUV file.
VQ Analyzer ver.4.2 Opening YUV file.
pic 2. VQ Analyzer ver.4.2. Opening the YUV file.

When loading a YUV file, VQ Analyzer will try to guess the height and width by file name. If the file name does not specify the width and height, then VQ Analyzer will prompt you to enter stream parameters, such as width, height, color format, plane order, chroma order, bit depth, bits per value. You can set the width and height using the “Select predefined value” item.

VQ Analyzer ver.4.2. Opening the YUV file, choosing the width and height of YUV.
VQ Analyzer ver.4.2. Opening the YUV file, choosing the width and height of YUV.
pic 3. VQ Analyzer ver.4.2. Opening the YUV file, choosing the width and height of YUV.

General information

Upon loading the YUV file with the selected parameters, you will see the main panel of the VQ Analyzer.

VQ Analyzer can display general information about the YUV file in the Selection Info section.

VQ Analyzer ver.4.2. YUV Viewer default mode, Selection (General) Info of the YUV file.
VQ Analyzer ver.4.2. YUV Viewer default mode, Selection (General) Info of the YUV file.
pic 4. VQ Analyzer ver.4.2. YUV Viewer default mode, Selection (General) Info of the YUV file.

Unit Info

The Unit Info section displays the contents of the file in a hex view, which can be changed to a bin view. Yellow background highlights currently selected block showing start bit position on the first select byte and end bit position on the last selected byte in luma plane.

VQ Analyzer ver.4.2. YUV Viewer default mode, Unit Info of the YUV file
VQ Analyzer ver.4.2. YUV Viewer default mode, Unit Info of the YUV file
pic 5. VQ Analyzer ver.4.2. YUV Viewer default mode, Unit Info of the YUV file.

You can change from Hex to Binary presentation of the data in the Unit Info section.

VQ Analyzer ver.4.2 YUV Viewer default mode, Unit Info. Hex/Binary block presentation for the YUV file.
VQ Analyzer ver.4.2 YUV Viewer default mode, Unit Info. Hex/Binary block presentation for the YUV file.
pic 6. VQ Analyzer ver.4.2 YUV Viewer default mode, Unit Info. Hex/Binary block presentation for the YUV file.

Grid Map

YUV Viewer has one mode — YUV, and three overlay maps: Grid map, PSNR map, and SSIM map.

VQ Analyzer ver.4.2. YUV Viewer default mode, Grid map.
VQ Analyzer ver.4.2. YUV Viewer default mode, Grid map.
pic 7. VQ Analyzer ver.4.2. YUV Viewer default mode, Grid map.

By default, a grid map is displayed in the VQ Analyzer, which allows you to view each frame in a dynamic grid with a block size of 4 × 4 to 128 × 128.

To change Grid (Block size) just change the Depth of deblocking. Depth 0 refers to the highest block size of 128 x 128. And Depth level 5 refers to the minimum block size 4 x 4.

VQ Analyzer ver.4.2. YUV Viewer default mode, Changing the Grid size (Depth level).
VQ Analyzer ver.4.2. YUV Viewer default mode, Changing the Grid size (Depth level).
pic 8. VQ Analyzer ver.4.2. YUV Viewer default mode, Changing the Grid size (Depth level).

To open a Detailed view of the block right-click on the mouse button and do the same to go back to block the view.

VQ Analyzer ver.4.2. YUV Viewer default mode, Detailed view of the block.
VQ Analyzer ver.4.2. YUV Viewer default mode, Detailed view of the block.
pic 9. VQ Analyzer ver.4.2. YUV Viewer default mode, Detailed view of the block.

Debug YUV

To open a debug YUV file click to YUVDiff -> Debug YUV… and choose a YUV file that you want to be a debug.

VQ Analyzer ver.4.2. YUV Viewer default mode, Opening a debug YUV.
VQ Analyzer ver.4.2. YUV Viewer default mode, Opening a debug YUV.
pic 10. VQ Analyzer ver.4.2. YUV Viewer default mode, Opening a debug YUV.

When loading a debug YUV file, in the grid map the red circles show the differences between debug YUV file and reference YUV file. Debug YUV is displayed on the window, which can be switched using the buttons on the bottom panel to Ref YUV and Diff YUV.

VQ Analyzer ver.4.2. YUV Viewer default mode, when a debug YUV file is loaded.
VQ Analyzer ver.4.2. YUV Viewer default mode, when a debug YUV file is loaded.
pic 11. VQ Analyzer ver.4.2. YUV Viewer default mode, when a debug YUV file is loaded.

You can remove the display of differences between YUV files by unchecking the checkbox Block Info in the bottom Info panel, where you can configure other layers, such as the picture boundary, block grid, block split grid, pixel grid.

VQ Analyzer ver.4.2. YUV Viewer default mode, Info layers settings.
VQ Analyzer ver.4.2. YUV Viewer default mode, Info layers settings.
pic 12. VQ Analyzer ver.4.2. YUV Viewer default mode, Info layers settings.

PSNR & SSIM metrics

When loading debug YUV, Info Overlays opens up new possibilities for displaying the PSNR map and SSIM map.

VQ Analyzer ver.4.2. YUV Viewer PSNR mode with loaded debug YUV.
VQ Analyzer ver.4.2. YUV Viewer PSNR mode with loaded debug YUV.
pic 13. VQ Analyzer ver.4.2. YUV Viewer PSNR mode with loaded debug YUV.

Grids in these PSNR & SSIM modes are also dynamic, and values when resizing grid blocks are recalculated.

VQ Analyzer ver.4.2. YUV Viewer PSNR mode with loaded debug YUV.
VQ Analyzer ver.4.2. YUV Viewer PSNR mode with loaded debug YUV.
pic 14. VQ Analyzer ver.4.2. YUV Viewer PSNR mode with loaded debug YUV.
pic 15. VQ Analyzer ver.4.2. YUV Viewer SSIM mode with loaded debug YUV.

Awesome!

We hope this guided tour was interesting and useful. Shortly we will create the next tour about features of VQ Analyzer.

vicuesoft-techblog

ViCueSoft.com Technology Blog

Julia Kulygina

Written by

Software Engineer at ViCueSoft.com

vicuesoft-techblog

ViCueSoft.com Technology Blog

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade