Loop filtering method, device, equipment and storage medium

By determining the ALF limit value in the image area, the calculation process of the ALF limit value is simplified, the problem of inefficient encoding in the prior art is solved, and more efficient encoding is achieved.

CN115412729BActive Publication Date: 2025-08-08TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110594459.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-28
Publication Date
2025-08-08
Estimated Expiration
2041-05-28

AI Technical Summary

Technical Problem

In the prior art, the solution process of adaptive loop filtering (ALF) limiting value is complicated, resulting in low encoding efficiency.

Method used

By acquiring the size of the screen content encoding (SCC) area or noise area in the target image area, the ALF limit value corresponding to the target image area is determined, and the calculation process of the ALF limit value is simplified.

Benefits of technology

The determination complexity of ALF limit value is reduced and the encoding efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115412729B_ABST
    Figure CN115412729B_ABST
Patent Text Reader

Abstract

The present application provides a loop filtering method, apparatus, device, and storage medium, the method comprising: obtaining the size of a target image area and the size of a first area within the target image area, the first area being a screen content coding SCC area or a noise area; determining an adaptive loop filtering ALF amplitude limit value corresponding to the target image area based on the size of the first area and the size of the target image area; determining a reconstruction value of a block to be coded within the target image area; and performing ALF filtering on the reconstruction value of the block to be coded within the target image area based on the ALF amplitude limit value corresponding to the target image area. That is, in an embodiment of the present application, the ALF amplitude limit value corresponding to the target image area is determined by the size of the screen content coding SCC area or the noise area of the target image area, thereby reducing the complexity of determining the ALF amplitude limit value, thereby improving filtering efficiency, and thus improving the coding efficiency of the coding end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image processing technology, and in particular to a loop filtering method, apparatus, device, and storage medium. Background Art

[0002] Digital video technology can be incorporated into a variety of video devices, such as digital televisions, smartphones, computers, e-readers, or video players. With the development of video technology, the amount of video data included has increased. To facilitate the transmission of video data, video devices implement video compression technology to enable more efficient transmission or storage of video data.

[0003] Current encoding technologies are typically lossy, resulting in distortion in the encoded image. To reduce this distortion, the reconstructed image values are filtered. Common filtering methods include deblocking filtering, sample adaptive compensation filtering, and adaptive loop filtering (ALF). ALF is an adaptive filter based on the Wiener filter. Its function is to optimize the output image signal to minimize the mean square error (MSD) between it and the original image, thereby reducing distortion.

[0004] When performing ALF filtering on the current image, it is necessary to solve the ALF clipping value in the ALF coefficient. However, the current process of solving the ALF clipping value includes solving nonlinear equations and calculating rate-distortion optimization (RDO). The entire solution process is relatively complex, which in turn leads to reduced encoding and decoding efficiency. Summary of the Invention

[0005] The present application provides a loop filtering method, apparatus, device and storage medium for use in video coding and decoding technology to improve coding efficiency.

[0006] In a first aspect, a loop filtering method is provided, comprising:

[0007] Acquire a size of a target image area and a size of a first area within the target image area, where the first area is a screen content coding (SCC) area or a noise area;

[0008] Determining an adaptive loop filter (ALF) amplitude limit value corresponding to the target image area according to the size of the first area and the size of the target image area;

[0009] Determining a reconstruction value of a block to be encoded within the target image area;

[0010] ALF filtering is performed on the reconstructed value of the block to be encoded in the target image area according to the ALF limit value corresponding to the target image area.

[0011] In a second aspect, a loop filtering method is provided, comprising:

[0012] Decoding the code stream to determine the reconstructed value of the to-be-decoded block within the target image area;

[0013] Decoding the code stream to obtain an adaptive loop filter (ALF) amplitude limit value corresponding to the target image area;

[0014] ALF filtering is performed on the reconstructed value of the to-be-decoded block in the target image area according to the ALF limit value corresponding to the target image area.

[0015] In a third aspect, a loop filtering device is provided, comprising:

[0016] an acquiring unit, configured to acquire a size of a target image area and a size of a first area within the target image area, where the first area is a screen content coding (SCC) area or a noise area;

[0017] a limit value determining unit, configured to determine an adaptive loop filter ALF limit value corresponding to the target image area according to a size of the first area and a size of the target image area;

[0018] A reconstruction unit, configured to determine a reconstruction value of a block to be encoded within the target image area;

[0019] The filtering unit is configured to perform ALF filtering on the reconstructed value of the block to be encoded in the target image area according to the ALF limit value corresponding to the target image area.

[0020] In a fourth aspect, a loop filtering device is provided, comprising:

[0021] A reconstruction unit, configured to decode a code stream and determine a reconstruction value of a block to be decoded within the target image area;

[0022] A limit value determining unit, configured to decode a bitstream and obtain an adaptive loop filter (ALF) limit value corresponding to the target image region;

[0023] The filtering unit is configured to perform ALF filtering on the reconstructed value of the to-be-decoded block in the target image area according to the ALF limit value corresponding to the target image area.

[0024] In a fifth aspect, an encoding device is provided, comprising a processor and a memory, wherein the memory is configured to store a computer program, and the processor is configured to call and execute the computer program stored in the memory to execute the method of the second aspect or its respective implementations.

[0025] In a sixth aspect, a decoding device is provided, comprising a processor and a memory, wherein the memory is configured to store a computer program, and the processor is configured to call and execute the computer program stored in the memory to execute the method of the first aspect or its respective implementations.

[0026] In a seventh aspect, a computing device is provided, comprising a processor and a memory, wherein the memory is configured to store a computer program, and the processor is configured to call and execute the computer program stored in the memory to execute the method of the first or second aspect.

[0027] In an eighth aspect, a chip is provided for implementing the method of the first aspect or its respective implementations. Specifically, the chip includes: a processor for calling and executing a computer program from a memory, so that a device equipped with the chip executes the method of the first or second aspect.

[0028] In a ninth aspect, a computer-readable storage medium is provided for storing a computer program, which enables a computer to execute the method in the first or second aspect above.

[0029] In a tenth aspect, a computer program product is provided, comprising computer program instructions, which enable a computer to execute the method in the first or second aspect above.

[0030] In an eleventh aspect, a computer program is provided, which, when executed on a computer, enables the computer to execute the method in the first or second aspect.

[0031] Through the technical solution provided by the present application, the size of the target image area and the size of the first area within the target image area are obtained, where the first area is the screen content coding SCC area or the noise area; the adaptive loop filter ALF clipping value corresponding to the target image area is determined based on the size of the first area and the size of the target image area; the reconstruction value of the block to be coded within the target image area is determined; and the reconstruction value of the block to be coded within the target image area is ALF filtered based on the ALF clipping value corresponding to the target image area. That is, in the embodiment of the present application, the ALF clipping value corresponding to the target image area is determined based on the size of the screen content coding SCC area or the noise area within the target image area. Compared with the above-mentioned method of calculating the ALF clipping value by solving a nonlinear equation and calculating the ROD, the method of determining the ALF clipping value in the embodiment of the present application is simple, reduces the complexity of determining the ALF clipping value, thereby improving the filtering efficiency, and thus improving the coding efficiency of the coding end. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0033] Figure 1 This is a schematic block diagram of a video encoding and decoding system involved in an embodiment of the present application;

[0034] Figure 2 A schematic diagram of a coding framework provided in an embodiment of the present application;

[0035] Figure 3 is a schematic diagram of a decoding framework provided in an embodiment of the present application;

[0036] Figure 4A This is a schematic diagram of a 7x7 diamond filter used for the luminance component;

[0037] Figure 4B This is a schematic diagram of a 5x5 diamond filter used for the chroma component;

[0038] Figure 5 A flowchart of a loop filtering method provided in one embodiment of the present application;

[0039] Figure 6 A flowchart of a loop filtering method provided in one embodiment of the present application;

[0040] Figure 7 A flowchart of a loop filtering method provided in one embodiment of the present application;

[0041] Figure 8 A flowchart of a loop filtering method provided in one embodiment of the present application;

[0042] Figure 9 is a schematic block diagram of a loop filtering device provided in an embodiment of the present application;

[0043] Figure 10 is a schematic block diagram of a loop filtering device provided in an embodiment of the present application;

