Filtering parameter processing method and device, and storage medium

By updating the filter parameters in the adaptive loop filtering technology, the problem of dominant transmission of luminance ALF APS and vacancy of chroma ALF APS is solved, improving the use effect of ALF filter parameters and image quality.

WO2024212494A1PCT designated stage expired Publication Date: 2024-10-17ZTE CORP

Patent Information

Application Number
PCT/CN2023/129906
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-14
Filing Date
2023-11-06
Publication Date
2024-10-17

AI Technical Summary

Technical Problem

In the existing adaptive loop filtering technology, the dominant transmission of luminance ALF APS and the vacancy phenomenon of chroma ALF APS lead to a low filling degree of the ALF APS historical candidate set, affecting the image quality.

Method used

By determining the new APS of the current filtering mode of the target filter unit, and after meeting the decision factor modification conditions and the modified decision factor is smaller than the pre-corrected decision factor, decide whether to use the new APS of the current filtering mode, thereby updating the historical filtering parameters. , improve the fullness of the historical candidate set.

Benefits of technology

The effect of using ALF filtering parameters is improved, the fullness of the historical candidate set is enhanced, and the image quality is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023129906_17102024_PF_FP_ABST
    Figure CN2023129906_17102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a filtering parameter processing method and device, and a storage medium. The method comprises: determining a new APS of a current filtering mode of a target filtering unit; after it is determined that the current filtering mode meets a decision factor correction condition, determining a corrected decision factor, wherein the corrected decision factor is smaller than the decision factor before correction; and according to the corrected decision factor, determining whether to use the new APS of the current filtering mode.
Need to check novelty before this filing date? Find Prior Art

Description

A filtering parameter processing method, device and storage medium Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a filtering parameter processing method, device, and storage medium. Background Art

[0002] Adaptive Loop Filter (ALF) is a new filtering technology added to H.266 / Versatile Video Coding (VVC). It leverages the Wiener filter concept, optimizing the minimum mean squared error (MSE) between the original and reconstructed frames. The Wiener-Hoff equation relating the two is formulated, and the final ALF filter coefficients are derived from the solution. This more directly reduces the MSE, thereby improving the image's peak signal-to-noise ratio (PSNR). In ALF, the ALF filter coefficients are transmitted using an ALF Adaptation Parameter Set (APS). The ALF APS includes filter coefficients corresponding to four filtering modes: luma APS, chroma APS, cross-component adaptive loop filter (CCALF) (Cb APS), and CCALF Cr APS.

[0003] In current ALF technology, the decision process for whether to adopt the new APS for each slice is relatively independent. Each filter mode is compared and judged based on its own performance. The decision process uses the decision factors corresponding to each filter mode.

[0004] However, the current design of decision factors is not optimal, which results in a large number of luma ALF APS being explicitly transmitted while chroma ALF APS being vacant, thus leading to a low degree of fullness in the historical candidate set of ALF APS.

[0005] Summary of the Invention

[0006] The present invention provides a method for processing filtering parameters, which includes:

[0007] Determine a new APS for the current filtering mode of the target filtering unit;

[0008] After determining that the current filtering mode satisfies the decision factor correction condition, determining a corrected decision factor; wherein the corrected decision factor is less than the decision factor before correction;

[0009] Determine whether to use the new APS of the current filtering mode according to the modified decision factor.

[0010] The present invention provides another method for processing filtering parameters, which includes:

[0011] Determine a new APS for the current filtering mode of the target filtering unit;

[0012] When it is determined to use the new APS of the current filtering mode, updating the target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode to the new APS of the current filtering mode;

[0013] When the target historical filtering parameters are not empty, the empty historical filtering parameters in the historical filtering parameters of the current filtering mode are updated to the target historical filtering parameters.

[0014] The present invention provides another method for processing filtering parameters, which includes:

[0015] Get the new APS of the current filtering mode of the target filtering unit;

[0016] Updating the target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode into a new APS of the current filtering mode;

[0017] When the target historical filtering parameters are not empty, the empty historical filtering parameters in the historical filtering parameters of the current filtering mode are updated to the target historical filtering parameters.

[0018] An embodiment of the present application provides an electronic device, comprising: a processor; the processor is configured to implement the filtering parameter processing method of any of the above embodiments when executing a computer program.

[0019] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the filtering parameter processing method of any of the above embodiments.

[0020] With respect to the above embodiments and other aspects of the present application and their implementation, further description is provided in the accompanying drawings, detailed description and claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] FIG1 is a block diagram of a video encoder provided by an embodiment;

[0022] FIG2 is a block diagram of a video decoder provided by an embodiment;

[0023] FIG3 is a flow chart of loop filtering in the H.266 / VVC standard;

[0024] FIG4 is a schematic diagram of the internal implementation of the ALF APS;

[0025] FIG5 is a schematic diagram of ALF decision candidates provided by an embodiment;

[0026] FIG6 is a flow chart of a filtering parameter processing method provided by an embodiment;

[0027] FIG7 is a schematic diagram of an ALF APS provided by an embodiment;

[0028] FIG8 is a schematic flow chart of another filtering parameter processing method provided by an embodiment;

[0029] FIG9 is a schematic flow chart of another method for processing filtering parameters according to an embodiment;

[0030] FIG10 is a schematic diagram of an ALF APS historical candidate set provided by an embodiment;

[0031] FIG11 is a schematic diagram of an update history candidate set provided by an embodiment;

[0032] FIG12 is a flow chart of a filtering parameter processing method provided by an embodiment;

[0033] FIG13 is a flow chart of another method for processing filtering parameters according to an embodiment;

[0034] FIG14 is a schematic diagram of a flow chart of interpolation in a filtering parameter processing method provided by an embodiment;

[0035] FIG15 is a flow chart of another method for processing filtering parameters according to an embodiment;

[0036] FIG16 is a schematic structural diagram of a filtering parameter processing device provided by an embodiment;

[0037] FIG17 is a schematic structural diagram of another filtering parameter processing device provided by an embodiment;

[0038] FIG18 is a schematic structural diagram of another filtering parameter processing device provided by an embodiment;

[0039] FIG19 is a schematic structural diagram of an electronic device provided by an embodiment. DETAILED DESCRIPTION

[0040] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. The embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0041] FIG1 is a block diagram of a video encoder provided by an embodiment. The filtering parameter processing method provided in this embodiment is applicable to any video encoding and decoding scheme including ALF APS. In this embodiment, its application in H.266 / VVC is used as an example for description. It can be understood that this embodiment is not limited to application in H.266. The filtering parameter processing method provided in this embodiment can be implemented based on a hybrid coding framework. As shown in FIG1 , the new generation video coding standard H.266 / VVC coding framework developed by the International Telecommunication Union-Telecommunication standardization sector (ITU-T) and the International Organization for Standardization / International Electrotechnical Commission (IEC) joint video project includes modules such as intra-frame prediction, inter-frame prediction, transformation, quantization, loop filtering, and entropy coding.

[0042] The overall framework process on the encoding side is as follows. During encoding, the input video is divided into filter units for subsequent processing. This description uses Coding Tree Units (CTUs) as an example. Of course, it is understood that the implementation process is similar when using other types of filter units.

[0043] (1) The input video is first divided into frames and CTU division is performed.

[0044] (2) The divided CTU is sent to the intra-frame / inter-frame prediction module for predictive coding. The intra-frame prediction module is mainly used to remove the spatial correlation of the image. It predicts the current pixel block through the encoded reconstructed CTU information to remove spatial redundant information. The inter-frame prediction module is mainly used to remove the temporal correlation of the image. It uses the encoded image as the reference image of the current frame to obtain the motion information of each CTU, thereby removing temporal redundancy.

[0045] (3) The resulting intra / inter prediction value is then subtracted from the original CTU to obtain a residual value. This residual value is then transformed and quantized to remove frequency domain correlation and perform lossy compression on the data. Transform coding transforms the image from a spatial domain signal to the frequency domain, concentrating energy in the low-frequency region. The quantization module can reduce the dynamic range of the image coding.

[0046] (4) All coding parameters and residual values ​​are then entropy-coded to form a binary stream for storage or transmission. The output data of the entropy coding module is the compressed bitstream of the original video. Figure 1 shows entropy coding as context-based adaptive binary arithmetic coding (CABAC) and header information coding.

[0047] (5) Add the intra-frame / inter-frame prediction value and the residual value after inverse quantization and inverse transformation to obtain the block reconstruction value, and finally form the reconstructed image.

[0048] (6) The reconstructed image is filtered through a loop filter and stored in the image cache as a reference image in the future.

