Determining adaptive loop filter coefficients for video coding
By using simulated annealing to determine ALF coefficients, the method efficiently optimizes video coding, addressing the computational inefficiencies of deterministic descent and enhancing video quality through improved compression efficiency and bit-rate savings.
Patent Information
- Application Number
- PCT/EP2025/068916
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-03
- Filing Date
- 2025-07-03
- Publication Date
- 2026-01-08
Smart Images

Figure EP2025068916_08012026_PF_FP_ABST
Abstract
Description
DETERMINING ADAPTIVE LOOP FILTER COEFFICIENTS FOR VIDEO CODING TECHNICAL FIELD
[0001] This disclosure relates to determining adaptive loop filter (ALF) coefficients for video coding. BACKGROUND
[0002] Enhanced Coding Model (ECM)
[0003] Versatile Video Coding (VVC), also known as H.266, is a block-based video codec which was developed by the Joint Video Experts Team (JVET), a team of experts from ITU-T VCEG and ISO / IEC MPEG, and which was firstly published in 2020.
[0004] JVET continues study on future video codec providing coding capabilities beyond VVC. The exploratory codec is called Enhanced Coding Model (ECM). The current ECM version is ECM-13.0.
[0005] Video Sequence, Picture, Color Components
[0006] ECM is used for compression of video sequences that consist of successive pictures. Each picture consists of 2-dimensional arrays of color components. Usually, each picture has three components: one luma component (Y) and two chroma components (Cb, Cr). Instead of Y, Cb, Cr, other color spaces such as I, Cp, Ct can also be used. Usually, the chroma components are half the size in both the x- and y- dimensions as compared to the luma component.
[0007] Coding Tree Unit (CTU), Coding Unit (CU), and Transform Unit (TU)
[0008] In VVC and ECM, each picture component is split into square top-level blocks called Coding Tree Units (CTUs). The maximum supported size of a CTU is 256x256 in ECM. Each CTU is split into rectangular Coding Units (CUs). The size of a CU varies from 4x4 to 256x256 in ECM.
[0009] It is common that a CU is associated with a Transform Unit (TU) and is then transform coded. However, if the size of the CU is higher than the maximum supported transform length, then the CU is split into several TUs.
[0010] Parameter Sets and Headers
[0011] ECM specifies three types of sets: Picture Parameter Set (PPS), Sequence Parameter Set (SPS), and Video Parameter Set (VPS). The PPS contains data that is common for a whole picture, the SPS contains data that is common for a coded layer video sequence (CLVS), and the VPS contains data that is common for multiple CLVSs.
[0012] During coding, a picture is split into slices each of which consists of several CTUs. Decoding of one slice in the picture is independent of decoding of other slices in the same picture. Pictures, slices, and CTUs have headers comprising syntax elements used by the decoder. Coding parameters in the picture header are common for all slices in the picture and coding parameters in the slice header are common for all CTUs in the slice.
[0013] Intra Prediction and Inter Prediction
[0014] Each CU is either intra predicted or inter predicted. If the CU is intra predicted, it is predicted using previously decoded blocks in the same picture. An intra picture is a picture in which all CUs must be intra predicted.
[0015] In inter prediction, the CU is predicted using previously decoded pictures. A picture that allows inter predicted blocks is called an inter picture.
[0016] Transform, Quantization, and Entropy Coding
[0017] Difference between the original samples and predicted samples of a CU is called residual. The residual is transformed into the frequency domain using one of the transforms supported by ECM. Examples of such transforms include but are not limited to the Discrete Cosine Transform (DCT), the Discrete Sine Transform (DST), etc.
[0018] The resulting transform coefficients are quantized and entropy coded, and the resulting bits are put into a bitstream. The level of quantization depends on quantization parameter (“QP parameter”) used for the CU. In some settings, all CUs belonging to the same picture may have the same QP parameter value.
[0019] Rate-Distortion Optimization (RDO)
[0001] Encoder in ECM extensively utilizes the rate-distortion theory to make decisions such as how to split a CTU into CUs, what type of prediction should be used, what area of the reference picture should be used for inter prediction, etc. To make such decisions, rate- distortion (RD) cost is calculated and minimized.
[0002] In-Loop Filters
[0001] Since transform coefficients are quantized during video encoding, the video encodingproduces losses. To reduce some artifacts and improve video quality, in-loop filters are introduced. In-loop filtering is done on the decoder side as well as on the encoder side. In the in-loop filtering, filtered pictures are used for inter-prediction. There are four in- loop filters in ECM-13.0: deblocking filter (DBF), sample adaptive offset (SAO), bilateral filter (BIF), and adaptive loop filter (ALF). SAO and ALF can be supplemented by cross-component (CC) counterparts. A flow of the in-loop filtering is shown in FIG.9.
[0002] Adaptive Loop Filter (ALF)
[0003] Adaptive loop filtering is designed to reduce quantization errors of the output pictures as well as of the reference pictures used for inter prediction, as disclosed in Reference [1] listed at the end of this disclosure. ALF is based on the Wiener filter, i.e. a linear filter that minimizes mean square error (MSE) between the original picture and the noised picture. In using ALF for video coding, the filter coefficients are signaled into a bitstream so that the decoder receiving the bitstream can apply the filter and improve quality of the reconstructed picture.
[0004] Let ^^^^^,^^^ be an output sample of the decoding stage preceding ALF, i.e. the sample at position ^^^,^^^ outputted by the combination of SAO, CC-SAO, and BIF (see FIG.9). TheALF output ^^^^^^,^^^ is defined as^ ^^^^^^,^^^ ൌ ^^^^^,^^^ ^ ^^^^^^^^^^,^^^,^1^ where ^^^is an ^^-th ^^^,^^^.
[0005] As disclosed in Reference [2] listed at the end of this disclosure, for luma samples, ECM-13.0 utilizes ALF with the filtering shape shown in FIG.10 with 40 taps, where the first 20 taps (taps 0-19) are samples in the neighboring pixels (spatial taps) and the other taps have more complex nature and include taps based on the output of the fixed filters, taps based on the input for deblocking filter (DBF), and taps based on the reconstructed residuals.
[0006] Coefficients ^^^are derived by the encoder. The derivation used in ECM-13.0 can be split into several parts. First, the optimal real valued coefficients are obtained by solving the Wiener-Hopf equations to minimize the MSE between the original picture and the filtered picture. Then, the coefficients are quantized, namely, multiplied by a constant 2^^ైూି^,rounded to integers, and clipped into the interval ^െ2^^ైూି^ ^ 1, 2^^ైూି^ െ 1^. Here, theparameter ^^^^^is called “precision.” Finally, a descent-based procedure is launched: at each iteration, each coefficient is tried to be increased or decreased by 1, the best (by MSE) changeof the coefficient is accepted, and the continue while there is an improvement of MSE. The actual filtering is done by formula (1) in integers and right bit shifting is utilized toproperly scale the ALF offset ∑^ ^ୀ^ ^^^^^^^^^, ^^^.
[0007] The quantized coefficients ^^^are signaled in a special header called adaptation parameter set (APS). In ECM- the coefficients are split into two groups (0-33 and 34-39)and different Golomb-Rice codes for different groups are used to convert the coefficients into the APS bitstream. For each group, four parameters of Golomb-Rice coding are iterated, and the best (by total required bits) choice is signaled in APS.
[0008] In ECM-13.0, the precision parameter ^^^^^is fixed to 8 for chroma component but is adaptive for luma component. Namely, for luma components, the values 6, 7, 8 and 9 are iterated for the parameter, and the best (by RD-cost) choice is signaled in APS. SUMMARY
[0009] Algorithms for obtaining optimal real-valued coefficients for an ALF is well known. However, in practice, real-valued coefficients are replaced by quantized coefficients, and it becomes computationally complex to find the optimal quantized coefficients. Accordingly, in some embodiments of this disclosure, there is provided a process for efficiently finding the optimal quantized coefficients for an ALF.
[0010] More specifically, in one aspect, there is provided a method for encoding a video. The method comprises obtaining an input set of coefficients and, using one or more randomly generated numbers, converting the input set of coefficients into a converted set of coefficients. The method further comprises selecting one of: the input set of coefficients; and the converted set of coefficients. The method further comprises, based on the selected one of the input set of coefficients and the converted set of coefficients, determining coefficients for an adaptive loop filter, ALF, and encoding the video using the determined coefficients.
[0011] In another aspect, there is provided a method for decoding a video. The method comprises receiving from a video encoder a bitstream which comprises coefficient data indicating coefficients of an adaptive loop filter, ALF. The method further comprises, based on the coefficient data, deriving the coefficients of the ALF, and decoding the video using the derived coefficients of the ALF. The coefficients of the ALF is generated by: (1) obtaining an input set of coefficients; (2) using one or more randomly generated numbers, converting the input set of coefficients into a converted set of coefficients; and (3) selecting one of: the inputset of coefficients; and the converted set of
[0012] In a different aspect, there is provided a computer program comprising instructions which when executed by processing circuitry cause the processing circuitry to perform the method of any one of the above embodiments.
[0013] In a different aspect, there is provided a carrier containing the computer program of the above embodiment. The carrier is one of an electronic signal, an optical signal, a radio signal, and a computer readable storage medium.
[0014] In a different aspect, there is provided an apparatus for encoding a video. The apparatus is configured to: (1) obtain an input set of coefficients; (2) using one or more randomly generated numbers, convert the input set of coefficients into a converted set of coefficients; and (3) select (s606) one of: the input set of coefficients; and the converted set of coefficients. The apparatus is further configured to, based on the selected one of the input set of coefficients and the converted set of coefficients, determine coefficients of an adaptive loop filter, ALF; and encode the video using the determined coefficients.
[0015] In a different aspect, there is provided an apparatus for decoding a video. The apparatus is configured to: receive from a video encoder a bitstream which comprises coefficient data indicating coefficients of an adaptive loop filter, ALF; based on the coefficient data, derive the coefficients of the ALF; and decode the video using the derived coefficients of the ALF. The coefficients of the ALF is generated by: (1) obtaining an input set of coefficients; (2) using one or more randomly generated numbers, converting the input set of coefficients into a converted set of coefficients; and (3) selecting one of: the input set of coefficients; and the converted set of coefficients.
[0016] In a different aspect, there is provided an apparatus comprising processing circuitry and a memory. The memory contains instructions executable by said processing circuitry, whereby the apparatus is operative to perform the method of any one of the above embodiments.
[0017] The embodiments of this disclosure improve compression efficiency measured as Bjontegaard delta (BD) rate compared to the existing ALF. Furthermore, the embodiments achieve bit-rate savings of 0.01% / 0.01% / 0.07% for AI / RA / LDB with the same run time for CPU implementation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, are incorporated herein and form part of the specification, illustrate various embodiments.
[0019] FIG.1 illustrates a system according to some embodiments.
[0020] FIG.2 is a schematic block diagram of an encoder according to some embodiments.
[0021] FIG.3 is a schematic block diagram of a decoder according to some embodiments.
[0022] FIG.4 shows the concept of deterministic descent approach and of simulated annealing.
[0023] FIG.5 shows a process according to some embodiments.
[0024] FIG.6 shows a process according to some embodiments.
[0025] FIG.7 shows a process according to some embodiments.
[0026] FIG.8 shows an apparatus according to some embodiments.
[0027] FIG.9 shows a flow of in-loop filtering.
[0028] FIG.10 shows filtering shapes.
[0029] FIG.11 shows a process according to some embodiments. DETAILED DESCRIPTION
[0030] FIG.1 illustrates a system 100 according to an embodiment. System 100 includes an encoder 102 and a decoder 104. In some embodiments, encoder 102 is in communication with decoder 104 via a network 110 (e.g., the Internet or other network). Encoder 102 encodes a source video sequence 101 into a bitstream comprising an encoded video sequence and may transmit the bitstream to decoder 104 via network 110.
[0031] In some embodiments, instead of or in addition to transmitting bitstream to decoder 104, the bitstream may be stored in a data storage unit 190 and decoder 104 may retrieve from the data storage unit 190 the bitstream containing the encoded video sequence. Data storage unit 190 may be co-located with encoder 102 or may be remote from encoder 102.
[0032] Decoder 104 decodes the pictures included in the encoded video sequence to produce video data (e.g., reconstructed pictures) for display. In some embodiments, decoder 104 may be part of a device 103 having a display device 106 (or display 106 for short). Device 103 may be a mobile device, a set-top device, a head-mounted display, or any other device, and may be a component of an extended reality (XR) system.
[0033] FIG. 2 illustrates functional of encoder 102 according to some embodiments. It should be noted that encoders may be implemented differently so implementation other than this specific example can be used. Encoder 102 employs a subtractor 241 to produce a residual block which is the difference in sample values between an input block and a prediction block (i.e., the output of a selector 251, which is either an inter prediction block output by an inter predictor 250 (a.k.a., motion compensator) or an intra prediction block output by an intra predictor 249). Then a forward transform 242 is performed on the residual block to produce a transformed block comprising transform coefficients. A quantization unit 243 quantizes the transform coefficients based on a quantization parameter (QP) value (e.g., a QP value obtained based on a picture QP value for the picture in which the input block is a part and a block specific QP offset value for the input block), thereby producing quantized transform coefficients which are then encoded into the bitstream by entropy encoder 244 (e.g., an entropy encoder) and the bitstream with the encoded transform coefficients is output from encoder 102. Next, encoder 102 uses the quantized transform coefficients to produce a reconstructed block. This is done by first applying inverse quantization 245 and inverse transform 246 to the transform coefficients to produce a reconstructed residual block and using an adder 247 to add the prediction block to the reconstructed residual block, thereby producing the reconstructed block, which is stored in the reconstructed picture buffer (RPB) 266. Loop filtering by an in-loop filter (LF) stage 267 is applied and the final decoded picture is stored in a decoded picture buffer (DPB) 268, where it can then be used by the inter predictor 250 to produce an inter prediction block for the next picture to be processed. LF stage 267 may include three sub-stages: i) a DBF, ii) an SAO filter and a BIF, and iii) an ALF.
[0034] FIG. 3 illustrates functional components of decoder 104 according to some embodiments. It should be noted that decoder 104 may be implemented differently so implementations other than this specific example can be used. Decoder 104 includes a decoder module 361 (e.g., an entropy decoder) that decodes from the bitstream quantized transform coefficient values of a block. Decoder 104 also includes a reconstruction stage 398 in which the quantized transform coefficient values are subject to an inverse quantization process 362 and inverse transform process 363 to produce a residual block. This residual block is input to adder 364 that adds the residual block and a prediction block output from selector 390 to form a reconstructed block. Selector 390 either selects to output an inter prediction block or an intra prediction block. The reconstructed block is stored in a RPB 365. The interprediction block is generated by inter module 350 and the intra prediction block is generated by intra prediction module 369. Following the reconstruction stage 398, an in-loop filter stage (LF) 367 applies one or more filters to the reconstructed blocks and the final decoded picture may be stored in a decoded picture buffer (DPB) 368. Like LF stage 267 shown in FIG. 2, LF stage 367 may include three sub-stages: i) a DBF, ii) an SAO filter and a BIF, and iii) an ALF.
[0035] As mentioned above, in a practical implementation of ALF, for example, in the ALF implementation in ECM-13.0, quantized coefficients are used, and there are various discrete optimization methods to find optimal quantized coefficients – i.e., the coefficients that may be used to optimally reconstruct the original picture. One example of such optimization methods is deterministic descent approach of ECM-13.0.
[0036] However, in some scenarios, the deterministic descent approach may not be the best way to find the optimal coefficients. For example, in some scenarios, the deterministic descent approach may find the optimal quantized coefficients too slowly. In other scenarios, the deterministic descent approach may not find the optimal quantized coefficients at all. This is illustrated in FIG.4A.
[0037] FIG. 4A illustrates very simplified concept of the deterministic descent approach and of the simulated annealing. As illustrated in FIG. 4A, in the deterministic descent approach, finding the optimal coefficients may stop at point 402. However, point 402 is not the global minimum. Rather, it is a local minimum.
[0038] In order to overcome the deficiency of the deterministic descent approach, in some embodiments, probabilistic methods such as simulated annealing may be used to find the optimal coefficients. As illustrated in FIG. 4B, in the simulated annealing, a random step is introduced during the descent, thereby resulting in passing over the local minimum. This would result in allowing the simulated annealing to find point 404 which is the global minimum.
[0039] FIG.5 shows an exemplary process 500 for finding an optimal set of ALF coefficients, according to some embodiments. The optimal set of ALF coefficients may be found using the simulated annealing. In some embodiments, process 500 may be performed by encoder 102 or by decoder 104. Process 500 begins with step s502.
[0040] Step s502 comprises determining initial set of ALF coefficients -- ^^^ൌ ^^^^^,^^^^,^^^ଶ, … ,^^^^ି^^ (i.e., determining ^^^ ൌ ^^^^^,^^^^,^^^ଶ, … ,^^^^ି^^, where iteration indexcurrent iteration is 0-thiteration, and ^^ in the subscript ^^ െ 1 of ^^^^ି^ is the number of ALF coefficients.
[0041] There are various ways of determining the initial set of ALF coefficients. In one example, the initial set of ALF coefficients is obtained by solving the Wiener-Hopf equations, quantizing the values obtained by solving the equations, rounding the quantized values to integers, and clipping the rounded values to a preset interval.
[0042] In some embodiments, step s502 also comprises initializing the value ^^^^^^of a skip counter. As explained in detail below, the value ^^^^^^of the skip counter indicates the number of times a converted set of ALF coefficients (^^^ᇱ) is not selected in a row (i.e., “skipped”) -- i.e., the number of times a non-converted coefficients (^^^) is selected in a row. Inone example, the value ^^^^^^of the skip counter is set to 0 during the initialization.
[0043] After determining the initial set of coefficients ^^^and initializing the value ^^^^^^of the skip counter, process 500 proceeds to step s504. Step s504 comprises incrementing the current iteration index i (which is zero initially) by one, and determining, for the current iteration, a first set of coefficients -- ^^^ ൌ ^^^^^,^^^^,^^^ଶ, … ,^^^^ି^^ (i.e., determining ^^^ ൌ^^^^^,^^^^,^^^ଶ, … ,^^^^ି^^, where iteration index i is equal to one). The first set of coefficients ^^^for 1st iteration may be determined based on the initial set of coefficients ^^^. In one example, ^^^ ൌ ^^^.
[0044] After incrementing the current iteration index i and determining the first set of coefficients ^^^, process 500 may proceed to step s506. Step s506 comprises determining a converted set of coefficients ^^^ᇱbased on the first set of coefficients ^^^. In some embodiments, the converted set of coefficients ^^^ᇱis generated by converting the values of a subset of the first set of coefficients ^^^.
[0045] More specifically, in some embodiments, from among the first set of coefficients ^^^, a certain number (e.g., 3) of coefficients is randomly selected, and the values of the selected coefficients are converted, thereby generating the converted set of coefficients ^^^ᇱ.
[0046] For example, let’s assume that the set of coefficients for 1st iteration is ^^^ൌ ^^^^^,^^^^,^^^ଶ, … ,^^^ଷଽ^ . If, in step s506, ^^^^ , ^^^^ , and ^^^ଶ are randomly selected from… ,^^^ଷଽ, and the values of ^^^^, ^^^ᇱ ᇱ ᇱ^, and ^^^ are converted to ^^^, ^^^, and ^^^,ଶ ^ ^ ଶthe converted set of coefficients ^^^ᇱis by replacing ^^^, ^^^, and ^^^in the first set^ ^ ଶof coefficients ^^^with ^^^ᇱ^, ^^^ᇱ^, and ^^^ᇱଶ. In other words, the converted set of coefficients for 1st iteration would be ^^ᇱ^ ൌ ^^^^ᇱ^,^^^ᇱ^,^^ᇱ^ଶ,^^^ଷ,^^^ସ, … ,^^^ଷଽ^.
[0047] There arein step s506. In some embodiments, the selected ALF coefficients may be converted using randomly generated numbers. For example, each of the selected coefficients can be converted by randomly increasing or decreasing the coefficient by a fixed number (e.g., 1) -- i.e., ^^^ᇱ^ = ^^^^^ rand^^െ1,1^^ where k is the index of the coefficients within the first set. So, in the above example, ^^ᇱ^^ = ^^^^ ^ rand^^െ1,1^^^^ᇱ^ଶ = ^^^ଶ ^ rand^^െ1,1^^^ rand^^െ1,1^^
[0048] After determining the ALF coefficients ^ᇱ^^, process 500 may proceed to step s508. Step s508 comprises calculating an acceptance probability value (APV) of the converted set of coefficients ^^^ᇱ(i.e., ^^^ᇱwhere i = 1) for 1st iteration. In some embodiments, the APV is a function of i, ^^^, and ^^^ᇱ-- i.e. APV = ^^^^^,^^^,^^^ᇱ^.
[0049] The APV of the converted set of coefficients may be determined based on a difference between ^^^, and ^^^ᇱ(e.g., ^^^- ^^^ᇱ, ^^^^ᇲ , ^^^ ൈ ^^^ - ^^ଶ ൈ ^^^ᇱ, etc.). For example, the APV is determined as follows: ^^^,^^ᇱ1 ^^^,^^^^ ൌ^ ^
[0050] Here,, and in process 500, simulated annealing is used to minimize ^^^^^^^. ^^ is a subject for optimization.
[0051] The above formula of ^^^^^,^^^,^^ᇱ^^ suggest that, at the latest iterations (^^ → ∞^, only thesolutions which decrease the objective function ^^^^^^^^ are accepted, but at the first iterations(in particular, ^^ ൌ 0^, solutions which increase the objective function might be accepted.
[0052] In some embodiments, the objective function is defined as follows: ^^^^^^^ ൌ MSE^^^^ ^ ^^^ ∙ Rate^^^^
[0053] In state-of-the-art optimization procedure from ECM-13.0, the objective function for the deterministic descent is equal to MSE between the original picture and the filtered picture. MSE^^^^in the above formula is equal to the MSE -- the objective function for the deterministicdescent. Rate^^^^ is the number of bits required to be signaled in APS to indicate theinput / converted set of coefficients. The value of Rate^^^^ may be determined based on the signaling method. For example, in ECM-13.0 where Golomb-Rice coding is used, each coefficient ^^^included in the input / converted set of coefficients is converted into a binary codeword ^^^^^^^ of length ^^^^^^^. Since the Golomb-Rice coding is a variable-length coding, lengths ^^^^^^^ may differ. Then, Rate^^^^ may be determined as follows: ^ Rate^^^^ ൌ ^ ^^^^^^^
[0054] In other words, Rate^^^^ mayof the binary codewords each of which is a conversion of a coefficient included in the input / converted set of coefficients). As mentioned above, the conversion of a coefficient included in the set of coefficients may be performed using the Golomb-Rice coding.
[0055] In one example, let’s assume that Golomb-Rice code with parameter ^^ ൌ 10 is usedfor the conversion and the sign of the coefficient is always signaled using 1 bit. In this example,^^^0^ ൌ 00000,^^^1^ ൌ 00001,^^^െ1^ ൌ 10001,^^^11^ ൌ 010001,^^^21^ ൌ0110001, ^^^0^ ൌ ^^^1^ ൌ ^^^െ1^ ൌ 5, ^^^11^ ൌ 6, ^^^21^ ൌ 7.
[0056] Let ^^ be an RDO parameter derived by the encoder that is used to calculate the RD- cost. ^^^may be a function of ^^ and iteration index i. For example, ^^ ⋅2
[0057] This indicates that, at the first i is equal to 0, ^^^is small, thereby making^^^^^^^ to be closer to MSE^^^^. On the other hand, at the latest iteration (^^ → ∞^, the objectivefunction tends to RD-cost.
[0058] After calculating the APV (i.e., ^^^^^,^^^,^^^ᇱ^), process 500 may proceed to step s510. Step s510 comprises comparing the APV to a comparison value and determining whether the APV is greater than the comparison value. In some embodiments, the comparison value may be a random number. In one example, the comparison value is a real number generated by a random number generator, which is greater than or equal to 0 but is less than 1 – i.e., rand^0,1^. The random number generator may be a true random number generator, a pseudo-random number generator (e.g., Xorshift), or any other different types of random number generators. In some embodiments, in order to provide an encoder reproducibility, one may use the same hardcoded pseudo-random number generator with a fixed seed for each simulated annealing launch.
[0059] If the APV (i.e., ^^^^^,^^^,^^ᇱ^^ ) is less than the comparison value (e.g., rand^0,1^),process 500 proceeds to step s512A. In step s512A, the ALF coefficients for the current iteration -- i.e., i-th iteration -- is set to be the ALF coefficients for the next iteration -- i.e., the(i+1)-th iteration. For example, in case ^^ ൌ 1, then in step s512A, ^^ଶ ൌ ^^^. Also, in steps512A, because the converted ALF coefficients ^^^ᇱare not used (“skipped”), the value of the skip counter increments by one. Then process 500 proceeds to step s514.
[0060] Step s514 comprises comparing the value ^^^^^^of the skip counter to the maximum number of allowed skips ^^^^^^^^௫and / or checking whether the current iteration index i is greater than or equal to the maximum iteration number ^^^^௫.
[0061] If ^^ ^^௫ ^^௫^^^^ ^ ^^^^^^ or ^^ ^ ^^ , then process 500 ends. ^^^^^^ being greater than orequal to ^^^^^^^^௫may indicate that there are no newly accepted solutions for a while, and thus the latest solutions ^^^is taken as the output of the optimization procedure.
[0062] On the contrary, if ^^^^^^ ^ ^^ ^^௫^^^^ and ^^ ^ ^^^^௫, then process 500 returns back tostep s504. Then, steps s504-s510 are performed again for the next iteration i=i+1.
[0063] Referring back to step s510, if the APV (i.e., ^^^^^,^^^,^^^ᇱ^) is greater than or equal to the comparison value (e.g., rand(0,1)), process 500 proceeds to step s512B. In step s512B, the converted ALF coefficients for the current iteration -- i.e., i-th iteration -- is set to be the ALFcoefficients for the next iteration -- i.e., the -th iteration. For example, in case ^^ ൌ 1, then,in step s512B, ^^ଶ ൌ ^^^ᇱ. Also, in step s512B, because the converted ALF coefficients ^^^ᇱare used (“skipped”), the value of the skip counter is reset to 0. Then process 500 proceeds to step s514.
[0064] As explained above, step s514 comprises comparing ^^^^^^to ^^^^^^^^௫and / or checkingwhether ^^ ^ ^^^^௫. If ^^ ^^௫ ^^௫^^^^ ^ ^^^^^^ or ^^ ^ ^^ , then process 500 ends. On the contrary,if ^^ ^^௫ ^^^^^^ ^ ^^^^^^ and ^^ ^ ^^ ௫, then process 500 returns back to step s504. Then, stepss504-s510 are performed again for the next iteration i=i+1.
[0065] The selected use of a converted set of coefficients which are generated using randomly generated numbers to find the optimal quantized coefficients introduces randomness in finding the optimal coefficients, and this randomness may be helpful in speeding up the process of finding the optimal coefficients or in preventing from finding non-optimal coefficients (e.g., finding the local minimum point 402 instead of finding the global minimum point 404).
[0066] FIG. 6 shows a process 600 for encoding a video according to some embodiments. Process 600 may be performed by encoder 102. Process 600 begins with step s602.
[0067] Step s602 comprises obtaining an input set of coefficients. Step s604 comprises using one or more randomly generated numbers, converting the input set of coefficients into a converted set of coefficients. Step s606 comprises selecting one of the input set of coefficients; and the converted set of coefficients. Step s608 comprises, based on the selected one of the input set of coefficients and the converted set of coefficients, determining coefficients of an adaptive loop filter, ALF. Step s610 comprises encoding the video using the determined coefficients.
[0068] In some embodiments, the method comprises iteratively performing steps s602-s606. The selected one of the input set of coefficients and the converted set of coefficients at i-th iteration corresponds to the input set of coefficients at (i+1)-th iteration.
[0069] In some embodiments, at the i-th iteration, one of the input set of coefficients and the converted set of coefficients is selected based on comparing a comparison value (e.g., ^^^^^,^^^,^^^ᇱ^) to a reference value (e.g., Rand(0,1)), and the comparison value is determined based on: i) a first value (e.g., ^^^^^^^^) determined based on the input set of coefficients (e.g., ^^^^) and ii) a second value (e.g., ^^^^^^^ᇱ^)) determined based on the converted set of coefficients.
[0070] In some embodiments, the value is determined based on a difference (e.g., ^^^^^^^^- ^^^^^^^ᇱ^) between the first value and the second value, and the value of i.
[0071] In some embodiments, the comparison value is determined based on: 1 ^^^^ି^^ା^^మ∙^ி^^^^^ିி^൫^^ᇲ൯^^ wherein ^^^is the input set of ^^ᇱis the converted set of^coefficients at the i-th iteration, ^^^^^^^^ is the first value, is the second value, and i is an integer that is greater than or equal to 0.
[0072] In some embodiments, each of one or more coefficients included in the converted set of coefficients is generated based on each of one or more coefficients included in the input set of coefficients and a randomly generated number.
[0073] In some embodiments, ^^ᇱ^^ ൌ ^^^^ ^ rand^^െ1,1^^, wherein^^ ᇱ^^ is a ^^ -th coefficientincluded in the converted set of coefficients at the i-th iteration, ^^^^ is a ^^ -th coefficientincluded in the input set of coefficients at the i-th iteration, and rand^^െ1,1^^is a randomly selected one of -1 and 1.
[0074] In some embodiments, ^^^^is a coefficient that is randomly selected from the input set of coefficients for the conversion of the input set of coefficients into the converted set of coefficients.
[0075] In some embodiments, the first value (e.g., ^^^^^^^^) is determined based on a difference between an original picture and a filtered picture that is filtered using the input set of coefficients, and the second value (e.g., ^^^^^^^ᇱ^)) is determined based on a difference between the original picture and a filtered is filtered using the converted set of coefficients.
[0076] In some embodiments, ^^^^^^^^ ൌ ^^^^^^^^^^^ ^ ^^^ ൈ ^^,^^^^^^ ᇱ^ ^ ൌ ^^^^^^^^^ ᇱ^ ^ ^ ^^^ ൈ^^, wherein ^^^^^^^^ is the first value thiteration, ^^^^^^^^^^^is the difference between the original picture and the filtered picture that is filtered using the input set of coefficients, ^^^^^^^^^^ᇱ^is the difference between the original picture and the filtered picture that is filtered using the converted set of coefficients, ^^^is a real number determined based on the value of i, and each of A and B is a positive integer.
[0077] In some embodiments, ^^ is a sum of lengths of binary codewords each of which is generated based on a conversion of a coefficient included in the input set of coefficients at thei-th iteration, and ^^ is a sum of lengths of codewords each of which is generated based on a conversion of a coefficient included in the converted set of coefficients at the i-th iteration.
[0078] In some embodiments, the conversion of a coefficient included in the input set of coefficients at the i-th iteration is performed using Golomb-Rice coding, and the conversion of a coefficient included in the converted set of coefficients at the i-th iteration is performed using Golomb-Rice coding.
[0079] In some embodiments, ^^ଶ ^ൌ ^^^ ⋅ ^ భ െ 1^ where ^^^ is a parameter for rate-
[0080] In some embodiments, the process 600 is performed by a video encoder, and performing the video coding comprises encoding a video using the determined coefficients.
[0081] FIG. 7 shows a process 700 for decoding a video. Process 700 may be performed by decoder 104. Process 700 begins with step s702. Step s702 comprises receiving from a video encoder a bitstream which comprises coefficient data indicating coefficients of an adaptive loop filter, ALF. Step s704 comprises, based on the coefficient data, deriving the coefficients of the ALF. Step s706 comprises decoding the video using the derived coefficients of the ALF. The coefficients of the ALF is generated by: (1) obtaining an input set of coefficients; (2) using one or more randomly generated numbers, converting the input set of coefficients into a converted set of coefficients; and (3) selecting one of: the input set of coefficients; and the converted set of coefficients. In some embodiments, the coefficients of the ALF is generated by encoder 102.
[0082] In some embodiments, the coefficients of the ALF are generated by iteratively performing the steps (1)-(3) above, and the selected one of the input set of coefficients and the converted set of coefficients at i-th iteration corresponds to the input set of coefficients at (i+1)- th iteration.
[0083] In some embodiments, at the i-th iteration, one of the input set of coefficients and the converted set of coefficients is selected based on comparing a comparison value (e.g., ^^^^^,^^^,^^^ᇱ^) to a reference value (e.g., Rand(0,1)), and the comparison value is determined based on: i) a first value (e.g., ^^^^^^^^) determined based on the input set of coefficients (e.g., ^^^^) and ii) a second value (e.g., ^^^^^^^ᇱ^)) determined based on the converted set of coefficients.
[0084] In some embodiments, the value is determined based on a difference (e.g., ^^^^^^^^- ^^^^^^^ᇱ^) between the first value and the second value, and the value of i.
[0085] In some embodiments, the comparison value is determined based on: 1 ^^^^ି^^ା^^మ∙^ி^^^^^ିி^൫^^ᇲ൯^^ wherein ^^^is the input set of ^^ᇱis the converted set of^coefficients at the i-th iteration, ^^^^^^^^ is the first value, is the second value, and i is an integer that is greater than or equal to 0.
[0086] In some embodiments, each of one or more coefficients included in the converted set of coefficients is generated based on each of one or more coefficients included in the input set of coefficients and a randomly generated number.
[0087] In some embodiments, ^^ᇱ^^ ൌ ^^^^ ^ rand^^െ1,1^^, wherein^^ ᇱ^^ is a ^^ -th coefficientincluded in the converted set of coefficients at the i-th iteration, ^^^^ is a ^^ -th coefficientincluded in the input set of coefficients at the i-th iteration, and rand^^െ1,1^^is a randomly selected one of -1 and 1.
[0088] In some embodiments, ^^^^is a coefficient that is randomly selected from the input set of coefficients for the conversion of the input set of coefficients into the converted set of coefficients.
[0089] In some embodiments, the first value (e.g., ^^^^^^^^) is determined based on a difference between an original picture and a filtered picture that is filtered using the input set of coefficients, and the second value (e.g., ^^^^^^^ᇱ^)) is determined based on a difference between the original picture and a filtered is filtered using the converted set of coefficients.
[0090] In some embodiments, ^^^^^^^^ ൌ ^^^^^^^^^^^ ^ ^^^ ൈ ^^,^^^^^^ ᇱ^ ^ ൌ ^^^^^^^^^ ᇱ^ ^ ^ ^^^ ൈ^^, wherein ^^^^^^^^ is the first value at the i-th iteration, ^^^^^^^ᇱ^ is the second value at the i-th iteration, ^^^^^^^^^^^is the difference between the original picture and the filtered picture that is filtered using the input set of coefficients, ^^^^^^^^^^ᇱ^is the difference between the original picture and the filtered picture that is filtered using the converted set of coefficients, ^^^is a real number determined based on the value of i, and each of A and B is a positive integer.
[0091] In some embodiments, ^^ is a sum of lengths of binary codewords each of which is generated based on a conversion of a coefficient included in the input set of coefficients at thei-th iteration, and ^^ is a sum of lengths of codewords each of which is generated based on a conversion of a coefficient included in the converted set of coefficients at the i-th iteration.
[0092] In some embodiments, the conversion of a coefficient included in the input set of coefficients at the i-th iteration is performed using Golomb-Rice coding, and the conversion of a coefficient included in the converted set of coefficients at the i-th iteration is performed using Golomb-Rice coding.
[0093] In some embodiments, ^^^ ൌ ^^^ ⋅ ^ଶ భെ 1^ where ^^^ is a parameter for rate-
[0094] In some embodiments, process 700 is performed by decoder 104.
[0095] FIG. 8 is a hardware block diagram of device 103, according to some embodiments. As shown in FIG.8, device 103 may comprise: processing circuitry (PC) 802, which includes one or more processors (P) 855 (e.g., one or more general purpose microprocessors and / or one or more other processors, such as an application specific integrated circuit (ASIC), field- programmable gate arrays (FPGAs), and the like), which processors may be co-located in a single housing or in a single data center or may be geographically distributed (i.e., encoder device 103 may be a distributed computing apparatus comprising multiple computers or may be a monolithic device comprising a single computer); at least one network interface 848 (e.g., a physical interface or air interface) comprising a transmitter (Tx) 845 and a receiver (Rx) 847 for enabling device 103 to transmit data to and receive data from other nodes connected to a network 110 (e.g., an Internet Protocol (IP) network) to which network interface 848 is connected (physically or wirelessly) (e.g., network interface 848 may be coupled to an antenna arrangement comprising one or more antennas for enabling encoder device 103 to wirelessly transmit / receive data); and a storage unit (a.k.a., “data storage system”) 808, which may include one or more non-volatile storage devices and / or one or more volatile storage devices. In embodiments where PC 802 includes a programmable processor, a computer readable storage medium (CRSM) 842 may be provided. CRSM 842 may store a computer program (CP) 843 comprising computer readable instructions (CRI) 844. CRSM 842 may be a non- transitory computer readable medium, such as, magnetic media (e.g., a hard disk), optical media, memory devices (e.g., random access memory, flash memory), and the like. In some embodiments, the CRI 844 of computer program 843 is configured such that when executedby PC 802, the CRI causes encoder device to perform steps described herein (e.g., steps described herein with reference to the flow charts). In other embodiments, encoder device 103 may be configured to perform steps described herein without the need for code. That is, for example, PC 802 may consist merely of one or more ASICs. Hence, the features of the embodiments described herein may be implemented in hardware and / or software.
[0096] Summary of Embodiments
[0097] A1. A method for encoding a video, the method comprising: (1) obtaining an input set of coefficients; (2) using one or more randomly generated numbers, converting the input set of coefficients into a converted set of coefficients; and (3) selecting one of: the input set of coefficients; and the converted set of coefficients; based on the selected one of the input set of coefficients and the converted set of coefficients, determining coefficients of an adaptive loop filter, ALF; and encoding the video using the determined coefficients.
[0098] A2. The method of embodiment A1, wherein the method comprises iteratively performing steps (1)-(3), and the selected one of the input set of coefficients and the converted set of coefficients at i-th iteration corresponds to the input set of coefficients at (i+1)-th iteration.
[0099] A3. The method of embodiment A2, wherein, at the i-th iteration, one of the input set of coefficients and the converted set of coefficients is selected based on comparing a comparison value (e.g., ^^^^^,^^^,^^^ᇱ^) to a reference value (e.g., Rand(0,1)), and the comparison value is determined based on: i) a first value (e.g., ^^^^^^^^) determined based on the input set of coefficients (e.g., ^^^^); and ii) a second value (e.g., ^^^^^^^ᇱ^)) determined based on the converted set of coefficients.
[0100] A4. The method of embodiment A3, wherein the comparison value is determined based on a difference (e.g., ^^^^^^^^- ^^^^^^^ᇱ^) between the first value and the second value, and the value of i.
[0101] A5. The method of embodiment A4, wherein the comparison value is determined based on: ^ ^ష^^శభ^మ∙^ಷ൫^ ᇲ^^wherein ^^^is the input set of coefficients at the i-th ^ା^^ ^൯షಷ^^^^ ^of coefficients at the i-th iteration, ^^^^^^ is the first value,^ ^^^^^^^^ᇱ^ is the second value, and i is an integer that is greater than or equal to 0.
[0102] A6. The method of any one of embodiments A1-A5, wherein each of one or morecoefficients included in the converted set of is generated based on each of one or more coefficients included in the input set of coefficients and a randomly generated number.
[0103] A7. The method of embodiment A6, wherein ^^ᇱ^^ ൌ ^^^^ ^ rand^^െ1,1^^, wherein^^^ᇱ^ is a ^^-th coefficient included in the converted set of coefficients at the i-th iteration, ^^^^is a ^^-th coefficient included in the input set of coefficients at the i-th iteration, and rand^^െ1,1^^ is a randomly selected one of -1 and 1.
[0104] A8. The method of embodiment A7, wherein ^^^^is a coefficient that is randomly selected from the input set of coefficients for the conversion of the input set of coefficients into the converted set of coefficients.
[0105] A9. The method of any one of embodiments A3-A8, wherein the first value (e.g., ^^^^^^^^) is determined based on a difference between an original picture and a filtered picture that is filtered using the input set of coefficients, and the second value (e.g., ^^^^^^^ᇱ^)) is determined based on a difference between the original picture and a that isfiltered using the converted set of coefficients.
[0106] A10. The method of embodiment A9, wherein ^^^^^^^^ ൌ ^^^^^^^^^^^ ^ ^^^ ൈ ^^,^^^^^^ᇱ^ ^ ൌ ^^^^^^^^^ ᇱ^ ^ ^ ^^^ ൈ ^^, wherein ^^^^^^^^ is the first value at the i-th iteration, ^^^^^^^ᇱ^ is the second value at the i-th iteration, ^^^^^^^^^^^ is the difference between the original picture and the filtered picture that is filtered using the input set of coefficients, ^^^^^^^^^^ᇱ^ is the difference between the original picture and the filtered picture that is filtered using the converted set of coefficients, ^^^is a real number determined based on the value of i, and each of A and B is a positive integer.
[0107] A11. The method of embodiment A10, wherein ^^ is a sum of lengths of binary codewords each of which is generated based on a conversion of a coefficient included in the input set of coefficients at the i-th iteration, and ^^ is a sum of lengths of binary codewords each of which is generated based on a conversion of a coefficient included in the converted set of coefficients at the i-th iteration.
[0108] A12. The method of embodiment A11, wherein the conversion of a coefficient included in the input set of coefficients at the i-th iteration is performed using Golomb-Rice coding, and the conversion of a coefficient included in the converted set of coefficients at the i-th iteration is performed using Golomb-Rice coding.
[0109] A13. The method of any one of A10-A12, wherein ^^^ ൌ ^^^ ⋅^ ଶ^ା భ െ 1^ where ^^^ is a parameter for rate-distortion optimization.భబ^^శభ^A14. The method of any one of embodiments A1-A13, wherein the method is performed by a video encoder.
[0111] B1. A method for decoding a video, the method comprising: receiving from a video encoder a bitstream which comprises coefficient data indicating coefficients of an adaptive loop filter, ALF; based on the coefficient data, deriving the coefficients of the ALF; and decoding the video using the derived coefficients of the ALF, wherein the coefficients of the ALF is generated by: (1) obtaining an input set of coefficients; (2) using one or more randomly generated numbers, converting the input set of coefficients into a converted set of coefficients; and (3) selecting one of: the input set of coefficients; and the converted set of coefficients.
[0112] C1. A computer program comprising instructions which when executed by processing circuitry cause the processing circuitry to perform the method of any one of embodiments A1-B1.
[0113] C2. A carrier containing the computer program of embodiment C1, wherein the carrier is one of an electronic signal, an optical signal, a radio signal, and a computer readable storage medium.
[0114] D1. An apparatus for encoding a video, the apparatus being configured to: (1) obtain an input set of coefficients; (2) using one or more randomly generated numbers, convert the input set of coefficients into a converted set of coefficients; and (3) select one of: the input set of coefficients; and the converted set of coefficients; based on the selected one of the input set of coefficients and the converted set of coefficients, determine coefficients of an adaptive loop filter, ALF; and encode the video using the determined coefficients.
[0115] D2. The apparatus of embodiment D1, wherein the apparatus is configured to perform the method of any one of embodiments A2-A14.
[0116] E1. An apparatus for decoding a video, the apparatus being configured to: receive from a video encoder a bitstream which comprises coefficient data indicating coefficients of an adaptive loop filter, ALF; based on the coefficient data, derive the coefficients of the ALF; and decode the video using the derived coefficients of the ALF, wherein thecoefficients of the ALF is generated by: (1) an input set of coefficients; (2) using one or more randomly generated numbers, converting the input set of coefficients into a converted set of coefficients; and (3) selecting one of: the input set of coefficients; and the converted set of coefficients.
[0117] F1. An apparatus comprising: processing circuitry; and a memory, said memory containing instructions executable by said processing circuitry, whereby the apparatus is operative to perform the method of any one of embodiments A1-B1.
[0118] Abbreviations ITU-T The International Telecommunication Union Telecommunication Standardization Sector VCEG Video Coding Experts Group ISO / IEC International Organization for Standardization / International Electrotechnical Commission MPEG Moving Picture Experts Group RD Rate Distortion AI All Intra RA Random Access LDB Low-Delay CPU Central Processing Unit
[0119] Additional Disclosure
[0120] 1. Intro
[0121] This disclosure proposes to restrict allowed values of ALF coefficients to the elementsof set ^^^ ⋅ 2^^, where ^^ ∈ ^െ1, 0, 1^ or ^^ ∈ ^െ3,െ2,െ1, 0, 1, 2, 3^, and ^^ is a non-negativeinteger. The coefficients are derived using Simulated Annealing approach and signaled into APS using Huffman coding.
[0122] The proposed algorithm is implemented on the top of ECM-13.0. According to simulation results under common test conditions (CTC), BD-rate PSNR impact is reported to be -0.03% / -0.08% / -0.11% for AI / RA / LDB configuration for Luma. The average encodingrun time is reported to be for AI / RA / LDB configuration. The average decoding run time is reported to be 100.6% / 100.9% / 100.8% for AI / RA / LDB configuration. The proposed solution eliminates multiplications by 3 or more-bit numbers when Adaptive Loop Filter (ALF) is applied. The hardware complexity is claimed to be reduced.
[0123] Adaptive loop filtering may be applied in video coding. ALF is designed to reduce quantization errors of the output pictures as well as of the reference pictures used for inter- prediction (see reference [1]). ALF is included into Versatile Video Coding (VVC), also known as H.266, developed by the Joint Video Experts Team (JVET). ALF is also included into ECM-13.0 (reference [2]) as one of the stages in loop filtering as showed in FIG.9. The proposed algorithm provides (hardware) complexity reduction of ALF model in ECM-13.0 as well as provides bitrate savings.
[0124] 2. Background
[0125] Let ^^^^^,^^^ be an output sample of the decoding stage preceding ALF, i.e. sample at position ^^^,^^^ outputted by combination of SAO, CC-SAO and BIF (see FIG.9), the ALFoutput ^^^^^^,^^^ is defined as:^ ^^^^^^,^^^ ൌ ^^^^^,^^^ ^ ^^^^^^^^^^,^^^,^1^ where ^^^is an ^^-th^^^,^^^. For luma samples, ECM-13.0 [2] utilizes ALF with the filtering shape depicted in FIG.10 with 40 taps, where the first 20 taps (taps 0-19) are samples in the neighboring pixels (spatial taps) and the other taps have more complex nature and include taps based on the output of the fixed filters, taps based on the input for deblocking filter (DBF), taps based on the reconstructed residuals.
[0126] Coefficients ^^^are derived by the encoder. The derivation used in ECM-13.0 can be split into several Firstly, the optimal real-valued coefficients are obtained by solvingWiener-Hopf equations to minimize the mean square error (MSE) between the original picture and the filtered picture. Secondly, the coefficients are quantized, namely, multiplied by a constant 2^^ైూି^, rounded to integers and clipped into the interval ^െ2^^ైూି^^1, 2^^ైూି^ െ 1^. Parameter ^^^^^ is called a precision. Finally, a descent-based procedure islaunched: at each iteration, each coefficient is tried to be increased or decreased by 1, the best(by MSE) change of a coefficient is the iterations continue while there is an improvement of MSE. The actual filtering is done by formula (1) in integers and right bit shifting is utilized to properly scale the ALF offset ∑^ ^ୀ^ ^^^^^^^^^,^^^.
[0127] Quantized coefficients ^^^are signaled in a special header called adaptation parameter set (APS). In ECM-13.0, the coefficients are split into two groups (the group number is defined by index ^^, and for example, for luma, the group number equals the results of comparison ^^ ^ 34) and different Golomb-Rice codes for different groups are used to convertthe coefficients into the APS bitstream. For each group, four parameters of Golomb-Rice coding are iterated, and the best (by total number of required bits) choice is signaled in APS.
[0128] In ECM-13.0, the precision parameter ^^^^^is fixed to be 8 for chroma component but is adaptive to luma component. Namely, the values 6, 7, 8 and 9 are iterated, the best (by RD-cost) choice is signaled in APS.
[0129] 3. Set of Allowed Coefficient Values
[0130] Let ^^^^^be ALF coefficients precision and denote the mantissa precision by ^^^. In the proposed solution, the quantized ALF coefficients are limited to the elements of the set ^^^^ైూ,^^ ൌ ^^^ ⋅ 2^^, where ^^ and b are integers, ^^ ∈ ^െ2^^ ^ 1, 2^^ െ 1^ and ^^ ∈to the interval ^^ైూି^ ^^ైూି^^െ2 , 2 ^. For example,^^^,^ ൌ ^െ32,െ16,െ8,െ4,െ2,െ1,0,1,2,4,8,16,32^, ^^^,ଶ ൌ^െ64,െ48,െ32,െ24,െ16,െ12,െ8,െ6,െ4,െ3,െ2,െ1,0,1,2,3,4,6,8,12,16,24,32,48,64^.
[0131] For each configuration, the range of allowed mantissa precisions is hardcoded. For chroma component, mantissa precision ^^^ ൌ 1 is utilized, but for luma component, mantissaprecision is configured as ^^^ ∈ ^1,2^. For luma, encoder signals 1 bit in APS to indicatewhich mantissa precision is used. The choice of ^^^value for luma is based on RD-cost.
[0132] The purpose of such limitation of the coefficient values is to decrease (hardware) complexity of ALF implementation. Similar ideas were presented to JVET, for example, in [3-4], however, resulting in coding loses. In this contribution, opposite to [3-4], bit-rate savings are provided.
[0133] 4. Signaling of Coefficients
[0134] The family of prefix-free binary codes is constructed to cover the full range of acceptable configurations defined by the following tuple: (luma / chroma, ^^^^^, ^^^,coefficients group). Coefficients are split groups in the same way as it is done in ECM-13.0: for example, for luma component, coefficients 0-33 belong to group 0 and coefficients 34-39 belong to group 1.
[0135] The constructed binary codes are based on Huffman coding. Huffman code is completely defined by the alphabet of symbols (e.g., allowed ALF coefficient values) and the probabilities or, equivalently, frequencies of the alphabet symbols. For example, in theproposed algorithm, for ^^^,^ ൌ ^െ32,െ16,െ8,െ4,െ2,െ1,0,1,2,4,8,16,32^ Huffman codebased on the array of frequencies^ 0, 0, 51, 1077, 4368, 4739, 11316, 3863, 5710, 2169, 224, 6, 0, ^ is built, where thefrequency of െ32 is 0, of െ16 is 0, of െ8 is 51, of െ4 is 1077 and so on. In total, 18 Huffman codes (16 for luma and 2 for chroma) are included into proposal.
[0136] Note that an efficient Huffman coding might be unfeasible for ECM-13.0 without changes introduced in section 3 since the number of allowed coefficient values is much higher than in the proposal.
[0137] 5 Coefficient Derivation
[0138] To improve the search of the ALF coefficients, especially in the case when ECM-13.0 is combined with the coefficient values limitation proposed in section 3, Simulated Annealing based search is introduced. A practical implementation of ALF, such as the implementation in ECM-13.0, works with quantized coefficients and moreover limited with a certain range of values, that is why solving Wiener-Hopf equations to find the optimal real-valued coefficients does not provide a reference for optimal quantized coefficients. There is a variety of discrete optimization methods to approximate the optimal coefficients. In ECM-13.0, deterministic descent approach is used, however, probabilistic methods such as Simulated Annealing demonstrate advantage in search of a solution in reasonable time.
[0139] Let ^^ ൌ ^^^^, ^^^, … , ^^^^ denote the filter coefficients and ^^^^^^ is an objective function.Simulated annealing approach is used to minimize ^^^^^^, and ^^ is a subject for optimization. It starts from the initial solution ^^^and continues for a number of iterations. At ^^-th iteration, a random change to the input solution ^^^is applied, resulting in a temporary solution ^^^ᇱ. Forexample, it may be done in such a way: 3 random coefficients ^^^భ , ^^^మ , ^^^య are chosen, andeach of them is randomly increased or decreased by 1, i.e. ^^ᇱ^ೕ ൌ ^^^ೕ ^ rand^^െ1,1^^. Then,objective function ^^^^^^^ is calculated and needs to decide whether to accept this random change or not. For example, the acceptance probability can be calculated as follows: ^^൫^^,^^′^,^^^൯ ൌ1 1ାexp^ି^^ା1^2⋅^ி^^^^^ିி^൫^^′, ൯^^solutions which decreases the value of objectivefunction ^^^^^^^^ are accepted, but at the first iterations (in particular, ^^ ൌ 0^, solutions whichincreases the value of objective function might be accepted. Then, random generator is used to make a decision: ^^^^^ᇱwith probability ^^^^^,^^^,^^^ᇱ^, ^ା^ ൌ ^^^^ , otherwise.
[0140] In state-of-the-procedure from ECM-13.0, the objective function for the deterministic descent equals MSE between the original picture and the filtered picture. In the proposed solution, ^^^^^^^ ൌ MSE^^^^ ^ ^^^ ⋅ Rate^^^^, where MSE^^^^ is the same MSEbetween the original picture and thepicture, Rate^^^^ is the number of bits required to be signaled in APS. ^^^may be defined in different ways, for example,(^^ → ∞^, the objective function tends to RD-cost, but at the firstiterations, the objective function is closer to MSE. If the number of iterations exceeds a preconfigured limit ^^^^௫or if there are no newly accepted solutions for a while (for example, for 8 ⋅ ^^^ ^ 1^ iterations in a row), the Simulated Annealing procedure is stopped, and thelatest solution is taken as output of the optimization procedure. The process of the simulated annealing is depicted in FIG.11.
[0141] The simulated annealing process may be launched several times with different initial solutions. For example, one can start from the solution obtained by the state-of-the-art optimization method from ECM-13.0 and run the simulated annealing 10 times, moreover, ^^- th launch takes the output of ^^^ െ 1^-th launch as the input.
[0142] Random number generator is extensively utilized in the simulated annealing approach. There is a variety of pseudo-random generators that can be used, for example, Xorshift. To provide an encoder reproducibility, one may use the same hardcoded pseudo-random number generator with a fixed seed for each simulated annealing launch.
[0143] 6. ALF Complexity Reduction
[0144] In general, hardware implementation of multiplication of ^^^-bit integer and ^^ଶ-bit integer takes ^^^^^^^^ଶ^logical gates, however if the values of ^^ଶ-bit integers are limited to pure powers of two, then multiplication becomes left bit shifting which can be implemented using the barrel shifter and resulting in complexity of ^^^^^^logଶ^^ଶ^ logical gates.
[0145] In ECM-13.0, the maximal bit width of ALF coefficient ^^^is 9 bits and suppose that the bit width of the tap ^^^^^^,^^^ is 12 bits. The complexity of formula (1) is roughly estimatedto be 28K logical gates (per pixel). In the proposed algorithm, ^^ ^^ ൌ ^^^ ⋅ 2 ^, and socalculating ^^^^^^^^^, ^^^ is same as calculating ^^^^ ⋅ 2^^^ ⋅ൌ ^^^^ ⋅ ^^^^^^,^^^^ ⋅ 2^^ . Themultiplication by 2^^ is simply left bit shifting, moreover, since െ3 ^ ^^^ ^ 3 in theproposed solution, all multiplications can be eliminated. Indeed, multiplication by 2-bit positive integer can be implemented with one summation and AND gates. The complexity of formula (1) is roughly estimated to be 16K logical gates, i.e.57% of the baseline complexity.
[0146] 7. Simulation Results
[0147] The proposal is implemented on top of ECM-13.0 and evaluated under the CTC. In the tables below, all reported runtimes (both EncT and DecT) are reliable.
[0148] The following tables show the results for PSNR-based BD-rate and encoding / decoding run time when all normative and encoder changes from Sections 3-5 are applied. All Intra Main 10 Normative & encoder changes over ECM-13.0 Y U V EncT DecT EncVmPeak DecVmPeak Class A1 -0.03% 0.00% 0.04% 100.7% 100.8% 102.3% 100.1% Class A2 -0.01% -0.02% 0.09% 100.4% 100.5% 102.7% 99.9% Class B -0.02% 0.03% -0.07% 100.0% 100.7% 102.9% 100.2% Class C -0.03% 0.06% 0.04% 100.0% 100.4% 99.9% 100.0% Class E -0.05% 0.10% -0.07% 100.7% 100.7% 100.5% 100.0% Overall -0.03% 0.04% 0.00% 100.3% 100.6% 101.7% 100.1% Class D -0.07% -0.27% -0.40% 99.5% 99.7% 100.3% 100.0% Class F -0.08% -0.11% -0.16% 100.4% 100.1% 101.9% 100.0%Class TGM -0.02% 0.01% 0.02% 100.5% 98.7% 100.0% Random Access Main 10Normative & encoder changes over ECM-13.0 Y U V EncT DecT EncVmPeak DecVmPeak Class A1 -0.10% -0.03% -0.15% 99.6% 101.4% 100.0% 99.7% Class A2 -0.10% -0.11% -0.04% 99.7% 101.2% 99.9% 100.1% Class B -0.11% -0.03% -0.22% 100.1% 101.1% 100.0% 100.1% Class C -0.02% -0.14% -0.15% 100.5% 100.0% 100.3% 100.0% Class EOverall -0.08% -0.08% -0.15% 100.0% 100.9% 100.1% 100.0% Class D -0.10% 0.00% -0.16% 100.6% 100.2% 100.9% 100.0% Class F -0.11% -0.07% -0.24% 100.8% 101.0% 100.1% 100.4% Class TGM 0.06% 0.10% 0.05% 100.3% 99.6% 100.2% 101.1% Low delay B Main 10Normative & encoder changes over ECM-13.0 Y U V EncT DecT EncVmPeak DecVmPeak Class A1 Class A2Class B -0.20% -0.75% -0.66% 100.1% 101.0% 100.2% 100.2% Class C -0.04% -0.55% -0.54% 100.7% 101.0% 100.5% 100.0% Class E -0.06% -0.53% -0.12% 100.9% 100.4% 101.1% 100.2% Overall -0.11% -0.63% -0.49% 100.5% 100.8% 100.5% 100.1% Class D -0.17% -1.02% -1.11% 99.2% 100.8% 101.0% 100.1% Class F -0.17% -0.64% -0.22% 100.3% 101.4% 100.0% 100.1% Class TGM -0.04% 0.13% 0.19% 100.4% 100.3% 100.6% 103.1%
[0149] The following tables show the results for PSNR-based BD-rate and encoding / decoding run time when only normative changes from Sections 3-4 are applied. All Intra Main 10Only normative changes over ECM-13.0 Y U V EncT DecT EncVmPeak DecVmPeak Class A1 -0.02% 0.01% 0.06% 100.4% 100.7% 100.9% 100.1%Class A2 0.02% 0.04% 0.19% 100.2% 99.9% 100.5% 100.0% Class B 0.00% 0.07% 0.05% 100.0% 100.6% 105.6% 99.9% Class C -0.01% 0.11% 0.08% 99.7% 99.7% 100.0% 100.0% Class E -0.01% 0.15% -0.08% 100.4% 100.2% 98.4% 100.0% Overall -0.01% 0.08% 0.06% 100.1% 100.2% 101.5% 100.0% Class D -0.05% -0.23% -0.37% 99.8% 100.2% 100.5% 100.0% Class F -0.05% -0.07% -0.12% 100.3% 100.4% 101.9% 100.0% Class TGM 0.01% 0.07% 0.10% 100.1% 100.4% 99.9% 100.1% Random Access Main 10Only normative changes over ECM-13.0 Y U V EncT DecT EncVmPeak DecVmPeak Class A1 -0.06% 0.00% -0.26% 99.7% 101.2% 100.2% 99.7% Class A2 -0.05% 0.03% 0.13% 99.8% 101.1% 100.4% 100.1% Class B -0.05% 0.05% -0.07% 99.9% 101.0% 100.3% 100.3% Class C -0.01% -0.09% 0.04% 100.0% 100.8% 100.3% 100.1% Class E Overall -0.04% 0.00% -0.04% 99.9% 101.0% 100.3% 100.1% Class D -0.03% -0.04% -0.19% 100.1% 100.3% 100.6% 100.0% Class F -0.03% -0.13% -0.17% 100.4% 100.1% Class TGM -0.09% 0.03% 0.07% 100.0% 99.7% 99.8% 99.9% Low delay B Main 10Only normative changes over ECM-13.0 Y U V EncT DecT EncVmPeak DecVmPeak Class A1Class A2Class B -0.11% -0.63% -0.49% 99.9% 101.7% 100.2% 100.2% Class C -0.02% -0.31% -0.61% 99.6% 100.9% 101.0% 100.0% Class E -0.01% 0.69% -0.01% 100.1% 99.2% 101.5% 100.2% Overall -0.05% -0.19% -0.41% 99.9% 100.8% 100.8% 100.1% Class D -0.07% -0.71% -0.27% 100.2% 100.2% 101.4% 100.2% Class F 0.02% 0.36% 0.02% 99.7% 102.2% 99.2% 100.2% Class TGM -0.03% 0.10% 0.14% 100.2% 100.9%
[0150] The following tables show the PSNR-based BD-rate and encoding / decoding run time when only encoder optimizations from Section 5 are applied All Intra Main 10Only encoder changes over ECM-13.0 Y U V EncT DecT EncVmPeak DecVmPeak Class A1 -0.01% 0.00% -0.02% 100.8% 101.0% 101.2% 99.9% Class A2 -0.01% -0.05% 0.00% 100.1% 101.0% 97.1% 100.1% Class B -0.01% 0.01% -0.05% 99.9% 100.4% 101.6% 100.0% Class C -0.01% 0.00% -0.01% 100.0% 100.0% 99.9% 100.0% Class E -0.02% 0.00% -0.03% 100.4% 100.8% 101.5% 100.0% Overall -0.01% 0.00% -0.02% 100.2% 100.6% 100.4% 100.0% Class D -0.02% -0.01% -0.01% 100.4% 99.9% 100.7% 100.0% Class F -0.02% -0.01% -0.02% 99.9% 99.9% 99.1% 100.0% Class TGM -0.02% -0.03% -0.02% 100.5% 100.4% 100.2% 100.0% Random Access Main 10Only encoder changes over ECM-13.0 Y U V EncT DecT EncVmPeak DecVmPeak Class A1 0.01% 0.04% -0.06% 100.0% 99.8% 100.2% 99.9% Class A2 -0.02% -0.09% 0.07% 100.1% 100.5% 100.3% 99.9% Class B -0.01% 0.03% -0.22% 100.4% 100.0% 99.9% 100.1% Class C -0.02% -0.04% -0.01% 100.4% 99.5% 100.6% 100.0% Class EOverall -0.01% -0.01% -0.07% 100.2% 99.9% 100.2% 100.0% Class D -0.05% -0.06% 0.04% 99.8% 99.5% 100.9% 100.0% Class F 0.06% 0.10% -0.05% 100.5% 100.4% 101.0% 100.1% Class TGM 0.02% -0.02% 0.00% 100.4% 99.5% 99.1% 100.0% Low delay B Main 10Only encoder changes over ECM-13.0 Y U V EncT DecT EncVmPeak DecVmPeak Class A1Class A2Class B -0.06% -0.36% -0.37% 100.3% 100.1% 100.2% 100.0% Class C -0.13% 0.02% -0.41% 99.7% 100.3% 100.5% 100.0% Class E -0.01% 0.58% 0.39% 100.5% 99.1% 100.3% 100.2% Overall -0.07% 0.00% -0.19% 100.2% 99.9% 100.3% 100.1% Class D -0.12% -0.56% -0.38% 99.3% 100.0% 101.2% 100.0% Class F -0.33% 0.02% -0.21% 99.6% 100.0% Class TGM -0.12% 0.01% -0.18% 100.3% 98.9%
[0151] Conclusion
[0152] While various embodiments are described herein, it should be understood that they have been presented by way of example only, and not limitation. Thus, the breadth and scope of this disclosure should not be limited by any of the above-described exemplary embodiments. Moreover, any combination of the above-described elements in all possible variations thereof is encompassed by the disclosure unless otherwise indicated herein or otherwise clearly contradicted by context.
[0153] As used herein transmitting a message “to” or “toward” an intended recipient encompasses transmitting the message directly to the intended recipient or transmitting the message indirectly to the intended recipient (i.e., one or more other nodes are used to relay the message from the source node to the intended recipient). Likewise, as used herein receiving a message “from” a sender encompasses receiving the message directly from the sender or indirectly from the sender (i.e., one or more nodes are used to relay the message from the sender to the receiving node). Further, as used herein “a” means “at least one” or “one or more.”
[0154] Additionally, while the processes described above and illustrated in the drawings are shown as a sequence of steps, this was done solely for the sake of illustration. Accordingly, it is contemplated that some steps may be added, some steps may be omitted, the order of the steps may be re-arranged, and some steps may be performed in parallel.
[0155] List of References
[0156] 1. C. -Y. Tsai et al., “Adaptive Loop Filtering for Video Coding,” in IEEE Journal of Selected Topics in Signal Processing, vol. 7, no. 6, pp. 934-945, Dec. 2013, doi: 10.1109 / JSTSP.2013.2271974.
[0157] 2. Coman, M., et. al., “Algorithm of Enhanced Compression Model 13 (ECM 13)”, JVET-AH2025, 34th Meeting: Rennes, FR, 17–24 April 2024.
[0158] 3. Esenlik, S., et. al., "CE2: Alf with Multiplication Replaced by Bit-Shifting (Test 2.5.1)," JVET-L0162, 12th Meeting: Macao, CN, 3–12 Oct.2018.
[0159] 4. Ström, J., et. al., "Non-CE5: Multiplication simplification for ALF and CC-ALF," JVET-Q0167, 17th Meeting: Brussels, BE, 7–17 January 2020.
Claims
1. A method (600) for encoding a video, the method comprising: 1) obtaining (s602) an input set of coefficients; 2) converting (s604) the input set of coefficients into a converted set of coefficients using one or more randomly generated numbers; and 3) selecting (s606) one of: the input set of coefficients; and the converted set of coefficients; based on the selected set of coefficients, determining (s608) adaptive loop filter, ALF, coefficients for an ALF; and encoding (s610) the video using the determined ALF coefficients.
2. The method of claim 1, wherein the method comprises iteratively performing steps 1)-3), and the selected one of the input set of coefficients and the converted set of coefficients at i-th iteration corresponds to the input set of coefficients at (i+1)-th iteration.
3. The method of claim 2, wherein, at the i-th iteration, one of the input set of coefficients and the converted set of coefficients is selected based on comparing a comparison value with a reference value, and the comparison value is determined based on: i) a first value determined based on the input set of coefficients; and ii) a second value determined based on the converted set of coefficients.
4. The method of claim 3, wherein the comparison value is determined based on a difference between the first value and the second value, and the value of i.
5. The method of claim 4, wherein the comparison value is determined based on:wherein ^^^is the input set of coefficients at the i-th iteration, ^^^ᇱis the converted set of coefficients at the i-th iteration, ^^^^^^^^ is the first value, ^^^^^^^ᇱ^ is the second value, and i is an integer that is greater than or equal to 0.
6. The method of any one of claims 1-5, wherein each of one or more coefficients included in the converted set of coefficients is generated based on each of one or more coefficients included in the input set of coefficients and a randomly generated number.
7. The method of claim 6, wherein ^^ᇱ^^ ൌ ^^^^ ^ rand^^െ1,1^^,wherein ^^^ᇱ^ is a ^^-th coefficient included in the converted set of coefficients at the i-th iteration, ^^^^is a ^^-th coefficient included in the input set of coefficients at the i-th iteration, and rand^^െ1,1^^ is a randomly selected one of -1 and 1.
8. The method of claim 7, wherein ^^^^is a coefficient that is randomly selected from the input set of coefficients for the conversion of the input set of coefficients into the converted set of coefficients.
9. The method of any one of claims 3-8, wherein the first value (e.g., ^^^^^^^^) is determined based on a difference between an original picture and a filtered picture that is filtered using the input set of coefficients, and the second value (e.g., ^^^^^^^ᇱ^)) is determined based on a difference between the original picture and a that is filtered using the converted set of coefficients.
10. The method of claim 9, wherein ^^^^^^^^ ൌ ^^^^^^^^^^^ ^ ^^^ ൈ ^^,^ ^ ^wherein^^^^^^^^ is the first value at the i-th iteration, ^^^^^^^ᇱ^ is the second value at the i-th iteration, is the difference between the original picture and the filtered picture that is filtered using the input set of coefficients, ^^^^^^^^^^ᇱ^is the difference between the original picture and the filtered picture that is filtered using the converted set of coefficients, ^^^is a real number determined based on the value of i, and each of A and B is a positive integer.
11. The method of claim 10, wherein ^^ is a sum of lengths of binary codewords each of which is generated based on a conversion of a coefficient included in the input set of coefficients at the i-th iteration, and ^^ is a sum of lengths of binary codewords each of which is generated based on a conversion of a coefficient included in the converted set of coefficients at the i-th iteration.
12. The method of claim 11, wherein the conversion of a coefficient included in the input set of coefficients at the i-th iteration is performed using Golomb-Rice coding, and the conversion of a coefficient included in the converted set of coefficients at the i-th iteration is performed using Golomb-Rice coding.
13. The method of any one of claims 10-12, wherein 2 ^^^ ൌ ^^^ ⋅ ^ െ 1^^ 1where ^^^is a parameter14. The method of any one of claims 1-13, wherein the method is performed by a video encoder.
15. A method (700) for decoding a video, the method comprising: receiving (s702) a bitstream that comprises coefficient data indicating adaptive loop filter, ALF, coefficients; based on the coefficient data, deriving (s704) the ALF coefficients; and decoding (s706) the video using the derived ALF coefficients, wherein the ALF coefficients are generated by: 1) obtaining an input set of coefficients; 2) using one or more randomly generated numbers, converting the input set of coefficients into a converted set of coefficients; and 3) selecting one of: the input set of coefficients; and the converted set of coefficients.
16. A computer program (843) comprising instructions (844) which when executed by processing circuitry (802) cause the processing circuitry to perform the method of any one of claims 1-15.
17. A carrier containing the computer program of claim 16, wherein the carrier is one of an electronic signal, an optical signal, a radio signal, and a computer readable storage medium.
18. An apparatus (800) for encoding a video, the apparatus being configured to perform a method comprising: 1) obtaining (s602) an input set of coefficients; 2) converting (s604) the input set of coefficients into a converted set of coefficients using one or more randomly generated numbers; and 3) selecting (s606) one of: the input set of coefficients; and the converted set of coefficients; based on the selected set of coefficients, determining (s608) adaptive loop filter, ALF, coefficients for an ALF; andencoding (s610) the video using the ALF coefficients.
19. The apparatus of claim 18, wherein the apparatus is configured to perform the method of any one of claims 2-14.
20. An apparatus (800) for decoding a video, the apparatus being configured to perform a method comprising: receiving (s702) a bitstream that comprises coefficient data indicating adaptive loop filter, ALF, coefficients; based on the coefficient data, deriving (s704) the ALF coefficients; and decoding (s706) the video using the derived ALF coefficients, wherein the ALF coefficients are generated by: 1) obtaining an input set of coefficients; 2) using one or more randomly generated numbers, converting the input set of coefficients into a converted set of coefficients; and 3) selecting one of: the input set of coefficients; and the converted set of coefficients.
21. An apparatus (800) comprising: processing circuitry (802); and a memory (842), said memory containing instructions executable by said processing circuitry, whereby the apparatus is operative to perform the method of any one of claims 1- 15.