[0044] Figure 11 It is a schematic block diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0046] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0047] The present application can be applied to the field of image coding and decoding, the field of video coding and decoding, the field of hardware video coding and decoding, the field of dedicated circuit video coding and decoding, the field of real-time video coding and decoding, etc. For example, the solution of the present application can be combined with an audio and video coding standard (AVS), such as the H.264 / audio video coding (AVC) standard, the H.265 / high efficiency video coding (HEVC) standard, and the H.266 / versatile video coding (VVC) standard. Alternatively, the solution of the present application can be combined with other proprietary or industry standards and operated, and the standards include ITU-TH.261, ISO / IEC MPEG-1 Visual, ITU-TH.262 or ISO / IEC MPEG-2 Visual, ITU-TH.263, ISO / IEC MPEG-4 Visual, ITU-TH.264 (also known as ISO / IEC MPEG-4 AVC), including scalable video coding (SVC) and multi-view video coding (MVC) extensions. It should be understood that the technology of this application is not limited to any specific coding standard or technology.

[0048] To facilitate understanding, first combine Figure 1 The video encoding and decoding system involved in the embodiments of the present application is introduced.

[0049] Figure 1 This is a schematic block diagram of a video encoding and decoding system involved in an embodiment of the present application. It should be noted that: Figure 1 This is just an example. The video encoding and decoding system of the embodiment of the present application includes but is not limited to Figure 1 As shown. Figure 1 As shown, the video encoding and decoding system includes an encoding device 110 and a decoding device 120. The encoding device is used to encode (which can be understood as compressing) video data to generate a code stream and transmit the code stream to the decoding device. The decoding device decodes the code stream generated by the encoding device to obtain decoded video data.

[0050] The encoding device 110 of the embodiment of the present application can be understood as a device with a video encoding function, and the decoding device 120 can be understood as a device with a video decoding function, that is, the embodiment of the present application includes a wider range of devices for the encoding device 110 and the decoding device 120, such as smartphones, desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, televisions, cameras, display devices, digital media players, video game consoles, car computers, etc.

[0051] In some embodiments, the encoding device 110 may transmit the encoded video data (eg, a code stream) to the decoding device 120 via a channel 130. The channel 130 may include one or more media and / or devices capable of transmitting the encoded video data from the encoding device 110 to the decoding device 120.

[0052] In one example, the channel 130 includes one or more communication media that enable the encoding device 110 to transmit the encoded video data directly to the decoding device 120 in real time. In this example, the encoding device 110 can modulate the encoded video data according to a communication standard and transmit the modulated video data to the decoding device 120. The communication media includes wireless communication media, such as radio frequency spectrum. Optionally, the communication media may also include wired communication media, such as one or more physical transmission lines.

[0053] In another example, channel 130 includes a storage medium that can store the video data encoded by encoding device 110. The storage medium includes various locally accessible data storage media, such as optical disks, DVDs, and flash memories. In this example, decoding device 120 can retrieve the encoded video data from the storage medium.

[0054] In another example, the channel 130 may include a storage server that can store the video data encoded by the encoding device 110. In this example, the decoding device 120 can download the stored encoded video data from the storage server. Alternatively, the storage server can store the encoded video data and transmit the encoded video data to the decoding device 120, such as a web server (e.g., for a website), a file transfer protocol (FTP) server, etc.

[0055] In some embodiments, the encoding device 110 includes a video encoder 112 and an output interface 113. The output interface 113 may include a modulator / demodulator (modem) and / or a transmitter.

[0056] In some embodiments, the encoding device 110 may further include a video source 111 in addition to the video encoder 112 and the output interface 113 .

[0057] The video source 111 may include at least one of a video acquisition device (eg, a video camera), a video archive, a video input interface, and a computer graphics system, wherein the video input interface is used to receive video data from a video content provider, and the computer graphics system is used to generate video data.

[0058] The video encoder 112 encodes the video data from the video source 111 to generate a bitstream. The video data may include one or more pictures or a sequence of pictures. The bitstream contains the coding information of the picture or picture sequence in the form of a bitstream. The coding information may include the coded picture data and associated data. The associated data may include a sequence parameter set (SPS), a picture parameter set (PPS), and other syntax structures. The SPS may contain parameters that apply to one or more sequences. The PPS may contain parameters that apply to one or more pictures. The syntax structure refers to a set of zero or more syntax elements arranged in a specified order in the bitstream.

[0059] The video encoder 112 transmits the encoded video data directly to the decoding device 120 via the output interface 113. The encoded video data may also be stored in a storage medium or a storage server for subsequent reading by the decoding device 120.

[0060] In some embodiments, the decoding device 120 includes an input interface 121 and a video decoder 122 .

[0061] In some embodiments, the decoding device 120 may further include a display device 123 in addition to the input interface 121 and the video decoder 122 .

[0062] The input interface 121 includes a receiver and / or a modem and can receive the encoded video data via the channel 130 .

[0063] The video decoder 122 is configured to decode the encoded video data to obtain decoded video data, and transmit the decoded video data to the display device 123 .

[0064] The decoded video data is displayed on the display device 123. The display device 123 may be integrated with the decoding device 120 or external to the decoding device 120. The display device 123 may include various display devices, such as a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or other types of display devices.

[0065] also, Figure 1 This is just an example, and the technical solution of the embodiment of this application is not limited to Figure 1 For example, the technology of the present application can also be applied to unilateral video encoding or unilateral video decoding.

[0066] The following is an introduction to the video encoding framework involved in the embodiments of the present application.

[0067] Figure 2 A schematic diagram of the coding framework provided in an embodiment of the present application.

[0068] like Figure 2 As shown, the coding framework includes: a prediction unit 11, a residual generation unit 12, a transform unit 13, a quantization unit 14, an inverse quantization unit 15, an inverse transform unit 16, a reconstruction unit 17, a filtering unit 18, and an entropy coding unit 19. The prediction unit 11 includes an inter-frame prediction unit 11a and an intra-frame prediction unit 11b. The inter-frame prediction unit 11a includes a motion estimation unit 11a1 and a motion compensation unit 11a2.

[0069] This video encoding end can be applied to image data in luminance and chrominance (YCbCr, YUV) formats. For example, the YUV ratio can be 4:2:0, 4:2:2, or 4:4:4, where Y represents luminance (Luma), Cb (U) represents blue chrominance, Cr (V) represents red chrominance, and U and V represent chrominance (Chroma) used to describe color and saturation. For example, in terms of color format, 4:2:0 means that every 4 pixels have 4 luminance components and 2 chrominance components (YYYYCbCr), 4:2:2 means that every 4 pixels have 4 luminance components and 4 chrominance components (YYYYCbCrCbCr), and 4:4:4 represents full pixel display (YYYYCbCrCbCrCbCrCbCr).

[0070] For example, the video encoder can read unequal pixels, including luminance and chrominance components, for digital videos in different color formats. In other words, the video encoder can read a black-and-white or color image, i.e., the image to be encoded. After reading the image to be encoded, the video encoder divides the image into block data and performs encoding based on the block data. For example, the video encoder reads the video data and, for each frame of the video data, divides the frame into several Coding Tree Units (CTUs). A CTU is divided into one luminance CTB and two chrominance CTBs, with CTB sizes of 16, 32, or 64, for example. A CTU can be further divided into several Coding Units (CUs) for encoding. A CU can be either a rectangular block or a square block. A CU is further divided into a Prediction Unit (PU) and a Transform Unit (TU), thereby separating encoding, prediction, and transformation, and providing greater flexibility in processing. In one example, a CTU is divided into CUs in a quadtree manner, where the maximum size of a CU is 64x64 and the minimum size is 8x8. A CU is divided into TUs and PUs in a quadtree manner, where the maximum size of a TU is 32x32 and the minimum size is 8x8. There is no definite relationship between PUs and TUs, and a TU is allowed to span multiple PUs. However, in intra-frame prediction, one PU may correspond to multiple TUs, and one TU may correspond to at most one PU.

[0071] After receiving the video, the encoder divides each frame of the video into multiple image blocks to be encoded. For the current image block to be encoded, the prediction unit 11 first predicts the current image block to be encoded by referencing the reconstructed image block to obtain prediction information for the current image block to be encoded. The encoder can use inter-frame prediction or intra-frame prediction techniques to obtain the prediction information.

[0072] Specifically, the motion estimation unit 11a1 in the inter-frame prediction unit 11a may search the reference pictures in the reference picture list to find a reference block for the image block to be encoded. The motion estimation unit 11a1 may generate an index indicating the reference block and a motion vector indicating the spatial displacement between the image block to be encoded and the reference block. The motion estimation unit 11a1 may output the reference block index and the motion vector as motion information for the image block to be encoded. The motion compensation unit 11a2 may obtain prediction information for the image block to be encoded based on the motion information of the image block to be encoded.