[0049] H.266 / VVC uses a CTU-based hybrid coding framework. Distortion effects such as blocking artifacts, ringing artifacts, color deviation, and image blurring still exist in compressed video using the H.266 / VVC standard. To reduce the impact of these artifacts on video quality, H.266 / VVC employs in-loop filtering. These in-loop filtering technologies include Luma Mapping with Chroma Scaling (LMCS), Deblocking Filter (DBF), Sample Adaptive Offset (SAO), and ALF. LMCS improves compression efficiency by redistributing codewords across the dynamic range; DBF reduces blocking artifacts; SAO improves ringing artifacts; and ALF reduces decoding errors.

[0050] Figure 2 is a block diagram of a video decoder provided by an embodiment. As shown in Figure 2, the video decoding end framework process is as follows.

[0051] (1) Analyze the code stream to obtain the prediction mode and get the intra / inter prediction value.

[0052] (2) Perform inverse transformation and inverse quantization on the residual value obtained from bitstream analysis.

[0053] Header information decoding and CABAC decoding are required during the parsing process.

[0054] (3) The intra / inter prediction value and the residual value after inverse quantization and inverse transformation are added to obtain the CTU reconstruction value, and finally a reconstructed image is formed.

[0055] (4) The reconstructed image is filtered through a loop filter and stored in the image cache as a reference image in the future.

[0056] Figure 3 is a flowchart of the loop filtering process in the H.266 / VVC standard. As shown in Figure 3, at both the encoder and decoder ends, the connection order of the various filter modules in the loop filtering technology is: LMCS module, DBF module, SAO module, and ALF module. In other words, the filtering order is: LMCS, DBF, SAO, and ALF.

[0057] Figure 4 is a schematic diagram of the internal implementation of ALF APS. ALF APS is used to transmit ALF filter coefficients, which can also be called ALF filter parameters. In this application, ALF filter coefficients and ALF filter parameters are referred to the same. ALF APS can include filter coefficients corresponding to four filter modes: luminance ALF APS, chrominance ALF APS, CCALF Cb APS and CCALF Cr APS. ALF APS can include four modules: luminance ALF, chrominance ALF, CCALF Cb and CCALF Cr. Whether the new APS of each module is used is independent of each other, and each module has a corresponding identifier to indicate whether the new APS is used.

[0058] alf_luma_filter_signal_flag: Indicates whether there are luma ALF-related filter parameters in the current ALF APS If it is equal to the first preset value, it exists, and if it is equal to the second preset value, it does not exist. For example, the first preset value can be 1, and the second preset value can be 0.

[0059] alf_chroma_filter_signal_flag: Indicates whether there are chroma ALF-related filter parameters in the current ALF APS If it is equal to the first preset value, it exists; if it is equal to the second preset value, it does not exist.

[0060] alf_cc_cb_filter_signal_flag: Indicates whether there are CCALF Cb mode related filtering parameters in the current ALF APS If it is equal to the first preset value, it exists; if it is equal to the second preset value, it does not exist.

[0061] alf_cc_cr_filter_signal_flag: Indicates whether the current ALF APS contains CCALF Cr mode related filtering parameters If it is equal to the first preset value, it exists; if it is equal to the second preset value, it does not exist.

[0062] It should be noted that whether the current ALF APS contains filtering parameters related to each filtering mode refers to whether a new APS related to each filtering mode exists within the current ALF APS. In other words, whether the new APS related to each filtering mode is being used. The new APS related to each filtering mode is based on the original and reconstructed frames, using the Wiener filter concept. With the MSE between the original and reconstructed frames as the optimization target, the Wiener-Hoff formula related to the two is listed, and the ALF filter coefficients are obtained based on the results of the equations.

[0063] Whether each filtering mode within the ALF APS uses the corresponding new APS is independent of each other, and needs to be judged by the rate-distortion criterion when making decisions on each filtering mode of the ALF. If all four identifier decisions are the second preset value, the current filtering unit does not use the new APS of the ALF. However, once there is an identifier with the first preset value, the new APS of the ALF of the current filtering unit will be used. In this embodiment, using the new APS of the ALF of the current filtering unit refers to filtering according to the new APS of the ALF to achieve image reconstruction. Furthermore, the new APS of the ALF can also be transmitted in the code stream. Simply put, for the ALF APS transmitted to the code stream, there is at least one filtering coefficient of the filtering mode inside it, which can be as well as Any one of these four filter coefficients can have at most four filter coefficients, that is, all four filter coefficients mentioned above exist.

[0064] During the ALF operation process, the ALF APS historical candidate set is also maintained, which plays a major role in the acquisition of historical APS. When it is determined that a new APS is to be used, the ALF APS historical candidate set will also be updated according to the first-in-first-out rule. The acquisition of historical APS in ALF depends on the ALF APS historical candidate set, and the number of historical sets of the current filtering unit can be calculated through the historical candidate set. When obtaining the historical set candidate, it is necessary to determine whether the APS in the historical candidate set can be used by the current filtering unit. The judgment conditions are: ① The time layer for transmitting the APS is lower than or equal to the time layer of the current filtering unit; ② The filter set corresponding to the ALF mode exists in the APS. Only the APS that meets the above two conditions will be selected as the historical APS of the current filtering unit.

[0065] In addition to the restrictions on the rules for obtaining historical APS, the historical candidate sets will also be different under different encoding configurations.

[0066] Under the All Intra (AI) configuration, all frames are in the full intra mode, so the historical APS cannot be used, and therefore no historical candidate set will be formed. Under the Random Access (RA) configuration, the ALF APS historical candidate set will be cleared every time an I frame passes, which will limit the effect of the historical APS. Under the Low Delay (LD) configuration, since all filtering units belong to the same time layer in the official configuration of LD, the B / P frames therein can be obtained without being restricted by the time layer in the historical set. In addition, there is no historical candidate set clearing mechanism under LD. The transmitted APS will always exist in the ALF APS historical candidate set unless it is covered by a new APS with the same identity (ID) number.

[0067] ALF decision refers to determining the ALF filter coefficients among the ALF decision candidates. Figure 5 is a schematic diagram of the ALF decision candidates provided by one embodiment. As shown in Figure 5, the ALF decision candidates include the following four options.

[0068] First, when alf_enable_flag=0, ALF is not performed (skip ALF).

[0069] When alf_enable_flag=1, there are the following three options.

[0070] Second, for a new APS (New ALF APS), it is necessary to transmit the index of the new APS and the filter coefficient of the new APS.

[0071] Third, fixed filter sets (Offine-trained Filter Sets) transmit only the index of the fixed filter set. Fixed filter sets exist only for luma ALF. Fixed filter sets are trained offline. When deciding to use a fixed filter set, you also need to determine its index.

[0072] Fourth, historical APS, only the index of the historical APS is transmitted. The historical APS is calculated online for the previous frame.

[0073] The ALF decision process uses the rate-distortion criterion. This process involves the use of decision factors. These factors must be calculated before encoding the current filter unit. These calculations utilize parameters such as the quantization parameter (QP) configured in the configuration. Luma and chroma differ in their component characteristics, leading to slightly different fixed function settings. Consequently, different ALF filter modes require different decision factors.

[0074] The current poor design of decision factors will result in a large number of luma ALF APS being explicitly transmitted while chroma ALF APS being missing, which results in a low completeness of the historical candidate set of ALF APS.

[0075] The present embodiment provides a filtering parameter processing method, comprising: determining a new APS for the current filtering mode of a target filtering unit; after determining that the current filtering mode satisfies a decision factor correction condition, determining a corrected decision factor, wherein the corrected decision factor is smaller than the decision factor before correction; and determining whether to use the new APS for the current filtering mode based on the corrected decision factor. By determining the corrected decision factor after the current filtering mode satisfies the decision factor correction condition, and determining whether to use the new APS for the current filtering mode based on the corrected decision factor, since the corrected decision factor is smaller than the decision factor before correction, when determining whether to use the new APS for the current filtering mode based on the corrected decision factor, there is a greater probability of determining to use the new APS for the current filtering mode, thereby increasing the number of historical candidate sets and enhancing the effectiveness of ALF.

[0076] The following describes the filtering parameter processing method, device, storage medium, and technical effects thereof.

[0077] FIG6 is a flow chart of a method for processing filtering parameters provided by an embodiment. The method for processing filtering parameters provided by this embodiment can be applied to the scene of video coding, and in particular to the scene of processing the filtering parameters of ALF in video coding. The method for processing filtering parameters provided by this embodiment can be applied to a filtering parameter processing device. The filtering parameter processing device can be implemented by software and / or hardware. The filtering parameter processing device can be set in an electronic device, for example, a computer device. As shown in FIG6 , the method for processing filtering parameters provided by this embodiment includes the following steps:

