Method and apparatus of ALF syntax design for filter selection in video coding
The method improves ALF signaling efficiency by using a same codeword type for filter selection across blocks in a picture region, addressing parsing throughput issues and optimizing the ALF processing in video coding systems.
Patent Information
- Application Number
- PCT/CN2025/104499
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-16
- Filing Date
- 2025-06-27
- Publication Date
- 2026-01-22
AI Technical Summary
Existing video coding systems face inefficiencies in signaling schemes for Adaptive Loop Filter (ALF) due to the need for block-level flags and parsing issues that affect parsing throughput, particularly in scenarios where neighboring block information is required for filter selection.
A method and apparatus for ALF processing that uses a same codeword type to signal target indexes for filter selection across all blocks in a picture region, reordering candidates based on reconstruction information to improve parsing efficiency and reduce the need for parsing-stage reconstructions.
Enhances parsing throughput by allowing efficient filter selection without requiring parsing-stage reconstructions, thereby optimizing the ALF signaling process.
Smart Images

Figure CN2025104499_22012026_PF_FP_ABST
Abstract
Description
METHOD AND APPARATUS OF ALF SYNTAX DESIGN FOR FILTER SELECTION IN VIDEO CODINGCROSS REFERENCE TO RELATED APPLICATIONS
[0001] The present invention is a non-Provisional Application of and claims priority to U.S. Provisional Patent Application No. 63 / 671,318, filed on July 15, 2024 and U.S. Provisional Patent Application No. 63 / 671,824, filed on July 16, 2024. The U.S. Provisional Patent Applications are hereby incorporated by reference in their entireties.FIELD OF THE INVENTION
[0002] The present invention relates to video coding system using ALF (Adaptive Loop Filter) . In particular, the present invention discloses signalling schemes for ALF APS, filter set, or filter by using the same codeword type for all blocks in a picture region. BACKGROUND AND RELATED ART
[0003] 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 Feb. 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.
[0004] Fig. 1A illustrates an exemplary adaptive Inter / Intra video encoding system incorporating loop processing. For Intra Prediction, the prediction data is derived based on previously coded video data in the current picture. For Inter Prediction 112, Motion Estimation (ME) is performed at the encoder side and Motion Compensation (MC) is performed based on the result of ME to provide prediction data derived from other picture (s) and motion data. Switch 114 selects Intra Prediction 110 or Inter-Prediction 112 and the selected prediction data is supplied to Adder 116 to form prediction errors, also called residues. The prediction error is then processed by Transform (T) 118 followed by Quantization (Q) 120. The transformed and quantized residues are then coded by Entropy Encoder 122 to be included in a video bitstream corresponding to the compressed video data. The bitstream associated with the transform coefficients is then packed with side information such as motion and coding modes associated with Intra prediction and Inter prediction, and other information such as parameters associated with loop filters applied to underlying image area. The side information associated with Intra Prediction 110, Inter prediction 112 and in-loop filter 130, are provided to Entropy Encoder 122 as shown in Fig. 1A. When an Inter-prediction mode is used, a reference picture or pictures have to be reconstructed at the encoder end as well. Consequently, the transformed and quantized residues are processed by Inverse Quantization (IQ) 124 and Inverse Transformation (IT) 126 to recover the residues. The residues are then added back to prediction data 136 at Reconstruction (REC) 128 to reconstruct video data. The reconstructed video data may be stored in Reference Picture Buffer 134 and used for prediction of other frames.
[0005] As shown in Fig. 1A, incoming video data undergoes a series of processing in the encoding system. The reconstructed video data from REC 128 may be subject to various impairments due to a series of processing. Accordingly, in-loop filter 130 is often applied to the reconstructed video data before the reconstructed video data are stored in the Reference Picture Buffer 134 in order to improve video quality. For example, deblocking filter (DF) , Sample Adaptive Offset (SAO) and Adaptive Loop Filter (ALF) may be used. The loop filter information may need to be incorporated in the bitstream so that a decoder can properly recover the required information. Therefore, loop filter information is also provided to Entropy Encoder 122 for incorporation into the bitstream. In Fig. 1A, Loop filter 130 is applied to the reconstructed video before the reconstructed samples are stored in the reference picture buffer 134. The system in Fig. 1A is intended to illustrate an exemplary structure of a typical video encoder. It may correspond to the High Efficiency Video Coding (HEVC) system, VP8, VP9, H. 264 or VVC.
[0006] The decoder, as shown in Fig. 1B, can use similar or portion of the same functional blocks as the encoder except for Transform 118 and Quantization 120 since the decoder only needs Inverse Quantization 124 and Inverse Transform 126. Instead of Entropy Encoder 122, the decoder uses an Entropy Decoder 140 to decode the video bitstream into quantized transform coefficients and needed coding information (e.g. ILPF information, Intra prediction information and Inter prediction information) . The Intra prediction 150 at the decoder side does not need to perform the mode search. Instead, the decoder only needs to generate Intra prediction according to Intra prediction information received from the Entropy Decoder 140. Furthermore, for Inter prediction, the decoder only needs to perform motion compensation (MC 152) according to Inter prediction information received from the Entropy Decoder 140 without the need for motion estimation.
[0007] 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.
[0008] Adaptive Loop Filter in VVC
[0009] 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.
[0010] 1. Filter shape
[0011] Two diamond filter shapes (as shown in Fig. 2) are used. The 7×7 diamond shape 220 is applied for luma component and the 5×5 diamond shape 210 is applied for the chroma components.
[0012] 2. Block classification
[0013] For luma component, each 4×4 block is categorized into one out of 25 classes. Theclassification index C is derived based on its directionality D and a quantized value of activity as follows:
[0014] 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) .
[0015] To reduce the complexity of block classification, the subsampled 1-D Laplacian calculation is applied to the vertical direction (Fig. 3A) and the horizontal direction (Fig. 3B) . As shown in Figs. 3C-D, the same subsampled positions are used for gradient calculation of all directions (gd1 in Fig. 3C and gd2 in Fig. 3D) .
[0016] Then D maximum and minimum values of the gradients of horizontal and vertical directions are set as:
[0017] The maximum and minimum values of the gradient of two diagonal directions are set as:
[0018] To derive the value of the directionality D, these values are compared against each other and with two thresholds t1 and t2: Step 1. If both and are true, D is set to 0. Step 2. If continue from Step 3; otherwise continue from Step 4. Step 3. If D is set to 2; otherwise D is set to 1. Step 4. If D is set to 4; otherwise D is set to 3.
[0019] The activity value A is calculated as:
[0020] A is further quantized to the range of 0 to 4, inclusively, and the quantized value is denoted as
[0021] For the chroma components in a picture, no classification is applied.
[0022] 3. Geometric transformations of filter coefficients and clipping values
[0023] 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.
[0024] Three geometric transformations, including diagonal, vertical flip and rotation are introduced: Diagonal: fD (k, l) =f (l, k) , cD (k, l) =c (l, k) , Vertical flip: fV (k, l) =f (k, K-l-1) , cV (k, l) =c (k, K-l-1) , Rotation: fR (k, l) =f (K-l-1, k) , cR (k, l) =c (K-l-1, k) , 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. Table 1. Mapping of the gradient calculated for one block and the transformations
[0025] 4. Filtering process
[0026] 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.
[0027] 5. Cross component adaptive loop filter
[0028] 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. Fig. 4A provides a system level diagram of the CC-ALF process with respect to the SAO, luma ALF and chroma ALF processes. As shown in Fig. 4A, each colour component (i.e., Y, Cb and Cr) is processed by its respective SAO (i.e., SAO Luma 410, SAO Cb 412 and SAO Cr 414) . After SAO, ALF Luma 420 is applied to the SAO-processed luma and ALF Chroma 430 is applied to SAO-processed Cb and Cr. However, there is a cross-component term from luma to a chroma component (i.e., CC-ALF Cb 422 and CC-ALF Cr 424) . The outputs from the cross-component ALF are added (using adders 432 and 434 respectively) to the outputs from ALF Chroma 430.
[0029] Filtering in CC-ALF is accomplished by applying a linear, diamond shaped filter (e.g. filters 440 and 442 in Fig. 4B) to the luma channel. In Fig. 4B, a blank circle indicates a luma sample and a dot-filled circle indicate a chroma sample. One filter is used for each chroma channel, and the operation is expressed as: 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.
[0030] As shown in Fig, 4B, the luma filter support is the region collocated with the current chroma sample after accounting for the spatial scaling factor between the luma and chroma planes. In Fig. 4B, circles represent luma samples, while dotted circles represent chroma samples being refined.
[0031] 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.
[0032] Additional characteristics of CC-ALF include: ● The design uses a 3x4 diamond shape with 8 taps. ● Seven filter coefficients are transmitted in the APS. ● Each of the transmitted coefficients has a 6-bit dynamic range and is restricted to power-of-2 values. ● The eighth filter coefficient is derived at the decoder such that the sum of the filter coefficients is equal to 0. ● An APS may be referenced in the slice header. ● CC-ALF filter selection is controlled at CTU-level for each chroma component ● Boundary padding for the horizontal virtual boundaries uses the same memory access pattern as luma ALF.
[0033] 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 slice QP value minus 1 is less than or equal to the base QP value. ● The number of chroma samples for which the local contrast is greater than (1 << (bitDepth –2 ) ) –1 exceeds the CTU height, where the local contrast is the difference between the maximum and minimum luma sample values within the filter support region. ● More than a quarter of chroma samples are in the range between (1 << (bitDepth –1 ) ) –16 and (1 << (bitDepth –1 ) ) + 16
[0034] 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.
[0035] 6. Filter parameters signalling
[0036] ALF filter parameters are signalled in Adaptation Parameter Set (APS) . In one APS, up to 25 sets of luma filter coefficients and clipping value indexes, and up to eight sets of chroma filter coefficients and clipping value indexes can 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.
[0037] Clipping value indexes, which are decoded from the APS, allow determining clipping values using a table of clipping values for both the luma and chroma components. These clipping values are dependent of the internal bitdepth. More precisely, the clipping values are obtained by the following formula: AlfClip= {round (2B-α*n ) for n∈ [0.. N-1] } 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.
[0038] 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.
[0039] 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.
[0040] 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.
[0041] Adaptive Loop Filter in ECM
[0042] In ECM8 (Muhammed Coban, et al., “Algorithm description of Enhanced Compression Model 8 (ECM 8) ” , Joint Video Experts Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29) , 29th Meeting, by teleconference, 11–20 January 2023, Document: JVET-AC2025) , some changes from the VVC ALF are disclosed. A brief overview is shown below.
[0043] 1. ALF simplification removal
[0044] ALF gradient subsampling and ALF virtual boundary processing are removed. Block size for classification is reduced from 4x4 to 2x2. Filter size for both the luma and chroma, for which ALF coefficients are signalled, is increased to 9x9.
[0045] 2. ALF with fixed filters
[0046] 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.
[0047] 3. Filtering
[0048] At first, two 13x13 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.
[0049] 4. Classification
[0050] Based on directionality Di and activity a class Ci is assigned to each 2x2 block: where MD, i represents the total number of directionalities Di.
[0051] 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 and 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 and diagonal edge strength are calculated first. Thresholds Th= [1.25, 1.5, 2, 3, 4.5, 8] are used. Edge strength is 0 if otherwise, is the maximum integer such that Edge strength is 0 if otherwise, is the maximum integer such that When 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. Table 2A. Mapping of and to Di Table 2B. Mapping of and to Di
[0052] To obtain the sum of vertical and horizontal gradients Ai is mapped to the range of 0 to n, where n is equal to 4 for and 15 for and
[0053] In an ALF_APS, up to 4 luma filter sets are signalled, each set may have up to 25 filters.
[0054] 5. Alternative 2x2 ALF classifier
[0055] Classification in ALF is extended with an additional alternative classifier. For a signalled luma filter set, a flag is signalled to indicate whether the alternative classifier is applied. Geometrical transformation is not applied to the alternative band classifier. When the band-based classifier is applied, the sum of sample values of a 2x2 luma block is calculated at first. Then the class index is calculated as below, class_index = (sum *25) >> (sample bit depth + 2) .
[0056] 6. Residual based classifier
[0057] A third classifier is based on luma residual sample values. For each 2x2 luma block, the sum of absolute values of the residual samples in a neighbouring 8x8 window is calculated, and the class index is derived as: classIdx = sum >> (sample bit depth - 4) .
[0058] The value of classIdx is in the range of 0 to 24, same as in ECM-8.0. The classifier usage is signalled for each luma filter set in APS.
[0059] 7. CCALF with long tap filter
[0060] The CCALF process uses a linear filter to filter luma sample values and generate a residual correction for the chroma samples. A 25-tap large filter is used in CCALF process, which is illustrated in Fig. 5. In Fig. 5, taps for luma samples are shown in grey dots and the location of the corresponding chroma sample is shown as a small dash-lined circle. For a given slice, the encoder can collect the statistics of the slice, analyse them and can signal up to 16 filters through APS.
[0061] 8. Adaptive filter shape switch / using samples before deblocking filter for ALF
[0062] Two candidate filter shapes: a diamond shape as shown in Fig. 6 and a new cross shape as shown in Fig. 7, can be adaptively selected by the luma filters in ALF. The number of coefficients of a luma filter is 22 for both the filter shapes. Please note that these 22 taps are constituted with 20 spatial taps (610 and 710 in Fig. 6 and Fig. 7 respectively) and 2 fixed filters based taps (620 and 720 in Fig. 6 and Fig. 7 respectively) in both shapes.
[0063] In each Adaptation Parameter Set (APS) , a shape index for the derived luma filters is signalled to the decoder. Each APS contains the luma filters that are associated with the filter shape index.
[0064] For each CTB, an APS index is signalled to indicate which luma filter shape is used to filter the current CTB. When filtering a luma sample, the coefficients and clip indices are also rearranged according to the corresponding filter shape.
[0065] The diamond shape luma ALF is replaced by the longer filter shown in Fig. 7.
[0066] The samples before deblocking filters are used as additional inputs for ALF. A final ALF sample is derived by weighting the regular ALF and the filter applied to the samples before the deblocking filter. Specifically, a filtered sample is derived as where fi, j is the clipped difference between a neighbouring sample and current sample R (x, y) , gi is the clipped difference between an intermediate sample and current sample R (x, y) and hi, j is the clipped difference between a neighbouring sample before DBF and current sample R (x, y) . The filter coefficients ci, i=0, …24 are signalled. In example, 3x3 diamond shape is applied to samples before deblocking filter. In an APS, a flag is signalled to indicate whether samples before DBF are used for ALF which is always set as true at encoder.
[0067] 9. Extended fixed-filter-output based taps for ALF
[0068] In ALF online-trained filters consist of 4 kinds of filter taps: spatial taps (810) , reconstruction-before-DBF based taps (840) , residual based taps (850) and fixed-filter-output based taps (820 and 830) as shown in Fig. 8.
[0069] 10. ALF with residual samples
[0070] The residual samples are used as additional inputs to the ALF. A filtered sample is derived as: where ri is the clipped neighbouring residual sample value and rFilteredi is the clipped residual sample filtered by the fixed-filter. For residual samples, the fixed filter reuses the offline fixed filter trained for reconstruction after SAO.
[0071] 11. Additional fixed filter for ALF
[0072] Additional fixed filter with a shape of diamond 7x7 is introduced, the filter parameters are stored at both the encoder and the decoder. There is no classification for the newly added fixed filter.
[0073] An online filter or online-trained filter of the proposed method is shown in Fig. 9, where spatial taps 910 (i.e., tap #0 ~ #19) , reconstruction-before-DBF-based taps 940 (i.e., tap #26, #27, #36) , residual-based taps 950 (i.e., #37 ~ #38) and fixed-filter-output-based taps 920 and 930 (i.e., tap #20 ~ #25, #34, #35) are kept the same as the ECM-8.0, and several extended taps 960 (i.e., tap #28 ~ #33, #39) are introduced into luma online-trained filters. The reconstruction before DBF is fed into the additional fixed filter to produce the filter outputs, then these filter outputs are used as input for newly extended taps. The online filter or online-trained filter refers to a filter specified in APS (Adaptation Parameter Set) , where the filter is trained at the encoder and signalled to decoder. The online filter or online-trained filter is in contrast to fixed filters, which are offline-trained and pre-defined in the specification.
[0074] This filter is always enabled without any filter shape switching.
[0075] 12. Improved fixed filters for ALF
[0076] Two Laplacian-based classifiers (one for each fixed filter) are applied to a 2x2 block. In each classifier, activity and directionality values are derived based on vertical, horizontal, and diagonal gradients using a window surrounding each 2x2 block. For each 2x2 block, the mean value of a surrounding window is calculated. Then, for each sample of this window, the difference between the sample value and the mean value is calculated. A scaling factor is determined based on the activity value derived from a Laplacian classifier. The square root of the sum of the squared differences is further quantized to C′ by a scaling factor. The value of C′is an integer between 0 and 7, inclusively. With i=0, 1, let Ci denote the classifier from the classifier of i-th fixed filter in ECM-9.0. Then the proposed class index Ci′is derived as C′i= C′*896+Ci.
[0077] The total number of the fixed filters is not changed.
[0078] Then a class index is determined based on the activity and directionality values. Two diamond shaped fixed filters are selected from the two filter sets by using the derived two class indices. Both fixed filters are applied to samples before DBF and ALF input, where additional diamond 9x9 filter is used for the samples before DBF. The shape of the first fixed filter applied to the ALF input samples is reduced from 13x13 to 9x9, and the shape of the second fixed filter, which is 13x13, applied to ALF input is unchanged as shown in Table 3. Table 3. Comparison of fixed filters between ECM-9.0 and JVET-AE0139
[0079] Fixed filter f1 is applied to outputs of f0 (instead of ALF input) and samples before DBF.
[0080] Finally, a signalled filter is applied to the ALF input samples, samples before the deblocking filter (DBF) , outputs of the two fixed filters, output of a Gaussian filter and the residual data.
[0081] 13. Luma Residual Taps in CCALF (JVET-AF0197)
[0082] For CCALF, five luma residual taps in a cross 3x3 shape 1020 are added to the 9x9 CCALF filter shape 1010 as shown in Fig. 10. The extended taps take the co-located and neighbouring luma residual values as input.
[0083] In the present invention, methods and apparatus to signal filter or filter set selection are disclosed. BRIEF SUMMARY OF THE INVENTION
[0084] A method and apparatus for Adaptive Loop Filter (ALF) processing of reconstructed video are disclosed. According to one method, reconstructed pixels are received, wherein the reconstructed pixels comprise current reconstructed pixels in a current block. One or more target indexes for selecting an ALF APS, a filter set, a filter, or a combination thereof are signalled or parsed by using a same codeword type to code the target index for all coding blocks in a picture region comprising the current block. Candidates in the ALF APS, the filter set, or the filter are reordered based on neighbouring information. One or more target candidates are selected from the reordered ALF APS, the reordered filter set, the reordered filter, or a combination thereof based on said one or more target indexes. A filtered output is derived by applying a target filter associated with said one or more target candidates to the current reconstructed pixels. The filtered output is provided.
[0085] In one embodiment, the same codeword type comprises truncated binary code with a same number of codewords. In one embodiment, a maximum number of codewords for the truncated binary code is equal to N to allow N ALF APSs, N filter sets, N filters, or a combination thereof to be coded in a slice or picture level for all CTUs (Coding Tree Units) , wherein N is a positive integer.
[0086] In one embodiment, when reconstructing one CTU, one or more reordered lists of ALF APSs, filter sets, or filters are generated by reordering allowed ALF APSs, filter sets or filters based on previous ALF APS selection, filter set selection or filter selection of one or more neighbouring CTUs. In one embodiment, if one allowed ALF APS, filter set or filter is selected according to the previous ALF APS selection, filter set selection or filter selection of said one or more neighbouring CTUs, said one allowed ALF APS, filter sets or filter is moved forward in said one or more reordered lists of ALF APSs, filter sets, or filters respectively.
[0087] In one embodiment, a first target index for selecting a target filter set or filter is signalled or parsed after signalling or parsing a second target index for selecting a target ALF APS. In one embodiment, a first codeword type to signal the first target index for selecting the target ALF APS is pre-determined or determined by a first set of high-level flags and is used for said all coding blocks. In one embodiment, a second codeword type to signal the second target index for selecting the target filter set or filter is pre-determined or determined by a second set of high-level flags and is used for said all coding blocks. In one embodiment, a target first codeword type of the first target index for the current block is used to determine a second codeword type to signal the second target index for selecting the target filter set or filter. In one embodiment, one reordered list of ALF APSs is generated based on the previous ALF APS selection of said one or more neighbouring CTUs, and wherein one ALF APS is only allowed to be swapped with another ALF APS with a same number of filter sets or filters.
[0088] In one embodiment, first target index for selecting a target filter set or filter and a second target index for selecting a target ALF APS are signalled or parsed together. In one embodiment, pairs of the first target index and the second target index are signalled or parsed at a high level.
[0089] In one embodiment, only partial allowed ALF APSs, filter sets or filters are reordered to generate said one or more reordered lists of ALF APSs, filter sets, or filters respectively.
[0090] In one embodiment, said one or more neighbouring CTUs comprise a left CTU, a top CTU, a top-left CTU, one or more non-adjacent CTUs at first pre-determined positions, one or more collocated CTUs, one or more non-adjacent collocated CTUs at second pre-determined positions, one or more history-based CTUs, or a combination thereof.
[0091] In one embodiment, one or some flags are signalled or parsed to indicate whether said reordering the candidates in the ALF APS, the filter set, or the filter is performed.
[0092] In one embodiment, said reordering the candidates in the ALF APS, the filter set, or the filter uses template matching between filtered neighbouring samples of the current block and neighbouring reconstructed samples in a template region, wherein the filtered neighbouring samples of the current block is generated by applying the target filter to the neighbouring samples of the current block.
[0093] In one embodiment, said reordering the candidates in the ALF APS, the filter set, or the filter uses boundary matching between filtered neighbouring samples of the current block and the current block, wherein the filtered neighbouring samples of the current block is generated by applying the target filter to the neighbouring samples of the current block.BRIEF DESCRIPTION OF THE DRAWINGS
[0094] Fig. 1A illustrates an exemplary adaptive Inter / Intra video coding system incorporating loop processing.
[0095] Fig. 1B illustrates a corresponding decoder for the encoder in Fig. 1A.
[0096] Fig. 2 illustrates the ALF filter shapes for the chroma (left) and luma (right) components.
[0097] Figs. 3A-D illustrates the subsampled Laplacian calculations for gv (3A) , gh (3B) , gd1 (3C) and gd2 (3D) .
[0098] Fig. 4A illustrates the placement of CC-ALF with respect to other loop filters.
[0099] Fig. 4B illustrates a diamond shaped filter for the chroma samples.
[0100] Fig. 5 illustrates the 25-tap large filter used in CCALF process.
[0101] Fig. 6 illustrates the diamond shaped ALF in ECM-5.0.
[0102] Fig. 7 illustrates a longer ALF as an alternative to the diamond shaped ALF in Fig. 6.
[0103] Fig. 8 illustrates the filter shape of ALF in ECM-7.0.
[0104] Fig. 9 illustrates an example of ALF with additional fixed filter.
[0105] Fig. 10 illustrates the newly introduced filter shape for CCALF according to JVET-AF0197.
[0106] Fig. 11 illustrates a flowchart of an exemplary video coding system that uses the signalling design for selecting a target ALF filter or filter set according to an embodiment of the present invention.DETAILED DESCRIPTION OF THE INVENTION
[0107] 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.
[0108] 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.
[0109] PROPOSED METHOD
[0110] ALF Syntax Design for Filter Selection
[0111] In ALF, there may be more than one filter for a coding region. Some block-level (usually CTU-level) flags are signalled to indicate the filter selection. Specifically, an APS index is signalled to select which APS is used, and based on the APS selection, a filter set index is signalled to select which filter set in the APS is used. Since the numbers of filter sets vary between APSs, the codeword of filter set selection is based on the APS selection. In such design, if a current block uses the same filter set as the previous block, the same flag representing the same index will be signalled again.
[0112] Some previous work tries to improve such design by considering the selection of neighbouring blocks. For example, in JVET-AI-0058, an APS candidate list is generated according to the selection of neighbouring (e.g. left, top, or top-left) CTUs, and the codeword of the current CTU APS selection depends on the APS candidate list. To be precise, the codeword is pure truncated binary when there is no candidate from neighbouring CTUs. The codeword consists of one or two flags followed by a truncated binary representation when there are one or two candidates from neighbouring CTUs. Similarly, a filter set candidate list is generated according to the selection of neighbouring CTUs, and the codeword of the current CTU filter set selection depends on the filter set candidate list. In this example, if a current CTU uses the same filter set as one neighbouring CTU, the signalled codeword will be shorter. However, an obvious drawback of this example is the requirement of APS / filter set selection reconstruction at the parsing stage since there is no way to know how to parse the APS / filter set syntax before the candidate list is determined, which will significantly affect the parsing throughput.
[0113] In the present invention, some methods to improve the ALF signalling without the parsing issue are disclosed.
[0114] Embodiment 1. In Embodiment 1, at the parsing stage, the same codeword scheme is used for all coding blocks to signal an index of ALF APS, filter set, or filter. At the reconstruction stage, candidates of APS, filter set, or filter are reordered based on reconstruction information, and the signalled index is used to select one candidate from the reordered candidates.
[0115] Example 1:
[0116] In ALF, N APSs are allowed at slice / picture level. The same codeword scheme -truncated binary with maximum number equal to N, is used to signal an APS index for all CTUs. When reconstructing one CTU, one list is generated by reordering the allowed APSs based on the APS selection of neighbouring CTUs. If an APS candidate is selected by one neighbouring CTU, the APS will be moved to a forward position in the list. The signalled index is used to select one APS for the current CTU from the reordered list.
[0117] Example 2:
[0118] In ALF, N filters (or filter sets) are allowed at slice / picture level. The same codeword scheme, truncated unary with maximum number equal to N, is used to signal a filter (set) index for all CTUs. When reconstructing one CTU, one list is generated by reordering the allowed filters based on the filter (set) selection of neighbouring CTUs. If a filter (set) candidate is selected by one neighbouring CTU, the filter (set) will be moved to a former position in the list. The signalled index is used to select one filter (set) for the current CTU from the reordered list.
[0119] Embodiment 2. Embodiment 2 is based on Embodiment 1. In Embodiment 2, for each block, filter (or filter set) selection is signalled after APS selection. At the parsing stage, a codeword scheme pre-determined or determined by a set of high-level flags is used for all coding blocks to signal an index of APS. Then, a codeword scheme pre-determined or determined by another set of high-level flags is used for all coding blocks to signal an index of filter (set) . At the reconstruction stage, candidates of APS and / or filter (set) are reordered based on reconstruction information, and the signalled index is used to select one candidate from the reordered candidates.
[0120] Example 3:
[0121] In ALF, N APSs are allowed at slice / picture level, and at most K filters (or filter sets) are allowed in each APS. A first codeword scheme, truncated binary with maximum number equal to N, is used to signal an APS index for all CTUs, and a second codeword scheme - truncated unary with maximum number equal to K, is used to signal a filter (set) index for all CTUs (N is determined by slice / picture-level flags and K is a pre-determined number) . When reconstructing one CTU, one APS list is generated by reordering the allowed APSs based on the APS selection of neighbouring CTUs. The signalled APS index is used to select one APS for the current CTU from the reordered list, and the signalled filter (set) index is used to select one filter (set) from the selected APS. Note that the number of filters (or filter sets) may be different between APSs. If the codeword scheme for filter (set) is based on the APS selection (e.g. truncated unary with maximum number equal to Ki, where Ki is the number of filters (or filter sets) in APS i) , APS reordering needs to be performed at the parsing stage to identify the current APS selection. Therefore, a pre-determined K is proposed to avoid such parsing issue.
[0122] Example 4:
[0123] Similar to Example 3, but instead of a pre-determined number, K is derived by taking the maximum number of filters (or filter sets) among all allowed APSs at slice / picture level (i.e., determined by another set of high-level flags, APS-level flags in this case) . For example, there are 5 APSs {APS0, APS1, APS2, APS3, APS4} with the number of filters (or filter sets) equal to {1, 2, 3, 3, 2} , respectively, and {APS0, APS1, APS4} are allowed at current slice / picture. K is set to 2 (maximum among {1, 2, 2} ) in this case. That is, truncated unary with maximum number equal to 2 is used as the codeword scheme for signalling the CTU filter (set) selection.
[0124] Embodiment 3. Embodiment 3 is also based on Embodiment 1. In Embodiment 3, for each block, filter (or filter set) selection is signalled after APS selection. At the parsing stage, a codeword scheme pre-determined or determined by a set of high-level flags is used for all coding blocks to signal an index of APS. Then the codeword for a current coding block is determined by the APS index of the coding block to signal an index of filter (set) . At the reconstruction stage, candidates of APS are reordered based on reconstruction information, where an APS can only be swapped with another APS with the same number of filters (or filter sets) , and the signalled index is used to select one candidate from the reordered candidates.
[0125] Example 5:
[0126] In ALF, N APSs are allowed at slice / picture level, and there are {K1, K2, …, KN} filters (or filter sets) in these APSs. A first codeword scheme - truncated binary with maximum number equal to N, is used to signal an APS index for all CTUs, but a second codeword scheme, truncated unary with maximum number equal to Ki, is varied between CTUs based on the APS index selected by each CTU (Ki depends on APS index) . When reconstructing one CTU, one APS list is generated by reordering the allowed APSs based on the APS selection of neighbouring CTUs. The signalled APS index is used to select one APS for the current CTU from the reordered list, and the signalled filter (set) index is used to select one filter (set) from the selected APS. When reordering the APSs, if a filter (set) candidate is selected by one neighbouring CTU, the filter (set) will be swapped with an APS at a former position in the list, where the swapped APS should have the same number of filters (or filter sets) . For example, there are 5 APSs {APS0, APS1, APS2, APS3, APS4} with the number of filters (or filter sets) equal to {1, 2, 3, 3, 2} , respectively. Given a current CTU, one neighbouring CTU selects APS4, the list will be reordered to {APS0, APS4, APS2, APS3, APS1} since APS1 contains the same number of filters (or filter sets) as APS4. Note that this example follows the same syntax design in ECM luma ALF, and brings the concept of candidate reordering without introducing parsing issues.
[0127] Embodiment 4. Embodiment 4 is also based on Embodiment 1. In Embodiment 4, for each block, APS selection and filter (or filter set) selection are signalled together. At the parsing stage, allowed (APS index, filter (set) index) pairs are determined at a high level, and a codeword scheme pre-determined or determined by a set of high-level flags is used for all coding blocks to signal an index indicating the selected pair. At the reconstruction stage, candidates of (APS, filter (set) ) pair are reordered based on reconstruction information, and the signalled index is used to select one candidate from the reordered candidates.
[0128] Example 6:
[0129] In ALF, N APSs are allowed at slice / picture level, and there are {K1, K2, …, KN} filters (or filter sets) in these APSs. A total number of M = (K1+K2+…+KN) pairs are considered. The same codeword scheme - truncated binary / unary with maximum equal to M, is used for all CTUs in the slice / picture. When reconstructing one CTU, one (APS, filter (set) ) pair list is generated by reordering the allowed pairs based on the selection of neighbouring CTUs. The signalled pair index is used to select one pair for the current CTU from the reordered list. When reordering the pairs, if a pair candidate is selected by one neighbouring CTU, the pair will be moved to a former position in the list.
[0130] Embodiment 5. Embodiment 5 is based on Embodiments1~4. In Embodiment 5, only partial APSs, filter sets, or filters are reordered. At the parsing stage, one or more flags are signalled first to indicate whether reordering is used for each coding block. If reordering is used, the codeword scheme of reordered candidates (any methods described in embodiment 1~4) is used. At the reconstruction stage, if reordering is used for a current block, candidates of APS, filter set, or filter are reordered based on reconstruction information, and the signalled index is used to select one candidate from the reordered candidates.
[0131] Example 7:
[0132] In ALF, one CTU-level flag is signalled to indicate whether reordering is used. At the parsing stage, if the flag indicates that reordering is enabled, the codeword scheme for reordered candidates is used (any methods described in Example 1~6) for this CTU. Otherwise, a VVC / ECM-like codeword scheme is used: truncated binary for APS and truncated unary for filters (or filter sets) with maximum numbers specified in slice / picture / APS level.
[0133] Example 8:
[0134] In ALF, one or more CTU-level flags are signalled to indicate whether reordering is used. At the parsing stage, the codeword scheme of the flag (s) is truncated binary / unary with maximum equal to C+1 (the last one indicating reordering is not used) , where C is a pre-determined number representing the maximum number of reordered candidates for one CTU. For examples: 1. C = 3. For one CTU, 3 candidates based on the selection of neighbouring CTUs (e.g. left, top, and top-left) form a reordered candidate list. If 0, 1, or 2 is signalled, the corresponding candidate in the reordered list will be used; if 3 is signalled, the candidate selection is further signalled without reordering. 2. C = 1. For one CTU, 1 most probable candidate is selected based on the selection of neighbouring CTUs. If 0 is signalled, the most probable candidate will be used; if 1 is signalled, the candidate selection is further signalled without reordering.
[0135] In the above embodiments, reordering can be performed by checking the ALF selection of already reconstructed CTUs and moved the already selected APSs, filter sets, or filters to a forward position, where the already reconstructed CTUs can include one or a combination of the following: 1. Left CTU 2. Top CTU 3. Top-left CTU 4. Non-adjacent CTUs given pre-determined positions 5. History-based CTUs A. A counter recording the occurrence of each candidate. B. A FIFO recording the already selected candidates C. A table recording the order of the candidates; if the current candidate is in the table, move the current candidate to a former position; if the current candidate is not in the list, add the current candidate to the table The storage of history information should be reset for each CTU row when wavefront coding is used. 6. Collocated CTUs 7. Non-adjacent collocated CTUs given pre-determined positions
[0136] In the above embodiments, reordering can be performed by applying template matching, that is, apply filtering by filters (or filter sets) to the neighbouring samples of current block, and use these results to calculate cost between neighbouring reconstructed samples, then use costs to reorder APSs, filter sets, or filters.
[0137] In the above embodiments, reordering can be performed by applying boundary matching to current block, that is, apply filtering by filters (or filter sets) to the top N rows and / or left N columns of current block, and use these results to calculate cost between neighbouring reconstructed samples, then use costs to reorder APSs, filter sets, or filters.
[0138] In the above embodiments, when reordering APSs, the minimum / maximum / averaged cost of all filters (or filter sets) in one APS is used to represent this APS and use this cost to reorder APSs.
[0139] ALF Coding-Information-Based Taps
[0140] In general, ALF reconstruction process can be represented by: where R (x, y) is the sample value before ALF filtering (pre-ALF) , is the sample value after ALF filtering, ci is the i-th filter coefficient, and ni is the i-th filter tap input. Specifically, ni can be a clipped sample difference derived from pre-ALF samples, fixed-filtered pre-ALF samples, samples before deblocking filtering (pre-DBF) , fixed-filtered pre-DBF samples, residuals, or fixed-filtered residuals. However, the same set of coefficients {ci} may not be suitable for blocks coded by different modes. In this invention, coding information before ALF is used as supplementary information to determine the ALF taps.
[0141] Embodiment 1. In Embodiment 1, when applying ALF to a current block, for a subset of ALF taps (cini for some i) , coefficients (ci) are selected according to some coding information of the block. The coding information includes one or a combination of the following: 1. Boundary or partition information 2. Prediction mode such as intra, inter, or intra block copy (IBC) 3. Motion vector or block vector information 4. Motion type (translational motion or not) 5. Prediction direction (uni-prediction or bi-prediction) 6. Reference frame information such as its frame type, temporal ID, or QP 7. Sample values of predictor or residual 8. Deblocking / BIF / SAO / CCSAO information 9. QP
[0142] Example 1:
[0143] The subset of ALF taps contains some residual-based taps (residual taps and / or fixed-filtered residual taps) , and the coding information is the prediction mode. When a current block is predicted by an intra mode, a first set of residual-based tap coefficients is used for filtering the current block. When a current block is predicted by an inter mode, a second set of residual-based tap coefficients is used for filtering the current block.
[0144] Example 2:
[0145] The subset of ALF taps contains some residual-based taps (residual taps and / or fixed-filtered residual taps) , and the coding information is the reference frame information. When a current block is predicted from a reference frame with a higher QP, a first set of residual-based tap coefficients is used for filtering the current block. When a current block is predicted from a reference frame with a lower QP, a second set of residual-based tap coefficients is used for filtering the current block.
[0146] Example 3:
[0147] The subset of ALF taps contains some fixed-filter-based taps (fixed-filtered pre-ALF taps, fixed-filtered pre-DBF taps, and / or fixed-filtered residual taps) , and the coding information includes the boundary / partition information and the residual sample values. When a current block is near a CU or TU boundary and the residual sample values are large enough, a first set of fixed-filter-based tap coefficients is used for filtering the current block. Otherwise, a second set of fixed-filter-based tap coefficients is used for filtering the current block.
[0148] Embodiment 2. In this embodiment, when applying ALF to a current block, for a subset of ALF taps (cini for some i) , tap inputs (ni) are selected according to some coding information of the block. The coding information includes one or a combination of the items listed in Embodiment 1.
[0149] Example 4:
[0150] The subset of ALF taps contains some residual-based taps (residual taps and / or fixed-filtered residual taps) , and the coding information is the prediction mode. Let tap indices r, r+1 be the residual taps and tap indices r+2, r+3 be the fixed-filtered residual taps. The reconstruction equation is: where nr= (block at (x, y) is intra) ? (residual (x, y) ): 0 nr+1= (block at (x, y) is intra) ? 0: (residual (x, y) ) nr+2= (block at (x, y) is intra) ? (fixed_filtered_residual (x, y) ): 0 nr+3= (block at (x, y) is intra) ? 0: (fixed_filtered_residual (x, y) ) .
[0151] If non-linear filtering is enabled, a clipping operation could be applied to nr, …, nr+3before multiplying with the corresponding coefficients (cr, …, cr+3) .
[0152] Note that this example is an alternative ALF design to achieve the same operations in Example 1.
[0153] Example 5:
[0154] The subset of ALF taps contains some fixed-filter-based taps (fixed-filtered pre-ALF taps, fixed-filtered pre-DBF taps, and / or fixed-filtered residual taps) , and the coding information includes the boundary / partition information and the residual sample values. Let tap indices r, r+1, r+2, r+3 be the center taps of fixed-filter pre-ALF taps, the reconstruction equation is: where nr= ( (x, y) is at CU or TU boundary || residual (x, y) >T)? m0: 0 nr+1= ( (x, y) is at CU or TU boundary || residual (x, y) >T)? 0: m0 nr+2= ( (x, y) is at CU or TU boundary || residual (x, y) >T)? m1: 0 nr+3= ( (x, y) is at CU or TU boundary || residual (x, y) >T)? 0: m1. m0=fixed_filtered_preALF_0 (x, y) -preALF (x, y) m1=fixed_filtered_preALF_1 (x, y) -preALF (x, y) where m0 and m1 are pre-ALF samples filtered by two different fixed filters. If non-linear filtering is enabled, a clipping operation could be applied to nr, …, nr+3 before multiplying with the corresponding coefficients (cr, …, cr+3) .
[0155] Note that this example is an alternative ALF design to achieve the same operations in Example 3.
[0156] The foregoing proposed methods can be implemented in encoders and / or decoders. For example, the proposed method can be implemented in an in-loop filtering module of an encoder, and / or an in-loop filtering module of a decoder.
[0157] Any of the methods of ALF signalling design as described above can be implemented in encoders and / or decoders. Also, any of the methods described above can be implemented in encoders and / or decoders. For example, any of the proposed methods can be implemented in the in-loop filter module (e.g. ILPF 130 in Fig. 1A and Fig. 1B) of an encoder or a decoder. Alternatively, any of the proposed methods can be implemented as circuits coupled to the inter coding module of an encoder and / or motion compensation module, a merge candidate derivation module of the decoder. The simplified ALF methods may also be implemented using executable software or firmware codes stored on a media, such as hard disk or flash memory, for a CPU (Central Processing Unit) or programmable devices (e.g. DSP (Digital Signal Processor) or FPGA (Field Programmable Gate Array) ) .
[0158] Fig. 11 illustrates a flowchart of an exemplary video coding system that uses the signalling design for selecting a target ALF filter or filter set according to an embodiment of the present invention. The steps shown in the flowchart may be implemented as program codes executable on one or more processors (e.g., one or more CPUs) at the encoder side. The steps shown in the flowchart may also be implemented based hardware such as one or more electronic devices or processors arranged to perform the steps in the flowchart. According to one method, reconstructed pixels are received in step 1110, wherein the reconstructed pixels comprise current reconstructed pixels in a current block. One or more target indexes for selecting an ALF APS, a filter set, a filter, or a combination thereof are signalled or parsed by using a same codeword type to code the target index for all coding blocks in a picture region comprising the current block in step 1120. Candidates in the ALF APS, the filter set, or the filter are reordered based on neighbouring information in step 1130. One or more target candidates are selected from the reordered ALF APS in step 1140, the reordered filter set, the reordered filter, or a combination thereof based on said one or more target indexes. A filtered output is derived by applying a target filter associated with said one or more target candidates to the current reconstructed pixels in step 1150. The filtered output is provided in step 1160.
[0159] 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.
[0160] 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.
[0161] 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.
[0162] 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.
Claims
1.A method for Adaptive Loop Filter (ALF) processing of reconstructed video, the method comprising:receiving reconstructed pixels, wherein the reconstructed pixels comprise current reconstructed pixels in a current block;signalling or parsing one or more target indexes for selecting an ALF APS, a filter set, a filter, or a combination thereof by using a same codeword type to code the target index for all coding blocks in a picture region comprising the current block;reordering candidates in the ALF APS, the filter set, or the filter using neighbouring information;selecting one or more target candidates from the reordered ALF APS, the reordered filter set, the reordered filter, or a combination thereof based on said one or more target indexes;deriving a filtered output by applying a target filter associated with said one or more target candidates to the current reconstructed pixels; andproviding the filtered output.2.The method of Claim 1, wherein the same codeword type comprises truncated binary code with a same number of codewords.3.The method of Claim 2, wherein a maximum number of codewords for the truncated binary code is equal to N to allow N ALF APSs, N filter sets, N filters, or a combination thereof to be coded in a slice or picture level for all CTUs (Coding Tree Units) , wherein N is a positive integer.4.The method of Claim 1, wherein when reconstructing one CTU, one or more reordered lists of ALF APSs, filter sets, or filters are generated by reordering allowed ALF APSs, filter sets or filters based on previous ALF APS selection, filter set selection or filter selection of one or more neighbouring CTUs.5.The method of Claim 4, wherein if one allowed ALF APS, filter set or filter is selected according to the previous ALF APS selection, filter set selection or filter selection of said one or more neighbouring CTUs, said one allowed ALF APS, filter sets or filter is moved forward in said one or more reordered lists of ALF APSs, filter sets, or filters respectively.6.The method of Claim 4, wherein a first target index for selecting a target filter set or filter is signalled or parsed after signalling or parsing a second target index for selecting a target ALF APS.7.The method of Claim 6, wherein a first codeword type to signal the first target index for selecting the target ALF APS is pre-determined or determined by a first set of high-level flags and is used for said all coding blocks.8.The method of Claim 7, wherein a second codeword type to signal the second target index for selecting the target filter set or filter is pre-determined or determined by a second set of high-level flags and is used for said all coding blocks.9.The method of Claim 7, wherein a target first codeword type of the first target index for the current block is used to determine a second codeword type to signal the second target index for selecting the target filter set or filter.10.The method of Claim 7, wherein one reordered list of ALF APSs is generated based on the previous ALF APS selection of said one or more neighbouring CTUs, and wherein one ALF APS is only allowed to be swapped with another ALF APS with a same number of filter sets or filters.11.The method of Claim 4, wherein a first target index for selecting a target filter set or filter and a second target index for selecting a target ALF APS are signalled or parsed together.12.The method of Claim 11, wherein pairs of the first target index and the second target index are signalled or parsed at a high level.13.The method of Claim 4, wherein only partial allowed ALF APSs, filter sets or filters are reordered to generate said one or more reordered lists of ALF APSs, filter sets, or filters respectively.14.The method of Claim 1, wherein said one or more neighbouring CTUs comprise a left CTU, a top CTU, a top-left CTU, one or more non-adjacent CTUs at first pre-determined positions, one or more collocated CTUs, one or more non-adjacent collocated CTUs at second pre-determined positions, one or more history-based CTUs, or a combination thereof.15.The method of Claim 1, wherein one or some flags are signalled or parsed to indicate whether said reordering the candidates in the ALF APS, the filter set, or the filter is performed.16.The method of Claim 1, wherein said reordering the candidates in the ALF APS, the filter set, or the filter uses template matching between filtered neighbouring samples of the current block and neighbouring reconstructed samples in a template region, wherein the filtered neighbouring samples of the current block is generated by applying the target filter to the neighbouring samples of the current block.17.The method of Claim 1, wherein said reordering the candidates in the ALF APS, the filter set, or the filter uses boundary matching between filtered neighbouring samples of the current block and the current block, wherein the filtered neighbouring samples of the current block is generated by applying the target filter to the neighbouring samples of the current block.18.An apparatus for video coding, the apparatus comprising one or more electronics or processors arranged to:receive reconstructed pixels, wherein the reconstructed pixels comprise current reconstructed pixels in a current block;signal or parse one or more target indexes for selecting an ALF APS, a filter set, a filter, or a combination thereof by using a same codeword type to code the target index for all coding blocks in a picture region comprising the current block;reorder candidates in the ALF APS, the filter set, or the filter using neighbouring information;select one or more target candidates from the reordered ALF APS, the reordered filter set, the reordered filter, or a combination thereof based on said one or more target indexes;derive a filtered output by applying a target filter associated with said one or more target candidates to the current reconstructed pixels; andprovide the filtered output.
Citation Information
Patent Citations
ALF APS constraints in video coding
CN114175638A
Method and apparatus for syntax signaling restriction of cross-element adaptive loop filter for video coding systems
CN114731391A
Coding and decoding enhancement in cross-component sample adaptive offset
CN117413516A
Adaptive Loop Filter With Adaptive Parameter Set
US20200329239A1
In-loop filtering-based image coding apparatus and method
US20230050232A1