[0073] The intra-frame prediction unit 11b can use an intra-frame prediction mode to generate prediction information for the current image block to be encoded. Currently, there are 15 intra-frame prediction modes, including the Planar mode, the DC mode, and 13 angular prediction modes. The intra-frame prediction unit 11b can also use intra-frame block copy (IBC) and intra-frame string copy (ISC) technologies.

[0074] The residual generation unit 12 is used to subtract the prediction information from the original signal of the current image block to be encoded to generate a residual signal. After prediction, the amplitude of the residual signal is much smaller than the original signal. The transformation unit 13 and quantization unit 14 are used to transform and quantize the residual signal. After transformation and quantization, the transformed quantization coefficients are obtained. The entropy coding unit 19 is used to encode the quantization coefficients and other encoding information using entropy coding techniques to generate a bitstream.

[0075] Furthermore, the encoding end also needs to reconstruct the current image block to be encoded in order to provide reference pixels for the encoding of subsequent image blocks to be encoded. Specifically, after obtaining the transform quantization coefficients of the current image block to be encoded, the inverse quantization unit 15 and the inverse transform unit 16 perform inverse quantization and inverse transform on the transform quantization coefficients of the current image block to be encoded to obtain a reconstructed residual signal. The reconstruction unit 17 adds the reconstructed residual signal to the prediction information corresponding to the current image block to be encoded to obtain a reconstructed signal of the current image block to be encoded, and obtains a reconstructed image block based on the reconstructed signal. Furthermore, the filtering unit 18 can filter the reconstructed image block, wherein deblocking filtering, adaptive sample offset (SAO) or adaptive loop filtering (ALF) can be used. Among them, the reconstructed image block can predict the subsequent image block to be encoded.

[0076] Figure 3 It is a schematic diagram of the decoding framework provided in an embodiment of the present application.

[0077] like Figure 3As shown, the decoding framework includes: an entropy decoding unit 21, a prediction unit 22, an inverse quantization unit 23, an inverse transform unit 24, a reconstruction unit 25, and a filtering unit 26. The prediction unit 22 includes: a motion compensation unit 221 and an intra-frame prediction unit 222.

[0078] Specifically, after the decoding end obtains the bitstream, the entropy decoding unit 21 first performs entropy decoding on the bitstream to obtain the transform quantization coefficients of the current image block to be reconstructed. Then, the inverse quantization unit 23 and the inverse transform unit 24 perform inverse quantization and inverse transform on the transform quantization coefficients to obtain the reconstructed residual signal of the current image block to be reconstructed. The prediction unit 22 predicts the current image block to be reconstructed to obtain prediction information for the current image block to be reconstructed. If the prediction unit 22 uses inter-frame prediction, the motion compensation unit 221 can construct a first reference picture list (list 0) and a second reference picture list (list 1) based on the syntax elements parsed from the bitstream. In addition, the entropy decoding unit 21 can parse the motion information of the image block to be reconstructed. The motion compensation unit 221 can determine one or more reference blocks for the image block to be reconstructed based on this motion information. The motion compensation unit 221 can generate prediction information for the image block to be reconstructed based on the one or more reference blocks. If the prediction unit 22 uses intra-frame prediction, the entropy decoding unit 21 can parse the index of the intra-frame prediction mode used. The intra-frame prediction unit 222 can use the intra-frame prediction mode according to the index to perform intra-frame prediction to obtain prediction information of the image block to be reconstructed. The intra-frame prediction unit 222 can also use IBC or ISC technology.

[0079] Furthermore, the reconstruction unit 25 is configured to add the prediction information to the reconstructed residual signal to obtain a reconstruction signal for the current image block to be reconstructed. Based on the reconstruction signal, the current reconstructed image block corresponding to the current image block to be reconstructed is obtained. This current reconstructed image block can be used to predict subsequent image blocks to be reconstructed. Similarly to the encoding end described above, the filtering unit 26 on the decoding end can optionally filter the current reconstructed image block.

[0080] It should be noted that the block division information determined by the encoder, as well as mode information or parameter information such as prediction, transform, quantization, entropy coding, and loop filtering, etc., are carried in the bitstream when necessary. The decoder parses the bitstream and analyzes the existing information to determine the same block division information, prediction, transform, quantization, entropy coding, loop filtering, etc. mode information or parameter information as the encoder, thereby ensuring that the decoded image obtained by the encoder and the decoder are identical.

[0081] The above is the basic process of the video codec under the block-based hybrid coding framework. With the development of technology, some modules or steps of the framework or process may be optimized. This application is applicable to the basic process of the video codec under the block-based hybrid coding framework, but is not limited to the framework and process.

[0082] It should be noted that the block division information determined by the encoder, as well as mode information or parameter information such as prediction, transform, quantization, entropy coding, and loop filtering, etc., are carried in the bitstream when necessary. The decoder parses the bitstream and analyzes the existing information to determine the same block division information, prediction, transform, quantization, entropy coding, loop filtering, etc. mode information or parameter information as the encoder, thereby ensuring that the decoded image obtained by the encoder and the decoder are identical.

[0083] The above is the basic process of the video codec under the block-based hybrid coding framework. With the development of technology, some modules or steps of the framework or process may be optimized. This application is applicable to the basic process of the video codec under the block-based hybrid coding framework, but is not limited to the framework and process.

[0084] The embodiments of the present application mainly relate to the ALF filtering in the above-mentioned filtering unit.

[0085] The following is an introduction to the relevant knowledge of ALF filtering.

[0086] Loop filtering is one of the core technologies of video coding. The VVC encoder supports three types of loop filters: deblocking filter (DF), sample adaptive offset filter (SAO), and adaptive loop filter (ALF).

[0087] ALF is an adaptive filter based on Wiener filtering. Its function is to optimize the output image signal to minimize the mean square error (MSE) between it and the original image, thereby reducing distortion. ALF is performed after the DF filter and the SAO filter. ALF derives the filter coefficients by solving the Wiener-Hopf equation for Wiener filtering. The encoder determines whether to enable ALF through rate-distortion optimization (RDO). If ALF is enabled, the filter coefficients need to be passed to the decoder.

[0088] ALF Luminance and Chroma Filters Introduction:

[0089] The VVC standard defines filters of different sizes for luminance and chrominance components. A 7x7 diamond filter is used for the luminance component, such as Figure 4A As shown. A 5x5 diamond filter is used for the chrominance component, as shown Figure 4B The center position of the filter corresponds to the current filtered pixel position, and the pixels symmetrical to the current pixel center use the same filter coefficient.

[0090] Introduction to pixel block classification and geometric transformation:

[0091] For the output image of the luminance component, each 4x4 pixel block is divided into one of 25 categories. The ALF filter of the chrominance component does not need to be classified, and each component only uses one set of ALF filter coefficients. The classification index C of the pixel block of the luminance component is obtained by the directionality D and the quantized activity feature (Activity) of the block. To find it. The formula is as follows:

[0092]

[0093] Among them, D and It is derived from the horizontal, vertical, diagonal and diagonal pixel gradient values of a 4x4 pixel block.

[0094] The ALF filter coefficients include filter coefficients and limit values.

[0095] In some embodiments, before filtering each 4x4 luminance block, the filter coefficients and clipping values are geometrically transformed according to their gradient values, including four types of transformations: unchanged, diagonal, vertical flip, and rotation. Applying geometric transformation to the filter parameters is equivalent to performing the corresponding geometric transformation on the filtered pixels while keeping the parameters unchanged before filtering. The purpose of applying geometric transformation is to make the directionality of the filtering operation as close as possible so that more pixels can share the same filter parameters, reduce distortion without encoding more filter parameters, and thus improve overall coding efficiency. Geometric transformation is a relatively clever design. While maintaining a maximum of 25 groups of filters, it increases the actual classification from 25 groups to 25×4=100 groups, thereby improving adaptability.

[0096] Introduction to the filtering process:

[0097] The ALF filter coefficients are calculated by the encoder through rate-distortion optimization (RDO) and transmitted to the decoder through the bitstream. Optionally, set the CTB level switch that controls the ALF.

[0098] At the decoder side, when ALF is enabled on a CTB, the ALF filter will be applied to each reconstructed pixel R(i,j) of the CTB. The calculation formula for the filtered output pixel value R'(i,j) is as follows:

[0099]

[0100] Where f(k, l) represents the solved filter parameters, K(x, y) is the clipping formula, and c(k, l) represents the solved clipping parameters. The variables k and l take values in the range [-L / 2, L / 2], where L represents the filter length.