[0078] Step 601: Determine a new APS for the current filtering mode of a target filtering unit.

[0079] In this embodiment, the target filter unit refers to the filter unit currently being encoded. The current filter mode refers to the current filter mode.

[0080] In one embodiment, the target filtering unit includes at least one of the following: a slice, a tile, a CTU, or a sub-picture.

[0081] In one embodiment, the current filtering mode includes at least one of the following: luma ALF, chroma ALF, CCALF Cb, and CCALF Cr.

[0082] The new APS associated with each filtering mode is based on the original frame and the reconstructed frame. It uses the idea of ​​Wiener filter, takes the MSE between the original frame and the reconstructed frame as the optimization target, lists the Wiener-Hoff formula related to the two, and obtains the ALF filter coefficient based on the result of solving the equation.

[0083] When the current filtering mode is luma ALF, a new APS of the luma ALF is determined according to the reconstructed luma pixel value and the original luma pixel value of the target filtering unit.

[0084] When the current filtering mode is chroma ALF, a new APS of the chroma ALF is determined according to the reconstructed chroma pixel values ​​and the original chroma pixel values ​​of the target FU.

[0085] When the current filtering mode is CCALF Cb, a new APS of CCALF Cb is determined according to the reconstructed luminance pixel value and the original Cb pixel value of the target filtering unit.

[0086] When the current filtering mode is CCALF Cr, the new APS of CCALF Cr is determined according to the reconstructed luminance pixel value and the original Cr pixel value of the target filtering unit.

[0087] Step 602: After determining that the current filtering mode meets the decision factor correction condition, determine the corrected decision factor.

[0088] Among them, the decision factor after correction is smaller than the decision factor before correction.

[0089] In this embodiment, before making an ALF decision, after determining that the current filtering mode meets the decision factor modification condition, a modified decision factor is determined, and the modified decision factor is smaller than the decision factor before modification.

[0090] In one embodiment, before step 602, the following step is further included: determining whether the current filtering mode meets the decision factor correction condition.

[0091] In one embodiment, determining whether the current filtering mode satisfies the decision factor modification condition includes at least one of the following:

[0092] The number of available historical candidate sets for the current filtering mode is less than a preset threshold; a new APS for the previous filtering mode is used.

[0093] In this embodiment, the number of available historical candidate sets for the current filtering mode refers to the number of historical filtering parameters that are not empty in the historical candidate set for the current filtering mode.

[0094] The number of available historical candidate sets for different filtering modes is less than the preset threshold as follows.

[0095] N luma ALF <=Tluma ALF , where N luma ALF represents the number of available historical candidate sets for brightness ALF, T luma ALF Indicates the preset threshold corresponding to the brightness ALF.

[0096] N Chroma ALF <=T Chroma ALF , where N Chroma ALF represents the number of available historical candidate sets for chroma ALF, T Chroma ALF Indicates the preset threshold corresponding to the chroma ALF.

[0097] N CCALF Cb <=T CCALF Cb , where N CCALF Cb represents the number of available historical candidate sets of CCALF Cb, T CCALF Cb Indicates the preset threshold corresponding to CCALF Cb.

[0098] N CCALF Cr <=T CCALF Cr , where N CCALF Cr represents the number of available historical candidate sets of CCALF Cr, T CCALF Cr Indicates the preset threshold corresponding to CCALF Cr.

[0099] In one implementation, the preset thresholds corresponding to different filtering modes are the same.

[0100] In another implementation, different filtering modes correspond to different preset thresholds to accommodate more application scenarios.

[0101] In another implementation, the preset thresholds corresponding to different filtering modes are partially the same and partially different.

[0102] The pre-order filtering mode refers to the filtering mode that has performed an ALF decision before the current filtering mode performs an ALF decision. It is understood that the pre-order filtering mode includes at least one of the following: luma ALF, chroma ALF, CCALF Cb, and CCALF Cr.

[0103] In one implementation, when the number of available historical candidate sets of the current filtering mode is less than a preset threshold, it is determined that the current filtering mode meets the decision factor correction condition.

[0104] In this implementation, when it is determined that the number of available historical candidate sets for the current filtering mode is small, the decision factor is modified to recommend a new APS using the current filtering mode as much as possible.

[0105] In another implementation, when a new APS of a preamble filtering mode is used, it is determined whether the current filtering mode satisfies a decision factor modification condition.

[0106] In this implementation, it is desired to modify the decision factor to recommend the new APS using the current filtering mode as much as possible when it has been confirmed that the new APS using the previous filtering mode is to be used.

[0107] In another implementation, when the number of available historical candidate sets of the current filtering mode is less than a preset threshold and a new APS of the previous filtering mode is used, it is determined that the current filtering mode meets the decision factor correction condition.

[0108] In one embodiment, determining the revised decision factor includes: determining the revised decision factor as the product of a preset weight and the decision factor before the revision, wherein the preset weight is a number less than 1 and greater than zero.

[0109] For example, the decision factor in this embodiment may include a Lagrangian factor. The modified Lagrangian factors of different filtering modes are expressed as follows.

[0110] Among them, k luma ALF is the preset weight corresponding to the brightness ALF. is the brightness ALF Lagrangian factor before correction. is the corrected brightness Lagrangian factor.

[0111] Among them, kChroma ALF is the preset weight corresponding to the chroma ALF. is the chroma ALF Lagrangian factor before correction. is the modified chromaticity Lagrangian factor.

[0112] Among them, k CCALF Cb is the preset weight corresponding to CCALF Cb. is the CCALF Cb Lagrangian factor before correction. is the modified CCALF Cb Lagrangian factor.

[0113] Among them, k CCALF Cr is the preset weight corresponding to CCALF Cr. is the CCALF Cr Lagrangian factor before correction. is the modified CCALF Cr Lagrangian factor.

[0114] In one implementation, different filtering modes correspond to the same preset weights.

[0115] In another implementation, different filtering modes correspond to different preset weights to accommodate more application scenarios.

[0116] In another implementation, the preset weights corresponding to different filtering modes are partially the same and partially different.

[0117] In another embodiment, determining the revised decision factor includes: subtracting a preset value from the decision factor before the revision to determine the revised decision factor, wherein the preset value is a number greater than 0.

[0118] In short, any technical means that achieves that the decision factor after correction is smaller than the decision factor before correction falls within the protection scope of this embodiment.

[0119] Step 603: Determine whether to use the new APS of the current filtering mode according to the revised decision factor.

[0120] Before further describing step 603, the rate-distortion criterion is first introduced.

[0121] Since mainstream video compression is lossy, the rate-distortion criterion, as a tool for measuring compression performance, is the most widely used technology in video compression encoding. Almost all modules use the rate-distortion criterion to determine the final mode. The rate-distortion criterion is based on the principle of rate-distortion optimization. Under the constraint of the encoding bit rate, the optimization problem is established by minimizing the distortion, as shown in the following formula: Where D is the distortion. Since the loop filter no longer performs time-domain and frequency-domain transformations, the distortion D is uniformly expressed as the minimum mean square error (MSE). R is the bitrate, and X can represent the partition structure, prediction mode, transform coefficients, and so on. In the ALF module, when making decisions at the filter unit level, X is determined within the range of ALF decision candidate identifiers shown in Figure 5, including skipping ALF, adopting a new APS, fixing the filter set, and using the historical APS.

[0122] The constrained problem in the above formula can be converted into an unconstrained problem by introducing a decision factor, for example, the Lagrange factor λ, as shown in the following formula: Where J represents the rate-distortion cost. The rate-distortion cost accurately describes the combined impact of the number of bits required for the current mode and the resulting distortion. To determine the performance of two filter coefficients, compare their rate-distortion costs. A lower rate-distortion cost indicates better compression performance.

[0123] In general, the value of the decision factor in video encoding has a fixed functional relationship with the quantization parameter (QP) of the target filter unit. The decision factor must be calculated before encoding the current filter unit, using parameters such as the configured QP. Luma and chroma components have different component characteristics, so the fixed function settings are slightly different, resulting in different decision factors for different components.

[0124] In step 603, it is determined whether to use the new APS of the current filtering mode according to the modified decision factor, for example, the modified Lagrangian factor, as shown in the formula As shown, when the Lagrangian factor λ decreases, R can increase, indicating that the bit rate can be increased. Therefore, there is a greater probability of determining a new APS using the current filtering mode.

