The present invention relates to video coding system using ALF (Adaptive Loop Filter). In particular, the present invention relates to the chroma ALF or CCALF (Cross-Component ALF) using multi-source taps.
Versatile video coding (VVC) is the latest international video coding standard developed by the Joint Video Experts Team (JVET) of the ITU-T Video Coding Experts Group (VCEG) and the ISO/IEC Moving Picture Experts Group (MPEG). The standard has been published as an ISO standard: ISO/IEC 23090-3:2021, Information technology-Coded representation of immersive media-Part 3: Versatile video coding, published February 2021. VVC is developed based on its predecessor HEVC (High Efficiency Video Coding) by adding more coding tools to improve coding efficiency and also to handle various types of video sources including 3-dimensional (3D) video signals.
As shown in
The decoder, as shown in
According to VVC, an input picture is partitioned into non-overlapped square block regions referred as CTUs (Coding Tree Units), similar to HEVC. Each CTU can be partitioned into one or multiple smaller size coding units (CUs). The resulting CU partitions can be in square or rectangular shapes. Also, VVC divides a CTU into prediction units (PUs) as a unit to apply prediction process, such as Inter prediction, Intra prediction, etc.
In the present invention, in-loop filter (e.g. Adaptive Loop Filter (ALF) for chroma ALF and/or CCALF (Cross-Component ALF) or any other in-loop filter) using multiple sources is disclosed for the emerging video coding development beyond the VVC to improve coding efficiency.
A method and apparatus for video coding using chroma ALF (Adaptive Loop Filter) or CCALF (Cross-Component ALF) are disclosed. According to the method, reconstructed pixels are received, wherein the reconstructed pixels comprise a current block and the current block comprises a luma block and one or more chroma blocks. A filtered chroma output is derived from a chroma ALF or CCALF (Cross-Component ALF) for a current chroma sample in one of said one or more chroma blocks, wherein the chroma ALF comprises one or more multiple-source chroma samples or luma sample from the current block in a first footprint of the chroma ALF, or wherein the CCALF comprises one or more multiple-source luma samples from the luma block in a second footprint of the CCALF. A filtered-reconstructed first chroma block is provided, wherein the filtered-reconstructed first chroma block comprises the filtered chroma output.
In one embodiment, for the chroma ALF, said one or more multiple-source chroma samples comprise one or more pre-DBF (Deblocking Filter) and/or pre-SAO (Sample Adaptive Offset) chroma samples in said one of said one or more chroma blocks. In one embodiment, for the chroma ALF, said one or more multiple-source chroma samples comprise one or more chroma samples of any pre-ALF type in another of said one or more chroma blocks.
In one embodiment, for the chroma ALF, said one or more multiple-source luma samples comprise one or more pre-DBF (Deblocking Filter) and/or pre-SAO (Sample Adaptive Offset) luma samples in the luma block.
In one embodiment, for the CCALF, said one or more multiple-source luma samples comprise one or more luma output samples from one of fixed filters. In another embodiment, for the CCALF, said one or more multiple-source luma samples comprise one or more pre-DBF (Deblocking Filter) and/or pre-SAO (Sample Adaptive Offset) luma samples in the luma block.
In one embodiment, one or more luma samples from one of fixed filters are added to a CCALF filter footprint for the filtered chroma output.
In one embodiment, the chroma ALF or CCALF comprises a high-degree input term. In one embodiment, the high-degree input term corresponds to (N2−R2), and wherein R is a to-be-processed sample and N is a target sample. In another embodiment, the high-degree input term corresponds to ((sign(N−R))*(N−R)*(N−R)), and wherein R is a to-be-processed sample, N is a target sample and sign(N−R) returns a sign of (N−R).
It will be readily understood that the components of the present invention, as generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following more detailed description of the embodiments of the systems and methods of the present invention, as represented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. References throughout this specification to “one embodiment,” “an embodiment,” or similar language mean that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present invention. Thus, appearances of the phrases “in one embodiment” or “in an embodiment” in various places throughout this specification are not necessarily all referring to the same embodiment.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. One skilled in the relevant art will recognize, however, that the invention can be practiced without one or more of the specific details, or with other methods, components, etc. In other instances, well-known structures, or operations are not shown or described in detail to avoid obscuring aspects of the invention. The illustrated embodiments of the invention will be best understood by reference to the drawings, wherein like parts are designated by like numerals throughout. The following description is intended only by way of example, and simply illustrates certain selected embodiments of apparatus and methods that are consistent with the invention as claimed herein.
In VVC, an Adaptive Loop Filter (ALF) with block-based filter adaption is applied. For the luma component, one filter is selected among 25 filters for each 4×4 block, based on the direction and activity of local gradients.
Two diamond filter shapes (as shown in
For luma component, each 4×4 block is categorized into one out of 25 classes. The classification index C is derived based on its directionality D and a quantized value of activity Â, as follows:
To calculate D and Â, gradients of the horizontal, vertical and two diagonal direction are first calculated using 1-D Laplacian:
where indices i and j refer to the coordinates of the upper left sample within the 4×4 block and R(i,j) indicates a reconstructed sample at coordinate (i,j).
To reduce the complexity of block classification, the subsampled 1-D Laplacian calculation is applied to the vertical direction (
Then D maximum and minimum values of the gradients of horizontal and vertical directions are set as:
The maximum and minimum values of the gradient of two diagonal directions are set as:
To derive the value of the directionality D, these values are compared against each other and with two thresholds t1 and t2:
The activity value A is calculated as:
A is further quantized to the range of 0 to 4, inclusively, and the quantized value is denoted as Â.
For chroma components in a picture, no classification is applied.
Before filtering each 4×4 luma block, geometric transformations such as rotation or diagonal and vertical flipping are applied to the filter coefficients f(k,l) and to the corresponding filter clipping values c(k,l) 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.
Three geometric transformations, including diagonal, vertical flip and rotation are introduced:
where K is the size of the filter and 0≤k, l≤K−1 are coefficients coordinates, such that location (0,0) is at the upper left corner and location (K−1,K−1) is at the lower right corner. The transformations are applied to the filter coefficients f(k,l) and to the clipping values c(k,l) depending on gradient values calculated for that block. The relationship between the transformation and the four gradients of the four directions are summarized in the following table.
At decoder side, when ALF is enabled for a CTB, each sample R(i,j) within the CU is filtered, resulting in sample value R′(i,j) as shown below,
where f(k,l) denotes the decoded filter coefficients, K(x,y) is the clipping function and c(k,l) denotes the decoded clipping parameters. The variable k and l varies between −L/2 and L/2, where L denotes the filter length. The clipping function K(x,y)=min(y,max(−y,x)) which corresponds to the function Clip3 (−y,y,x). The clipping operation introduces non-linearity to make ALF more efficient by reducing the impact of neighbour sample values that are too different with the current sample value.
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.
Filtering in CC-ALF is accomplished by applying a linear, diamond shaped filter (e.g. filters 440 and 442 in
where (x,y) is chroma component i location being refined, (xY,yY) is the luma location based on (x,y), Si is filter support area in luma component, and ci(x0,y0) represents the filter coefficients.
As shown in
In the VVC reference software, CC-ALF filter coefficients are computed by minimizing the mean square error of each chroma channel with respect to the original chroma content. To achieve this, the VTM (VVC Test Model) algorithm uses a coefficient derivation process similar to the one used for chroma ALF. Specifically, a correlation matrix is derived, and the coefficients are computed using a Cholesky decomposition solver in an attempt to minimize a mean square error metric. In designing the filters, a maximum of 8 CC-ALF filters can be designed and transmitted per picture. The resulting filters are then indicated for each of the two chroma channels on a CTU basis.
Additional characteristics of CC-ALF include:
As an additional feature, the reference encoder can be configured to enable some basic subjective tuning through the configuration file. When enabled, the VTM attenuates the application of CC-ALF in regions that are coded with high QP and are either near mid-grey or contain a large amount of luma high frequencies. Algorithmically, this is accomplished by disabling the application of CC-ALF in CTUs where any of the following conditions are true:
The motivation for this functionality is to provide some assurance that CC-ALF does not amplify artefacts introduced earlier in the decoding path (This is largely due the fact that the VTM currently does not explicitly optimize for chroma subjective quality). It is anticipated that alternative encoder implementations may either not use this functionality or incorporate alternative strategies suitable for their encoding characteristics.
ALF filter parameters are signalled in Adaptation Parameter Set (APS). In one APS, up to sets of luma filter coefficients and clipping value indexes, and up to eight sets of chroma filter coefficients and clipping value indexes could be signalled. To reduce bits overhead, filter coefficients of different classification for luma component can be merged. In slice header, the indices of the APSs used for the current slice are signalled.
Clipping value indexes, which are decoded from the APS, allow determining clipping values using a table of clipping values for both luma and Chroma components. These clipping values are dependent of the internal bitdepth. More precisely, the clipping values are obtained by the following formula:
with B equal to the internal bitdepth, α is a pre-defined constant value equal to 2.35, and N equal to 4 which is the number of allowed clipping values in VVC. The AlfClip is then rounded to the nearest value with the format of power of 2.
In slice header, up to 7 APS indices can be signalled to specify the luma filter sets that are used for the current slice. The filtering process can be further controlled at CTB level. A flag is always signalled to indicate whether ALF is applied to a luma CTB. A luma CTB can choose a filter set among 16 fixed filter sets and the filter sets from APSs. A filter set index is signalled for a luma CTB to indicate which filter set is applied. The 16 fixed filter sets are pre-defined and hard-coded in both the encoder and the decoder.
For the chroma component, an APS index is signalled in slice header to indicate the chroma filter sets being used for the current slice. At CTB level, a filter index is signalled for each chroma CTB if there is more than one chroma filter set in the APS.
The filter coefficients are quantized with norm equal to 128. In order to restrict the multiplication complexity, a bitstream conformance is applied so that the coefficient value of the non-central position shall be in the range of −27 to 27−1, inclusive. The central position coefficient is not signalled in the bitstream and is considered as equal to 128.
In VVC, to reduce the line buffer requirement of ALF, modified block classification and filtering are employed for the samples near horizontal CTU boundaries. For this purpose, a virtual boundary is defined as a line by shifting the horizontal CTU boundary with “N” samples as shown in
Modified block classification is applied for the Luma component as depicted in
For filtering processing, symmetric padding operation at the virtual boundaries are used for both Luma and Chroma components. As shown in
Different to the symmetric padding method used at horizontal CTU boundaries, simple padding process is applied for slice, tile and subpicture boundaries when filter across the boundaries is disabled. The simple padding process is also applied at picture boundary. The padded samples are used for both classification and filtering process. To compensate for the extreme padding when filtering samples just above or below the virtual boundary, the filter strength is reduced for those cases for both luma and chroma by increasing the right shift by 3.
ALF gradient subsampling and ALF virtual boundary processing are removed. Block size for classification is reduced from 4×4 to 2×2. Filter size for both luma and chroma, for which ALF coefficients are signalled, is increased to 9×9.
ALF with Fixed Filters
To filter a luma sample, three different classifiers (C0, C1 and C2) and three different sets of filters (F0, F1 and F2) are used. Sets F0 and F1 contain fixed filters, with coefficients trained for classifiers C0 and C1. Coefficients of filters in F2 are signalled. Which filter from a set Fi is used for a given sample is decided by a class Ci assigned to this sample using classifier Ci.
At first, two 13×13 diamond shape fixed filters F0 and F1 are applied to derive two intermediate samples R0(x,y) and R1(x,y). After that, F2 is applied to R0(x,y), R1(x,y), and neighbouring samples to derive a filtered sample as
where fi,j is the clipped difference between a neighbouring sample and current sample R(x,y) and gi is the clipped difference between Ri-20(x,y) and current sample. The filter coefficients ci, i=0, . . . 21, are signalled.
Based on directionality Di and activity Âi, a class Ci is assigned to each 2×2 block:
As in VVC, values of the horizontal, vertical, and two diagonal gradients are calculated for each sample using 1-D Laplacian. The sum of the sample gradients within a 4×4 window that covers the target 2×2 block is used for classifier C0 and the sum of sample gradients within a 12×12 window is used for classifiers C1 and C2. The sums of horizontal, vertical and two diagonal gradients are denoted, respectively, as ghi, gvi, gd1i and gd2i. The directionality Di is determined by comparing
with a set of thresholds. The directionality D2 is derived as in VVC using thresholds 2 and 4.5. For D0 and D1, horizontal/vertical edge strength EHVi and diagonal edge strength EDi are calculated first. Thresholds Th=[1.25, 1.5, 2, 3, 4.5, 8] are used. Edge strength EHVi is 0 if rh,vi≤Th[0]; otherwise, EHVi is the maximum integer such that rh,vi>Th[EHVi−1]. Edge strength EDi is 0 if rd1,d2i≤Th[0]; otherwise, EDi is the maximum integer such that rd1,d2i>Th[EDi−1]. When rh,vi>rd1,d2i, i.e., horizontal/vertical edges are dominant, the Di is derived by using Table 2A; otherwise, diagonal edges are dominant, the Di is derived by using Table 2B.
To obtain Âi, the sum of vertical and horizontal gradients Ai is mapped to the range of 0 to n, where n is equal to 4 for Â2 and 15 for Â0 and Â1.
In an ALF_APS, up to 4 luma filter sets are signalled, each set may have up to 25 filters.
Adaptive Loop Filter with Multiple Sources
In JVET-Z0146 (Nan Hu, et. al., “AHG12: Using samples before deblocking filter for adaptive loop filter”, Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29, 26th Meeting, by teleconference, 20-29 Apr. 2022, Document: JVET-Z0146), for luma component, it is proposed that samples before deblocking filter (DBF) are used for ALF as well. Specifically, a filtered sample is derived as:
where hi,j is the clipped difference between a neighbouring sample before DBF and current sample R(x,y). Two filter shapes are proposed, which are 3×3 (710) and 5×5 (720) diamond shapes as shown in
In an adaptation parameter set (APS), a flag is signalled to indicate whether samples before DBF are used for ALF. In JVET-Z0146, this flag is always set as true at encoder.
In the present invention, techniques to improve the ALF performance and/or simplify the processing/storage are disclosed as follows. In particular, a technique to use virtual boundary process for ALF process is disclosed in order to reduce the line buffer usage in ALF. Various methods are proposed in the following.
In the present invention, the padding process used in the filtering process is replaced by setting the difference between neighbouring sample and to-be-processed sample to be zero when the neighbouring sample is unavailable. In one example, the difference between neighbouring sample and to-be-processed sample is set to be zero, only for those unavailable neighbouring samples. That is, it is asymmetric process. In another example, the process of setting the difference between a neighbouring sample and the to-be-processed sample to be zero is applied to both corresponding symmetric positions. That is, the filter footprint is modified as shown in
In another method of luma ALF, it includes multiple sources in the filter footprint besides the samples before ALF. The multiple sources may be samples before deblocking filter, samples before SAO, samples after applying ALF fixed filters, reconstructed residual after inverse transform, and/or samples before reconstruction stage (e.g. inter/intra predictor). In this case, in order to further reduce the buffer usage, ALF virtual boundary process is also applied to these multiple sources. For example, the samples before deblocking filter are used in ALF. If the required samples before deblocking filter are unavailable (e.g. the samples before deblocking filter being located in the other side of virtual boundary), the padding process is used to avoid accessing these samples. The padding process can be asymmetric or symmetric as used in VVC. In another embodiment, the padding process is replaced by setting the difference between the required sample before deblocking filter and to-be-processed sample to be zero. In another embodiment, if one of the required samples before deblocking filter is unavailable, the filter taps for the samples before deblocking filters are removed. In another embodiment, if one of the required samples before deblocking filter is unavailable, the filter taps for the samples before deblocking filters are reduced to a single tap corresponding to the position of to-be-processed sample. In one embodiment, the virtual boundary process used for the samples before ALF and that used for multiple sources is the same. That is, the same virtual boundary process is applied to all input sources of luma ALF.
In one method, multiple sources are also utilized in chroma ALF and/or CCALF to further improve coding performance. In one example, the chroma samples before deblocking filter and the chroma samples before SAO are added to the filter footprint of chroma ALF. In another example, the luma samples before deblocking filter and the luma samples before SAO are added to the filter footprint of CCALF.
In one embodiment, multiple sources can also be from different components. For example, for luma ALF, the chroma samples before deblocking filter can be added to the luma ALF filter footprint. In another example, the luma samples before the deblocking filter, the chroma samples before the deblocking filter, the luma samples before SAO, and the chroma samples before SAO are added to the luma ALF filter footprint. In another example, the luma samples before the deblocking filter and the luma samples before SAO are added to the filter footprint of chroma ALF.
In another embodiment, the filter footprint of chroma ALF can include both chroma components. That is, when applying ALF to Cb component, Cr samples before ALF are also used in the chroma ALF. The Cr samples before ALF refers any before ALF sample type, such as the Cr samples immediately before ALF (i.e., pre-ALF), immediately before SAO (i.e., pre-SAO) or immediately before deblocking filter (i.e., pre-DBF).
In one embodiment, multiple sources can be from intermediate ALF filtering results. For example, the luma samples after applying different fixed filters can be added to the luma ALF filter footprint. In another example, the luma samples after applying different fixed filters can be added to the CCALF filter footprint.
In the above proposed methods, the filter tap(s) for multiple sources can be high-degree parameter(s). For example, considering a to-be-processed sample R and a target sample N, in stead of using (N−R), the square difference value (N2−R2) is used as an additional tap. In another example, the input can be sign(N−R)*((N−R)*(N−R)), where sign(x) is used to return “+1” when x is non-negative and return “−1” when x is negative.
In the above proposed methods, when multiple sources are introduced in ALF, non-linear operations (i.e. clipping operations) can be also applied together.
Any of the multiple-source methods for in-loop filters (e.g. chroma ALF/CCALF methods) described above can be implemented in encoders and/or decoders. For example, any of the proposed multiple-source ALF methods can be implemented in the in-loop filter module (e.g. ILPF 130 in
The flowchart shown is intended to illustrate an example of video coding according to the present invention. A person skilled in the art may modify each step, re-arranges the steps, split a step, or combine steps to practice the present invention without departing from the spirit of the present invention. In the disclosure, specific syntax and semantics have been used to illustrate examples to implement embodiments of the present invention. A skilled person may practice the present invention by substituting the syntax and semantics with equivalent syntax and semantics without departing from the spirit of the present invention.
The above description is presented to enable a person of ordinary skill in the art to practice the present invention as provided in the context of a particular application and its requirement. Various modifications to the described embodiments will be apparent to those with skill in the art, and the general principles defined herein may be applied to other embodiments. Therefore, the present invention is not intended to be limited to the particular embodiments shown and described, but is to be accorded the widest scope consistent with the principles and novel features herein disclosed. In the above detailed description, various specific details are illustrated in order to provide a thorough understanding of the present invention. Nevertheless, it will be understood by those skilled in the art that the present invention may be practiced.
Embodiment of the present invention as described above may be implemented in various hardware, software codes, or a combination of both. For example, an embodiment of the present invention can be one or more circuit circuits integrated into a video compression chip or program code integrated into video compression software to perform the processing described herein. An embodiment of the present invention may also be program code to be executed on a Digital Signal Processor (DSP) to perform the processing described herein. The invention may also involve a number of functions to be performed by a computer processor, a digital signal processor, a microprocessor, or field programmable gate array (FPGA). These processors can be configured to perform particular tasks according to the invention, by executing machine-readable software code or firmware code that defines the particular methods embodied by the invention. The software code or firmware code may be developed in different programming languages and different formats or styles. The software code may also be compiled for different target platforms. However, different code formats, styles and languages of software codes and other means of configuring code to perform the tasks in accordance with the invention will not depart from the spirit and scope of the invention.
The invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described examples are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.
The present invention is a non-Provisional Application of and claims priority to U.S. Provisional Patent Application No. 63/368,511, filed on Jul. 15, 2022. The U.S. Provisional Patent Application is hereby incorporated by reference in its entirety.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2023/101559 | 6/21/2023 | WO |
Number | Date | Country | |
---|---|---|---|
63368511 | Jul 2022 | US |