[0101] The clipping formula is K(x, y) = min(y, max(-y, x)), which is equivalent to Clip3(-y, y, x). The clipping operation introduces nonlinearity, allowing the ALF to effectively reduce the interference of surrounding pixel values on the current pixel's filtered output when the surrounding pixel values differ significantly from the current pixel.

[0102] ALF filter related signal introduction:

[0103] The filter parameter signals of ALF and cross-component adaptive loop filter (CCALF) are contained in the adaptive parameter set (APS). An APS can contain up to 25 groups of luminance ALF filter coefficients and clipping values, and up to 8 groups of chrominance ALF filter coefficients and clipping values. Each chrominance component of CCALF can have up to 4 groups of filter coefficients in an APS. In order to save bit rate, the signals between different categories in the luminance filter coefficients can be merged. The index of the APS used by the current slice can be sent in the slice header. In order to limit the computational complexity, the luminance and chrominance ALF filter coefficients are quantized to [-2 7 ,2 7 -1], the coefficient at the center is fixed to 128.

[0104] The filter clipping value index (Clipping Value Index) extracted from the APS can be used to determine the clipping values (Clipping Value) of luminance and chrominance by looking up the table. These clipping values are related to the internal bit depth (BitDepth). The corresponding relationship is shown in Table 1.

[0105] Table 1 Correspondence between limit value and internal bit depth

[0106]

[0107] For the luma ALF filter, up to seven APS index signals can be sent in the slice header to describe the luma filter parameter set used for the current slice. Whether ALF is used for each CTB can be controlled by sending a switch signal at the CTB level. Each CTB can select filter parameters from 16 fixed ALF parameter sets and the APS of the current slice using the filter parameter set index. The 16 fixed ALF parameter sets are predefined and fixedly stored in the encoder and decoder.

[0108] For chroma filters, an APS index can be sent in the Slice Header to specify the chroma filter parameter set used by the current slice. If there are multiple filter parameters in the APS, the filter parameter set index can also be sent at the CTB level to determine the filter used by the current chroma CTB.

[0109] In one possible implementation, when performing ALF filtering on a target image region, it is necessary to determine the ALF clipping value within the ALF coefficients. This process involves solving nonlinear equations and calculating the RDO. Consequently, in this implementation, the ALF clipping values corresponding to all image regions must be calculated using both nonlinear equations and RDO calculations, resulting in low coding efficiency.

[0110] To address the above-mentioned technical issues, an embodiment of the present application determines the ALF clipping value corresponding to the target image region by encoding the size of the SCC region or the noise region according to the screen content of the target image region. Based on the determined ALF clipping value corresponding to the target image region, ALF filtering is performed on the reconstructed values of the to-be-encoded blocks within the target image region. Specifically, in an embodiment of the present application, the ALF clipping value corresponding to the target image region is determined by encoding the size of the SCC region or the noise region according to the screen content of the target image region. Compared to the aforementioned method of calculating the ALF clipping value by solving a nonlinear equation and calculating the ROD, the method of determining the ALF clipping value in an embodiment of the present application is simple, reduces the complexity of determining the ALF clipping value, and thereby improves the coding efficiency of the encoding end.

[0111] The technical solutions provided in the embodiments of the present application are described in detail below in conjunction with specific embodiments.

[0112] First, take the encoding end as an example.

[0113] Figure 5 This is a flowchart of a loop filtering method provided in an embodiment of the present application. The method of the embodiment of the present application is applied to Figure 1 or Figure 2 The encoding end shown is Figure 5Shown, including:

[0114] S501 : Acquire the size of a target image area and the size of a first area within the target image area, wherein the first area is an SCC area or a noise area.

[0115] The execution subjects of the embodiments of the present application include but are not limited to the following devices: an encoder, or an encoding device for performing string copy intra-frame prediction, such as a desktop computer, a mobile computing device, a notebook (e.g., laptop) computer, a tablet computer, a set-top box, a handheld device such as a smart phone, a television, a camera, a display device, a digital media player, a video game console, a car computer, or the like.

[0116] The embodiment of the present application does not limit the size of the target image area. For example, the target image area can be a frame image, a slice, a CTU, a CU, etc.

[0117] In some embodiments, the target image region is the current image frame.

[0118] When encoding, the encoding end divides the target image area into at least one block to be encoded. For example, the encoding end divides the target image area into at least one block to be encoded according to a preset scanning order. Each encoding block is encoded. The encoding process is as follows: Figure 2 As shown, specifically, the encoding end determines the prediction mode of the block to be encoded, and determines the predicted value of the block to be encoded based on the prediction mode. Based on the predicted value and the original value of the block to be encoded, the residual value of the block to be encoded is obtained. After the residual value of the block to be encoded is transformed and quantized, the quantized coefficient of the block to be encoded is obtained. The quantized coefficient of the block to be encoded is encoded to obtain a bitstream. At the same time, the quantized coefficient of the block to be encoded is dequantized and inversely transformed to obtain the residual value of the block to be encoded. Based on the residual value and the predicted value of the block to be encoded, the reconstructed value of the block to be encoded is obtained. Due to errors in the encoding process, the reconstructed value of the block to be encoded is distorted. To reduce the distortion, the reconstructed value of the block to be encoded is subjected to ALF filtering. Before the reconstructed value of the block to be encoded is subjected to ALF filtering, the filter parameters and limit value of the ALF need to be determined.

[0119] The filter parameters of the ALF can be determined by solving a linear equation. The amplitude limit value can be determined by the size of the first area of the target image area.

[0120] In the embodiment of the present application, the first area of the target image area may be a screen content coding (SCC) area or a noise area.

[0121] The following describes the process of determining the SCC region or noise region of the target image region.

[0122] SCC regions: Image patches in screen content videos are typically dominated by a few primary colors, have few complex textures, have numerous or repetitive patterns, high contrast, and sharp edges. Therefore, these SCC features are extracted as features for screen content detection.

[0123] In a possible implementation, the SCC area of the target image area is determined according to the following formula (3):

[0124] V max –V min >V th *(M-1) (3)

[0125] Among them, V max is the maximum brightness value of the target image area, V min is the minimum brightness value of the target image area, M is the number of different brightness colors in the target image area, V th The region in the target image region that satisfies the above formula (3) is determined as the SCC region of the target image region.

[0126] Noise: Image noise refers to pixels whose values vary erratically and chaotically. Therefore, we can determine whether a pixel is a noise point based on the values of its neighboring pixels.

[0127] In a possible implementation, each noise point in the target area may be detected according to a Laplacian operator noise detection algorithm.

[0128] For example, the noise intensity of a pixel in the target image area is calculated according to the following formula (4):

[0129]

[0130] Where I(x, y) is the image area to be detected, and N is the Laplacian operator.

[0131] In one example, N is as shown in formula (5):

[0132]

[0133] If the noise intensity of a pixel is greater than a certain threshold, the pixel is detected as a noise point.

[0134] If the ratio of the number of noise points in the detected image area to the total number of pixels in the detected image area is greater than a certain threshold, the image area is detected as a noise area of the target image area.

[0135] S502: Determine an ALF clipping value corresponding to the target image area according to a ratio between the size of the first area and the size of the target image area.

[0136] After obtaining the size of the target image area and the size of the first area according to the method of S501, the ALF limit value corresponding to the target image area is determined according to the size of the first area of the target image area and the size of the target image area.

[0137] In some embodiments, in order to save bit rate, as shown in Table 1, the index value of the clipping value is carried in the bitstream.

[0138] That is, in some embodiments, the ALF clipping value may be understood as an index value of the ALF clipping value. In some embodiments, the index value of the ALF clipping value is also referred to as an ALF clipping value parameter.

[0139] In the above S502, the method for determining the ALF clipping value corresponding to the target image area according to the ratio between the size of the first area and the size of the target image area includes but is not limited to the following methods:

[0140] Method 1: When the difference between the size of the target image area and the size of the first area is smaller than a preset value, the index value of the ALF limit value corresponding to the target image area is determined to be a first value.

[0141] In a second approach, when the ratio between the size of the first area and the size of the target image area is greater than a target preset value, the index value of the ALF limit value corresponding to the target image area is determined to be a first value.

[0142] The embodiment of the present application does not limit the specific values of the above-mentioned target preset value and the first numerical value.

[0143] In an example, the first value is 0, that is, when the ratio between the size of the first area and the size of the target image area is greater than a preset value, the index value of the ALF limit value corresponding to the default target image area is 0 in Table 1.