[0125] Using the new APS for the current filtering mode means that the new APS can be updated to the historical candidate set for the current filtering mode. This increases the number of non-empty historical filtering parameters in the historical candidate set for the current filtering mode, thereby improving the fullness of the historical candidate set for the current filtering mode. This increased fullness of the historical candidate set for the current filtering mode means that more options are available when making ALF decisions, thereby enhancing the effectiveness of ALF.

[0126] FIG7 is a schematic diagram of an ALF APS provided by an embodiment. A check mark indicates the use of a new APS, and a cross indicates the non-use of a new APS. As shown in FIG7 , the left figure is a schematic diagram of an ALF APS obtained without using the filtering parameter processing method provided by this embodiment, wherein only the chroma ALF APS uses the new APS, and the other three filtering modes do not use the new APS. The right figure is a schematic diagram of an ALF APS obtained by using the filtering parameter processing method provided by this embodiment. It can be seen that all four ALF filtering modes use the new APS. This means that compared with the left figure, the ALF APS obtained in the right figure has three new APSs added. These three new APSs can subsequently be updated to the historical filtering parameters corresponding to the filtering mode, thereby increasing the fullness of the historical candidate set.

[0127] In one embodiment, after determining that the current filtering mode does not meet the decision factor modification condition, whether to use the new APS of the current filtering mode is determined based on the decision factor before modification. The decision factor before modification in this embodiment refers to the decision factor obtained based on parameters such as QP in the configuration.

[0128] In one embodiment, the filtering parameter processing method provided by this embodiment further includes the following steps: after determining that a new APS of the current filtering mode needs to be used according to the revised decision factor, transmitting the new APS of the current filtering mode in the bitstream.

[0129] In one embodiment, after determining that a new APS of the current filtering mode needs to be used according to the revised decision factor, target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode are updated as the new APS of the current filtering mode.

[0130] The present embodiment provides a filtering parameter processing method, comprising: determining a new APS for the current filtering mode of a target filtering unit; after determining that the current filtering mode satisfies a decision factor correction condition, determining a corrected decision factor, wherein the corrected decision factor is smaller than the decision factor before correction; and determining whether to use the new APS for the current filtering mode based on the corrected decision factor. By determining the corrected decision factor after the current filtering mode satisfies the decision factor correction condition, and determining whether to use the new APS for the current filtering mode based on the corrected decision factor, since the corrected decision factor is smaller than the decision factor before correction, when determining whether to use the new APS for the current filtering mode based on the corrected decision factor, there is a greater probability of determining to use the new APS for the current filtering mode, thereby improving the fullness of the historical candidate set and enhancing the effectiveness of ALF.

[0131] FIG8 is a flow chart of another method for processing filter parameters provided by an embodiment. Based on the embodiment shown in FIG6 , this embodiment describes a complete ALF filtering process. In this embodiment, the luminance ALF is used as the pre-order filtering mode for illustration. It is understood that the implementation process and technical principles of other filtering modes as the pre-order filtering mode are similar. In this embodiment, the decision factor including the Lagrangian factor is used as an example for illustration. As shown in FIG8 , the method for processing filter parameters provided by this embodiment includes the following steps:

[0132] Step 801: Calculate a new APS for the luma ALF and a new APS for the chroma ALF of a target FU.

[0133] For the target filter unit, the new APS of the brightness ALF is calculated according to the principle of Wiener filtering: And, the new APS for Chroma ALF:

[0134] Step 802: Determine whether the brightness ALF decision is enabled.

[0135] If the brightness ALF decision is not enabled, no ALF filtering is performed.

[0136] Step 803: If the brightness ALF decision is enabled, perform brightness ALF decision.

[0137] A rate distortion optimization (RDO) decision is made among the new APS (not using ALF, luma ALF), the fixed filter set, and the historical APS (luma ALF). If the decision results in the new APS using luma ALF, the alf_luma_filter_signal_flag is set to the first preset value; otherwise, it is set to the second preset value. This embodiment uses the first preset value of 1 and the second preset value of 0 as an example.

[0138] It is understood that the following steps may also be performed before step 803: after determining that the luma ALF satisfies the Lagrangian factor correction condition, a revised Lagrangian factor is determined, where the revised Lagrangian factor is less than the Lagrangian factor before correction. In step 803, when making a luma ALF decision, whether to use the new APS for the luma ALF is determined based on the revised Lagrangian factor.

[0139] Step 804: If the luma ALF decision is on, then proceed to the chroma ALF decision.

[0140] Step 804a: Determine whether the chroma ALF satisfies the Lagrangian factor correction condition.

[0141] Step 804b: If the Lagrangian factor correction condition of the chrominance ALF is met, it is assumed here that: N Chroma ALF <=T Chroma ALF And alf_luma_filter_signal_flag is 1. Then kChroma ALF is used to adjust the λ of the chroma ALF, otherwise the λ of the chroma ALF remains unchanged.

[0142] Step 804c: Chroma ALF decision.

[0143] If the Lagrangian factor of the chroma ALF is corrected, the corrected Lagrangian factor of the chroma ALF is used to make a decision; if the Lagrangian factor of the chroma ALF is not corrected, the Lagrangian factor of the chroma ALF before correction is used to make a decision.

[0144] RDO decision is made between the new APS without ALF, chroma ALF, and the historical APS of chroma ALF. If the decision result uses the new APS of chroma ALF, alf_chroma_filter_signal_flag needs to be set to 1, otherwise it is set to 0.

[0145] Step 805: Reconstruct the image after the luma ALF and chroma ALF according to the decision results of the luma ALF and chroma ALF.

[0146] In this embodiment, reconstructing the image after the luminance ALF and the chrominance ALF is to filter the input target filtering unit according to the filtering parameters corresponding to the decision result.

[0147] Step 806: Calculate the new APS of CCALF Cb and CCALF Cr of the target FU.

[0148] For the target filter unit, the new APS of CCALF Cb is calculated according to the principle of Wiener filtering: And, the new APS of CCALF Cr:

[0149] Step 807: If the brightness ALF decision is on, perform CCALF Cb decision.

[0150] Step 807a: Determine whether CCALF Cb meets the Lagrangian factor correction condition.

[0151] Step 807b: If the Lagrangian factor correction condition of CCALF Cb is met, it is assumed here that: N CCALF Cb <=T CCALF Cb And alf_luma_filter_signal_flag is 1. Then use k CCALF Cb The λ of the Cb component in CCALF Cb is adjusted, otherwise λ remains unchanged.

[0152] Step 807c: Decision of CCALF Cb.

[0153] If the Lagrangian factor of CCALF Cb is corrected, the corrected Lagrangian factor of CCALF Cb is used to make the decision; if the Lagrangian factor of CCALF Cb is not corrected, the Lagrangian factor of CCALF Cb before the correction is used to make the decision.

[0154] RDO decision is made between the new APS without ALF and CCALF Cb and the historical APS of CCALF Cb. If the decision result uses the new APS of CCALF Cb, alf_cc_cb_filter_signal_flag needs to be set to 1, otherwise it is set to 0.

[0155] Step 808: If the luminance ALF decision is on, perform CCALF Cr decision.

[0156] Step 808a: Determine whether CCALF Cr satisfies the Lagrangian factor correction condition.

[0157] Step 808b: If the Lagrangian factor correction condition of CCALF Cr is met, it is assumed here that: N CCALF Cr <=T CCALF Cr And alf_luma_filter_signal_flag is 1. Then use k CCALF Cr The λ of the Cr component in CCALF Cr is adjusted, otherwise λ remains unchanged.

[0158] Step 808c: Decision of CCALF Cr.

[0159] If the Lagrangian factor of CCALF Cr is corrected, the corrected Lagrangian factor of CCALF Cr is used to make the decision; if the Lagrangian factor of CCALF Cr is not corrected, the Lagrangian factor of CCALF Cr before the correction is used to make the decision.

[0160] RDO decision is made in the new APS without ALF and CCALF Cr and the historical APS of CCALF Cr. If the decision result uses the new APS of CCALF Cr, alf_cc_cr_filter_signal_flag needs to be set to 1, otherwise it is set to 0.

[0161] Step 809: Reconstruct the image after the effects of CCALF Cb and CCALF Cr according to the decision results of CCALF Cb and CCALF Cr.

[0162] It should be noted that, in step 809 , when reconstructing the image after the effects of CCALF Cb and CCALF Cr, the image after the effects of reconstructing the luminance ALF and chrominance ALF output in step 805 are also used.

