Data processing method and apparatus, and device
By determining the classification mode information in the video data in the video coding technology, including the extended co-located brightness reconstruction pixels of the color component pixels and the target classification mode, the problem of low category accuracy caused by the fixed position of the co-located brightness components in the existing technology is solved and improves improves the encoding performance of video data.
Patent Information
- Application Number
- PCT/CN2023/091040
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-07-19
- Filing Date
- 2023-04-27
- Publication Date
- 2024-09-12
AI Technical Summary
In existing video coding technology, the position of the co-located luminance components used in classification is fixed, resulting in low category accuracy and affecting the overall coding performance of video data.
By determining the classification mode information of the block to be encoded or the block to be decoded in the video data, including the extended in-situ brightness reconstruction pixels of the color component pixels and the target classification mode, the boundary category of the color component pixel is determined based on this information, and compensation is performed based on the boundary category , improve the encoding and decoding performance of video data.
Improved boundary compensation category accuracy for color component pixels, improving overall encoding and decoding performance of video data.
Smart Images

Figure CN2023091040_12092024_PF_FP_ABST
Abstract
Description
Data processing method, device, and equipment
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on July 19, 2022, with application number 2022108492507 and application name “Data processing method, device, and equipment”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of data processing technology, and in particular to video coding technology. Background Art
[0003] In order to transmit video data, it is usually necessary to encode and compress the video data. The compressed video data can be called a video stream. The video stream is transmitted to the user end via a wired or wireless network and then decoded and viewed. The entire video encoding process can include block division, prediction, transformation, quantization, encoding and other processes. In the video encoding stage, after the entire frame image is reconstructed, the pixel values in the reconstructed image can be filtered and compensated to adjust the pixel values in the reconstructed image and further improve the image quality. However, in the current video encoding compensation method, the position of the co-located luminance component used in classification is fixed, which will cause the final category accuracy to be too low, thereby affecting the overall encoding performance of the video data.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide a data processing method, apparatus, and device that can improve the category accuracy of boundary compensation corresponding to color component pixels, thereby improving the overall encoding performance of video data.
[0006] In one aspect, an embodiment of the present application provides a data processing method, which is executed by a computer device and includes:
[0007] Determining classification mode information corresponding to a block to be encoded in video data; the classification mode information includes extended co-located luminance reconstructed pixels corresponding to color component pixels in the block to be encoded and a target classification mode; the extended co-located luminance reconstructed pixels belonging to a target region centered around true co-located luminance reconstructed pixels of the color component pixels;
[0008] Determine the boundary category corresponding to the color component pixel based on the extended co-located brightness reconstructed pixel and the target classification mode;
[0009] The reconstructed pixels of the color component pixels are compensated based on the boundary category to obtain compensated reconstructed pixels, and the encoding process is performed on the block to be encoded based on the compensated reconstructed pixels.
[0010] In one aspect, an embodiment of the present application provides a data processing method, which is executed by a computer device and includes:
[0011] Decoding a block to be decoded in video data to obtain classification mode information corresponding to the block to be decoded; the classification mode information includes extended co-located luminance reconstructed pixels corresponding to color component pixels in the block to be decoded and a target classification mode; the extended co-located luminance reconstructed pixels belong to a target area centered on a true co-located luminance reconstructed pixel of the color component pixel;
[0012] Determine the boundary category corresponding to the color component pixel based on the extended co-located brightness reconstructed pixel and the target classification mode;
[0013] The color component pixels in the block to be decoded are reconstructed according to the compensation values corresponding to the boundary categories.
[0014] In one aspect, an embodiment of the present application provides a data processing device, including:
[0015] a classification mode information determination module configured to determine classification mode information corresponding to a block to be encoded in video data; the classification mode information comprising extended co-located luminance reconstructed pixels corresponding to color component pixels in the block to be encoded and a target classification mode; the extended co-located luminance reconstructed pixels belonging to a target region centered around actual co-located luminance reconstructed pixels of the color component pixels;
[0016] A first category determination module is used to determine the boundary category corresponding to the color component pixel based on the extended co-located brightness reconstructed pixel and the target classification mode;
[0017] The coding processing module is used to compensate the reconstructed pixels of the color component pixels based on the boundary category to obtain the compensated reconstructed pixels, and perform coding processing on the block to be coded based on the compensated reconstructed pixels.
[0018] In one aspect, an embodiment of the present application provides a data processing device, including:
[0019] a decoding processing module for decoding a block to be decoded in the video data to obtain classification mode information corresponding to the block to be decoded; the classification mode information includes extended co-located luminance reconstructed pixels corresponding to color component pixels in the block to be decoded and a target classification mode; the extended co-located luminance reconstructed pixels belong to a target area centered on the actual co-located luminance reconstructed pixels of the color component pixels;
[0020] A second category determination module is used to determine the boundary category corresponding to the color component pixel based on the extended co-located brightness reconstructed pixel and the target classification mode;
[0021] The pixel reconstruction module is used to reconstruct the color component pixels in the block to be decoded according to the compensation value corresponding to the boundary category.
[0022] In one aspect, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory is connected to the processor, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method provided in the above aspect of the embodiment of the present application.
[0023] On one hand, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program is suitable for being loaded and executed by a processor, so that a computer device with a processor executes the method provided in the above aspect of the embodiment of the present application.
[0024] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method provided in the above aspect.
[0025] In an embodiment of the present application, when encoding video data, classification mode information corresponding to a block to be encoded in the video data can be determined; the classification mode information includes extended co-located luminance reconstruction pixels and a target classification mode corresponding to the color component pixels in the block to be encoded; the extended co-located luminance reconstruction pixels belong to a target area centered on the true co-located luminance reconstruction pixels of the color component pixels. Then, the boundary category corresponding to the color component pixels can be determined based on the extended co-located luminance reconstruction pixels and the target classification mode; the reconstructed pixels of the color component pixels are compensated based on the boundary category to obtain compensated reconstructed pixels, and the block to be encoded is encoded based on the compensated reconstructed pixels. It can be seen that in the encoding stage of video data, extended co-located luminance reconstruction pixels can be introduced for boundary classification, thereby improving the category accuracy of the boundary compensation corresponding to the color component pixels, thereby improving the overall encoding performance of the video data. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] FIG1 is a schematic diagram of the structure of a coding framework provided in an embodiment of the present application;
[0027] FIG2 is a schematic diagram of a loop filtering process provided by an embodiment of the present application;
[0028] FIG3 is a schematic diagram of a basic flow chart of adaptive compensation across component samples provided by an embodiment of the present application;
[0029] FIG4 is a schematic diagram of the positions of type-classified samples in cross-component sample adaptive compensation provided by an embodiment of the present application;
[0030] FIG5 is a schematic diagram of a classification mode of boundary types in cross-component sample adaptive compensation provided by an embodiment of the present application;
[0031] FIG6 is a schematic diagram of a framework of cross-component adaptive loop filtering provided by an embodiment of the present application;
[0032] FIG7 is a schematic diagram of a shape of a cross-component adaptive loop filter provided by an embodiment of the present application;
[0033] FIG8 is a schematic diagram of the structure of a data processing system provided in an embodiment of the present application;
[0034] FIG9 is a flow chart of a data processing method provided in an embodiment of the present application;
[0035] FIG10 is a schematic diagram of a selection area for expanding co-located brightness reconstruction pixels provided by an embodiment of the present application;
[0036] FIG11 is a schematic diagram of an extended classification mode provided in an embodiment of the present application;
[0037] FIG12 is a schematic diagram of an expanded coverage range of a co-located brightness reconstruction pixel pattern provided by an embodiment of the present application;
[0038] FIG13 is a schematic diagram of the positions of extended co-located brightness reconstruction pixels and their corresponding classification modes provided by an embodiment of the present application;
[0039] FIG14 is a schematic diagram of using a coverage range to fill an unavailable area of an extended co-located brightness reconstruction pixel according to an embodiment of the present application;
[0040] FIG15 is a flow chart of another data processing method provided in an embodiment of the present application;
[0041] FIG16 is a schematic structural diagram of a data processing device provided in an embodiment of the present application;
[0042] FIG17 is a schematic structural diagram of another data processing device provided in an embodiment of the present application;
[0043] FIG18 is a schematic structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0045] In order to more clearly understand the technical solutions provided by the embodiments of the present application, the basic concepts involved in the embodiments of the present application are first introduced here:
[0046] Video coding: Video coding refers to the process of encoding the pixels in the image frame of video data to obtain a coded bit stream (also called a video code stream). It can also refer to the process of converting a file in a certain video format into a file in another video format through a specific compression technology. The embodiment of the present application is a technical solution proposed on the basis of the Enhanced Compression Model (ECM) in the current video coding technology. ECM improves the loop filtering part of Versatile Video Coding (VVC), that is, in addition to continuing to use the existing loop filters in VVC, it also introduces a variety of additional loop filters. The following describes the coding framework of ECM and the loop filtering process of ECM.
[0047] Please refer to Figure 1, which is a structural diagram of a coding framework provided by an embodiment of the present application. The coding framework shown in Figure 1 is a block-based hybrid coding framework, in which the entire image frame in the video data (for example, image frame 10a) can be divided into multiple blocks (for example, it can be a coding tree block (CTB) or a coding tree unit (CTU)), and the coding processes such as prediction, transformation, quantization, loop filtering, and entropy coding are performed in units of blocks, and each block has its own corresponding coding parameters.
[0048] Prediction can mean not directly encoding the current signal (i.e., the object to be encoded, such as the image frame, block, pixel, etc.), but instead using one or more previous signals to predict the current signal. The difference between the actual value and the predicted value is then encoded to achieve the encoding purpose. Prediction can include intra prediction and inter prediction.
[0049] Intra-frame prediction refers to predicting the pixel values in the current block to be encoded based on the adjacent pixels that have been encoded, so as to effectively remove spatial redundancy in video data.
[0050] Inter-frame prediction utilizes the temporal correlation of video data and uses the pixels of adjacent encoded image frames to predict the pixels of the current image frame to be encoded, thereby removing temporal redundancy in the video data. The inter-frame prediction process mainly involves motion estimation and motion compensation. Motion estimation refers to finding the best matching reference block of the current block to be encoded in the reference image frame (the encoded image frame), and using a motion vector to represent the positional relationship between the best matching reference block and the current block to be encoded (any block in the image frame to be encoded that needs to be encoded, that is, a block that has not yet been encoded). Motion compensation refers to encoding and transmitting the difference between the best matching reference block and the current block to be encoded.
[0051] Transformation refers to performing an orthogonal transform on the image frame to be encoded in the video data to remove the correlation between spatial pixels. The orthogonal transform concentrates the energy originally distributed on each pixel on a few low-frequency coefficients in the frequency domain, which represent most of the image information. This characteristic of the frequency coefficient is conducive to the use of quantization methods based on the human visual system (HVS). Among them, the transformation methods may include but are not limited to: KL transform (Karhunen-Loeve transform), discrete cosine transform (DCT), and discrete wavelet transform (DWT).
[0052] Quantization is the process of reducing the precision of video data representation. Quantization reduces the amount of data required for encoding and is a lossy compression technique. Quantization can be performed using vector quantization (VQ) or scalar quantization (SQ). Vector quantization jointly quantizes a group of data, while scalar quantization quantizes each input data point independently.
[0053] Loop filtering can remove or reduce various types of coding distortion generated during the block-based encoding process, such as blocking effects caused by discontinuous boundaries between blocks, ringing effects, and excessive smoothing of image content texture or boundaries. Specifically, since the quantization process after the image frame to be encoded is a lossy process, it will cause information loss in the video data. There is a certain error between the block restored after inverse quantization (InvQuantization) and inverse transformation (InvTransform) (which can be called a reconstructed block) and the original block, which may cause the final restored image frame (reconstructed image frame) to appear blocky. The blocked image frame has a great impact on the prediction of subsequent image frames. Therefore, loop filtering can be used for deblocking.
[0054] The decoded picture buffer is used to store all reconstructed image frames in the encoding stage.
[0055] Entropy coding uses the entropy of the source information to perform bitrate compression, removing any statistically redundant information that remains after prediction and transformation. Entropy coding can improve video compression ratios and is lossless, so the compressed video data can be reconstructed without distortion at the decoder. Common entropy coding methods include, but are not limited to, variable-length coding and context-adaptive binary arithmetic coding (CABAC). Here:
[0056] Variable-length coding uses codewords of varying lengths to represent the difference (i.e., the difference between the reconstructed pixel value after loop filtering and the original pixel value in the block to be coded, where the original pixel value is any pixel value in the block to be coded) or coefficient to be coded. The code length is designed based on the probability of symbol occurrence. For example, short codewords are assigned to residuals or coefficients with a high probability of occurrence, while long codewords are assigned to those with a low probability of occurrence. Commonly used methods include exponential Golomb coding and arithmetic coding.
[0057] CABAC can include the following steps:
[0058] ① Binarization: CABAC uses binary arithmetic coding, which means that only two numbers (1 or 0) are encoded. A non-binary numerical symbol, such as a transform coefficient or motion vector, is first binarized or converted into a binary codeword before arithmetic coding. This process is similar to converting a numerical value into a variable-length codeword, but the binary codeword is further encoded by the arithmetic encoder before transmission.
[0059] ②Context model selection: The context model is a probabilistic model that is selected based on the statistics of the recently encoded data symbols. This model stores the probability of each "bin" being 1 or 0.
[0060] ③Arithmetic coding: The arithmetic encoder encodes each "bin" according to the selected probability model.
[0061] ④Probability update: The selected context model will be updated according to the actual encoding value. For example, if the value of "bin" is 1, the frequency count of 1 will increase.
[0062] In order to more clearly understand the loop filtering process in the coding framework shown in FIG1 , the loop filtering process is described in detail below with reference to FIG2 .
[0063] Please refer to Figure 2, which is a schematic diagram of a loop filtering process provided by an embodiment of the present application. As shown in Figure 2, the loop filtering process may include luma mapping with chroma scaling (LMCS), deblocking filter (DBF), bilateral filter (BIF), bilateral filter on chroma (BIF-Chroma), sample adaptive offset (SAO), cross-component sample adaptive offset (CCSAO), adaptive loop filtering (ALF), cross-component adaptive loop filtering (CC-ALF) and other modules. Among them, bilateral band filtering, chroma component bilateral band filtering, sample adaptive compensation, cross-component sample adaptive compensation are operated in parallel, and the compensation values (correction values) generated can be added to the reconstructed pixels after deblocking filtering at the same time. Among them:
[0064] (1) Luma-mapped Chroma Scaling (LMCS): LMCS does not target a specific type of coding distortion, but rather improves coding efficiency by using a better sample value range.
[0065] (2) Deblocking Filter (DBF): DBF is used to reduce the distortion caused by the encoding process, specifically to alleviate the discontinuity between block boundaries caused by block-based operations.
[0066] (3) Double-side band filtering (BIF): BIF is a nonlinear filtering method that is a compromise between the spatial proximity of the image frame and the similarity of pixel values, while taking into account the spatial information and grayscale similarity of the reconstructed pixels to be filtered, so as to achieve the purpose of preserving the boundaries between blocks and removing noise. Among them, the reconstructed pixels in the embodiment of the present application refer to the results of reconstructing the pixels in the encoding block to be encoded in the encoding stage. The reconstructed pixels may include luminance reconstructed pixels (for example, Y component pixels) and chrominance reconstructed pixels (for example, U component pixels, V component pixels). Here, Y, U, and V refer to the three color components in the YUV color space. Of course, in addition to the YUV color space, the embodiment of the present application may also use other color spaces, such as the YCbCr color space (Y refers to the luminance component, Cb refers to the blue chrominance component, and Cr refers to the red chrominance component). The embodiment of the present application does not limit the color space actually used.
[0067] (4) Double-sideband filtering of chrominance components (BIF-Chroma): The main difference between BIF-Chroma and the aforementioned BIF is that BIF performs double-sideband filtering on all three color components of the reconstructed pixel, while BIF-Chroma only performs double-sideband filtering on the chrominance reconstructed pixel (i.e., the reconstructed value of the reconstructed pixel on the chrominance component).
[0068] (5) Sample Adaptive Offset (SAO): SAO adaptively compensates an offset value for each pixel sample to reduce the difference from the original pixel in the block to be encoded due to the quantization operation. Specifically, the input reconstructed pixels can be divided into different categories, a corresponding offset value (offset) is generated for each category, and the offset value is added to the reconstructed pixels belonging to the corresponding category, thereby reducing the difference between the reconstructed pixels and the original pixels. Among them, during SAO classification, only the reconstruction value of the current color component to be processed is used for classification. For example, when the reconstruction value of the input reconstructed pixel on the chrominance component (chrominance reconstructed pixel) is input, SAO only classifies the input chrominance reconstructed pixel.
[0069] (6) Cross-Component Sample Adaptive Offset (CCSAO): CCSAO is similar to SAO. It can also reduce the difference between the reconstructed pixels and the original pixels by classifying the input reconstructed pixels into different categories, generating corresponding compensation values for each category, and adding the compensation values to the reconstructed pixels belonging to the corresponding category. It should be noted that CCSAO can use the reconstructed values of all three color components of the reconstructed pixel to classify any color component to be processed. For example, when CCSAO inputs a chroma reconstructed pixel, it can use all the chroma reconstructed pixels and the luminance reconstructed pixels of the same pixel for classification.
[0070] Please refer to Figure 3, which is a schematic diagram of a basic process flow for adaptive compensation of cross-component samples provided by an embodiment of the present application. As shown in Figure 3, the reconstructed pixels after deblocking filtering (DBF) can include pixel values on three color components. Here, taking the three color components in the YUV color space as an example, the pixel values on the three color components can include luminance reconstructed pixels (Y component pixels) and chrominance reconstructed pixels (U component pixels, V component pixels).
[0071] Among them, after the Y component pixel passing through DBF is input into SAO, the Y component pixel passing through DBF can be sample-adaptively compensated to obtain a compensation value 1 corresponding to the Y component pixel; at the same time, the Y component pixel passing through DBF can also be input into CCSAO, and the Y component pixel passing through DBF can be cross-component sample-adaptively compensated to obtain a compensation value 2 corresponding to the Y component pixel; furthermore, the compensation value 1 output by SAO and the compensation value 2 output by CCSAO can be added to the Y component pixel passing through DBF to obtain the compensated Y component pixel.
[0072] It should be noted that for ease of understanding, the embodiments of this application only use SAO and CCSAO as examples for description. In actual applications, the compensated Y component pixels can also be added with the compensation values of BIF and BIF-Chroma. That is, the Y component pixels after deblocking effect filtering can be input into BIF and BIF-Chroma in sequence to obtain their corresponding compensation values. Similarly, the U component pixels and V component pixels after DBF can perform the same operations as the aforementioned Y component pixels to obtain compensated U component pixels and compensated V component pixels, which will not be further described here.
[0073] It is understood that CCSAO can include two types of compensation: band compensation (BO) and edge compensation (EO).
[0074] ①BO type in CCSAO:
[0075] For BO type, CCSAO can be directly classified according to the pixel value of the reconstructed pixel. Specifically, for any luminance or chrominance reconstructed pixel, the corresponding three color components' reconstructed pixels {co-located Y pixel, co-located U pixel, co-located V pixel} can be used for classification at the same time. Here, the co-located Y pixel, co-located U pixel, and co-located V pixel can be understood as the reconstructed pixels at the three color components where the input reconstructed pixel is located. The above three reconstructed pixels for classification are first divided into their respective band categories {bandY, bandU, bandV}, and then a joint category index is generated according to the band categories of the three color components as the BO category of the currently input reconstructed pixel.
[0076] For each BO category, a compensation value can be generated and then added to the reconstructed pixel of the aforementioned input. The processing process of the CCSAO BO can be shown as the following formula (1): Y =(Y col ·N Y )>>BD band U =(U col ·N U )>>BD band V =(V col ·N V )>>BD (1) i=band Y ·(N U ·N V )+band U ·N V +band V C′ rec =Clip1(C rec +σ CCSAO [i])
[0077] Among them, {Y col , U col , V col} represent the same-position reconstructed pixels of the three color components used for classification, Y col Represents the same-position reconstructed pixel on the luminance component, U col , Vcol Represents the same-position reconstructed pixel on the chrominance component; {N Y , N U , N V} represents the total number of band categories when the three color components are divided into bands, BD represents the pixel value bit depth, i represents the category index generated by the three color components, and also refers to the BO category of the currently input reconstructed pixel; C rec and C′ rec Represent the reconstructed pixels before and after CCSAO respectively; σ CCSAO [i] represents the compensation value corresponding to band category i.
[0078] For the co-located reconstructed pixels of the three color components used for classification, the co-located chrominance reconstructed pixels (U col , V col ) is the real co-located chrominance reconstruction pixel (also called co-located chrominance component); co-located luminance reconstruction pixel (Y col ) can be selected from a 3*3 area centered on the true co-located brightness reconstructed pixel as shown in FIG4 .
[0079] FIG4 is a schematic diagram illustrating the locations of type-classified samples in a method for adaptive compensation of cross-component samples provided by an embodiment of the present application. As shown in FIG4 , region 20d represents the true co-located luminance reconstructed pixel at position 4 (i.e., the true co-located Y pixel), region 20a represents a 3*3 target region centered on the true co-located luminance reconstructed pixel, and regions 20b and 20c both represent co-located chrominance reconstructed pixels at position 4, with region 20b representing the co-located U pixel and region 20c representing the co-located V pixel.
[0080] For the CCSAO BO type, the corresponding parameters, namely the position of the co-located luminance reconstructed pixel, the total number of band categories corresponding to the three color components, and the compensation value for each BO category, need to be determined through the rate-distortion optimization (RDO) process and transmitted to the decoder. Specifically, for any possible co-located luminance reconstructed pixel position in the area 20a shown in FIG4 , rate-distortion optimization can be performed to obtain the rate-distortion loss of each possible co-located luminance reconstructed pixel position. The co-located luminance reconstructed pixel position with the minimum rate-distortion loss is used as the final co-located luminance reconstructed pixel position transmitted to the decoder.
[0081] ②EO types in CCSAO:
[0082] Similar to sample adaptive compensation (SAO), CCSAO can also use a boundary-based classification method. The current CCSAO can support four different boundary compensation (EO) classification modes. Please refer to Figure 5, which is a schematic diagram of a classification mode of boundary types in cross-component sample adaptive compensation provided by an embodiment of the present application. As shown in Figure 5, the four different boundary compensation (EO) classification modes in CCSAO are the horizontal classification mode shown in area 30a, the vertical classification mode shown in area 30b, the diagonal classification mode shown in area 30c, and the anti-diagonal classification mode shown in area 30d; for each EO classification mode, any input luminance reconstruction pixel or chrominance reconstruction pixel first needs to calculate the difference between its corresponding co-located luminance reconstruction pixel (position c as shown in Figure 5) and the adjacent pixel (position a and position b as shown in Figure 5), and by comparing the difference with a predefined threshold (Th), the EO category of the current reconstructed pixel to be processed is obtained. It can be understood that each classification mode specifies the positional relationship between the co-located brightness reconstructed pixel and two adjacent pixels (a and b), and the two adjacent pixels are used to calculate the difference between the co-located brightness reconstructed pixel and the two adjacent pixels.
[0083] Among them, different from SAO, when CCSAO EO classification is used, for the reconstruction values of different input color components, only the corresponding real co-located brightness reconstructed pixels are used for classification; the processing process of this CCSAO EO can be shown as the following formula (2): Ea=(ac<0)?(ac<(-Th)?0:1):(ac<(Th)?2:3) Eb=(bc<0)?(bc<(-Th)?0:1):(bc<(Th)?2:3) (2) class idx =i B *16+Ea*4+Eb C′ rec =Clip1(C rec +σ CCSAO [class idx ])
[0084] Wherein, "?:" is a conditional statement, such as (expression 1)? (expression 2): (expression 3) means that if expression 1 is true, the value of the entire conditional expression is the value of expression 2, and if expression 1 is false, the value of the entire conditional expression is the value of expression 3. Ea represents the difference between position a (adjacent pixel) and position c (co-located luminance reconstruction pixel) shown in Figure 5 (for ease of understanding, the difference here can be referred to as the first difference), and Eb represents the difference between position b and position c shown in Figure 5 (for ease of understanding, the difference here can be referred to as the second difference); i B Indicates the band category used in the EO type, class idx Refers to the EO category of the currently input reconstructed pixel, that is, the EO category of CCSAO is jointly generated by the boundary-based category and the band category, σ CCSAO [class idx ] indicates the boundary type class idx The corresponding compensation value. B The calculation process can be shown as the following formula (3):
[0085] i B =(cur·N cur )>>BD, or
[0086] i B =(col1·N col1 )>>BD, or (3) i B =(col2·N col2 )>>BD
[0087] Wherein, "cur" represents the currently input color component reconstructed pixel to be processed, and "col1" and "col2" represent the co-located reconstructed pixels on the other two color components, respectively. If the currently input color component reconstructed pixel to be processed is a luminance reconstructed pixel, then "col1" and "col2" are the reconstructed values of the co-located reconstructed pixels on the U component and V component, respectively. If the currently input color component reconstructed pixel to be processed is a co-located reconstructed pixel on the U component, then "col1" and "col2" are the reconstructed values of the co-located reconstructed pixels on the Y component and V component, respectively.
[0088] For the CCSAO EO type, the encoder needs to select the optimal classification mode from the four classification modes shown in Figure 5 through rate-distortion optimization (RDO). The optimal threshold Th is selected from a series of predefined candidate thresholds, and the corresponding index is transmitted to the decoder. The encoder also needs to select the reconstruction value used to generate the reconstructed pixel with classification from "cur", "col1", and "col2" through RDO, and transmit it to the decoder. In other words, for the four classification modes shown in Figure 5, rate-distortion optimization can be performed on them to obtain the rate-distortion loss corresponding to each classification mode, and the classification mode with the smallest rate-distortion loss is used as the optimal classification mode to be finally transmitted to the decoder; for "cur", "col1", and "col2" in formula (3), rate-distortion optimization can also be performed separately, and the color component with the smallest rate-distortion loss is used as the reconstruction value used to generate the reconstructed pixel with classification and transmitted to the decoder.
[0089] For video data that needs to be encoded, different video contents can use different CCSAO classifiers, and different positions in an image can also use different classifiers. The type and parameters of each classifier need to be explicitly transmitted to the decoding end at the slice level. At the coding tree unit (CTU) level, it is necessary to indicate whether the current CTU uses CCSAO. If CCSAO is used, the selection of the corresponding classifier needs to be further indicated. CCSAO supports up to 4 groups of different classifiers per frame. It should be noted that if, for a certain coding tree unit, the rate-distortion loss of not using CCSAO is less than the rate-distortion loss of using CCSAO, it can be determined not to use CCSAO for this coding tree unit; if the rate-distortion loss of not using CCSAO is greater than the rate-distortion loss of using CCSAO, it can be determined to use CCSAO for this coding tree unit, and further perform classifier selection.
[0090] (7) Adaptive Loop Filter (ALF): ALF is a Wiener filter that adaptively determines the filter coefficients based on the content of different video components, thereby reducing the mean square error (MSE) between the reconstructed color components and the original color components. As an adaptive filter, the Wiener filter can generate different filter coefficients for video content with different characteristics. Therefore, the ALF first needs to classify the video content and use the corresponding filter for each category of video content. The input of the ALF is the reconstructed pixel value after DBF and BIF, BIF-Chroma, SAO, and CCSAO filtering, and the output is the enhanced reconstructed luminance image and reconstructed chrominance image. The ALF of the luminance reconstruction pixel can support 25 different types of filters, and the ALF of each chrominance reconstruction pixel can support up to 8 different types of filters.
[0091] For luminance reconstruction pixels, ALF will adaptively use different filters at the sub-block level (for example, the sub-block level can be a 4*4 luminance block), that is, each 4*4 pixel block needs to be divided into one of 25 categories. The classification index C of the luminance pixel block is composed of the directional feature D (Directionality) of the pixel block and the quantized activity feature (Activity); wherein the classification index C can be expressed as the following formula (4):
[0092] Among them, to calculate the directional feature D and the quantified activity feature First, the horizontal, vertical, diagonal, and anti-diagonal gradient values of each pixel in the 4*4 pixel block can be calculated, as shown in the following formulas (5) to (8): k,l =|2R(k,l)-R(k-1,l)-R(k+1,l)| (5) V k,l =|2R(k,l)-R(k,l-1)-R(k,l+1)| (6) D0 k,l =|2R(k,l)-R(k-1,l-1)-R(k+1,l+1)| (7) D1 k,l =|2R(k,l)-R(k-1,l+1)-R(k+1,l-1)| (8)
[0093] Among them, H in formula (5) k,l Represents the horizontal pixel gradient value at position (k, l), V in formula (6) k,l Represents the vertical pixel gradient value at the (k, l) position, D0 in formula (7) k,lRepresents the diagonal pixel gradient value at position (k, l), D1 in formula (8) k,l Represents the anti-diagonal pixel gradient value at position (k, l); R(k, l) represents the reconstructed pixel value at position (k, l) before ALF filtering.
[0094] Based on the pixel gradient values shown in formulas (5) to (8), the overall horizontal, vertical, diagonal, and anti-diagonal gradients of each 4*4 pixel block are calculated as shown in the following formulas (9) and (10):
[0095] Among them, i and j represent the coordinates of the upper left corner pixel in the 4*4 pixel block, g h Indicates the overall horizontal pixel gradient value corresponding to the 4*4 pixel block, g v Indicates the overall vertical pixel gradient value corresponding to the 4*4 pixel block, g d0 Indicates the overall diagonal pixel gradient value corresponding to the 4*4 pixel block, g d1 Indicates the overall anti-diagonal pixel gradient value corresponding to the 4*4 pixel block.
[0096] Furthermore, after obtaining the pixel gradient value of the pixel block, the maximum value of the horizontal pixel gradient value and the vertical pixel gradient value of each pixel block can be recorded as The minimum value can be recorded as The maximum value of the diagonal pixel gradient value and the anti-diagonal pixel gradient value of each pixel block can be recorded as The minimum value can be recorded as
[0097] The directional feature D can be obtained by taking the maximum value of the horizontal pixel gradient value and the vertical pixel gradient value as Minimum And the maximum value of the diagonal pixel gradient value and the anti-diagonal pixel gradient value Minimum The derivation steps can be as follows:
[0098] Step 1: If and If both are true, the directional characteristic D is set to 0; wherein t1 can be expressed as a preset parameter.
[0099] Step 2: If Then go to step 3, otherwise go to step 4.
[0100] Step 3: If Then the directional feature D is set to 2, otherwise the directional feature D is set to 1.
[0101] Step 4: If Then the directional feature D is set to 4, otherwise the directional feature D is set to 3.
[0102] Among them, t1 and t2 are parameters pre-set based on actual needs, and this application does not limit them.
[0103] Quantitative activity characteristics Before quantization, it can be recorded as activity feature A, which is calculated by the following formula (11):
[0104] Among them, the activity feature A can be quantized to the interval [0-4] to obtain the quantized activity feature
[0105] It should be noted that before filtering each 4*4 luminance block (including a block composed of luminance reconstructed pixels of each pixel in the aforementioned pixel block), the filter coefficients and the corresponding clipping values may be geometrically transformed according to the pixel gradient value of the current luminance block according to the rules of Table 1. The geometric transformation may include but is not limited to: no transformation, diagonal transformation, vertical flip, and rotation transformation. Table 1 can be represented as follows:
[0106] Table 1
[0107] Applying a geometric transformation to the filter coefficients is equivalent to applying a geometric transformation to the pixel values before filtering while preserving the coefficients. The purpose of this geometric transformation is to align the directionality of the content of different pixel blocks as much as possible, thereby reducing the number of classifications required for the ALF and enabling different pixels to share the same filter coefficients. Introducing this geometric transformation increases the number of actual classifications from 25 to 100 without increasing the number of ALF filters, thus improving its adaptability.
[0108] (8) Cross-component adaptive loop filtering (CC-ALF): CC-ALF is similar to the aforementioned ALF and is also a Wiener filter. Its function is also similar and will not be described in detail here. CC-ALF only acts on chroma reconstructed pixels. The input of CC-ALF is the luminance reconstructed pixel after being filtered by DBF, BIF, BIF-Chroma, SAO and CCSAO, but before ALF. The output is the correction value of the corresponding chroma reconstructed pixel. CC-ALF also needs to classify the video content first and use the corresponding filter for each category of video content. The CC-ALF of each chroma reconstructed pixel can support up to 4 different categories of filters. CC-ALF can use the correlation between the luminance reconstructed pixel and the chroma reconstructed pixel to obtain the correction value of the chroma reconstructed pixel by linearly filtering the luminance reconstructed pixel. This correction value is added to the chroma reconstructed pixel after ALF to serve as the final reconstructed chroma pixel.
[0109] CC-ALF generates a corresponding correction value for each chrominance reconstructed pixel by linearly filtering the luminance reconstructed pixel. The implementation process of the CC-ALF and the relationship between the CC-ALF and ALF can be seen in Figure 6. Figure 6 is a schematic diagram of the framework of a cross-component adaptive loop filter provided by an embodiment of the present application. The embodiment of the present application is described using the YCbCr color space as an example. As shown in Figure 6, the compensation values generated by BIF, BIF-Chroma, SAO, and CCSAO are added to the reconstructed pixels after the deblocking effect filter at the same time, thereby obtaining the compensated luminance component pixels (such as the Y component pixel R Y ), the compensated blue chrominance component pixel Cb and the compensated red chrominance component pixel Cr.
[0110] Compensated brightness component pixel R Y The ALF on the luminance component can be input, and the final luminance component pixel Y can be output through the ALF; the compensated luminance component pixel R Y Input CC-ALF on the blue chroma component, output the reconstructed pixel on the blue chroma component Cb through CC-ALF processing, and calculate the difference ΔR between the blue chroma component pixel value output by CC-ALF and the blue chroma component pixel value after deblocking effect filtering Cb ; Compensated brightness component pixel R Y Input CC-ALF on the red chroma component, output the reconstructed pixel on the red chroma component Cr through CC-ALF processing, and calculate the difference ΔR between the red chroma component pixel value output by CC-ALF and the red chroma component pixel value after deblocking effect filtering Cr .
[0111] The compensated blue chromaticity component pixel and the compensated red chromaticity component pixel can be input into the ALF on the chromaticity component, and the reconstructed pixel on the blue chromaticity component can be output through the ALF and compared with ΔR Cb The final blue chromaticity component pixel Cb is obtained by adding; the reconstructed pixel on the red chromaticity component can be output through ALF and combined with ΔR Cr The final red chrominance component pixel Cr is obtained by adding.
[0112] The filtering process of CC-ALF can be expressed as follows:
[0113] Among them, R Y is the reconstructed sample obtained by adding the corresponding compensation value to the reconstructed pixel after deblocking filtering after BIF, BIF-Chroma, SAO, and CCSAO processing, (x, y) is the sample position of the chroma component pixel f (the chroma component pixel here can be the reconstructed chroma component pixel, which can be called the chroma reconstructed pixel), (x C ,y C ) is the luminance component pixel obtained from the chrominance component pixel f (the luminance component pixel here can also be called luminance reconstruction pixel), S f is the filtering area supported by the CC-ALF filter on the luminance component, c f (x0, y0) is the filter coefficient corresponding to the chrominance component pixel f. (x0, y0) is the offset position corresponding to the luminance component pixel. The position corresponding to the luminance component pixel f is obtained by transforming the coordinates of the chrominance component pixel according to the scaling relationship between luminance and chrominance corresponding to the video data. ΔR f (x, y) represents the correction value of the chrominance component pixel f at the position (x, y) after CC-ALF processing.
[0114] Please refer to Figure 7, which is a schematic diagram of the shape of a cross-component adaptive loop filter provided by an embodiment of the present application. CC-ALF can support a 3*4 diamond filter as shown in Figure 7. The black circle shown in Figure 7 can represent the luma component pixels supported by the CC-ALF filter, and the white dashed circle can represent the sample position (x, y) of the chroma component pixel f.
[0115] It should be noted that compared to ALF, CC-ALF's filter coefficients remove the symmetry restriction, allowing it to flexibly adapt to the relative relationship between various luminance and chrominance components. In addition, in order to reduce the filter coefficients that need to be transmitted, in the current coding framework design, CC-ALF has the following two restrictions on its filter coefficients:
[0116] ① The sum of all CC-ALF coefficients is constrained to 0; therefore, for a 3*4 diamond filter, only 7 filter coefficients need to be calculated and transmitted. The center filter coefficient can be automatically inferred at the decoder based on this condition. ② The absolute value of each filter coefficient to be transmitted must be a power of 2 and can be represented using a maximum of 6 bits; therefore, the absolute values of CC-ALF filter coefficients can be {0, 2, 4, 8, 16, 32, 64}. This design can use shift operations instead of multiplications, reducing the number of multiplication operations. Unlike luma ALF, which supports sub-block-level classification and adaptive selection, CC-ALF only supports CTU-level classification and adaptive selection. For each chroma component pixel, all chroma component pixels within a CTU belong to the same category, and the CTU can use the same filter.
[0117] An Adaptation Parameter Set (APS) can contain up to 25 sets of luma ALF filter coefficients and corresponding clipping value indices. Each chroma component pixel supports up to 8 sets of chroma ALF filter coefficients and corresponding clipping value indices, and each chroma component pixel supports up to 4 sets of CC-ALF filter coefficients. In order to save bit rate, for the luma ALF filter, filter coefficients of different categories can be merged (Merge), and multiple categories share a set of filter coefficients. The encoder will determine which categories of coefficients can be merged through rate-distortion optimization (RDO). The index of the APS used for the current slice will be marked in the slice header. CC-ALF supports CTU-level adaptation. In the case of multiple filters, the CTU level will adaptively select whether to use CC-ALF and the index of the filter used for each chroma component pixel.
[0118] Please refer to Figure 8, which is a schematic diagram of the structure of a data processing system provided in an embodiment of the present application. As shown in Figure 8, the data processing system may include an encoding device 40a (encoding end) and a decoding device 40b (decoding end). The encoding device 40a can be a terminal device or a server, and the decoding device 40b can be a terminal device or a server. The encoding device 40a and the decoding device 40b can establish a direct communication connection through wired communication or an indirect communication connection through wireless communication.
[0119] Terminal devices may include, but are not limited to, smartphones, tablets, laptops, PDAs, mobile internet devices (MIDs), wearable devices (such as smart watches and smart bracelets), intelligent voice interaction devices, smart home appliances (such as smart TVs), in-vehicle devices, and VR devices (such as VR helmets and VR glasses). A server may be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0120] (1) For the encoding device 40a:
[0121] Encoding device 40a can acquire video data through scene capture. Scene capture of video data refers to capturing real-world visual scenes using a capture device associated with encoding device 40a to obtain video data. The capture device can be used to provide video data acquisition services for encoding device 40a. The capture device can include, but is not limited to, any of the following: a camera device, a sensor device, and a scanning device.
[0122] Among them, the camera equipment may include ordinary cameras, stereo cameras, and light field cameras, etc., the sensing equipment may include laser equipment, radar equipment, etc., and the scanning equipment may include three-dimensional laser scanning equipment, etc.; the capture device associated with the encoding device 40a may be a hardware component set in the encoding device 40a, for example, the capture device is a camera, sensor, etc. of the terminal device, and the capture device associated with the encoding device 40a may also be a hardware device connected to the encoding device 40a, such as a camera connected to a server, etc.
[0123] The encoding device 40a can encode the image frames in the video data to obtain the encoded bit stream corresponding to the video data. Among them, the embodiment of the present application is mainly aimed at the EO type of CCSAO in the loop filtering. When classifying CCSAO EO, the encoding device 40a can perform CCSAO EO classification based on the extended co-located luminance reconstruction pixel of the reconstructed pixel to be processed (also known as the generalized co-located luminance reconstruction pixel, that is, a luminance reconstruction pixel in the target area centered on the real co-located luminance reconstruction pixel). At the same time, the remaining available classification modes other than the four classification modes of horizontal, vertical, diagonal, and anti-diagonal can also be used for CCSAO EO classification, and the compensation value of each EO category is calculated. The encoded bit stream is obtained by encoding the difference between the original pixel in the encoding block and the reconstructed pixel after the compensation value is added. Further, the encoding device 40a can transmit the obtained encoded bit stream to the decoding device 40b.
[0124] (2) For the decoding device 40b:
[0125] After receiving the compressed code stream (encoded bit stream) transmitted by the encoding device 40a, the decoding device 40b can decode the encoded bit stream and reconstruct the image frame pixels in the video data. In particular, the decoding device 40b can determine the currently used classification mode by parsing the syntax elements related to the classification mode in the encoded bit stream, and then determine the extended co-located luminance reconstruction pixel position and the target classification mode (i.e., the classification mode actually used) for CCSAO EO classification based on the mode definition jointly set by the encoding device 40a and the decoding device 40b; or, the decoding device 40b can determine the extended co-located luminance reconstruction pixel position by parsing the syntax elements related to the extended co-located luminance reconstruction pixel position in the encoded bit stream, and then determine the selected target classification mode by parsing the syntax elements related to the classification mode in the encoded bit stream. Further, the decoding device 40b can reconstruct the image frame pixels in the video data by using the extended co-located luminance reconstruction pixel position and the actual classification mode.
[0126] In an embodiment of the present application, the encoding device can perform CCSAO EO classification based on the extended co-located luminance reconstruction pixels of the color component pixels. At the same time, the extended classification mode (including the remaining available classification modes in addition to the aforementioned horizontal, vertical, diagonal, and anti-diagonal classification modes) can also be used for CCSAO EO classification, which can improve the category accuracy of the CCSAO EO of the pixels, thereby improving the encoding performance of the video data; the decoding device can parse the image frame pixels in the video data to obtain the extended co-located luminance reconstruction pixel position and the true classification mode, which can improve the decoding performance of the video data. It can be understood that the data processing system described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution of the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.
[0127] Please refer to Figure 9, which is a flow chart of a data processing method provided in an embodiment of the present application. It is understandable that the data processing method can be executed by a computer device, which can be the encoding device 40a shown in Figure 8, so the data processing method corresponds to the encoding method. As shown in Figure 9, the data processing method can include the following steps S101 to S103:
[0128] Step S101, determining classification mode information corresponding to a block to be encoded in video data; the classification mode information includes extended co-located luminance reconstructed pixels corresponding to color component pixels in the block to be encoded and a target classification mode; the extended co-located luminance reconstructed pixels belong to a target area centered on the true co-located luminance reconstructed pixels of the color component pixels.
[0129] Specifically, when a computer device encodes video data, it can perform frame processing on the video data to obtain a video sequence corresponding to the video data. The video sequence is composed of image frames in the video data, and the image frames in the video sequence are arranged in the chronological order of the image frames in the video data. For an image frame to be encoded in the video data, the image frame to be encoded can be divided into multiple blocks (which can be coding blocks or coding tree units). The block currently to be processed in the image frame to be encoded can be called a block to be encoded.
[0130] It is understood that the video encoding process is performed in units of blocks. Therefore, when encoding a block to be encoded, encoding operations such as transform, quantization, prediction, loop filtering, and entropy coding can be performed on the block to be encoded. The specific implementation process can be referred to the description shown in Figures 1 to 7 above. The technical solution proposed in the embodiment of the present application is mainly aimed at the CCSAO EO classification processing process in the loop filtering. Unlike the existing video coding framework, which only uses fixed real co-located luminance reconstructed pixels and the four classification modes shown in Figure 5 (also referred to as basic classification modes) for CCSAO EO classification, the embodiment of the present application proposes using extended co-located luminance reconstructed pixels (which can be selected from a target area centered on the real co-located luminance reconstructed pixels, also referred to as generalized co-located luminance reconstructed pixels) for CCSAO EO classification, or using an extended classification mode (the remaining available classification modes other than the four classification modes shown in Figure 5) for CCSAO EO classification, or using both extended co-located luminance reconstructed pixels and the extended classification mode for CCSAO EO classification. The CCSAO EO classification processing process will be described in detail below using any color component pixel in the block to be encoded as an example.
[0131] In an embodiment of the present application, for each original color component pixel in the block to be encoded, the loop filtering process shown in the aforementioned Figure 2 can be executed, that is, the color component pixel input to CCSAO is actually the reconstructed pixel of the original color component pixel in the block to be encoded after deblocking effect filtering; for the color component pixel input to CCSAO, the computer device can obtain the real co-located luminance reconstructed pixel corresponding to the color component pixel, use the real co-located luminance reconstructed pixel as the center of the region, determine a target region with a target size, and determine the extended co-located luminance reconstructed pixel corresponding to the color component pixel within the target region, that is, the extended co-located luminance reconstructed pixel can be any luminance reconstructed pixel in the target region; a set of candidate classification patterns corresponding to the color component pixel can be obtained, and a target classification pattern corresponding to the color component pixel can be determined in the candidate classification pattern set, and the extended co-located luminance reconstructed pixel and the target classification pattern are added to the classification pattern information corresponding to the block to be encoded.
[0132] Among them, the target size can be used to represent the coverage of the target area, such as the target area can be 3*3, and the target area can be considered as the selection area of the extended co-located brightness reconstruction pixels; the extended co-located brightness reconstruction pixels corresponding to the color component pixels are the optimal brightness reconstruction pixels selected from the target area. Please refer to Figure 10, which is a schematic diagram of a selection area of extended co-located brightness reconstruction pixels provided by an embodiment of the present application. The position c0 shown in Figure 10 can be represented as the real co-located brightness reconstruction pixel corresponding to the color component pixel, and the position c0 is the center of the target area; the target area can include positions 0 to 7, and the position c0 where the real co-located brightness reconstruction pixel itself is located. The extended co-located brightness reconstruction pixels corresponding to the color component pixels can be the optimal brightness reconstruction pixels selected from positions 0 to 7, or can be the optimal brightness reconstruction pixels selected from positions 0 to 7 and position c0.
[0133] Among them, the target classification mode can be the optimal classification mode selected from the candidate classification mode set; the candidate classification mode set can refer to the set of all possible classification modes used to calculate the difference between the extended co-located brightness reconstruction pixel and the surrounding adjacent pixels at each possible position in the target area; when the extended co-located brightness reconstruction pixel is used for CCSAO EO classification, the coverage area of different classification modes in the candidate classification mode set may not be limited, such as the size of the coverage area of different classification modes may be 5*5. In this case, when the extended co-located brightness reconstruction pixel is any brightness reconstruction pixel in the target area, the candidate classification mode set may include a basic classification mode and an extended classification mode, or the candidate classification mode may include an extended classification mode.
[0134] Specifically, if the extended co-located luminance reconstruction pixel is any other luminance reconstruction pixel in the target area except the true co-located luminance reconstruction pixel, that is, the luminance reconstruction pixel at any position from position 1 to position 7 as shown in FIG10 , then the candidate classification mode at this time may include only the basic classification mode, or only the extended classification mode, or both the basic classification mode and the extended classification mode; if the extended co-located luminance reconstruction pixel is the true co-located luminance reconstruction pixel in the target area, such as position c0 as shown in FIG10 , then the candidate classification mode at this time may include only the extended classification mode. The basic classification mode may include a horizontal classification mode, a vertical classification mode, a diagonal classification mode, and an anti-diagonal classification mode, such as the classification mode shown in FIG5 ; the extended classification mode refers to an available classification mode other than the basic classification mode, such as the extended classification mode shown in FIG11 .
[0135] Please refer to Figure 11, which is a schematic diagram of an extended classification mode provided in an embodiment of the present application. The extended classification modes proposed in this application may include 16 classification modes shown in extended classification modes 50a to 50r shown in Figure 11. The target classification mode corresponding to the color component pixel can be any of the extended classification modes shown in Figure 11, that is, the target classification mode corresponding to the color component pixel can be selected from all the extended classification modes shown in Figure 11.
[0136] It should be noted that when using the extended classification mode for CCSAO EO classification, it can be used only for chromaticity component pixels, or for all color component pixels (chromaticity component pixels and luminance component pixels), or only for luminance component pixels. This application does not limit this.
[0137] The color component pixels in the block to be encoded can be luminance component pixels, or can be chrominance component pixels. For example, when using extended co-located luminance reconstruction pixels for CCSAO EO classification, only chrominance component pixels can be used, or all color component pixels (chrominance component pixels and luminance component pixels) can be used, or only luminance component pixels can be used. This application does not limit this.
[0138] It can be understood that no matter whether the currently input color component pixel to be processed is a luminance component pixel or a chrominance component pixel, CCSAO EO classification is performed by calculating its corresponding co-located luminance reconstruction pixel. When calculating the co-located luminance reconstruction pixel corresponding to the color component pixel, especially when calculating the co-located luminance reconstruction pixel corresponding to the chrominance component pixel, there may be a certain deviation between the position of the co-located luminance reconstruction pixel actually calculated and the actual position of the color component pixel. Therefore, by using extended co-located luminance reconstruction pixels for CCSAO EO classification, the CCSAO EO classification accuracy of the color component pixels can be improved. In actual application scenarios, based on bit rate considerations, it is also possible to choose to use extended co-located luminance reconstruction pixels only for chrominance component pixels for CCSAO EO classification, which is all supported by the technical solutions proposed in the embodiments of the present application.
[0139] In one or more embodiments, when using extended co-located luminance reconstruction pixels for CCSAO EO classification, if the coverage areas of different classification modes cannot exceed the range covered by the different classification modes during the current CCSAO EO classification, that is, the coverage areas of different classification modes cannot exceed the target area centered on the true co-located luminance reconstruction pixel, then the coverage areas of different classification modes can be seen in FIG12, which is a schematic diagram of the coverage range of an extended co-located luminance reconstruction pixel mode provided in an embodiment of the present application. As shown in FIG12, position c0 represents the true co-located luminance reconstruction pixel corresponding to the color component pixel, area 60a represents the unavailable area of the extended co-located luminance reconstruction pixel, and area 60b is the coverage area specified by each classification mode; that is, the positions of the two adjacent elements of the extended co-located luminance reconstruction pixel specified by each classification mode in the candidate classification mode set need to be within area 60b and cannot exceed the range of area 60b, that is, the area outside the range of area 60b is the unavailable area.
[0140] Optionally, when the coverage area specified by each classification mode is the target area, the luminance reconstructed pixels in the target area, excluding the vertex positions, can be determined as a set of candidate luminance pixels corresponding to the color component pixels. The candidate luminance pixel set here may include luminance reconstructed pixels in a cross-shaped area of the target area, such as position 1, position 3, position 4, position 6, and position c0 as shown in FIG10 . A rate-distortion optimization process is performed on each luminance reconstructed pixel in the candidate luminance pixel set to obtain a first rate-distortion loss corresponding to each luminance reconstructed pixel in the candidate luminance pixel set; the luminance reconstructed pixel corresponding to the minimum first rate-distortion loss (optimal luminance reconstructed pixel) is determined as the extended co-located luminance reconstructed pixel corresponding to the color component pixel.
[0141] In addition, under the premise that the coverage area specified by each classification mode is the target area, the available classification modes can be limited according to the position of the extended co-located luminance reconstruction pixel. For example, a set of candidate classification modes corresponding to the color component pixels can be determined according to the position of the extended co-located luminance reconstruction pixel in the target area. In this case, the coverage of the classification modes in the candidate classification mode set is less than or equal to the target area. When the extended co-located luminance reconstruction pixel is at any one of positions 1, 3, 4, and 6 as shown in FIG10, the set of candidate classification modes corresponding to each possible position of the extended co-located luminance reconstruction pixel can include a horizontal classification mode or a vertical classification mode. When the extended co-located luminance reconstruction pixel is at position c0 as shown in FIG10 (i.e., the true co-located luminance reconstruction pixel), the set of candidate classification modes can include a horizontal classification mode, a vertical classification mode, a diagonal classification mode, and an anti-diagonal classification mode, i.e., the four classification modes shown in FIG5. According to each classification mode in the candidate classification mode set, a rate-distortion optimization process is performed on the color component pixels respectively to obtain a second rate-distortion loss corresponding to each classification mode in the candidate classification mode set. The classification mode corresponding to the minimum second rate-distortion loss (the optimal classification mode) is determined as the target classification mode corresponding to the color component pixel.
[0142] Wherein, please refer to Figure 13, which is a schematic diagram of the position of an extended co-located brightness reconstruction pixel and its corresponding classification mode provided by an embodiment of the present application. As shown in Figure 13, when the extended co-located brightness reconstruction pixel is at position 1 as shown in Figure 10, its corresponding classification mode is the horizontal classification mode 70a shown in Figure 13; when the extended co-located brightness reconstruction pixel is at position 3 as shown in Figure 10, its corresponding classification mode is the vertical classification mode 70b shown in Figure 13; when the extended co-located brightness reconstruction pixel is at position 4 as shown in Figure 10, its corresponding classification mode is the vertical classification mode 70c shown in Figure 13; when the extended co-located brightness reconstruction pixel is at position 6 as shown in Figure 10, its corresponding classification mode is the horizontal classification mode 70d shown in Figure 13.
[0143] Optionally, under the premise that the coverage area specified by each classification mode is the target area, if the extended co-located brightness reconstruction pixel is any brightness reconstruction pixel in the target area, and the coverage range of different classification modes in the candidate classification mode set is larger than the target area, the boundary pixels in the target area can be filled to the adjacent area of the target area to obtain the mode coverage range; the mode coverage range is used to determine the target classification mode from the candidate classification mode set. In other words, when the coverage area of different classification modes exceeds the range covered by different classification modes of the existing CCSAO EO classification, that is, when there is a classification mode whose coverage area exceeds the target area, the range covered by different classification modes of the existing CCSAO EO classification can be used to fill the unavailable area of the extended co-located brightness reconstruction pixel, that is, the boundary pixels in the target area can be copied to fill the unavailable area of the extended co-located brightness reconstruction pixel.
[0144] Please refer to Figure 14, which is a schematic diagram of a method provided by an embodiment of the present application for filling an unavailable area of an extended co-located brightness reconstruction pixel with a coverage range. Region 61b as shown in Figure 14 represents the range covered by different classification modes of the existing CCSAO EO classification, or may refer to an available area of an extended co-located brightness reconstruction pixel (for example, a target area), and region 61a represents an unavailable area of an extended co-located brightness reconstruction pixel. When the coverage range of a classification mode in the candidate classification mode set is greater than region 61b (target area), each boundary pixel in region 61b can be filled into the area adjacent to the corresponding boundary pixel in region 61a; for example, the boundary pixel P0 in region 61b can be filled into the area adjacent to the boundary pixel P0 in region 61a, and the boundary pixel P1 in region 61b can be filled into the area adjacent to the boundary pixel P1 in region 61a.
[0145] It should be noted that the set of candidate brightness pixels corresponding to the color component pixels may include all or part of the brightness reconstruction pixels in the target area. For example, based on the constraints in the actual application scenario, brightness reconstruction pixels at any position in the target area can be selected as the set of candidate brightness pixels corresponding to the color component pixels. This application does not limit this.
[0146] Step S102 : determining the boundary category corresponding to the color component pixel according to the expanded co-located brightness reconstructed pixel and the target classification mode.
[0147] Specifically, after determining the extended co-located luminance reconstructed pixel and target classification pattern corresponding to the color component pixel, for ease of understanding, the extended co-located luminance reconstructed pixel can be denoted as c, and the true co-located luminance reconstructed pixel can be denoted as c0. Since the boundary category can be generated based on the boundary category and the band category, the extended co-located luminance reconstructed pixel here can be used only to calculate the boundary category of the color component pixel, can be used only to calculate the band category of the color component pixel, or can be used to calculate both the band category and the boundary category of the color component pixel.
[0148] In the following, the color component pixel is taken as the brightness component pixel as an example. When the extended same-position brightness reconstruction pixel is used to calculate the band category of the color component pixel (which can be recorded as i B ) and boundary categories (which can be recorded as class idx ), the computer device can determine the first adjacent pixel (which can be recorded as a) and the second adjacent pixel (which can be recorded as b) corresponding to the extended co-located luminance reconstructed pixel c according to the target classification mode; obtain a first difference (which can be recorded as Ea) between the first adjacent pixel and the extended co-located luminance reconstructed pixel c, and obtain a second difference (which can be recorded as Eb) between the second adjacent pixel and the extended co-located luminance reconstructed pixel; obtain a first co-located chroma pixel and a second co-located chroma pixel corresponding to the true co-located luminance reconstructed pixel, that is, the reconstructed pixels of the color component pixel on the two chroma components; based on the extended co-located luminance reconstructed pixel, the first co-located chroma pixel and the second co-located chroma pixel, determine the band category i to which the luminance component pixel belongs B ; According to the belt category i B , the first difference and the second difference, determine the boundary class corresponding to the color component pixel idx .
[0149] Among them, the color component pixel belongs to the band category i B The acquisition process may include: obtaining the extended co-located brightness reconstruction pixel (the extended co-located brightness reconstruction pixel at this time is equivalent to cur shown in formula (3)) and the total number of band categories on the brightness component (which can be recorded as N cur ) to obtain the first co-located chroma pixel (which can be recorded as col1) and the total number of band categories on the first chroma component (which can be recorded as N col1 ), and obtain the second co-located chroma pixel (which can be recorded as col2) and the total number of band categories on the second chroma component (which can be recorded as N col2 ) of the third product; based on the pixel value bit depth (which can be recorded as BD) and the numerical relationship between the first product, the second product and the third product, determine the band category i to which the luminance component pixel belongs BFor example, in the YUV color space, the luminance component is Y, the first chrominance component can be U, and the second chrominance component can be V. This application does not limit the color space used. In other words, when calculating the band category to which a color component pixel belongs, the extended co-located luminance reconstructed pixels and the actual co-located chrominance component pixels corresponding to the luminance component pixels are used; when calculating the boundary category to which a color component pixel belongs, the extended co-located luminance reconstructed pixels corresponding to the luminance component pixels are used.
[0150] The following example takes the color component pixel as the brightness component pixel. When the extended same-position brightness reconstruction pixel is only used to calculate the boundary class of the color component pixel idx When the computer device determines the first adjacent pixel and the second adjacent pixel corresponding to the extended co-located luminance reconstructed pixel according to the target classification mode; obtains a first difference between the first adjacent pixel and the extended co-located luminance reconstructed pixel, and obtains a second difference between the second adjacent pixel and the extended co-located luminance reconstructed pixel; obtains a first co-located chroma pixel and a second co-located chroma pixel corresponding to the true co-located luminance reconstructed pixel; determines the band category to which the luminance component pixel belongs based on the true co-located luminance reconstructed pixel, the first co-located chroma pixel, and the second co-located chroma pixel; and determines the boundary category to which the color component pixel corresponds based on the band category, the first difference, and the second difference. In other words, when calculating the band category to which the color component pixel belongs, the true co-located luminance reconstructed pixel (i.e., the luminance reconstructed pixel itself that has undergone deblocking filtering) and the true co-located chroma component pixel corresponding to the luminance component pixel are used; when calculating the boundary category to which the color component pixel belongs, the extended co-located luminance reconstructed pixel corresponding to the luminance component pixel is used.
[0151] The following takes the color component pixel as the brightness component pixel as an example, when the extended same-position brightness reconstruction pixel is only used to calculate the band category i of the color component pixel B When the computer device determines the third neighboring pixel a and the fourth neighboring pixel b corresponding to the true co-located luminance reconstructed pixel according to the target classification mode, obtains a third difference Ea between the third neighboring pixel and the true co-located luminance reconstructed pixel, and obtains a fourth difference Eb between the fourth neighboring pixel and the true co-located luminance reconstructed pixel, obtains a first co-located chroma pixel and a second co-located chroma pixel corresponding to the true co-located luminance reconstructed pixel, determines the band category to which the luminance component pixel belongs based on the expanded co-located luminance reconstructed pixel, the first co-located chroma pixel, and the second co-located chroma pixel, and determines the boundary category to which the color component pixel belongs based on the band category, the third difference, and the fourth difference. In other words, when calculating the band category to which the color component pixel belongs, the expanded co-located luminance reconstructed pixel and the true co-located chroma component pixel corresponding to the luminance component pixel are used; when calculating the boundary category to which the color component pixel belongs, the true co-located luminance reconstructed pixel is used.
[0152] Optionally, the color component pixel can also be a chroma component pixel (for example, a U component pixel, a V component pixel). When determining the boundary category of the chroma component pixel, the same operation as the aforementioned brightness component pixel can also be performed. For example, in the YUV color space, the color component pixel is a U component pixel. At this time, the U component pixel corresponds to a real co-located U component reconstructed pixel (which can be denoted as cur), and the co-located brightness component pixel (which can be denoted as col1) can be a real co-located brightness reconstructed pixel or an extended co-located brightness reconstructed pixel. The co-located V component reconstructed pixel is a real co-located U component reconstructed pixel. It should be noted that the boundary category class idx The implementation process can be shown as the above formula (2), with category i B The acquisition process of can be shown as the above formula (3), which will not be repeated here.
[0153] Step S103 : compensating the reconstructed pixels of the color component pixels based on the boundary category to obtain compensated reconstructed pixels, and encoding the block to be encoded based on the compensated reconstructed pixels.
[0154] Specifically, the computer device can calculate the boundary class class idx The corresponding compensation value, that is, the boundary class output by CCSAO idx The corresponding compensation value, such as σ shown in formula (2) CCSAO [class idx ], the compensation value can be added to the reconstructed pixel of the color component pixel to obtain the compensated reconstructed pixel. In other words, based on the boundary class class idx The corresponding compensation value is used to compensate the reconstructed pixel of the color component pixel to obtain the compensated reconstructed pixel corresponding to the color component pixel. The reconstructed pixel of the color component pixel can refer to the pixel output after the deblocking effect filter; the compensated reconstructed pixel can refer to the reconstructed pixel output after the CCSAO EO using the extended co-located brightness reconstructed pixel corresponding to the color component pixel to be processed in CCSAO, such as C′ in the above formula (2) rec , the implementation process of reconstructing the compensated pixels will not be described here.
[0155] Furthermore, when using extended co-located luminance reconstructed pixels for CCSAO EO classification, the positions of the extended co-located luminance reconstructed pixels corresponding to the color component pixels, and the target classification mode for calculating the first difference and the second difference need to be encoded and transmitted to the decoding end (such as the decoding device 40b in the embodiment corresponding to Figure 8).
[0156] In one or more embodiments, a computer device may set a position syntax element for an extended co-located luminance reconstruction pixel corresponding to a color component pixel, and set a mode syntax element for a target classification mode corresponding to the color component pixel; for color component pixels in a block to be coded, different color component pixels may belong to different boundary categories, and each boundary category may correspond to a compensation value, and then the compensation values corresponding to each boundary category in the video data may be summed, and the total compensation value may be encoded to obtain a coding result corresponding to the total compensation value, and then the position syntax element, mode syntax element, and coding result corresponding to the total compensation value corresponding to each color component pixel in the block to be coded may be determined as a coded bit stream corresponding to the block to be coded, and the coded bit stream may be transmitted to a decoding end. In other words, the computer device may encode the position of the extended co-located luminance reconstruction pixel separately, such as the position of the extended co-located luminance reconstruction pixel may be indexed by a dedicated syntax element (i.e., a position syntax element); and the target classification mode may reuse the syntax element (i.e., a mode syntax element) used to identify the classification mode in the existing CCSAO EO classification.
[0157] In one or more embodiments, a computer device may set a joint syntax element for the extended co-located luminance reconstructed pixels and target classification modes corresponding to the color component pixels; based on the joint syntax element and the total compensation value corresponding to each boundary category in the video data, the coded bit stream of the block to be coded is determined, and the coded bit stream can be transmitted to the decoding end. In other words, the extended co-located luminance reconstructed pixels corresponding to the color component pixels can be encoded together with their corresponding adjacent pixels (including the first adjacent pixel and the second adjacent pixel), such as each possible position of the extended co-located luminance reconstructed pixels corresponding to the color component pixels and the available classification mode corresponding to each position can be used as a new mode in the CCSAO EO classification, and then the syntax element (joint syntax element) for identifying the classification mode in the existing CCSAO EO can be reused for transmission; therefore, a common joint syntax element can be set for the extended co-located luminance reconstructed pixels and target classification mode corresponding to the color component pixels.
[0158] It should be noted that, for the color component pixels in the block to be encoded, you can choose to use extended co-located luminance reconstruction pixels for CCSAO EO classification, or you can choose not to use extended co-located luminance reconstruction pixels for CCSAO EO classification; if the rate-distortion loss when not using extended co-located luminance reconstruction pixels is less than the rate-distortion loss when using extended co-located luminance reconstruction pixels, you can choose not to use extended co-located luminance reconstruction pixels for CCSAO EO classification; if the rate-distortion loss when not using extended co-located luminance reconstruction pixels is greater than the rate-distortion loss when using extended co-located luminance reconstruction pixels, you can choose to use extended co-located luminance reconstruction pixels for CCSAO EO classification.
[0159] Optionally, during the encoding process of video data, a flag bit can be used to identify whether to use extended co-located luminance reconstruction pixels (the extended co-located luminance reconstruction pixels here specifically refer to the luminance reconstruction pixels at any position from position 0 to position 7 shown in Figure 10) and the extended classification mode. The flag bit can be called a classification identification field. For example, if you choose to use extended co-located luminance reconstruction pixels and an extended classification mode for CCSAO EO classification, the classification identification field can be set to a first identification value; if you choose not to use extended co-located luminance reconstruction pixels and an extended classification mode for CCSAO EO classification, the classification identification field can be set to a second identification value. The first identification value and the second identification value here are different identification values, and both the first identification value and the second identification value can include but are not limited to: symbols, numerical values, labels, etc.
[0160] The above-mentioned classification identification field can be transmitted in HLS (High Level Syntax), and the classification identification field can be stored in a sequence parameter set (SPS), or a picture header (PictureHeader), or a slice header (SliceHeader), or an APS. This application does not limit this. If the classification identification field is stored in the SPS, the classification identification field is used to indicate whether the video data uses extended co-location brightness reconstruction pixels and an extended classification mode; if the classification identification field is stored in the PictureHeader, the classification identification field is used to indicate whether the current image frame uses extended co-location brightness reconstruction pixels and an extended classification mode; if the classification identification field is stored in the SliceHeader, the classification identification field is used to indicate whether the current strip uses extended co-location brightness reconstruction pixels and an extended classification mode; if the classification identification field is stored in the APS, the classification identification field is used to indicate whether the loop filter uses extended co-location brightness reconstruction pixels and an extended classification mode.
[0161] Optionally, different flag bits are used to identify whether to use extended co-located brightness reconstruction pixels and extended classification modes for CCSAO EO classification. At this time, the classification identification field may include an extended co-located brightness identification field and an extended mode identification field. For example, if you choose to use extended co-located brightness reconstruction pixels for CCSAO EO classification, the extended co-located brightness identification field can be set to a first identification value; if you choose not to use extended co-located brightness reconstruction pixels for CCSAO EO classification, the extended co-located brightness identification field can be set to a second identification value. If you choose to use an extended classification mode for CCSAO EO classification, the extended mode identification field can also be set to a first identification value; if you choose not to use an extended classification mode for CCSAO EO classification, the extended mode identification field can also be set to a second identification value. Both the extended co-located brightness identification field and the extended mode identification field can be transmitted in HLS, and the classification identification field can be stored in SPS, or PictureHeader, or SliceHeader, or APS.
[0162] It should be noted that when it is determined that the video data is to be classified by CCSAO EO using one or both of the extended co-located luminance reconstruction pixels and the extended classification mode, the classification identification field can be set to the first identification value, and then the video data can be encoded and processed according to the technical solution of the embodiment of the present application; if it is determined that the video data is not to be reconstructed using the extended co-located luminance reconstruction pixels and the extended classification mode, the classification identification field can be set to the second identification value, and then the video data can be encoded and processed according to the existing method.
[0163] In an embodiment of the present application, the encoding device can perform CCSAO EO classification based on the extended co-located luminance reconstructed pixels corresponding to the color component pixels. At the same time, it can also use the extended classification mode (including the remaining available classification modes in addition to the aforementioned horizontal, vertical, diagonal, and anti-diagonal classification modes) to perform CCSAO EO classification, which can improve the category accuracy of the CCSAO EO of the color component pixels, and thus improve the overall encoding performance of the video data.
[0164] Please refer to Figure 15, which is a flow chart of another data processing method provided by an embodiment of the present application. It is understandable that the data processing method can be executed by a computer device, which can be the decoding device 40b shown in Figure 8, so the data processing method corresponds to the decoding method. As shown in Figure 15, the data processing method can include the following steps S201 to S203:
[0165] Step S201, decoding the block to be decoded in the video data to obtain classification mode information corresponding to the block to be decoded; the classification mode information includes the extended co-located luminance reconstructed pixels corresponding to the color component pixels in the block to be decoded and the target classification mode; the extended co-located luminance reconstructed pixels belong to the target area centered on the true co-located luminance reconstructed pixels of the color component pixels.
[0166] Specifically, the computer device can parse the position syntax element corresponding to the color classification pixel to obtain the extended co-located luminance reconstructed pixel corresponding to the color component pixel; parse the mode syntax element corresponding to the color classification pixel to obtain the target classification mode corresponding to the color component pixel, and determine the extended co-located luminance reconstructed pixel and the target classification mode as the classification mode information corresponding to the block to be decoded. In other words, the computer device can parse the position syntax element (the syntax element related to the position of the extended co-located luminance reconstructed pixel) to determine the position of the extended co-located luminance reconstructed pixel, parse the mode syntax element (the syntax element related to the classification mode) to determine the target classification mode, and then calculate the difference between the position of the extended co-located luminance reconstructed pixel and the surrounding pixels in the area covered by the target classification mode with the center, and perform boundary classification.
[0167] In one or more embodiments, a computer device may parse a joint syntax element corresponding to a color classification pixel to obtain an extended co-located luminance reconstructed pixel and a target classification mode corresponding to the color classification pixel, and determine the extended co-located luminance reconstructed pixel and the target classification mode as classification mode information corresponding to the block to be decoded. In other words, the computer device may parse a joint syntax element (a syntax element related to the classification mode), and then, based on a mode jointly set by an encoding end and a decoding end (the mode is consistent at the encoding end and the decoding end), define the position of the extended co-located luminance reconstructed pixel for classification and the target classification mode.
[0168] Before parsing the classification mode information corresponding to the color component pixels in the block to be decoded, the computer device may first parse the classification identification field in the sequence parameter set corresponding to the video data; if the classification identification field is a first identification value, it is determined that the video data uses extended co-located luminance reconstruction pixels; if the classification identification field is a second identification value, it is determined that the video data does not use extended co-located luminance reconstruction pixels. For example, if the classification identification field in the sequence parameter set corresponding to the parsed video data is a first identification value, it indicates that the video data uses extended co-located luminance reconstruction pixels and an extended classification mode; if, when decoding an image frame in the video data, the classification identification field in the parsed PictureHeader is a second identification value, it indicates that the currently processed image frame does not use extended co-located luminance reconstruction pixels and an extended classification mode.
[0169] Optionally, if the classification identification field includes an extended co-located luminance identification field for extended co-located luminance reconstruction pixels and an extended mode identification field for an extended classification mode, the extended co-located luminance identification field and the extended mode identification field can be parsed in sequence first, and based on the parsing results, it can be determined whether the video data uses extended co-located luminance reconstruction pixels and extended classification modes; if the parsed result is that the video data uses one or two of the extended co-located luminance reconstruction pixels and extended classification modes for CCSAO EO classification, subsequent decoding processing can be performed according to the technical solution provided in the embodiment of the present application; if the parsed result is that the video data does not use extended co-located luminance reconstruction pixels and extended classification modes for CCSAO EO classification, subsequent decoding processing can be performed according to the existing solution.
[0170] Step S202 : determining the boundary category corresponding to the color component pixel according to the expanded co-located brightness reconstructed pixel and the target classification mode.
[0171] The implementation process of step S202 may refer to step S102 in the embodiment corresponding to FIG9 , and will not be described in detail here.
[0172] Step S203 : reconstructing the color component pixels in the block to be decoded according to the compensation value corresponding to the boundary category.
[0173] Specifically, the computer device can determine compensated reconstructed pixels based on the compensation values corresponding to the boundary categories, and the color component pixels in the block to be decoded can be reconstructed using the compensated reconstructed pixels. Specifically, the total compensation value corresponding to each boundary category in the video data can be parsed to obtain. The boundary category corresponding to the color component pixels in the current block to be decoded can be determined using the obtained target classification pattern and the extended co-located luminance reconstructed pixels. The compensation value corresponding to the boundary category can then be determined from the total compensation value, i.e., the compensation value corresponding to a single boundary category. The color component pixels belonging to the boundary category can be reconstructed using the compensation value corresponding to the single boundary category.
[0174] It should be noted that the decoding process of video data and the encoding process of video data are inverse processes to each other. Therefore, the decoding process of video data can refer to the description in the embodiment corresponding to Figure 9 above, and will not be repeated here.
[0175] In an embodiment of the present application, the decoding device can perform CCSAO EO classification based on the extended co-located luminance reconstructed pixels corresponding to the color component pixels. At the same time, it can also use an extended classification mode (including the remaining available classification modes in addition to the aforementioned horizontal, vertical, diagonal, and anti-diagonal classification modes) to perform CCSAO EO classification, which can improve the category accuracy of the CCSAO EO of the color component pixels, and thus improve the overall decoding performance of the video data.
[0176] Please refer to Figure 16, which is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application; the data processing device can be a computer program (including program code) running in an encoding device, for example, the data processing device is an application software in the encoding device. Referring to Figure 16, the data processing device 1 can include a classification mode information determination module 11, a first category determination module 12, and an encoding processing module 13;
[0177] A classification mode information determination module 11 is configured to determine classification mode information corresponding to a block to be encoded in video data; the classification mode information includes extended co-located luminance reconstructed pixels corresponding to color component pixels in the block to be encoded and a target classification mode; the extended co-located luminance reconstructed pixels belong to a target region centered around the actual co-located luminance reconstructed pixels of the color component pixels;
[0178] A first category determination module 12 is configured to determine a boundary category corresponding to a color component pixel based on the extended co-located brightness reconstructed pixel and the target classification mode;
[0179] The encoding processing module 13 is configured to compensate the reconstructed pixels of the color component pixels based on the boundary category to obtain compensated reconstructed pixels, and perform encoding processing on the block to be encoded based on the compensated reconstructed pixels.
[0180] In one or more embodiments, the classification mode information determination module 11 is specifically configured to:
[0181] Obtaining the color component pixels contained in the block to be encoded, and obtaining the real co-located brightness reconstructed pixels corresponding to the color component pixels;
[0182] Taking the true co-located brightness reconstructed pixel as the center of the region, determining a target region with a target size, and determining the extended co-located brightness reconstructed pixel corresponding to the color component pixel in the target region;
[0183] A candidate classification mode set corresponding to the color component pixel is obtained, a target classification mode corresponding to the color component pixel is determined in the candidate classification mode set, and the extended co-located brightness reconstructed pixel and the target classification mode are added to the classification mode information corresponding to the block to be encoded.
[0184] In one or more embodiments, the classification mode information determination module 11 determines, within the target area, the extended co-located brightness reconstructed pixels corresponding to the color component pixels, including:
[0185] Determine the brightness reconstructed pixels in the target area except for the vertex positions as a set of candidate brightness pixels corresponding to the color component pixels;
[0186] According to each luminance reconstruction pixel in the candidate luminance pixel set, performing rate-distortion optimization processing on each color component pixel, and obtaining a first rate-distortion loss corresponding to each luminance reconstruction pixel in the candidate luminance pixel set;
[0187] The luminance reconstructed pixel corresponding to the minimum first rate distortion loss is determined as the extended co-located luminance reconstructed pixel corresponding to the color component pixel.
[0188] In one or more embodiments, the classification mode information determination module 11 obtains a set of candidate classification modes corresponding to the color component pixels, and determines a target classification mode corresponding to the color component pixels from the set of candidate classification modes, including:
[0189] Determining a set of candidate classification patterns corresponding to the color component pixels according to the positions of the extended co-located brightness reconstructed pixels in the target area; the coverage of the classification patterns in the candidate classification pattern set is less than or equal to the target area, and the candidate classification pattern set includes a horizontal classification pattern and a vertical classification pattern;
[0190] According to each classification mode in the candidate classification mode set, a rate-distortion optimization process is performed on each color component pixel to obtain a second rate-distortion loss corresponding to each classification mode in the candidate classification mode set;
[0191] The classification mode corresponding to the minimum second rate-distortion loss is determined as the target classification mode corresponding to the color component pixels.
[0192] In one or more embodiments, the co-located luminance reconstruction pixel is expanded to any luminance reconstruction pixel in the target area;
[0193] The data processing device 1 is also used for:
[0194] If there is a classification pattern in the candidate classification pattern set whose coverage is larger than the target area, the boundary pixels in the target area are filled to the adjacent area of the target area to obtain the pattern coverage; the pattern coverage is used to determine the target classification pattern from the candidate classification pattern set.
[0195] In one or more embodiments, when the extended co-located luminance reconstruction pixel is any luminance reconstruction pixel in the target area, the candidate classification mode set includes a basic classification mode and an extended classification mode, or the candidate classification mode set includes an extended classification mode; the basic classification mode includes a horizontal classification mode, a vertical classification mode, a diagonal classification mode and an anti-diagonal classification mode, and the extended classification mode includes available classification modes other than the basic classification mode.
[0196] In one or more embodiments, the color component pixels include luma component pixels, or chroma component pixels.
[0197] In one or more embodiments, the color component pixel includes a brightness component pixel; the first category determination module 12 is specifically configured to:
[0198] Determining, according to the target classification mode, a first adjacent pixel and a second adjacent pixel corresponding to the expanded co-located brightness reconstruction pixel;
[0199] Obtaining a first difference between a first adjacent pixel and the expanded co-located brightness reconstructed pixel, and obtaining a second difference between a second adjacent pixel and the expanded co-located brightness reconstructed pixel;
[0200] Obtain a first co-located chrominance pixel and a second co-located chrominance pixel corresponding to the true co-located luminance reconstruction pixel;
[0201] determining a band category to which a luminance component pixel belongs based on the expanded co-located luminance reconstructed pixel, the first co-located chrominance pixel, and the second co-located chrominance pixel;
[0202] A boundary category corresponding to the color component pixel is determined according to the band category, the first difference value, and the second difference value.
[0203] The first category determination module 12 determines the band category to which the luminance component pixel belongs based on the expanded co-located luminance reconstruction pixel, the first co-located chrominance pixel, and the second co-located chrominance pixel, including:
[0204] Obtaining a first product of the expanded co-located luma reconstructed pixel and the total number of band classes on the luma component, obtaining a second product of the first co-located chroma pixel and the total number of band classes on the first chroma component, and obtaining a third product of the second co-located chroma pixel and the total number of band classes on the second chroma component;
[0205] The band category to which the luminance component pixel belongs is determined based on numerical relationships between the pixel value bit depth and the first product, the second product, and the third product.
[0206] In one or more embodiments, the color component pixel includes a brightness component pixel; the first category determination module 12 is specifically configured to:
[0207] Determining, according to the target classification mode, a first adjacent pixel and a second adjacent pixel corresponding to the expanded co-located brightness reconstruction pixel;
[0208] Obtaining a first difference between a first adjacent pixel and the expanded co-located brightness reconstructed pixel, and obtaining a second difference between a second adjacent pixel and the expanded co-located brightness reconstructed pixel;
[0209] Obtain a first co-located chrominance pixel and a second co-located chrominance pixel corresponding to the true co-located luminance reconstruction pixel;
[0210] determining a band category to which a luminance component pixel belongs based on the true co-located luminance reconstructed pixel, the first co-located chrominance pixel, and the second co-located chrominance pixel;
[0211] A boundary category corresponding to the color component pixel is determined according to the band category, the first difference value, and the second difference value.
[0212] In one or more embodiments, the color component pixel includes a brightness component pixel; the first category determination module 12 is specifically configured to:
[0213] Determining, according to the target classification mode, a third adjacent pixel and a fourth adjacent pixel corresponding to the true co-located brightness reconstructed pixel;
[0214] Obtaining a third difference between a third adjacent pixel and the true co-located brightness reconstructed pixel, and obtaining a fourth difference between a fourth adjacent pixel and the true co-located brightness reconstructed pixel;
[0215] Obtain a first co-located chrominance pixel and a second co-located chrominance pixel corresponding to the true co-located luminance reconstruction pixel;
[0216] determining a band category to which a luminance component pixel belongs based on the expanded co-located luminance reconstructed pixel, the first co-located chrominance pixel, and the second co-located chrominance pixel;
[0217] A boundary category corresponding to the color component pixel is determined according to the band category, the third difference value, and the fourth difference value.
[0218] In one or more embodiments, the encoding processing module 13 performs encoding processing on the block to be encoded using the compensated reconstructed pixels, including:
[0219] Set the position syntax element for the extended co-located brightness reconstruction pixel and the mode syntax element for the target classification mode;
[0220] A compensation value corresponding to the boundary category is determined, and a coded bit stream of the block to be coded is obtained based on the position syntax element, the mode syntax element, and the compensation value.
[0221] In one or more embodiments, the encoding processing module 13 performs encoding processing on the block to be encoded using the compensated reconstructed pixels, including:
[0222] Setting joint syntax elements for extended co-located brightness reconstruction pixels and target classification mode;
[0223] A compensation value corresponding to the boundary category is determined, and a coded bit stream of the block to be coded is obtained based on the joint syntax element and the compensation value.
[0224] In an embodiment of the present application, the encoding device can perform CCSAO EO classification based on the extended co-located luminance reconstructed pixels corresponding to the color component pixels. At the same time, it can also use an extended classification mode (including the remaining available classification modes in addition to the aforementioned horizontal, vertical, diagonal, and anti-diagonal classification modes) to perform CCSAO EO classification, which can improve the category accuracy of the CCSAO EO of the color component pixels, and thus improve the overall encoding performance of the video data.
[0225] Please refer to Figure 17, which is a schematic diagram of the structure of another data processing device provided in an embodiment of the present application; the data processing device can be a computer program (including program code) running in a decoding device, for example, the data processing device is an application software in the decoding device. Referring to Figure 17, the data processing device 2 can include a decoding processing module 21, a second category determination module 22, and a pixel reconstruction module 23;
[0226] The decoding processing module 21 is configured to decode a block to be decoded in the video data to obtain classification mode information corresponding to the block to be decoded; the classification mode information includes extended co-located luminance reconstructed pixels corresponding to color component pixels in the block to be decoded and a target classification mode; the extended co-located luminance reconstructed pixels belong to a target area centered around the actual co-located luminance reconstructed pixels of the color component pixels;
[0227] A second category determination module 22 is configured to determine a boundary category corresponding to a color component pixel based on the extended co-located brightness reconstructed pixel and the target classification mode;
[0228] The pixel reconstruction module 23 is configured to reconstruct the color component pixels in the to-be-decoded block according to the compensation value corresponding to the boundary category.
[0229] In one or more embodiments, the decoding processing module 21 is specifically configured to:
[0230] Parse the position syntax elements corresponding to the color classification pixels to obtain the extended co-located brightness reconstructed pixels corresponding to the color component pixels;
[0231] The mode syntax elements corresponding to the color classification pixels are parsed to obtain the target classification mode corresponding to the color component pixels, and the extended co-located luminance reconstructed pixels and the target classification mode are determined as the classification mode information corresponding to the to-be-decoded block.
[0232] In one or more embodiments, the decoding processing module 21 is specifically configured to:
[0233] The joint syntax elements corresponding to the color classification pixels are parsed to obtain the extended co-located luminance reconstructed pixels and the target classification mode corresponding to the color classification pixels, and the extended co-located luminance reconstructed pixels and the target classification mode are determined as the classification mode information corresponding to the to-be-decoded block.
[0234] The data device 2 is further used for:
[0235] Parsing the classification identification field in the sequence parameter set corresponding to the video data;
[0236] If the classification identification field is the first identification value, it is determined that the video data uses extended co-located brightness reconstruction pixels;
[0237] If the category identification field is the second identification value, it is determined that the video data does not use extended co-located brightness reconstruction pixels.
[0238] In an embodiment of the present application, the decoding device can perform CCSAO EO classification based on the extended co-located luminance reconstructed pixels corresponding to the color component pixels. At the same time, it can also use an extended classification mode (including the remaining available classification modes in addition to the aforementioned horizontal, vertical, diagonal, and anti-diagonal classification modes) to perform CCSAO EO classification, which can improve the category accuracy of the CCSAO EO of the color component pixels, and thus improve the overall decoding performance of the video data.
[0239] According to an embodiment of the present application, the various units in the data processing device 1 shown in Figure 16 and the data processing device 2 shown in Figure 17 can be separately or all merged into one or several other units to constitute, or one (some) of the units can be further split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In actual applications, the functions of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the data processing device 2 can also include other units. In actual applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units.
[0240] Further, please refer to Figure 18, which is a structural diagram of a computer device provided in an embodiment of the present application. As shown in Figure 18, the computer device 1000 can be a terminal device or a server, and this application does not limit this. For ease of understanding, this application takes the computer device as an example of a terminal device. The computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk storage. The memory 1005 may also be at least one storage device located away from the aforementioned processor 1001. As shown in FIG. 18 , the memory 1005 , which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a device control application program.
[0241] The network interface 1004 in the computer device 1000 can also provide network communication functions, and the optional user interface 1003 can also include a display screen and a keyboard. In the computer device 1000 shown in Figure 18, the network interface 1004 can provide network communication functions; while the user interface 1003 is mainly used to provide an input interface for the user.
[0242] When the computer device 1000 is an encoding device, the processor 1001 can be used to call the device control application stored in the memory 1005 to implement the data processing method on the encoding device side provided in the embodiment of the present application.
[0243] When the computer device 1000 is a decoding device, the processor 1001 can be used to call the device control application stored in the memory 1005 to implement the data processing method on the decoding device side provided in the embodiment of the present application.
[0244] It should be understood that the computer device 1000 described in the embodiments of the present application can execute the data processing method described in the embodiments corresponding to FIG. 9 or FIG. 15 above, or can execute the data processing device 1 described in the embodiment corresponding to FIG. 16 above, or the data processing device 2 described in the embodiment corresponding to FIG. 17 above, and the description thereof will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here.
[0245] In addition, it should be noted that the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the data processing device 1 or the data processing device 2 mentioned above, and the computer program includes computer instructions. When the processor executes the computer instructions, it can execute the description of the data processing method in the embodiment corresponding to Figure 9 or Figure 15 above. Therefore, it will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application. As an example, the computer instructions can be deployed on a computing device for execution, or executed on multiple computing devices located at one location, or executed on multiple computing devices distributed at multiple locations and interconnected by a communication network. Multiple computing devices distributed at multiple locations and interconnected by a communication network can constitute a blockchain system.
[0246] In addition, it should be noted that: the embodiment of the present application also provides a computer program product or computer program, which may include computer instructions, and the computer instructions may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor can execute the computer instructions so that the computer device performs the description of the data processing method in the embodiment corresponding to Figure 9 or Figure 15 above, and therefore, it will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer program product or computer program embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0247] It should be noted that for the aforementioned various method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0248] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.
[0249] The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0250] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0251] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A data processing method, executed by a computer device, comprising: Determine classification mode information corresponding to the to-be-encoded block in the video data; The classification mode information includes an extended co-located brightness reconstruction pixel corresponding to a color component pixel in the block to be encoded and a target classification mode; the extended co-located brightness reconstruction pixel belongs to a target area centered on a real co-located brightness reconstruction pixel of the color component pixel; Determining a boundary category corresponding to the color component pixel according to the extended co-located brightness reconstructed pixel and the target classification mode; The reconstructed pixels of the color component pixels are compensated based on the boundary category to obtain compensated reconstructed pixels, and the to-be-encoded block is encoded based on the compensated reconstructed pixels.
2. The method according to claim 1, wherein: The determining of classification mode information corresponding to the to-be-encoded block in the video data includes: Obtaining color component pixels contained in the block to be encoded, and obtaining real co-located brightness reconstructed pixels corresponding to the color component pixels; Taking the real co-located brightness reconstruction pixel as the center of the region, determining a target region with a target size, and determining within the target region an extended co-located brightness reconstruction pixel corresponding to the color component pixel; Obtain a set of candidate classification patterns corresponding to the color component pixels, determine a target classification pattern corresponding to the color component pixels in the set of candidate classification patterns, and add the extended co-located brightness reconstructed pixels and the target classification pattern to the classification pattern information corresponding to the block to be encoded.
3. The method according to claim 2, wherein: Determining the extended co-located brightness reconstruction pixel corresponding to the color component pixel in the target area includes: Determine the brightness reconstruction pixels in the target area except the vertex positions as a candidate brightness pixel set corresponding to the color component pixels; According to each brightness reconstruction pixel in the candidate brightness pixel set, respectively perform rate-distortion optimization processing on the color component pixels to obtain a first rate-distortion loss corresponding to each brightness reconstruction pixel in the candidate brightness pixel set; The brightness reconstruction pixel corresponding to the minimum first rate distortion loss is determined as the extended co-located brightness reconstruction pixel corresponding to the color component pixel.
4. The method according to claim 3, wherein: The acquiring a set of candidate classification modes corresponding to the color component pixels and determining a target classification mode corresponding to the color component pixels in the set of candidate classification modes includes: Determine a set of candidate classification patterns corresponding to the color component pixels according to the positions of the extended co-located brightness reconstruction pixels in the target area; the coverage of the classification patterns in the set of candidate classification patterns is less than or equal to the target area, and the set of candidate classification patterns includes horizontal classification patterns and vertical classification patterns; According to each classification mode in the candidate classification mode set, respectively perform rate-distortion optimization processing on the color component pixels to obtain a second rate-distortion loss corresponding to each classification mode in the candidate classification mode set; The classification mode corresponding to the minimum second rate distortion loss is determined as the target classification mode corresponding to the color component pixel.
5. The method according to claim 2, wherein: The extended co-located brightness reconstruction pixel is any brightness reconstruction pixel in the target area; The method further comprises: If there is a classification pattern in the candidate classification pattern set whose coverage range is larger than the target area, the boundary pixels in the target area are filled to the adjacent area of the target area to obtain the pattern coverage range; the pattern coverage range is used to determine the target classification pattern from the candidate classification pattern set.
6. The method according to claim 2, wherein: When the extended co-located luminance reconstruction pixel is any luminance reconstruction pixel in the target area, the candidate classification pattern set includes a basic classification pattern and an extended classification pattern, or the candidate classification pattern set includes an extended classification pattern; the basic classification pattern includes a horizontal classification pattern, a vertical classification pattern, a diagonal classification pattern and a counter-diagonal classification pattern, and the extended classification pattern includes available classification patterns other than the basic classification pattern.
7. The method according to claim 1, wherein: The color component pixels include brightness component pixels or chrominance component pixels.
8. The method according to claim 1, wherein: The color component pixels include brightness component pixels; and determining the boundary category corresponding to the color component pixels according to the extended co-located brightness reconstruction pixels and the target classification mode includes: Determining, according to the target classification mode, a first adjacent pixel and a second adjacent pixel corresponding to the extended co-located brightness reconstruction pixel; Acquire a first difference between the first adjacent pixel and the extended co-located brightness reconstruction pixel, and acquire a second difference between the second adjacent pixel and the extended co-located brightness reconstruction pixel; Acquire a first co-located chrominance pixel and a second co-located chrominance pixel corresponding to the real co-located luminance reconstruction pixel; Determining the band category to which the luminance component pixel belongs based on the extended co-located luminance reconstructed pixel, the first co-located chrominance pixel, and the second co-located chrominance pixel; A boundary category corresponding to the color component pixel is determined according to the band category, the first difference value, and the second difference value.
9. The method according to claim 8, wherein: The determining, based on the extended co-located luminance reconstruction pixel, the first co-located chrominance pixel, and the second co-located chrominance pixel, the band category to which the luminance component pixel belongs includes: Obtain a first product of the extended co-located luminance reconstructed pixel and the total number of band categories on the luminance component, obtain a second product of the first co-located chrominance pixel and the total number of band categories on the first chrominance component, and obtain a third product of the second co-located chrominance pixel and the total number of band categories on the second chrominance component; The band category to which the brightness component pixel belongs is determined based on the numerical relationships between the pixel value bit depth and the first product, the second product and the third product respectively.
10. The method according to claim 1, wherein: The color component pixels include brightness component pixels; and determining the boundary category corresponding to the color component pixels according to the extended co-located brightness reconstruction pixels and the target classification mode includes: Determining, according to the target classification mode, a first adjacent pixel and a second adjacent pixel corresponding to the extended co-located brightness reconstruction pixel; Acquire a first difference between the first adjacent pixel and the extended co-located brightness reconstruction pixel, and acquire a second difference between the second adjacent pixel and the extended co-located brightness reconstruction pixel; Acquire a first co-located chrominance pixel and a second co-located chrominance pixel corresponding to the real co-located luminance reconstruction pixel; Determine the band category to which the luminance component pixel belongs based on the true co-located luminance reconstructed pixel, the first co-located chrominance pixel, and the second co-located chrominance pixel; A boundary category corresponding to the color component pixel is determined according to the band category, the first difference value, and the second difference value.
11. The method according to claim 1, wherein: The color component pixels include brightness component pixels; and determining the boundary category corresponding to the color component pixels according to the extended co-located brightness reconstruction pixels and the target classification mode includes: Determining, according to the target classification mode, a third adjacent pixel and a fourth adjacent pixel corresponding to the true co-located brightness reconstruction pixel; Acquire a third difference between the third adjacent pixel and the true co-located brightness reconstructed pixel, and acquire a fourth difference between the fourth adjacent pixel and the true co-located brightness reconstructed pixel; Acquire a first co-located chrominance pixel and a second co-located chrominance pixel corresponding to the real co-located luminance reconstruction pixel; Determining the band category to which the luminance component pixel belongs based on the extended co-located luminance reconstructed pixel, the first co-located chrominance pixel, and the second co-located chrominance pixel; A boundary category corresponding to the color component pixel is determined according to the band category, the third difference value, and the fourth difference value.
12. The method according to any one of claims 1 to 11, wherein: The encoding process of the block to be encoded based on the compensated reconstructed pixels includes: Setting a position syntax element for the extended co-located brightness reconstruction pixel and a mode syntax element for the target classification mode; A compensation value corresponding to the boundary category is determined, and a coded bit stream of the block to be coded is obtained based on the position syntax element, the mode syntax element and the compensation value.
13. The method according to any one of claims 1 to 11, wherein: The encoding process of the block to be encoded based on the compensated reconstructed pixels includes: Setting a joint syntax element for the extended co-located brightness reconstructed pixel and the target classification mode; A compensation value corresponding to the boundary category is determined, and a coded bit stream of the block to be coded is obtained based on the joint syntax element and the compensation value.
14. A data processing method, executed by a computer device, comprising: Decoding the to-be-decoded blocks in the video data to obtain classification mode information corresponding to the to-be-decoded blocks; The classification mode information includes the extended co-located brightness reconstruction pixels corresponding to the color component pixels in the to-be-decoded block and a target classification mode; the extended co-located brightness reconstruction pixels belong to a target area centered on the real co-located brightness reconstruction pixels of the color component pixels; Determining a boundary category corresponding to the color component pixel according to the extended co-located brightness reconstructed pixel and the target classification mode; The color component pixels in the to-be-decoded block are reconstructed according to the compensation value corresponding to the boundary category.
15. The method according to claim 14, wherein: The decoding process is performed on the to-be-decoded block in the video data to obtain the classification mode information corresponding to the to-be-decoded block, including: Parsing the position syntax element corresponding to the color classification pixel to obtain the extended co-located brightness reconstructed pixel corresponding to the color component pixel; Parse the mode syntax element corresponding to the color classification pixel to obtain the target classification mode corresponding to the color component pixel, and determine the extended co-located brightness reconstructed pixel and the target classification mode as the classification mode information corresponding to the block to be decoded.
16. The method according to claim 14, wherein: The decoding process is performed on the to-be-decoded block in the video data to obtain the classification mode information corresponding to the to-be-decoded block, including: Parse the joint syntax element corresponding to the color classification pixel to obtain the extended co-located brightness reconstructed pixel and the target classification mode corresponding to the color classification pixel, and determine the extended co-located brightness reconstructed pixel and the target classification mode as the classification mode information corresponding to the block to be decoded.
17. The method according to any one of claims 14 to 16, wherein: Also includes: Parsing a classification identification field in a sequence parameter set corresponding to the video data; If the classification identification field is a first identification value, it is determined that the video data uses extended co-located brightness reconstruction pixels; If the category identification field is a second identification value, it is determined that the video data does not use the extended co-located brightness reconstruction pixels.
18. A computer device comprising a memory and a processor; The memory is connected to the processor, the memory is used to store a computer program, and the processor is used to call the computer program so that the computer device executes the method described in any one of claims 1 to 13, or executes the method described in any one of claims 14 to 17.
19. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 13, or executes the method according to any one of claims 14 to 17.
20. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 13, or executes the method according to any one of claims 14 to 17.