[0144] S503: Determine the reconstructed value of the block to be encoded in the target image area.

[0145] Specifically, during encoding, the encoding end divides the target image area into at least one block to be encoded. For example, the encoding end divides the target image area into at least one block to be encoded according to a preset scanning order. Each encoding block is encoded. The encoding process is as follows: Figure 2As shown, specifically, the encoder determines a prediction mode for the block to be coded and, based on the prediction mode, determines a predicted value for the block to be coded. Based on the predicted value and the original value of the block to be coded, a residual value for the block to be coded is obtained. The residual value of the block to be coded is transformed and quantized to obtain the quantized coefficients of the block to be coded. The quantized coefficients of the block to be coded are then encoded to obtain a bitstream. Simultaneously, the quantized coefficients of the block to be coded are dequantized and inversely transformed to obtain the residual value of the block to be coded. Based on the residual value and the predicted value of the block to be coded, a reconstructed value of the block to be coded is obtained.

[0146] It should be noted that there is no order between the above S501 and S502 and the above S503, that is, S503 can be executed before S501 and S502, after S501 and S502, or between S501 and S502.

[0147] S504 : Perform ALF filtering on the reconstructed value of the block to be encoded in the target image area according to the ALF limit value corresponding to the target image area.

[0148] Exemplarily, the determined ALF clipping value corresponding to the target image area is substituted into the above formula (2), and the reconstructed value of the block to be coded is subjected to ALF filtering to obtain a filtered reconstructed value.

[0149] In some embodiments, ALF filtering is performed on the reconstructed value of the block to be coded, and a reconstructed image is obtained according to the filtered reconstructed value. The reconstructed image is stored in a reconstruction buffer and used as a reference image for prediction of subsequent blocks to be coded.

[0150] The loop filtering method provided in the embodiment of the present application obtains the size of the target image area and the size of the first area within the target image area, where the first area is the screen content coding SCC area or the noise area; determines the adaptive loop filtering ALF clipping value corresponding to the target image area based on the size of the first area and the size of the target image area; determines the reconstruction value of the block to be coded within the target image area; and performs ALF filtering on the reconstruction value of the block to be coded within the target image area based on the ALF clipping value corresponding to the target image area. That is, in the embodiment of the present application, the ALF clipping value corresponding to the target image area is determined by the size of the screen content coding SCC area or the noise area of the target image area. Compared with the above-mentioned method of calculating the ALF clipping value by solving nonlinear equations and calculating ROD, the method of determining the ALF clipping value in the embodiment of the present application is simple, reduces the complexity of determining the ALF clipping value, thereby improving the filtering efficiency, and thus improving the coding efficiency of the encoding end.

[0151] In some embodiments, the first region is an SCC region of the target image region or a noise region of the target image region. The following describes the loop filtering method provided in embodiments of the present application when the first region is an SCC region of the target image region or a noise region of the target image region.

[0152] First combine Figure 6 , when the first area is the SCC area of the target image area, the loop filtering method provided by the embodiment of the present application is introduced.

[0153] Figure 6 A flowchart of a loop filtering method according to an embodiment of the present application is shown in FIG. Figure 6 Shown, including:

[0154] S601: Acquire the size of a target image area and the size of an SCC area within the target image area.

[0155] Please refer to the above description of S501 for details, which will not be repeated here.

[0156] S602: When the ratio between the size of the SCC area of the target image area and the size of the target image area is greater than a first target preset value, determine that the index value of the ALF limit value corresponding to the target image area is a first value.

[0157] The target image area includes a luminance component and a chrominance component. In combination with the luminance component and the chrominance component of the target image area, the implementation of S602 includes but is not limited to the following:

[0158] In a first approach, when a first ratio between the size of the SCC area of the target image area in the luminance component and the size of the target image area is greater than a first preset value, an index value of the ALF clipping value corresponding to the luminance component of the target image area is determined to be a first value. In this first approach, the first target preset value is equal to the first preset value.

[0159] It should be noted that the embodiment of the present application does not limit the specific value of the above-mentioned first preset value.

[0160] Optionally, the first preset value is 0.6.

[0161] In a second approach, when a second ratio between the size of the SCC area of the target image area in the chrominance component and the size of the target image area is greater than a second preset value, an index value of the ALF clipping value corresponding to the chrominance component of the target image area is determined to be a first value. In this second approach, the first target preset value is equal to the second preset value.

[0162] It should be noted that the embodiment of the present application does not limit the specific value of the above-mentioned second preset value.

[0163] Optionally, the second preset value is 0.6.

[0164] In a third approach, when a second ratio between the size of the SCC area of the target image area in the luminance component and the size of the target image area is greater than a third preset value, the index values of the ALF clipping values corresponding to the chrominance and luminance components of the target image area are determined to be a first value. In this third approach, the first target preset value is equal to the third preset value.

[0165] It should be noted that the embodiment of the present application does not limit the specific value of the third preset value.

[0166] Optionally, the third preset value is 0.6.

[0167] The embodiment of the present application does not limit the specific value of the above-mentioned first numerical value.

[0168] Optionally, the first value is 0, that is, the index value of the ALF limit value is 0 in Table 1.

[0169] In some embodiments, when the ratio between the size of the SCC area of the target image region and the size of the target image region is less than or equal to a first target preset value, an ALF clipping value corresponding to the target image region is determined according to existing methods. For example, for each clipping value in Table 1, the filter coefficients corresponding to that clipping value are determined by solving a nonlinear equation, and the RDO corresponding to each set of filter coefficients corresponding to that clipping value is calculated. The clipping value corresponding to the minimum RDO is determined as the ALF clipping value corresponding to the target image region. The specific process is referenced to existing techniques and is not further described here.

[0170] S603: Determine the reconstructed value of the block to be encoded in the target image area.

[0171] Please refer to the above description of S503 for details, which will not be repeated here.

[0172] S604 : Perform ALF filtering on the reconstructed value of the block to be encoded in the target image area according to the index value of the ALF limit value corresponding to the target image area.

[0173] For example, assuming that the internal bit depth of the target image area is 8, as shown in Table 1, when the index value of the ALF limit value is 0, the parameter of the ALF limit value is 2 8 . Set the ALF limit value parameter to 2 8 Substitute the following formula (6) to perform ALF filtering on the reconstructed value of the coding block:

[0174]

[0175] Among them, R'(i,j) is the filtered output pixel value, R(i,j) is the reconstructed pixel, and f(k,l) is Figure 4A or Figure 4B The filter parameters corresponding to each filter in the filter shown are shown, and K(x,y) is the limiting value formula.

[0176] In one example, using a 4A or Figure 4B The filter shown performs ALF filtering on the reconstructed value of the block to be encoded in the target image area according to the above formula (6) to obtain the reconstructed value after ALF filtering.

[0177] S605: Carry the ALF amplitude limit value corresponding to the target image area in the bitstream in an index manner.

[0178] According to the above method, the ALF clipping value corresponding to the target image area is determined, and the index value of the ALF clipping value corresponding to the target image area is carried in the code stream and sent to the decoding end. For example, the index value of the ALF clipping value corresponding to the target image area is 0 and carried in the code stream and sent to the decoding end.

[0179] The loop filtering method of the embodiment of the present application, when the first area of the target image area is the SCC area, obtains the size of the target image area and the size of the SCC area within the target image area; when the ratio between the size of the SCC area of the target image area and the size of the target image area is greater than a first target preset value, determines the index value of the ALF clipping value corresponding to the target image area as a first value; and performs ALF filtering on the reconstructed value of the to-be-encoded block within the target image area according to the ALF clipping value corresponding to the target image area. That is, the embodiment of the present application determines the ALF clipping value corresponding to the target image area by the size of the SCC area of the target image area. Compared with the above-mentioned method of calculating the ALF clipping value by solving a nonlinear equation and calculating the ROD, the method of determining the ALF clipping value in the embodiment of the present application is simple, reduces the complexity of determining the ALF clipping value, thereby improving the filtering efficiency, and thus improving the encoding efficiency of the encoding end.

[0180] The following combination Figure 7 , when the first area is a noise area of the target image area, the loop filtering method provided by the embodiment of the present application is introduced.

[0181] Figure 7 A flowchart of a loop filtering method according to an embodiment of the present application is shown in FIG. Figure 7 Shown, including:

[0182] S701: Acquire the size of the target image area and the size of the noise area within the target image area.

[0183] Please refer to the above description of S501 for details, which will not be repeated here.

