Image decoding method, encoding method and device
By dividing the units to be decoded into multiple prediction groups and setting different prediction modes for them, the problem of low prediction efficiency in the video encoding and decoding process is solved, the coding efficiency is improved, and the requirements for data storage and transmission bandwidth are reduced.
Patent Information
- Application Number
- CN202111335613.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-11
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2041-11-11
AI Technical Summary
The prediction efficiency is low during the video encoding and decoding process, resulting in low coding efficiency.
By dividing the unit to be decoded into multiple prediction groups and setting different prediction modes for each prediction group, flexible prediction and parallel prediction are achieved, and prediction efficiency is improved.
It improves the efficiency of image decoding and encoding, reduces the amount of data and storage space, and saves transmission bandwidth.
Smart Images

Figure CN116074500B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of video coding and decoding technology, and in particular to an image decoding method, an encoding method and an apparatus. Background Art
[0002] A complete image in a video is usually called a "frame", and a video composed of many frames in time order is called a video sequence. Video sequences contain a series of redundant information, such as spatial redundancy, temporal redundancy, visual redundancy, information entropy redundancy, structural redundancy, knowledge redundancy, and importance redundancy. In order to remove redundant information in video sequences as much as possible and reduce the amount of data representing the video, video coding technology is proposed to achieve the effect of reducing storage space and saving transmission bandwidth. Video coding technology is also called video compression technology.
[0003] With the continuous development of technology, it is becoming more and more convenient to collect video data, and the scale of collected video data is also getting larger and larger. Therefore, how to effectively encode and decode video data has become an urgent problem that needs to be solved. Summary of the invention
[0004] The present application provides an image decoding method, an encoding method and an apparatus, which solve the problem of low prediction efficiency in the process of image encoding and decoding (or video encoding and decoding).
[0005] This application adopts the following technical solutions:
[0006] In a first aspect, an image decoding method includes: parsing a bitstream to obtain syntax elements, the syntax elements being used to obtain a residual block of a unit to be decoded, wherein the unit to be decoded includes at least one prediction group; determining a prediction mode of any one prediction group in the at least one prediction group; predicting the any one prediction group based on the prediction mode to obtain a prediction value of the any one prediction group; and decoding the unit to be decoded based on the residual block of the unit to be decoded and the prediction value of the at least one prediction group.
[0007] In this way, compared with the technical solution of directly performing prediction on the coding unit itself, it is helpful to achieve flexible prediction for the coding unit. For example, by reasonably setting the partitioning mode, it is helpful to achieve parallel prediction for multiple prediction groups and set different prediction modes for different prediction groups, etc., thereby improving prediction efficiency and then improving coding efficiency.
[0008] In a possible implementation, any one prediction group includes: a row of pixels in the unit to be decoded; or a column of pixels in the unit to be decoded, or a plurality of consecutive columns of elements, or a plurality of consecutive odd-numbered columns of pixels, or a plurality of consecutive even-numbered columns of pixels.
[0009] In one possible implementation, the at least one prediction group includes: a plurality of prediction groups formed by dividing the unit to be decoded vertically into equal parts; or, a plurality of prediction groups formed by dividing the unit to be decoded horizontally into equal parts; or, a plurality of prediction groups formed by dividing the unit to be decoded along the vertical direction according to a preset ratio; or, a plurality of prediction groups formed by dividing the unit to be decoded along the horizontal direction according to a preset ratio.
[0010] In a possible implementation manner, the at least one prediction group includes multiple prediction groups; and prediction modes of at least two prediction groups in the multiple prediction groups are different.
[0011] In a possible implementation, the prediction mode of any one of the prediction groups includes: at least one of horizontal prediction, vertical prediction, horizontal average prediction and vertical average prediction. Alternatively, the prediction mode of any one of the prediction groups includes: using pixel values of adjacent decoding units to the unit to be decoded, or independent decoding units adjacent to the independent decoding unit where the unit to be decoded is located for reference prediction.
[0012] In a possible implementation, the any one prediction group is a chrominance prediction group or a luminance prediction group.
[0013] In a possible implementation manner, the syntax element further includes identification information of a division mode of the unit to be decoded, where the division mode is a division manner used when the unit to be decoded is divided into the at least one prediction group.
[0014] In a possible implementation manner, the syntax element further includes a prediction mode of any one prediction group.
[0015] In a possible implementation manner, the syntax element is specifically used to obtain at least one residual small block divided by the residual block, so as to obtain the residual block.
[0016] In a possible implementation, the syntax element further includes: index information of a grouping method of the residual block, and different index information is used to indicate different grouping methods.
[0017] In a possible implementation manner, the syntax element further includes a first indicator, and the first indicator is used to indicate whether to group the residual blocks or not.
[0018] In a possible implementation manner, the residual block includes a luminance residual block or a chrominance residual block.
[0019] In a possible implementation, the syntax element specifically includes: first information obtained after the residual block is transformed, quantized and coefficient encoded; the method also includes: coefficient decoding, inverse quantization and inverse transformation of the first information to obtain the residual block.
[0020] In one possible implementation, the syntax element specifically includes: second information obtained after transformation, quantization and coefficient encoding of any residual small block of the residual block; the method also includes: coefficient decoding, inverse quantization and inverse transformation of the second information to obtain the any residual small block.
[0021] In a possible implementation manner, the residual block is a residual block of a to-be-decoded unit granularity, or a residual block of a prediction block granularity.
[0022] In a possible implementation, the width of the unit to be decoded is larger than its height, and the height is smaller than or equal to a preset threshold.
[0023] In a second aspect, an image encoding method is provided, the method comprising: dividing a coding unit into at least one prediction group; predicting any one of the at least one prediction group according to a corresponding prediction mode to obtain a prediction value of the any one prediction group; obtaining a residual block of the coding unit based on the prediction value of the at least one prediction group; and encoding the residual block of the coding unit.
[0024] In this way, compared with the technical solution of directly performing prediction on the unit to be decoded itself, it helps to achieve flexible prediction for the unit to be decoded. For example, by reasonably setting the partitioning mode, it helps to achieve parallel prediction for multiple prediction groups and set different prediction modes for different prediction groups, etc., thereby improving the prediction efficiency and then improving the decoding efficiency.
[0025] In a third aspect, the present application provides an image decoding device, which may be a video decoder or a device including a video decoder. The decoding device includes various modules for implementing the method in any possible implementation of the first aspect, such as an entropy decoding unit, a prediction processing unit, and a decoding unit.
[0026] The beneficial effects can be found in the description of any aspect of the first aspect, which will not be repeated here. The decoding device has the function of implementing the behavior in the method example of the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0027] In a fourth aspect, the present application provides an image encoding device, which may be a video encoder or a device including a video encoder. The encoding device includes various modules for implementing the method in any possible implementation of the second aspect. The encoding device includes: a partitioning unit, a prediction processing unit, a residual calculation unit, and a coding unit.
[0028] The beneficial effects can be found in the description of any one of the second aspects, which will not be repeated here. The encoding device has the function of implementing the behavior in any one of the method examples of the second aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0029] In a fifth aspect, the present application provides an electronic device comprising a processor and a memory, wherein the memory is used to store computer instructions, and the processor is used to call and execute the computer instructions from the memory to implement a method of any one of the implementation modes in the first to second aspects.
[0030] For example, the electronic device may refer to a video encoder, or a device including a video encoder.
[0031] For another example, the electronic device may refer to a video decoder, or a device including a video decoder.
[0032] In a sixth aspect, the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed by a computing device or a storage system where the computing device is located, a method of implementing any one of the first to second aspects is implemented.
[0033] In a seventh aspect, the present application provides a computer program product, which includes instructions. When the computer program product runs on a computing device or a processor, the computing device or the processor executes the instructions to implement a method of any one of the implementation modes of the first to second aspects.
[0034] In an eighth aspect, the present application provides a chip comprising a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and execute the computer instructions from the memory to implement a method of any one of the implementation modes in the first to second aspects.
[0035] In a ninth aspect, the present application provides an image decoding system, which includes an encoding end and a decoding end, the decoding end is used to implement the method of any one of the implementation modes in the first aspect, and the encoding end is used to implement the method of any one of the implementation modes in the second aspect.
[0036] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of the architecture of the encoding and decoding system used in the embodiments of the present application;
[0038] Figure 2A schematic block diagram of an example of an encoder for implementing an embodiment of the present application;
[0039] Figure 3 A schematic block diagram of an example of a decoder for implementing an embodiment of the present application;
[0040] Figure 4 A schematic diagram of various prediction methods provided in the embodiments of the present application;
[0041] Figure 5 A schematic diagram of a flow chart of an image encoding method provided in an embodiment of the present application;
[0042] Figure 6 A schematic diagram of a correspondence between an image, a parallel coding unit, an independent coding unit, a coding unit, a prediction group (PG), and a sub-residual block (RB) provided in an embodiment of the present application;
[0043] Figure 7 A flowchart of an image decoding method provided in an embodiment of the present application;
[0044] Figure 8-Figure 15 A schematic diagram of a division mode and a prediction mode of a 16*4 coding unit provided in an embodiment of the present application;
[0045] Figure 16-Figure 19 A schematic diagram of a division mode and a prediction mode of an 8*2 coding unit provided in an embodiment of the present application;
[0046] Figure 20-23 A schematic diagram of a division mode and a prediction mode of a 16*2 coding unit provided in an embodiment of the present application;
[0047] Figure 24-25 A schematic diagram of a division mode and a prediction mode of an 8*1 coding unit provided in an embodiment of the present application;
[0048] Figure 26-Figure 28 Schematic diagrams of several other division modes provided in the embodiments of the present application;
[0049] Figure 29-Figure 31 A schematic diagram of grouping multiple residual blocks of a prediction group provided in an embodiment of the present application;
[0050] Fig.32 A schematic diagram of a correspondence between a residual block and a residual sub-block provided in an embodiment of the present application;
[0051] Fig.33 A schematic diagram of the structure of a decoding device provided in an embodiment of the present application;
[0052] Fig.34 A schematic diagram of the structure of an encoding device provided in an embodiment of the present application;
[0053] Fig.35 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] The term "at least one (kind)" in the embodiments of the present application includes one (kind) or more (kinds). "More than one (kind)" refers to two (kinds) or more than two (kinds). For example, at least one of A, B and C includes: A exists alone, B exists alone, A and B exist at the same time, A and C exist at the same time, B and C exist at the same time, and A, B and C exist at the same time. In the description of the present application, unless otherwise specified, " / " means or, for example, A / B can represent A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. "More than one" refers to two or more than two. In addition, in order to facilitate the clear description of the technical solution of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and so on are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not necessarily limit the differences.
[0055] The following describes the system architecture used in the embodiments of the present application.
[0056] See also Figure 1 , a schematic diagram of the architecture of the encoding and decoding system 10 used in the embodiment of the present application is given. Figure 1 As shown, the coding and decoding system 10 may include a source device 11 and a destination device 12. The source device 11 is used to encode an image, so the source device 11 may be referred to as an image encoding device or a video encoding device. The destination device 12 is used to decode the encoded image data generated by the source device 11, so the destination device 12 may be referred to as an image decoding device or a video decoding device.
[0057] Source device 30 and destination device 31 may include a variety of devices, including desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, telephone handsets such as so-called "smart" phones, televisions, cameras, display devices, digital media players, video game consoles, in-vehicle computers, or the like.
[0058] Optionally, Figure 1The source device 11 and the destination device 12 may be two separate devices, or the source device 11 and the destination device 12 may be the same device, that is, the source device 11 or the corresponding function and the destination device 12 or the corresponding function may be integrated on the same device.
[0059] The source device 11 and the destination device 12 may communicate with each other, for example, the destination device 12 may receive the encoded image data from the source device 11. In one example, one or more communication media may be included between the source device 11 and the destination device 12, and the encoded image data is transmitted through the one or more communication media, and the one or more communication media may include routers, switches, base stations, or other devices that facilitate communication from the source device 11 to the destination device 12.
[0060] like Figure 1 As shown, the source device 11 includes an encoder 112. Optionally, the source device 11 may also include an image preprocessor 111 and a communication interface 113. The image preprocessor 111 is used to perform preprocessing on the received image to be encoded. For example, the preprocessing performed by the image preprocessor 111 may include refurbishment, color format conversion (for example, from RGB format to YUV format), color adjustment or denoising, etc. The encoder 112 is used to receive the preprocessed image and process the preprocessed image using a related prediction mode (such as the prediction mode in each embodiment of this article) to provide encoded image data. In some embodiments, the encoder 112 can be used to perform the encoding process in each embodiment described below. The communication interface 113 can be used to transmit the encoded image data to the destination device 12 or any other device (such as a memory) for storage or direct reconstruction. The other device can be any device for decoding or storage. The communication interface 113 can also encapsulate the encoded image data into a suitable format before transmission.
[0061] Optionally, the image preprocessor 111 , the encoder 112 , and the communication interface 113 may be hardware components in the source device 11 , or may be software programs in the source device 11 , which is not limited in the embodiment of the present application.
[0062] Continue as Figure 1As shown, the destination device 12 includes a decoder 122. Optionally, the destination device 12 may also include a communication interface 121 and an image post-processor 123. The communication interface 121 may be used to receive encoded image data from the source device 11 or any other source device, such as a storage device. The communication interface 121 may also decapsulate the data transmitted by the communication interface 113 to obtain the encoded image data. The decoder 122 is used to receive the encoded image data and output the decoded image data (also referred to as reconstructed image data or reconstructed image data). In some embodiments, the decoder 122 may be used to perform the decoding process described in the various embodiments described below.
[0063] The image post-processor 123 is used to perform post-processing on the decoded image data to obtain post-processed image data. The post-processing performed by the image post-processor 123 may include: color format conversion (for example, from YUV format to RGB format), color adjustment, repair or resampling, or any other processing, and may also be used to transmit the post-processed image data to a display device for display.
[0064] Similarly, optionally, the communication interface 121, decoder 122 and image post-processor 123 may be hardware components in the destination device 12, or may be software programs in the destination device 12, which is not limited in the embodiment of the present application.
[0065] Below Figure 1 The structure of the encoder and decoder in is briefly introduced.
[0066] See also Figure 2 , Figure 2 1 is a schematic block diagram of an example of an encoder 20 for implementing an embodiment of the present application. Figure 2 In the embodiment, the encoder includes a prediction processing unit 201, a residual calculation unit 202, a transform processing unit 203, a quantization unit 204, an entropy coding unit 205, an inverse quantization unit (also referred to as an inverse quantization unit) 206, an inverse transform processing unit (also referred to as an inverse transform processing unit 207), a reconstruction unit (or referred to as a reconstruction unit) 208, and a filter unit 209. Optionally, the encoder 20 may further include a buffer and a decoded image buffer, wherein the buffer is used to cache the reconstructed image block output by the reconstruction unit 208, and the decoded image buffer is used to cache the filtered image block output by the filter unit 209.
[0067] The input of the encoder 20 is an image block of an image (which may be referred to as an image to be encoded), which may also be referred to as a current image block or an image block to be encoded. In one embodiment of the present application, the image block to be encoded may be an encoding unit. The encoder 20 may also include a segmentation unit ( Figure 2The encoder 20 is used for encoding the image to be encoded block by block, for example, performing the encoding process on each image block.
[0068] The prediction processing unit 201 is used to receive or obtain an image block (the current image block to be encoded of the current image to be encoded, which may also be referred to as the current image block, and the image block may be understood as the true value of the image block) and reconstructed image data, and predict the current image block based on the relevant data in the reconstructed image data to obtain a prediction block of the current image block. Optionally, the prediction processing unit 201 may include an inter-frame prediction unit, an intra-frame prediction unit, and a mode selection unit, the mode selection unit being used to select an intra-frame prediction mode or an inter-frame prediction mode. If the intra-frame prediction mode is selected, the prediction process is performed by the intra-frame prediction unit, and if the inter-frame prediction mode is selected, the prediction process is performed by the inter-frame prediction unit.
[0069] The residual calculation unit 202 is used to calculate the residual value between the real value of the image block and the prediction block of the image block to obtain the residual block, for example, by subtracting the pixel value of the prediction block from the pixel value of the image block pixel by pixel.
[0070] The transform processing unit 203 is used to perform a transform, such as discrete cosine transform (DCT) or discrete sine transform (DST), on the residual block to obtain a transform coefficient in the transform domain. The transform coefficient may also be referred to as a transform residual coefficient, which may represent the residual block in the transform domain.
[0071] The quantization unit 204 is used to quantize the transform coefficients by applying scalar quantization or vector quantization to obtain quantized transform coefficients, which may also be referred to as quantized residual coefficients. The quantization process may reduce the bit depth associated with some or all of the transform coefficients. For example, an n-bit transform coefficient may be rounded down to an m-bit transform coefficient during quantization, where n is greater than m. The degree of quantization may be modified by adjusting a quantization parameter (QP). For example, for scalar quantization, different scales may be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to finer quantization, while a larger quantization step size corresponds to coarser quantization. A suitable quantization step size may be indicated by a quantization parameter (QP).
[0072] The entropy coding unit 205 is used to entropy code the above-mentioned quantized residual coefficients, and the encoded image data (i.e., the encoding result of the current image block to be encoded) output in the form of an encoded bit stream can then be transmitted to a decoder, or stored, and subsequently transmitted to a decoder or used for retrieval. The entropy coding unit 205 can also be used to entropy code other syntax elements of the current image block, such as entropy coding the prediction mode to a bit stream, etc. Entropy coding algorithms include but are not limited to variable length coding (VLC) algorithms, context adaptive VLC (CAVLC) algorithms, arithmetic coding algorithms, context adaptive binary arithmetic coding (CABAC) algorithms, syntax-based context adaptive binary arithmetic coding (SBAC) algorithms, and probability interval partitioning entropy (PIPE) algorithms.
[0073] The dequantization unit 206 is used to dequantize the quantized coefficients to obtain dequantized coefficients, where the dequantization is the reverse application of the quantization unit 204, for example, based on or using the same quantization step size as the quantization unit 204, and applying an inverse quantization scheme of the quantization scheme applied by the quantization unit 204. The dequantized coefficients may also be referred to as dequantized residual coefficients.
[0074] The inverse transform processing unit 207 is used to perform an inverse transform on the inverse quantized coefficients. It should be understood that the inverse transform is the reverse application of the transform processing unit 203. For example, the inverse transform may include an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST) to obtain an inverse transform block in a pixel domain (or sample domain). The inverse transform block may also be called an inverse transform inverse quantized block or an inverse transform residual block.
[0075] The reconstruction unit 208 is used to add the inverse transform block (i.e., the inverse transform residual block) to the prediction block to obtain a reconstructed block in the sample domain. The reconstruction unit 208 can be a summer, for example, adding the sample value (i.e., pixel value) of the residual block to the sample value of the prediction block. The reconstructed block output by the reconstruction unit 208 can be subsequently used to predict other image blocks, for example, in an intra-frame prediction mode.
[0076] The filter unit 209 (or simply "filter") is used to filter the reconstructed block to obtain a filtered block, so as to smoothly perform pixel conversion or improve image quality. The filter unit can be a loop filter unit, which is intended to represent one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter or other filters, such as a bilateral filter, an adaptive loop filter (ALF), or a sharpening or smoothing filter, or a collaborative filter. Optionally, the filtered block output by the filter unit 209 can be subsequently used to predict other image blocks, for example, in an inter-frame prediction mode.
[0077] Specifically, in the embodiment of the present application, the encoder 20 is used to implement the encoding method described in the embodiments below.
[0078] See also Figure 3 , Figure 3 A schematic block diagram of an example of a decoder 30 for implementing an embodiment of the present application is shown. The decoder 30 is used to receive, for example, encoded image data (i.e., an encoded bit stream, for example, an encoded bit stream including an image block and associated syntax elements) encoded by the encoder 20 to obtain a decoded image. The decoder 30 includes an entropy decoding unit 301, an inverse quantization unit 302, an inverse transform processing unit 303, a prediction processing unit 304, a reconstruction unit 305, and a filter unit 306. In some examples, the decoder 30 may perform substantially the same Figure 2 The decoding pass is the inverse of the encoding pass described by the encoder 20. Optionally, the decoder 30 may further include a buffer and a decoded image buffer, wherein the buffer is used to cache the reconstructed image block output by the reconstruction unit 305, and the decoded image buffer is used to cache the filtered image block output by the filter unit 306.
[0079] The entropy decoding unit 301 is used to perform entropy decoding on the encoded image data to obtain quantized coefficients and / or decoded encoding parameters (for example, the decoded parameters may include any one or all of inter-frame prediction parameters, intra-frame prediction parameters, filter parameters and / or other syntax elements). The entropy decoding unit 301 is also used to forward the above-mentioned decoded encoding parameters to the prediction processing unit 304, so that the prediction processing unit performs a prediction process according to the encoding parameters.
[0080] The function of the inverse quantization unit 302 may be the same as that of the inverse quantization unit 206 of the encoder 20 , for inverse quantizing (ie, inverse quantizing) the quantized coefficients decoded by the entropy decoding unit 301 .
[0081] The function of the inverse transform processing unit 303 may be the same as that of the inverse transform processing unit 207 of the encoder 20, and the function of the reconstruction unit 305 (e.g., a summer) may be the same as that of the reconstruction unit 208 of the encoder 20, and is used to perform an inverse transform (e.g., an inverse DCT, an inverse integer transform, or a conceptually similar inverse transform process) on the above-mentioned quantized coefficients to obtain an inverse transform block (also referred to as an inverse transform residual block), which is the residual block of the current image block in the pixel domain.
[0082] The prediction processing unit 304 is used to receive or obtain the encoded image data (e.g., the encoded bit stream of the current image block) and the reconstructed image data. The prediction processing unit 301 can also receive or obtain prediction related parameters and / or information about the selected prediction mode (i.e., decoded encoding parameters) from, for example, the entropy decoding unit 302, and predict the current image block based on the related data in the reconstructed image data and the decoded encoding parameters to obtain the prediction block of the current image block. Optionally, the prediction processing unit 304 can include an inter-frame prediction unit, an intra-frame prediction unit, and a mode selection unit. The mode selection unit is used to select an intra-frame prediction mode or an inter-frame prediction mode. If the intra-frame prediction mode is selected, the prediction process is performed by the intra-frame prediction unit. If the inter-frame prediction mode is selected, the prediction process is performed by the inter-frame prediction unit.
[0083] The reconstruction unit 305 is used to add the inverse transform block (ie, the inverse transform residual block) to the prediction block to obtain a reconstructed block in the sample domain, for example, adding the sample values of the inverse transform residual block to the sample values of the prediction block.
[0084] The filter unit 306 is configured to filter the reconstructed block to obtain a filtered block, where the filtered block is a decoded image block.
[0085] Specifically, in the embodiment of the present application, the decoder 30 is used to implement the decoding method described in the embodiments below.
[0086] It should be understood that in the encoder 20 and decoder 30 of the embodiment of the present application, the processing result of a certain link can also be output to the next link after further processing. For example, after the interpolation filtering, motion vector derivation or filtering and other links, the processing results of the corresponding link are further subjected to operations such as Clip or shift.
[0087] The following is an introduction to the technical terms involved in the embodiments of the present application:
[0088] Division mode: In an embodiment of the present application, the division mode is a division method used when dividing the current image block (such as a unit to be encoded / a unit to be decoded) into prediction groups (ie, prediction blocks).
[0089] Prediction mode: The combination of prediction methods used to predict the current image block (such as the unit to be encoded / the unit to be decoded) is called a prediction mode. Different prediction methods can be used to predict different pixels in the current image block, or the same prediction method can be used. The prediction methods used to predict all pixels in the current image block can be collectively referred to as the (or corresponding) prediction mode of the current image block.
[0090] Exemplarily, the prediction mode includes an intra-frame prediction mode and an inter-frame prediction mode. The intra-frame prediction mode includes a combination of one or more prediction modes such as vertical prediction, horizontal prediction, vertical mean prediction, and horizontal mean prediction. The inter-frame prediction mode includes motion estimation, etc.
[0091] For example, vertical prediction is to use the pixel value above the current pixel (that is, it can be the adjacent upper side or the non-adjacent upper side but close to the upper side) to obtain the predicted value of the current pixel value. One example is: using the reconstructed pixel value adjacent to the upper side as the predicted value of the current pixel.
[0092] For example, horizontal prediction is to use the pixel value on the left side of the current pixel (that is, it can be the adjacent left side or the non-adjacent but closer left side) to obtain the predicted value of the current pixel value. One example is: using the reconstructed pixel value adjacent to the left side as the predicted value of the current pixel.
[0093] For example, vertical mean prediction is to use the pixel values above and below the current pixel to obtain the predicted value of the current pixel value. An example is: the predicted value of the current pixel value is the average of the adjacent pixel values vertically above and the adjacent pixel values vertically below.
[0094] For example, the horizontal average prediction is to use the pixel values on the left and right sides of the current pixel to obtain the predicted value of the current pixel value. An example is: the predicted value of the current pixel value is the average of the adjacent pixel values on the horizontal left and the adjacent pixel values on the horizontal right.
[0095] like Figure 4 , which is a schematic diagram of various prediction methods provided in the embodiments of the present application. Figure 4 A small square in the figure represents a pixel. Pixels with different labels are used to represent different prediction methods, specifically vertical prediction, horizontal prediction, vertical mean prediction and horizontal mean prediction. Figure 4 The schematic diagrams of various prediction methods shown can be used to explain any of the related drawings involved in this application, such as Figure 8 wait.
[0096] The video encoding and decoding method provided in the embodiments of the present application is described below in conjunction with the accompanying drawings.
[0097] like Figure 5FIG. 1 is a flow chart of an image encoding method provided in an embodiment of the present application. The method may be executed by an encoding end. For example, the encoding end may be Figure 1 or Figure 2 The encoder in can also be Figure 1 The source device in . Figure 5 The method shown includes the following steps:
[0098] S101: Divide the coding unit into at least one prediction group (Prediction Group, also referred to as Group or PG for short), where a prediction group includes at least one pixel.
[0099] In an example, the width of the coding unit is greater than its height, and the height is less than or equal to a preset threshold.
[0100] In one example, the preset threshold is 4 or 8, etc.
[0101] In S101, the coding unit may be divided into one prediction group or multiple non-overlapping prediction groups. The coding unit is divided into one prediction group, that is, the coding unit is used as a prediction group, which can be understood as not dividing the coding unit, and can also be understood as a special division method. If the coding unit is divided into one prediction group, in one example, the encoding end may not perform S101.
[0102] In one implementation, one prediction group in the at least one prediction group includes: a row of pixels in the coding unit; or a column of pixels in the coding unit, or a plurality of consecutive columns of elements, or a plurality of consecutive odd-numbered columns of pixels, or a plurality of consecutive even-numbered columns of pixels. For specific examples, please refer to Figure 8-Figure 15 or Figure 20-23 .
[0103] In another implementation, the at least one prediction group includes: a plurality of prediction groups formed by dividing the coding unit into equal parts vertically; or a plurality of prediction groups formed by dividing the coding unit into equal parts horizontally; or a plurality of prediction groups formed by dividing the coding unit into equal parts vertically according to a preset ratio; or a plurality of prediction groups formed by dividing the coding unit into equal parts horizontally according to a preset ratio. For specific examples, please refer to Figure 26-Figure 28 .
[0104] It is understandable that when the coding unit is divided into at least one prediction group, a variety of division modes can be used. The specific division mode to be used can be determined by the coding end based on a predefined rule (such as a rule predefined according to a standard), or determined in combination with the content of the coding unit (such as texture and other information), or determined based on rate-distortion cost and other methods. The embodiment of the present application does not limit this. For the decoding end, it can be determined based on the same method to determine which division mode the coding end actually adopts. Of course, if the coding end adopts the above-mentioned latter two methods (of course, other methods other than predefined) to determine which division mode to adopt, the coding end can also send the identification information of the division mode of the coding unit (that is, the actual division mode) as part of the syntax element to the decoding end, and the division mode of the unit to be decoded corresponding to the coding unit can be determined by the identification of the division mode in the syntax element obtained by decoding.
[0105] S102: For any one prediction group of the at least one prediction group, predict the prediction group (i.e., the original value of the pixel value of the prediction group) according to the corresponding prediction mode to obtain a prediction value of each prediction group (i.e., the predicted value of the pixel value of the prediction group).
[0106] One prediction group corresponds to one prediction mode. If a prediction mode is used to predict the original value of the pixel value of a prediction group, there is a corresponding relationship between the prediction mode and the prediction group.
[0107] In an example, the prediction mode corresponding to a prediction group may include a combination of one or more of vertical prediction, horizontal prediction, vertical mean prediction, and horizontal mean prediction.
[0108] In an example, the prediction mode corresponding to a prediction group may also include using pixel values of coding units adjacent to the coding unit for reference prediction, or using pixel values of independent coding units adjacent to the independent coding unit where the coding unit is located for reference prediction.
[0109] In one example, the at least one prediction group includes multiple prediction groups. At least two prediction groups in the multiple prediction groups have different prediction modes. For example, the prediction mode of one prediction group is a vertical prediction mode, and the prediction mode of another prediction group is a horizontal average prediction mode.
[0110] In one example, there is an association relationship between the division mode and the prediction mode. In other words, the division mode of a coding unit is related to the prediction mode of each prediction group into which the coding unit is divided. Specifically, after the division mode of a coding unit is determined, the prediction mode of each prediction group into which the coding unit is divided can be determined based on the association relationship.
[0111] There is a corresponding relationship between one division mode and one or more prediction modes.
[0112] When a division mode corresponds to a prediction mode, for the encoding end, when determining that the encoding unit adopts the division mode, the identifier of the prediction mode currently adopted by the prediction group obtained by the division under the division mode (i.e., when executing step S102) may not be carried in the bitstream.
[0113] For example, predefined prediction mode 1 corresponds to partition mode 1, wherein partition mode 1 is to divide the coding unit into prediction groups 1-4, and define the position of each prediction block in the coding unit. Prediction mode 1 is specifically: the prediction methods of prediction groups 1-4 are vertical prediction, horizontal prediction, horizontal prediction, and horizontal prediction, respectively. In this case, once the encoder / decoder determines that the partition mode of the coding unit / unit to be decoded is partition mode 1, it can be determined that the prediction methods of prediction groups 1-4 obtained by partitioning according to partition mode 1 are vertical prediction, horizontal prediction, horizontal prediction, and horizontal prediction, respectively. Therefore, for the encoder, the identifier of the prediction mode currently adopted by the prediction group under the partition mode does not need to be carried in the bitstream.
[0114] When a partition mode corresponds to multiple prediction modes, the encoder can use rate-distortion cost and other methods to determine which prediction mode is currently used. In one implementation, the decoder can determine which prediction mode is currently used based on the same method. In another implementation, the encoder can carry the identifier of the prediction mode currently used by the prediction group under the partition mode in the bitstream, and the decoder can obtain which prediction mode is currently used by decoding the bitstream.
[0115] In one example, there is an association relationship between the prediction group and the prediction mode. In other words, there is a corresponding relationship between a prediction group and the prediction mode of the prediction group. Specifically, after a prediction group is determined, the prediction mode corresponding to the prediction group can be directly determined.
[0116] There is a corresponding relationship between a prediction group and one or more prediction modes.
[0117] When a prediction group corresponds to a prediction mode, the encoder may not carry the identifier of the prediction mode currently used by the prediction group in the bitstream.
[0118] When a prediction group corresponds to multiple candidate prediction modes, the encoder can determine which prediction mode is currently used by using rate-distortion cost or other methods. In one implementation, the decoder can determine which prediction mode is currently used by the prediction group based on the same method. In another implementation, the encoder can carry the identifier of the prediction mode currently used by the prediction group in the bitstream.
[0119] S103: Obtain a residual block of the coding unit based on the prediction value of the coding unit and the coding unit itself (ie, the original value of the pixel value of the coding unit).
[0120] The prediction value of a coding unit is obtained by the prediction values of the prediction groups into which the coding unit is divided. For any one of the at least one prediction group, a residual block of the prediction group is obtained based on the prediction value of the prediction group and the prediction group itself (i.e., the original value of the pixel value of the prediction group).
[0121] S104: Encode the residual block of the coding unit.
[0122] Specifically, operations such as transformation, quantization, and coefficient encoding are performed on the residual block of the coding unit.
[0123] In one example, the residual block of the coding unit is divided into at least one residual block (RB), that is, each residual block is transformed, quantized, and coefficient encoded, etc. The at least one residual block includes one residual block or multiple non-overlapping residual blocks.
[0124] In some implementations, the residual block is a residual block of the coding unit granularity. That is, when executing S104, the residual block of the entire coding unit (i.e., the residual block equal to the size of the coding unit) is divided into at least one residual small block. The size of the residual block of the coding unit is the same as the size of the coding unit.
[0125] In some other implementations, the residual block is a residual block of a prediction group granularity. That is, when executing S104, any one or more (such as each) prediction groups into which the coding unit is divided are respectively divided into at least one residual small block. The size of the residual block of a prediction block is the same as the size of the prediction block.
[0126] In one example, the encoder carries the first indicator in the syntax element. The first indicator is used to indicate whether to group the residual blocks or not to group the residual blocks. For the decoder, based on the first indicator, it can be known whether residual block grouping (or residual block division) is required.
[0127] Specifically: the encoder encodes the residual coefficients of each RB in the at least one residual small block (ie, RB) according to the selected mode to obtain a residual coefficient stream. Specifically, it can be divided into two categories: transforming the residual coefficients and not transforming them.
[0128] For relevant explanations about RB transformation, RB division, residual coefficient encoding method, etc., please refer to the following.
[0129] The image coding method provided by the embodiment of the present application divides the coding unit into at least one prediction group, and predicts the prediction group according to the prediction mode corresponding to the prediction group. In this way, compared with the technical solution of directly performing prediction on the coding unit itself, it is helpful to realize flexible prediction for the coding unit. For example, by reasonably setting the division mode, it is helpful to realize parallel prediction for multiple prediction groups, and set different prediction modes for different prediction groups, etc., so as to improve the prediction efficiency and then improve the coding efficiency.
[0130] The following is a specific example of the encoding method provided in the embodiment of the present application:
[0131] Step 1: Divide a frame of image into one or more non-overlapping parallel coding units. There is no dependency between the parallel coding units and they can be encoded and decoded in parallel / independently.
[0132] Step 2: For each parallel coding unit, the encoding end may divide it into one or more independent coding units that do not overlap each other. The independent coding units may not depend on each other, but may share some header information of the parallel coding unit.
[0133] If the parallel coding unit is divided into an independent coding unit, the size of the independent coding unit is the same as the parallel coding unit; otherwise, the width of the independent coding unit is generally larger than the height. It should be noted that if an independent coding unit is located at the edge of the parallel coding unit, the width of the independent coding unit may be less than or equal to the height.
[0134] The width of the independent coding unit is marked as w_lcu and the height is marked as h_lcu. Both w_lcu and h_lcu are 2 N , N is an integer greater than or equal to 0. Usually, the size of the independent coding unit is fixed w_lcu x h_lcu, for example, the size of the independent coding unit can be 128x4, 64x4, 32x4, 16x4, 8x4, 32x2, 16x2 or 8x2.
[0135] As an example, the size of the independent coding unit can be 128x4. If the size of the parallel coding unit is 256x8, the parallel coding unit can be equally divided into 4 independent coding units. If the size of the parallel coding unit is 288x10, the parallel coding unit can be divided into: the first / second row is 2 128x4 independent coding units and 1 32x4 independent coding unit; the third row is 2 128x2 coding units and 1 32x2 coding unit.
[0136] An independent coding unit may include three components of brightness Y, chrominance Cb, and chrominance Cr (or three components of red R, green G, and blue B), or may include only one of them. If it includes three components, the sizes of these components may be the same or different, depending on the image input format.
[0137] Step 3: For each independent coding unit, the encoding end may further divide it into one or more non-overlapping coding units, wherein each coding unit in the independent coding unit may be interdependent, that is, they may refer to each other during the process of executing the prediction step.
[0138] If the independent coding unit is divided into one coding unit, the size of the coding unit is the same as the size of the independent coding unit.
[0139] If an independent coding unit is divided into multiple non-overlapping coding units, the width of the coding unit is generally larger than the height. It should be noted that if a coding unit is located at the edge area of the independent coding unit, the width of the coding unit may be less than or equal to the height.
[0140] If the independent coding unit is divided into a plurality of non-overlapping coding units, the division method may be a horizontal equal division method, a vertical equal division method, or a horizontal and vertical equal division method. Of course, the specific implementation is not shown here.
[0141] Horizontal equal division method, that is, the height of the coding unit is the same as the height of the independent coding unit, but the width of the two is different. For example, the width of the coding unit can be 1 / 2, 1 / 4, 1 / 8 or 1 / 16 of the width of the independent coding unit.
[0142] The vertical equal division method means that the width of the coding unit is the same as the width of the independent coding unit, but the height of the two is different. For example, the height of the coding unit can be 1 / 2, 1 / 4, 1 / 8 or 1 / 16 of the height of the independent coding unit.
[0143] Horizontal and vertical equal division method, that is, quadtree division.
[0144] Preferably, the encoding end divides the independent coding unit into a plurality of non-overlapping coding units in a horizontally equal manner.
[0145] The width of the coding unit is marked as w_cu and the height is marked as h_cu. Both w_cu and h_cu are 2 N , N is an integer greater than or equal to 0. Usually, the size of the coding unit is fixed w_cu x h_cu, for example, the size of the coding unit can be 16x4, 8x4, 16x2, 8x2, 8x1, 4x1, etc.
[0146] The coding unit may include three components of luminance Y, chrominance Cb, and chrominance Cr (or three components of red R, green G, and blue B), or may include only one of the components. If three components are included, the sizes of the components may be exactly the same or different, which is specifically related to the image input format. When the coding unit includes luminance, the at least one prediction group may specifically be at least one luminance prediction group. When the coding unit includes chrominance, the at least one prediction group may specifically be at least one chrominance prediction group.
[0147] like Figure 6 , which is a schematic diagram of the correspondence between an image, a parallel coding unit, an independent coding unit, a coding unit, a prediction group (PG) and a sub-residual block (RB). Figure 6 In the description, an example is taken in which an image is divided into parallel coding unit 1 and parallel coding unit 2 according to 3:1, and an independent coding unit includes 4 coding units.
[0148] It should be noted that the parallel coding unit, the independent coding unit and the coding unit can be replaced by other names, and the embodiments of the present application are not limited to this.
[0149] It should be noted that, in some optional embodiments, the parallel encoding unit may be directly divided into one or more encoding units.
[0150] Step 4: For the coding unit, it can be further divided into one or more non-overlapping prediction groups. Each PG is encoded and decoded according to the selected prediction mode to obtain the prediction value of the PG, which constitutes the prediction value of the entire coding unit. Based on the prediction value and the original value of the coding unit, the residual value of the coding unit is obtained.
[0151] For the description of the division mode of the prediction group and the prediction mode, please refer to the description elsewhere in this article and will not be repeated here.
[0152] Step 5: Based on the residual values of the coding units, the coding units are grouped to obtain one or more non-overlapping residual blocks (RBs), and the residual coefficients of each RB are encoded and decoded according to the selected mode to form a residual coefficient stream. Specifically, it can be divided into two categories: transforming the residual coefficients and not transforming them.
[0153] RB transformation: The coefficients within the RB can be directly encoded, or the residual block can be transformed, such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), Hadamard transform, etc., and then the transformed coefficients can be encoded.
[0154] RB division: When RB is small, each coefficient in RB can be directly quantized and then binary coded; if RB is large, it can be further divided into multiple CGs (coefficient groups), and then each CG can be quantized and then binary coded.
[0155] For the residual coefficient coding part, a feasible method is: semi-fixed length coding. First, the maximum value of the absolute value of the residual in an RB block is defined as modified maximum (mm). Determine the number of coding bits for the residual coefficient in the RB block (the number of coding bits for the residual coefficient in the same RB block is consistent). For example, if the CL of the current RB block is 2 and the current residual coefficient is 1, then 2 bits are required to encode the residual coefficient 1, which is expressed as 01. If the CL of the previous RB block is 7, it means encoding an 8-bit residual coefficient and a 1-bit sign bit. The determination of CL is to find the minimum M value that satisfies that all residuals of the current sub-block are within the range of [-2^(M-1), 2^(M-1)]. If both -2^(M-1) and 2^(M-1) exist, M should be increased by 1, that is, M+1 bits are required to encode all residuals of the current RB block; if only one of the two boundary values of -2^(M-1) and 2^(M-1) exists, a Trailing bit needs to be encoded to determine whether the boundary value is -2^(M-1) or 2^(M-1); if all residuals do not exist in either -2^(M-1) or 2^(M-1), there is no need to encode the Trailing bit.
[0156] Of course, other residual coefficient encoding methods may also be used, such as an exponential Golomb encoding method, a Golomb-Rice encoding method, a truncated unary code encoding method, a run-length encoding method, directly encoding the original residual value, and the like.
[0157] In addition, for some special cases, the original value can be directly encoded instead of the residual value.
[0158] like Figure 7 FIG. 1 is a flow chart of an image decoding method provided by an embodiment of the present application. The method may be executed by a decoding end. For example, the decoding end may be Figure 1 or Figure 3 The decoder in Figure 1 The destination device in. Figure 7 The method shown includes the following steps:
[0159] S201: Parse the bitstream to obtain syntax elements, wherein the syntax elements are used to obtain a residual block of a unit to be decoded, wherein the unit to be decoded includes at least one prediction group.
[0160] The unit to be decoded in this embodiment may be Figure 5 The encoding unit shown is obtained by encoding. For the relevant description of the size of the unit to be decoded, please refer to the relevant description of the size of the unit to be encoded above, which will not be repeated here.
[0161] In an example, the width of the unit to be decoded is greater than its height, and the height is less than or equal to a preset threshold.
[0162] The syntax element includes information for obtaining the residual block of the unit to be decoded, and the present application does not limit the specific information included in the syntax element. For example, the syntax element includes the first information obtained after the residual block is transformed, quantized and coefficient encoded.
[0163] For the encoding end, after obtaining the syntax element, the syntax element can be encoded to obtain a code stream. For the decoding end, the received code stream is entropy decoded to obtain the syntax element. Subsequently, the first information carried in the syntax element can be coefficient decoded, inversely transformed and inversely quantized to obtain the residual block of the unit to be decoded.
[0164] In one example, the syntax element is specifically used to obtain at least one residual small block divided by the residual block of the unit to be decoded to obtain the residual block. In this case, the syntax element may specifically include: second information obtained after any residual small block of the residual block is transformed, quantized and coefficient encoded.
[0165] For the encoding end, after obtaining the syntax element, the syntax element can be encoded to obtain a bitstream. For the decoding end, the received bitstream is entropy decoded to obtain the syntax element. Subsequently, the second information carried in the syntax element can be coefficient decoded, inversely transformed and inversely quantized to obtain any residual small block.
[0166] In an example, the syntax element further includes: index information of a grouping method of residual blocks of the to-be-decoded unit, and different index information is used to indicate different grouping methods.
[0167] In an example, the syntax element further includes a first indicator, and the first indicator is used to indicate whether to group or not group the residual blocks of the decoding unit.
[0168] In one example, the residual block includes a luma residual block or a chroma residual block.
[0169] In one implementation, the division mode used to divide the coding unit into prediction groups is predefined by the encoding end and the decoding end, for example, predefined based on a protocol.
[0170] In another implementation, the division mode used to divide the coding unit into prediction groups is indicated by the coding end to the decoding end, for example, the coding end carries the first information in the bitstream and sends it to the decoding end, wherein the first information is used to characterize the division mode of the coding unit. The embodiment of the present application does not limit the specific content of the first information.
[0171] It should be noted that the following also describes the prediction mode corresponding to the partition mode (ie, the partition mode is associated with the prediction mode), and the prediction mode corresponding to each prediction group in the coding unit (ie, the coding unit, the partition mode and the prediction mode are associated).
[0172] S202: For any one prediction group among the at least one prediction group, determine a prediction mode of the prediction group.
[0173] In one implementation, the prediction mode corresponding to the partition mode (i.e., the prediction mode is determined with the partition mode as the granularity), or the prediction mode corresponding to each prediction group in the coding unit (i.e., the prediction mode is determined with the prediction group in the coding unit as the granularity), is pre-defined by the encoding end and the decoding end, for example, pre-defined based on a protocol.
[0174] In another implementation, the prediction mode corresponding to the division mode, or the prediction mode corresponding to each prediction group in the coding unit, is indicated by the encoding end to the decoding end. For example, the encoding end carries the second information in the bit stream and sends it to the decoding end, wherein the second information is used to characterize the prediction mode corresponding to each prediction group in the coding unit. The embodiment of the present application does not limit the specific content of the second information.
[0175] In an example, the division mode of the prediction group and the prediction mode of the prediction group can refer to the relevant description in the embodiment of the encoding end in this document, and will not be repeated here.
[0176] S203: Predicting any one of the prediction groups based on the prediction model to obtain a prediction value of the any one of the prediction groups.
[0177] For example, for each prediction group, the original value of the prediction group is obtained based on the residual value of the prediction group and the prediction value of the prediction group, that is, the original value of the prediction group obtained by the decoding end. It is understandable that the original value of the prediction group obtained by the encoding end and the decoding end may be different.
[0178] S204: Decode the unit to be decoded based on the residual block of the unit to be decoded and the prediction value of the at least one prediction group.
[0179] For example, reconstruction is performed based on the residual block of the unit to be decoded and the prediction value of any one of the prediction groups. Subsequently, operations such as filtering may be performed on the reconstructed block to obtain a decoded image block.
[0180] The image decoding method provided by the embodiment of the present application divides the unit to be decoded into at least one prediction group, and predicts the prediction group according to the prediction mode corresponding to the prediction group. In this way, compared with the technical solution of directly performing prediction on the unit to be decoded itself, it is helpful to realize flexible prediction for the unit to be decoded. For example, by reasonably setting the division mode, it is helpful to realize parallel execution of prediction for multiple prediction groups, and to set different prediction modes for different prediction groups, etc., so as to improve the prediction efficiency and then improve the decoding efficiency.
[0181] The following describes the division mode provided in the embodiments of the present application.
[0182] It can be understood that, since the to-be-decoded unit in the above text is obtained after the coding unit is encoded, the correspondence between the coding unit and the prediction group is the same as the correspondence between the to-be-decoded unit and the prediction group. For the sake of brevity in description, only the correspondence between the coding unit and the prediction group is described below, that is, the division mode is described from the perspective of the coding unit or the coding end. The correspondence between the to-be-decoded unit and the prediction group can be inferred based on the content described below, and this application will not go into details.
[0183] The first category is divided into:
[0184] In the first part, for the first coding unit in the independent coding unit, the present application provides the following division mode.
[0185] It should be noted that if an independent coding unit is divided into one coding unit, the first coding unit in the independent coding unit is the independent coding unit itself. If an independent coding unit is divided into multiple non-overlapping coding units, the coding unit in the independent coding unit includes "the pixels in the first row and first column of the independent coding unit".
[0186] It is understandable that when predicting the pixel value of the first pixel (i.e., the pixel in the first row and the first column) in the coding unit targeted by the first part, other pixels cannot usually be referenced. In one example, the pixel value encoding original value of the first pixel or the pixel value of the first pixel can also be encoded into other values (such as the difference between the original value and a preset value, etc.), which is not limited in the embodiment of the present application. The predicted values of the remaining pixels except a first pixel can be predicted in the manner provided in the embodiment of the present application. Therefore, the division mode of the first part does not divide the pixel into any one prediction group.
[0187] Division mode A: the coding unit includes a first prediction group, a second prediction group, and a third prediction group.
[0188] The first prediction group includes pixels other than the first pixel in the first row of the coding unit. The second prediction group includes a plurality of consecutive odd-numbered columns of pixels in the non-first row of pixels of the coding unit. The third prediction group includes a plurality of consecutive even-numbered columns of pixels in the non-first row of pixels of the coding unit.
[0189] In one example, the number of pixels included in a second prediction group is less than or equal to a certain threshold, or the number of pixel columns included in a second prediction group is less than or equal to a certain threshold. In one example, the number of pixels included in a third prediction group is less than or equal to a certain threshold, or the number of pixel columns included in a third prediction group is less than or equal to a certain threshold.
[0190] In one example, the coding unit includes a first prediction group, at least one second prediction group, and at least one third prediction group.
[0191] In the embodiment of the present application, the prediction mode corresponding to each prediction group is not limited. For example, the prediction mode corresponding to the first prediction group includes horizontal prediction. For example, the prediction mode corresponding to the second prediction group includes vertical prediction. For example, the prediction mode corresponding to the non-last column of pixels in the third prediction group includes horizontal average prediction, and the prediction mode corresponding to the last column of pixels in the third prediction group includes horizontal prediction.
[0192] In one example, for the last column of pixels in the third prediction group, since the pixel values of the pixels to the right of the column of pixels have not been obtained when the prediction operation is performed, and the horizontal average value prediction needs to refer to the pixel values of the pixels on the left and right sides of the column of pixels, the prediction mode corresponding to the last column of pixels usually does not use horizontal average value prediction. In one example, horizontal prediction can be used.
[0193] Division mode B: the coding unit includes a first prediction group, a second prediction group, and a third prediction group.
[0194] The first prediction group includes pixels other than the first pixel in the first column of the coding unit. The second prediction group includes odd-numbered row elements in the non-first column of the coding unit. The third prediction group includes even-numbered row elements in the non-first column of the coding unit.
[0195] A second prediction group includes an odd row element or a plurality of consecutive odd row elements in the non-first column pixels of the coding unit. A third prediction group includes an even row element or a plurality of consecutive even row elements in the non-first column pixels of the coding unit.
[0196] The coding unit may include one first prediction group, at least one second prediction group, and at least one third prediction group.
[0197] The embodiment of the present application does not limit the prediction mode corresponding to each prediction group. For example, the prediction mode corresponding to the first prediction group includes vertical prediction. For example, the prediction mode corresponding to the second prediction group includes horizontal prediction. For example, if the prediction mode corresponding to the last even-numbered row element in the third prediction group includes vertical mean prediction; the prediction mode corresponding to the non-last even-numbered row element in the third prediction group includes vertical prediction.
[0198] Division mode C: The coding unit includes a first prediction group and a second prediction group, wherein the first prediction group includes pixels other than the first pixel in the first column of the coding unit, and the second prediction group is a row of pixels in the pixels other than the first column of the coding unit.
[0199] In one example, the coding unit includes a first prediction group and at least one second prediction group.
[0200] In the embodiment of the present application, the prediction mode corresponding to each prediction group is not limited. In one example, the prediction mode corresponding to the first prediction group includes vertical prediction. In one example, the prediction mode corresponding to the second prediction group includes horizontal prediction.
[0201] Partition mode D: The coding unit includes a first prediction group and a second prediction group.
[0202] The first prediction group includes pixels other than the first pixel in the first row of the coding unit, and the second prediction group includes a plurality of consecutive columns of pixels in the pixels in the non-first row of the coding unit.
[0203] In an example, the number of pixels included in a second prediction group is less than or equal to a certain threshold, or the number of pixel columns included in a second prediction group is less than or equal to a certain threshold.
[0204] In one example, the coding unit includes a first prediction group and at least one second prediction group.
[0205] In the embodiment of the present application, the prediction mode corresponding to each prediction group is not limited. In one example, the prediction mode corresponding to the first prediction group includes horizontal prediction. In one example, the prediction mode corresponding to the second prediction group includes vertical prediction.
[0206] Part 2: For non-first coding units in independent coding units, when making predictions, the first pixel of the coding unit can refer to pixels in other coding units in the independent coding unit. Based on this, in one example, the division mode provided by the present application is different from the division mode described in the first part above in that the first prediction group in the division mode AD also includes the first pixel in the coding unit.
[0207] In one implementation, the prediction mode corresponding to any division mode of the second part can refer to the corresponding division mode of the first part.
[0208] For example, the above-mentioned division mode A corresponding to the division mode A' of the second part can be: the coding unit includes a first prediction group, a second prediction group and a third prediction group. The first prediction group includes the first row of pixels of the coding unit. The second prediction group includes a plurality of consecutive odd-numbered columns of pixels in the non-first row of pixels of the coding unit. The third prediction group includes a plurality of consecutive even-numbered columns of pixels in the non-first row of pixels of the coding unit.
[0209] In the embodiment of the present application, the prediction mode corresponding to each prediction group is not limited. For example, the prediction mode corresponding to the first prediction group includes horizontal prediction. For example, the prediction mode corresponding to the second prediction group includes vertical prediction. For example, the prediction mode corresponding to the non-last column of pixels in the third prediction group includes horizontal average prediction, and the prediction mode corresponding to the last column of pixels in the third prediction group includes horizontal prediction.
[0210] For another example, the above division mode D corresponding to the division mode D' of the second part may be: the coding unit includes a first prediction group and a second prediction group, wherein the first prediction group includes the first row of pixels of the coding unit, and the second prediction group includes a plurality of consecutive columns of pixels in the non-first row of pixels of the coding unit.
[0211] In the embodiment of the present application, the prediction mode corresponding to each prediction group is not limited. In one example, the prediction mode corresponding to the first prediction group includes horizontal prediction. In one example, the prediction mode corresponding to the second prediction group includes vertical prediction.
[0212] For explanations of the relevant contents in the partition mode A', reference may be made to the relevant descriptions in the above partition mode A. For explanations of the relevant contents in the partition mode D', reference may be made to the relevant descriptions in the above partition mode D.
[0213] In another implementation, the prediction mode corresponding to any one of the division modes in the second part may correspond to other division modes.
[0214] For example, the above-mentioned division mode B corresponds to the division mode B' of the second part, which can be: the coding unit includes a first prediction group, a second prediction group and a third prediction group. The first prediction group includes the first column of pixels of the coding unit. The second prediction group includes the odd-numbered row elements in the non-first column of pixels of the coding unit. The third prediction group includes the even-numbered row elements in the non-first column of pixels of the coding unit.
[0215] The embodiment of the present application does not limit the prediction mode corresponding to each prediction group. For example, the prediction mode corresponding to the first prediction group includes horizontal prediction. For example, the prediction mode corresponding to the second prediction group includes horizontal prediction. For example, the prediction mode corresponding to the last even-numbered row element in the third prediction group includes vertical mean prediction; the prediction mode corresponding to the non-last even-numbered row element in the third prediction group includes vertical prediction.
[0216] For another example, the division mode C' corresponding to the second part of the above division mode C may be: the coding unit includes a first prediction group and a second prediction group, wherein the first prediction group includes the first column of pixels of the coding unit, and the second prediction group is a row of pixels in the non-first column of pixels of the coding unit.
[0217] In the embodiment of the present application, the prediction mode corresponding to each prediction group is not limited. In one example, the prediction mode corresponding to the first prediction group includes horizontal prediction. In one example, the prediction mode corresponding to the second prediction group includes horizontal prediction.
[0218] In an example, the first type of division method can be applied to any one of 16*4 coding units, 16*2 coding units, and 8*2 coding units, and can also be applied to coding units of other sizes.
[0219] The second classification method
[0220] The coding unit is divided into a prediction group. In other words, the coding unit is not divided. In one example, the number of pixels included in the coding unit is less than or equal to a preset threshold. For example, the size of the coding unit is 8*2.
[0221] The first part is for the first coding unit in the independent coding unit
[0222] In one implementation, the prediction modes corresponding to pixels other than the first pixel in the first row of the coding unit include horizontal prediction, and the prediction modes corresponding to pixels other than the first row include vertical prediction.
[0223] In another implementation, the prediction modes corresponding to pixels other than the first pixel in the first column of the coding unit include vertical prediction, and the prediction modes corresponding to pixels other than the first column include horizontal prediction.
[0224] The second part is for non-first coding units in independent coding units
[0225] In one implementation, the prediction mode corresponding to the first row of pixels in the coding unit includes horizontal prediction, and the prediction mode corresponding to the non-first row of pixels includes vertical prediction.
[0226] In another implementation, the prediction mode corresponding to all pixels of the coding unit includes horizontal prediction.
[0227] The third classification method:
[0228] Division mode 1: The coding unit includes a first prediction group and a second prediction group, wherein the first prediction group includes odd-numbered columns of pixels and the second prediction group includes even-numbered columns of pixels.
[0229] The embodiment of the present application does not limit the prediction mode corresponding to each prediction group. For example, the prediction mode corresponding to the first prediction group includes vertical prediction. The prediction mode corresponding to the non-last column of pixels in the second prediction group includes horizontal average prediction, and the prediction mode corresponding to the last column of pixels includes a horizontal prediction mode.
[0230] Division mode 2: The coding unit includes a first prediction group and a second prediction group, wherein the first prediction group includes even-numbered rows of pixels and the second prediction group includes odd-numbered rows of pixels.
[0231] The embodiment of the present application does not limit the prediction mode corresponding to each prediction group. For example, the prediction mode corresponding to the first prediction group includes horizontal prediction. The prediction mode corresponding to the second prediction group includes vertical mean prediction.
[0232] Division mode 3: The coding unit includes multiple prediction groups, each prediction group includes a row of pixels in the coding unit. The embodiment of the present application does not limit the prediction mode corresponding to each prediction group. For example, the prediction mode corresponding to any one or more prediction groups (such as each prediction group) includes horizontal prediction.
[0233] Division mode 4: The coding unit includes multiple prediction groups, each prediction group includes multiple consecutive columns of pixels. In one example, different prediction groups include the same number of pixel columns. The embodiment of the present application does not limit the prediction mode corresponding to each prediction group. For example, the prediction mode corresponding to any one or more prediction groups includes vertical prediction.
[0234] In an example, the first type of division method can be applied to any one of 16*4 coding units, 16*2 coding units, and 8*2 coding units, and can also be applied to coding units of other sizes.
[0235] In one example, for the first row of the parallel coding unit (including the first coding unit of each parallel coding unit), the above division mode 3 may be used, or only the above division mode 3 is allowed to be used. For the first column, the above division mode 1 or division mode 4 may be used. The first row here is the first row coding unit of the parallel coding unit, and the first column is the first column coding unit of the parallel coding unit.
[0236] In an example, a coding unit may refer to a column of pixels on the left side and a row of pixels on the top side of the coding unit.
[0237] The fourth classification method:
[0238] The coding unit is divided into a prediction group. In other words, the coding unit is not divided. In one example, the number of pixels included in the coding unit is less than or equal to a preset threshold. For example, the size of the coding unit is 8*1.
[0239] Here are a few prediction modes in one of the examples:
[0240] Prediction mode 1: the prediction mode corresponding to the pixels of the coding unit includes vertical prediction, such as all pixels in the coding unit use vertical prediction.
[0241] Prediction mode 2: The prediction mode corresponding to the pixels of the coding unit includes horizontal prediction. For example, all pixels in the coding unit adopt horizontal prediction.
[0242] In an example, for the first row of the parallel coding unit (including the first coding unit of each parallel coding unit), the above prediction mode 2 may be used, or only the above prediction mode 2 is allowed to be used. For the first column, the above prediction mode 1 may be used, or only the above prediction mode 1 is allowed to be used. The first row here is the first row coding unit of the parallel coding unit, and the first column is the first column coding unit of the parallel coding unit.
[0243] In an example, for any coding unit (such as each coding unit) of the parallel coding units, a left column of pixels and an upper row of pixels of the coding unit may be referenced.
[0244] The fifth classification method:
[0245] Division mode E: The coding unit is divided into multiple prediction groups in a vertically even manner. For example, one row of the coding unit is divided into one prediction group. For example, the vertical division is into 2 or 4 prediction groups.
[0246] In one example, if the coding unit is the first coding unit in independent coding units, the first pixel in the coding unit may not be divided into any prediction groups, that is, one of the prediction groups contains other pixels in the first row of the coding unit except the first element.
[0247] Division mode F: The coding unit is divided into multiple prediction groups in a horizontally equal manner. For example, a plurality of consecutive columns of the coding unit are divided into one prediction group. For example, the horizontal division is equal to 2, 4 or 8 prediction groups.
[0248] In one example, if the coding unit is the first coding unit among independent coding units, the first pixel in the coding unit may not be divided into any prediction groups, that is, one of the prediction groups includes other pixels except the first element in the first column of the coding unit, and a column of pixels or multiple consecutive columns of pixels starting from the first column.
[0249] Division mode G: The coding unit is divided into multiple prediction groups along the vertical direction according to a preset ratio.
[0250] The specific value of the preset ratio is not limited in the embodiment of the present application. In one example, the ratio is divided into three prediction groups in the manner of 1:2:1 or 2:1:1 or 1:1:2.
[0251] In one example, if the coding unit is the first coding unit among independent coding units, the first pixel in the coding unit may not be divided into any prediction groups, that is, one of the prediction groups includes pixels other than the first element in the first row of the coding unit, or includes pixels other than the first element in the first row of the coding unit and a row of pixels or multiple consecutive rows of pixels starting from the first row.
[0252] Division mode H: The coding unit is divided into multiple prediction groups along the horizontal direction according to a preset ratio.
[0253] The specific value of the preset ratio is not limited in the embodiment of the present application. In one example, the ratio is divided into three prediction groups in the manner of 1:2:1 or 2:1:1 or 1:1:2.
[0254] In one example, if the coding unit is the first coding unit in an independent coding unit, the first pixel in the coding unit may not be divided into any prediction groups, that is, one of the prediction groups includes other pixels except the first element in the first column of the coding unit, or, includes other pixels except the first element in the first column of the coding unit and a column of pixels or multiple consecutive columns of pixels starting from the first column.
[0255] The embodiment of the present application does not limit the prediction mode corresponding to any of the above-mentioned division modes EH.
[0256] In an example, the first type of division method can be applied to any one of 16*4 coding units, 16*2 coding units, and 8*2 coding units, and can also be applied to coding units of other sizes.
[0257] The division modes provided above are exemplarily described below through specific examples. In some embodiments, the prediction modes corresponding to the division modes are also illustrated.
[0258] Embodiment 1: For 16*4 coding units
[0259] 1.1 For the case where the independent coding unit has only one 16*4 coding unit
[0260] Example 1: Figure 8 As shown, the coding unit includes 5 prediction groups, Group0-4.
[0261] Group 0 consists of pixels in row 1, columns 2 to 16, and uses horizontal prediction.
[0262] Group 1 consists of pixels in the 2nd, 3rd, and 4th rows and the 1st, 3rd, 5th, and 7th columns, and uses vertical prediction.
[0263] Group 2 consists of pixels in the 2nd, 3rd, and 4th rows and the 9th, 11th, 13th, and 15th columns, and uses vertical prediction.
[0264] Group 3 consists of pixels in the 2nd, 3rd, and 4th rows and the 2nd, 4th, 6th, and 8th columns, and uses horizontal prediction.
[0265] Group 4 consists of pixels in the 2nd, 3rd, and 4th rows and the 10th, 12th, 14th, and 16th columns, and pixels in the 10th, 12th, and 14th columns use horizontal average prediction, and pixels in the 16th column use horizontal prediction.
[0266] Example 2: Fig. 9 As shown, the coding unit includes 5 prediction groups, Group0-4. Specifically:
[0267] Group 0 consists of pixels other than the 1st pixel in the 1st column, and adopts vertical prediction.
[0268] Group 1 consists of pixels in row 1, columns 2 to 16, and uses horizontal prediction.
[0269] Group 3 consists of pixels in row 3, columns 2 to 16, and uses horizontal prediction.
[0270] Group 2 consists of pixels in row 2, columns 2 to 16, and uses vertical mean prediction.
[0271] Group 4 consists of pixels in row 4, columns 2 to 16, and uses vertical prediction.
[0272] Example 3: Fig.10 As shown, the coding unit includes 5 prediction groups, Group0-4. Specifically:
[0273] Group 0 consists of pixels in rows 2 to 4 and columns 1, and uses vertical prediction.
[0274] Group 1 consists of pixels in row 1, columns 2 to 16, and uses horizontal prediction.
[0275] Group 2 consists of pixels in row 2, columns 2 to 16, and uses horizontal prediction.
[0276] Group 3 consists of pixels in row 3, columns 2-16, and uses horizontal prediction.
[0277] Group 4 consists of pixels in row 4, columns 2-16, and uses horizontal prediction.
[0278] Example 4: Fig.11 As shown, the coding unit includes 5 prediction groups, Group0-4. Specifically:
[0279] Group 0 consists of pixels in row 1, columns 2 to 16, and uses horizontal prediction.
[0280] Group 1 consists of pixels in the 2nd, 3rd, and 4th rows and the 1st to 4th columns, and uses vertical prediction.
[0281] Group 2 consists of pixels in rows 2, 3, and 4 and columns 5 to 8, and uses vertical prediction.
[0282] Group 3 consists of pixels in rows 2, 3, and 4 and columns 9 to 12, and uses vertical prediction.
[0283] Group 4 consists of pixels in rows 2, 3, and 4 and columns 13 to 16, and uses vertical prediction.
[0284] The above description is based on a coding unit of size 16*4, and coding units of other sizes can also be divided according to the same principle. For example, for a coding unit of size 16*2, Group 1-4 in Example 1 is 4 pixels, Group 2 and Group 3 are not included in Example 2 (i.e., there are only 3 groups, namely Group 0, 1, and 4), Group 2 and Group 3 are not included in Example 3, and Group 1-4 in Example 4 is 4 pixels.
[0285] 1.2. For the case where there are multiple 16*4 coding units in the independent coding unit
[0286] In the case where an independent coding unit contains multiple 16*4 coding units, the division pattern of the first 16*4 coding unit is as shown in 1.1 above; the division pattern of the subsequent 16*4 coding units is as shown in Figure 12-Figure 15 shown.
[0287] For example, the difference between the division mode of the subsequent 16*4 coding units and the first 16*4 coding unit is the processing of the first pixel, the difference in the prediction mode is the processing of the first column of pixels, and the prediction values of other pixels can be consistent with the processing of the first 16x4 block. Specifically:
[0288] For division mode A or D: the prediction mode corresponding to the first pixel in the first column of the subsequent 16*4 coding unit includes horizontal prediction, and the prediction modes corresponding to other pixels in the first column include vertical prediction.
[0289] For partition mode B or C: the prediction mode corresponding to the 4 pixels in the first column of the subsequent 16*4 coding unit includes horizontal prediction.
[0290] In an example, the 16*4 coding unit in Embodiment 1 may be a 16*4 luminance block or a 16*4 chrominance block.
[0291] In an example, embodiment 1 may also be applicable to coding units of other sizes.
[0292] Embodiment 2: For 8*2 coding units
[0293] 2.1 For the case where the independent coding unit has only one 8*2 coding unit
[0294] like Fig.16 As shown, the remaining 7 pixels except the first pixel in the first row are horizontally predicted, and the 8 pixels in the second row are vertically predicted.
[0295] like Fig.17 As shown, the remaining 7 pixels except the first pixel in the first row are horizontally predicted, the first pixel in the second row is vertically predicted, and the remaining 7 pixels in the second row are horizontally predicted.
[0296] 2.2 For the case where there are multiple 8*2 coding units in the independent coding unit
[0297] For the first 8*2 coding unit in the independent coding units (such as N*2 independent coding units, where N is greater than or equal to 16), its prediction process may be consistent with the prediction process described in 2.1.
[0298] For other 8*2 coding units in the independent coding unit (such as N*2 independent coding units, N is greater than or equal to 16), except for the first column, the prediction process of the remaining pixels can be consistent with the prediction process of the first 8*2 coding unit.
[0299] like Fig.18 As shown, the first pixel in the first column adopts horizontal prediction, and the remaining 1 pixel in the first column adopts vertical prediction.
[0300] like Fig.19 As shown, the 2 pixels in the first row adopt horizontal prediction.
[0301] In an example, the 8*2 coding unit in Embodiment 2 may be an 8*2 luminance block or an 8*2 chrominance block.
[0302] In an example, Embodiment 2 may also be applicable to coding units of other sizes.
[0303] Embodiment 3: For 16*2 coding units
[0304] In one example, for the first row of coding units of the parallel coding units (including the first 16*2 coding unit of each parallel coding unit), only the following example 3 is allowed for division and prediction. For the first column of coding units, only the following example 1 or example 4 is allowed for division and prediction.
[0305] In one example, each 16*2 coding unit may refer to the pixel values of the left column of pixels (2 pixels) and the upper row of pixels (16 pixels).
[0306] Example 1: Fig. 20 As shown, the coding unit includes Group 1-2. Specifically:
[0307] Group 1 is composed of the 1st, 3rd, 5th, 7th, 9th, 11th, 13th, and 15th columns of pixels, and vertical prediction is adopted. In an example, the pixels of Group 1 may refer to the last row of pixels on the upper side of the coding unit and adjacent to the coding unit.
[0308] Group2 consists of pixels in the 2nd, 4th, 6th, 8th, 10th, 10th, 14th, and 16th columns, and pixels other than the pixels in the 16th column are predicted using horizontal averages, and elements in the 16th column are predicted using horizontal predictions.
[0309] Example 2: Fig.21 As shown, the coding unit includes Group 1-2. Specifically:
[0310] Group 1 consists of the second row of pixels and uses horizontal prediction.
[0311] Group 2 is composed of the first row of pixels and uses vertical mean prediction. In an example, the pixels of Group 2 may refer to the last row of pixels on the upper side of the coding unit and adjacent to the coding unit.
[0312] Example 3: Fig. 22 As shown, the coding unit includes Group 1-2. Specifically:
[0313] Group 1 consists of the first row of pixels and uses horizontal prediction.
[0314] Group 2 consists of the second row of pixels and uses horizontal prediction.
[0315] Example 4: Fig.23 As shown, the coding unit includes Group 1-2. Specifically:
[0316] Group 1 consists of pixels in columns 1 to 8 and uses vertical prediction.
[0317] Group 2 consists of pixels in columns 9 to 16 and uses vertical prediction.
[0318] In an example, the pixels of Group 1 and Group 2 may refer to the last row of pixels of a 16*2 coding unit that is above the coding unit and adjacent to the coding unit.
[0319] In an example, the 8*2 coding unit in Embodiment 3 may be an 8*2 luminance block or an 8*2 chrominance block.
[0320] In an example, Embodiment 3 may also be applicable to coding units of other sizes, such as coding units of 16*4 or 8*2.
[0321] Embodiment 4: For 8*1 coding unit
[0322] In one example, the first row coding unit of each parallel coding unit (including the first 8*1 coding unit of each parallel coding unit) is only allowed to be predicted using the following Example 2, and the first column coding unit is only allowed to be predicted using the following Example 1.
[0323] In one example, each 8*1 coding unit may refer to the values of the left column of pixels (1 pixel) and the upper row of pixels (8 pixels).
[0324] The 8*1 coding unit contains only one Group.
[0325] Example 1: Fig.24 As shown, each pixel in the coding unit is vertically predicted.
[0326] Example 2: Fig.25 As shown, each pixel in the coding unit is horizontally predicted.
[0327] Example 5
[0328] Fig.26Several 16*4 coding unit division modes are provided. Among them, Figure a shows that the coding unit is divided into 4 groups vertically. Figure b shows that the coding unit is divided into 3 groups vertically according to 1:2:1. Figure c shows that the coding unit is divided into 4 groups horizontally. Figure d shows that the coding unit is divided into 3 groups horizontally according to 1:2:1. Fig.26 The size of each Group is also shown.
[0329] Fig. 27 Several division modes of 16*2 coding units are provided. Figure a shows that the coding unit is divided vertically into 2 groups. Figure b shows that the coding unit is divided horizontally into 4 groups. Figure c shows that the coding unit is divided horizontally into 3 groups according to 1:2:1. Fig. 27 The size of each Group is also shown.
[0330] Fig.28 Several division modes of 8*2 coding units are provided. Among them, Figure a shows that the coding unit is divided into 2 groups vertically. Figure b shows that the coding unit is divided into 4 groups horizontally. Figure c shows that the coding unit is divided into 3 groups horizontally according to 1:2:1. Fig.28 The size of each Group is also shown.
[0331] It should be noted that:
[0332] On the one hand, for a pixel, the pixel closest to the pixel has the highest correlation with the pixel, and when these pixels are used to predict the pixel, the prediction result is more accurate. The pixel closest to the pixel may include the four pixels adjacent to the pixel in the upper, lower, left, and right directions of the pixel. Of course, this is not the case in the specific implementation. In order to cover one or more of these situations, different prediction modes (such as horizontal prediction, vertical prediction, horizontal average prediction, vertical average prediction, etc.) can be used to predict different pixels in a coding unit.
[0333] On the other hand, considering the parallelism of hardware implementation, prediction can be performed in parallel between different partition groups, thereby improving encoding efficiency or decoding efficiency. For example, see Figure 8 , Figure 8 After executing prediction for Group0, Group1-2 can execute prediction in parallel, and Group3-4 can execute prediction in parallel. Other examples are not listed one by one.
[0334] Based on the above two aspects (i.e., the accuracy of the prediction results and the parallelism of the prediction process), the embodiment of the present application provides a division mode in which the coding unit is divided into prediction groups and a corresponding prediction mode, which helps to improve the coding efficiency and decoding efficiency. Of course, the prediction mode and the division mode may be unrelated. The above division mode and prediction mode are particularly suitable for scenes where the width of the coded image is larger than the height. In one example, the height is less than or equal to a certain threshold.
[0335] The following describes the residual block grouping scheme provided in the embodiment of the present application:
[0336] In an example, if the number of pixels included in a prediction group (or the number of pixels included in a residual block of a prediction group) is greater than or equal to a preset threshold, the residual blocks of the prediction group are grouped.
[0337] In an example, if the number of pixels included in a prediction group (or the number of pixels included in a residual block of a prediction group) is less than a preset threshold, the residual blocks of the prediction group are not grouped.
[0338] For example, the preset threshold may be 3 or 4, and may also be other values.
[0339] The first solution is to group the residual blocks of the first target prediction group. The first target prediction group is a prediction group that contains a row of pixels or a row of pixels other than the first pixel in the coding unit. For example, the first target prediction group can be Figure 8 Group0 in Fig. 9 , Fig.10 , Fig.13 , Fig.14 Any of Group 1-4, Fig.11 , Fig.12 , Fig.15 Group0 in Fig.21 , Fig. 22 Any one of Group1-2, etc.
[0340] In one implementation, the residual block of the first target prediction group is divided into a small residual block, which is equivalent to not grouping the residual block.
[0341] In another implementation, the residual block of the first target prediction group is divided into a plurality of small residual blocks.
[0342] Division mode 1: the plurality of residual small blocks include a first residual small block and a second residual small block. The first residual small block and the second residual small block both include a plurality of continuous pixels, and the difference in the number of pixels included in the first residual small block and the second residual small block is the smallest.
[0343] In one example, the residual block of the first target prediction group is divided equally or as equally as possible into two small residual blocks.
[0344] Division mode 2: The plurality of residual small blocks include a first residual small block, a second residual small block and a third residual small block. The first residual small block, the second residual small block and the third residual small block all contain a plurality of continuous pixels, the difference between the number of pixels contained in the first residual small block and the first number is the smallest, the first number is the sum of the number of pixels contained in the second residual small block and the third residual small block, and the number of pixels contained in the second residual small block and the third residual small block is equal.
[0345] In one example, the residual block of the first target prediction group is divided equally or as equally as possible into two parts, and one part is used as a small residual block, and the other part is further divided into two small residual blocks.
[0346] Division mode 3: The plurality of residual small blocks include a first residual small block, a second residual small block and a third residual small block. The first residual small block, the second residual small block and the third residual small block all contain a plurality of continuous pixels, the difference between the number of pixels contained in the third residual small block and the second number is the smallest, the second number is the sum of the number of pixels contained in the first residual small block and the second residual small block, and the difference between the number of pixels contained in the first residual small block and the second residual small block is the smallest.
[0347] In one example, the residual block of the first target prediction group is divided equally or as equally as possible into two parts, and one part is used as a small residual block, and the other part is further divided as equally as possible into two small residual blocks.
[0348] Division mode 4: the multiple residual blocks include a first residual block, a second residual block, a third residual block and a fourth residual block; wherein the first residual block, the second residual block, the third residual block and the fourth residual block all contain multiple consecutive pixels, and the difference in the number of pixels contained in the first residual block, the second residual block, the third residual block and the fourth residual block is the smallest.
[0349] In one example, the residual blocks of the target prediction group are divided equally or as equally as possible into four parts.
[0350] The second solution is to group the residual blocks of the second target prediction group. The second target prediction group is a prediction group containing multiple columns of pixels in the coding unit. For example, the second target prediction group can be Figure 8 , Fig.11 , Fig.12 , Fig.15 Any of Group 1-4, Fig. 20 , Fig.23 Any one of Group1-2, etc.
[0351] In one implementation, the residual block of the second target prediction group is divided into a small residual block, which is equivalent to not grouping the residual block.
[0352] In another implementation, the residual block of the second target prediction group is divided into multiple small residual blocks.
[0353] Division mode 1: the plurality of residual small blocks include at least two residual small blocks, wherein each residual small block includes one column of pixels or multiple consecutive columns of pixels, and different residual small blocks include the same number of pixel columns.
[0354] Division mode 2: The plurality of residual blocks include a first residual block, a second residual block and a third residual block. Each residual block includes one or more consecutive columns of pixels, and the number of pixel columns included in the first residual block is equal to the sum of the number of pixel columns included in the second residual block and the third residual block;
[0355] Division mode 3: The plurality of residual small blocks include at least four residual small blocks, wherein each residual small block includes one column of pixels or multiple consecutive columns of pixels, and different residual small blocks include the same number of pixel columns.
[0356] The third solution is to group the residual blocks of the third target prediction group. The third target prediction group is a prediction group containing multiple rows of pixels in the coding unit. For example, the third target prediction group can be Figure 16-Figure 19 The prediction group shown in any of the accompanying drawings.
[0357] In one implementation, the residual block of the third target prediction group is divided into a small residual block, which is equivalent to not grouping the residual block.
[0358] In another implementation, the residual block of the third target prediction group is divided into multiple small residual blocks.
[0359] Division mode 1: Each of the plurality of residual small blocks includes a row of pixels or a row of pixels excluding the first pixel.
[0360] In one example, the residual block of the third target prediction group is divided into a plurality of small residual blocks by row.
[0361] Division mode 2: The plurality of residual blocks include a first residual block, a second residual block and a third residual block. The first residual block includes a prediction group of a row of pixels or a row of pixels excluding the first pixel, the second residual block and the third residual block are a plurality of consecutive pixels in the same row, and the difference in the number of pixels between the second residual block and the third residual block is the smallest.
[0362] In one example, the residual block of the third target prediction group is first divided into multiple parts by row, and then one or more of the parts are used as residual small blocks; and another part or multiple parts are divided equally or as equally as possible to obtain residual small blocks.
[0363] Division mode 3: The plurality of residual small blocks include a first residual small block, a second residual small block, a third residual small block and a fourth residual small block. The first residual small block, the second residual small block, the third residual small block and the fourth residual small block all contain a plurality of continuous pixels, and the difference in the number of pixels contained in the first residual small block, the second residual small block, the third residual small block and the fourth residual small block is the smallest.
[0364] In one example, the residual block of the third target prediction group is divided into multiple residual small blocks as evenly as possible, for example, into 4 residual small blocks.
[0365] The residual block division mode provided above is exemplarily described below through specific examples.
[0366] Example 1: Fig.29 FIG. 1 is a schematic diagram of grouping various residual blocks of a prediction group provided by an embodiment of the present application. Fig.29 The size of the coding unit is 16*4, and the prediction group is the other elements in the first row of the coding unit except the first element. For example, the prediction group can be Figure 8 or Fig.11 Group0 in Fig. 9 or Fig.10 Any of Group 1-4.
[0367] Fig.29 Each of the a-e figures in the figure represents a residual block division mode. Each small square in each figure represents a pixel, and the same small square represents the pixels in the same residual block. For example, the b figure shows that the residual block is divided into 2 residual blocks, one of which contains the first 7 pixels marked by the left slash shadow, and the other residual block contains the last 8 pixels marked by the blank.
[0368] Example 2: Fig.30 FIG. 1 is a schematic diagram of grouping various residual blocks of a prediction group provided by an embodiment of the present application. Fig.29 The size of the coding unit is 16*4, and the prediction group is 4 columns of the coding unit. For example, the prediction group can be Figure 8 or Fig.11 Any of Group 1-4.
[0369] Fig.30Each of the a-e figures represents a residual block partitioning mode. Each small square in each figure represents a pixel, and the same small square represents the pixels in the same residual block.
[0370] In an example, the coefficients of pixels in the same sub-residual block are encoded in the same manner, or the coding length (CL), ie, the number of bits occupied by the residual coefficients after encoding, of the pixels in the same sub-residual block is the same.
[0371] In one example, the above Fig.29 and Fig.30 5 division modes of the residual block are shown. In one example, 1 bit or 3 bits can be used to represent the division mode GPM (as shown in Table 1). GP0-GP4 can correspond to Fig.29 Figure a-e in, or corresponding to Fig.30 Figure a-e in the figure.
[0372] Table 1: GPM index encoding method (conventional binary encoding method)
[0373] GPM GP0 GP1 GP2 GP3 GP4 Coded bits 0 100 101 110 111
[0374] It should be noted that the index coding method of the residual block partition mode shown in Table 1 can also be applied to other embodiments, for example, the partition modes of residual blocks applied to prediction groups of other sizes, and other partition modes of the above prediction groups.
[0375] Example 3: Fig.31 FIG. 1 is a schematic diagram of grouping various residual blocks of a prediction group provided by an embodiment of the present application. Fig.31 The description is given by taking an example where the size of the coding unit is 8*2 and the coding unit is divided into one prediction group. Fig.31 The first pixel in each of the a-e images in is not a pixel in the residual block of the prediction group, that is, it does not participate in the grouping of the residual block. Fig.31 The prediction groups involved can be Fig.16 or Fig.17 In any of the figures a-e, the pixels marked with the same shade represent the pixels in the same residual block.
[0376] for Fig.31 For example, the coding unit is divided into only one prediction group, and the residual block of the prediction group shares 5 division modes (ie, GPM). For these 5 GPMs, 1 bit or 3 bits are required to represent the division mode (also shown in Table 1).
[0377] The coding order of the residual blocks (RBs) in the same prediction group is from top to bottom and from left to right. Fig.31 For example, the coding order of each RB is RB0-RB3. Fig.32 It should be noted that the encoding order of the residual small blocks in other embodiments is different from Fig.32 Similarly, based on Fig.32 The above is inferred from the attached drawings and will not be described in detail here.
[0378] It should be noted that when a residual block is divided into a large number of residual sub-blocks, more division mode information needs to be encoded; when a residual block is divided into a small number of residual sub-blocks, residuals with different characteristics are grouped together, and the encoding efficiency of the residual coefficients is not high. Taking at least these two aspects into consideration, the embodiment of the present application provides the above-mentioned residual block division method.
[0379] The following is an exemplary description of other steps involved in the video image encoding and decoding process:
[0380] First, about the high-level syntax implementation example
[0381] The high-level syntax provides unified information for the covered area. In the encoding and decoding process of all pixels in the covered area, the required unified information can be obtained through the high-level syntax. In this way, on the one hand, this information is only encoded once in a certain area, which can effectively save the bit rate; on the other hand, since this information is relatively important, it is concentrated in a specific set for transmission, which can be differentiated from other ordinary data for protection. For example, the following syntax areas can be: the above-mentioned parallel coding unit, independent coding unit, coding unit, PG, RB, or image, image sequence, etc.
[0382] These high-level syntaxes can be encoded and decoded using a fixed-length encoding method or a truncated unary code method.
[0383] 1) Maximum error
[0384] Add the max_distance syntax to a region header to indicate that the maximum error of blocks in a region is max_distance, indicating that the difference between the reconstructed pixel value and the original pixel value of any pixel in the current slice is less than or equal to max_distance; or indicating that the square of the difference between the reconstructed pixel value and the original pixel value of any pixel in the current slice is less than or equal to max_distance.
[0385] 2) Quantization parameters
[0386] The quantization_parameter syntax is added to a region header to indicate the quantization step used by the blocks in the region. The quantization step is used to quantize the residual coefficients or the coefficients after residual transformation to reduce the bit rate overhead.
[0387] When encoding the quantization_parameter syntax, if quantization_parameter is 0, that is, the probability of not performing quantization is high, a shorter codeword should be assigned. That is, a shorter codeword is used to indicate that quantization_parameter is 0. An example is: binary 0 indicates that quantization_parameter is 0, and binary 1*** indicates that quantization_parameter is greater than 0 (* indicates 0 or 1).
[0388] 3) Bit Depth
[0389] Add the bit_depth syntax in a region header (preferably an image header or an image sequence header) to indicate the bit depth of the blocks in a region. The bit depth indicates how many bits are used to encode the pixel value of each pixel. For example, a bit depth of N bits indicates that the pixel value range is [0, 2^N-1]. For example, a bit depth of 8 bits indicates that the pixel value range is [0, 255].
[0390] 4) Whether to encode the original value flag
[0391] Add org_flag syntax (binary, i.e., only two values 0 and 1) to a region header to indicate whether the blocks in a region directly encode the original pixel values. If org_flag is 1, the blocks in a region directly encode the original values, i.e., each pixel is directly encoded using bit_depth bits, without the need to pass other information such as prediction information, prediction value, residual information, etc. This method is to avoid data over-expansion (i.e., the compressed data is significantly larger than the original data) when the above prediction method is useless (such as noise comparison of most image blocks).
[0392] 5) Basic image information
[0393] Add the basic information syntax of the image to a certain area header (preferably the image header or image sequence header) to represent the basic information of the image, such as resolution (i.e., image width and height), image brightness and color format (YUV 444, YUV 420, YUV 422, RGB444, etc.), etc.
[0394] 6) Importance of each component
[0395] If the image consists of multiple components, then add the relevant syntax of the importance of each component in a certain region header (preferably image header or image sequence header). For example, adding luma_weight syntax means that the importance ratio of the three YUV components in the image is luma_weight: 1:1.
[0396] 7) Parallel coding unit syntax and restrictions
[0397] In the picture header or picture sequence header, information related to the size of the parallel independent coding unit is transmitted.
[0398] Solution 1: Pass the width para_unit_width and height para_unit_height of the parallel independent coding unit. Then the image is divided into multiple parallel independent coding units of equal size (except for the parallel independent coding units at the end of each row and each column).
[0399] Solution 1: The number of coding units (or independent coding units) N_CU contained in the parallel independent coding unit is transmitted. Then the image is divided into multiple parallel independent coding units containing the same number of coding units (except the parallel independent coding units at the end of each row and each column).
[0400] Blocks in different parallel coding units cannot refer to each other to ensure parallel encoding and decoding.
[0401] 8) Length map output
[0402] In the image header or image sequence header, the length map information is transmitted to store the offset information of the starting code stream of each independent coding unit and the starting code stream of the current image. The offset needs to be aligned with K (K is preferably 8 or 16) bytes. The lengthmap information is used for the random index of each independent coding unit of the current image, that is, when you want to obtain the information of any independent coding unit in the image, you do not need to decode all the previous independent coding unit code streams.
[0403] Second, special situation handling
[0404] 1) Fill in the end of the line
[0405] Let the size of the basic processing unit be width w_unit and height h_unit.
[0406] If the image width is not an integer multiple of w_unit or the height is not an integer multiple of h_unit, it is padded using the nearest neighbor method to satisfy the width being an integer multiple of w_unit or the height being an integer multiple of h_unit (the right side of the image is filled by copying the available pixels of the nearest neighbor on the left, and the bottom side of the image is filled by copying the available pixels of the nearest neighbor on the top), and then encoded using the conventional method.
[0407] 2) Completing the code stream at the end of a line or image
[0408] At the end of the last block of a row (or image), if the total number of accumulated code streams before the current block is not a multiple of 8 bits, it is padded by adding 0 or 1 to make the total number of accumulated code streams byte-aligned.
[0409] 3) Write residual information
[0410] When writing the residual, hardware requirements are taken into consideration and the residual is written in FxF (F is preferably 4 or 2) as the basic unit, rather than in a raster scan order from top to bottom and from left to right.
[0411] It should be noted that some or all of the features in the above embodiments may be combined in any appropriate manner to obtain new embodiments, unless there is any conflict.
[0412] It is understandable that, in order to implement the functions in the above embodiments, the video encoder / video decoder includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.
[0413] Fig.33 300 is a schematic diagram of the structure of a decoding device 300 provided in the present application. Any of the above decoding method embodiments can be performed by the decoding device. The decoding device 300 includes an entropy decoding unit 3001, a prediction processing unit 3002 and a decoding unit 3003. In an example, the decoding device can be Figure 1 In another example, the decoding device may be Figure 1 The decoder 122 in, or Figure 3 The decoder 30 in FIG.
[0414] In one example, the entropy decoding unit 3001 may Figure 3 The prediction processing unit 3002 can be implemented by the entropy decoding unit 301 in Figure 3 The prediction processing unit 302 in is implemented. The decoding unit 3003 can be Figure 3 In one example, the decoding unit 3003 can also be implemented by Figure 3 The reconstruction unit 305 and the filter unit 306 in are implemented. Figure 3 The current image block in may be the unit to be decoded in this embodiment.
[0415] The entropy decoding unit 3001 is used to parse the bitstream to obtain syntax elements, and the syntax elements are used to obtain the residual block of the unit to be decoded, wherein the unit to be decoded includes at least one prediction group. For example, the entropy decoding unit 3001 can be used to perform Figure 7 S201 in.
[0416] The prediction processing unit 3002 is configured to determine a prediction mode of any one of the at least one prediction group; and to predict the any one of the prediction groups based on the prediction mode to obtain a prediction value of the any one of the prediction groups. Figure 7 S202-S203 in.
[0417] The decoding unit 3003 is configured to decode the unit to be decoded based on the residual block of the unit to be decoded and the prediction value of any one of the prediction groups. For example, the decoding unit 3003 may be configured to perform Figure 7 S204 in.
[0418] For a more detailed description of the entropy decoding unit 3001, the prediction processing unit 3002 and the decoding unit 3003 and their beneficial effects, please refer directly to Figure 7 The relevant description in the method embodiment shown is directly obtained and will not be repeated here.
[0419] Fig.34 3100 is a schematic diagram of the structure of a coding device 3100 provided in the present application, the coding device 3100 includes: a division unit 3101, a prediction processing unit 3102, a residual calculation unit 3103 and a coding unit 3104. In an example, the coding device may be Figure 1 In another example, the encoding device may be Figure 1 The encoder 112 in, or Figure 2 The encoder 20 in.
[0420] In one example, the prediction processing unit 3102, the residual calculation unit 3103 and the encoding unit 3104 can be respectively Figure 2 The prediction processing unit 201, the residual calculation unit 202 and the entropy coding unit 205 in the embodiment are implemented. It should be noted that the division unit 3101 can be used to obtain Figure 2 The unit of the current image block in . Figure 2 The current image block in may be the coding unit in this embodiment.
[0421] For a more detailed description of the above-mentioned division unit 3101, prediction processing unit 3102, residual calculation unit 3103 and encoding unit 3104 and the description of their beneficial effects, please refer directly to Figure 5 The relevant description in the method embodiment shown is directly obtained and will not be repeated here.
[0422] The present application also provides an electronic device for executing any of the above decoding method embodiments. Fig.35 As shown, Fig.35The electronic device 3200 is a schematic diagram of a structure of an electronic device provided by the present application, wherein the electronic device 3200 includes a processor 3210 and an interface circuit 3220. The processor 3210 and the interface circuit 3220 are coupled to each other. It is understood that the interface circuit 3220 may be a transceiver or an input / output interface. In one example, the electronic device 3200 may further include a memory 3230 for storing instructions executed by the processor 3210 or storing input data required by the processor 3210 to execute instructions or storing data generated after the processor 3210 executes instructions.
[0423] The electronic device 3200 includes a processor 3210 and a communication interface 3220. The processor 3210 and the communication interface 3220 are coupled to each other. It is understood that the communication interface 3220 can be a transceiver or an input-output interface. In an example, the electronic device 3200 may also include a memory 3230 for storing instructions executed by the processor 3210 or storing input data required by the processor 3210 to execute instructions, or storing data generated after the processor 3210 executes instructions.
[0424] When the electronic device 3200 is used to implement Figure 7 When the method is shown, the processor 3210 and the interface circuit 3220 are used to perform the functions of the above-mentioned entropy decoding unit 3001, the prediction processing unit 3002 and the decoding unit 3003.
[0425] When the electronic device 3200 is used to implement Figure 5 When the method is shown, the processor 3210 and the interface circuit 3220 are used to execute the functions of the above-mentioned division unit 3101, the prediction processing unit 3102, the residual calculation unit 3103 and the encoding unit 3104.
[0426] The specific connection medium between the communication interface 3220, the processor 3210 and the memory 3230 is not limited in the embodiment of the present application. Fig.35 The communication interface 3220, the processor 3210 and the memory 3230 are connected via a bus 3240. Fig.35 The connections between the other components are shown in bold lines, which are only for illustration and are not intended to be limiting. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.35 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0427] The memory 3230 can be used to store software programs and modules, such as program instructions / modules corresponding to the decoding method or encoding method provided in the embodiment of the present application. The processor 3210 executes the software programs and modules stored in the memory 3230 to perform various functional applications and data processing. The communication interface 3220 can be used to communicate signaling or data with other devices. In the present application, the electronic device 3200 can have multiple communication interfaces 3220.
[0428] It is understandable that the processor in the embodiments of the present application may be a central processing unit (CPU), a neural processing unit (NPU) or a graphic processing unit (GPU), or may be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor.
[0429] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a network device or a terminal device. Of course, the processor and the storage medium can also be present in a network device or a terminal device as discrete components.
[0430] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer program or instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instruction may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc (DVD); it may also be a semiconductor medium, for example, a solid state drive (SSD).
[0431] In the various embodiments of the present application, if there is no special explanation and logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships. In the present application, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In the text description of the present application, the character " / " generally indicates that the previous and next associated objects are in an "or" relationship; in the formula of the present application, the character " / " indicates that the previous and next associated objects are in a "division" relationship.
[0432] It is understood that the various numbers involved in the embodiments of the present application are only for the convenience of description and are not used to limit the scope of the embodiments of the present application. The size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic.
Claims
1. An image decoding method, characterized in that: include: Parsing a bitstream to obtain a syntax element, wherein the syntax element is used to obtain a residual block of a unit to be decoded, wherein the unit to be decoded includes at least one prediction group; determining a prediction mode of any one of the at least one prediction group; Predicting any one of the prediction groups based on the prediction model to obtain a prediction value of the any one of the prediction groups; Decoding the unit to be decoded based on the residual block of the unit to be decoded and the prediction value of the at least one prediction group; Wherein, the at least one prediction group comprises: A prediction group including odd-numbered columns of pixels in the unit to be decoded, and a prediction group including even-numbered columns of pixels in the unit to be decoded.
2. The method according to claim 1, characterized in that: The at least one prediction group includes a plurality of prediction groups; At least two prediction groups among the plurality of prediction groups have different prediction modes.
3. The method according to claim 1, characterized in that The prediction mode of any one of the prediction groups includes: at least one of horizontal prediction, vertical prediction, horizontal mean prediction and vertical mean prediction; Alternatively, the prediction mode of any one of the prediction groups includes: using pixel values of adjacent decoding units to the unit to be decoded, or independent decoding units adjacent to the independent decoding unit where the unit to be decoded is located, for reference prediction.
4. The method according to claim 1, characterized in that Any one of the prediction groups is a chrominance prediction group or a luminance prediction group.
5. The method according to claim 1, characterized in that The syntax element further includes identification information of a division mode of the unit to be decoded, where the division mode is a division method used when the unit to be decoded is divided into the at least one prediction group; And / or, the syntax element further includes a prediction mode of any one prediction group.
6. The method according to claim 1, characterized in that The syntax element further includes a first indicator, where the first indicator is used to indicate whether to group the residual blocks or not.
7. The method according to claim 6, characterized in that The residual block includes a luminance residual block or a chrominance residual block.
8. The method according to claim 1, characterized in that The residual block is a residual block of the to-be-decoded unit granularity, or a residual block of the prediction block granularity.
9. An image encoding method, characterized in that: The method comprises: dividing the coding unit into at least one prediction group; For any one prediction group of the at least one prediction group, predict the any one prediction group according to the corresponding prediction mode to obtain a prediction value of the any one prediction group; Obtaining a residual block of the coding unit based on a prediction value of the at least one prediction group; Encoding the residual block of the coding unit; Wherein, wherein the at least one prediction group comprises: A prediction group including odd-numbered columns of pixels in the coding unit, and a prediction group including even-numbered columns of pixels in the coding unit.
10. An image decoding device, characterized in that: The image decoding device comprises: An entropy decoding unit, used for parsing a bitstream to obtain syntax elements, wherein the syntax elements are used to obtain a residual block of a unit to be decoded, wherein the unit to be decoded includes at least one prediction group; A prediction processing unit, configured to determine a prediction mode of any one prediction group in the at least one prediction group; and to predict the any one prediction group based on the prediction mode to obtain a prediction value of the any one prediction group; A decoding unit, configured to decode the unit to be decoded based on the residual block of the unit to be decoded and the prediction value of the at least one prediction group; Wherein, the at least one prediction group comprises: A prediction group including odd-numbered columns of pixels in the unit to be decoded, and a prediction group including even-numbered columns of pixels in the unit to be decoded.
11. An image encoding device, characterized in that: The image encoding device comprises: A division unit, configured to divide the coding unit into at least one prediction group, wherein the prediction group includes at least one pixel; A prediction processing unit, configured to predict any one of the at least one prediction group according to a corresponding prediction mode, to obtain a prediction value of the any one prediction group; A residual calculation unit, configured to obtain a residual block of the coding unit based on a prediction value of any one of the prediction groups; A coding unit, used to encode a residual block of the coding unit; Wherein, wherein the at least one prediction group comprises: A prediction group including odd-numbered columns of pixels in the coding unit, and a prediction group including even-numbered columns of pixels in the coding unit.
12. An image decoding system, characterized in that: It comprises an encoding end and a decoding end, the encoding end is communicatively connected with the decoding end, the decoding end is used to implement the method according to any one of claims 1 to 8, and the encoding end is used to implement the method according to claim 9.
13. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory is used to store computer instructions, and the processor is used to call and execute the computer instructions from the memory to implement the method according to any one of claims 1 to 9.
14. A computer-readable storage medium, characterized in that: The storage medium stores a computer program or instruction, and when the computer program or instruction is executed by an electronic device, the method according to any one of claims 1 to 9 is implemented.
