Encoding methods, decoding methods, apparatuses, storage medium and program product
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- ZTE CORP
- Filing Date
- 2025-11-19
- Publication Date
- 2026-07-16
AI Technical Summary
In existing H.266/VVC video coding, the ALF filter strength adjustment scheme has poor filter strength adjustment effect, resulting in unsatisfactory video coding effect.
By determining the target classification method corresponding to the filter coefficient set from multiple classification methods, the filter intensity of the reconstructed value of the image to be processed is adjusted to improve the accuracy of the filter intensity adjustment. The filter intensity adjustment is performed by pixel block grouping and scaling factor set.
It improves the quality of video encoding, reduces distortion in reconstructed images, and enhances the accuracy of filter intensity adjustment.
Smart Images

Figure CN2025136019_16072026_PF_FP_ABST
Abstract
Description
Encoding methods, decoding methods, devices, storage media and program products
[0001] This disclosure claims priority to Chinese patent application No. 202510032706.4, filed on January 8, 2025, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This disclosure relates to the field of communication technology, and in particular to an encoding method, decoding method, apparatus, storage medium, and program product. Background Technology
[0003] In H.266 / versatile video coding (VVC), the adaptive loop filter (ALF) technique adaptively selects a set of filters from a finite set of filter coefficients to filter the reconstructed video. ALF filtering is applied to the luminance of each coding tree unit (CTU) in the video encoded bitstream. This filtering can be performed using a fixed subset of filter coefficients or a subset of the historical adaptation parameter set (APS). Furthermore, to improve the ALF filtering effect, the filter intensity can be adjusted for video frames using either the fixed subset or the historical APS subset. Filter intensity adjustment refers to the encoder classifying and grouping pixel blocks within a video frame and selecting appropriate filter intensity adjustment coefficients to adjust the filter intensity. Current filter intensity adjustment schemes are not very effective, leading to poor video encoding results. Summary of the Invention
[0004] Firstly, an encoding method is provided, including:
[0005] Obtain the reconstructed values of the image to be processed;
[0006] Based on the set of filter coefficients corresponding to the image to be processed, the target classification method corresponding to the set of filter coefficients is determined from multiple classification methods;
[0007] The target reconstruction value of the image to be processed is obtained by adjusting the filtering intensity based on the target classification method.
[0008] Secondly, a decoding method is provided, including:
[0009] Receive a video encoded stream, which includes at least one image and an identifier for the target classification method corresponding to each image; the target classification method is determined from multiple classification methods.
[0010] Based on the target classification method corresponding to the image, the reconstructed value of the image is processed by adjusting the filtering intensity to obtain the target reconstruction value of the image. The target classification method corresponding to the image is determined based on the identifier of the target classification method corresponding to the image.
[0011] Thirdly, an encoding method is provided, including:
[0012] Obtain the reconstructed values of the image to be processed;
[0013] The image to be processed is divided into pixel blocks using the encoding region of the filter coefficient set corresponding to the image to be processed, resulting in W groups of pixel blocks. Here, each group of pixel blocks is obtained based on the filter information of the filter coefficient set, and W is an integer greater than 2.
[0014] Based on the set of W groups of pixel blocks and the scaling factor set, determine the encoding cost corresponding to each of the W groups of pixel blocks;
[0015] Based on the target scaling factor corresponding to the target coding cost in the coding cost of each of the W groups of pixel blocks, the filtering intensity of the reconstructed value of the image to be processed is adjusted to obtain the target reconstructed value of the image to be processed.
[0016] Fourthly, a decoding method is provided, including:
[0017] Receive video encoded bitstream, the video encoded bitstream includes at least one image and an identifier of the target scaling factor corresponding to the set of filter coefficients for each image;
[0018] The target reconstructed value of the image is obtained by adjusting the filtering intensity based on the target scaling factor.
[0019] Fifthly, a communication device is provided, comprising:
[0020] The acquisition unit is used to acquire the reconstructed values of the image to be processed;
[0021] The processing unit is used to determine the target classification method corresponding to the filter coefficient set from multiple classification methods based on the filter coefficient set corresponding to the image to be processed;
[0022] The processing unit is also used to adjust the filtering intensity of the reconstructed values of the image to be processed based on the target classification method, so as to obtain the target reconstructed values of the image to be processed.
[0023] Sixthly, a communication device is provided, comprising:
[0024] The receiving unit is used to receive the video encoded bitstream, which includes at least one image and an identifier of the target classification method corresponding to each image; the target classification method is determined from multiple classification methods.
[0025] The processing unit is used to adjust the filtering intensity of the reconstructed value of the image based on the target classification method corresponding to the image, so as to obtain the target reconstruction value of the image. The target classification method corresponding to the image is determined based on the identifier of the target classification method corresponding to the image.
[0026] A seventh aspect provides a communication device, comprising:
[0027] The acquisition unit is used to acquire the reconstructed values of the image to be processed;
[0028] The processing unit is used to group the encoded regions of the image to be processed using the filter coefficient set corresponding to the image to be processed into W groups of pixel blocks. Here, each group of pixel blocks is obtained based on the filter information of the filter coefficient set, and W is an integer greater than 2.
[0029] The processing unit is also used to determine the encoding cost corresponding to each of the W groups of pixel blocks based on the W groups of pixel blocks and the scaling factor set;
[0030] The processing unit is also used to adjust the filtering intensity of the reconstructed value of the image to be processed based on the target scaling factor corresponding to the target coding cost in the coding cost of each of the W groups of pixel blocks, so as to obtain the target reconstructed value of the image to be processed.
[0031] Eighthly, a communication device is provided, comprising:
[0032] The receiving unit is used to receive the video encoded bitstream, which includes at least one image and an identifier of the target scaling factor corresponding to the set of filter coefficients for each image.
[0033] The processing unit is used to adjust the filtering intensity of the reconstructed values of the image based on the target scaling factor to obtain the target reconstructed values of the image.
[0034] A ninth aspect provides a communication device comprising: a processor and a memory; the memory and the processor being coupled; the memory being used to store processor-executable instructions; the processor being configured to execute the instructions such that the communication device implements the method provided by any one of the first to fourth aspects described above.
[0035] A tenth aspect provides a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform the methods provided by any one of the first to fourth aspects. In some embodiments, the computer-readable storage medium includes a non-transitory computer-readable storage medium.
[0036] Eleventhly, a computer program product comprising computer instructions is provided, which, when executed on a computer, causes the computer to perform the method provided by any one of the first to fourth aspects. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in this disclosure, the accompanying drawings used in some embodiments of this disclosure will be briefly described below. Obviously, the drawings described below are merely drawings of some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings.
[0038] Figure 1 is a flowchart of a filter intensity adjustment according to an embodiment of the present disclosure.
[0039] Figure 2 is a schematic diagram of the association of a scaling factor according to an embodiment of the present disclosure.
[0040] Figure 3 is a schematic diagram of a hybrid coding framework provided according to an embodiment of the present disclosure.
[0041] Figure 4 is a flowchart of an overall framework for a decoding end according to an embodiment of the present disclosure.
[0042] Figure 5 is an exemplary block diagram of a video decoding system provided according to an embodiment of the present disclosure.
[0043] Figure 6 is a flowchart of an encoding method provided according to an embodiment of the present disclosure.
[0044] Figure 7 is a flowchart of a decoding method provided according to an embodiment of the present disclosure.
[0045] Figure 8 is a flowchart of a target classification method provided according to an embodiment of the present disclosure.
[0046] Figure 9 is a flowchart of another encoding method provided according to an embodiment of the present disclosure.
[0047] Figure 10 is a flowchart of another decoding method provided according to an embodiment of the present disclosure.
[0048] Figure 11 is a block diagram of a communication device provided according to an embodiment of the present disclosure.
[0049] Figure 12 is a block diagram of another communication device provided according to an embodiment of the present disclosure.
[0050] Figure 13 is a block diagram of another communication device provided according to an embodiment of the present disclosure.
[0051] Figure 14 is a block diagram of another communication device provided according to an embodiment of the present disclosure.
[0052] Figure 15 is a block diagram of another communication device provided according to an embodiment of the present disclosure. Detailed Implementation
[0053] To enable those skilled in the art to better understand the technical solutions of the embodiments of this disclosure, the technical solutions of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0054] Unless the context otherwise requires, throughout the specification and claims, the term "comprise" and other forms such as the third-person singular "comprises" and the present participle "comprising" are interpreted as open-ended and encompassing, meaning "including, but not limited to." In the description of the specification, terms such as "one embodiment," "some embodiments," "exemplary embodiments," "example," "specific example," or "some examples" are intended to indicate that a particular feature, structure, material, or characteristic associated with that embodiment or example is included in at least one embodiment or example of this disclosure. The illustrative representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics mentioned may be included in any suitable manner in any one or more embodiments or examples.
[0055] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this disclosure, unless otherwise stated, "a plurality of" means two or more.
[0056] In this disclosure, the terms "exemplarily" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplarily" or "for example" in this disclosure should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of the terms "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0057] In addition, the use of “based on” implies openness and inclusivity, because processes, steps, calculations or other actions “based on” one or more of the stated conditions or values may in practice be based on additional conditions or values beyond those stated.
[0058] Before describing the technical solutions provided in the embodiments of this disclosure, the technical terms involved in the technical solutions of the embodiments of this disclosure will be introduced first.
[0059] 1. Video coding loop filtering method.
[0060] For block-based hybrid coding frameworks such as High Efficiency Video Coding (HEVC), VVC, and Advanced Audio Video Coding Standard (AVS), in-loop filtering is typically employed to effectively reduce the distortion caused by quantization. Since these filtered reconstructed images serve as references for subsequent coded images to predict future image signals, the aforementioned filtering operations are also called in-loop filtering, i.e., filtering operations within the coding loop. Taking the H.266 / VVC video coding standard as an example, in-loop filtering techniques include luma mapping with chroma scaling (LMCS), deblocking filter (DBF), sample adaptive offset (SAO), and ALF. Here, the ALF module includes filters for the luma component, filters for the two chroma components, and a cross-component adaptive loop filter.
[0061] 2. ALF decision-making mechanism.
[0062] In H.266 / VVC, ALF technology can adaptively select a set of filters from a finite set of filter coefficients to filter the reconstructed video. Each set of filter coefficients contains M(8) filter subsets, each filter subset contains N(25) classes of filters, and each class of filters contains K(42) coefficients. The decoder parses the signaling in the video encoded bitstream, determines the index of the ALF filter subset used for loop filtering in each CTU, and then determines the filter class based on the content of the pixel block (here, H.266 / VVC uses 4*4 pixel blocks), thus determining the filter coefficients used for that pixel block. For the encoder, the filter class is determined based on the pixel block content, and then the rate-distortion optimization (RDO) criterion is used to determine the optimal filter subset. The index of the filter subset is then encoded and written into the video encoded bitstream.
[0063] The luminance ALF filter coefficient set includes a fixed filter subset and up to eight APS subsets. The fixed filter subset refers to the filter coefficient subset obtained through pre-training, specified by the standard, and does not need to be transmitted. The APS subset is the filter coefficient set generated by Wiener filtering based on the reconstructed image of the current video frame, and is transmitted via APS. Each slice at the encoder can generate one APS subset, and each APS subset has an identifier. Each slice can choose to use a subset from the historical ALF coefficient set, and each CTU can choose to use either a fixed filter subset or a historical APS subset. Therefore, in the loop filtering module during the encoding process, for the luminance component of each CTU, after RDO decision, the possible decision results include:
[0064] Do not enable ALF;
[0065] Filtering is performed using the filter coefficients of a fixed subset of filters;
[0066] Filtering is performed using the filtering coefficients of a historical APS subset (including the latest APS subset calculated from the current frame);
[0067] 3. Adjust the ALF filter strength.
[0068] (1) Filter strength adjustment process.
[0069] When ALF filtering is performed on video frames using a fixed filter subset or a historical APS subset, the filtering intensity may be too strong or too weak for the current video frame or region because these subsets are pre-trained offline. Therefore, a scaling factor is introduced after ALF filtering for further filtering. This scaling factor works on a similar principle to the scaling factor in neural network loop filtering, and also incorporates pixel block classification information. The scaling factor is typically transmitted in the video encoded bitstream and obtained at the decoding end through parsing the video encoded bitstream.
[0070] Here, a bitstream is a series of bits used to transmit video image data. The bitstream can be transmitted between the encoder and the decoder. The encoder compresses the video image data into a bitstream through the encoding process, and the decoder recovers and reconstructs the video image data from the bitstream through the decoding process.
[0071] For example, the process of adjusting the filter intensity can be shown in Figure 1.
[0072] (2) Method for adjusting filter intensity.
[0073] The residual value corr(s) of the reconstructed pixels before and after ALF filtering is calculated, scaled using a scaling factor, and then superimposed onto the reconstructed pixels, as shown in the following formula:
[0074] rec'(s)=rec(s)+(corr(s)*tab[sfi[class(s)]]+4)>>3;
[0075] Here, tab[sfi[class(s)]] represents the scaling factor obtained from the table lookup, rec(s) is the reconstructed value after filtering, and rec'(s) is the target reconstructed value.
[0076] (3) Scaling factor indication method.
[0077] In current ALF filter intensity adjustment, the scaling factor of the current video frame is usually indicated in the slice header. Different scaling factors can be associated with different class index groups, as shown in Figure 2. Here, SH in Figure 2 represents the slice header, PH represents the picture header, and alt represents the alternative subset, which will not be elaborated further below.
[0078] In current filter intensity adjustment schemes, the classification method of pixel blocks in the filter intensity adjustment module is predetermined and only one method is supported. That is, the classification method of pixel blocks in related technologies is fixed, and this classification method may not be optimal for the effect of filter intensity adjustment, resulting in poor video encoding effect.
[0079] Based on this, embodiments of this disclosure provide an encoding method, decoding method, apparatus, storage medium, and program product. Based on a set of filter coefficients corresponding to an image to be processed, a target classification method corresponding to the filter coefficient set is determined from multiple classification methods. Since the classification method for pixel blocks is fixed in related technologies, this improves the accuracy of the determined classification method for adjusting the filter intensity of the reconstructed value of the image to be processed. This allows the target classification method to match the set of filter coefficients, and then the filter intensity is adjusted based on the target classification method to obtain the target reconstructed value of the image to be processed. This improves the effect of filter intensity adjustment and the accuracy of the determined target reconstructed value of the image to be processed. In other words, it supplements the ALF filter intensity adjustment stage with more types of adjustment schemes, thereby reducing the distortion of the reconstructed image and improving the video encoding effect.
[0080] The embodiments of this disclosure will be further described in detail below with reference to the accompanying drawings and examples. The specific embodiments described herein are only used to explain the embodiments of this disclosure and are not intended to limit the embodiments of this disclosure.
[0081] The embodiments disclosed herein are based on a hybrid coding framework, such as the H.266 / VVC coding framework developed by the International Telecommunication Union-Telecommunication Standardization Sector (ITU-T) and the International Organization for Standardization (ISO) / International Electrotechnical Commission (IEC) joint video project. This framework includes modules such as intra-frame prediction, inter-frame prediction, transform, quantization, loop filtering, and entropy coding.
[0082] The overall framework flow of the encoding end is as follows:
[0083] (1) The input video is first divided into frames and then into blocks;
[0084] (2) The divided blocks are sent to the inter-frame / intra-frame prediction module for predictive coding. Here, the intra-frame prediction module is mainly used to remove spatial correlations in the image; the inter-frame prediction module is mainly used to remove temporal correlations in the image.
[0085] (3) Subtract the predicted value from the original block to obtain the residual value. Then transform and quantize the residual to remove frequency domain correlation and perform lossy compression on the data.
[0086] (4) Finally, all the encoding parameters and residuals are entropy encoded to form a binary stream for storage or transmission. The output data of the entropy encoding module is the original video compressed bitstream.
[0087] (5) The predicted value and the residual after inverse quantization and inverse transformation are added together to obtain the block reconstruction value, and finally the reconstructed image is formed.
[0088] Here, dequantization is the reverse process of quantization. Dequantization refers to mapping the quantized coefficients to a reconstructed signal in the input signal space. The reconstructed signal is an approximation of the input signal.
[0089] Quantization includes scalar quantization (SQ) and vector quantization. Scalar quantization is the most basic method. Its input is a one-dimensional scalar signal. The process involves first dividing the input signal space into a series of non-overlapping intervals, and selecting a representative signal for each interval. Then, for each input signal, it is scalar-quantized into the representative signal of the interval it belongs to. Here, the interval length is called the quantization step (Qstep), the interval index is the level value (Level), which is the quantized value, and the parameter characterizing the quantization step is the quantization parameter (QP).
[0090] (6) The reconstructed image is filtered by a loop filter and stored in the image buffer as a reference image for the future.
[0091] Referring to Figure 4, the overall framework flow of the decoding end is as follows:
[0092] (1) Parse the bitstream to obtain the prediction pattern and get the prediction value;
[0093] (2) Perform inverse transformation and inverse quantization on the residual obtained from the code stream parsing;
[0094] (3) The predicted value and the residual after inverse quantization and inverse transformation are added together to obtain the block reconstruction value, and finally the reconstructed image is formed.
[0095] (4) The reconstructed image is filtered by a loop filter and stored in the image buffer as a reference image for the future.
[0096] The technical solutions provided in this disclosure can be applied to H.266 / VVC standards, AVS (such as AVS3), or next-generation video codec standards, and this disclosure does not limit them.
[0097] The system architecture applied in the embodiments of this disclosure is described below. Figure 5 is an exemplary block diagram of a video decoding system provided according to this disclosure. In the embodiments of this disclosure, the term "video decoder" generally refers to both a video encoder and a video decoder. In the embodiments of this disclosure, the terms "video decoding" or "decoding" can generally refer to video encoding or video decoding.
[0098] As shown in Figure 5, the video decoding system 1 includes an encoding end 10 and a decoding end 20. The encoding end 10 generates encoded video data. Therefore, the encoding end 10 can be referred to as a video encoding device. The decoding end 20 decodes the encoded video data generated by the encoding end 10. Therefore, the decoding end 20 can be referred to as a video decoding device. Various embodiments of the encoding end 10, the decoding end 20, or both may include one or more processors and memory coupled to said one or more processors. The memory may include, but is not limited to, RAM, ROM, EEPROM, flash memory, or any other media as described herein that can be used to store desired program code in the form of computer-accessible instructions or data structures.
[0099] The encoding end 10 and the decoding end 20 may also have other names. For example, the encoding end may also be called an encoder, and the decoding end may also be called a decoder. This disclosure does not limit this.
[0100] Encoding end 10 and decoding end 20 may include various devices, including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, handsets such as so-called "smart" phones, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers or the like.
[0101] The encoding and decoding methods provided in this disclosure can be applied to video encoding and decoding to support various multimedia applications, such as over-the-air television broadcasting, cable television transmission, satellite television transmission, streaming video transmission (e.g., via the Internet), encoding video data stored on data storage media, decoding video data stored on data storage media, or other applications. In some instances, the video decoding system 1 can be used to support one-way or two-way video transmission to support applications such as video streaming, video playback, video broadcasting, and / or video telephony.
[0102] Figure 5 is an exemplary structural diagram. The number of devices included in the video decoding system shown in Figure 5 is unlimited; for example, the number of encoding ends 10 and the number of decoding ends 20 are unlimited. Furthermore, in addition to the devices shown in Figure 5, the video decoding system shown in Figure 5 may also include other devices, and this is not limited.
[0103] Next, as shown in Figure 6, this embodiment of the present disclosure provides an encoding method applied to an encoding end, the method including the following steps:
[0104] S101. Obtain the reconstructed values of the image to be processed.
[0105] As an example, the encoder obtains the initial reconstructed value of the image to be processed based on the existing encoding information, and then filters the initial reconstructed value of the image to be processed to obtain the filtered initial reconstructed value, which is the reconstructed value of the image to be processed.
[0106] In some embodiments, the existing encoded information includes at least one of the following:
[0107] Forecast information:
[0108] Intra-frame prediction information: If an image block uses intra-frame prediction, the encoder will use information from adjacent coded blocks to make predictions and obtain predicted pixel values. This prediction information includes prediction mode, prediction direction, etc.
[0109] Inter-frame prediction information: For inter-frame prediction, the encoder uses information from already encoded frames to predict image blocks in the current frame. This includes motion vectors, reference frame indexes, etc.
[0110] Residual information:
[0111] The difference between the original image patch and the predicted image patch is called the residual. The encoder transforms, quantizes, and encodes these residuals so that the image can be accurately reconstructed at the decoder.
[0112] Residual information typically includes transformation coefficients, quantization parameters, etc.
[0113] Encoding parameters:
[0114] Encoding parameters are used to control the encoding process, such as quantization step size and encoding mode selection. Encoding parameters have a direct impact on the accuracy of the reconstructed values.
[0115] Loop filter information:
[0116] Loop filtering is part of the reconstruction process. The encoder may need to provide parameters such as the on / off state of the loop filter and the filter strength.
[0117] Other supporting information:
[0118] Such as the segmentation method of image blocks, block size, encoding order, etc., and other auxiliary information are used by the decoding end to correctly parse and reconstruct the image.
[0119] For example, the encoder reconstructs image patches based on prediction information and residual information. First, prediction image patches are generated using the prediction information; then, the residual information (after inverse transformation and inverse quantization) is added to the prediction image patches to obtain the initial reconstructed values of the image to be processed.
[0120] In some embodiments, the filtering process includes DBF, SAO, and ALF. Here, the encoder uses the RDO method in the ALF module to make a decision and obtain the ALF filtering control information used for the image to be processed.
[0121] The decisions made by the encoding end in the ALF module include the following aspects:
[0122] (a) Using the RDO method to make decisions about each component in the image to be processed, including:
[0123] 1) Luminance component ALF decision.
[0124] 2) Color component ALF decision, including the decision of the two color components Cb and Cr.
[0125] 3) Cross-component ALF decision, including the decision of two components: cross-component adaptive loop filter-Cb component (CCALF-Cb) and cross-component adaptive loop filter-Cr component (CCALF-Cr).
[0126] (ii) Perform RDO decision-making for each CTU to obtain the optimal ALF filter control information for the current CTU, including:
[0127] 1) Whether ALF is enabled for the current CTU or its components;
[0128] 2) The index of the fixed filter subset currently used by CTU;
[0129] 3) The historical APS subset index currently used by CTU;
[0130] 4) Optional subset index of the historical APS subset currently used by CTU;
[0131] (III) Perform RDO decision-making on the entire image to be processed to obtain the optimal ALF filter control information for the image to be processed, including:
[0132] 1) Is ALF enabled for the current image (current slice)?
[0133] 2) Index of all historical APS subsets used in the current image.
[0134] S102. Based on the set of filtering coefficients corresponding to the image to be processed, determine the target classification method corresponding to the set of filtering coefficients from multiple classification methods.
[0135] In some embodiments, the encoder pre-stores multiple classification methods, which can be understood as a set of classification methods. After obtaining the reconstructed values of the image to be processed, the encoder can determine the set of filter coefficients used by the image to be processed, that is, determine the set of filter coefficients corresponding to the image to be processed, and then determine the target classification method corresponding to the filter coefficient set from the multiple classification methods based on the set of filter coefficients corresponding to the image to be processed. Here, the multiple classification methods can be pre-negotiated between the encoder and decoder, predefined in the standard, or pre-configured by the encoder; this embodiment does not limit this.
[0136] The image to be processed may correspond to multiple sets of filter coefficients. For each set of filter coefficients corresponding to more than the image to be processed, the target classification method corresponding to each set of filter coefficients can be determined from multiple classification methods using the method shown in step S102. This will not be elaborated further below.
[0137] As an example, step S102 may include the following steps:
[0138] A1. Based on the set of filter coefficients corresponding to the image to be processed, determine the encoding cost of each classification method among multiple classification methods.
[0139] For example, the following steps may be included:
[0140] A11. Obtain the encoding region of the filter coefficient set used in the image to be processed.
[0141] That is, determining all coded regions in the image to be processed that use this set of filter coefficients. Here, a coded region includes at least one coding tree unit.
[0142] A12. For each of the multiple classification methods: classify the pixel blocks of the encoding region based on the classification method to obtain M categories corresponding to the classification method; determine the encoding cost of the classification method based on the M categories corresponding to the classification method.
[0143] Here, each category includes at least one pixel block in the coded region, and M is an integer greater than 2. That is, the pixel blocks in the coded region are classified according to the classification method to obtain pixel blocks in M categories.
[0144] The embodiments disclosed herein do not limit the size of the pixel blocks, which can be flexibly adjusted according to the video content during the actual encoding process. The input signal for pixel block classification can be the initial reconstructed value before loop filtering, the reconstructed value after all loop filtering processes are completed, or the reconstructed value output at a certain stage of loop filtering.
[0145] The encoding and decoding methods provided in this disclosure can be applied individually to the luminance or chrominance components of a reconstructed image or slice, as well as to cross-component filtering. The encoding and decoding methods provided in this disclosure support multiple classification methods. The classification methods shown below are merely illustrative examples and are not intended to limit the scope of the method. In actual encoding, a specific selection can be made based on the filtering effect and performance gain after encoder classification. Alternatively, two or more classification methods can be superimposed to obtain a more accurate classification result.
[0146] In some embodiments, the classification method includes at least one of the following:
[0147] 1) Classification method based on Laplace gradient:
[0148] a. Calculate the Laplacian gradient: For each 2x2 brightness block, calculate the one-dimensional Laplacian gradient g of each pixel in the 4x4 pixel block centered on that block in the directions of 0° horizontally, 90° vertically, 135° vertically, and 45° vertically. h ,g v ,g d1 ,g d2 .
[0149] b. Calculate the directional factor Calculate the ratio r of the maximum to minimum gradient in the horizontal and vertical directions. h,v The ratio r of the maximum to minimum gradient in the diagonal direction d1,d2 Then, by comparing the two ratios with a set of pre-set thresholds Th, the horizontal / vertical edge strength E is calculated. HV and diagonal edge strength E D Finally, the directional factor was obtained by looking up a table. The value of .
[0150] c. Calculate activity factors Obtained by looking up the Laplace gradient table.
[0151] d. Calculate the classification results:
[0152] Here, M D Directional factor Total quantity This indicates the classification result.
[0153] 2) Classification based on sample residuals:
[0154] For each 2x2 brightness block, calculate the sum of the absolute values of the residual samples in the 8x8 window centered on that block. Then the classification result is:
[0155] classIdx=sum>>(bit-depth-4);
[0156] Here, bit_depth is the sample bit depth, the above results contain at most M categories, sum is the sum of the absolute values of the residual samples, and classIdx represents the classification result.
[0157] 3) Classification method based on sideband information:
[0158] For each 2x2 brightness block, calculate the sum of all pixel values within that block, and the classification result is:
[0159] classIdx=(sum*M>>(bit-depth+2);
[0160] Here, bit_depth is the sample bit depth. The above results contain a maximum of M categories. In actual encoding / decoding, the calculation method can be adjusted to merge or increase the number of categories.
[0161] 4) Classification method based on encoded information:
[0162] Each pixel block is classified into M categories based on block partitioning information. The classification criteria include whether it is located at the CU or TU boundary, whether it is an intra-frame coding mode, and whether the residual signal of the pixel block is higher than a predefined threshold.
[0163] 5) Classification based on region division:
[0164] The entire frame of the image to be processed or the slice is divided into multiple regions, each containing a consecutive integer number of CTUs, with the number of CTUs in each region remaining consistent. Regions are classified based on the luminance components of the reconstructed image, for example, into 8 categories, ensuring that the number of CTUs in each category is as equal as possible.
[0165] The target classification method can be a combination of the multiple classification methods shown above, or a selection of these methods. The target classification method can include, or exclude, the classification methods corresponding to the filter coefficient set. In actual encoding, this can be flexibly set according to the encoding effect; this embodiment does not impose any limitations on this.
[0166] As an example, based on the M categories corresponding to a classification method, the encoding cost of the classification method is determined, including:
[0167] The M categories corresponding to the classification method are grouped into N groups, each group including at least one category, where N is a positive integer less than or equal to M;
[0168] Based on the N groups corresponding to the classification method, determine the encoding cost of the classification method.
[0169] In some embodiments, for each of the N groups corresponding to the classification method: based on the group and the scaling factor set, determine the Q encoding costs of the group; determine the target encoding cost of the group from the Q encoding costs of the group; here, the scaling factor set includes Q scaling factors, and an encoding cost of the group is determined based on the group and a scaling factor in the scaling factor set, where Q is a positive integer; determine the minimum target encoding cost among the N target encoding costs corresponding to the N groups as the encoding cost of the classification method.
[0170] Here, the target encoding cost of the group is the minimum encoding cost among the Q encoding costs of the group.
[0171] In some embodiments, each group includes at least one pixel block in the coded region; determining Q coding costs for the group based on the group and a set of scaling factors includes: obtaining a first reconstructed value for the pixel block corresponding to the group; filtering the first reconstructed value to obtain a second reconstructed value for the pixel block corresponding to the group; determining Q third reconstructed values for the pixel block corresponding to the group based on the reconstructed residual value, the second reconstructed value, and Q scaling factors; here, the reconstructed residual value is determined based on the first and second reconstructed values, and a third reconstructed value is determined based on the reconstructed residual value, the second reconstructed value, and one of the Q scaling factors; determining Q coding costs for the group based on the Q third reconstructed values for the pixel block corresponding to the group and a rate-distortion optimization method, where one coding cost for the group corresponds to one third reconstructed value.
[0172] The first reconstructed value of the pixel block corresponding to the group can be understood as the initial reconstructed value of all / all pixel blocks in at least one pixel block included in the group. Then, the first reconstructed value is filtered to obtain the second reconstructed value of the pixel block corresponding to the group, which can be understood as the filtered reconstructed value.
[0173] The reconstruction residual value is determined based on the first reconstruction value and the second reconstruction value, or the reconstruction residual value can be the difference between the first reconstruction value and the second reconstruction value.
[0174] A third reconstructed value is determined based on the reconstructed residual value, the second reconstructed value, and one of the Q scaling factors. Specifically, the reconstructed residual value Corri before and after ALF filtering is calculated, scaled using the scaling factor, and then superimposed onto the second reconstructed value, as shown in the following formula:
[0175] Rec'i=Reci+(Corri*Scale_factori+Offset)>>b;
[0176] Here, Rec'i is the i-th third reconstructed value among Q third reconstructed values, Scale_factori is the i-th scaling factor among Q scaling factors, Reci is the second reconstructed value, i is an integer less than or equal to Q, and Offset and b are both constants.
[0177] Since most mainstream video compression is lossy, the rate-distortion criterion is the most widely used tool for measuring compression performance. Based on the principle of rate-distortion optimization, the rate-distortion criterion establishes an optimization problem by minimizing distortion under the constraint of the coding bit rate.
[0178] Therefore, the Q encoding costs of a group can be determined based on the Q third reconstruction values of the pixel blocks corresponding to the group and the rate-distortion optimization method.
[0179] In other words, for each of the N groups corresponding to a classification method, this group is combined with each scaling factor in the scaling factor set to determine the Q combinations corresponding to the group and the Q scaling factors in the scaling factor set. The combination with the minimum encoding cost among the Q combinations is then selected as the target combination, and the encoding cost of the target combination is determined as the target encoding cost of that group. Next, the target combination for each classification method is determined, and the encoding costs of the target combinations for each classification method are compared. The target combination for the classification method with the minimum encoding cost is selected as the target combination corresponding to that filter coefficient set.
[0180] In some embodiments, the information on the target combination includes at least one of the following:
[0181] 1) The type of classification method is indicated by the classification method index;
[0182] 2) The number of groups in the M categories obtained after pixel block classification;
[0183] 3) The scaling factor used for each group;
[0184] That is, for each of the N groups, determine the Q coding costs corresponding to the group, and then determine the minimum coding cost among the Q coding costs as the target coding cost of the group.
[0185] A2. Based on the encoding cost of each of the multiple classification methods, determine the target classification method from the multiple classification methods.
[0186] For each of the multiple classification methods, the encoding cost of each classification method can be determined based on the steps shown in step A1 above. Then, based on the encoding cost of each of the multiple classification methods, the target classification method is determined from the multiple classification methods. Here, the target classification method is the classification method with the lowest encoding cost among the multiple classification methods, that is, the classification method with the lowest encoding cost among the multiple classification methods is determined as the target classification method.
[0187] After determining the target classification method, the corresponding filter intensity adjustment scheme can be determined. The filter intensity adjustment scheme may include at least one of the following:
[0188] 1) The filter intensity adjustment schemes corresponding to all fixed filter subsets used in the image to be processed;
[0189] 2) The filter intensity adjustment schemes corresponding to all historical APS subsets used for the image to be processed;
[0190] 3) The filter intensity adjustment scheme corresponding to the optional subset of all historical APS subsets used in the image to be processed.
[0191] S103. Based on the target classification method, the reconstructed values of the image to be processed are subjected to filter intensity adjustment processing to obtain the target reconstructed values of the image to be processed.
[0192] As an example, the reconstructed value of the encoded region using the filter coefficient set in the image to be processed is obtained; the filter intensity of the reconstructed value of the encoded region is adjusted based on the target classification method to obtain the target reconstructed value of the encoded region.
[0193] Taking a coding region that includes at least one coding tree unit as an example, that is, obtaining the reconstructed value of the coding tree unit using the set of filtering coefficients in the image to be processed; adjusting the filtering intensity of the reconstructed value of the coding tree unit based on the target classification method to obtain the target reconstructed value of the coding tree unit.
[0194] Adjusting the filtering intensity of the reconstructed value of the image to be processed based on the target classification method can be achieved by adjusting the filtering intensity of the reconstructed value of the image to be processed based on the filtering intensity adjustment scheme corresponding to the target classification method.
[0195] In some embodiments, in order to reduce the encoding cost of encoding the image to be processed, the reconstructed value of the image to be processed is subjected to filter intensity adjustment processing based on the target classification method to obtain the target reconstructed value of the image to be processed. This includes: determining a first encoding cost for performing filter intensity adjustment processing on the reconstructed value of the image to be processed based on the target classification method, and a second encoding cost for not performing filter intensity adjustment processing on the reconstructed value of the image to be processed based on the target classification method; in response to the first encoding cost being less than the second encoding cost, the reconstructed value of the image to be processed is subjected to filter intensity adjustment processing based on the target classification method to obtain the target reconstructed value of the image to be processed.
[0196] Alternatively, in response to the first encoding cost being greater than or equal to the second encoding cost, it is determined that the reconstructed values of the image to be processed are not subject to filter intensity adjustment based on the target classification method.
[0197] That is, the encoding cost of not performing ALF filter intensity adjustment and performing ALF filter intensity adjustment is calculated separately for the image to be processed, and the two encoding costs are compared. If the encoding cost of performing ALF filter intensity adjustment is smaller, then it is determined that the ALF filter intensity adjustment operation should be performed on the image to be processed.
[0198] Here, the first encoding cost of performing filter intensity adjustment processing on the reconstructed values of the image to be processed based on the target classification method is determined, including: the filter intensity adjustment scheme corresponding to the target classification method and the transmission overhead under the filter intensity adjustment scheme, and the first encoding cost of performing filter intensity adjustment processing on the reconstructed values of the image to be processed based on the target classification method is determined.
[0199] After the encoding end obtains the target reconstruction values of the image to be processed, its uses are mainly reflected in the following aspects:
[0200] Image quality optimization:
[0201] By adjusting the filter intensity, the encoder can perform fine-grained image quality optimization for different types of targets (such as edges, textures, smooth regions, etc.). This helps to remove or reduce unnecessary noise and interference while preserving important image features, thereby improving overall image quality.
[0202] Improved data compression efficiency:
[0203] The reconstructed values reflect the importance and level of detail of different regions in the image. The encoder can use this information to perform more efficient image compression. For example, a lower compression rate can be used for detailed and important regions to maintain image quality, while a higher compression rate can be used for less detailed or less important regions to save storage space.
[0204] Bandwidth savings:
[0205] During image transmission, the encoding end provides the target reconstruction values, enabling the decoding end to reconstruct a satisfactory image quality even when only partial data is received. This helps achieve more efficient image transmission and real-time applications within limited transmission bandwidth.
[0206] Follow-up processing support:
[0207] The reconstructed target values obtained at the encoding end can also support subsequent image processing tasks. For example, in tasks such as image recognition and object detection, the reconstructed target values can be used to extract more accurate and useful feature information, thereby improving processing efficiency and accuracy.
[0208] Adaptable to different application scenarios:
[0209] Different application scenarios have different requirements for image quality. By adjusting the filtering intensity and obtaining the target reconstruction value, the encoding end can flexibly adjust the image quality according to actual needs to meet the requirements of different application scenarios.
[0210] Based on the embodiment shown in Figure 6, the target classification method corresponding to the filter coefficient set corresponding to the image to be processed is determined from multiple classification methods. Since the classification method of pixel blocks is fixed in related technologies, the accuracy of the determined classification method for adjusting the filter intensity of the reconstructed value of the image to be processed is improved, so that the target classification method can match the filter coefficient set. Then, the filter intensity is adjusted based on the target classification method to obtain the target reconstructed value of the image to be processed, which improves the effect of filter intensity adjustment and the accuracy of the determined target reconstructed value of the image to be processed. That is, more types of adjustment schemes are added in the ALF filter intensity adjustment stage, thereby reducing the distortion of the reconstructed image and improving the video coding effect.
[0211] The encoding method shown in Figure 6 can be understood as an ALF filter intensity adjustment method based on multi-classification.
[0212] Step S102 above directly determines the target classification method corresponding to the filter coefficient set from multiple classification methods based on the filter coefficient set corresponding to the image to be processed. In some embodiments, after obtaining the reconstructed value of the image to be processed, the encoder can determine whether the number of filters in the filter coefficient set corresponding to the image to be processed is less than a preset threshold, so as to determine whether to use a multi-classification method (i.e., use a multi-classifier) during the filter intensity adjustment process.
[0213] In response to the fact that the number of filters in the set of filter coefficients corresponding to the image to be processed is less than a preset threshold, that is, it is determined that a multi-classification method is used in the process of adjusting the filter intensity, and then the target classification method is determined from multiple classification methods based on the set of filter coefficients corresponding to the image to be processed, that is, the above step S102 is executed.
[0214] Alternatively, in response to the number of filters in the filter coefficient set corresponding to the image to be processed being greater than or equal to a preset threshold, that is, it is determined that multi-classification will not be used during the filter intensity adjustment process, and the target classification method is determined to be the classification method corresponding to the filter coefficient set, that is, the target classification method is determined to be the default classification method corresponding to the filter coefficient set.
[0215] For example, after obtaining the reconstructed value of the image to be processed, the encoder determines whether to use a multi-classifier to adjust the filter intensity during the filter intensity adjustment process based on the number of filters in the historical APS subset.
[0216] In some embodiments, after obtaining the target reconstruction value of the image to be processed, the encoding end can identify the target classification method in the video encoding bitstream, so that after receiving the video encoding bitstream, the decoding end can process the image based on the target classification method identified in the video encoding bitstream to obtain the target reconstruction value of the image.
[0217] For example, ALF filter strength adjustment control signaling is written into the video encoded bitstream. This ALF filter strength adjustment control signaling includes an identifier for the target classification method used for each set of filter coefficients. The identifier for the target classification method includes an index of the target classification method.
[0218] In some embodiments, as shown in FIG7, this disclosure provides a decoding method applied to a decoding end, wherein the decoding end can be the decoding end 20 shown in FIG5 above, and the method may include the following steps:
[0219] S201, Receive video encoded bitstream.
[0220] In some embodiments, after generating the video encoded stream, the encoding end sends the video encoded stream to the decoding end. Correspondingly, the decoding end receives the video encoded stream from the encoding end. Here, the video encoded stream includes at least one image and an identifier for the target classification method corresponding to each image; the target classification method is determined from multiple classification methods; how the target classification method is determined from multiple classification methods can be referred to the corresponding description in step S102 above, and will not be repeated here.
[0221] S202. Based on the target classification method corresponding to the image, the reconstructed value of the image is processed by adjusting the filtering intensity to obtain the target reconstruction value of the image.
[0222] Here, the target classification method corresponding to the image is determined based on the identifier of the target classification method corresponding to the image.
[0223] As an example, step S202 may include the following steps:
[0224] B1. Obtain the set of filter coefficients corresponding to the image;
[0225] That is, to determine the set of filter coefficients corresponding to the image.
[0226] B2. Based on the target classification method, the pixel blocks of the encoded region using the filter coefficient set in the image are classified to obtain M categories.
[0227] Here, each category includes at least one pixel block in the coded region, where M is an integer greater than 2. The coded region includes at least one coded tree unit.
[0228] B3. Determine the N groups corresponding to the M categories, and the target scaling factor for each of the N groups.
[0229] Here, N is a positive integer less than or equal to M.
[0230] This means determining the target combination corresponding to the target classification method. The target combination includes each group and the target scaling factor corresponding to each group. For the description of the target combination, please refer to the description of the target combination in step S102 above, which will not be repeated here.
[0231] B4. Based on the target scaling factors corresponding to each of the N groups, the reconstructed values of the corresponding pixel blocks of the N groups are subjected to filter intensity adjustment processing to obtain the target reconstructed values of the encoded region.
[0232] For the description of classifying pixel blocks in the encoding region and determining the N groups corresponding to the M categories in step S202, please refer to the corresponding description in step S102 above, and it will not be repeated here.
[0233] In other words, after receiving the video encoded bitstream, the decoder parses the ALF filter intensity adjustment control information in the bitstream, obtains the reconstructed image values, and performs a series of filtering processes on the reconstructed image. After ALF filtering, the reconstructed pixels are classified according to the target classification method indicated in the ALF filter intensity adjustment control information, and the filter intensity is adjusted for the encoded regions that use the historical filtering subset. The specific steps are as follows:
[0234] Step 1: The decoder receives the video stream, which includes one or more video frames (i.e., images) and corresponding loop filter control signaling, including ALF filter intensity adjustment control signaling.
[0235] Step 2: The decoder decodes the current video frame to obtain the initial reconstructed value of the reconstructed image, and performs filtering processing on the reconstructed image, including DBF, SAO, and ALF, to obtain the filtered reconstructed value Rec, which is the reconstructed value.
[0236] Step 3: The decoder parses the image header or strip header and determines the ALF filter intensity adjustment scheme to be used for the current image based on the ALF filter intensity adjustment control signal here.
[0237] Step 4: The decoder determines the set of filter coefficients used in the current image based on the APS subset index signaling in the image header or strip header, obtains all coding tree units (CTUs) that use the set of coefficients, classifies them as a whole into pixel blocks, and obtains the classification result. The classifier is determined by the classifier index used by each set of filter coefficients in the image header or strip header.
[0238] Step 5: The decoder determines the number of groups of the classification results obtained in Step 4 based on the ALF filter intensity adjustment control signal, and determines the scaling factor used for each group of categories.
[0239] Step 6: Adjust the ALF filter intensity for the pixel blocks corresponding to each category:
[0240] The residual value Corri of the reconstructed pixels before and after ALF filtering is calculated, scaled using a scaling factor, and then superimposed on the reconstructed pixels, as shown in the following formula: Rec'i=Reci+(Corri*Scale_factori+Offset)>>b;
[0241] Here, Scale_factori represents the preset scaling factor value.
[0242] Step 7: Traverse all ALF filter coefficient sets used in the current image, repeat steps 4-6, and obtain the target reconstruction value of the current image.
[0243] In some embodiments, after the decoder obtains the target reconstructed value of the image, since the target reconstructed value is the result of filtering intensity adjustment, this process helps reduce noise and distortion in the image, thereby recovering a clearer and more detailed image. Furthermore, by adjusting the filtering intensity, the reconstructed image can better retain the detail information in the original image, improving the visual quality of the image. The target reconstructed value obtained at the decoder can serve as a basis for encoder performance evaluation, helping the encoder optimize its coding strategy and improve coding efficiency. The target reconstructed value obtained at the decoder can serve as input for subsequent image processing steps, such as image enhancement, image segmentation, and image recognition. These subsequent processing steps can perform more precise processing and analysis based on the information in the reconstructed image, thereby enabling wider applications.
[0244] This disclosure provides an encoding and decoding method, as shown in the flowchart of the target classification method determination in Figure 8. During encoding, after the image to be processed undergoes ALF filtering, the optimal target classification method is determined from multiple classification methods through RDO decision. Then, pixel blocks are classified based on the target classification method, and the corresponding category groups and scaling factors for each group are calculated based on the original image. The filter intensity adjustment information is written into the video encoding bitstream. During decoding, the decoder can adjust the filter intensity based on the filter intensity adjustment information parsed from the video encoding bitstream, selecting the target classification method specified in the filter intensity adjustment information after ALF filtering. The technical solution provided by this disclosure can supplement the ALF filtering intensity adjustment stage with more classification methods, thereby determining the target classification method, further reducing the distortion of the reconstructed image, and achieving the goal of improving video encoding performance.
[0245] Here, the descriptions of SH, PH, and alt in Figure 8 above can be found in the corresponding descriptions in Figure 2 above, and will not be repeated here.
[0246] In some embodiments, the example shown in FIG6 above illustrates determining a target classification method from multiple classification methods, and then adjusting the filtering intensity of the reconstructed value of the image to be processed based on the target classification method to obtain the target reconstructed value of the image to be processed. In some embodiments, as shown in FIG9, this disclosure also provides an encoding method applied at the encoding end, which may include the following steps:
[0247] S301. Obtain the reconstructed values of the image to be processed.
[0248] The description of step S301 can be found in the description of step S101 above, and will not be repeated here.
[0249] S302. The encoding region of the filter coefficient set corresponding to the image to be processed is used to group the pixel blocks in the image to be processed, resulting in W groups of pixel blocks.
[0250] Here, each group of pixel blocks is obtained based on filter information from the set of filter coefficients, where W is an integer greater than 2.
[0251] In some embodiments, the W groups of pixel blocks are obtained by fusing various types of pixel blocks in the coded region based on the fusion category corresponding to the filter coefficient set. The filter information includes the fusion category corresponding to the filter coefficient set. The fusion category is used to indicate the categories that can be fused, and the fusion category can be understood as a category fusion strategy.
[0252] By classifying and merging pixel blocks into fewer groups, the amount of data processed during encoding can be reduced, helping to lower encoding complexity and thus improve encoding speed. The fused category division allows the encoder to more effectively utilize encoding resources, such as bit count, to represent image information, thereby improving compression efficiency. Fusion strategies are typically designed based on the statistical characteristics of image content and encoding requirements; therefore, filter information, including the fusion category corresponding to the filter coefficient set, ensures that image quality is maintained or improved as much as possible while reducing encoding complexity. The fused category division makes the encoder more sensitive to changes in image content, thus enhancing encoding robustness. For example, when image content changes significantly, the encoder can adjust its encoding strategy more quickly to adapt to the new image content.
[0253] As an example, step S302 may include the following steps:
[0254] C1. Classify the pixel blocks in the encoded region to obtain K categories of pixel blocks.
[0255] K is an integer greater than or equal to W.
[0256] C2. Based on the fusion category, group the pixel blocks of the K categories into W groups of pixel blocks.
[0257] That is, the pixel blocks are divided into K categories, and then the pixel blocks of the K categories are merged into W groups according to the fusion category of the filter coefficient set.
[0258] S303. Based on the set of W pixel blocks and scaling factors, determine the encoding cost corresponding to each of the W pixel blocks.
[0259] As an example, the scaling factor set includes Q scaling factors, where Q is a positive integer, and step S303 may include the following steps:
[0260] D1. For each group of pixel blocks in W groups of pixel blocks, determine Q candidate encoding costs for each group of pixel blocks based on each group of pixel blocks and Q scaling factors.
[0261] Here, a candidate encoding cost is determined based on each group of pixel blocks and a scaling factor.
[0262] As an example, Q candidate coding costs for each group of pixel blocks are determined based on each group of pixel blocks, Q scaling factors, and a rate-distortion optimization method.
[0263] For a description of how to determine the Q candidate coding costs for each group of pixel blocks based on each group of pixel blocks, Q scaling factors, and a rate-distortion optimization method, please refer to the description of determining coding costs based on rate-distortion optimization methods in related technologies, which will not be repeated here.
[0264] D2. Determine the minimum candidate coding cost among the Q candidate coding costs of each pixel block as the coding cost of each pixel block.
[0265] S304. Based on the target scaling factor corresponding to the target coding cost in the coding cost of each of the W groups of pixel blocks, the filtering intensity of the reconstructed value of the image to be processed is adjusted to obtain the target reconstructed value of the image to be processed.
[0266] Here, the target encoding cost is the minimum encoding cost among the encoding costs corresponding to each of the W groups of pixel blocks.
[0267] As an example, the reconstructed values of the image to be processed include the reconstructed values of the coded region. The reconstructed values of the coded region are then subjected to filter intensity adjustment based on the target scaling factor to obtain the target reconstructed values of the coded region.
[0268] Based on the embodiment shown in Figure 9, after obtaining the reconstructed value of the image to be processed, the encoded region of the image to be processed using the filter coefficient set corresponding to the image to be processed is grouped into pixel blocks to obtain W groups of pixel blocks. Each group of pixel blocks is obtained based on the filter information of the filter coefficient set. Compared with the related technology, which classifies pixel blocks by the encoded region of the filter coefficient set corresponding to the image to be processed, this embodiment of the disclosure obtains W groups of pixel blocks by grouping pixel blocks by the encoded region of the filter coefficient set corresponding to the image to be processed, and each group of pixel blocks is obtained based on the filter information of the filter coefficient set. That is, W groups of pixel blocks are obtained by fusing the filter information of the filter coefficient set. By classifying and fusing pixel blocks into fewer groups, the amount of data to be processed during the encoding process can be reduced, which helps to reduce the encoding complexity and thus improve the encoding speed. Furthermore, based on the target scaling factor corresponding to the target encoding cost in the encoding cost corresponding to each of the W groups of pixel blocks, the filter intensity of the reconstructed value of the image to be processed is adjusted to obtain the target reconstructed value of the image to be processed, which improves the effect of filter intensity adjustment, reduces the distortion of the reconstructed image, and improves the video encoding effect.
[0269] In some embodiments, after adjusting the filtering intensity of the reconstructed value of the image to be processed based on the target scaling factor corresponding to the target coding cost in the coding cost corresponding to each of the W groups of pixel blocks, and obtaining the target reconstructed value of the image to be processed, the encoding end can identify the target scaling factor in the video coding bitstream so that the decoding end can process the image based on the target scaling factor identified in the video coding bitstream after receiving the video coding bitstream, so as to obtain the target reconstructed value of the image.
[0270] For example, ALF filter strength adjustment control signaling is written into the video encoded bitstream. This ALF filter strength adjustment control signaling includes an identifier of the target scaling factor used for each set of filter coefficients. The identifier of the target scaling factor includes an index of the target scaling factor.
[0271] The embodiments shown in Figure 9 above will be described by way of example below.
[0272] The fixed filter subset and the historical APS subset of ALF filtering will contain K sets of filter coefficients corresponding to W classification results. Assuming that the maximum number of pixel block classifications is W, then:
[0273] K≤W;
[0274] The encoder can use RDO (Redirected Decision) to fuse some categories from W categories (i.e., share a set of filter coefficients) to obtain the final K classification results, and calculate the corresponding K sets of filter coefficients. In this embodiment, the encoder can reuse the K value obtained in the ALF filtering stage during the ALF adjustment stage. For each of the K sets of filter coefficients, the corresponding scaling factor is calculated, and then the filter intensity is adjusted to further reduce the distortion of the reconstructed image and ensure the encoding result. The specific steps are as follows:
[0275] Step 1: The encoder obtains the initial reconstructed values of the image based on the existing encoding information.
[0276] Step 2: Filter the initial reconstructed values of the image, including DBF, SAO, and ALF, to obtain the filtered reconstructed value Rec, which is the reconstructed image value. Here, the ALF module uses the RDO method to make decisions and obtain the ALF filtering control information for the current image.
[0277] Step 3: For the set of filtering coefficients used in the image, obtain all coding tree units (CTUs) that use the set of coefficients, classify them as a whole, and group them into categories. The category grouping results are divided according to the fusion category corresponding to the set of coefficients, that is, the pixel blocks are divided into K categories, and then the K categories are fused into W groups according to the fusion category strategy of the set of coefficients.
[0278] Step 4: For each group category in Step 3, select one from the preset scaling factors, adjust the filtering intensity of the group, calculate the reconstructed value, calculate the cost according to the rate-distortion optimization method, and obtain the optimal scaling factor for each group.
[0279] Step 5: Traverse all filter coefficient sets, repeat steps 3-4, and obtain Wi target scaling factors corresponding to each filter coefficient set.
[0280] Step 6: Based on the target scaling factor corresponding to each filter coefficient set obtained in Step 5, perform ALF filter intensity adjustment operation on the current image to obtain the target reconstructed value of the image, and write the ALF filter intensity adjustment control signal into the video encoding bitstream. The ALF filter intensity adjustment control signal includes the identifier of the target scaling factor used for each filter coefficient set.
[0281] In some embodiments, as shown in FIG10, this disclosure also provides a decoding method applied at a decoding end, which may include the following steps:
[0282] S401, Receive video encoded bitstream.
[0283] Here, the video encoded bitstream includes at least one image and an identifier of the target scaling factor corresponding to the set of filter coefficients for each image.
[0284] The description of step S401 can be found in the description of step S201 above, and will not be repeated here.
[0285] S402. The reconstructed values of the image are processed by adjusting the filtering intensity based on the target scaling factor to obtain the target reconstructed values of the image.
[0286] For details on how the reconstructed values of the image are obtained, please refer to the corresponding description in the embodiment shown in Figure 6 above, which will not be repeated here.
[0287] Step S402 is the reverse process of steps S302 to 304 above. For the description of step S402, please refer to the description of steps S302 to 304 above, and it will not be repeated here.
[0288] As an example, the reconstructed value of the coded region using the set of filter coefficients in the image is obtained; the filter intensity of the reconstructed value of the coded region is adjusted based on the target scaling factor to obtain the target reconstructed value of the coded region.
[0289] The role of the target reconstruction value of the image obtained at the decoding end can be referred to the corresponding description in step S202 above, and will not be repeated here.
[0290] The following provides an illustrative example of the syntax structure and semantic information for identifying target classification methods in the video encoded bitstream. This syntax structure is merely an example and applies to the luma component. For control signaling of other components such as chroma and CC-ALF, the control signaling settings for the luma component can be referenced.
[0291] Image header syntax: The ALF filter intensity adjustment control signaling based on the multi-classification method for the luminance component can be shown in Table 1 below.
[0292] Table 1
[0293] Semantics:
[0294] `slice_alf_classifier_adaptive[i][altIdx]` indicates whether adaptive classification is enabled for the current video; 1 indicates enabled, and 0 indicates disabled. The classification method can also be replaced with a classifier, which will not be elaborated further below.
[0295] `slice_alf_scale_classifier_band[i][altIdx]` indicates whether the current set of filter coefficients uses a slice-based classification method; 0 indicates no classification and 1 indicates classification.
[0296] `slice_alf_scale_classifier_residual[i][altIdx]` indicates whether the current set of filter coefficients uses a classification method based on residual signals; 0 indicates no use, and 1 indicates use.
[0297] The ALF filter intensity adjustment control signaling for the luminance component in the strip header, based on a multi-classification method, is basically consistent with the image header syntax.
[0298] In some embodiments, in addition to using slice_alf_scale_classifier_band and slice_alf_scale_classifier_residual to indicate the classification method in the image header or strip header, it can also be indicated by whether the classification method used by the current filter coefficient set in ALF filter intensity adjustment is consistent with the classification method of the filter coefficient set itself. The syntax can be as shown in Table 2 below:
[0299] Table 2
[0300] Semantics:
[0301] `slice_alf_scale_classifier_changed[i][altIdx]` indicates whether the classification method used in the ALF filter strength adjustment of the current filter coefficient set is the same as the classification method of the filter coefficient set itself. 0 indicates different, and 1 indicates the same.
[0302] `slice_alf_scale_classifier_offset[i][altIdx]` is used to indicate whether the classification method used in the ALF filter intensity adjustment of the current filter coefficient set deviates from the classification method of the filter coefficient set itself. The preset number of classification methods is C, where 0 indicates forward offset and 1 indicates backward offset, that is, the previous or next classification method of the filter coefficient set itself.
[0303] The ALF filter intensity adjustment control signaling for the luminance component in the strip header, based on a multi-classification method, is basically consistent with the image header syntax.
[0304] In some embodiments, in addition to using slice_alf_scale_classifier_band and slice_alf_scale_classifier_residual to indicate the target classification method in the image header or strip header, it can also be indicated by whether the classification method used in the current filter coefficient set for ALF filter intensity adjustment is consistent with the classification method of the filter coefficient set itself. The syntax can be as shown in Table 3 below:
[0305] Table 3
[0306] Semantics:
[0307] `slice_alf_scale_classifier_changed[i][altIdx]` indicates whether the classification method used in the ALF filter strength adjustment of the current filter coefficient set is the same as the classification method of the filter coefficient set itself. 0 indicates different, and 1 indicates the same.
[0308] `slice_alf_scale_classifier_offset[i][altIdx]` is used to indicate whether the classification method used in the ALF filter intensity adjustment of the current filter coefficient set deviates from the classification method of the coefficient set itself. The preset number of classification methods is C, where 0 indicates forward offset and 1 indicates backward offset, that is, the previous or next classification method of the filter coefficient set itself.
[0309] The ALF filter intensity adjustment control signaling for the luminance component in the strip header, based on a multi-classification method, is basically consistent with the image header syntax.
[0310] Based on the two indication methods above, additional limiting conditions can be added to indicate the target classification method used in ALF filter intensity adjustment. For example, the target classification method can be indicated only when the number of groups is greater than 1 (i.e., slice_alf_scale_groupShift[i][altIdx] is greater than 0). The syntax is shown in Table 4 below:
[0311] Table 4
[0312] The meaning is the same as above, and will not be repeated here.
[0313] The syntax shown in Tables 1 to 4 above is merely exemplary and does not constitute a limitation on the technical solutions of the embodiments of this disclosure. For example, other forms of syntax can also be used to indicate the classification method used in ALF filter intensity adjustment for the filter coefficient set. The form of syntax used for indication can be selected based on the actual application scenario, and the embodiments of this disclosure do not limit this.
[0314] Similarly, carrying ALF filter intensity adjustment control signaling in the strip header or image header is merely exemplary and does not constitute a limitation on the technical solution of the embodiments of this disclosure. ALF filter intensity adjustment control signaling can also be carried in other information. Furthermore, the syntax indicating the classification method used for the filter coefficient set in ALF filter intensity adjustment based on the syntax shown in Tables 1 to 4 is merely illustrative. It is also possible to use the syntax shown in Tables 1 to 4 to indicate the classification method used for other coefficient sets besides the filter coefficient set in ALF filter intensity adjustment. The embodiments of this disclosure do not impose any limitations on this.
[0315] The foregoing primarily describes the solution provided in this disclosure from the perspective of interaction between various nodes. It is understood that each node, such as the encoding or decoding end, includes corresponding hardware structures and / or software modules to perform the aforementioned functions. Those skilled in the art should readily recognize that, based on the algorithmic steps of the examples described in conjunction with the embodiments disclosed herein, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art 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 disclosure.
[0316] This disclosure embodiment can divide the encoding or decoding end into functional modules according to the above method embodiment. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one functional module. The integrated module can be implemented in hardware or software. The module division in this disclosure embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods. The following description uses the example of dividing each functional module according to each function.
[0317] Figure 11 is a block diagram of a communication device according to an embodiment of the present disclosure. As shown in Figure 11, the communication device 50 includes an acquisition unit 501 and a processing unit 502.
[0318] The communication device 50 can be the aforementioned encoding terminal or a chip within the encoding terminal. When the communication device 50 is used to implement the functions of the encoding terminal in the above embodiments, each unit is specifically used to implement the following functions.
[0319] The acquisition unit 501 is used to acquire the reconstructed values of the image to be processed;
[0320] The processing unit 502 is used to determine the target classification method corresponding to the filter coefficient set from multiple classification methods based on the filter coefficient set corresponding to the image to be processed;
[0321] The processing unit 502 is also used to perform filter intensity adjustment processing on the reconstructed values of the image to be processed based on the target classification method to obtain the target reconstructed values of the image to be processed.
[0322] In some embodiments, the processing unit 502 is specifically configured to: determine the encoding cost of each of the multiple classification methods based on the set of filtering coefficients corresponding to the image to be processed; and determine the target classification method from the multiple classification methods based on the encoding cost of each of the multiple classification methods.
[0323] In some embodiments, the processing unit 502 is specifically configured to: obtain the encoding region of the image to be processed using the set of filter coefficients; for each of the multiple classification methods: classify the encoding region into pixel blocks based on the classification method to obtain M categories corresponding to the classification method; and determine the encoding cost of the classification method based on the M categories corresponding to the classification method, where each category includes at least one pixel block in the encoding region, and M is an integer greater than 2.
[0324] In some embodiments, the processing unit 502 is specifically used to: group the M categories corresponding to the classification method into N groups, each group including at least one category, where N is a positive integer less than or equal to M; and determine the encoding cost of the classification method based on the N groups corresponding to the classification method.
[0325] In some embodiments, the processing unit 502 is specifically configured to: for each of the N groups corresponding to the classification method: determine Q encoding costs of the group based on the group and the scaling factor set; determine the target encoding cost of the group from the Q encoding costs of the group; here, the scaling factor set includes Q scaling factors, and an encoding cost of the group is determined based on the group and a scaling factor in the scaling factor set, where Q is a positive integer; and determine the minimum target encoding cost among the N target encoding costs corresponding to the N groups as the encoding cost of the classification method.
[0326] In some embodiments, the processing unit 502 is specifically configured to: obtain a first reconstructed value of a pixel block corresponding to a group; perform filtering processing on the first reconstructed value to obtain a second reconstructed value of the pixel block corresponding to the group; determine Q third reconstructed values of the pixel block corresponding to the group based on the reconstructed residual value, the second reconstructed value, and Q scaling factors; here, the reconstructed residual value is determined based on the first and second reconstructed values, and a third reconstructed value is determined based on one scaling factor among the reconstructed residual value, the second reconstructed value, and the Q scaling factors; and determine Q coding costs of the group based on the Q third reconstructed values of the pixel block corresponding to the group and a rate-distortion optimization method, where one coding cost of the group corresponds to one third reconstructed value.
[0327] In some embodiments, the processing unit 502 is specifically used to: obtain the reconstructed value of the coded region using the filter coefficient set in the image to be processed; and perform filter intensity adjustment processing on the reconstructed value of the coded region based on the target classification method to obtain the target reconstructed value of the coded region.
[0328] In some embodiments, the processing unit 502 is specifically configured to: in response to the number of filters in the set of filter coefficients corresponding to the image to be processed being less than a preset threshold, determine a target classification method from multiple classification methods based on the set of filter coefficients corresponding to the image to be processed.
[0329] In some embodiments, the processing unit 502 is specifically configured to: determine a first encoding cost for performing filter intensity adjustment processing on the reconstructed values of the image to be processed based on the target classification method, and a second encoding cost for not performing filter intensity adjustment processing on the reconstructed values of the image to be processed based on the target classification method; in response to the first encoding cost being less than the second encoding cost, perform filter intensity adjustment processing on the reconstructed values of the image to be processed based on the target classification method to obtain the target reconstructed values of the image to be processed.
[0330] In some embodiments, the processing unit 502 is further configured to identify the target classification method in the video encoded bitstream.
[0331] Figure 12 is a block diagram of another communication device provided according to an embodiment of the present disclosure. As shown in Figure 12, the communication device 60 includes a receiving unit 601 and a processing unit 602.
[0332] The communication device 60 can be the decoding end or a chip in the decoding end. When the communication device 60 is used to implement the function of the decoding end in the above embodiments, each unit is specifically used to implement the following functions.
[0333] The receiving unit 601 is used to receive a video encoded bitstream, which includes at least one image and an identifier of the target classification method corresponding to each image; the target classification method is determined from multiple classification methods.
[0334] The processing unit 602 is used to perform filtering intensity adjustment processing on the reconstructed value of the image based on the target classification method corresponding to the image to obtain the target reconstruction value of the image. The target classification method corresponding to the image is determined based on the identifier of the target classification method corresponding to the image.
[0335] In some embodiments, the processing unit 602 is specifically configured to: obtain a set of filtering coefficients corresponding to the image; classify the coded region of the image using the set of filtering coefficients into pixel blocks based on the target classification method to obtain M categories, where each category includes at least one pixel block in the coded region, and M is an integer greater than 2; determine N groups corresponding to the M categories, and a target scaling factor corresponding to each of the N groups; N is a positive integer less than or equal to M; and perform filtering intensity adjustment processing on the reconstructed values of the pixel blocks corresponding to each of the N groups based on the target scaling factors corresponding to each of the N groups to obtain the target reconstructed values of the coded region.
[0336] Figure 13 is a block diagram of another communication device provided according to an embodiment of the present disclosure. As shown in Figure 13, the communication device 70 includes an acquisition unit 701 and a processing unit 702.
[0337] The communication device 70 can be the aforementioned encoding terminal or a chip within the encoding terminal. When the communication device 70 is used to implement the functions of the encoding terminal in the above embodiments, each unit is specifically used to implement the following functions.
[0338] The acquisition unit 701 is used to acquire the reconstructed values of the image to be processed;
[0339] The processing unit 702 is used to group the encoded region of the image to be processed using the filter coefficient set corresponding to the image to be processed into W groups of pixel blocks. Here, each group of pixel blocks is obtained based on the filter information of the filter coefficient set, and W is an integer greater than 2.
[0340] The processing unit 702 is also used to determine the encoding cost corresponding to each of the W groups of pixel blocks based on the W groups of pixel blocks and the scaling factor set;
[0341] The processing unit 702 is further configured to perform filtering intensity adjustment processing on the reconstructed value of the image to be processed based on the target scaling factor corresponding to the target coding cost in the coding cost corresponding to each of the W groups of pixel blocks, so as to obtain the target reconstructed value of the image to be processed.
[0342] In some embodiments, the processing unit 702 is specifically used to: classify the coded region into pixel blocks to obtain K categories of pixel blocks, where K is an integer greater than or equal to W; and group the K categories of pixel blocks into W groups of pixel blocks based on the fusion category.
[0343] In some embodiments, the processing unit 702 is specifically configured to: for each group of pixel blocks in W groups of pixel blocks, determine Q candidate coding costs for each group of pixel blocks based on each group of pixel blocks and Q scaling factors, where a candidate coding cost is determined based on each group of pixel blocks and a scaling factor; and determine the minimum candidate coding cost among the Q candidate coding costs of each group of pixel blocks as the coding cost of each group of pixel blocks.
[0344] In some embodiments, the processing unit 702 is specifically configured to determine Q candidate coding costs for each group of pixel blocks based on each group of pixel blocks, Q scaling factors, and a rate-distortion optimization method.
[0345] In some embodiments, the processing unit 702 is specifically used to perform filter intensity adjustment processing on the reconstructed value of the coding region based on the target scaling factor to obtain the target reconstructed value of the coding region.
[0346] In some embodiments, the processing unit 702 is further configured to identify a target scaling factor in the video encoded bitstream.
[0347] Figure 14 is a block diagram of another communication device provided according to an embodiment of the present disclosure. As shown in Figure 14, the communication device 80 includes a receiving unit 801 and a processing unit 802.
[0348] The communication device 80 can be the decoding end or a chip in the decoding end. When the communication device 80 is used to implement the function of the decoding end in the above embodiments, each unit is specifically used to implement the following functions.
[0349] The receiving unit 801 is used to receive a video encoded bitstream, which includes at least one image and an identifier of the target scaling factor corresponding to the set of filter coefficients for each image.
[0350] The processing unit 802 is used to perform filter intensity adjustment processing on the reconstructed value of the image based on the target scaling factor to obtain the target reconstructed value of the image.
[0351] In some embodiments, the processing unit 802 is specifically configured to: obtain the reconstructed value of the coded region using the filter coefficient set in the image; and perform filter intensity adjustment processing on the reconstructed value of the coded region based on the target scaling factor to obtain the target reconstructed value of the coded region.
[0352] The units in Figures 11 to 14 can also be called modules. For example, a transmitting unit can be called a transmitting module. Furthermore, in the embodiments shown in Figures 11 to 14, the names of the units may not be those shown in the figures. For example, a receiving unit can also be called a communication unit, and an acquisition unit can also be called a communication unit.
[0353] If the units in Figures 11 to 14 are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this disclosure, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this disclosure. Storage media for storing computer software products include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0354] When any of the communication devices 50 to 80 described above implements the functions of the integrated module in hardware, a block diagram of another communication device is provided according to an embodiment of this disclosure. As shown in FIG15, the communication device 90 includes: a processor 902, a communication interface 903, and a bus 904. In some embodiments, the communication device 90 may further include a memory 901.
[0355] Processor 902 may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. Processor 902 may be a central processing unit, a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. Processor 902 may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a digital signal processor (DSP), and a microprocessor.
[0356] The communication interface 903 is used to connect to other devices via a communication network. This communication network can be Ethernet, wireless access network, wireless local area network (WLAN), etc.
[0357] The memory 901 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0358] In some embodiments, the memory 901 may exist independently of the processor 902. The memory 901 may be connected to the processor 902 via a bus 904 and may be used to store instructions or program code. When the processor 902 calls and executes the instructions or program code stored in the memory 901, it may implement the encoding or decoding methods provided in the embodiments of this disclosure.
[0359] In another possible implementation, the memory 901 can also be integrated with the processor 902.
[0360] Bus 904 can be an extended industry standard architecture (EISA) bus, etc. Bus 904 can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in Figure 15, but this does not mean that there is only one bus or one type of bus.
[0361] Through the above description of the implementation methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the encoding end or decoding end can be divided into different functional modules to complete all or part of the functions described above.
[0362] This disclosure also provides a computer-readable storage medium. All or part of the processes in the above method embodiments can be executed by computer instructions instructing related hardware. The program can be stored in the computer-readable storage medium, and when executed, it can include the processes of the above method embodiments. The computer-readable storage medium can also be an external storage device for the encoding or decoding end, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the encoding or decoding end. Further, the computer-readable storage medium can include both internal storage units of the encoding or decoding end and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the encoding or decoding end. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0363] This disclosure also provides a computer program product comprising a computer program that, when run on a computer, causes the computer to perform any of the encoding or decoding methods provided in the above embodiments.
[0364] Although this disclosure has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings, the disclosure, and the appended claims in carrying out the claimed disclosure. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce a good effect.
[0365] Although this disclosure has been described in conjunction with specific features and embodiments, it will be apparent that various modifications and combinations can be made therein without departing from the spirit and scope of this disclosure. Accordingly, this specification and drawings are merely exemplary illustrations of the disclosure as defined by the appended claims and are to be considered as covering any and all modifications, variations, combinations, or equivalents within the scope of this disclosure. It is obvious that those skilled in the art can make various alterations and modifications to this disclosure without departing from its spirit and scope. Thus, this disclosure is also intended to include any such modifications and modifications that fall within the scope of the claims of this disclosure and their equivalents.
[0366] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any changes or substitutions within the technical scope disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
An encoding method, wherein, The method includes: Obtain the reconstructed values of the image to be processed; Based on the set of filter coefficients corresponding to the image to be processed, the target classification method corresponding to the set of filter coefficients is determined from multiple classification methods; The target reconstruction value of the image to be processed is adjusted by filtering intensity based on the target classification method to obtain the target reconstruction value of the image to be processed. According to the method of claim 1, wherein, The step of determining the target classification method corresponding to the filter coefficient set from multiple classification methods based on the filter coefficient set corresponding to the image to be processed includes: Based on the set of filter coefficients corresponding to the image to be processed, the encoding cost of each of the multiple classification methods is determined; The target classification method is determined from the plurality of classification methods based on the encoding cost of each classification method. The method according to claim 2, wherein, The target classification method is the classification method with the lowest encoding cost among the multiple classification methods. The method according to claim 2 or 3, wherein, The step of determining the encoding cost of each of the multiple classification methods based on the filter coefficient set corresponding to the image to be processed includes: Obtain the encoded region of the filter coefficient set used in the image to be processed; For each of the multiple classification methods: classify the encoded region into pixel blocks based on the classification method to obtain M categories corresponding to the classification method; determine the encoding cost of the classification method based on the M categories corresponding to the classification method, where each category includes at least one pixel block in the encoded region, and M is an integer greater than 2. The method according to claim 4, wherein, The step of determining the encoding cost of the classification method based on the M categories corresponding to the classification method includes: The M categories corresponding to the classification method are grouped into N groups, each group including at least one of the categories, where N is a positive integer less than or equal to M; Based on the N groups corresponding to the classification method, the encoding cost of the classification method is determined. The method according to claim 5, wherein, The step of determining the encoding cost of the classification method based on the N groups corresponding to the classification method includes: For each of the N groups corresponding to the classification method: based on the group and the scaling factor set, determine the Q encoding costs of the group; determine the target encoding cost of the group from the Q encoding costs of the group; the scaling factor set includes Q scaling factors, and an encoding cost of the group is determined based on the group and a scaling factor in the scaling factor set, where Q is a positive integer; The minimum target encoding cost among the N target encoding costs corresponding to the N groups is determined as the encoding cost of the classification method. The method according to claim 6, wherein, The target coding cost of the group is the minimum coding cost among the Q coding costs of the group. The method according to claim 6 or 7, wherein, Each group includes at least one pixel block within the encoded region; determining the Q encoding costs of the group based on the group and the set of scaling factors includes: Obtain the first reconstructed value of the pixel block corresponding to the group; The first reconstructed value is filtered to obtain the second reconstructed value of the pixel block corresponding to the group; Based on the reconstructed residual value, the second reconstructed value, and the Q scaling factors, Q third reconstructed values are determined for the pixel blocks corresponding to the group; the reconstructed residual value is determined based on the first reconstructed value and the second reconstructed value, and one of the third reconstructed values is determined based on the reconstructed residual value, the second reconstructed value, and one of the Q scaling factors; Based on the Q third reconstruction values of the pixel blocks corresponding to the group and the rate-distortion optimization method, the Q coding costs of the group are determined, and one coding cost of the group corresponds to one of the third reconstruction values. The method according to any one of claims 1 to 8, wherein, The step of adjusting the filtering intensity of the reconstructed value of the image to be processed based on the target classification method to obtain the target reconstructed value of the image to be processed includes: Obtain the reconstructed values of the encoded regions using the filter coefficient set in the image to be processed; Based on the target classification method, the reconstructed value of the coding region is subjected to filter intensity adjustment processing to obtain the target reconstructed value of the coding region. The method according to any one of claims 1 to 9, wherein, The step of determining the target classification method corresponding to the filter coefficient set from multiple classification methods based on the filter coefficient set corresponding to the image to be processed includes: In response to the fact that the number of filters in the set of filter coefficients corresponding to the image to be processed is less than a preset threshold, the target classification method is determined from the multiple classification methods based on the set of filter coefficients corresponding to the image to be processed. The method according to any one of claims 1 to 10, wherein, The step of adjusting the filtering intensity of the reconstructed value of the image to be processed based on the target classification method to obtain the target reconstructed value of the image to be processed includes: Determine a first encoding cost for performing filter intensity adjustment processing on the reconstructed values of the image to be processed based on the target classification method, and a second encoding cost for not performing filter intensity adjustment processing on the reconstructed values of the image to be processed based on the target classification method; In response to the first encoding cost being less than the second encoding cost, the reconstructed value of the image to be processed is subjected to filter intensity adjustment processing based on the target classification method to obtain the target reconstructed value of the image to be processed. The method according to any one of claims 1 to 11, wherein, The classification method includes at least one of the following: Classification based on Laplace gradient; Classification methods based on sample residuals; Classification method based on sideband information; Classification methods based on coded information; Classification based on region division. The method according to any one of claims 1 to 12, wherein, The method further includes: The target classification method is identified in the video encoding bitstream. A decoding method, wherein, The method includes: Receive a video encoded stream, the video encoded stream including at least one image and an identifier of a target classification method corresponding to each image; the target classification method is determined from multiple classification methods; Based on the target classification method corresponding to the image, the reconstructed value of the image is subjected to filter intensity adjustment processing to obtain the target reconstruction value of the image. The target classification method corresponding to the image is determined based on the identifier of the target classification method corresponding to the image. The method according to claim 14, wherein, The step of adjusting the filtering intensity of the reconstructed value of the image based on the target classification method corresponding to the image to obtain the target reconstructed value of the image includes: Obtain the set of filter coefficients corresponding to the image; Based on the target classification method, the coded region of the image using the filter coefficient set is classified into pixel blocks to obtain M categories. Each category includes at least one pixel block in the coded region, where M is an integer greater than 2. Determine the N groups corresponding to the M categories, and the target scaling factor corresponding to each of the N groups; N is a positive integer less than or equal to M; Based on the target scaling factors corresponding to each of the N groups, the reconstructed values of the pixel blocks corresponding to each of the N groups are subjected to filter intensity adjustment processing to obtain the target reconstructed values of the coded region. An encoding method, wherein, The method includes: Obtain the reconstructed values of the image to be processed; The image to be processed is divided into pixel blocks using the encoding region of the filter coefficient set corresponding to the image to be processed, resulting in W groups of pixel blocks. Each group of pixel blocks is obtained based on the filter information of the filter coefficient set, where W is an integer greater than 2. Based on the W groups of pixel blocks and the scaling factor set, determine the encoding cost corresponding to each of the W groups of pixel blocks; Based on the target scaling factor corresponding to the target coding cost in the coding cost of each of the W groups of pixel blocks, the reconstructed value of the image to be processed is subjected to filtering intensity adjustment processing to obtain the target reconstructed value of the image to be processed. The method according to claim 16, wherein, The target encoding cost is the minimum encoding cost among the encoding costs corresponding to each of the W groups of pixel blocks. The method according to claim 16 or 17, wherein, The W group of pixel blocks is obtained by fusing various types of pixel blocks in the coding region based on the fusion category corresponding to the filter coefficient set, and the filter information includes the fusion category corresponding to the filter coefficient set. The method according to claim 18, wherein, The step of grouping the encoded region of the image to be processed using the filter coefficient set corresponding to the image to be processed into W groups of pixel blocks includes: The encoded region is classified into pixel blocks to obtain K categories of pixel blocks, where K is an integer greater than or equal to W; Based on the fusion category, the pixel blocks of the K categories are grouped into W groups of pixel blocks. The method according to any one of claims 16 to 19, wherein, The scaling factor set includes Q scaling factors, where Q is a positive integer; the encoding cost corresponding to each of the W groups of pixel blocks is determined based on the W groups of pixel blocks and the scaling factor set. For each of the W groups of pixel blocks, Q candidate coding costs are determined based on each group of pixel blocks and the Q scaling factors, where each candidate coding cost is determined based on each group of pixel blocks and a scaling factor. The minimum candidate coding cost among the Q candidate coding costs of each group of pixels is determined as the coding cost of each group of pixels. The method according to claim 20, wherein, The step of determining the Q candidate encoding costs for each group of pixel blocks based on each group of pixel blocks and the Q scaling factors includes: Based on each group of pixel blocks, the Q scaling factors, and the rate-distortion optimization method, Q candidate coding costs for each group of pixel blocks are determined. The method according to any one of claims 16 to 21, wherein, The reconstructed value of the image to be processed includes the reconstructed value of the coded region; the step of adjusting the filtering intensity of the reconstructed value of the image to be processed based on the target scaling factor corresponding to the target coding cost in the coding cost corresponding to each of the W groups of pixel blocks to obtain the target reconstructed value of the image to be processed includes: The target reconstruction value of the encoded region is obtained by adjusting the filtering intensity based on the target scaling factor. The method according to any one of claims 16 to 22, wherein, The method further includes: The target scaling factor is identified in the video encoded bitstream. A decoding method, wherein, The method includes: Receive a video encoded bitstream, the video encoded bitstream including at least one image and an identifier of the target scaling factor corresponding to the filter coefficient set corresponding to each image; The target reconstructed value of the image is obtained by adjusting the filtering intensity based on the target scaling factor. The method according to claim 24, wherein, The step of adjusting the filtering intensity of the reconstructed image value based on the target scaling factor to obtain the target reconstructed image value includes: Obtain the reconstructed values of the encoded regions in the image using the set of filter coefficients; The target reconstruction value of the encoded region is obtained by adjusting the filtering intensity based on the target scaling factor. A communication device, wherein, include: Memory and processor; Memory and processor are coupled; The memory is used to store instructions that can be executed by the processor; When the processor executes the instructions, it performs the method as described in any one of claims 1 to 25. A computer-readable storage medium, wherein, The computer-readable storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 25, wherein the computer-readable storage medium includes a non-transitory computer-readable storage medium. A computer program product, wherein, The computer program product includes computer instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 25.