[0163] The process of reconstructing an image in this embodiment is a process of performing filtering using the determined filter coefficients.

[0164] Step 810: Transmit the current new APS.

[0165] If one of alf_luma_filter_signal_flag, alf_chroma_filter_signal_flag, alf_cc_cb_filter_signal_flag, and alf_cc_cr_filter_signal_flag is 1, the current APS is transmitted to the bitstream; if all are 0, the target filter unit does not need to transmit the APS.

[0166] In the historical candidate set, if an APS with the same index already exists, the new APS set will be used to overwrite the old APS.

[0167] It should be noted that, in step 807b, the Lagrangian factor correction condition of CCALF Cb can also be: N CCALF Cb <=T CCALF Cb And alf_chroma_filter_signal_flag is 1. That is, the chroma ALF is used as the pre-order filter mode of CCALF Cb.

[0168] Similarly, in step 808b, the Lagrangian factor correction condition of CCALF Cr can also be: N CCALF Cr <=T CCALF Cr And alf_chroma_filter_signal_flag is 1. That is, the chroma ALF is used as the pre-filter mode of CCALF Cr. Alternatively, the Lagrangian factor correction condition of CCALF Cr can also be: N CCALF Cr <=T CCALF Cr And alf_cc_cb_filter_signal_flag is 1. That is, CCALF Cb is used as the pre-order filter mode of CCALF Cr.

[0169] Of course, in FIG8 , ALF filtering is performed in the following filtering order: luma ALF, chroma ALF, CCALF Cb, and CCALF Cr. It is understood that ALF filtering can also be performed in other filtering orders, such as: chroma ALF, luma ALF, CCALF Cb, and CCALF Cr, or other orders such as: chroma ALF, luma ALF, CCALF Cr, and CCALF Cb. The implementation principles and technical means are similar and will not be further described here.

[0170] Figure 9 is a flowchart of another method for processing filtering parameters provided by an embodiment. Based on the embodiments shown in Figures 6 and 8, this embodiment provides a detailed description of the steps after determining a new APS using the current filtering mode.

[0171] Before describing in detail the steps of another filtering parameter processing method shown in Figure 9, let's first introduce the historical candidate set of the ALF APS. Figure 10 is a schematic diagram of the ALF APS historical candidate set provided by one embodiment. As shown in Figure 10, the ALF APS historical candidate set is also maintained during the ALF operation process, which plays a major role in the acquisition of historical APSs. When it is determined that a new APS is being used, the ALF APS historical candidate set is also updated according to the first-in-first-out rule. The acquisition of historical APSs in the ALF relies on the ALF APS historical candidate set. It should be noted that historical APSs can also be referred to as historical filtering parameters.

[0172] The codec will construct the ALF APS historical candidate set in the same way. A stream can maintain up to N APS sets, with IDs (also called indexes) ranging from 0 to N-1. Each APS set includes the historical APSs of four filtering modes: as well as In Figure 10, N is 8 as an example. Whenever a new APS set is used, the old APS set with the same ID number is overwritten. The ID number of the new APS set corresponds to the target filtering unit, that is, the ID number of the new APS set can be determined based on the target filtering unit.

[0173] The new APSs for the four filtering modes are maintained or transmitted together as an APS set. When maintaining or transmitting these four new APSs, they share a single ALF APS ID. If all four new APSs are determined to be used for the same target filter unit, they share a single ID, maximizing the effectiveness of this APS ID. Obviously, it's also possible for only one new APS type to be transmitted within a single ALF APS ID. In this case, each ID corresponds to only one new APS. However, when updating the historical candidate set, the update is performed at the ID granularity. That is, regardless of how many new APSs are included in the APS set containing the new APS, the four historical filter parameters for the ID corresponding to the historical candidate set are updated as a whole with the parameters in that APS set. This can overwrite any previously non-empty historical filter parameters corresponding to that ID during the update process, causing previously non-empty historical filter parameters to become empty after the update, potentially reducing the number of APSs for certain ALF modes in the historical candidate set. If this situation occurs frequently, the available historical candidate set for the ALF decision process will be reduced, preventing the full effectiveness of the ALF.

[0174] The embodiment shown in FIG9 can solve the problem of the reduction of available historical candidate sets caused by the update process of the historical candidate sets described above. As shown in FIG9, the filtering parameter processing method provided by this embodiment includes the following steps:

[0175] Step 901: Determine a new APS of the current filtering mode of the target filtering unit.

[0176] Step 902: After determining that the current filtering mode meets the decision factor correction condition, determine the corrected decision factor.

[0177] Among them, the decision factor after correction is smaller than the decision factor before correction.

[0178] Step 903: Determine whether to use the new APS of the current filtering mode according to the revised decision factor.

[0179] The implementation process and technical principles of step 901 are similar to step 601, step 902 is similar to step 602, and step 903 is similar to step 603, and will not be repeated here.

[0180] Step 904: after determining that a new APS of the current filtering mode needs to be used according to the revised decision factor, update the target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode to the new APS of the current filtering mode.

[0181] In this embodiment, the target historical filtering parameters corresponding to the current filtering mode can be determined according to the target filtering unit. For example, according to the ID of the new APS corresponding to the target filtering unit, the historical filtering parameters at the same ID in the historical candidate set of the current filtering mode can be determined as the target historical filtering parameters.

[0182] After the target historical filtering parameters are determined, the target historical filtering parameters are updated to the new APS of the current filtering mode.

[0183] It is understandable that the target history filtering parameter may be empty or may not be empty.

[0184] When the target historical filtering parameters are empty, the new APS of the current filtering mode can be directly written into the location of the target historical filtering parameters in the historical candidate set.

[0185] When the target historical filtering parameter is not empty, in addition to updating the target historical filtering parameter to the new APS, in this embodiment, the following step 905 may also be performed.

[0186] Step 905: When the target historical filtering parameters are not empty, the empty historical filtering parameters in the historical filtering parameters of the current filtering mode are updated to the target historical filtering parameters.

[0187] It can be understood that the target history filtering parameters in step 905 refer to the target history filtering parameters before being updated in step 904 .

[0188] In one embodiment, the historical filtering parameters that are empty in the historical filtering parameters of the current filtering mode are determined according to a preset rule; and the historical filtering parameters that are empty in the historical filtering parameters are updated to the target historical filtering parameters.

[0189] In one embodiment, the preset rules include at least one of the following: traversing the historical filtering parameters of the current filtering mode in order from new to old according to the generation time; traversing the historical filtering parameters of the current filtering mode in order from old to new according to the generation time.

[0190] It should be noted that this embodiment does not limit the execution order of step 904 and step 905. That is, step 904 and step 905 can be executed in parallel or in any order.

[0191] Figure 11 is a schematic diagram of updating a historical candidate set provided by an embodiment. A check mark indicates the use of a new APS, and a cross indicates the non-use of the new APS. As shown in Figure 11, assume that the newly inserted APS has an ID of 4. This will overwrite the APS with ID 4 in the historical candidate set. In the filtering parameter processing method provided in this embodiment, the historical filtering parameters at the old APS 4 can be inserted into the empty historical filtering parameters in the corresponding filtering mode, replacing the empty historical filtering parameters with non-empty historical filtering parameters to avoid reducing the number of historical candidate sets. It can be seen that the value of the luma APS in the old APS 4 is written into the luma APS in APS 2. The value of the chroma APS in the old APS 4 is written into the chroma APS in APS 3. The value of the CCALF Cr in the old APS 4 is written into the CCALF Cr APS in APS 3. The value of the new APS 4 is then written into the old APS 4. It can be seen that the number of available historical candidate sets in the updated historical candidate set does not decrease.

[0192] The filtering parameter processing method provided in this embodiment determines that a new APS of the current filtering mode needs to be used based on the revised decision factor. Then, the target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode are updated to the new APS of the current filtering mode. When the target historical filtering parameters are not empty, the empty historical filtering parameters in the historical filtering parameters of the current filtering mode are updated to the target historical filtering parameters. By replacing the empty historical filtering parameters with the non-empty target historical filtering parameters, the problem of a decrease in the number of available historical candidate sets during the process of updating the historical candidate sets is avoided, the fullness of the historical candidate sets is improved, and thus the performance of the ALF is improved.

