Image decoding method and device, image encoding method and device
Patent Information
- Application Number
- JP2024527663
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-11-11
- Filing Date
- 2022-11-10
- Publication Date
- 2025-02-19
AI Technical Summary
Existing video encoding and decoding technologies face challenges in achieving high prediction efficiency and coding efficiency due to low flexibility in predicting image units, leading to suboptimal data compression and transmission.
The method involves parsing a bitstream to obtain syntax elements for residual blocks of decoding units, determining prediction modes for prediction groups, and predicting these groups to enhance flexibility and parallel processing, allowing for different prediction modes across groups.
This approach improves prediction efficiency and coding efficiency by enabling flexible prediction and parallel processing of image units, resulting in more effective data compression and transmission.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to the technical field of video encoding and decoding, and in particular to an image decoding method and apparatus, an image encoding method and apparatus, an image encoding and decoding system, an electronic device, and a computer-readable storage medium. [Background technology]
[0002] A complete image in a video is generally called a "frame", and a video consisting of multiple frames arranged in time series is called a video sequence. A video sequence has 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 as much redundant information as possible in a video sequence and reduce the amount of data representing the video, video coding technology has been proposed, which achieves the effects of reducing storage capacity and saving transmission bandwidth. Video coding technology is also called video compression technology.
[0003] With the development of technology, it becomes more and more convenient to collect video data, and the scale of the collected video data becomes larger and larger, so how to effectively encode and decode video data has become an urgent problem to be solved. Summary of the Invention
[0004] The present invention provides an image decoding method and apparatus, an image encoding method and apparatus, an image encoding and decoding system, an electronic device, and a computer-readable storage medium for solving the problem of low prediction efficiency in an image encoding and decoding (or video encoding and decoding) process.
[0005] In a first aspect, the present invention provides an image decoding method, the method comprising: Parsing the bitstream to obtain syntax elements, the syntax elements being used to obtain residual blocks of a unit to be decoded, the unit to be decoded including at least one prediction group; determining a prediction mode of any one of the at least one prediction group; A step of predicting the one prediction group based on a prediction mode to obtain a predicted value of the one prediction group; Decoding the unit to be decoded based on a residual block of the unit to be decoded and the prediction value of the at least one prediction group.
[0006] In this way, compared to technical proposals that perform prediction directly on the coding unit itself, this contributes to realizing flexible prediction for the coding unit. For example, by rationally setting the partition mode, it contributes to realizing the realization of performing prediction in parallel for multiple prediction groups and setting different prediction modes for different prediction groups, thereby improving prediction efficiency and further improving coding efficiency.
[0007] In one possible embodiment, any one of the prediction groups includes a row of pixels in the unit to be decoded, or a column of pixels in the unit to be decoded, or multiple consecutive columns of pixels, or multiple consecutive odd columns of pixels, or multiple consecutive even columns of pixels.
[0008] In one possible embodiment, the at least one prediction group includes a plurality of prediction groups, and the prediction modes of at least two prediction groups of the plurality of prediction groups are different.
[0009] In one possible embodiment, 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, or the prediction mode of any one of the prediction groups includes reference prediction performed using pixel values of a decoding unit adjacent to the unit to be decoded, or reference prediction performed using pixel values of an independent decoding unit adjacent to the independent decoding unit in which the unit to be decoded is located.
[0010] In one possible embodiment, the one prediction group is a chrominance prediction group or a luma prediction group.
[0011] In one possible embodiment, the syntax element further includes identification information of a partition mode of the unit to be decoded, the partition mode being the partition mode used when the unit to be decoded is partitioned into the at least one prediction group.
[0012] In one possible embodiment, the syntax element further includes a prediction mode for said one prediction group.
[0013] In one possible embodiment, the syntax element further includes a first index, where the first index is used to indicate whether to perform grouping on the residual block.
[0014] In one possible embodiment, the residual block comprises a luma residual block or a chroma residual block.
[0015] In one possible embodiment, the residual block is a residual block of the unit to be decoded granularity or a residual block of the prediction block granularity.
[0016] In a second aspect, the present invention provides a method of image encoding, the method comprising the steps of: Partitioning a coding unit into at least one prediction group; For any one of the at least one prediction group, predicting the any one prediction group according to a corresponding prediction mode to obtain a predicted value of the any one prediction group; obtaining a residual block of a coding unit based on the prediction value of the at least one prediction group; encoding the residual block of the coding unit.
[0017] In this way, compared to technical proposals that directly perform prediction on the unit to be decoded itself, this contributes to realizing flexible prediction on the unit to be decoded. For example, by rationally setting the division mode, it contributes to realizing the realization of performing prediction in parallel for multiple prediction groups and setting different prediction modes for different prediction groups, thereby improving prediction efficiency and further improving decoding efficiency.
[0018] In a third aspect, the present invention provides an image decoding device, which may be a video decoder or a device including a video decoder. The decoding device includes a module for performing the method in any one of the possible embodiments of the first aspect, such as an entropy decoding unit, a prediction processing unit, and a decoding unit.
[0019] For beneficial effects, please refer to any of the descriptions in the first aspect. The decoding device has functions for performing the operations in the above example of the method according to the first aspect. The functions may be realized by hardware, or may be realized by the hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0020] In a fourth aspect, the present invention provides an image encoding device, which may be a video encoder or a device including a video encoder. The encoding device includes a module for performing the method in any one of the possible embodiments of the second aspect. For example, the encoding device includes a division unit, a prediction processing unit, a residual calculation unit, and an encoding unit.
[0021] For beneficial effects, please refer to any of the descriptions in the second aspect. The encoding device has a function of performing the operations in any of the above method examples according to the second aspect. The functions may be realized by hardware, or may be realized by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.
[0022] In a fifth aspect, the present invention provides an electronic device including a processor and a memory, the memory adapted to store computer instructions, and the processor adapted to retrieve and execute the computer instructions from the memory to perform a method according to any embodiment of the first to second aspects.
[0023] For example, the electronic device may be a video encoder or a device that includes a video encoder.
[0024] In another example, the electronic device may be a video decoder or a device that includes a video decoder.
[0025] In a sixth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program or instructions which, when executed by a computing device or a storage system in which the computing device is located, causes a method according to any embodiment of the first to second aspects to be performed.
[0026] According to a seventh aspect, the present invention provides a computer program product comprising instructions which, when executed on a computing device or processor, cause the computing device or processor to execute the instructions to perform a method according to any embodiment of the first to second aspects.
[0027] According to an eighth aspect, the present invention provides an image encoding and decoding system, comprising an encoding side and a decoding side, the decoding side being adapted to perform a method according to any embodiment of the first aspect, and the encoding side being adapted to perform a method according to any embodiment of the second aspect.
[0028] According to a ninth aspect, the present invention provides an image decoding method, the method comprising: Parsing the bitstream to obtain syntax elements, the syntax elements being used to obtain residual blocks of a unit to be decoded, the unit to be decoded including at least one prediction group, a width size of the unit to be decoded being greater than a height size of the unit to be decoded, and the height size being less than or equal to a preset threshold; determining a prediction mode of any one of the at least one prediction group; A step of predicting the one prediction group based on a prediction mode to obtain a predicted value of the one prediction group; Decoding the unit to be decoded based on a residual block of the unit to be decoded and the prediction value of the at least one prediction group.
[0029] In one possible embodiment, the at least one prediction group is obtained by dividing the unit to be decoded into a plurality of prediction groups in a vertically equal division manner, or by dividing the unit to be decoded into a plurality of prediction groups in a horizontally equal division manner, or by dividing the unit to be decoded into a plurality of prediction groups in a vertical direction at a predetermined ratio, or by dividing the unit to be decoded into a plurality of prediction groups in a horizontal direction at a predetermined ratio.
[0030] In one possible embodiment, dividing a unit to be decoded into a plurality of prediction groups in a horizontally equal division manner includes: If the size of the unit to be decoded is 16*2, it involves equally dividing the unit to be decoded horizontally into four prediction groups.
[0031] In one possible embodiment, when the size of the unit to be decoded is 16*2, the at least one prediction group includes a first prediction group consisting of pixels in odd columns and a second prediction group consisting of pixels in even columns, and the prediction mode of the first prediction group is vertical prediction, the prediction mode of the pixel in the 16th column of the second prediction group is horizontal prediction, and the prediction mode of the pixels other than the pixel in the 16th column is horizontal average prediction.
[0032] In one possible embodiment, when the size of the unit to be decoded is 8*1, the at least one prediction group includes one prediction group, and the prediction mode of the prediction group is vertical prediction.
[0033] In one possible embodiment, the syntax element is specifically used for obtaining at least one sub-residual block divided from said residual block to obtain said residual block.
[0034] In one possible embodiment, the syntax element further includes index information of a grouping scheme of the residual block, and different index information is used to indicate different grouping schemes.
[0035] In one possible embodiment, the residual block grouping scheme includes five grouping schemes, and the index of the residual block grouping scheme adopts a binary coding method, and the residual block grouping scheme is represented by 1 bit or 3 bits.
[0036] In one possible embodiment, the syntax elements include higher layer syntax providing unified information for the covered region, the higher layer syntax including at least one of: bit depth used to represent the bit depth of blocks in the region; original value coding or not flag used to represent whether blocks in the region directly code original pixel values; image basic information used to represent image basic information in the region; and parallel coding unit syntax and constraints used to convey information related to the size of parallel independent coding units in the region.
[0037] According to a tenth aspect, the present invention provides a method for encoding an image, the method comprising the steps of: Dividing the coding unit into at least one prediction group, where a width size of the coding unit is greater than a height size of the coding unit, and the height size is less than or equal to a preset threshold; For any one of the at least one prediction group, predicting the any one prediction group according to a corresponding prediction mode to obtain a predicted value of the any one prediction group; obtaining a residual block of a coding unit based on the prediction value of the at least one prediction group; encoding the residual block of the coding unit.
[0038] In an eleventh aspect, the present invention provides an image decoding apparatus, the image decoding apparatus comprising: An entropy decoding unit used to analyze a bitstream and obtain syntax elements, the syntax elements being used to obtain a residual block of a unit to be decoded, the unit to be decoded including at least one prediction group, a width size of the unit to be decoded being greater than a height size of the unit to be decoded, and the height size being equal to or less than a preset threshold; A prediction processing unit used to determine a prediction mode of any one of the at least one prediction groups, predict the any one of the prediction groups based on the prediction mode, and obtain a predicted value of the any one of the prediction groups; A decoding unit is used to decode the unit to be decoded based on a residual block of the unit to be decoded and a prediction value of the at least one prediction group.
[0039] In a twelfth aspect, the present invention provides an image coding apparatus, the image coding apparatus comprising: a partitioning unit used for partitioning a coding unit into at least one prediction group; A prediction processing unit used for predicting any one of the at least one prediction groups according to a corresponding prediction mode to obtain a predicted value of the any one prediction group; a residual calculation unit used to obtain a residual block of the coding unit based on the prediction value of the one of the prediction groups; an encoding unit used to encode a residual block of the encoding unit; The prediction group includes at least one pixel, and a width size of the coding unit is greater than a height size of the coding unit, and the height size is equal to or smaller than a preset threshold.
[0040] In a thirteenth aspect, the present invention provides an image encoding and decoding system, the image encoding and decoding system comprising an encoding side and a decoding side, The encoding side is communicatively connected to the decoding side, the decoding side being used to execute the method of any one of the embodiments of the ninth aspect, and the encoding side being used to execute the method of the tenth aspect.
[0041] In a fourteenth aspect, the present invention provides an electronic device comprising a processor and a memory, the memory is used to store computer instructions; The processor is adapted to retrieve and execute the computer instructions from the memory to perform the method of any one of the embodiments of the ninth to tenth aspects.
[0042] In a fifteenth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program or instructions, comprising: When the computer program or instructions are executed by an electronic device, the method according to any one of the ninth to tenth aspects is performed.
[0043] The present invention may be further combined to provide more embodiments based on the embodiments provided in the above aspects. [Brief description of the drawings]
[0044] [Figure 1] FIG. 1 is a schematic architectural diagram of an encoding and decoding system to which an embodiment of the present invention is applied; [Diagram 2] FIG. 2 is a schematic block diagram of an example of an encoder for implementing an embodiment of the present invention; [Diagram 3] FIG. 2 is a schematic block diagram of an example of a decoder for implementing an embodiment of the present invention; [Figure 4] FIG. 2 is a schematic diagram of multiple prediction schemes according to an embodiment of the present invention; [Diagram 5] 1 is a flowchart of an image encoding method according to an embodiment of the present invention. [Figure 6] FIG. 2 is a schematic diagram of the correspondence between images, parallel coding units, independent coding units, coding units, prediction groups (PGs), and sub-residual blocks (RBs) according to an embodiment of the present invention. [Figure 7]1 is a flowchart of an image decoding method according to an embodiment of the present invention. [Figure 8] ~ [Figure 15] 1 is a schematic diagram of division modes and prediction modes of a 16*4 coding unit according to one embodiment of the present invention; FIG. [Figure 16] ~ [Figure 19] FIG. 2 is a schematic diagram of division modes and prediction modes of an 8*2 coding unit according to an embodiment of the present invention. [Figure 20] ~ [Figure 23] 1 is a schematic diagram of a division mode and a prediction mode of a 16*2 coding unit according to an embodiment of the present invention. FIG. [Figure 24] ~ [Diagram 25] 1 is a schematic diagram of division modes and prediction modes of an 8*1 coding unit according to an embodiment of the present invention. FIG. [Figure 26] ~ [Figure 28] FIG. 13 is a schematic diagram of another split mode according to an embodiment of the present invention. [Figure 29] ~ [Diagram 31] FIG. 2 is a schematic diagram of multiple residual block grouping for a prediction group according to an embodiment of the present invention; [Diagram 32] FIG. 2 is a schematic diagram of a corresponding relationship between a residual block and a sub-residual block according to an embodiment of the present invention; [Diagram 33] 1 is a schematic diagram illustrating a configuration of a decoding device according to an embodiment of the present invention. [Diagram 34] 1 is a schematic diagram illustrating the configuration of an encoding device according to an embodiment of the present invention. [Diagram 35] 1 is a schematic diagram illustrating the configuration of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0045] The term "at least one (kind)" in the embodiments of the present invention includes one (kind) or multiple (kinds). "Multiple (kinds)" means two (kinds) or more than two (kinds). For example, at least one of A, B, and C includes A alone, B alone, C alone, both A and B, both A and C, both B and C, and all of A, B, and C. In the description of the present invention, unless otherwise specified, " / " means or, for example, A / B can represent A or B. In this specification, "and / or" is merely a description of the related relationship of related objects and indicates that three types of relationships may exist. For example, A and / or B can represent three cases: A alone, both A and B, and B alone. "Multiple" means two or more. In addition, in order to clearly describe the technical solutions of the embodiments of the present invention, the embodiments of the present invention use words such as "first", "second", etc. to distinguish between identical or similar items that have basically the same functions and actions. Those skilled in the art will appreciate that the terms "first" and "second" do not limit the quantity or order of execution, and that the terms "first" and "second" do not necessarily limit different things.
[0046] A system architecture to which the embodiment of the present invention is applied will be described below.
[0047] Fig. 1 is a schematic architecture diagram of an encoding and decoding system 10 to which an embodiment of the present invention is applied. As shown in Fig. 1, the encoding and decoding system 10 may include a source device 11 and a destination device 12. The source device 11 may be called an image encoding device or a video encoding device because it is used to encode images. The destination device 12 may be called an image decoding device or a video decoding device because it is used to decode encoded image data generated by the source device 11.
[0048] The source device 11 and destination device 12 may include a variety of devices, such as, for example, desktop computers, mobile computing devices, notebook (e.g., laptop) computers, tablet computers, set-top boxes, telephone terminals such as so-called "smart" phones, televisions, cameras, display devices, digital media players, video game consoles, and in-vehicle computers.
[0049] Optionally, source device 11 and destination device 12 in FIG. 1 may be two separate devices, or source device 11 and destination device 12 may be the same device, i.e., source device 11 or a corresponding function and destination device 12 or a corresponding function may be integrated into the same device.
[0050] Communication may occur between source device 11 and destination device 12, for example, destination device 12 may receive encoded image data from source device 11. In one example, one or more communication media may be included between source device 11 and destination device 12, transmitting the encoded image data over the one or more communication media. The one or more communication media may include routers, switches, base stations, or other devices that facilitate communication from source device 11 to destination device 12.
[0051] As shown in FIG. 1, the source device 11 includes an encoder 112, and may optionally further include an image preprocessor 111 and a communication interface 113. Here, 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 correction, color format conversion (e.g., conversion from RGB format to YUV format), color adjustment, or noise removal, etc. The encoder 112 is used to receive the preprocessed image, process the preprocessed image using a correlation prediction mode (e.g., a prediction mode in each embodiment of the present specification), and provide encoded image data. In some embodiments, the encoder 112 may be used to perform the encoding process in the following embodiments. The communication interface 113 may be used to transmit the encoded image data to the destination device 12 or any other device (e.g., a memory) for storage or direct reconstruction. The other device may be any device for decoding or storage. The communication interface 113 may also encapsulate the encoded image data into a suitable format before transmitting it.
[0052] Optionally, the above image pre-processor 111, encoder 112, and communication interface 113 may be hardware components in the source device 11, or may be software programs in the source device 11, and the embodiment of the present invention is not limited thereto.
[0053] Continuing with FIG. 1, destination device 12 includes a decoder 122, and may optionally further include a communication interface 121 and an image post-processor 123. Here, communication interface 121 may be used to receive encoded image data from source device 11 or any other source device, such as a storage device. Communication interface 121 may also decapsulate data transmitted by communication interface 113 to obtain encoded image data. Decoder 122 is used to receive the encoded image data and output decoded image data (also referred to as reconstructed image data or reconstructed image data). In some embodiments, decoder 122 may be used to perform a decoding process described in the following embodiments.
[0054] 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 (e.g., conversion from YUV format to RGB format), color adjustment, correction, or resampling, or any other processing, and the post-processed image data may be transmitted to a display device for display.
[0055] Similarly, optionally, the above 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, and the embodiments of the present invention are not limited thereto.
[0056] The configurations of the encoder and decoder in FIG. 1 will be briefly explained below.
[0057] Referring to Fig. 2, Fig. 2 is a schematic block diagram of an example of an encoder 20 for implementing an embodiment of the present invention. In Fig. 2, 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 206, an inverse transform processing unit 207, a reconstruction unit 208, and a filter unit 209. Optionally, the encoder 20 may further include a buffer and a decoded image buffer. The buffer is used to buffer the reconstructed image block output by the reconstruction unit 208, and the decoded image buffer is used to buffer the filtered image block output by the filter unit 209.
[0058] The input to the encoder 20 is an image block of an image (which may be referred to as a target image), which may be referred to as a current image block or a target image block. The encoder 20 may further include a division unit (not shown in FIG. 2) used to divide the target image into a number of image blocks. The encoder 20 is used for block-by-block encoding to complete the encoding of the target image, e.g., performing an encoding process for each image block.
[0059] The prediction processing unit 201 is used to receive or obtain an image block (which may be called a current image block to be coded of a current image to be coded or a current image block, and may be understood as a true value of an image block) and reconstructed image data, and to predict the current image block based on related data in the reconstructed image data to obtain a predicted block of the current image block. Optionally, the prediction processing unit 201 may include an inter prediction unit, an intra prediction unit, and a mode selection unit. The mode selection unit is used to select an intra prediction mode or an inter prediction mode. If the intra prediction mode is selected, the prediction processing is performed by the intra prediction unit. If the inter prediction mode is selected, the prediction processing is performed by the inter prediction unit.
[0060] The residual calculation unit 202 is used to calculate a residual value between a true value of an image block and a predicted block of the image block to obtain a residual block, for example, by subtracting a pixel value of the predicted block from a pixel value of the image block for each pixel.
[0061] The transform processor 203 is used to perform a transform, such as a discrete cosine transform (DCT) or a discrete sine transform (DST), on the residual block to obtain transform coefficients in a transform domain. The transform coefficients may also be called transform residual coefficients. The transform residual coefficients can represent the residual block in the transform domain.
[0062] The quantization unit 204 is used to quantize the transform coefficients by applying scalar or vector quantization to obtain quantized transform coefficients. The quantized transform coefficients may be referred to as quantized residual coefficients. The quantization process reduces the bit depth associated with some or all of the transform coefficients. For example, an n-bit transform coefficient may be truncated to an m-bit transform coefficient during quantization, where n is greater than m. The degree of quantization may be changed 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 corresponds to a finer quantization, and a larger quantization step corresponds to a coarser quantization. The appropriate quantization step may be indicated by the quantization parameter.
[0063] The entropy coding unit 205 performs entropy coding on the quantized residual coefficients and outputs coded image data (i.e., the coding result of the current image block to be coded) in the form of a coded bitstream, which is then used to transmit to a decoder or store for subsequent transmission to a decoder or retrieval. The entropy coding unit 205 may further be used to entropy code other syntax elements of the current image block, for example, entropy coding a prediction mode into the bitstream. The entropy coding algorithm includes, but is not limited to, a Variable Length Coding (VLC) algorithm, a Context Adaptive VLC (CAVLC) algorithm, an arithmetic coding algorithm, a Context-based Adaptive Binary Arithmetic Coding (CABAC) algorithm, a Syntax-based Context-adaptive Binary Arithmetic Coding (SBAC) algorithm, and a Probability Interval Partitioning Entropy (PIPE) algorithm.
[0064] The inverse quantization unit 206 is used to inverse quantize the quantized coefficients to obtain inverse quantized coefficients. The inverse quantization is an inverse application of the quantization unit 204, for example, applying an inverse quantization scheme of the quantization scheme applied by the quantization unit 204 based on or using the same quantization step as the quantization unit 204. The inverse quantized coefficients may be called inverse quantized residual coefficients.
[0065] The inverse transform processor 207 is used to perform an inverse transform on the inverse quantized coefficients. It should be understood that the inverse transform is an inverse application of the transform processor 203, for example, the inverse transform includes an inverse discrete cosine transform (DCT) or an inverse discrete sine transform (DST), and obtains an inverse transform block in the pixel domain (also called the sample domain). The inverse transform block may be called an inverse transform dequantized block or an inverse transform residual block.
[0066] The reconstruction unit 208 is used to add the inverse transformed block (i.e., the inverse transformed residual block) to the prediction block to obtain a reconstructed block in the sample domain. The reconstruction unit 208 may be an adder, for example, adding sample values (i.e., pixel values) of the residual block and sample values of the prediction block. The reconstructed block output by the reconstruction unit 208 may then be used to predict other image blocks, such as for use in intra prediction modes.
[0067] The filter unit 209 (or simply "filter") is used to filter the reconstructed block to obtain a filtered block in order to smooth pixel transformation or improve image quality. The filter unit may be one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or a loop filter unit intended to represent other filters, such as a bilateral filter, an adaptive loop filter (ALF), a sharpening filter or a smoothing filter, or a collaborative filter. Optionally, the filtered block output by the filter unit 209 may then be used to predict other image blocks, such as being used in an inter-prediction mode.
[0068] Specifically, in an embodiment of the present invention, encoder 20 is used to perform a video encoding method as described in the following embodiment.
[0069] Referring to FIG. 3, FIG. 3 is a schematic block diagram of an example of a decoder 30 for implementing an embodiment of the present invention. The decoder 30 is used to receive, for example, encoded image data (i.e., an encoded bitstream, for example, an encoded bitstream including image blocks and related 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 a decoding path that is substantially reverse to the encoding path described for the encoder 20 of FIG. 2. Optionally, the decoder 30 may further include a buffer and a decoded image buffer. The buffer is used to buffer the reconstructed image block output by the reconstruction unit 305, and the decoded image buffer is used to buffer the filtered image block output by the filter unit 306.
[0070] The entropy decoding unit 301 is used to perform entropy decoding on the encoded image data to obtain quantization coefficients and / or decoded encoding parameters (e.g., the encoding parameters may include any one or all of inter prediction parameters, intra prediction parameters, filter parameters, and / or other syntax elements). The entropy decoding unit 301 is further used to transfer the decoded encoding parameters to the prediction processing unit 304 so that the prediction processing unit performs a prediction process based on the encoding parameters.
[0071] The function of the inverse quantization unit 302 may be the same as that of the inverse quantization unit 206 of the encoder 20. The inverse quantization unit 302 is used to inverse quantize the quantized coefficients decoded by the entropy decoding unit 301.
[0072] The functionality of the inverse transform processor 303 may be the same as that of the inverse transform processor 207 of the encoder 20. The functionality of the reconstruction unit 305 (e.g., an adder) may be the same as that of the reconstruction unit 208 of the encoder 20. The inverse transform processor 303 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 quantized coefficients to obtain an inverse transformed block (which may also be called an inverse transformed residual block), which is the residual block of the current image block in the pixel domain.
[0073] The prediction processing unit 304 is used to receive or obtain encoded image data (e.g., an encoded bitstream of a current image block) and reconstructed image data. The prediction processing unit 301 may, for example, receive or obtain prediction-related parameters and / or information on a selected prediction mode (i.e., decoded encoding parameters) from the entropy decoding unit 301, and predict the current image block based on related data in the reconstructed image data and the decoded encoding parameters to obtain a predicted block of the current image block. Optionally, the prediction processing unit 304 may include an inter prediction unit, an intra prediction unit, and a mode selection unit. The mode selection unit is used to select an intra prediction mode or an inter prediction mode. When an intra prediction mode is selected, a prediction process is performed by the intra prediction unit. When an inter prediction mode is selected, a prediction process is performed by the inter prediction unit.
[0074] The reconstruction unit 305 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, for example, by adding the sample values of the inverse transform residual block and the sample values of the prediction block.
[0075] The filter unit 306 is used to filter the reconstructed block to obtain a filtered block, which is the decoded image block.
[0076] Specifically, in the embodiment of the present invention, the decoder 30 is used to perform the decoding method described in the following embodiment.
[0077] In the encoder 20 and the decoder 30 according to the embodiment of the present invention, the processing result of a certain part may be further processed before being output to the next part. For example, after a part such as interpolation filtering, motion vector derivation, or filtering, an operation such as Clip or shift is further performed on the processing result of the corresponding part.
[0078] The technical terms used in the embodiments of the present invention will now be described.
[0079] Partition mode: In an embodiment of the present invention, the partition mode is a partition mode for dividing a current image block (eg, a unit to be coded / a unit to be decoded) into prediction groups (ie, prediction blocks).
[0080] Prediction mode: A combination of prediction modes used to predict a current image block (e.g., a unit to be coded / unit to be decoded) is called a prediction mode. Different prediction schemes may be used to predict different pixels in the current image block, or the same prediction scheme may be used. The prediction schemes used to predict all pixels in the current image block may be collectively referred to as the (or corresponding) prediction mode of the current image block.
[0081] For example, the prediction mode includes an intra prediction mode and an inter prediction mode. The intra prediction mode includes one or more combinations of prediction methods such as vertical prediction, horizontal prediction, vertical average prediction, and horizontal average prediction. The inter prediction mode includes motion estimation, etc.
[0082] For example, vertical prediction is to obtain a predicted value of the current pixel value using a pixel value on the upper side of the current pixel (i.e., it may be an adjacent pixel on the upper side, or may be a non-adjacent pixel on the upper side close to the pixel value). As an example, the reconstructed pixel value adjacent to the upper side is used as the predicted value of the current pixel.
[0083] For example, horizontal prediction is to obtain a predicted value of the current pixel value using the pixel value on the left side of the current pixel (i.e., the pixel value may be the adjacent left side or the non-adjacent but nearby left side). As an example, the reconstructed pixel value adjacent to the left side is used as the predicted value of the current pixel.
[0084] For example, vertical average prediction is to obtain a prediction value of the current pixel value using the pixel values above and below the current pixel. As an example, the prediction value of the current pixel value is the average value of the adjacent pixel value vertically above and below the current pixel.
[0085] For example, horizontal average prediction is to obtain a predicted value of the current pixel value using pixel values on both the left and right sides of the current pixel. As an example, the predicted value of the current pixel value is the average value of the adjacent pixel value on the horizontal left side and the adjacent pixel value on the horizontal right side.
[0086] FIG. 4 is a schematic diagram of multiple prediction schemes according to an embodiment of the present invention. A small grid in FIG. 4 represents a pixel. Pixels with different marks are used to represent different prediction schemes. Specifically, vertical prediction, horizontal prediction, vertical average prediction and horizontal average prediction are shown. The schematic diagram of various prediction schemes shown in FIG. 4 can be used to explain any related accompanying drawings related to the present invention, such as FIG. 8.
[0087] Hereinafter, an image encoding and decoding method provided in an embodiment of the present invention will be described with reference to the drawings.
[0088] Fig. 5 is a flowchart of an image encoding method according to an embodiment of the present invention. The method may be performed by an encoding side. For example, the encoding side may be the encoder of Fig. 1 or Fig. 2, or may be the source device of Fig. 1. The method shown in Fig. 5 includes the following steps S101 to S104.
[0089] In S101, a coding unit is divided into at least one prediction group (abbreviated as Prediction Group, Group, or PG), and one prediction group includes at least one pixel.
[0090] In one example, the width size of the coding unit is greater than the height size of the coding unit, and the height size is less than or equal to a preset threshold.
[0091] In one example, the pre-set threshold value is 4 or 8, etc.
[0092] In S101, the coding unit may be divided into one prediction group or multiple non-overlapping prediction groups. Here, dividing the coding unit into one prediction group, that is, making the coding unit into a prediction group, may be understood as not dividing the coding unit, and may be understood as a special division method. When dividing the coding unit into one prediction group, in one example, the coding side may not execute S101.
[0093] In one embodiment, one prediction group in at least one prediction group includes one row of pixels in a coding unit, or one column of pixels in a coding unit, or a plurality of consecutive columns of pixels, or a plurality of consecutive odd-numbered columns of pixels, or a plurality of consecutive even-numbered columns of pixels. Specific examples can be seen in Figures 8 to 15 or 20 to 23.
[0094] In another embodiment, at least one prediction group is obtained by dividing a coding unit into a plurality of prediction groups in a vertically equal division manner, or dividing a coding unit into a plurality of prediction groups in a horizontally equal division manner, or dividing a coding unit into a plurality of prediction groups in a vertical direction with a predetermined ratio, or dividing a coding unit into a plurality of prediction groups in a horizontal direction with a predetermined ratio.Specific examples can be seen in Figures 26 to 28.
[0095] In addition, when dividing the coding unit into at least one prediction group, various partition modes can be adopted, and the specific partition mode to be adopted can be determined by the coding side based on a predefined rule (for example, a rule predefined according to a standard), or in combination with the contents of the coding unit (for example, information such as texture), or based on a method such as rate distortion cost, and the embodiment of the present invention does not limit this. In the case of the decoding side, the partition mode actually used on the coding side may be determined based on the same method. When the coding side uses the latter two methods described above (of course, other methods other than the predefined method may be used) to determine which partition mode to adopt, the coding side may transmit identification information of the partition mode of the coding unit (i.e., the partition mode actually used) to the decoding side as a part of a syntax element, and may determine the partition mode of the decoding target unit corresponding to the coding unit by the identifier of the partition mode in the syntax element obtained by decoding.
[0096] In S102, for any one of the at least one prediction group, the prediction group (i.e., the original values of the pixel values of the prediction group) is predicted according to a corresponding prediction mode to obtain a predicted value of each prediction group (i.e., a predicted value of the pixel values of the prediction group).
[0097] One prediction group corresponds to one prediction mode. When a certain prediction mode is used to predict the original value of a pixel value of a certain prediction group, there is a correspondence between the prediction mode and the prediction group.
[0098] In one example, a prediction mode corresponding to one prediction group may include one or more combinations of vertical prediction, horizontal prediction, vertical average prediction, horizontal average prediction, and the like.
[0099] In one example, a prediction mode corresponding to one prediction group may further include reference prediction performed using pixel values of coding units adjacent to the coding unit, or reference prediction performed using pixel values of independent coding units adjacent to the independent coding unit in which the coding unit is located.
[0100] In one example, the at least one prediction group includes a plurality of prediction groups, and the prediction modes of at least two of the plurality of prediction groups are different. 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.
[0101] In one example, there is a relationship between division mode and prediction mode.That is, the division mode of one coding unit is related to the prediction mode of each prediction group into which this coding unit is divided.Specifically, after the division mode of one coding unit is determined, the prediction mode of each prediction group into which this coding unit is divided can be determined according to the relationship.
[0102] Here, there is a correspondence between one division mode and one or more prediction modes.
[0103] When one partition mode corresponds to one prediction mode, when it is determined that the encoding unit adopts the partition mode, the encoding side does not need to add an identifier of the prediction mode currently adopted by the prediction group partitioned in the partition mode (i.e., when performing step S102) to the bitstream.
[0104] For example, a predefined prediction mode 1 corresponds to a division mode 1, and the division mode 1 divides an encoding unit into prediction groups 1 to 4, and defines the position of each prediction block in the encoding unit. Specifically, the prediction mode 1 is defined as the prediction methods of the prediction groups 1 to 4 being vertical prediction, horizontal prediction, horizontal prediction, and horizontal prediction, in that order. In this case, if the encoding side / decoding side determines that the division mode of the encoding unit / decoding target unit is division mode 1, it can determine that the prediction methods of the prediction groups 1 to 4 divided in the division mode 1 are vertical prediction, horizontal prediction, horizontal prediction, and horizontal prediction, in that order. Therefore, for the encoding side, it is not necessary to add an identifier of the prediction mode currently adopted by the prediction group in the division mode to the bitstream.
[0105] When one partition mode corresponds to multiple prediction modes, the encoding side may adopt a method such as rate distortion cost to determine which prediction mode is currently adopted. In one embodiment, the decoding side may determine the currently adopted prediction mode based on the same method. In another embodiment, the encoding side may add an identifier of the prediction mode currently adopted by the prediction group in the partition mode to the bitstream, and the decoding side may obtain the currently adopted prediction mode by decoding the bitstream.
[0106] In one example, there is a relation between prediction group and prediction mode.That is, there is a correspondence 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 determined directly.
[0107] Here, there is a correspondence between one prediction group and one or more prediction modes.
[0108] When one prediction group corresponds to one prediction mode, the encoding side does not need to add an identifier of the prediction mode currently adopted by the prediction group to the bitstream.
[0109] When a prediction group corresponds to multiple candidate prediction modes, the encoding side may adopt a scheme such as rate distortion cost to determine which prediction mode is currently adopted. In one embodiment, the decoding side may determine the prediction mode currently adopted by the prediction group based on the same method. In another embodiment, the encoding side may add an identifier of the prediction mode currently adopted by the prediction group to the bitstream.
[0110] In S103, a residual block of the coding unit is obtained based on the predicted value of the coding unit and the coding unit itself (ie, the original values of the pixel values of the coding unit).
[0111] A prediction value of one coding unit is obtained from the prediction value of each prediction group into which the coding unit is divided. For any one prediction group among the at least one prediction group, a residual block of the prediction group may be 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).
[0112] At S104, the residual block of the coding unit is coded.
[0113] Specifically, the residual block of the coding unit undergoes operations such as transformation, quantization, and coefficient coding.
[0114] In one example, the residual block of the coding unit may be divided into at least one sub-residual block (RB), i.e., each sub-residual block is subjected to operations such as transform, quantization and coefficient coding, etc. The at least one sub-residual block includes one sub-residual block or multiple non-overlapping sub-residual blocks.
[0115] In some embodiments, the residual block is a residual block of the coding unit granularity, that is, when performing S104, divide the residual block of the whole coding unit (i.e., the residual block equal to the size of the coding unit) into at least one sub-residual block, and the size of the residual block of the coding unit is the same as the size of the coding unit.
[0116] In some other embodiments, the residual block is a residual block of prediction group granularity. That is, when performing S104, the coding unit divides any one or more (for example, each) prediction group into at least one sub-residual block. The size of the residual block of a prediction block is the same as the size of the prediction block.
[0117] In one example, the encoding side adds a first index to a syntax element, which is used to indicate whether grouping is performed on the residual block, and the decoding side can know whether it needs to perform grouping of the residual block (or division of the residual block) based on the first index.
[0118] Specifically, the encoder encodes the residual coefficients of each RB in the at least one sub-residual block (i.e., RB) according to the selected mode to obtain a residual coefficient stream. Specifically, the residual coefficients are divided into two types: one in which the residual coefficients are transformed and the other in which they are not transformed.
[0119] For explanations of RB conversion, RB division, residual coefficient coding method, etc., please refer to the following.
[0120] According to the image coding method provided in the embodiment of the present invention, the coding unit is divided into at least one prediction group, and the prediction group is predicted according to a 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 contributes to realizing flexible prediction on the coding unit, for example, by rationally setting the division mode, it contributes to realizing performing prediction on multiple prediction groups in parallel, and setting different prediction modes for different prediction groups, etc., thereby improving prediction efficiency and further improving coding efficiency.
[0121] The encoding method provided in the embodiment of the present invention will now be described with reference to a specific example.
[0122] In step 1, an image of one frame is divided into one or more non-overlapping parallel coding units. Each parallel coding unit has no dependency and can be coded and decoded in parallel / independently.
[0123] In step 2, for each parallel coding unit, the encoding side may split it into one or more non-overlapping independent coding units, which may be independent of each other but may share some header information of the parallel coding unit.
[0124] When a parallel coding unit is divided into one independent coding unit, the size of the independent coding unit is the same as the size of the parallel coding unit. Otherwise, the width of the independent coding unit is generally greater than the height of the independent coding unit. Note that, when an independent coding unit is located in the edge region of the parallel coding unit, the width of the independent coding unit may be equal to or smaller than the height.
[0125] The width of the independent coding unit is w_lcu, and the height is h_lcu. Both w_lcu and h_lcu are the Nth power of 2, where N is an integer equal to or greater than 0. Usually, the size of the independent coding unit is a fixed value of w_lcu×h_lcu. For example, the size of the independent coding unit may be 128×4, 64×4, 32×4, 16×4, 8×4, 32×2, 16×2, or 8×2, etc.
[0126] As an example, the size of the independent coding units may be 128×4. If the size of the parallel coding units is 256×8, the parallel coding units may be divided evenly into four independent coding units. If the size of the parallel coding units is 288×10, the parallel coding units are divided into a first / second row of two 128×4 independent coding units and one 32×4 independent coding unit, and a third row of two 128×2 coding units and one 32×2 coding unit.
[0127] An independent coding unit may include three components: luma Y, chroma Cb, chroma Cr (or red R, green G, blue B), or only one of these components. If an independent coding unit includes three components, the sizes of these three components may be the same or different, specifically related to the image input format.
[0128] In step 3, for each independent coding unit, the coding side may divide it into one or more non-overlapping coding units. Each coding unit in the independent coding unit may be dependent on each other, i.e., may refer to each other in the process of performing the prediction step.
[0129] If an independent coding unit is split into one coding unit, the size of the coding unit is the same as the size of the independent coding unit.
[0130] When an independent coding unit is divided into multiple non-overlapping coding units, the width of the coding unit is generally greater than the height, and when a coding unit is located in an edge region of the independent coding unit, the width of the coding unit may be less than or equal to the height.
[0131] When an 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. Specific implementation methods are not limited thereto.
[0132] Horizontal equal division, that is, the height of the coding unit is the same as the height of the independent coding unit, but the width of the coding unit is different, for example, the width of the coding unit may be 1 / 2, 1 / 4, 1 / 8, or 1 / 16 of the width of the independent coding unit.
[0133] Vertical equal division, that is, the width of the coding unit is the same as the width of the independent coding unit, but the height of the coding unit is different, for example, the height of the coding unit may be 1 / 2, 1 / 4, 1 / 8, or 1 / 16 of the height of the independent coding unit.
[0134] This is an equal horizontal and vertical division method, also known as the quadtree division method.
[0135] Preferably, the encoding side divides the independent coding unit into a plurality of non-overlapping coding units in a horizontally evenly divided manner.
[0136] The width and height of the coding unit are w_cu and h_cu, respectively. Both w_cu and h_cu are the Nth power of 2, where N is an integer equal to or greater than 0. Typically, the size of the coding unit is a fixed value of w_cu×h_cu. For example, the size of the coding unit may be 16×4, 8×4, 16×2, 8×2, 8×1, 4×1, etc.
[0137] The coding unit may include three components of luma Y, chroma Cb, and chroma Cr (or three components of red R, green G, and blue B), or may include only one of these components. When the coding unit includes three components, the sizes of these three components may be completely the same or different, specifically related to the image input format. When the coding unit includes luma, the at least one prediction group may specifically be at least one luma prediction group. When the coding unit includes chroma, the at least one prediction group may specifically be at least one chroma prediction group.
[0138] Figure 6 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 takes as an example that an image is divided into a parallel coding unit 1 and a parallel coding unit 2 according to 3:1, and an independent coding unit includes four coding units.
[0139] In addition, the parallel coding unit, the independent coding unit and the coding unit may be replaced with other names, and the embodiment of the present invention is not limited thereto.
[0140] However, in some alternative embodiments, a parallel coding unit may be directly split into one or more coding units.
[0141] In step 4, the coding unit may be further divided into one or more non-overlapping prediction groups. Each PG performs encoding and decoding according to a selected prediction mode to obtain a prediction value of the PG, and construct a prediction value of the entire coding unit. According to the prediction value and the original value of the coding unit, a residual value of the coding unit is obtained.
[0142] For an explanation of prediction group division modes and prediction modes, please refer to the explanations elsewhere in this specification.
[0143] In step 5, according to the residual value of the coding unit, the coding unit is grouped to obtain one or more non-overlapping sub-residual blocks (RBs), and the residual coefficients of each RB are coded and decoded according to the selected mode to form a residual coefficient stream. Specifically, the residual coefficients are divided into two types: one in which the residual coefficients are transformed and the other in which they are not transformed.
[0144] RB transformation: The coefficients in the RB may be directly coded, or a transform such as a discrete cosine transform (DCT), a discrete sine transform (DST), or a Hadamard transform may be performed on the residual block, and the transformed coefficients may be coded.
[0145] RB division: When the RB is small, each coefficient in the RB may be directly quantized and then binarized. When the RB is large, the RB may be further divided into multiple coefficient groups (CGs), and each CG may be quantized and then binarized.
[0146] For the residual coefficient coding part, a feasible method is a semi-fixed length coding method. First, the maximum value of the residual absolute value in one RB block is defined as modified maximum (mm). Then, the number of coding bits of the residual coefficient in the RB block is determined (the number of coding bits of the residual coefficient in the same RB block is the same). For example, if the CL (critical limit) of the current RB block is 2 and the current residual coefficient is 1, 2 bits are required to code the residual coefficient 1, which is represented as 01. If the CL of the current RB block is 7, it indicates that 8 bits of the residual coefficient and 1 bit of the sign bit are coded. The determination of CL is to find the smallest M value that satisfies that all the residuals of the current sub-block are within the range of [-2^(M-1), 2^(M-1)]. If the two boundary values of -2^(M-1) and 2^(M-1) exist at the same time, M needs to be increased by 1, that is, M+1 bits are required to code all the residuals of the current RB block. If only one of the two boundary values, -2^(M-1) and 2^(M-1), exists, then one trailing bit needs to be coded to determine whether the boundary value is -2^(M-1) or 2^(M-1). If all residuals are not -2^(M-1) or 2^(M-1), then there is no need to code the trailing bit.
[0147] Of course, other residual coefficient encoding methods may be adopted, such as exponential Golomb encoding method, Golomb-Rice encoding method, truncated unary code encoding method, run-length encoding method, or a method of directly encoding the original residual values.
[0148] Also, in some special cases, the original values may be coded directly rather than the residual values.
[0149] Figure 7 is a flow chart of an image decoding method according to an embodiment of the present invention. The method can be performed by a decoding side. For example, the decoding side can be the decoder of Figure 1 or Figure 3, or the destination device of Figure 1. The method shown in Figure 7 includes the following steps:
[0150] In S201, a bitstream is parsed to obtain syntax elements, which are used to obtain residual blocks of a unit to be decoded, the unit to be decoded including at least one prediction group.
[0151] The unit to be decoded in this embodiment may be obtained by encoding the encoding unit shown in Fig. 5. For an explanation of the size of the unit to be decoded, please refer to the above explanation of the size of the unit to be encoded.
[0152] In one example, the width of the unit to be decoded is greater than the height of the unit to be decoded, and the height is equal to or smaller than a preset threshold.
[0153] The syntax element includes information for obtaining a residual block of a unit to be decoded, and the specific information included in the syntax element is not limited in the present invention. For example, the syntax element includes first information obtained after the residual block is transformed, quantized, and coefficient coded.
[0154] After acquiring the syntax element, the encoding side may encode the syntax element to obtain a bitstream. The decoding side may perform entropy decoding on the received bitstream to obtain the syntax element. Then, the decoding side may perform coefficient decoding, inverse transform, and inverse quantization on the first information added to the syntax element to obtain a residual block of the unit to be decoded.
[0155] In one example, the syntax element is specifically used for obtaining at least one sub-residual block divided from a residual block of a decoding target unit to obtain the residual block, in which the syntax element may specifically include second information obtained after transforming, quantizing, and coefficient coding any one of the sub-residual blocks of the residual block.
[0156] After obtaining the syntax element, the encoding side may encode the syntax element to obtain a bitstream. The decoding side may perform entropy decoding on the received bitstream to obtain the syntax element. Then, the decoding side may perform coefficient decoding, inverse transform, and inverse quantization on the second information added to the syntax element to obtain any one of the sub-residual blocks.
[0157] In one example, the syntax element further includes index information of a grouping scheme of the residual block of the decoding target unit, and different index information is used to indicate different grouping schemes.
[0158] In one example, the syntax element further includes a first index, where the first index is used to indicate whether to perform grouping on the residual block of the unit to be decoded.
[0159] In one example, the residual block includes a luma residual block or a chroma residual block.
[0160] In one embodiment, the partitioning mode used to partition the coding units into prediction groups is predefined by the encoding side and the decoding side, eg, predefined based on a protocol.
[0161] In another embodiment, the partition mode used to partition the coding unit into prediction groups is indicated to the decoding side by the coding side. For example, the coding side transmits the first information to the decoding side by adding it to the bitstream, and the first information is used to represent the partition mode of the coding unit. In the embodiment of the present invention, the specific content of the first information is not limited.
[0162] In addition, below, we also describe the prediction mode corresponding to the partition mode (i.e., the partition mode is associated with the prediction mode) and the prediction mode corresponding to each prediction group in the coding unit (i.e., the coding unit, the partition mode is associated with the prediction mode).
[0163] In S202, for any one of the at least one prediction group, a prediction mode of the prediction group is determined.
[0164] In one embodiment, a prediction mode corresponding to a partition mode (i.e., determining the prediction mode at the granularity of the partition mode) or a prediction mode corresponding to each prediction group within a coding unit (i.e., determining the prediction mode at the granularity of the prediction group within a coding unit) is predefined by the encoding side and the decoding side, for example, predefined based on a protocol.
[0165] In another embodiment, the prediction mode corresponding to the partition mode or the prediction mode corresponding to each prediction group in the coding unit is indicated to the decoding side by the coding side.For example, the coding side transmits the second information to the decoding side by adding it to the bitstream, and the second information is used to represent the prediction mode corresponding to each prediction group in the coding unit.In the embodiment of the present invention, the specific content of the second information is not limited.
[0166] In one example, for the division mode of the prediction group and the prediction mode of the prediction group, please refer to the related description of the embodiment on the encoding side in this specification.
[0167] In S203, the one of the prediction groups is predicted based on the prediction mode, and a predicted value of the one of the prediction groups is obtained.
[0168] For example, for each prediction group, obtain the original value of the prediction group (i.e., the original value of the prediction group obtained by the decoding side) based on the residual value of the prediction group and the predicted value of the prediction group.It can be understood that the original value of the prediction group obtained by the encoding side and the original value of the prediction group obtained by the decoding side may be different.
[0169] In S204, the current unit to be decoded is decoded based on the residual block of the current unit to be decoded and the prediction value of the at least one prediction group.
[0170] For example, the method may further include performing reconstruction based on the residual block of the decoding target unit and the prediction value of the one of the prediction groups. Then, the method may further include performing an operation such as filtering on the reconstructed block to obtain a decoded image block.
[0171] According to the image decoding method provided in the embodiment of the present invention, the unit to be decoded is divided into at least one prediction group, and the prediction group is predicted according to a 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 contributes to realizing flexible prediction on the unit to be decoded, for example, by setting the division mode reasonably, it contributes to realizing performing prediction on multiple prediction groups in parallel, and setting different prediction modes for different prediction groups, etc., so as to improve prediction efficiency and further improve decoding efficiency.
[0172] The division mode according to the embodiment of the present invention will now be described.
[0173] The above-mentioned decoding target unit is obtained after encoding the encoding unit, so it can be understood that the correspondence between the encoding unit and the prediction group is the same as the correspondence between the decoding target unit and the prediction group.In the following, for the sake of simplicity, only the correspondence between the encoding unit and the prediction group is described, that is, the division mode from the viewpoint of the encoding unit or the encoding side is described.The correspondence between the decoding target unit and the prediction group may be obtained by inference based on the contents described below, and will not be repeated in the present invention.
[0174] The first type of division method
[0175] In the first part, for the first coding unit in the independent coding unit, the present invention provides the following split modes:
[0176] It should be noted that when 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. When an independent coding unit is divided into multiple non-overlapping coding units, the first coding unit is the coding unit that includes the pixel in the first row and first column in the independent coding unit.
[0177] As can be understood, 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 referred to. In one example, the pixel value of the first pixel may be coded to the original value or other values (e.g., the difference between the original value and one predetermined value, etc.), and the embodiment of the present invention is not limited thereto. The predicted values of pixels other than the first pixel may be predicted in the manner provided in the embodiment of the present invention. Therefore, the division mode of the first part does not divide the pixel into any prediction group.
[0178] Partition mode A: the coding unit includes a first prediction group, a second prediction group, and a third prediction group.
[0179] The first prediction group includes pixels other than the first pixel in the first row of the coding unit, the second prediction group includes pixels in a plurality of consecutive odd columns of pixels in the non-first row of pixels in the coding unit, and the third prediction group includes pixels in consecutive even columns of pixels in the non-first row of pixels in the coding unit.
[0180] In one example, the number of pixels included in one second prediction group is equal to or less than a threshold value, or the number of columns of pixels included in one second prediction group is equal to or less than a threshold value. In one example, the number of pixels included in one third prediction group is equal to or less than a threshold value, or the number of columns of pixels included in one third prediction group is equal to or less than a threshold value.
[0181] In one example, the coding unit includes a first prediction group, at least one second prediction group, and at least one third prediction group.
[0182] In the embodiment of the present invention, 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 pixel of the non-last column in the third prediction group includes horizontal average prediction, and the prediction mode corresponding to the pixel of the last column in the third prediction group includes horizontal prediction.
[0183] In one example, when performing a prediction operation for a pixel in the final column in the third prediction group, the pixel value of the pixel to the right of the pixel in the column has not yet been obtained, and horizontal average prediction needs to refer to the pixel values of the pixels on both the left and right sides of the pixel in the column, so the prediction mode corresponding to the pixel in the final column does not usually adopt horizontal average prediction, but in one example, may adopt horizontal prediction.
[0184] Partition mode B: the coding unit includes a first prediction group, a second prediction group, and a third prediction group.
[0185] The first prediction group includes pixels other than the first pixel of the first column of the coding unit, the second prediction group includes pixels of odd-numbered rows of pixels of the non-first column of pixels of the coding unit, and the third prediction group includes pixels of even-numbered rows of pixels of the non-first column of pixels of the coding unit.
[0186] A second prediction group includes pixels of one odd row or pixels of a plurality of consecutive odd rows in the non-first column of pixels of the coding unit. A third prediction group includes pixels of one even row or pixels of a plurality of consecutive even rows in the non-first column of pixels of the coding unit.
[0187] The coding unit may include one first prediction group, at least one second prediction group, and at least one third prediction group.
[0188] In the embodiment of the present invention, the prediction mode corresponding to each prediction group is not limited.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, the prediction mode corresponding to the last even-numbered pixel in the third prediction group includes vertical average prediction, and the prediction mode corresponding to the non-last even-numbered pixel in the third prediction group includes vertical prediction.
[0189] Partition mode C: The coding unit includes a first prediction group and a second prediction group, the first prediction group includes pixels other than the first pixel of the first column of the coding unit, and the second prediction group is a row of pixels of the non-first column of the coding unit.
[0190] In one example, the coding unit includes a first prediction group and at least one second prediction group.
[0191] In the embodiment of the present invention, 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.
[0192] Partition mode D: the coding unit includes a first prediction group and a second prediction group.
[0193] The first prediction group includes pixels other than the first pixel in the first row of the coding unit, and the second prediction group is a contiguous set of pixels in the non-first row of pixels of the coding unit.
[0194] In one example, the number of pixels included in one second prediction group is equal to or less than a certain threshold, or the number of columns of pixels included in one second prediction group is equal to or less than a certain threshold.
[0195] In one example, the coding unit includes a first prediction group and at least one second prediction group.
[0196] In an embodiment of the present invention, 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.
[0197] In the second part, for a non-first coding unit in an independent coding unit, when performing prediction, the first pixel of the coding unit may refer to pixels in other coding units in the independent coding unit. Based on this, in one example, the partitioning modes provided in the present invention differ from the partitioning modes described in the first part above in that the first prediction group in the above partitioning modes A to D further includes the first pixel in the coding unit.
[0198] In one embodiment, for prediction modes corresponding to any partition mode of the second part, please refer to the corresponding partition mode of the first part.
[0199] For example, the division mode A' of the second part corresponding to the above division mode A may be that the coding unit includes a first prediction group, a second prediction group and a third prediction group, where the first prediction group includes pixels of the first row of the coding unit, the second prediction group includes pixels of a plurality of consecutive odd columns of pixels of the non-first row of the coding unit, and the third prediction group includes pixels of consecutive even columns of pixels of the non-first row of the coding unit.
[0200] In the embodiment of the present invention, 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 pixel of the non-last column in the third prediction group includes horizontal average prediction, and the prediction mode corresponding to the pixel of the last column in the third prediction group includes horizontal prediction.
[0201] In another example, the second part of the partition mode D' corresponding to the above partition mode D may be that the coding unit includes a first prediction group and a second prediction group, where the first prediction group includes pixels in a first row of the coding unit, and the second prediction group is a plurality of consecutive columns of pixels in non-first rows of the coding unit.
[0202] In an embodiment of the present invention, 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.
[0203] For a description of the relevant content of the division mode A', please refer to the relevant content of the above division mode A. For a description of the relevant content of the division mode D', please refer to the relevant content of the above division mode D.
[0204] In another embodiment, a prediction mode corresponding to any partition mode of the second portion may correspond to another partition mode.
[0205] For example, the division mode B' of the second part corresponding to the above division mode B may be that the coding unit includes a first prediction group, a second prediction group and a third prediction group. The first prediction group includes pixels of the first column of the coding unit. The second prediction group includes pixels of odd rows of pixels of non-first columns of the coding unit. The third prediction group includes pixels of even rows of pixels of non-first columns of the coding unit.
[0206] In the embodiment of the present invention, 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 horizontal prediction.For example, the prediction mode corresponding to the last even-numbered pixel in the third prediction group includes vertical average prediction, and the prediction mode corresponding to the non-last even-numbered pixel in the third prediction group includes vertical prediction.
[0207] As another example, the second part of the partition mode C' corresponding to the above partition mode C may be that the coding unit includes a first prediction group and a second prediction group. The first prediction group includes pixels of a first column of the coding unit. The second prediction group is a row of pixels of a non-first column of the coding unit.
[0208] In an embodiment of the present invention, 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.
[0209] In one example, the above first type of division scheme can be applied to any one of a 16*4 coding unit, a 16*2 coding unit, and an 8*2 coding unit. Of course, it can also be applied to coding units of other sizes.
[0210] The second type of division method
[0211] Divide the coding unit into one 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.
[0212] In the first part, the first coding unit in the independent coding units is described.
[0213] In one embodiment, the prediction mode corresponding to pixels other than the first pixel in the first row of the coding unit comprises horizontal prediction, and the prediction mode corresponding to pixels in the non-first row comprises vertical prediction.
[0214] In another embodiment, the prediction mode corresponding to pixels other than the first pixel in the first column of the coding unit comprises vertical prediction, and the prediction mode corresponding to pixels of the non-first column comprises horizontal prediction.
[0215] In the second part, the non-first coding units in the independent coding unit are described.
[0216] In one embodiment, the prediction mode corresponding to pixels in the first row of a coding unit comprises horizontal prediction, and the prediction mode corresponding to pixels in non-first rows comprises vertical prediction.
[0217] In another embodiment, the prediction mode for all pixels in the coding unit includes horizontal prediction.
[0218] The third type of division
[0219] Partition mode 1: The coding unit includes a first prediction group and a second prediction group, where the first prediction group includes pixels of odd columns, and the second prediction group includes pixels of even columns.
[0220] In the embodiment of the present invention, the prediction mode corresponding to each prediction group is not limited.For example, the prediction mode corresponding to the first prediction group includes vertical prediction.The prediction mode corresponding to the pixel of the non-last row in the second prediction group includes horizontal average prediction, and the prediction mode corresponding to the pixel of the last row includes horizontal prediction mode.
[0221] Partition mode 2: The coding unit includes a first prediction group and a second prediction group, where the first prediction group includes pixels of even rows, and the second prediction group includes pixels of odd rows.
[0222] In the embodiment of the present invention, 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, and the prediction mode corresponding to the second prediction group includes vertical average prediction.
[0223] Partition mode 3: The coding unit includes multiple prediction groups, and each prediction group includes a row of pixels in the coding unit. In the embodiment of the present invention, the prediction mode corresponding to each prediction group is not limited. For example, the prediction mode corresponding to any one or more prediction groups (for example, each prediction group) includes horizontal prediction.
[0224] Partition mode 4: The coding unit includes multiple prediction groups, and each prediction group includes multiple consecutive columns of pixels. In one example, the number of columns of pixels included in different prediction groups is the same. In the embodiment of the present invention, the prediction mode corresponding to each prediction group is not limited. For example, the prediction mode corresponding to any one or more prediction groups includes vertical prediction.
[0225] In one example, the above third type of division scheme can be applied to any one of a 16*4 coding unit, a 16*2 coding unit, and an 8*2 coding unit. Of course, it can also be applied to coding units of other sizes.
[0226] In one example, the above-mentioned partition mode 3 may be adopted for the first row of parallel coding units (including the first coding unit of each parallel coding unit), or only the above-mentioned partition mode 3 may be allowed to be adopted. Also, the above-mentioned partition mode 1 or partition mode 4 may be adopted for the first column, where the first row is the first row coding unit of the parallel coding units, and the first column is the first column coding unit of the parallel coding units.
[0227] In one example, a coding unit may reference a column of pixels to the left of the coding unit and a row of pixels above it.
[0228] The fourth type of division method
[0229] Divide the coding unit into one 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.
[0230] In the following, in one example, several prediction modes are provided: Prediction mode 1: The prediction mode corresponding to the pixels of the coding unit includes vertical prediction, for example, all the pixels in the coding unit adopt vertical prediction.
[0231] 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.
[0232] In one example, for a first row of parallel coding units (including the first coding unit of each parallel coding unit), the above prediction mode 2 may be adopted or only the above prediction mode 2 may be allowed to be adopted. Also, for a first column, the above prediction mode 1 may be adopted or only the above prediction mode 1 may be allowed to be used. Here, the first row is the first row coding unit of the parallel coding units, and the first column is the first column coding unit of the parallel coding units.
[0233] In one example, for any coding unit (eg, each coding unit) of the parallel coding units, it is possible to reference one column of pixels to the left of the coding unit and one row of pixels above it.
[0234] The fifth type of division
[0235] Partition mode E: The coding unit is divided into multiple prediction groups in a vertically evenly divided manner. For example, one row of the coding unit is divided into one prediction group. For example, the coding unit is evenly divided into two or four prediction groups in the vertical direction.
[0236] In one example, if a 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 group, i.e., one of the prediction groups includes pixels other than the first element in the first row of the coding unit.
[0237] Partition mode F: The coding unit is divided into multiple prediction groups in a horizontally evenly divided manner. For example, multiple consecutive columns of the coding unit are divided into one prediction group. For example, the coding unit is evenly divided into 2, 4, or 8 prediction groups in the horizontal direction.
[0238] In one example, if a 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 group, i.e., one of the prediction groups includes pixels other than the first element in the first column of the coding unit and a column of pixels starting from the first column or consecutive columns of pixels.
[0239] Partition mode G: Divide the coding unit into multiple prediction groups vertically at a predetermined ratio.
[0240] In the embodiment of the present invention, the specific value of the predetermined ratio is not limited. In one example, the prediction groups are divided into three groups in a 1:2:1, 2:1:1, or 1:1:2 manner.
[0241] In one example, if a 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 group, i.e., one of the prediction groups includes pixels other than the first element in the first row of the coding unit, or pixels other than the first element in the first row of the coding unit and one row of pixels starting from the first row, or pixels in multiple consecutive rows.
[0242] Partition mode H: Divide the coding unit into multiple prediction groups horizontally at a predetermined ratio.
[0243] In the embodiment of the present invention, the specific value of the predetermined ratio is not limited. In one example, the prediction groups are divided into three groups in a 1:2:1, 2:1:1, or 1:1:2 manner.
[0244] In one example, if the coding unit is the first coding unit in the independent coding unit, the first pixel in the coding unit may not be divided into any prediction group, i.e., one of the prediction groups includes pixels other than the first element in the first column of the coding unit, or pixels other than the first element in the first column of the coding unit and pixels in a column starting from the first column, or pixels in multiple consecutive columns.
[0245] In the embodiment of the present invention, the prediction mode corresponding to any one of the above division modes E to H is not limited.
[0246] In one example, the above fifth type of division scheme can be applied to any one of a 16*4 coding unit, a 16*2 coding unit, and an 8*2 coding unit. Of course, it can also be applied to coding units of other sizes.
[0247] The above division modes are illustratively described below by using specific examples. In some embodiments, prediction modes corresponding to the division modes are further indicated.
[0248] Example 1: 16*4 coding units
[0249] 1.1 When the independent coding unit has only one 16*4 coding unit
[0250] Example 1: As shown in FIG. 8, a coding unit includes a total of five prediction groups, Groups 0 to 4.
[0251] Group 0 is composed of the pixels in the first row, second column to sixteenth column, and employs horizontal prediction.
[0252] Group 1 is composed of pixels in the 2nd, 3rd, and 4th rows and the 1st, 3rd, 5th, and 7th columns, and employs vertical prediction.
[0253] Group 2 is composed of the pixels in the 2nd, 3rd, and 4th rows and the 9th, 11th, 13th, and 15th columns, and employs vertical prediction.
[0254] Group 3 is composed of pixels in rows 2, 3, and 4 and columns 2, 4, 6, and 8, and employs horizontal prediction.
[0255] Group 4 is composed of the pixels in the 2nd, 3rd, and 4th rows and the 10th, 12th, 14th, and 16th columns, and the pixels in the 10th, 12th, and 14th columns employ horizontal average prediction, and the pixel in the 16th column employs horizontal prediction.
[0256] Example 2: As shown in FIG. 9, a coding unit includes a total of five prediction groups, Groups 0 to 4.
[0257] Group 0 consists of pixels other than the first pixel in the first column and employs vertical prediction.
[0258] Group 1 is composed of pixels in the first row, second column to sixteenth column, and employs horizontal prediction.
[0259] Group 3 is composed of the pixels in the third row, second to sixteenth columns, and employs horizontal prediction.
[0260] Group 2 is composed of pixels in the second row, second column to sixteenth column, and employs vertical average prediction.
[0261] Group 4 is composed of the pixels in the 2nd to 16th columns of the 4th row, and employs vertical prediction.
[0262] Example 3: As shown in FIG. 10, a coding unit includes a total of five prediction groups, Groups 0 to 4.
[0263] Group 0 is composed of pixels in the second to fourth rows and the first column, and employs vertical prediction.
[0264] Group 1 is composed of pixels in the first row, second column to sixteenth column, and employs horizontal prediction.
[0265] Group 2 is composed of pixels in the second row, second column to sixteenth column, and employs horizontal prediction.
[0266] Group 3 is composed of the pixels in the third row, second to sixteenth columns, and employs horizontal prediction.
[0267] Group 4 is composed of the pixels in the 4th row, 2nd to 16th columns, and employs horizontal prediction.
[0268] Example 4: As shown in FIG. 11, a coding unit includes a total of five prediction groups, Groups 0 to 4.
[0269] Group 0 is composed of the pixels in the first row, second column to sixteenth column, and employs horizontal prediction.
[0270] Group 1 is composed of pixels in the second, third, and fourth rows and the first to fourth columns, and employs vertical prediction.
[0271] Group 2 is composed of pixels in the second, third, and fourth rows and the fifth to eighth columns, and employs vertical prediction.
[0272] Group 3 is composed of pixels in the 2nd, 3rd, and 4th rows and the 9th to 12th columns, and employs vertical prediction.
[0273] Group 4 is composed of pixels in the 2nd, 3rd, and 4th rows and the 13th to 16th columns, and employs vertical prediction.
[0274] In the above description, a coding unit with a size of 16*4 is taken as an example, but coding units with other sizes can also be divided according to the same principle. In the case of a coding unit with a size of 16*2, Groups 1 to 4 in the above Example 1 are 4 pixels, Groups 2 and 3 in the above Example 2 are not present (i.e., there are only three groups in total, Groups 0, 1, and 4), Groups 2 and 3 in the above Example 3 are not present, and Groups 1 to 4 in the above Example 4 are 4 pixels.
[0275] 1.2. When an independent coding unit has multiple 16*4 coding units
[0276] When an independent coding unit includes multiple 16*4 coding units, the partition mode of the first 16*4 coding unit is shown in 1.1 above, and the partition modes of the subsequent 16*4 coding units are shown in Figures 12 to 15.
[0277] For example, the difference between the partition mode of the subsequent 16*4 coding unit and the first 16*4 coding unit is in the processing of the first pixel, the difference between the prediction mode is in the processing of the pixel of the first row, and the predicted values of other pixels may be consistent with the processing of the first 16×4 block. Specifically, in the case of partition mode A or D: the prediction mode corresponding to the first pixel of the first row of the subsequent 16*4 coding unit includes horizontal prediction, and the prediction modes corresponding to the other pixels of the first row include vertical prediction.
[0278] For partition mode B or C: The prediction mode corresponding to the four pixels in the first row of the subsequent 16*4 coding unit includes horizontal prediction.
[0279] In one example, the 16*4 coding unit in the first embodiment may be a 16*4 luma block, and may be a 16*4 chroma block.
[0280] In one example, embodiment 1 can also be applied to coding units of other sizes.
[0281] Example 2: 8*2 coding units
[0282] 2.1 When the independent coding unit has only one 8*2 coding unit
[0283] As shown in FIG. 16, horizontal prediction is performed on the remaining seven pixels other than the first pixel in the first row, and vertical prediction is performed on the eight pixels in the second row.
[0284] As shown in FIG. 17, horizontal prediction is performed on the remaining seven pixels other than the first pixel in the first row, vertical prediction is performed on the first pixel in the second row, and horizontal prediction is performed on the remaining seven pixels in the second row.
[0285] 2.2 When an independent coding unit has multiple 8*2 coding units
[0286] For the first 8*2 coding unit in an independent coding unit (eg, an N*2 independent coding unit, where N is 16 or more), its prediction process may be consistent with the prediction process described in 2.1.
[0287] For other 8*2 coding units in an independent coding unit (e.g., N*2 independent coding units, where N is 16 or more), the prediction process of the remaining pixels other than the first column may be consistent with the prediction process of the first 8*2 coding unit.
[0288] As shown in FIG. 18, the first pixel in the first column employs horizontal prediction, and the remaining pixel in the first column employs vertical prediction.
[0289] As shown in FIG. 19, the two pixels in the first column employ horizontal prediction.
[0290] In one example, the 8*2 coding unit in the second embodiment may be an 8*2 luma block, or an 8*2 chroma block.
[0291] In one example, embodiment 2 can also be applied to coding units of other sizes.
[0292] Example 3: 16*2 coding units
[0293] In one example, the coding units in the first row of the parallel coding units (including the first 16*2 coding units in each parallel coding unit) are allowed to perform division and prediction using only the following example 3. The coding units in the first column are allowed to perform division and prediction using only the following example 1 or example 4.
[0294] In one example, each 16*2 coding unit may refer to pixel values of one column of pixels (2 pixels) on the left and one row of pixels (16 pixels) on the top.
[0295] Example 1: As shown in FIG. 20, a coding unit includes Groups 1 to 2.
[0296] Group 1 is composed of pixels in columns 1, 3, 5, 7, 9, 11, 13, and 15, and employs vertical prediction. In one example, the pixels in Group 1 may refer to pixels in the last row above and adjacent to the coding unit.
[0297] Group 2 is composed of pixels in columns 2, 4, 6, 8, 10, 10, 14, and 16, and pixels other than the pixel in column 16 adopt horizontal average prediction, and elements in column 16 adopt horizontal prediction.
[0298] Example 2: As shown in FIG. 21, the coding unit includes Groups 1 to 2.
[0299] Group 1 consists of pixels in the second row and employs horizontal prediction.
[0300] Group 2 is composed of pixels in the first row and employs vertical average prediction. In one example, the pixels in Group 2 may refer to pixels in the last row above and adjacent to the coding unit.
[0301] Example 3: As shown in FIG. 22, the coding unit includes Groups 1 to 2.
[0302] Group 1 consists of the first row of pixels and employs horizontal prediction.
[0303] Group 2 consists of pixels in the second row and employs horizontal prediction.
[0304] Example 4: As shown in FIG. 23, the coding unit includes Groups 1 to 2.
[0305] Group 1 is composed of pixels in columns 1 to 8, and employs vertical prediction.
[0306] Group 2 is composed of pixels in columns 9 to 16, and employs vertical prediction.
[0307] In one example, pixels of Group 1 and Group 2 may refer to pixels in the last row of a 16*2 coding unit above and adjacent to the coding unit.
[0308] In one example, the 16*2 coding unit in the third embodiment may be a 16*2 luma block, or a 16*2 chroma block.
[0309] In one example, the third embodiment can also be applied to other sizes of coding units, such as 16*4 or 8*2 coding units.
[0310] Example 4: 8*1 coding unit
[0311] In one example, for the coding units in the first row of each parallel coding unit (including the first 8*1 coding unit of each parallel coding unit), prediction is permitted to be performed using only Example 2 below. For the coding units in the first column, prediction is permitted to be performed using only Example 1 below.
[0312] In one example, each 8*1 coding unit may refer to pixel values of one column of pixels (1 pixel) on the left and one row of pixels (8 pixels) on the top.
[0313] An 8*1 coding unit contains only one Group.
[0314] Example 1: As shown in FIG. 24, vertical prediction is performed for each pixel in a coding unit.
[0315] Example 2: As shown in FIG. 25, horizontal prediction is performed for each pixel in a coding unit.
[0316] Example 5
[0317] Figure 26 provides several division modes of a 16*4 coding unit. (a) shows that the coding unit is divided evenly into four groups vertically. (b) shows that the coding unit is divided into three groups vertically with a ratio of 1:2:1. (c) shows that the coding unit is divided evenly into four groups horizontally. (d) shows that the coding unit is divided into three groups horizontally with a ratio of 1:2:1. Figure 26 also shows the size of each group.
[0318] Figure 27 provides several division modes of a 16*2 coding unit. (a) shows that the coding unit is divided evenly into two groups vertically. (b) shows that the coding unit is divided evenly into four groups horizontally. (c) shows that the coding unit is divided into three groups with a ratio of 1:2:1 horizontally. Figure 27 also shows the size of each group.
[0319] Figure 28 provides several division modes of an 8*2 coding unit. (a) shows that the coding unit is divided evenly into two groups vertically. (b) shows that the coding unit is divided evenly into four groups horizontally. (c) shows that the coding unit is divided into three groups with a 1:2:1 ratio horizontally. Figure 28 also shows the size of each group.
[0320] However, for a pixel, when the pixel has the highest correlation with the pixel closest to the pixel, and the pixel is predicted using these pixels, the prediction result is more accurate.The pixel closest to the pixel may include four pixels adjacent to the pixel in the up, down, left and right directions of the pixel, and the specific implementation method is not limited thereto.In order to cover one or more of the cases, different prediction modes (e.g., horizontal prediction, vertical prediction, horizontal average prediction, vertical average prediction, etc.) may be used to predict different pixels in one coding unit.
[0321] On the other hand, considering the parallelism in hardware implementation, different division groups can perform prediction in parallel to improve the coding efficiency or decoding efficiency.For example, referring to FIG. 8, after performing prediction for Group 0 in FIG. 8, Groups 1 to 2 can perform prediction in parallel, and Groups 3 to 4 can perform prediction in parallel.Other examples are not listed one by one.
[0322] Based on the above two aspects (i.e., the accuracy of prediction result and the parallelism of prediction process), the embodiment of the present invention provides a partition mode in which the above coding unit is partitioned into prediction groups and a corresponding prediction mode, so as to improve coding efficiency and decoding efficiency. Of course, the prediction mode and the partition mode may be independent. The above partition mode and prediction mode are particularly applied to the scene of the coding image whose width size is larger than its height size, and in one example, the height size is equal to or smaller than a certain threshold.
[0323] The residual block grouping method provided in the embodiment of the present invention will now be described.
[0324] In one example, when the number of pixels included in one prediction group (or the number of pixels included in a residual block of one prediction group) is equal to or greater than a preset threshold, the residual blocks of the prediction group are grouped together.
[0325] In one example, when the number of pixels included in one prediction group (or the number of pixels included in a residual block of one prediction group) is smaller than a preset threshold, the residual block of the prediction group is not grouped.
[0326] For example, the pre-set threshold may be 3 or 4, or may be some other value.
[0327] First method: Group the residual blocks of the first target prediction group. Here, the first target prediction group is a prediction group including one row of pixels in a coding unit or one row of pixels other than the first pixel. For example, the first target prediction group may be Group 0 in FIG. 8, any of Groups 1 to 4 in FIG. 9, FIG. 10, FIG. 13, FIG. 14, Group 0 in FIG. 11, FIG. 12, FIG. 15, any of Groups 1 to 2 in FIG. 21, FIG. 22, etc.
[0328] In one embodiment, the residual blocks of the first target prediction group are split into one sub-residual block, which is equivalent to not grouping the residual blocks.
[0329] In another embodiment, the residual block of the first target prediction group is divided into multiple sub-residual blocks.
[0330] Division mode 1: the multiple sub-residual blocks include a first sub-residual block and a second sub-residual block, each of which includes a plurality of consecutive pixels, and the difference between the number of pixels included in the first sub-residual block and the number of pixels included in the second sub-residual block is the smallest.
[0331] In one example, the residual block of the first target prediction group is divided evenly or as evenly as possible into two sub-residual blocks.
[0332] Division mode 2: the multiple sub-residual blocks include a first sub-residual block, a second sub-residual block, and a third sub-residual block, each of which includes a plurality of consecutive pixels, the difference between the number of pixels included in the first sub-residual block and the first number is the smallest, the first number is the sum of the number of pixels included in the second sub-residual block and the third sub-residual block, and the number of pixels included in the second sub-residual block and the third sub-residual block is equal.
[0333] In one example, the residual block of the first target prediction group is split evenly or as evenly as possible into two parts, one of which is a sub-residual block and the other part is split evenly into two sub-residual blocks.
[0334] Division mode 3: the multiple sub-residual blocks include a first sub-residual block, a second sub-residual block, and a third sub-residual block, where the first sub-residual block, the second sub-residual block, and the third sub-residual block all include multiple consecutive pixels, the third sub-residual block has the smallest number of pixels and the second number, the second number is the sum of the number of pixels included in the first sub-residual block and the second sub-residual block, and the first sub-residual block has the smallest number of pixels and the second sub-residual block has the smallest number of pixels.
[0335] In one example, the residual block of the first target prediction group is split evenly or as evenly as possible into two parts, one of which is a sub-residual block and the other part is split as evenly as possible into two sub-residual blocks.
[0336] Division mode 4: the multiple sub-residual blocks include a first sub-residual block, a second sub-residual block, a third sub-residual block, and a fourth sub-residual block, where the first sub-residual block, the second sub-residual block, the third sub-residual block, and the fourth sub-residual block each include a plurality of consecutive pixels, and the difference in the number of pixels included in the first sub-residual block, the second sub-residual block, the third sub-residual block, and the fourth sub-residual block has the smallest difference.
[0337] In one example, the residual block of the first target prediction group is divided evenly or as evenly as possible into four parts.
[0338] Second method: Group the residual blocks of the second target prediction group. Here, the second target prediction group is a prediction group including pixels of multiple columns in a coding unit. For example, the second target prediction group may be any of Groups 1 to 4 in FIG. 8, FIG. 11, FIG. 12, and FIG. 15, or any of Groups 1 to 2 in FIG. 20 and FIG. 23, etc.
[0339] In one embodiment, the residual blocks of the second target prediction group are split into one sub-residual block, which is equivalent to not grouping the residual blocks.
[0340] In another embodiment, the residual block of the second target prediction group is divided into multiple sub-residual blocks.
[0341] Partition mode 1: the multiple sub-residual blocks include at least two sub-residual blocks, where each sub-residual block includes one column of pixels or multiple consecutive columns of pixels, and the number of columns of pixels included in different sub-residual blocks is equal.
[0342] Division mode 2: the multiple sub-residual blocks include a first sub-residual block, a second sub-residual block, and a third sub-residual block, where each residual block includes one column of pixels or multiple consecutive columns of pixels, and the number of columns of pixels included in the first sub-residual block is equal to the sum of the number of columns of pixels included in the second sub-residual block and the third sub-residual block.
[0343] Partition mode 3: the multiple sub-residual blocks include at least four sub-residual blocks, where each sub-residual block includes one column of pixels or multiple consecutive columns of pixels, and the number of columns of pixels included in different sub-residual blocks is equal.
[0344] Third method: Group the residual blocks of a third target prediction group, where the third target prediction group is a prediction group that includes multiple rows of pixels in a coding unit. For example, the third target prediction group may be any one of the prediction groups shown in Figure 16 to Figure 19.
[0345] In one embodiment, the residual block of the third target prediction group is split into one sub-residual block, which is equivalent to not grouping the residual block.
[0346] In another embodiment, the residual block of the third target prediction group is divided into multiple sub-residual blocks.
[0347] Division mode 1: each sub-residual block of the multiple sub-residual blocks includes one row of pixels or one row of pixels other than the first pixel.
[0348] In one example, the residual block of the third target prediction group is divided into multiple sub-residual blocks by rows.
[0349] Division mode 2: the multiple sub-residual blocks include a first sub-residual block, a second sub-residual block, and a third sub-residual block, where the first sub-residual block includes a pixel in a row or a prediction group of pixels in a row other than the first pixel, the second sub-residual block and the third sub-residual block are consecutive pixels in the same row, and the difference in pixel number between the second sub-residual block and the third sub-residual block is the smallest.
[0350] In one example, the residual block of the third target prediction group is divided into multiple parts by rows, one or more of which are each designated as a sub-residual block, and one or more of the other parts are divided evenly or as evenly as possible to obtain the sub-residual blocks.
[0351] Division mode 3: the multiple sub-residual blocks include a first sub-residual block, a second sub-residual block, a third sub-residual block, and a fourth sub-residual block, each of which includes a plurality of consecutive pixels, and the difference in the number of pixels included in the first sub-residual block, the second sub-residual block, the third sub-residual block, and the fourth sub-residual block has the smallest difference.
[0352] In one example, the residual block of the third target prediction group is divided into a number of sub-residual blocks as evenly as possible, for example, evenly divided into four sub-residual blocks.
[0353] Hereinafter, the above residual block division mode will be described by way of an illustrative example.
[0354] Example 1: Figure 29 is a schematic diagram of multiple residual block groupings of a prediction group according to an embodiment of the present invention. Figure 29 is an example in which the size of a coding unit is 16*4, and the prediction group is an element other than the first element in the first row of the coding unit. For example, the prediction group may be Group 0 in Figure 8 or Figure 11, or any of Groups 1 to 4 in Figure 9 or Figure 10.
[0355] Each of Fig. 29(a)-(e) shows a residual block division mode. Each sub-grid in each figure represents one pixel, and the same type of sub-grid represents pixels in the same sub-residual block. For example, (b) shows that the residual block is divided into two sub-residual blocks, one of which includes the first seven pixels indicated by the left diagonal line, and the other of which includes the last eight pixels indicated by the blank line.
[0356] Example 2: Figure 30 is a schematic diagram of various residual block groupings of a prediction group according to an embodiment of the present invention. Note that Figure 30 is an example in which the size of a coding unit is 16*4, and a prediction group is an element of four columns of the coding unit. For example, the prediction group may be any of Groups 1 to 4 in Figure 8 or Figure 11.
[0357] 30(a) to (e) show the residual block division modes, respectively. Each sub-grid in each diagram represents one pixel, and the same type of sub-grid represents pixels in the same sub-residual block.
[0358] In one example, the coefficient coding schemes of pixels in the same sub-residual block are the same, or the coding length (CL) of pixels in the same sub-residual block, i.e., the number of bits occupied after the residual coefficients are coded, are the same.
[0359] In one example, Figures 29 and 30 show five partition modes of a residual block. In one example, the partition mode GPM (shown in Table 1) can be expressed by 1 bit or 3 bits. GP 0 to GP 4 may correspond to (a) to (e) in Figure 29 or (a) to (e) in Figure 30, respectively. [Table 1]
[0360] 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 method can be applied to the partition modes of the residual block of the prediction group of other sizes, or to other partition modes of the prediction group.
[0361] Example 3: Figure 31 is a schematic diagram of multiple residual block grouping of a prediction group according to an embodiment of the present invention. Figure 31 is an example in which the size of a coding unit is 8*2 and the coding unit is divided into one prediction group. The first pixel in each of (a) to (e) of Figure 31 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. The prediction group in Figure 31 may be the prediction group in Figure 16 or Figure 17. In any of (a) to (e), hatched pixels of the same type represent pixels in the same sub-residual block.
[0362] 31, the coding unit is divided into only one prediction group, and the residual blocks of the prediction group share five types of partition modes (i.e., GPMs). For these five types of GPMs, 1 bit or 3 bits are required to indicate the partitioning scheme (also shown in Table 1).
[0363] The coding order of sub-residual blocks (i.e., RBs) in the same prediction group is from top to bottom and from left to right. Taking (e) of Fig. 31 as an example, the coding order of each RB is RB0 to RB3 as shown in Fig. 32. Note that the coding order of sub-residual blocks in other embodiments can be obtained by inference based on the diagram shown in Fig. 32, and the description thereof will be omitted here.
[0364] In addition, when a residual block is divided into a large number of sub-residual blocks, the division mode information to be coded is large, and when a residual block is divided into a small number of sub-residual blocks, residuals with different characteristics are divided into one group, and the coding efficiency of residual coefficients is low. The embodiment of the present invention provides the above residual block division method by considering at least these two aspects.
[0365] Other steps involved in the process of encoding and decoding a video image will now be described by way of example. First, an embodiment of the upper layer syntax will be described.
[0366] The upper layer 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 may be obtained by the upper layer syntax. In this way, these information are encoded only once in a certain area, which can effectively save the bit rate, while these information are relatively important, so they can be transmitted in a certain set and protected in a different way from other normal data. For example, the area in the following syntax may be the above-mentioned parallel coding unit, independent coding unit, coding unit, PG, RB, image, or image sequence, etc.
[0367] These upper layer syntaxes can be encoded and decoded using a fixed length coding method or a truncated unary code coding method.
[0368] 1) Maximum error
[0369] A max_distance syntax is added to a region header to indicate that the maximum error of blocks in a region is max_distance, 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 that the squared 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.
[0370] 2) Quantization parameters
[0371] A quantization_parameter syntax is added to a region header to indicate the quantization step used for blocks in a region. The quantization step is used to quantize the residual coefficients or the residual transformed coefficients to reduce the bitrate overhead.
[0372] When encoding the quantization_parameter syntax, the quantization_parameter is 0, i.e., there is a high probability of not performing quantization, and a shorter codeword should be assigned, i.e., a shorter codeword indicates that the quantization_parameter is 0. As an example, a binary 0 indicates that the quantization_parameter is 0, and a binary 1*** indicates that the quantization_parameter is greater than 0 (* represents 0 or 1).
[0373] 3) Bit depth
[0374] A bit_depth syntax is added to a region header (preferably an image header or an image sequence header) to indicate the bit depth of blocks in a region. The bit depth indicates the number of bits used to code the pixel value of each pixel, where a bit depth of N bits indicates that the pixel values are in the range [0, 2^N-1], e.g., a bit depth of 8 bits indicates that the pixel values are in the range [0, 255].
[0375] 4) Flag to indicate whether to encode the original value
[0376] An org_flag syntax (binary, i.e., only 0 and 1 values) is added to a region header to indicate whether blocks in a region directly encode original pixel values. If org_flag is 1, blocks in a region directly encode original values. That is, each pixel is directly encoded using bit_depth bits, and there is no need to transmit other information such as prediction information, predicted values, and residual information. This method is to avoid over-expansion of data (i.e., data after compression is obviously larger than the original data) caused by the above prediction method being useless (e.g., some image blocks with relatively high noise).
[0377] 5) Basic information about the image
[0378] An image basic information syntax is added to a region header (preferably an image header or an image sequence header) to represent basic information of the image, such as resolution (i.e., image width and height), image luminance and chrominance format (YUV 444, YUV 420, YUV 422, RGB 444, etc.).
[0379] 6) Importance of each component
[0380] If an image consists of multiple components, a region header (preferably an image header or an image sequence header) should contain syntax for the importance of each component. When the luma_weight syntax is added, it indicates that the ratio of importance of the three YUV components in the image is luma_weight:1:1.
[0381] 7) Parallel Encoding Unit Syntax and Constraints
[0382] The size related information of the parallel independent coding units is transmitted in the image header or image sequence header.
[0383] Method 1: Transmit the width para_unit_width and height para_unit_height of the parallel independent coding unit. Divide the image into multiple parallel independent coding units of the same size (except for the parallel independent coding units at the end of each row and the end of each column).
[0384] Method 2: Transmit the number N_CU of coding units (or independent coding units) included in the parallel independent coding unit. Divide the image into multiple parallel independent coding units that contain the same number of coding units (excluding the parallel independent coding units at the end of each row and the end of each column).
[0385] Blocks in different parallel coding units cannot reference each other to ensure parallel encoding and decoding.
[0386] 8) Length map output
[0387] The length map information is transmitted in the picture header or picture sequence header. The length map information is used to store the offset information of the starting bitstream of each independent coding unit and the starting bitstream of the current picture. The offset needs to be aligned by K bytes (K is preferably 8 or 16). The length map information is used to indicate the random index of each independent coding unit of the current picture. That is, if one wants to obtain the information of any independent coding unit in a picture, it is not necessary to decode the bitstreams of all the previous independent coding units.
[0388] Second, dealing with special circumstances
[0389] 1) Line completion
[0390] The size of a basic processing unit is defined as width w_unit and height h_unit.
[0391] If the image width is not an integer multiple of w_unit, or the image height is not an integer multiple of h_unit, then fill it using the nearest neighbor method (the right image border is filled by copying the nearest available pixel on the left, and the bottom image border is filled by copying the nearest available pixel on the top) to an integer multiple of w_unit width or h_unit height, and then encode it in the normal way.
[0392] 2) Line end or image end bitstream supplement
[0393] At the end of the last block of a row (or image), if the total number of bits in the cumulative bitstream before the current block is not a multiple of 8 bits, it is complemented by adding 0 or 1 to align the bytes of the total number of bits in the cumulative bitstream.
[0394] 3) Writing residual information
[0395] When writing the residual, to take into account hardware needs, the residual is written as a basic unit of FxF (F is preferably 4 or 2) rather than in a top-to-bottom, left-to-right raster scan order.
[0396] It should be noted that some or all of the features of each of the above embodiments may be combined in any suitable manner to obtain a new embodiment, provided that no contradiction is present.
[0397] It can be understood that to realize the functions in the above embodiments, the video encoder / video decoder includes corresponding hardware structures and / or software modules for performing each function. Those skilled in the art should be able to easily understand that the present invention can be implemented in hardware or in the form of a combination of hardware and computer software, in combination with the example units and method steps described in the embodiments disclosed in the present invention. Whether a function is performed by hardware or by computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.
[0398] 33 is a schematic block diagram of a decoding device 300 according to the present invention, and any of the above-mentioned embodiments of the decoding method can be executed 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 one example, the decoding device can be the destination device 12 in FIG. 1. In another example, the decoding device can be the decoder 122 in FIG. 1 or the decoder 30 in FIG. 3.
[0399] In one example, the entropy decoding unit 3001 may be realized by the entropy decoding unit 301 in Fig. 3. The prediction processing unit 3002 may be realized by the prediction processing unit 304 in Fig. 3. The decoding unit 3003 may be realized by the reconstruction unit 305 in Fig. 3, and in one example, the decoding unit 3003 may be realized by the reconstruction unit 305 and the filter unit 306 in Fig. 3. The current image block in Fig. 3 may be a decoding target unit in this embodiment.
[0400] The entropy decoding unit 3001 is used to parse a bitstream to obtain syntax elements. The syntax elements are used to obtain residual blocks of a unit to be decoded, and the unit to be decoded includes at least one prediction group. For example, the entropy decoding unit 3001 may be used to perform S201 in FIG. 7.
[0401] The prediction processing unit 3002 is used to determine a prediction mode of any one of the at least one prediction group, predict the any one prediction group based on the prediction mode, and obtain a predicted value of the any one prediction group. For example, the prediction processing unit 3002 may be used to execute S202 to S203 in FIG.
[0402] The decoding unit 3003 is used to decode the current unit based on the residual block of the current unit and the prediction value of any one of the prediction groups. For example, the decoding unit 3003 may be used to execute S204 in FIG.
[0403] A more detailed description of the above entropy decoding unit 3001, prediction processing unit 3002 and decoding unit 3003 and an explanation of their beneficial effects can be obtained directly by directly referring to the relevant description in the embodiment of the method shown in Figure 7, and the description is omitted here.
[0404] Fig. 34 is a schematic diagram of an encoding device 310 according to the present invention. The encoding device 310 includes a division unit 3101, a prediction processing unit 3102, a residual calculation unit 3103, and an encoding unit 3104. In one example, the encoding device may be the source device 11 in Fig. 1. In another example, the encoding device may be the encoder 112 in Fig. 1 or the encoder 20 in Fig. 2.
[0405] In one example, the prediction processing unit 3102, the residual calculation unit 3103, and the coding unit 3104 may be realized by the prediction processing unit 201, the residual calculation unit 202, and the entropy coding unit 205 in Fig. 2, respectively. Note that the division unit 3101 may be a unit for obtaining the current image block in Fig. 2. The current image block in Fig. 2 may be the coding unit in this embodiment.
[0406] A more detailed description of the above-mentioned division unit 3101, prediction processing unit 3102, residual calculation unit 3103 and encoding unit 3104 and an explanation of their beneficial effects can be obtained directly by referring to the relevant explanations in the embodiment of the method shown in FIG. 5, and the explanation will be omitted here.
[0407] The present invention further provides an electronic device for executing any of the above-mentioned decoding method embodiments. As shown in FIG. 35, FIG. 35 is a schematic block diagram of an electronic device according to the present invention. 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 can be understood that the communication interface 3220 may be a transceiver or an input / output interface. In one example, the electronic device 3200 may further include a memory 3230 used to store instructions executed by the processor 3210, to store input data required for the processor 3210 to execute the instructions, or to store data generated after the processor 3210 executes the instructions.
[0408] When the electronic device 3200 is used to execute the method shown in FIG. 7, the processor 3210 and the communication interface 3220 are used to execute the functions of the entropy decoding unit 3001, the prediction processing unit 3002 and the decoding unit 3003 described above.
[0409] When the electronic device 3200 is used to execute the method shown in FIG. 5, the processor 3210 and the communication interface 3220 are used to execute the functions of the division unit 3101, the prediction processing unit 3102, the residual calculation unit 3103 and the encoding unit 3104 described above.
[0410] In an embodiment of the present invention, the specific connection medium between the communication interface 3220, the processor 3210, and the memory 3230 is not limited. In an embodiment of the present invention, the communication interface 3220, the processor 3210, and the memory 3230 are connected by a bus 3240 in FIG. 35. The bus is shown by a thick line in FIG. 35. The connection manner between the other components is only an exemplary explanation and is not limited. The bus can be classified into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in FIG. 35, but it does not indicate that only one bus or one type of bus exists.
[0411] The memory 3230 may be used to store software programs and modules, such as program instructions / modules corresponding to the decoding or encoding methods provided in the embodiments of the present invention. The processor 3210 executes various functional applications and data processing by executing the software programs and modules stored in the memory 3230. The communication interface 3220 may be used to communicate signaling or data with another device. In the present invention, the electronic device 3200 may have multiple communication interfaces 3220.
[0412] It may be understood that the processor in an embodiment of the present invention may be a central processing unit (CPU), a neural processing unit (NPU), or a graphic processing unit (GPU), or may be another general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or another programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.
[0413] The steps of the method in the embodiment of the present invention may be implemented by hardware or by a processor executing software instructions. The software instructions may be composed of corresponding software modules, which may be stored in a random access memory (RAM), a flash memory, a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a register, a hard disk, a removable hard disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium may be a component of the processor. The processor and the storage medium may be located in an ASIC. The ASIC may also be located in a network device or a terminal device. Of course, the processor and the storage medium may exist in the network device or the terminal device as separate components.
[0414] In the above embodiments, all or part of the invention may be realized by software, hardware, firmware, or any combination thereof. When the invention is realized using a software program, all or part of the invention may be realized in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer programs or instructions are loaded and executed on a computer, the procedures or functions according to the embodiments of the invention are 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 equipment, or other programmable device. The computer programs or instructions may be stored in a computer-readable storage medium, or may be transmitted from one computer-readable storage medium to another. For example, the computer programs or instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired or wireless manner. The computer-readable storage medium may be any available medium accessible by a computer, or a data storage device such as a server, data center, or the like that integrates one or more available media. The available media may be magnetic media, such as floppy disks, hard disks, or magnetic tapes, optical media, such as digital video discs (DVDs), or semiconductor media, such as solid state drives (SSDs).
[0415] In each embodiment of the present invention, unless there is a special explanation and logical contradiction, the terms and / or explanations between different embodiments have consistency and can be cited from each other. The technical features in different embodiments can be combined according to their internal logical relationships to form new embodiments. In the present invention, "at least one" refers to one or more, and "multiple" refers to two or more. "And / or" describes the related relationship of related objects and indicates that three types of relationships may exist. For example, A and / or B can represent that A exists alone, that A and B exist simultaneously, or that B exists alone. Here, A and B may be singular or plural. In the text description of the present invention, the character " / " generally represents that the related objects before and after are in an "or" relationship, and in the formula of the present invention, the character " / " represents that the related objects before and after are in a "division" relationship.
[0416] It should be understood that the various numerals in the embodiments of the present invention are merely for the convenience of description and do not limit the scope of the embodiments of the present invention. The sequence numbers of the above processes do not mean the execution order, and the execution order of each process should be determined by its function and internal logic.
Claims
1. Parsing the bitstream to obtain syntax elements, the syntax elements being used to obtain residual blocks of a unit to be decoded, the unit to be decoded including at least one prediction group; determining a prediction mode of any one of the at least one prediction group; predicting the one of the prediction groups based on the prediction mode to obtain a predicted value of the one of the prediction groups; decoding the unit to be decoded based on a residual block of the unit to be decoded and a prediction value of each prediction group of the at least one prediction group; The at least one prediction group includes a prediction group including pixels of odd columns in the decoding target unit and a prediction group including pixels of even columns in the decoding target unit.
2. An image decoding method comprising:
2. The at least one prediction group includes a plurality of prediction groups, and prediction modes of at least two prediction groups among the plurality of prediction groups are different.
2. The method of claim 1 .
3. 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, or The prediction mode of any one of the prediction groups includes a reference prediction performed using pixel values of a decoding unit adjacent to the decoding target unit, or using pixel values of an independent decoding unit adjacent to the independent decoding unit in which the decoding target unit is located, 2. The method of claim 1 .
4. The one prediction group is a chrominance prediction group or a luma prediction group.
2. The method of claim 1 .
5. The syntax element further includes identification information of a partition mode of the unit to be decoded, the partition mode being a partition mode used when the unit to be decoded is partitioned into the at least one prediction group; and / or The syntax element further includes a prediction mode of the one prediction group.
2. The method of claim 1 .
6. the syntax element further includes a first indicator, the first indicator being used to indicate whether to perform grouping on the residual block.
2. The method of claim 1 .
7. the residual block comprises a luma residual block or a chroma residual block; 7. The method of claim 6.
8. The residual block is a residual block of a decoding target unit granularity or a residual block of a prediction block granularity.
2. The method of claim 1 .
9. Partitioning a coding unit into at least one prediction group; For any one of the at least one prediction group, predicting the any one prediction group according to a corresponding prediction mode to obtain a predicted value of the any one prediction group; obtaining a residual block of the coding unit based on a prediction value of each prediction group of the at least one prediction group; encoding a residual block of the coding unit; The at least one prediction group includes a prediction group including pixels of odd columns in the coding unit and a prediction group including pixels of even columns in the coding unit.
13. An image coding method comprising:
10. an entropy decoding unit used to parse a bitstream to obtain syntax elements, the syntax elements being used to obtain residual blocks of a unit to be decoded, the unit to be decoded including at least one prediction group; A prediction processing unit used to determine a prediction mode of any one of the at least one prediction groups, predict the any one of the prediction groups based on the prediction mode, and obtain a predicted value of the any one of the prediction groups; a decoding unit used to decode the unit to be decoded based on a residual block of the unit to be decoded and a prediction value of each prediction group of the at least one prediction group; The at least one prediction group includes a prediction group including pixels of odd columns in the decoding target unit and a prediction group including pixels of even columns in the decoding target unit.
2. An image decoding device comprising:
11. a partitioning unit used for partitioning a coding unit into at least one prediction group; A prediction processing unit used for predicting any one of the at least one prediction groups according to a corresponding prediction mode to obtain a predicted value of the any one prediction group; a residual calculation unit used to obtain a residual block of the coding unit based on a prediction value of each prediction group of the one prediction group; an encoding unit used to encode a residual block of the encoding unit; The at least one prediction group includes a prediction group including pixels of odd columns in the coding unit and a prediction group including pixels of even columns in the coding unit.
1. An image encoding device comprising:
12. A coding side and a decoding side, the coding side being communicatively connected to the decoding side, the decoding side being used to execute the method according to any one of claims 1 to 8, and the coding side being used to execute the method according to claim 9.
1. An image encoding and decoding system comprising:
13. An electronic device including a processor and a memory, the memory is used to store computer instructions; The processor is adapted to retrieve and execute the computer instructions from the memory to perform the method according to any one of claims 1 to 9.
1. An electronic device comprising:
14. A computer-readable storage medium having a computer program or instructions stored thereon, The computer program or instructions, when executed by an electronic device, perform the method according to any one of claims 1 to 9. A computer-readable storage medium comprising: