<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Roman Guskov on Medium]]></title>
        <description><![CDATA[Stories by Roman Guskov on Medium]]></description>
        <link>https://medium.com/@roman.guskov?source=rss-2ce786ec0b81------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*2A7Ix9hASHtfZDG_FuvI1g.jpeg</url>
            <title>Stories by Roman Guskov on Medium</title>
            <link>https://medium.com/@roman.guskov?source=rss-2ce786ec0b81------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 16:30:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@roman.guskov/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Adaptive Loop Filter]]></title>
            <link>https://medium.com/vicuesoft-techblog/adaptive-loop-filter-a49fe3d3f733?source=rss-2ce786ec0b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/a49fe3d3f733</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[videos]]></category>
            <category><![CDATA[vvc]]></category>
            <category><![CDATA[compression]]></category>
            <category><![CDATA[alf]]></category>
            <dc:creator><![CDATA[Roman Guskov]]></dc:creator>
            <pubDate>Thu, 25 Feb 2021 15:02:48 GMT</pubDate>
            <atom:updated>2021-02-25T15:02:48.002Z</atom:updated>
            <content:encoded><![CDATA[<p>Welcome to our new article about Versatile Video Coding!</p><figure><img alt="pic 1. VQ Analyzer ver.5.6. Overview." src="https://cdn-images-1.medium.com/max/1024/1*PABpFQdtIiah7eRmOy9-dA.png" /><figcaption>pic 1. VQ Analyzer ver.5.6. Overview.</figcaption></figure><p>VVC, also known as H.266, MPEG-I Part 3, is the new video compression standard developed by the Joint Video Experts Team (JVET), that is a united video expert team of the MPEG working group of ISO/IEC JTC 1, and the VCEG working group of ITU-T.</p><p>Today we will consider in more detail one of in-loop filtering coding tools — Adaptive Loop Filter. Before we go any further you can take a quick look at our overview <a href="https://medium.com/vicuesoft-techblog/vq-analyzer-guided-tour-in-loop-filtering-da04c311e60d">article about filtering in VVC</a>.</p><h3><strong>Introduction</strong></h3><p>Adaptive Loop Filter (ALF) is one of in-loop filtering techniques from VVC. The main aim of VVC is to improve compression efficiency of the H.265/HEVC standard by 30–50% compression rate for the same perceptual quality.</p><p>The filter is adaptive in the sense that the coefficients are signaled in the bitstream and can be designed based on image content and distortion of the reconstructed picture. ALF is applied to reduce distortion introduced by the encoding process and improve the reconstructed quality.</p><h3>Block classification</h3><p>The main idea of ALF is to apply a classification to partition a set of all sample locations into multiple classes. After that, Wiener filters are calculated and applied for each class.</p><figure><img alt="pic 2. VQ Analyzer ver.5.6. Adaptive Filter Mode. Filter Idx for Luma and Chroma components" src="https://cdn-images-1.medium.com/max/825/1*Vcrpt3_koh4B95LrFuolBQ.png" /><figcaption>pic 2. VQ Analyzer ver.5.6. Adaptive Filter Mode. Filter Idx for Luma and Chroma components</figcaption></figure><p>Two diamond filter shapes are used. The 7×7 diamond shape is applied for luma component and the 5×5 diamond shape is applied for chroma components.</p><figure><img alt="pic. 3. ALF filter shapes (chroma: 5×5 diamond, luma: 7×7 diamond)" src="https://cdn-images-1.medium.com/max/329/0*t9Ko7X5AMOGC3gIM" /><figcaption>pic. 3. ALF filter shapes (chroma: 5×5 diamond, luma: 7×7 diamond)</figcaption></figure><p>For luma components, each 4x4 block is categorized into one out of 25 classes. The classification index is derived based on its directionality and a quantized value of activity, which is computed, involving calculation of gradients in four directions for the reconstructed luma samples.</p><figure><img alt="pic. 4. Classification in ALF based on gradient calculations in vertical, horizontal, and diagonal directions." src="https://cdn-images-1.medium.com/max/1024/1*kZk10-NBQVwJVNYvVSOb1g.png" /><figcaption>pic. 4. Classification in ALF based on gradient calculations in vertical, horizontal, and diagonal directions.</figcaption></figure><p>For chroma components in a picture, no classification method is applied.</p><h3>Geometric transformations of filter coefficients and clipping values</h3><p>Before filtering each 4×4 luma block, geometric transformations such as rotation or diagonal and vertical flipping are applied to the filter coefficients and to the corresponding filter clipping values depending on gradient values calculated for that block. This is equivalent to applying these transformations to the samples in the filter support region. The idea is to make different blocks to which ALF is applied more similar by aligning their directionality.</p><h3><strong>Filtering process</strong></h3><p>Each sample location is classified into one of four classes and filtered by diamond-shaped filter. All shadowed samples affect the filtering process of the center location.</p><figure><img alt="pic. 5. Illustration of filtering process" src="https://cdn-images-1.medium.com/max/868/1*58WuTDd-JbaMOUnZjUm-0g.png" /><figcaption>pic. 5. Illustration of filtering process</figcaption></figure><figure><img alt="pic. 6. VQ Analyzer ver.5.6. Adaptation details" src="https://cdn-images-1.medium.com/max/889/1*DIxvMmMYwLAY-nT_ZPm7HQ.png" /><figcaption>pic. 6. VQ Analyzer ver.5.6. Adaptation details</figcaption></figure><h3>Cross-component ALF</h3><p>Adaptive Loop Filter comprises luma ALF, chroma ALF and cross-component ALF (CC-ALF). The ALF filtering process is designed so that luma ALF, chroma ALF and CC-ALF can be executed in parallel.</p><p>CC-ALF, uses luma sample values to refine each chroma component by applying an adaptive, linear filter to the luma channel and then using the output of this filtering operation for chroma refinement.</p><p>CC-ALF filter selection is controlled at CTU-level for each chroma component. The design uses a 3x4 diamond shape with 8 taps.</p><p>The picture below provides a system level diagram of the CC-ALF process with respect to the SAO, luma ALF and chroma ALF processes.</p><figure><img alt="pic. 7. Placement of CC-ALF with respect to other loop filters" src="https://cdn-images-1.medium.com/max/296/0*fY3JxbH_oEeWD4ql" /><figcaption>pic. 7. Placement of CC-ALF with respect to other loop filters</figcaption></figure><figure><img alt="pic. 8. VQ Analyzer ver.5.6. Placement of CC-ALF with respect to other loop filters" src="https://cdn-images-1.medium.com/max/757/1*HHci-DyAwop0lMszvj0i_g.png" /><figcaption>pic. 8. VQ Analyzer ver.5.6. Placement of CC-ALF with respect to other loop filters</figcaption></figure><h3><strong>Conclusion</strong></h3><p>We did it! Thanks for reading and see you soon for new articles about filtering!</p><h3>References</h3><ul><li>Algorithm description for Versatile Video Coding and Test Model 11(VTM 11)</li><li>J. Erfurt, Wang-Q Lim, H. Schwarz, D. Marpe, T. Wiegand: <a href="https://www.cambridge.org/core/journals/apsipa-transactions-on-signal-and-information-processing/article/extended-multiple-featurebased-classifications-for-adaptive-loop-filtering/FA12FFFF18276D3AEE83D3601D4C66D0">Extended multiple feature-based classifications for adaptive loop filtering</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a49fe3d3f733" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vicuesoft-techblog/adaptive-loop-filter-a49fe3d3f733">Adaptive Loop Filter</a> was originally published in <a href="https://medium.com/vicuesoft-techblog">vicuesoft-techblog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VQ Analyzer — Guided Tour. In-loop filtering.]]></title>
            <link>https://medium.com/vicuesoft-techblog/vq-analyzer-guided-tour-in-loop-filtering-da04c311e60d?source=rss-2ce786ec0b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/da04c311e60d</guid>
            <category><![CDATA[vq-analyzer]]></category>
            <category><![CDATA[filtering]]></category>
            <category><![CDATA[video-encoding]]></category>
            <category><![CDATA[vvc]]></category>
            <dc:creator><![CDATA[Roman Guskov]]></dc:creator>
            <pubDate>Thu, 29 Oct 2020 15:03:24 GMT</pubDate>
            <atom:updated>2020-10-29T15:03:24.298Z</atom:updated>
            <content:encoded><![CDATA[<h3>VQ Analyzer — Guided Tour. In-loop filtering.</h3><p>Welcome to our new VQ Analyzer (Video Codec Analyzer) Guided Tour!</p><figure><img alt="pic 1. VQ Analyzer ver.5.4. Overview." src="https://cdn-images-1.medium.com/max/1024/1*5LiysRcuOqcxshgCSurw5g.png" /><figcaption>pic 1. VQ Analyzer ver.5.4. Overview.</figcaption></figure><p>Before we start, a few words about the VQ Analyzer itself.</p><p>The VQ Analyzer is a graphical coded video bitstream analysis tool, supporting the following coding standards:</p><ul><li>VVC, SHA-1 (VTM 10.0 tag): 45dfe06835aea43f37456ea54972ef31b765eacf</li><li>AV1, SHA-1 (av1-normative branch of AOM source): acc3f97753f67e0ce7290b98b7bb71152fe5e264</li><li>HEVC: (ISO/IEC 23008–2 MPEG-H Part 2 or ITU-T H.265) , 8/10-bit</li><li>HEVC: RExt extension, 8/10/12-bit, 4:0:0/4:2:0/4:2:2/4:4:4</li><li>HEVC: SCC extension, conform to HM + SCM 8.5 in reference code</li><li>HEVC Scalable/Multiview Extension</li><li>Google’s VP9, profiles 0,1,2,3, 4:2:0/4:2:2/4:4:0/4:4:4, 8/10/12-bit</li><li>AVC: (H.264/AVC, ISO/IEC 14496–10, MPEG-4 Part 10), except SVC/MVC</li><li>MPEG2 (ISO/IEC 13818–2 Part 2), 4:2:0/4:2:2, 8-bit</li><li>MKV container</li><li>MP4 container</li><li>MPEG2 TS/PS container</li><li>AVI container</li><li>Mpeg Media Transport container.</li></ul><p>Once a bitstream is loaded, the tool allows the user to inspect each major step of the decoding process visually and numerically, and the structure of the coded image can be explored. This data can be used as a visual reference when learning about HEVC/VP9/AVC/MPEG2/AV1/VVC or when debugging a particular encoder or decoder.</p><h3><strong>Introduction</strong></h3><p><strong>VVC (Versatile Video Coding)</strong>, also known as H.266, MPEG-I Part 3, is the new video compression standard developed by the Joint Video Experts Team (JVET), that is a united video expert team of the MPEG working group of ISO/IEC JTC 1, and the VCEG working group of ITU-T. The main aim of the VVC is to improve compression efficiency of the H.265/HEVC standard by 30–50% compression rate for the same perceptual quality.</p><p>VVC contains many coding tools which reduce distortion between the original and decoded frames produced by lossy coding. Deblocking filter, Sample Adaptive Offset (SAO), Adaptive Loop Filter (ALF) for in-loop filtering are introduced for the VVC standard. Besides that, in VVC, a coding tool called the luma mapping with chroma scaling (LMCS) is added as a new processing block before the loop filters.</p><p>These filtering techniques are implemented to reduce distortion introduced by the encoding process.</p><h3><strong>Deblocking</strong></h3><p>A deblocking filter is a video filter applied to a decoded compressed video to improve visual quality and prediction performance by smoothing the sharp edges which can form between macroblocks when block coding techniques are used. The filter aims to reduce blocking artifacts and improve the appearance of decoded pictures.</p><p>Deblocking filter is applied to the whole picture first.</p><p>The filter makes the need on/off decision for Luma/Chroma and produce level of filtering (weak/strong), and finally makes filtering operations.</p><figure><img alt="pic 2. Usage of pixels around edges." src="https://cdn-images-1.medium.com/max/385/1*due2LNpOsJ6WtaFmcINO-w.png" /><figcaption>pic 2. <em>Usage of pixels around edges.</em></figcaption></figure><p><strong>Loop Filter Mode</strong></p><p>Let’s check the deblocking filter decisions in our VQ Analyzer.</p><p>Click “Mode” and choose “Loop Filter” or just press F6.</p><p>Loop Filter mode shows all edges processed by the deblocking filter. Edges shown are for the luma deblocking process and are color coded in the following manner:</p><ul><li>Green: Strong luma filter applied</li><li>Yellow: Weak luma filter applied</li><li>Red: No filter applied (but edge was<strong> </strong>evaluated)</li></ul><figure><img alt="pic 3. VQ Analyzer ver.5.4. Loop Filter Mode." src="https://cdn-images-1.medium.com/max/1024/1*SvUyreoOY_BTlFBlH7kzqA.png" /><figcaption>pic 3. VQ Analyzer ver.5.4. Loop Filter Mode.</figcaption></figure><p><strong>Loop Filter Detail Mode</strong></p><p>The deblocked sample values can be inspected directly in detail mode. Sample values are indicated in yellow if they were modified by the deblocking process. Filtered edges belonging to the selected CU are shown in thick dashed lines, color coded the same way as in the non-detail mode. Each edge can be selected and clicked, bringing up a window showing the input values to the edge filter. Additionally, the boundary strength is displayed. Edges that were processed but ultimately not filtered (red colored) will indicate the reason.</p><figure><img alt="pic 4. VQ Analyzer ver.5.4. Loop Filter Detail Mode." src="https://cdn-images-1.medium.com/max/1024/1*TcraRDhJ718pfZPAVK85kQ.png" /><figcaption>pic 4. VQ Analyzer ver.5.4. Loop Filter Detail Mode.</figcaption></figure><h3><strong>SAO</strong></h3><p>Sample Adaptive Offset (SAO) is the process of adding offset to Deblocked pixel values according to SAO type — i.e., based on edge direction/shape (Edge Offset aka EO) and pixel level (Band Offset aka BO) or unchanged (OFF).</p><p>Deblocking filter is applied to the reconstructed picture first. SAO filter is then applied to the whole picture which is fully filtered by deblocking filter.</p><p><strong>Edge offset</strong></p><p>There are four offsets corresponding to four edge shapes (i.e., categories/edge index) for the selected direction. The edge index is referred to as SAO-subtype for EO.</p><figure><img alt="pic 5. Four types of neighboring pixels for edge offset filter." src="https://cdn-images-1.medium.com/max/621/0*nVfxJXnE5dPhJrLQ" /><figcaption>pic 5. <em>Four types of neighboring pixels for edge offset filter.</em></figcaption></figure><p>Offset value is added to each deblocked pixel value if it belongs to a given EO type and category, otherwise it is not altered.</p><p><strong>Band offset</strong></p><p>The whole pixel range (0–255 for 8 bpp) is equally divided into 32 bands as shown in the figure below.</p><figure><img alt="pic 6. Bands classification (32 bands for pixel range)." src="https://cdn-images-1.medium.com/max/449/0*qnN_nncvR113LYrQ" /><figcaption>pic 6. <em>Bands classification (32 bands for pixel range).</em></figcaption></figure><p>Offset value is added to each deblocked pixel value if it belongs to the range covered by one of the four bands, otherwise pixel value is not altered.</p><p><strong>SAO Mode</strong></p><p>Click “Modes” -&gt; “SAO” of press F7 to open SAO mode in VQ Analyzer.</p><p>In SAO mode the SAO filter parameters are shown. The mode, and the associated four offsets for each component, are indicated with yellow text, and the merge_up / merge_left flags are indicated with an arrow.</p><figure><img alt="pic 7. VQ Analyzer ver.5.4. Sample Adaptive Offset Filter Mode." src="https://cdn-images-1.medium.com/max/1024/1*WCoxFGUENGr7CuRHjshqIQ.png" /><figcaption>pic 7. VQ Analyzer ver.5.4. Sample Adaptive Offset Filter Mode.</figcaption></figure><p><strong>SAO Detail Mode</strong></p><p>Entering detail mode on a selected CU will show all samples after being processed by the SAO filter. Sample values that were actually modified by the SAO operation are highlighted in yellow. Each sample can be clicked, bringing up a 3x3 window that shows the input values to the filter process. In the screenshot below, the 45-degree edge filter inputs are the samples to the lower left and upper right. Samples that cannot be modified by the filter are indicated in red.</p><figure><img alt="pic 8. VQ Analyzer ver.5.4. Sample Adaptive Offset Filter Detail Mode." src="https://cdn-images-1.medium.com/max/1024/1*C_FXKAPykEqhF-wJtBTneA.png" /><figcaption>pic 8. VQ Analyzer ver.5.4. Sample Adaptive Offset Filter Detail Mode.</figcaption></figure><h3><strong>ALF</strong></h3><p>Adaptive Loop Filter (ALF) reduces the blocking artifacts carried out at encoding schemes.</p><p>The filter minimizes the mean squared error between the original picture and the output picture of SAO. The filter is adaptive in the sense that the coefficients are signaled in the bitstream and can be designed based on image content and distortion of the reconstructed picture.</p><p>Subsequently, block-based adaptive loop filtering was proposed where the ALF could be enabled and disabled on a block (i.e. coding unit) basis. The encoder would signal to the decoder the map of blocks of deblocked picture on which to apply ALF to improve the reconstructed quality. The 7×7 diamond shape is applied for luma component and the 5×5 diamond shape is applied for chroma components.</p><figure><img alt="pic 9. ALF filter shapes (chroma: 5×5 diamond, luma: 7×7 diamond)." src="https://cdn-images-1.medium.com/max/329/0*FpdnpgxGiOSp7P7t" /><figcaption>pic 9. ALF filter shapes (chroma: 5×5 diamond, luma: 7×7 diamond).</figcaption></figure><p>At the decoder, a laplacian-based local activity is used to switch between the different filters on a block-by-block basis.</p><p>A new feature in VVC, CC-ALF, uses luma sample values to refine each chroma component by applying an adaptive, linear filter to the luma channel and then using the output of this filtering operation for chroma refinement.</p><p>Picture below provides a system level diagram of the CC-ALF process with respect to the SAO, luma ALF and chroma ALF processes.</p><figure><img alt="pic 10. Placement of CC-ALF with respect to other loop filters." src="https://cdn-images-1.medium.com/max/296/1*edmVSmyRSCtvt7QDXgX9ZQ.png" /><figcaption>pic 10. Placement of CC-ALF with respect to other loop filters.</figcaption></figure><p>In the VVC, CC-ALF filter coefficients are computed by minimizing the mean square error of each chroma channels with respect to the original chroma content.</p><p><strong>Adaptive Filter Mode</strong></p><p>Let’s look at ALF mode in VQ Analyze. To do this, click “Modes”-&gt;”Adaptive Filter” or just press F8.</p><p>Adaptive Filter mode shows the following ALF parameters:</p><ul><li>On/Off ALF on coding units</li><li>Filter Idx for Luma and Chroma components</li><li>Blocks where ALF for cross components (CC ALF) is applied</li></ul><figure><img alt="pic 11. VQ Analyzer ver.5.4. Adaptive Filter Mode." src="https://cdn-images-1.medium.com/max/1024/1*bZdgxk2z8P-VS8mr4wH2GA.png" /><figcaption>pic 11. VQ Analyzer ver.5.4. Adaptive Filter Mode.</figcaption></figure><h3><strong>LMCS</strong></h3><p>In VVC, a new process called the luma mapping with chroma scaling was added (this process was previously known as the adaptive in-loop reshaper). This new process is performed before deblocking.</p><p>The reference algorithm in VTM10 is designed differently for SDR, HDR PQ and HDR HLG sequences. For SDR and HDR HLG sequences, the encoder algorithm is based on local luma variance and optimized for PSNR metrics. For HDR PQ sequences, the encoder algorithm is based on luma values and optimized for wPSNR (weighted PSNR) metrics.</p><p>LMCS has two main components:</p><ul><li>in-loop mapping of the luma component based on adaptive piecewise linear models</li><li>for the chroma components, luma-dependent chroma residual scaling is applied</li></ul><p>The in-loop mapping of the luma component adjusts the dynamic range of the input signal by redistributing the codewords across the dynamic range to improve compression efficiency.</p><p>Chroma residual scaling CS is used to compensate for the interaction between brightness and chroma of the corresponding position.</p><p><strong>Inverse Map Mode</strong></p><p>To see LMCS info in VQ Analyzer click to “Modes” -&gt; “Inverse Map” or press F5.</p><figure><img alt="pic 12. VQ Analyzer ver.5.4. Inverse Map Mode." src="https://cdn-images-1.medium.com/max/1024/1*-TgvxNIS_rbOzh8GnO1lgQ.png" /><figcaption>pic 12. VQ Analyzer ver.5.4. Inverse Map Mode.</figcaption></figure><h3>Conclusion</h3><p>So, In-loop filtering is an important part of VVC. Using filters in the decoding loop increases the quality of the reference pictures and hence the compression efficiency. VQ Analyzer gives you full-frame visualization features to accelerate development by providing insights on the algorithm choices that produce a bitstream.</p><p>Thanks for reading and see you again in next VQ Analyzer Guided Tours!</p><h3><strong>References</strong></h3><ul><li>Algorithm description for Versatile Video Coding and Test Model 10(VTM 10)</li><li><a href="https://www.edn.com/understanding-in-loop-filtering-in-the-hevc-video-standard/">Understanding in-loop filtering in the HEVC video standard</a></li><li><a href="https://ru.scribd.com/document/239879271/Adaptive-Trilateral-Filter-for-Hevc">Adaptive Trilateral Filter for Hevc</a></li><li><a href="https://sigport.org/sites/default/files/docs/DCC2020_ID189_LMCS_present.pdf">Luma Mapping with Chroma Scaling in Versatile Video Coding (VVC)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da04c311e60d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vicuesoft-techblog/vq-analyzer-guided-tour-in-loop-filtering-da04c311e60d">VQ Analyzer — Guided Tour. In-loop filtering.</a> was originally published in <a href="https://medium.com/vicuesoft-techblog">vicuesoft-techblog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VQ Analyzer — Guided Tour Part Two: Debug YUV Function]]></title>
            <link>https://medium.com/vicuesoft-techblog/vq-analyzer-guided-tour-part-two-debug-yuv-function-2acc236ebef0?source=rss-2ce786ec0b81------2</link>
            <guid isPermaLink="false">https://medium.com/p/2acc236ebef0</guid>
            <category><![CDATA[medium]]></category>
            <category><![CDATA[codec]]></category>
            <category><![CDATA[streaming]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[encoding]]></category>
            <dc:creator><![CDATA[Roman Guskov]]></dc:creator>
            <pubDate>Fri, 10 Apr 2020 13:53:44 GMT</pubDate>
            <atom:updated>2020-04-10T13:53:44.141Z</atom:updated>
            <content:encoded><![CDATA[<h3>VQ Analyzer — Guided Tour. “YUV Diff” functionality.</h3><p>Welcome to the third part of our VQ Analyzer (Video Codec Analyzer) Guided Tour! Delighted to have you along.</p><p>Before we go any further, it’s worth taking a quick look at our previous tours of the <a href="https://medium.com/vicuesoft-techblog/vq-analyzer-guided-tour-yuv-viewer-functionality-c3f6f6968b4e?sk=45227ec76b752f492cdd90168baf397f"><em>“YUV Viewer”</em></a><em> </em>and <a href="https://medium.com/vicuesoft-techblog/vq-analyzer-and-frame-size-view-functionality-c677693145e?sk=169a0898b8ff83a5ec0ead7e67cecbed"><em>“Frame View”</em></a> functions.</p><figure><img alt="VQ Analyzer (AVC/H.264, HEVC/H.265, VP9, AV1, VVC/H.266) ver.4.2. Overview." src="https://cdn-images-1.medium.com/max/1024/1*YLlgBJmTP_iYwHpkfeAZLA.png" /><figcaption>pic 1. VQ Analyzer ver.4.2. Overview.</figcaption></figure><p>And before we get going properly, a few words about the VQ Analyzer itself…</p><p>The VQ Analyzer is just the tool you need for deep diving into video coding standards: it supports HEVC/H.265, AV1, VP9, AVC/H.264, MPEG2 and VVC/H.266</p><p>This Analyzer allows you to inspect each step of the decoding process. You can monitor any syntax element, and explore each individual structure of the coded image — invaluable features if you’re a lover of stats and details. These tools can then be used, in professional settings, for debugging and for codec development. If you’re a researcher or student, it is a great source and reference tool for studying any video codec standard. While we’re on the subject, we have special rates if you’re after an Analyzer for academic uses!</p><h3><strong>General info</strong></h3><p>The titular YUV mode is there to help you inspect the final decoded sample values without any additional overlay data. This mode also has the YUVDiff feature.</p><h3><strong>Opening the bitstream file.</strong></h3><p>Just drag and drop your YUV file into the Analyzer, or go through the File -&gt; Open Bitstream if you prefer the old-fashioned way.</p><figure><img alt="VQ Analyzer (AVC/H.264, HEVC/H.265, VP9, AV1, VVC/H.266) ver.4.2. Opening the bitstream file." src="https://cdn-images-1.medium.com/max/1024/1*l8Rhv_XrzHAnWHNfcJRixg.png" /><figcaption>pic 2. VQ Analyzer ver.4.2. Opening the bitstream file.</figcaption></figure><p>Debug YUV lets you compare an external decoded YUV file with the decoded bitstream. Supported formats are as follows:</p><ul><li>HEVC: (ISO/IEC 23008–2 MPEG-H Part 2 or ITU-T H.265), 8/10-bit</li><li>HEVC: RExt extension, 8/10/12-bit, 4:0:0/4:2:0/4:2:2/4:4:4</li><li>HEVC: SCC extension, conform to HM + SCM 8.6 in reference code</li><li>HEVC Scalable/Multiview Extension</li><li>AV1, SHA-1 (Version 1.0.0 Errata.1): add4b15580e410c00c927ee366fa65545045a5d9</li><li>Google’s VP9, profiles 0,1,2,3, 4:2:0/4:2:2/4:4:0/4:4:4, 8/10/12-bit</li><li>AVC: (H.264/AVC, ISO/IEC 14496–10, MPEG-4 Part 10)</li></ul><p>When the bitstream is loaded, click YUVDiff -&gt; Open Debug YUV:</p><figure><img alt="VQ Analyzer (AVC/H.264, HEVC/H.265, VP9, AV1, VVC/H.266) ver.4.2. Opening a YUVDiff menu." src="https://cdn-images-1.medium.com/max/983/1*NBr5nJ9IYo12wEStk_xGTw.png" /><figcaption>pic 3. VQ Analyzer ver.4.2. Opening a YUVDiff menu.</figcaption></figure><figure><img alt="VQ Analyzer (AVC/H.264, HEVC/H.265, VP9, AV1, VVC/H.266) ver.4.2. Opening a Debug YUV." src="https://cdn-images-1.medium.com/max/1024/1*SJs1w0M70UyYkJM1bkG7DA.png" /><figcaption>pic 4. VQ Analyzer ver.4.2. Opening a Debug YUV.</figcaption></figure><h3><strong>Debug YUV</strong></h3><p>When a YUV file is loaded, any mismatches will be pointed out for you with a red dot (as below), which will be inside the CU containing the mismatch. This should help you to quickly identify the nature of any mismatch, which can in turn help with debugging, should any pesky bugs show themselves.</p><figure><img alt="VQ Analyzer(AVC/H.264, HEVC/H.265, VP9, AV1, VVC/H.266) ver.4.2. YUV Viewer default mode, when a debug YUV file is loaded." src="https://cdn-images-1.medium.com/max/1024/1*4KeCiwysaB4DBJ3Af--tzA.png" /><figcaption>pic 5. VQ Analyzer ver.4.2. YUV Viewer default mode, when a debug YUV file is loaded.</figcaption></figure><p>Click “Diff YUV” to see the difference between your Original frame and Debug frame. Identical Original and Debug images are just a flat gray. Areas where the debug YUV has a lower value are darker, and areas where the debug YUV has a higher value are lighter and brighter.</p><figure><img alt="VQ Analyzer (AVC/H.264, HEVC/H.265, VP9, AV1, VVC/H.266) ver.4.2. YUV Viewer, when a Diff YUV mode is chosen." src="https://cdn-images-1.medium.com/max/1024/1*bW3SnUX3nDlGJSKBNQIJyg.png" /><figcaption>pic 6. VQ Analyzer ver.4.2. YUV Viewer, when a Diff YUV mode is chosen.</figcaption></figure><p>Click “Rel” to check the YUV difference plane as relative between reference and debug pixelm or “Abs” to check absolute difference values. This will prove to be very useful if you’re looking to identify particular pixels that show some kind of difference.</p><figure><img alt="VQ Analyzer(AVC/H.264, HEVC/H.265, VP9, AV1, VVC/H.266) ver.4.2. YUV Viewer. Diff YUV: Rel (relative) and Abs (absolute) mode" src="https://cdn-images-1.medium.com/max/1024/1*9BKVrQWOu572g90JQwsQzg.png" /><figcaption>pic 7. VQ Analyzer ver.4.2. YUV Viewer. Diff YUV: Rel (relative) and Abs (absolute) modes.</figcaption></figure><h3><strong>YUVDiff Menu</strong></h3><figure><img alt="VQ Analyzer (AVC/H.264, HEVC/H.265, VP9, AV1, VVC/H.266) ver.4.2. Opening a YUVDiff menu." src="https://cdn-images-1.medium.com/max/927/1*GudGOBzYBGbriZihxw-nlw.png" /><figcaption>pic 8. VQ Analyzer ver.4.2. Opening a YUVDiff menu.</figcaption></figure><ul><li>Open: Brings up a file chooser to open a YUV file. The VQ Analyzer counts the YUV stream as having the same frame size, per frame bitdepth and color format as the encoded bitstream.</li><li>Close: Closes the currently opened YUV file, of course. Any mismatch indicators will disappear.</li><li>Planar: Makes the VQ Analyzer interpret the loaded YUV file as Planar.</li><li>Interleaved: Makes the VQ Analyzer interpret the loaded YUV file as Y values followed by interleaved U and V values. This option is chosen automatically by default when the loaded YUV file has the file extension “.nv12”.</li><li>Display order: Makes the VQ Analyzer use display order picture numbers when determining how far to dig into the YUV file to extract the image that it can then compare with the current picture.</li><li>Decode order: Makes the VQ Analyzer use decode order picture numbers when determining how far to dig into the YUV file to extract the image to compare with the current picture.</li><li>Use stream crop values: When this is checked or selected, YUV files are assumed to contain samples only within the cropping window as defined by the loaded bitstream. Samples outside this window are not compared, and are assumed 0 when viewing the loaded YUV image directly.</li><li>Set picture offset here: a handy shortcut for setting the picture offset to the current picture number.</li><li>Use 16 bit YUV: this option allow you to load aYUV file with both Luma and Chrome written in 16 bit (they could be normalized from actual bitdepth to 16 bit during encoding). This is useful when you have bitdepth that changes across the stream. The VQ Analyzer will shift values to the appropriate bitdepth on the current frame.</li><li>Picture offset: This brings up a dialog allowing the user to enter the picture number of the first picture in the YUV file. For example if a 100-picture bitstream is loaded but the YUV file only contains pictures 80–99, you would enter 80 to properly line up the YUV file with the decoded bitstream.</li><li>Check for file changes: When checked or selected, this option makes the VQ Analyzer periodically check whether the loaded YUV file has changed on disk since it was last loaded. If the file has indeed changed in some way, a dialog box pops up offering you the chance to reload the YUV file.</li></ul><h3><strong>Find first difference with Debug YUV</strong></h3><figure><img alt="VQ Analyzer (AVC/H.264, HEVC/H.265, VP9, AV1, VVC/H.266) ver.4.2. “Searching for first difference” mode." src="https://cdn-images-1.medium.com/max/759/1*4azkL5prTiDYZLelO8Zzbg.png" /><figcaption>pic 9. VQ Analyzer ver.4.2. “Searching for first difference” mode.</figcaption></figure><p>This feature works for all codecs - VP9, HEVC, AVC, MPEG2 and AV1. By pressing on the button with the magnifier icon, you start the sequential search in decode order for the difference between reconstructed YUV and reference YUV that should be preloaded via YUVDiff menu. The search will run on till the first difference is found, or to the end of the stream. If you suddenly find yourself overcome with a wave of impatience and you don’t want to wait for search completion, the process can be cancelled it at any time with the ‘cancel’ button in the info modal dialog. The search always starts from the first picture in the decoder order.</p><p>Well, there you have it!</p><p>Don’t stray away, the next part of the VQ Analyzer tour is already in the works…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2acc236ebef0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vicuesoft-techblog/vq-analyzer-guided-tour-part-two-debug-yuv-function-2acc236ebef0">VQ Analyzer — Guided Tour Part Two: Debug YUV Function</a> was originally published in <a href="https://medium.com/vicuesoft-techblog">vicuesoft-techblog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>