[0184] S702: When the ratio between the size of the noise area of the target image area and the size of the target image area is greater than a second target preset value, determine that the index value of the ALF limit value corresponding to the target image area is a first value.

[0185] The target image area includes a luminance component and a chrominance component. In combination with the luminance component and the chrominance component of the target image area, the implementation of S702 includes but is not limited to the following:

[0186] In a first approach, when a fourth ratio between the size of the noise region in the luminance component of the target image region and the size of the target image region is greater than a fourth preset value, an index value of the ALF clipping value corresponding to the luminance component of the target image region is determined to be a first value. In this first approach, the second target preset value is equal to the fourth preset value.

[0187] It should be noted that the embodiment of the present application does not limit the specific value of the fourth preset value.

[0188] Optionally, the fourth preset value is 0.6.

[0189] In a second approach, when a fifth ratio between the size of the noise area in the chrominance component of the target image area and the size of the target image area is greater than a fifth preset value, the index value of the ALF clipping value corresponding to the chrominance component of the target image area is determined to be a first value. In this second approach, the second target preset value is equal to the fifth preset value.

[0190] It should be noted that the embodiment of the present application does not limit the specific value of the fifth preset value.

[0191] Optionally, the fifth preset value is 0.6.

[0192] In a third approach, when a fourth ratio between the size of the noise area in the luminance component of the target image area and the size of the target image area is greater than a sixth preset value, the index values of the ALF clipping values corresponding to the chrominance and luminance components of the target image area are determined to be the first value. In this third approach, the second target preset value is equal to the sixth preset value.

[0193] The embodiment of the present application does not limit the specific value of the above-mentioned sixth numerical value.

[0194] Optionally, the sixth value is 0.6.

[0195] In some embodiments, when the ratio between the size of the noise area of the target image area and the size of the target image area is less than or equal to the second target preset value, the ALF limit value corresponding to the target image area is solved according to the existing method. The specific process refers to the existing technology and will not be repeated here.

[0196] S703: Determine the reconstructed value of the block to be encoded in the target image area.

[0197] Please refer to the above description of S503 for details, which will not be repeated here.

[0198] S704 : Perform ALF filtering on the reconstructed value of the block to be encoded in the target image area according to the ALF limit value corresponding to the target image area.

[0199] Please refer to the above description of S604 for details, which will not be repeated here.

[0200] S705: Carry the ALF amplitude limit value corresponding to the target image area in the bitstream in an index manner.

[0201] The loop filtering method of the embodiment of the present application, when the first area of the target image area is a noise area, obtains the size of the target image area and the size of the noise area in the target image area; when the ratio between the size of the noise area of the target image area and the size of the target image area is greater than a second target preset value, determines the index value of the ALF limit value corresponding to the target image area as the first value; and performs ALF filtering on the reconstructed value of the block to be encoded in the target image area according to the ALF limit value corresponding to the target image area. That is, the embodiment of the present application determines the ALF limit value corresponding to the target image area by the size of the noise area of the target image area. Compared with the above-mentioned method of calculating the ALF limit value by solving nonlinear equations and calculating ROD, the method of determining the ALF limit value in the embodiment of the present application is simple, reduces the complexity of determining the ALF limit value, thereby improving the filtering efficiency, and thus improving the encoding efficiency of the encoding end.

[0202] Combined with the above Figures 5 to 7 The encoding end is introduced, and the technical solution of the decoding end is introduced below.

[0203] Figure 8 A flow chart of a loop filtering method provided in an embodiment of the present application is provided. The method of the embodiment of the present application is applied to Figure 1 or Figure 3 The decoding end shown, such as Figure 8 As shown, the method includes:

[0204] S801 , decoding a code stream to determine a reconstructed value of a block to be decoded in a target image area.

[0205] The execution subjects of the embodiments of the present application include but are not limited to the following devices: a decoder, or a decoding device for performing string copy intra-frame prediction, such as a desktop computer, a mobile computing device, a notebook (e.g., laptop) computer, a tablet computer, a set-top box, a handheld device such as a smart phone, a television, a camera, a display device, a digital media player, a video game console, a car computer, or the like.

[0206] The target image area includes at least one block to be decoded. For each block to be decoded, the code stream is decoded to obtain quantization coefficients for the block to be decoded. The quantization coefficients are then dequantized and inversely transformed to obtain residual values for the block to be decoded. A predicted value for the block to be decoded is determined based on the prediction mode of the block to be decoded. A reconstructed value for the block to be decoded is determined based on the predicted value and the residual value of the block to be decoded.

[0207] S802: Decode the code stream to obtain the adaptive loop filter ALF amplitude limit value corresponding to the target image area.

[0208] Method 1: decode the bitstream to obtain the ALF clipping value index corresponding to the target image area carried in the bitstream, wherein the bitstream carries the ALF clipping value in an indexed manner, that is, the index value of the ALF clipping value carried in the bitstream.

[0209] Method 2: Decode the code stream to obtain the size of the target image area and the size of the first area within the target image area, and determine the ALF limit value corresponding to the target image area based on the size of the first area and the size of the target image area, wherein the first area is the screen content coding SCC area or the noise area.

[0210] In the second method, the decoding end decodes the code stream and determines the reconstruction value of each block to be decoded in the target image area. Based on the reconstruction value of each block to be decoded in the target image area, the reconstructed target image area is obtained. For the reconstructed target image area, the ALF limit value corresponding to the target image area is determined according to the above-mentioned second method.

[0211] In an example, the second method includes step A: when the ratio between the size of the first area and the size of the target image area is greater than a target preset value, determining that the index value of the ALF limit value corresponding to the target image area is a first value.

[0212] Depending on the first region, step A includes the following situations:

[0213] Case 1: If the first area is the SCC area of the target image area, the above-mentioned step A includes step A1: when the ratio between the size of the SCC area of the target image area and the size of the target image area is greater than a first target preset value, determining that the index value of the ALF limit value corresponding to the target image area is a first value.

[0214] According to the chrominance component and luminance component of the target image area, the implementation of step A1 includes but is not limited to the following:

[0215] Method 1: When a first ratio between the size of the SCC area of the target image area under the luminance component and the size of the target image area is greater than a first preset value, the index value of the ALF clipping value corresponding to the luminance component of the target image area is determined to be a first value.

[0216] Method 2: When the second ratio between the size of the SCC area of the target image area under the chrominance component and the size of the target image area is greater than a second preset value, the index value of the ALF clipping value corresponding to the chrominance component of the target image area is determined to be a first value.

[0217] Method three: when the second ratio between the size of the SCC area of the target image area under the luminance component and the size of the target image area is greater than a third preset value, the index value of the ALF clipping value corresponding to the chrominance component and the luminance component of the target image area is determined to be the first value.

[0218] Case 2: If the first area is the noise area of the target image area, the above-mentioned step A includes step A2: when the ratio between the size of the noise area of the target image area and the size of the target image area is greater than the second target preset value, determining that the index value of the ALF limit value corresponding to the target image area is the first value.

[0219] According to the chrominance component and luminance component of the target image area, the implementation methods of step A2 include but are not limited to the following:

[0220] Method 1: When the fourth ratio between the size of the noise area of the target image area under the brightness component and the size of the target image area is greater than the fourth preset value, the index value of the ALF limit value corresponding to the brightness component of the target image area is determined to be the first value.

[0221] Method 2: When the fifth ratio between the size of the noise area of the target image area under the chrominance component and the size of the target image area is greater than the fifth preset value, the index value of the ALF limit value corresponding to the chrominance component of the target image area is determined to be the first value.

[0222] Method three, when the fourth ratio between the size of the noise area of the target image area under the luminance component and the size of the target image area is greater than the sixth preset value, the index value of the ALF limit value corresponding to the chrominance component and the luminance component of the target image area is determined to be the first value.

[0223] S803 : Perform ALF filtering on the reconstructed value of the to-be-decoded block in the target image area according to the ALF limit value corresponding to the target image area.

[0224] For example, according to the above-mentioned methods, after the index value of the ALF limit value is determined, the reconstructed value of the block to be decoded in the target image area is filtered according to the above-mentioned formula (2).

[0225] The loop filtering method of the embodiment of the present application determines the ALF clipping value corresponding to the target image area by the size of the SCC area or the noise area of the target image area, thereby reducing the complexity of determining the ALF clipping value, thereby improving the filtering efficiency, and thus improving the decoding efficiency of the decoding end.

[0226] It should be understood that Figures 5 to 8 This is only an example of the present application and should not be considered as limiting the present application.