[0193] Figure 12 is a flow chart of a filtering parameter processing method provided by an embodiment. The filtering parameter processing method provided by this embodiment can be applied to the encoding end. The filtering parameter processing method provided by this embodiment is mainly used to solve the problem of the number of available historical candidate sets decreasing during the update process of the historical candidate sets. The filtering parameter processing method provided by this embodiment can be applied to the scenario of video coding, especially to the scenario of processing the filtering parameters of ALF in video coding. The filtering parameter processing method provided by this embodiment can be applied to a filtering parameter processing device. The filtering parameter processing device can be implemented by software and / or hardware. The filtering parameter processing device can be set in an electronic device, for example, a computer device. As shown in Figure 12, the filtering parameter processing method provided by this embodiment includes the following steps:

[0194] Step 1201: Determine a new APS of the current filtering mode of the target filtering unit.

[0195] The implementation process and technical principles of step 1201 are similar to those of step 601 and will not be repeated here.

[0196] Step 1202: When it is determined to use the new APS of the current filtering mode, the target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode are updated to the new APS of the current filtering mode.

[0197] The difference between this embodiment and the embodiment shown in FIG9 is that this embodiment can adopt the method shown in FIG9 , that is, determining whether the decision factor of the current filtering mode needs to be modified. When it is determined that the decision factor of the current filtering mode needs to be modified, determining whether to use the new APS of the current filtering mode based on the modified decision factor. Alternatively, the decision factor obtained based on parameters such as QP in the configuration can be directly used to determine whether to use the new APS of the current filtering mode.

[0198] In one embodiment, the filtering parameter processing method provided in this embodiment further includes the following steps: upon determining that the current filtering mode satisfies a decision factor correction condition, determining a corrected decision factor, wherein the corrected decision factor is less than the pre-corrected decision factor; and determining whether to use a new APS for the current filtering mode based on the corrected decision factor. The implementation and technical principles herein are similar to those in the embodiment shown in FIG9 and are not further described here. For example, the decision factor in this embodiment may include a Lagrangian factor.

[0199] In step 1202, the target historical filtering parameters corresponding to the current filtering mode can be determined based on the target filtering unit. For example, based on the ID of the new APS corresponding to the target filtering unit, the historical filtering parameters at the same ID in the historical candidate set of the current filtering mode can be determined as the target historical filtering parameters.

[0200] After the target historical filtering parameters are determined, the target historical filtering parameters are updated to the new APS of the current filtering mode.

[0201] It is understandable that the target history filtering parameter may be empty or may not be empty.

[0202] When the target historical filtering parameters are empty, the new APS of the current filtering mode can be directly written into the location of the target historical filtering parameters in the historical candidate set.

[0203] When the target historical filtering parameter is not empty, in addition to updating the target historical filtering parameter to the new APS, in this embodiment, the following step 1203 may also be performed.

[0204] Step 1203: When the target historical filtering parameters are not empty, the empty historical filtering parameters in the historical filtering parameters of the current filtering mode are updated to the target historical filtering parameters.

[0205] In one embodiment, step 1203 may include: determining, according to a preset rule, historical filtering parameters that are empty in the historical filtering parameters of the current filtering mode; and updating the historical filtering parameters that are empty in the historical filtering parameters to target historical filtering parameters.

[0206] The preset rules include at least one of the following: traversing the historical filtering parameters of the current filtering mode in order from new to old according to the generation time; traversing the historical filtering parameters of the current filtering mode in order from old to new according to the generation time. It should be noted that the preset rules can be used in combination. For example, in some filtering modes, traversing the historical filtering parameters of the current filtering mode in order from new to old according to the generation time, while in other filtering modes, traversing the historical filtering parameters of the current filtering mode in order from old to new according to the generation time.

[0207] The filtering parameter processing method provided in this embodiment updates the target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode to the new APS of the current filtering mode after determining that the new APS of the current filtering mode needs to be used. When the target historical filtering parameters are not empty, the empty historical filtering parameters in the historical filtering parameters of the current filtering mode are updated to the target historical filtering parameters. By replacing the empty historical filtering parameters with the non-empty target historical filtering parameters, the problem of a decrease in the number of available historical candidate sets during the process of updating the historical candidate sets is avoided, the fullness of the historical candidate sets is improved, and thus the performance of the ALF is improved.

[0208] FIG13 is a flow chart of another method for processing filtering parameters provided by one embodiment. This embodiment describes a complete ALF filtering process based on the embodiment shown in FIG12. In this embodiment, a flag is set to indicate whether the current ALF APS is inserted, for example, the flag is defined as alf_aps_insert_flag. As shown in FIG13 , the filtering parameter processing method provided by this embodiment includes the following steps:

[0209] Step 1301a: Calculate the new APS of the luma ALF and the new APS of the chroma ALF of the target FU.

[0210] Step 1301b: Set alf_aps_insert_flag to 0.

[0211] Step 1302: Determine whether the brightness ALF decision is enabled.

[0212] If the brightness ALF decision is not enabled, no ALF filtering is performed.

[0213] Step 1303: If the brightness ALF decision is enabled, perform brightness ALF decision.

[0214] An RDO decision is made among the new APS (no ALF, luma ALF), the fixed filter set, and the historical APS (luma ALF). If the decision results in the new APS using luma ALF, the alf_luma_filter_signal_flag is set to the first preset value; otherwise, it is set to the second preset value. This embodiment uses the first preset value of 1 and the second preset value of 0 as an example.

[0215] Step 1304: If the luma ALF uses a new APS, the ALF APS insertion module is called and alf_aps_insert_flag is set to 1.

[0216] Step 1305: If the luma ALF decision is on, perform chroma ALF decision.

[0217] RDO decision is made between the new APS without ALF, chroma ALF, and the historical APS of chroma ALF. If the decision result uses the new APS of chroma ALF, alf_chroma_filter_signal_flag needs to be set to 1, otherwise it is set to 0.

[0218] Step 1306: If alf_aps_insert_flag is 0 and the chroma ALF uses a new APS, then call the ALF APS insertion module and set alf_aps_insert_flag to 1.

[0219] Step 1307: Reconstruct the image after the luma ALF and chroma ALF are processed according to the decision results of the luma ALF and chroma ALF.

[0220] Step 1308: Calculate the new APS of CCALF Cb and CCALF Cr of the target FU.

[0221] Step 1309: If the brightness ALF decision is on, perform CCALF Cb decision.

[0222] RDO decision is made between the new APS without ALF and CCALF Cb and the historical APS of CCALF Cb. If the decision result uses the new APS of CCALF Cb, alf_cc_cb_filter_signal_flag needs to be set to 1, otherwise it is set to 0.

[0223] Step 13010: If alf_aps_insert_flag is 0 and CCALF Cb uses a new APS, the ALF APS insertion module is called and alf_aps_insert_flag is set to 1.

[0224] Step 13011: If the brightness ALF decision is on, then perform CCALF Cr decision.

[0225] RDO decision is made in the new APS without ALF and CCALF Cr and the historical APS of CCALF Cr. If the decision result uses the new APS of CCALF Cr, alf_cc_cr_filter_signal_flag needs to be set to 1, otherwise it is set to 0.

[0226] Step 13012: If alf_aps_insert_flag is 0 and CCALF Cr uses a new APS, the ALF APS insertion module is called and alf_aps_insert_flag is set to 1.

[0227] Step 13013: CCALF reconstruction.

[0228] According to the decision results of CCALF Cb and CCALF Cr, the image after the effect of CCALF Cb and CCALF Cr is reconstructed.

[0229] Step 13014: Transmit the current new APS.

[0230] If one of alf_luma_filter_signal_flag, alf_chroma_filter_signal_flag, alf_cc_cb_filter_signal_flag, and alf_cc_cr_filter_signal_flag is 1, the current new APS is transmitted to the bitstream; if all are 0, the target filter unit does not need to transmit the APS.

[0231] In the historical candidate set, if an APS with the same index already exists, the new APS set will be used to overwrite the old APS.

[0232] FIG14 is a flow chart of the insertion process in the filtering parameter processing method provided by an embodiment. Assume that the ID of the newly inserted APS is i. As shown in FIG14, the execution process of the insertion module in the embodiment shown in FIG13 may include the following steps:

[0233] Step 1401: Determine whether an APS with ID i exists in the APS history candidate set.

[0234] If the APS with ID i does not exist in the original APS historical candidate set, then directly insert the new APS with ID i; otherwise, perform the following steps.

[0235] Step 1402: Brightness APS is inserted.

[0236] If there is no brightness APS in the APS with ID i in the APS history candidate set, proceed directly to step 1403 .

[0237] If there is a brightness APS, traverse the APS history candidate set in the specified order, such as from old to new or from new to old, and determine whether the brightness APS is empty. If it is empty, insert the brightness APS in the APS with ID i into the empty position and stop traversal; if it is not empty, continue traversal.

