3. Adaptive Loop Filter
As far as adaptive loop filter (ALF) is concerned, there are three types of ALF: frame-based, block-based and quadtree-based ALFs. All of them are based on wiener filter, but with different filtering control basis. In frame-based ALF [VCEG-C437/AI14, C402], only one picture level flag is used to signal the decision of filtering or non-filtering.
Although wiener filter can restore the reconstructed picture to the original picture globally, there are degraded pixels locally. Since the degraded area reduce the filtering efficiency, if these areas are not filtered, the capabilities of picture restoration and loop filtering are improved. Therefore, block-based ALF [VCEG-AI18/AJ13] use explicit flags for filtering on-off on block by block basis, while quadtree-based ALF [VCEG-C181/AK22] introduces a quadtree data structure to carry out the variable-size block filtering.
3.1 Block-based Adaptive Loop Filter
Block-based ALF is an improvement of frame-based ALF. Figure 2 shows the block diagram of encoder with block-base ALF. It applies a filter to luminance blocks, and signals a flag for each luminance block to indicate whether the block is filtered or not. In addition, chrominance pixels are filtered by filter coefficients designed independently of luminance.
Figure 2. Block diagram of encoder with BALF
In post-filter or frame-based ALF, the tap length of wiener filter is fixed. However, the optimal tap length depends on the characteristics of picture. Adaptive selection of tap length is selected slice by slice from 5×5, 7×7 or 9×9 taps for luminance of referenced pictures. However, due to the limited improvement of ALF in luminance of non-referenced pictures or chrominance of all pictures, only 5×5 tap filter is applied to reduce the overhead and complexity. The filter coefficients are point symmetry, which are signaled in raster scan order as shown in the following figure:
![]()
Figure 3. Point symmetric filters in raster scan order
A filter designed for luminance can be applied to luminance of the reconstructed picture. A flag to indicate whether the luminance block is filtered or not is signaled for each luminance block. The luminance block size, which can be 8×8, 16×16, 24×24, 32×32, 48×48, 64×64, 96×96, or 128×128, is signaled for each frame.
A filter designed for chrominance can be applied to chrominance of the decoded picture only if luminance filter is applicable. It is signaled for each frame whether the chrominance filter is applied to only Cb, only Cr, or both Cb and Cr.
3.2 Quadtree-based Adaptive Loop Filter
Figure 4 depicts the block diagram of codec with QALF, which is similar to the BALF.
Figure 4. Block diagram of codec with QALF
Quadtree-base ALF further improved the filtering efficiency by using more flexible filtering control scheme – quadtree data structure. In this structure, as shown in Figure 5, each leaf indicates a block and each node has four branches. There are two information represented in the quadtree data structure, one is the block partition flag, indicated by circle, another is block filtering flag, indicated by the diamond. For block partition, each leaf is coded as “0” and each node is coded as “1”. Only leaf has a filter block flag to indicate whether the block is filtered or not. In order to reduce the redundancy, no block partition flag is coded at the bottom layer.
![]()
Figure 5. Quadtree representation in QALF
In order to find the optimal quadtree data structure, a conventional bottom-up recursive algorithm is used in QALF. Suppose that we have already known the optimal quadtree data structures for layer l+1, the four branches should be combined into a leaf when J(l)<J(l+1), as shown in Figure 6.
![]()
Figure 6. Bottom-up recursive algorithm
Using this algorithm, the quadtree data structure is decided.
3.3 Algorithm Description of Block/Quadtree-based ALF
Here, we summarize the algorithms of Block/Quadtree-based ALF as follows:
Step 1: Filter tap size is set to 5×5, and use Wiener-Hopf equation to find the optimal 5×5 filter coefficients for the whole picture
Step 2: The decided 5×5 filter in step 1 is used in the block/quadtree structure optimization procedure
- BALF: Block Size (8, 16, 24, 32, 48, 64, 96 and 128) and filter block flag are selected by rate-distortion optimization algorithm
- QALF: Quadtree data structure (e.g. minimum block size and number of layers) and filter block flag are optimized by using bottom-up recursive algorithm
Step 3: Filter tap size (5×5, 7×7 or 9×9) and corresponding filter coefficients are further optimized by using decided block/quadtree data structure
Permanent Link: Adaptive Post/Loop Filters in JM/KTA – Part 2
# 2009-08-24 Monday 6:15 pm
I think the key point to further improve the performance of loop Wiener filter is video content segmentation. After all, Wiener filter works well only on stationary signal. It is unavoidable that current loop Wiener filter reduces error of many pixels, meanwhile, enlarges error of some other pixels. Some adaptive segmentation scheme is necessary. Brain racking…
# 2009-09-08 Tuesday 10:54 am
Who can tell me how the array filter_luma_base and filter_chroma_base come?
# 2009-09-16 Wednesday 3:42 pm
The proposals of BALF/QALF didn’t describe how to get the array filter_luma_base/filter_chroma_base. I guess that it is obtained by a training set.
# 2009-09-27 Sunday 1:48 am
Do you think that BALF or QALF can provide much better efficiency compared to post-filter only design? I’m not sure that in-loop type is required for this kind of filtering.
# 2009-09-27 Sunday 11:42 am
Using the filter in loop can improve the capability of predicting other pictures.
# 2009-09-28 Monday 3:34 pm
In-loop filter is definitely better than the post filter. Qualcomm has proposed a similar Wiener adaptive filter scheme which used as post filter, but their gain is much smaller compared to BALF.
# 2009-10-05 Monday 6:02 pm
Adaptive loop filter is an additional block apart from traditional in-loop deblocking filter. Wiener filter is a MSE-optimal stationary linear filter which estimates the original signal from the signal corrupted by additive noise. Here additive noise is the coding noise(mostly due to lossy quantization). Is it fair enough to assume that coding noise of every pixels in a frame have the same statistics ? Or should we group pixels with identical coding noise and apply Wiener filter on pixels within the same group ? I am thinking of some kind of segementation as proposed by Zhang.
# 2010-09-12 Sunday 8:52 am
I am looking for a document that describes the algorithm for deblocking filter in H.265. It looks like this filter is different from the one used in H.264/AVC. Are there any documents describing/giving an overview other than JCTVC-A205?
# 2010-09-12 Sunday 12:36 pm
Maybe JCTVC-A033 is useful.
# 2010-09-13 Monday 12:57 pm
JCTVC-A033 was indeed very useful. I came across Coding Block Tree synchronized ALF in both A033 and B205. Are there other documents that describe this ALF in detail?
# 2010-09-24 Friday 7:06 am
Hi people , is it possible may i know whats is “T” and “Q” or T+Q in BALF
# 2010-09-24 Friday 9:14 am
T and Q mean transform and quantization, respectively; similarly, T^{-1} and Q^{-1} mean inverse transform and dequantization, respectively.