[0227] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, a variety of simple modifications can be made to the technical solution of the present application, and these simple modifications all fall within the scope of protection of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner unless there is any contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different embodiments of the present application can also be arbitrarily combined, and as long as they do not violate the ideas of the present application, they should also be regarded as the contents disclosed in the present application.

[0228] It should also be understood that in the various method embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. In addition, in the embodiments of the present application, the term "and / or" is merely a description of the association relationship of associated objects, indicating that three types of relationships can exist. Specifically, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the related objects before and after are in an "or" relationship.

[0229] Combined with the above Figures 5 to 8 , describes the method embodiment of the present application in detail, and the following is combined with Figures 9 to 11 , describe in detail the device embodiments of the present application.

[0230] Figure 9 This is a schematic block diagram of a loop filtering device provided in an embodiment of the present application. The device may be the encoding device described above or a component of the encoding device, such as a processor in the encoding device.

[0231] like Figure 9As shown, the loop filtering device 1000 may include:

[0232] An acquiring unit 1100 is configured to acquire a size of a target image area and a size of a first area within the target image area, where the first area is a screen content coding (SCC) area or a noise area.

[0233] A limit value determining unit 1200 is configured to determine an adaptive loop filter (ALF) limit value corresponding to the target image area according to the size of the first area and the size of the target image area;

[0234] The reconstruction unit 1300 is configured to determine a reconstruction value of a block to be encoded within the target image region;

[0235] The filtering unit 1400 is configured to perform ALF filtering on the reconstructed value of the block to be encoded in the target image area according to the ALF limit value corresponding to the target image area.

[0236] In some embodiments, the above-mentioned limit value determination unit 1200 is specifically used to determine that the index value of the ALF limit value corresponding to the target image area is a first value when the ratio between the size of the first area and the size of the target image area is greater than a target preset value.

[0237] In some embodiments, if the first area is the SCC area of the target image area, the above-mentioned limit value determination unit 1200 is specifically used to determine that the index value of the ALF limit value corresponding to the target image area is a first value when the ratio between the size of the SCC area of the target image area and the size of the target image area is greater than a first target preset value.

[0238] In some embodiments, the above-mentioned limit value determination unit 1200 is specifically used to determine that the index value of the ALF limit value corresponding to the luminance component of the target image area is a first value when a first ratio between the size of the SCC area of the target image area under the luminance component and the size of the target image area is greater than a first preset value.

[0239] In some embodiments, the above-mentioned limit value determination unit 1200 is specifically used to determine that the index value of the ALF limit value corresponding to the target image area under the chrominance component is a first value when a second ratio between the size of the SCC area of the target image area under the chrominance component and the size of the target image area is greater than a second preset value.

[0240] In some embodiments, the above-mentioned limit value determination unit 1200 is specifically used to determine that the index value of the ALF limit value corresponding to the chrominance component and the luminance component of the target image area is a first value when the second ratio between the size of the SCC area of the target image area under the luminance component and the size of the target image area is greater than a third preset value.

[0241] In some embodiments, if the first area is the noise area of the target image area, the above-mentioned limit value determination unit 1200 is specifically used to determine that the index value of the ALF limit value corresponding to the target image area is a first value when the ratio between the size of the noise area of the target image area and the size of the target image area is greater than a second target preset value.

[0242] In some embodiments, the above-mentioned limit value determination unit 1200 is specifically used to determine that the index value of the ALF limit value corresponding to the brightness component of the target image area under the brightness component is a first value when a fourth ratio between the size of the noise area of the target image area under the brightness component and the size of the target image area is greater than a fourth preset value.

[0243] In some embodiments, the above-mentioned limit value determination unit 1200 is specifically used to determine that the index value of the ALF limit value corresponding to the target image area under the chrominance component is a first value when the fifth ratio between the size of the noise area of the target image area under the chrominance component and the size of the target image area is greater than a fifth preset value.

[0244] In some embodiments, the above-mentioned limit value determination unit 1200 is specifically used to determine that the index value of the ALF limit value corresponding to the chrominance component and the luminance component of the target image area is a first value when a fourth ratio between the size of the noise area of the target image area under the luminance component and the size of the target image area is greater than a sixth preset value.

[0245] In some embodiments, the apparatus further includes an encoding unit 1500 configured to carry the ALF amplitude limit value corresponding to the target image region in an indexed manner in a bitstream.

[0246] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Figure 9 The device shown can execute the method embodiment corresponding to the above-mentioned decoding end, and the above-mentioned and other operations and / or functions of each module in the device are respectively for implementing the corresponding processes of the method embodiment corresponding to the above-mentioned decoding end. For the sake of brevity, they are not repeated here.

[0247] Figure 101 is a schematic block diagram of a loop filtering device provided in an embodiment of the present application. The device may be the encoding and decoding device described above or a component of a decoding device, such as a processor in a decoding device.

[0248] like Figure 10 As shown, the loop filtering device 2000 may include:

[0249] The reconstruction unit 2100 is configured to decode the code stream and determine the reconstruction value of the to-be-decoded block in the target image area;

[0250] The limit value determining unit 2200 is configured to decode the bitstream and obtain the adaptive loop filter (ALF) limit value corresponding to the target image area;

[0251] The filtering unit 2300 is configured to perform ALF filtering on the reconstructed value of the to-be-decoded block in the target image area according to the ALF clipping value corresponding to the target image area.

[0252] In some embodiments, the clipping value determination unit 2200 is specifically used to decode the code stream to obtain the ALF clipping value index corresponding to the target image area carried in the code stream; or, decode the code stream to obtain the size of the target image area and the size of the first area within the target image area, and determine the ALF clipping value corresponding to the target image area based on the size of the first area and the size of the target image area, wherein the first area is a screen content coding SCC area or a noise area.

[0253] In some embodiments, the limit value determination unit 2200 is specifically used to determine that the index value of the ALF limit value corresponding to the target image area is a first value when the ratio between the size of the first area and the size of the target image area is greater than a target preset value.

[0254] In some embodiments, if the first area is the SCC area of the target image area, the limit value determination unit 2200 is specifically used to determine that the index value of the ALF limit value corresponding to the target image area is a first value when the ratio between the size of the SCC area of the target image area and the size of the target image area is greater than a first target preset value.

[0255] In some embodiments, the limit value determination unit 2200 is specifically used to determine that the index value of the ALF limit value corresponding to the luminance component of the target image area is a first value when a first ratio between the size of the SCC area of the target image area under the luminance component and the size of the target image area is greater than a first preset value.

[0256] In some embodiments, the limit value determination unit 2200 is specifically used to determine that the index value of the ALF limit value corresponding to the target image area under the chrominance component is a first value when a second ratio between the size of the SCC area of the target image area under the chrominance component and the size of the target image area is greater than a second preset value.

[0257] In some embodiments, the limit value determination unit 2200 is specifically used to determine that the index value of the ALF limit value corresponding to the chrominance component and the luminance component of the target image area is a first value when a second ratio between the size of the SCC area of the target image area under the luminance component and the size of the target image area is greater than a third preset value.

[0258] In some embodiments, if the first area is the noise area of the target image area, the limit value determination unit 2200 is specifically used to determine that the index value of the ALF limit value corresponding to the target image area is a first value when the ratio between the size of the noise area of the target image area and the size of the target image area is greater than a second target preset value.

[0259] In some embodiments, the limit value determination unit 2200 is specifically used to determine that the index value of the ALF limit value corresponding to the brightness component of the target image area under the brightness component is a first value when a fourth ratio between the size of the noise area of the target image area under the brightness component and the size of the target image area is greater than a fourth preset value.

[0260] In some embodiments, the limit value determination unit 2200 is specifically used to determine that the index value of the ALF limit value corresponding to the target image area under the chrominance component is a first value when the fifth ratio between the size of the noise area of the target image area under the chrominance component and the size of the target image area is greater than a fifth preset value.

[0261] In some embodiments, the limit value determination unit 2200 is specifically used to determine that the index value of the ALF limit value corresponding to the chrominance component and the luminance component of the target image area is a first value when a fourth ratio between the size of the noise area of the target image area under the luminance component and the size of the target image area is greater than a sixth preset value.

[0262] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Figure 10 The device shown can execute the method embodiment corresponding to the above-mentioned encoding end, and the above-mentioned and other operations and / or functions of each module in the device are respectively for implementing the corresponding processes of the method embodiment corresponding to the above-mentioned encoding end. For the sake of brevity, they will not be repeated here.