[0238] Step 1403: Chroma APS interpolation.

[0239] If there is no brightness APS in the APS with ID i in the APS history candidate set, proceed directly to step 1404 .

[0240] If a chroma APS exists, traverse the APS history candidate set in the specified order, such as from old to new or from new to old, and determine whether the chroma APS is empty. If it is empty, insert the chroma APS in the APS with ID i into the empty position and stop traversal; if it is not empty, continue traversal.

[0241] Step 1404: CCALF Cb APS is inserted.

[0242] If there is no CCALF Cb APS in the APS with ID i in the APS historical candidate set, proceed directly to step 1405 .

[0243] If CCALF Cb APS exists, traverse the APS history candidate set in the specified order, such as from old to new or from new to old, and determine whether the CCALF Cb APS is empty. If it is empty, insert the CCALF Cb APS in the APS with ID i into the empty position and stop traversal; if it is not empty, continue traversal.

[0244] Step 1405: CCALF Cr APS is inserted.

[0245] If there is no CCALF Cr APS in the APS with ID i in the APS historical candidate set, proceed directly to step 1406 .

[0246] If there is a CCALF Cr APS, traverse the APS history candidate set in the specified order, such as from old to new or from new to old, and determine whether the CCALF Cr APS is empty. If it is empty, insert the CCALF Cr APS in the APS with ID i into the empty position and stop traversal; if it is not empty, continue traversal.

[0247] It should be noted that the execution order of steps 1402 to 1405 can be performed in parallel or in any order, but this embodiment is not limited thereto.

[0248] Step 1406: Insert a new APS.

[0249] Insert the new APS with ID i into the ALF APS historical candidate set, overwriting the old APS with the corresponding ID.

[0250] Figure 15 is a flow chart of another filtering parameter processing method provided by an embodiment. The filtering parameter processing method provided by this embodiment can be applied to the decoding end. The filtering parameter processing method provided by this embodiment is mainly used to solve the problem of the number of available historical candidate sets decreasing during the update process of the historical candidate sets. The filtering parameter processing method provided by this embodiment can be applied to the scenario of video coding, especially to the scenario of processing the filtering parameters of ALF in video coding. The filtering parameter processing method provided by this embodiment can be applied to a filtering parameter processing device. The filtering parameter processing device can be implemented by software and / or hardware. The filtering parameter processing device can be set in an electronic device, for example, a computer device. As shown in Figure 15, the filtering parameter processing method provided by this embodiment includes the following steps:

[0251] Step 1501: Obtain a new APS of the current filtering mode of the target filtering unit.

[0252] Parse the code stream of the target filter unit. If it contains alf_data() information, parse the alf_data() information to obtain the index of the current ALF APS in alf_data() and the filter coefficients therein, that is, the new APS and other information.

[0253] Step 1502: Update the target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode to the new APS of the current filtering mode.

[0254] The implementation process and technical principle of step 1502 in which the target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode are updated to the new APS of the current filtering mode are similar to those in step 1202 and are not repeated here.

[0255] Step 1503: When the target historical filtering parameters are not empty, the empty historical filtering parameters in the historical filtering parameters of the current filtering mode are updated to the target historical filtering parameters.

[0256] The implementation process and technical principles of step 1503 are similar to those of step 1203 and will not be repeated here. Step 1503 can be implemented by calling the interpolation module. The implementation process of the interpolation module is similar to the implementation process of the interpolation module in the embodiment shown in Figure 14.

[0257] In one embodiment, the filtering parameter processing method provided in this embodiment may further include at least one of the following steps: luminance ALF reconstruction: reconstructing the image after luminance ALF based on the luminance ALF information obtained from bitstream parsing; chrominance ALF reconstruction: reconstructing the image after chrominance ALF based on the chrominance ALF information obtained from bitstream parsing; CCALF reconstruction: reconstructing the image after CCALF based on the CCALF information obtained from bitstream parsing.

[0258] The filtering parameter processing method provided in this embodiment updates the target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode to the new APS of the current filtering mode after obtaining the new APS of the current filtering mode, and updates the empty historical filtering parameters in the historical filtering parameters of the current filtering mode to the target historical filtering parameters when the target historical filtering parameters are not empty. By replacing the empty historical filtering parameters with the non-empty target historical filtering parameters, the problem of a decrease in the number of available historical candidate sets during the updating of the historical candidate sets is avoided, the fullness of the historical candidate sets is improved, and thus the performance of the ALF is improved.

[0259] FIG16 is a schematic diagram of the structure of a filter parameter processing device provided by an embodiment. As shown in FIG16 , the filter parameter processing device may include the following modules: a first determination module 161 , a second determination module 162 , and a third determination module 163 .

[0260] The first determining module 161 is configured to determine a new APS of a current filtering mode of a target filtering unit.

[0261] The second determining module 162 is configured to determine a corrected decision factor after determining that the current filtering mode satisfies the decision factor correction condition.

[0262] Among them, the decision factor after correction is smaller than the decision factor before correction.

[0263] The third determining module 163 is configured to determine whether to use the new APS of the current filtering mode according to the revised decision factor.

[0264] In one embodiment, the current filtering mode includes at least one of the following: luma ALF, chroma ALF, CCALF Cb, and CCALF Cr.

[0265] In one embodiment, the device further includes: a fourth determination module configured to determine whether the current filtering mode satisfies a decision factor correction condition.

[0266] In one embodiment, the fourth determining module is configured to be at least one of the following: the number of available historical candidate sets of the current filtering mode is less than a preset threshold; and a new APS of the previous filtering mode is used.

[0267] In one embodiment, the preset thresholds corresponding to different filtering modes are the same, or the preset thresholds corresponding to different filtering modes are different.

[0268] In one embodiment, the second determining module 162 is configured to determine the modified decision factor as the product of the preset weight and the decision factor before modification, wherein the preset weight is a number less than 1 and greater than zero.

[0269] In one embodiment, the preset weights corresponding to different filtering modes are the same, or the preset weights corresponding to different filtering modes are different.

[0270] In one embodiment, the apparatus further includes: a fifth determining module configured to determine whether to use a new APS of the current filtering mode according to the decision factor before correction after determining that the current filtering mode does not meet the decision factor correction condition.

[0271] In one embodiment, the device also includes: a first updating module, which is configured to update the target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode to the new APS of the current filtering mode after determining that a new APS of the current filtering mode needs to be used based on the revised decision factor.

[0272] In one embodiment, the apparatus further includes: a second updating module configured to update the historical filtering parameters that are empty in the historical filtering parameters of the current filtering mode to the target historical filtering parameters when the target historical filtering parameters are not empty.

[0273] In one embodiment, the apparatus further includes: a transmission module configured to transmit the new APS of the current filtering mode in the bitstream after determining that the new APS of the current filtering mode needs to be used according to the revised decision factor.

[0274] In one embodiment, the target filtering unit includes at least one of the following: a slice, a tile, a tree coding unit CTU, and a sub-picture.

[0275] In one embodiment, the decision factor includes a Lagrangian factor.

[0276] The filtering parameter processing device provided in this embodiment is for implementing the filtering parameter processing method of the above embodiment. The implementation principle and technical effects of the filtering parameter processing device provided in this embodiment are similar to those of the above embodiment and will not be repeated here.

[0277] FIG17 is a schematic diagram of the structure of another filtering parameter processing device provided by an embodiment. As shown in FIG17 , the filtering parameter processing device provided by this embodiment includes the following modules: a first determining module 171 , a first updating module 172 , and a second updating module 173 .

[0278] The first determining module 171 is configured to determine a new APS of a current filtering mode of a target filtering unit.

[0279] The first updating module 172 is configured to update the target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode to the new APS of the current filtering mode when it is determined to use the new APS of the current filtering mode.

[0280] The second updating module 173 is configured to update the historical filtering parameters that are empty in the historical filtering parameters of the current filtering mode to the target historical filtering parameters when the target historical filtering parameters are not empty.

[0281] In one embodiment, the second updating module 173 is configured to: determine the empty historical filtering parameters in the historical filtering parameters of the current filtering mode according to a preset rule; and update the empty historical filtering parameters in the historical filtering parameters to the target historical filtering parameters.

[0282] In one embodiment, the preset rules include at least one of the following: traversing the historical filtering parameters of the current filtering mode in order from new to old according to the generation time; traversing the historical filtering parameters of the current filtering mode in order from old to new according to the generation time.

[0283] In one embodiment, the device also includes: a second determination module, configured to determine a revised decision factor when it is determined that the current filtering mode meets the decision factor correction condition, wherein the revised decision factor is smaller than the decision factor before correction; and a third determination module, configured to determine whether to use a new APS of the current filtering mode based on the revised decision factor.