[0263] The apparatus of the embodiment of the present application is described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, or can be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in conjunction with its hardware.

[0264] Figure 11 It is a schematic block diagram of a computing device provided in an embodiment of the present application.

[0265] like Figure 11 As shown, the computing device 30 may be the loop filtering device described in the embodiment of the present application, such as a video encoding device or a video decoding device. The computing device 30 may include:

[0266] The memory 31 and the processor 32 are configured to store a computer program 34 and transmit the computer program 34 to the processor 32. In other words, the processor 32 can call and run the computer program 34 from the memory 31 to implement the method in the embodiment of the present application.

[0267] For example, the processor 32 may be configured to execute the steps of the above method according to the instructions in the computer program 34 .

[0268] In some embodiments of the present application, the processor 32 may include but is not limited to:

[0269] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.

[0270] In some embodiments of the present application, the memory 31 includes but is not limited to:

[0271] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0272] In some embodiments of the present application, the computer program 34 may be divided into one or more units, which are stored in the memory 31 and executed by the processor 32 to implement the method provided by the present application. The one or more units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 34 in the computing device 30.

[0273] like Figure 11 As shown, the computing device 30 may further include:

[0274] The transceiver 33 may be connected to the processor 32 or the memory 31 .

[0275] The processor 32 can control the transceiver 33 to communicate with other devices. Specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 33 may include a transmitter and a receiver. The transceiver 33 may further include an antenna, and the number of antennas may be one or more.

[0276] It should be understood that the various components in the computing device 30 are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.

[0277] The present application also provides a computer storage medium having a computer program stored thereon, which enables the computer to perform the method of the above method embodiment when the computer program is executed by the computer.

[0278] An embodiment of the present application also provides a computer program product comprising instructions, which, when executed by a computer, enables the computer to perform the method of the above method embodiment.

[0279] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid state drive (SSD)).

[0280] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0281] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the unit is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0282] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment. For example, the functional units in the various embodiments of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0283] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A loop filtering method, characterized in that: include: Acquire a size of a target image area and a size of a first area within the target image area, where the first area is a screen content coding (SCC) area or a noise area; Determining an adaptive loop filter (ALF) amplitude limit value corresponding to the target image area according to the size of the first area and the size of the target image area; Determining a reconstruction value of a block to be encoded within the target image area; Performing ALF filtering on the reconstructed value of the block to be encoded in the target image area according to the ALF limit value corresponding to the target image area; The step of determining an adaptive loop filter (ALF) amplitude limit value corresponding to the target image area according to the size of the first area and the size of the target image area includes: When the ratio between the size of the first area and the size of the target image area is greater than the target preset value, the index value of the ALF limit value corresponding to the target image area is determined to be a first value, and based on the index value of the ALF limit value and the first value, the ALF limit value is obtained by looking up the table.

2. The method according to claim 1, characterized in that If the first area is an SCC area of the target image area, then when a ratio between a size of the first area and a size of the target image area is greater than a target preset value, determining an index value of an ALF clipping value corresponding to the target image area as a first value includes: When a ratio between a size of an SCC area of the target image area and a size of the target image area is greater than a first target preset value, an index value of an ALF amplitude limit value corresponding to the target image area is determined to be a first value.

3. The method according to claim 2, characterized in that When a ratio between a size of an SCC area of the target image area and a size of the target image area is greater than a first target preset value, determining that an index value of an ALF clipping value corresponding to the target image area is a first value includes: When a first ratio between a size of an SCC area of the target image area under a luminance component and a size of the target image area is greater than a first preset value, determining an index value of an ALF clipping value corresponding to the luminance component of the target image area to be a first value; and / or When a second ratio between the size of the SCC area of the target image area under the chrominance component and the size of the target image area is greater than a second preset value, an index value of the ALF clipping value corresponding to the target image area under the chrominance component is determined to be a first value.

4. The method according to claim 2, characterized in that When a ratio between a size of an SCC area of the target image area and a size of the target image area is greater than a first target preset value, determining that an index value of an ALF clipping value corresponding to the target image area is a first value includes: When a second ratio between the size of the SCC area of the target image area under the luminance component and the size of the target image area is greater than a third preset value, an index value of the ALF clipping value corresponding to the chrominance component and the luminance component of the target image area is determined to be a first value.

5. The method according to claim 1, wherein If the first area is a noise area of the target image area, then when a ratio between a size of the first area and a size of the target image area is greater than a target preset value, determining an index value of an ALF clipping value corresponding to the target image area as a first value includes: When a ratio between a size of a noise area in the target image area and a size of the target image area is greater than a second target preset value, an index value of an ALF amplitude limit value corresponding to the target image area is determined to be a first value.

6. The method according to claim 5, characterized in that When the ratio between the size of the noise area in the target image area and the size of the target image area is greater than a second target preset value, determining the index value of the ALF limit value corresponding to the target image area to be a first value includes: When a fourth ratio between the size of the noise area of the target image area under the luminance component and the size of the target image area is greater than a fourth preset value, determining that the index value of the ALF clipping value corresponding to the luminance component of the target image area is a first value; and / or When a fifth ratio between the size of the noise area of the target image area under the chrominance component and the size of the target image area is greater than a fifth preset value, the index value of the ALF limit value corresponding to the chrominance component of the target image area is determined to be a first value.

7. The method according to claim 5, characterized in that When the ratio between the size of the noise area in the target image area and the size of the target image area is greater than a second preset value, determining the index value of the ALF limit value corresponding to the target image area to be a first value includes: When a fourth ratio between the size of the noise area of the target image area under the luminance component and the size of the target image area is greater than a sixth preset value, the index value of the ALF limit value corresponding to the chrominance component and the luminance component of the target image area is determined to be a first value.

8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: The ALF amplitude limit value corresponding to the target image area is carried in the code stream in an indexed manner.

9. A loop filtering method, characterized in that: include: Decoding the code stream to determine the reconstructed value of the to-be-decoded block within the target image area; Decoding a bitstream to obtain an adaptive loop filter (ALF) clipping value corresponding to the target image area, where the ALF clipping value is determined based on a size of a first area within the target image area and a size of the target image area. When a ratio between the size of the first area and the size of the target image area is greater than a target preset value, the ALF clipping value is obtained by performing a table lookup using an index value of the ALF clipping value as a first value, where the first area is a screen content coding (SCC) area or a noise area. ALF filtering is performed on the reconstructed value of the to-be-decoded block in the target image area according to the ALF limit value corresponding to the target image area.

10. A loop filter device, characterized in that: include: an acquiring unit, configured to acquire a size of a target image area and a size of a first area within the target image area, where the first area is a screen content coding (SCC) area or a noise area; a limit value determining unit, configured to determine an adaptive loop filter ALF limit value corresponding to the target image area according to a size of the first area and a size of the target image area; A reconstruction unit, configured to determine a reconstruction value of a block to be encoded within the target image area; A filtering unit, configured to perform ALF filtering on the reconstructed value of the block to be encoded in the target image area according to the ALF limit value corresponding to the target image area; Among them, the limit value determination unit is specifically used to determine that the index value of the ALF limit value corresponding to the target image area is a first value when the ratio between the size of the first area and the size of the target image area is greater than the target preset value, and based on the index value of the ALF limit value being the first value, look up the table to obtain the ALF limit value.

11. A loop filter device, characterized in that: include: A reconstruction unit, configured to decode the code stream and determine a reconstruction value of a block to be decoded within a target image area; a clipping value determining unit, configured to decode a bitstream and obtain an adaptive loop filter (ALF) clipping value corresponding to the target image area, wherein the ALF clipping value is determined based on a size of a first area within the target image area and a size of the target image area; when a ratio between the size of the first area and the size of the target image area is greater than a target preset value, the ALF clipping value is obtained by performing a table lookup using an index value of the ALF clipping value as a first value, wherein the first area is a screen content coding (SCC) area or a noise area; The filtering unit is configured to perform ALF filtering on the reconstructed value of the to-be-decoded block in the target image area according to the ALF limit value corresponding to the target image area.

12. A computing device, characterized in that including processor and memory; The memory is used to store computer programs; The processor is configured to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 8 or claim 9.

13. A computer-readable storage medium, characterized in that Used to store a computer program, the computer program causing a computer to execute the method according to any one of claims 1 to 8 or claim 9.

Citation Information

Patent Citations

  • Encoding and decoding methods and devices and equipment

    CN112135132A

  • Method and apparatus for non-linear adaptive loop filtering in video coding

    WO2020151714A1