[0284] In one embodiment, the decision factor includes a Lagrangian factor.

[0285] The filtering parameter processing device provided in this embodiment is for implementing the filtering parameter processing method of the above embodiment. The implementation principle and technical effects of the filtering parameter processing device provided in this embodiment are similar to those of the above embodiment and will not be repeated here.

[0286] FIG18 is a schematic diagram of the structure of another filter parameter processing device provided by an embodiment. As shown in FIG18 , the filter parameter processing device provided by this embodiment includes the following modules: an acquisition module 181 , a first updating module 182 , and a second updating module 183 .

[0287] The acquisition module 181 is configured to acquire a new APS of a current filtering mode of a target filtering unit.

[0288] The first updating module 182 is configured to update the target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode to the new APS of the current filtering mode.

[0289] The second updating module 183 is configured to update the historical filtering parameters that are empty in the historical filtering parameters of the current filtering mode to the target historical filtering parameters when the target historical filtering parameters are not empty.

[0290] FIG19 is a schematic diagram of the structure of an electronic device provided by an embodiment. As shown in FIG19 , the electronic device includes a processor 60. It may also include: a memory 61 and a communication interface 62. The number of processors 60 in the electronic device can be one or more, and FIG19 uses one processor 60 as an example. The processor 60, memory 61, and communication interface 62 in the electronic device can be connected via a bus or other means, and FIG19 uses a bus connection as an example. The bus represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures.

[0291] The memory 61, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the methods in the embodiments of the present application. The processor 60 executes the software programs, instructions, and modules stored in the memory 61 to execute at least one functional application and data processing of the electronic device, thereby implementing the above-mentioned methods.

[0292] The memory 61 may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the terminal. Furthermore, the memory 61 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some instances, the memory 61 may include memory remotely located relative to the processor 60, and such remote memory may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a network, a mobile communication network, and combinations thereof.

[0293] The communication interface 62 can be configured to receive and send data.

[0294] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method provided in any embodiment of the present application is implemented.

[0295] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. The computer-readable storage medium includes (a non-exhaustive list): an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0296] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, the data signal carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0297] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0298] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination of multiple programming languages, including object-oriented programming languages ​​(such as Java, Smalltalk, C++, Ruby, Go), and conventional procedural programming languages ​​(such as "C" or similar programming languages). The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0299] In general, various embodiments of the present application may be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. For example, some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device, although the present application is not limited thereto.

[0300] Embodiments of the present application may be implemented by executing computer program instructions by a data processor of a mobile device, for example, in a processor entity, or by hardware, or by a combination of software and hardware. The computer program instructions may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages.

[0301] Any block diagram of a logical flow in the drawings of this application may represent program steps, or may represent interconnected logical circuits, modules and functions, or may represent a combination of program steps and logical circuits, modules and functions. A computer program may be stored on a memory. The memory may be of any type suitable for the local technical environment and may be implemented using any suitable data storage technology, such as, but not limited to, read-only memory (ROM), random access memory (RAM), optical memory devices and systems (digital versatile discs DVD or CD), etc. Computer-readable media may include non-transitory storage media. A data processor may be of any type suitable for the local technical environment, such as, but not limited to, a general-purpose computer, a special-purpose computer, a microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a programmable logic device (FPGA), and a processor based on a multi-core processor architecture.

Claims

1. A filtering parameter processing method, comprising: Determine a new adaptive parameter set APS of the current filtering mode of the target filtering unit; After determining that the current filtering mode satisfies the decision factor correction condition, determining a corrected decision factor; wherein the corrected decision factor is smaller than the decision factor before correction; Determine whether to use the new APS of the current filtering mode according to the modified decision factor.

2. The method according to claim 1, wherein: The current filtering mode includes at least one of the following: Luma adaptive loop filter ALF, chroma ALF, inter-component adaptive loop filter CCALF Cb, CCALF Cr.

3. The method according to claim 1 or 2, further comprising: Determine whether the current filtering mode meets the decision factor correction condition.

4. The method according to claim 3, wherein: The determining whether the current filtering mode satisfies the decision factor correction condition includes at least one of the following: The number of available historical candidate sets for the current filtering mode is less than a preset threshold; New APS using preamble filtering mode.

5. The method according to claim 4, wherein: The preset thresholds corresponding to different filtering modes are the same, or the preset thresholds corresponding to different filtering modes are different.

6. The method according to claim 1 or 2, wherein: The step of determining the modified decision factor comprises: The product of the preset weight and the decision factor before correction is determined as the corrected decision factor; wherein the preset weight is a number less than 1 and greater than zero.

7. The method according to claim 6, wherein: The preset weights corresponding to different filtering modes are the same, or the preset weights corresponding to different filtering modes are different.

8. The method according to claim 1 or 2, further comprising: After determining that the current filtering mode does not meet the decision factor modification condition, it is determined whether to use a new APS of the current filtering mode according to the decision factor before modification.

9. The method according to claim 1 or 2, further comprising: After determining that a new APS of the current filtering mode needs to be used according to the revised decision factor, the target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode are updated to the new APS of the current filtering mode.

10. The method according to claim 9, further comprising: When the target historical filtering parameters are not empty, the empty historical filtering parameters in the historical filtering parameters of the current filtering mode are updated to the target historical filtering parameters.

11. The method according to claim 1 or 2, further comprising: After determining that a new APS of the current filtering mode needs to be used according to the modified decision factor, the new APS of the current filtering mode is transmitted in a bitstream.

12. The method according to claim 1 or 2, wherein: The decision factors include Lagrangian factors.

13. The method according to claim 1 or 2, wherein: The target filtering unit includes at least one of the following: a slice, a tile, a tree coding unit CTU, and a sub-picture.

14. A filtering parameter processing method, comprising: Determine a new adaptive parameter set APS of the current filtering mode of the target filtering unit; When it is determined to use the new APS of the current filtering mode, updating the target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode to the new APS of the current filtering mode; When the target historical filtering parameters are not empty, the empty historical filtering parameters in the historical filtering parameters of the current filtering mode are updated to the target historical filtering parameters.

15. The method according to claim 14, wherein: The updating of the empty historical filtering parameters in the historical filtering parameters of the current filtering mode to the target historical filtering parameters includes: Determine, according to a preset rule, the historical filtering parameters that are empty among the historical filtering parameters of the current filtering mode; Update the empty historical filtering parameters in the historical filtering parameters of the current filtering mode to the target Mark the historical filter parameters.

16. The method according to claim 15, wherein: The preset rules include at least one of the following: Traversing the historical filtering parameters of the current filtering mode in order of generation time from new to old; The historical filtering parameters of the current filtering mode are traversed in order from old to new according to the generation time.

17. The method according to any one of claims 14 to 16, further comprising: When it is determined that the current filtering mode satisfies the decision factor correction condition, determining a corrected decision factor; wherein the corrected decision factor is smaller than the decision factor before correction; Determine whether to use the new APS of the current filtering mode according to the modified decision factor.

18. A filtering parameter processing method, comprising: Obtain a new adaptive parameter set APS of the current filtering mode of the target filtering unit; Updating the target historical filtering parameters corresponding to the target filtering unit in the historical filtering parameters of the current filtering mode to the new APS of the current filtering mode; When the target historical filtering parameters are not empty, the empty historical filtering parameters in the historical filtering parameters of the current filtering mode are updated to the target historical filtering parameters.

19. An electronic device comprising: processor; The processor is configured to implement the filtering parameter processing method as described in any one of claims 1 to 13, or implement the filtering parameter processing method as described in any one of claims 14 to 17, or implement the filtering parameter processing method as described in claim 18 when executing a computer program.

20. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the filtering parameter processing method according to any one of claims 1 to 13 is implemented, or the filtering parameter processing method according to any one of claims 14 to 17 is implemented, or the filtering parameter processing method according to claim 18 is implemented.

Citation Information

Patent Citations

  • Beta offset control for deblocking filters in video coding

    CN104247417A

  • Advanced deblocking filtering (DBF), adaptive loop filtering (ALF) and sample adaptive offset (SAO) control and adaptive parameter set (APS) number constraints in video coding

    CN115462072A

  • Syntax and semantics for adaptive loop filter and sample adaptive offset

    US20150016551A1

  • Adaptive loop filter signaling redundancy removal field

    US20210195183A1

Cited By

  • Video coding preprocessing method and device, electronic equipment, storage medium and computer program product

    CN120499379A