Image decoding method, decoder, and storage medium

CN122554640APending Publication Date: 2026-08-11GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2019-04-23
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004]为了能够得到较好的编码的效果,在视频编码时常常需要对每一帧图像进行细致分割,同时,由于目前视频编码技术中固定的划分方案,细小的分割会产生更多的头信息和重复信息表示,从而降低编码效率

Benefits of technology

[0007] This application provides an image decoding method, a decoder, and a storage medium. The decoder receives bitstream data and parses the bitstream data to obtain the coding tree unit corresponding to the bitstream data; it parses the i-th node of the i-th layer corresponding to the coding tree unit to obtain the i-th state parameter and the i-th flag parameter corresponding to the i-th node; where i is an integer greater than 0; the i-th state parameter is used to determine whether the i-th node supports refresh; the i-th flag parameter is used to determine whether the i-th node enables refresh; the i-th node is detected based on the i-th state parameter and the i-th flag parameter to obtain the i-th detection result; based on the i-th detection result, the i+1-th node of the (i+1)-th layer corresponding to the coding tree unit is obtained; the (i+1)-th node is detected again, and all nodes corresponding to the coding tree unit are traversed until all coding unit data corresponding to the coding tree unit is obtained; based on all nodes and all coding unit data, a decoded image corresponding to the bitstream data is generated. Therefore, in the embodiments of this application, during the decoding of images in a video, after receiving the bitstream data and parsing it to obtain the coding tree unit, the nodes of each layer corresponding to the coding tree unit can be parsed to obtain the state parameters and flag parameters of the nodes at that layer. Then, the nodes are detected based on the state parameters and flag parameters, and the nodes with data are decoded to obtain all the coding units corresponding to the coding tree unit, thereby obtaining the corresponding decoded image. Since overlapping division between coding units is supported during encoding, if at least two coding units with overlapping regions exist among all the coding units obtained by the decoder from the nodes with data, the decoder can refresh the image information corresponding to the background coding unit according to the image information corresponding to the refresh coding unit. This avoids excessive division of the video image, reduces unnecessary header information, and avoids the scattered and repeated representation of data with similar characteristics in the same region, thereby improving encoding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122554640A_ABST
    Figure CN122554640A_ABST
Patent Text Reader

Abstract

This application discloses an image decoding method, a decoder, and a storage medium. The image decoding method includes: receiving bitstream data and parsing the bitstream data to obtain the coding tree unit corresponding to the bitstream data; parsing the i-th node of the i-th layer corresponding to the coding tree unit to obtain the i-th state parameter and the i-th flag parameter corresponding to the i-th node; where i is an integer greater than 0; performing detection processing on the i-th node according to the i-th state parameter and the i-th flag parameter to obtain the i-th detection result; obtaining the i+1-th node of the (i+1)-th layer corresponding to the coding tree unit according to the i-th detection result; continuing to perform detection processing on the (i+1)-th node and traversing all nodes corresponding to the coding tree unit until all coding unit data corresponding to the coding tree unit is obtained; and generating a decoded image corresponding to the bitstream data according to all nodes and all coding unit data.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Case Analysis This application is a divisional application of Chinese patent application No. 201980085010.0, entitled "Image Decoding Method, Decoder and Storage Medium", which entered the Chinese national phase of PCT international patent application PCT / CN2019 / 083966, filed on April 23, 2019. Technical Field

[0002] This application relates to the field of video encoding and decoding technology, and in particular to an image decoding method, a decoder, and a storage medium. Background Technology

[0003] Currently, video coding techniques primarily utilize segmentation to divide the spatial region of an image into non-overlapping small blocks as the basic unit of encoding, which are then encoded. Among these, the commonly used multi-type-tree (MTT) partitioning technique evolved step by step from quadtree (QT) to quad-tree and binary-tree (QTBT) partitioning, and further combined with ternary tree (TT) partitioning. Therefore, the difference between QT, QTBT, and MTT lies only in the partitioning method used for image segmentation; their underlying principles are the same.

[0004] In order to achieve better encoding results, video encoding often requires detailed segmentation of each frame. However, due to the fixed segmentation scheme in current video encoding technology, fine segmentation will generate more header information and repetitive information representation, thereby reducing encoding efficiency. Summary of the Invention

[0005] This application provides an image decoding method, decoder, and storage medium that can avoid overly fine block divisions, effectively reduce the amount of header information, and thus improve encoding efficiency.

[0006] The technical solution of this application embodiment is implemented as follows: An image decoding method, the method comprising: Receive bitstream data and parse the bitstream data to obtain the coding tree unit corresponding to the bitstream data; The ith node of the ith layer corresponding to the cipher unit is parsed to obtain the ith state parameter and the ith flag parameter corresponding to the ith node; wherein, i is an integer greater than 0; the ith state parameter is used to determine whether the ith node supports refresh; the ith flag parameter is used to determine whether the ith node enables refresh. The i-th node is detected based on the i-th state parameter and the i-th flag parameter to obtain the i-th detection result; Based on the i-th detection result, obtain the (i+1)-th node of the (i+1)-th layer corresponding to the coding tree unit; Continue to perform the detection process on the (i+1)th node, and traverse all nodes corresponding to the coding tree unit until all coding unit data corresponding to the coding tree unit is obtained; Based on all the nodes and all the encoding unit data, a decoded image corresponding to the bitstream data is generated.

[0007] This application provides an image decoding method, a decoder, and a storage medium. The decoder receives bitstream data and parses the bitstream data to obtain the coding tree unit corresponding to the bitstream data; it parses the i-th node of the i-th layer corresponding to the coding tree unit to obtain the i-th state parameter and the i-th flag parameter corresponding to the i-th node; where i is an integer greater than 0; the i-th state parameter is used to determine whether the i-th node supports refresh; the i-th flag parameter is used to determine whether the i-th node enables refresh; the i-th node is detected based on the i-th state parameter and the i-th flag parameter to obtain the i-th detection result; based on the i-th detection result, the i+1-th node of the (i+1)-th layer corresponding to the coding tree unit is obtained; the (i+1)-th node is detected again, and all nodes corresponding to the coding tree unit are traversed until all coding unit data corresponding to the coding tree unit is obtained; based on all nodes and all coding unit data, a decoded image corresponding to the bitstream data is generated. Therefore, in the embodiments of this application, during the decoding of images in a video, after receiving the bitstream data and parsing it to obtain the coding tree unit, the nodes of each layer corresponding to the coding tree unit can be parsed to obtain the state parameters and flag parameters of the nodes at that layer. Then, the nodes are detected based on the state parameters and flag parameters, and the nodes with data are decoded to obtain all the coding units corresponding to the coding tree unit, thereby obtaining the corresponding decoded image. Since overlapping division between coding units is supported during encoding, if at least two coding units with overlapping regions exist among all the coding units obtained by the decoder from the nodes with data, the decoder can refresh the image information corresponding to the background coding unit according to the image information corresponding to the refresh coding unit. This avoids excessive division of the video image, reduces unnecessary header information, and avoids the scattered and repeated representation of data with similar characteristics in the same region, thereby improving encoding efficiency. Attached Figure Description

[0008] Figure 1 A diagram illustrating the segmentation of QT technology. Figure 1 ; Figure 2A diagram illustrating the segmentation of QT technology. Figure 2 ; Figure 3 This is a diagram illustrating over-segmentation; Figure 4 This is a schematic diagram of the composition and structure of a video encoding system; Figure 5 This is a schematic diagram of the composition and structure of a video decoding system; Figure 6 This is a schematic diagram illustrating the implementation process of an image decoding method proposed in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a coding tree unit in the prior art; Figure 8 This is a schematic diagram of the structure of the coding tree unit in the embodiments of this application; Figure 9 This is a schematic flowchart of the image decoding method proposed in the embodiments of this application. Figure 1 ; Figure 10 This is a schematic flowchart of the image decoding method proposed in the embodiments of this application. Figure 2 ; Figure 11 This is a schematic diagram of the state parameters and flag parameters in the embodiments of this application; Figure 12 Schematic diagram of segmentation processing Figure 1 ; Figure 13 Schematic diagram of segmentation processing Figure 2 ; Figure 14 Schematic diagram of segmentation processing Figure 3 ; Figure 15 Schematic diagram of segmentation processing Figure 4 ; Figure 16 Schematic diagram of segmentation processing Figure 5 ; Figure 17 Schematic diagram of segmentation processing Figure 6 ; Figure 18 This is a schematic diagram of an image encoding method proposed in an embodiment of this application; Figure 19 A diagram showing a non-overlapping division. Figure 1 ; Figure 20 A diagram showing a non-overlapping division. Figure 2 ; Figure 21 A diagram illustrating overlapping divisions Figure 1 ; Figure 22 A diagram illustrating overlapping divisions Figure 2 ; Figure 23 A schematic diagram of the decoder structure proposed in the embodiments of this application. Figure 1 ; Figure 24 A schematic diagram of the decoder structure proposed in the embodiments of this application. Figure 2 . Detailed Implementation

[0009] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are merely for explaining the relevant application and not for limiting the application. Furthermore, it should be noted that, for ease of description, only the parts relevant to the application are shown in the accompanying drawings.

[0010] Encoding video involves encoding each frame of an image; similarly, decoding the compressed video stream involves decoding each frame of the image stream. In almost all international video encoding standards, encoding a single frame requires dividing it into several blocks (M). A sub-image of M pixels is called a coding unit (CU). CUs are used as the basic coding unit, and sub-images are encoded block by block. Commonly used sizes for M are 4, 8, 16, 32, and 64. Therefore, encoding a video image sequence involves encoding each coding unit (CU) of each frame sequentially; decoding the bitstream of a video image sequence also involves decoding each CU of each frame sequentially, ultimately reconstructing the entire video image sequence.

[0011] To accommodate the different content and properties of various parts of an image frame and to perform the most efficient encoding, the size of each CU within an image frame can be different; some may be 8. 8, some are 64 64, etc. To enable seamless stitching of CUs of different sizes, a frame of image is typically first divided into N identically sized CUs. The largest coding unit (LCU) or coding tree unit (CTU) of N pixels is then further divided into multiple CUs of varying sizes. For example, an image frame is first divided into 64 CUs of identical size. A 64-pixel LCU, i.e., N=64, wherein a certain LCU consists of three 32-pixel units. 32-pixel CU and 4 x 16-pixel CUs One CU consists of 16 pixels, while the other LCU consists of two 32-pixel units. 32-pixel CU, 3 x 16 16-pixel CU and 20 8 A CU (Coding Unit) consists of 8 pixels. A CU can be further divided into several sub-regions. These sub-regions include, but are not limited to, prediction units (PUs) and transformation units (TUs). In summary, a coding block or decoding block refers to a region within a frame of an image where encoding or decoding is performed.

[0012] A CU is a region composed of several pixel values. The shape of a CU can be rectangular, and in a frame of an image, each CU can have a different shape and size.

[0013] In the H.265 video compression standard (High Efficiency Video Coding, HEVC), QT technology can be used to segment coding units or coding blocks into non-overlapping segments. Figure 1 A diagram illustrating the segmentation of QT technology. Figure 1 ,like Figure 1 As shown, an image frame is first divided into multiple regions of the same size according to rows and columns. Each region is called a CTU. The side length of a CTU can be 128 pixels, 64 pixels, etc. Because this division is a hard cut in the horizontal and vertical directions, there will be no overlap between CTUs. Figure 2 A diagram illustrating the segmentation of QT technology. Figure 2 ,like Figure 2 As shown, within a CTU, it is recursively divided into multiple CUs using QT, and the sizes of the multiple CUs are not exactly the same, with 8... An 8-pixel CU also has 16 16-pixel CU, and 32 A 32-pixel CU. Each CU has no overlapping areas; they are all leaf nodes of a quadtree. Similarly, because it's a hard partition in both horizontal and vertical directions, there is no overlap between CUs derived from any single CTU.

[0014] The existing H.266 / Versatile Video Coding (VVC) video coding technology, based on QT, supplements it with the Binary Tree (BT) segmentation technique to form QTBT segmentation technology, and further supplements it with the TT segmentation scheme to form MTT. Various segmentation methods in MTT, such as QT segmentation, vertical BT segmentation, horizontal BT segmentation, vertical center-both sides TT segmentation, and horizontal center-both sides TT segmentation, are all used at various layers within the CTU.

[0015] Therefore, the current MTT scheme is a consistent evolutionary process, from QT to QTBT and then to TT. The only difference lies in the segmentation method; the principle behind the segmentation is the same, and none of them will create any overlap between CUs. In other words, because all current segmentation schemes do not allow any overlapping areas between CUs, and the segmentation method is fixed, fine segmentation is required at irregular edges of objects to achieve good video coding results. On the other hand, fine segmentation brings more header information, which reduces coding efficiency. While the diversification of segmentation modes has partially solved some of the problems with fine segmentation, the problem of over-segmentation still exists. Figure 3 This is a diagram illustrating oversegmentation, such as... Figure 3 As shown, when the area around the top edge of the ball held by the player on the right is magnified, it can be seen that most of the area is a similar flat background region, while only the top of the ball is a block of content different from the other areas. To divide the corresponding regions, the final segmentation result is very fragmented. It is evident that existing encoding and decoding technologies often require meticulous segmentation of each frame of the image to achieve good encoding results. However, fine segmentation generates more header information and repetitive information representation, thus reducing encoding efficiency.

[0016] This application proposes an image decoding method that avoids excessively fine block division of the image, effectively reducing the amount of header information and avoiding redundant information representation, thereby improving coding efficiency. Specifically, the coding method can be applied to the block segmentation and intra-frame and inter-frame prediction signal combination parts of a video coding hybrid framework. Also, the decoding method can be applied to the buffering part of the video coding hybrid framework. For example... Figure 4 This is a schematic diagram of the composition and structure of a video encoding system, such as... Figure 4 As shown, the video coding system 200 includes a transform and quantization unit 201, an intra-frame estimation unit 202, an intra-frame prediction unit 203, a motion compensation unit 204, a motion estimation unit 205, an inverse transform and inverse quantization unit 206, a filter control and analysis unit 207, a filtering unit 208, an entropy coding unit 209, and a decoded image buffer unit 210, etc. Among them, the filtering unit 208 can implement deblocking filtering and sample adaptive offset (SAO) filtering, and the entropy coding unit 209 can implement header information encoding and context-based adaptive binary arithmetic coding (CABAC).

[0017] When the raw video signal is received, a video coding block can be obtained by dividing the input raw video signal through coding tree units. Then, the residual pixel information obtained after intra-frame or inter-frame prediction is transformed by the transform and quantization unit 201, including transforming the residual information from the pixel domain to the transform domain and quantizing the resulting transform coefficients to further reduce the bit rate. The intra-frame estimation unit 202 and the intra-frame prediction unit 203 are used to perform intra-frame prediction on the video coding block. Specifically, the intra-frame estimation unit 202 and the intra-frame prediction unit 203 are used to determine the intra-frame prediction mode to be used to encode the video coding block. The motion compensation unit 204 and the motion estimation unit 205 are used to perform inter-frame prediction coding of the received video coding block relative to one or more blocks in one or more reference frames to provide time prediction information. The motion estimation performed by the motion estimation unit 205 is a process of generating motion vectors, which can estimate the motion of the video coding block. Then, the motion compensation unit 204 is based on the motion estimation unit... Motion compensation is performed on the motion vector determined by unit 205. After determining the intra-prediction mode, the intra-prediction unit 203 is also used to provide the selected intra-prediction data to the entropy coding unit 209, and the motion estimation unit 205 also sends the calculated motion vector data to the entropy coding unit 209. In addition, the inverse transform and inverse quantization unit 206 is used to reconstruct the video coding block, reconstructing the residual block in the pixel domain. The reconstructed residual block is processed by the filter control analysis unit 207 and the filtering unit 208 to remove block artifacts. Then, the reconstructed residual block is added to a predictive block in the frame of the decoding image buffer unit 210 to generate the reconstructed video coding block. The entropy coding unit 209 is used to encode various coding parameters and quantized transform coefficients. In the CABAC-based coding algorithm, the context content can be based on adjacent coding blocks and can be used to encode information indicating the determined intra-prediction mode, outputting the bitstream of the video signal. The decoding image buffer unit 210 is used to store the reconstructed video coding block for prediction reference. As video image encoding proceeds, new reconstructed video encoding blocks are continuously generated, and these reconstructed video encoding blocks are stored in the decoding image buffer unit 210.

[0018] Figure 5 This is a schematic diagram of the composition and structure of a video decoding system, such as... Figure 5 As shown, the video decoding system 300 includes an entropy decoding unit 301, an inverse transform and inverse quantization unit 302, an intra-frame prediction unit 303, a motion compensation unit 304, a filtering unit 305, and a decoded image buffer unit 306. The entropy decoding unit 301 can perform header information decoding and CABAC decoding, while the filtering unit 305 can perform deblocking filtering and SAO filtering. The input video signal is processed... Figure 4After encoding, the video signal bitstream is output. This bitstream is input into the video decoding system 300, first passing through the entropy decoding unit 301 to obtain the decoded transform coefficients. These transform coefficients are then processed by the inverse transform and inverse quantization unit 302 to generate residual blocks in the pixel domain. The intra-frame prediction unit 303 can generate prediction data for the current video decoding block based on the determined intra-frame prediction mode and data from previously decoded blocks in the current frame or image. The motion compensation unit 304 determines the prediction information for the video decoding block by analyzing motion vectors and other associated syntax elements, and uses this prediction information... The information is used to generate a predictive block of the video block being decoded; the decoded video block is formed by summing the residual block from the inverse transform and inverse quantization unit 302 with the corresponding predictive block generated by the intra-frame prediction unit 303 or the motion compensation unit 304; the decoded video signal is passed through the filtering unit 305 to remove block artifacts, which can improve video quality; then the decoded video block is stored in the decoding image buffer unit 306, which stores reference images for subsequent intra-frame prediction or motion compensation, and is also used for the output of the video signal, thus obtaining the recovered original video signal.

[0019] The image decoding method proposed in this application can be applied to the above. Figure 4 and the above Figure 5 However, the embodiments of this application do not specifically limit this in the encoding and decoding framework.

[0020] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0021] In one embodiment of this application, Figure 6 This is a schematic diagram illustrating the implementation flow of an image decoding method proposed in an embodiment of this application, as shown below. Figure 6 As shown in the embodiments of this application, the method for the decoder to perform image decoding may include the following steps: Step 101: Receive the bitstream data and parse the bitstream data to obtain the coding tree unit corresponding to the bitstream data.

[0022] In embodiments of this application, the decoder can receive bitstream data and then parse the received bitstream data to obtain the coding tree units corresponding to the bitstream data. Specifically, after parsing the bitstream data, the decoder can obtain at least one coding tree unit of the same size.

[0023] It should be noted that, in the embodiments of this application, when the encoder performs video encoding, it encodes multiple frames of images in the video frame by frame. At any given moment, the frame being encoded can be referred to as the current encoded image. When encoding the current encoded image in the video, the encoder first needs to divide the current encoded image into coding tree units of identical size, and then further divide the coding tree units into coding units of varying sizes for encoding. For example, the encoder can divide the current encoded image to obtain coding tree units of identical size, i.e., obtain coding tree units composed of 64 x 64 pixels. In the embodiments of this application, when the encoder performs overlapping division of the current encoded image, overlap between coding units is allowed; however, for the needs of parallel processing and reducing encoding complexity, there is no overlap between coding tree units.

[0024] It should be noted that, in the embodiments of this application, the encoder can perform overlapping partitioning and encoding of the current encoded image using the Multi-Type Tree Partitioning (MTT) technique, and then obtain the bitstream data corresponding to the current encoded image. The decoder can decode the current encoded image based on the bitstream data to obtain the encoding tree unit, and then further obtain the encoding unit.

[0025] Furthermore, in the embodiments of this application, when the decoder performs video decoding, it decodes the bitstream data of multiple frames of images in the video frame by frame. At any given moment, the frame being decoded can be referred to as the currently decoded image.

[0026] It should be noted that in the embodiments of this application, when the decoder decodes the current decoded image, there is no overlap between coding tree units, but overlap between coding units is allowed. That is, in the embodiments of this application, when the decoder decodes, at the position of the reconstructed frame buffer, multiple coding units may simultaneously carry decoded pixel data of the same region. One coding unit is larger and can be considered a background coding unit, while another coding unit is smaller and can be considered a refresh coding unit. The decoded and reconstructed data of the background coding unit will be overwritten by the pixel data of this position carried by the refresh coding unit, which is the refresh process. In this application, this decoding mode of using refresh coding units to refresh background coding units is called refresh decoding mode.

[0027] Furthermore, in the embodiments of this application, when the decoder performs video decoding, it can choose to enable a refresh decoding mode for refreshing the encoding units. Specifically, the decoder can set a high-level control syntax, which in PPS or SPS can use an enable switch syntax PPSRfrsEnbl or SPSRfrsEnbl to indicate whether the refresh decoding mode is currently supported.

[0028] In other words, in the implementation of this application, after the decoder receives and parses the bitstream data to obtain the corresponding coding tree unit (i.e., after step 101), it can enable a preset refresh mode. Specifically, the preset refresh mode can be used for overlapping decoding between coding units.

[0029] Step 102: Parse the i-th node of the i-th layer corresponding to the coding tree unit to obtain the i-th state parameter and i-th flag parameter corresponding to the i-th node; where i is an integer greater than 0; the i-th state parameter is used to determine whether the i-th node supports refresh; the i-th flag parameter is used to determine whether the i-th node enables refresh.

[0030] In the embodiments of this application, the decoder can first parse the i-th node of the i-th layer corresponding to the coding tree unit to obtain the i-th state parameter and the i-th identifier parameter corresponding to the i-th node. Specifically, i is an integer greater than 0, for example, i can be 1, 2, 3, etc.

[0031] It should be noted that, in the embodiments of this application, the i-th state parameter can be used to determine the default state of the i-th node. The i-th state parameter can include the default state of the i-th subtree and the default state of the i-th data. Specifically, the default state of the i-th subtree indicates whether the i-th node supports refreshing; the default state of the i-th data determines whether the i-th node contains source data.

[0032] Furthermore, in the embodiments of this application, in the specific syntax of video encoding and decoding, the default state of the i-th subtree can be determined by bRfrsEnblFlag. That is, bRfrsEnblFlag can represent whether the current node of the encoding tree unit supports refresh. Specifically, when bRfrsEnblFlag is assigned a value of 0, it can be considered that the current node of the encoding tree unit does not support refresh, and when bRfrsEnblFlag is assigned a value of 1, it can be considered that the current node of the encoding tree unit supports refresh.

[0033] Furthermore, in the embodiments of this application, for the first node of the first layer of the coding tree unit, i.e. when i=1, the default value of the default state of the i-th subtree is SPSRfrsEnbl, where SPSRfrsEnbl is a flag that can be declared in the SPS layer to indicate whether refresh is supported, or it can be determined by the enable control in the PPS layer; when i is not 1, the default state of the i-th subtree can be determined by the default state of the subtree of the previous layer, that is, the default state of the i-th subtree can be determined by the default state of the (i-1)-th subtree.

[0034] Furthermore, in the embodiments of this application, in the specific syntax of video encoding and decoding, the default state of the i-th data can be determined by bAncFlag. That is, bAncFlag can indicate whether the current node of the coding tree unit has source data. Specifically, when bAncFlag is assigned a value of 0, it can be considered that the current node of the coding tree unit does not have source data, and when bAncFlag is assigned a value of 1, it can be considered that the current node of the coding tree unit has source data.

[0035] Furthermore, in the embodiments of this application, for the first node of the first layer of the coding tree unit, i.e. when i=1, the default value of the default state of the i-th data is 0; when i is not 1, the default state of the i-th data can be determined by the default state of the data of the previous layer, i.e. the default state of the i-th data can be determined by the default state of the (i-1)-th data.

[0036] It should be noted that, in the embodiments of this application, the i-th flag parameter can be used to determine the data flag of the i-th node. The i-th state parameter may include the i-th subtree identifier and the i-th data identifier. Specifically, the i-th subtree identifier indicates whether there is a refreshable encoding unit in the subtree of the i-th node; the i-th data identifier determines whether data exists in the i-th node.

[0037] Furthermore, in the embodiments of this application, in the specific syntax of video encoding and decoding, the identifier of the i-th subtree can be determined by Refresh_CU_enable_flag[x0][y0]. That is, Refresh_CU_enable_flag[x0][y0] can indicate whether the current node of the encoding tree unit has an encoding unit that can be refreshed. Specifically, when Refresh_CU_enable_flag[x0][y0] is assigned a value of 0, it can be considered that the current node of the encoding tree unit does not have an encoding unit that can be refreshed. When Refresh_CU_enable_flag[x0][y0] is assigned a value of 1, it can be considered that the current node of the encoding tree unit has an encoding unit that can be refreshed.

[0038] Furthermore, in the embodiments of this application, in the specific syntax of video encoding and decoding, the i-th data identifier can be determined by Refresh_CU_flag[x0][y0]. That is, Refresh_CU_flag[x0][y0] can indicate whether there is data in the current node of the coding tree unit. Specifically, when Refresh_CU_flag[x0][y0] is assigned a value of 0, it can be considered that there is no data in the current node of the coding tree unit. When Refresh_CU_flag[x0][y0] is assigned a value of 1, it can be considered that there is data in the current node of the coding tree unit.

[0039] Furthermore, in the embodiments of this application, during the specific syntax transmission of video encoding and decoding, bAncFlag, Refresh_CU_enable_flag[x0][y0], and Refresh_CU_flag[x0][y0] may not be transmitted. Specifically, the existence of Refresh_CU_flag[x0][y0] and Refresh_CU_flag[x0][y0] is always contingent on whether the current node is a leaf node and the values ​​of bRfrsEnblFlag and bAncFlag.

[0040] It should be noted that in the embodiments of this application, the coding tree unit can correspond to at least one layer of nodes, and any node in each layer may contain data. The data of an ancestor node can be overwritten by the data of its descendant nodes. Therefore, when decoding the coding tree unit, the decoder needs to check layer by layer whether data exists on the nodes, so that it can further decode the nodes with data and construct the corresponding coding unit. In contrast, in the prior art, for a coding tree unit, data only exists on the nodes in the tree structure that cannot be further divided, i.e., the leaves. Therefore, the decoder needs to parse and decode each leaf. Figure 7 This is a schematic diagram of the structure of a coding tree unit in the prior art. Figure 8 This is a schematic diagram of the structure of the coding tree unit in an embodiment of this application, such as... Figure 7 and Figure 8 As shown, for the same coding tree unit, since coding units cannot overlap in the prior art, only the leaves in the tree structure corresponding to the coding tree unit contain data. The decoder needs to parse all the leaves to construct the coding unit during decoding. However, in the embodiments of this application, coding units can overlap. Therefore, any intermediate node in the tree structure corresponding to the coding tree unit may contain data. For any coding tree unit, it is possible to detect whether data exists at each node. If data exists, decoding is performed to obtain the corresponding coding unit, without needing to parse all the leaves, thus avoiding a large number of small block divisions and improving decoding efficiency. Furthermore, in the embodiments of this application, the encoder, when encoding the image, does not only use leaf nodes as coding units but can also compress and encode intermediate nodes. However, some descendant node information is removed from the intermediate nodes, for example, through masking and padding with zeros, interpolation, or external expansion. Figure 7 and Figure 8In contrast, the encoder reduces the fragmentation of encoding segments by grouping multiple irregular regions into one region for encoding. Regions originally different from the background are temporarily treated as identical to other background regions through data augmentation, reducing the number of bits used for representation. Blocks different from the background still need to be encoded separately and refreshed to cover the background blocks to obtain the same image content as before. Therefore, some segments in the original segmentation tree no longer need to be subdivided, reducing some header information. Furthermore, since flat image regions are dominated by low-frequency components, the corresponding energy is concentrated in the upper left corner of the region; reducing the number of subdivisions is more conducive to energy concentration, saving some frequency domain data after pixel-domain conversion compared to over-segmentation. Specifically, Figure 8 The dashed lines in the middle of the split tree do not contain valid data, so the splitting information in this part can be omitted.

[0041] Furthermore, in the embodiments of this application, there may be at least one node in the data of the i-th layer corresponding to the coding tree unit. Therefore, the i-th node of the i-th layer corresponding to the coding tree unit is all the nodes in the i-th layer. That is to say, the decoder can perform detection processing on all the i-th nodes in the i-th layer corresponding to the coding tree unit to obtain the detection result corresponding to each i-th node, that is, detect and obtain all the detection results corresponding to all the nodes in the i-th layer.

[0042] Step 103: Perform detection processing on the i-th node based on the i-th state parameter and the i-th flag parameter to obtain the i-th detection result.

[0043] In the embodiments of this application, after the decoder parses the i-th node of the i-th layer corresponding to the coding tree unit and obtains the i-th state parameter and the i-th flag parameter corresponding to the i-th node, it can perform detection processing on the i-th node according to the i-th state parameter and the i-th flag parameter to obtain the i-th detection result.

[0044] It should be noted that, in the embodiments of this application, after determining the i-th state parameter and the i-th flag parameter, the decoder can further combine the leaf parameter of the i-th node to determine whether the i-th node has data based on the i-th state parameter and the i-th flag parameter.

[0045] Furthermore, in the embodiments of this application, the leaf parameter of the i-th node can be used to determine whether the i-th node is a leaf in the coding tree unit.

[0046] It should be noted that, in the embodiments of this application, when the decoder performs detection processing on the i-th node based on the i-th state parameter and the i-th flag parameter to obtain the i-th detection result, it can first determine the leaf parameter corresponding to the i-th node; wherein, the leaf parameter is used to determine whether the i-th node should continue to be segmented; then, according to the leaf parameter, the i-th state parameter, and the i-th flag parameter, the i-th detection result is obtained. That is to say, the decoder can determine whether the i-th node can continue to be segmented based on the leaf parameter corresponding to the i-th node.

[0047] Furthermore, in the embodiments of this application, in order to determine whether the i-th node has data and whether it can be further segmented, the decoder performs detection processing on the i-th node. Accordingly, the i-th detection result can include four types: data exists and segmentation occurs, data does not exist and segmentation occurs, data exists and segmentation does not occur, and data does not exist and segmentation does not occur.

[0048] It should be noted that, in the embodiments of this application, in the specific syntax transmission of video encoding and decoding, since bAncFlag, Refresh_CU_enable_flag[x0][y0] and Refresh_CU_flag[x0][y0] may not be transmitted, the decoder needs to further calculate and determine whether there is data in the i-th node based on the leaf parameter, the i-th state parameter and the i-th flag parameter.

[0049] Step 104: Based on the i-th detection result, obtain the (i+1)-th node of the (i+1)-th layer corresponding to the coding tree unit.

[0050] In the embodiments of this application, after the decoder performs detection processing on the i-th node according to the i-th state parameter and the i-th flag parameter and obtains the i-th detection result, it can obtain the i+1-th node of the i+1-th layer corresponding to the coding tree unit according to the i-th detection result.

[0051] It should be noted that, in the implementation of this application, after the decoder performs detection processing to obtain the i-th detection result, since the i-th detection result can include four types: data exists and segmentation occurs, data does not exist and segmentation does not occur, data exists and no segmentation occurs, and data does not exist and no segmentation occurs, the decoder can further process the i-th node accordingly based on different detection results.

[0052] Furthermore, in the embodiments of this application, when the i-th detection result is that data exists and is segmented, the decoder can obtain the i-th coding unit data of the i-th layer, and then perform segmentation processing on the i-th node to obtain the i+1-th node of the i+1-th layer corresponding to the coding tree unit.

[0053] It should be noted that, in the implementation of this application, after the decoder performs detection processing on the i-th node, if it determines that there is data on the i-th node and the i-th node can be further segmented, then the decoder needs to first obtain the corresponding data, that is, obtain the i-th coding unit data corresponding to the i-th node in the coding tree unit. Since there can be at least one i-th node in the i-th layer corresponding to the coding tree unit, after the decoder sequentially performs detection processing on all i-th nodes in the i-th layer, it can obtain the data of the i-th node whose detection result indicates the presence of data, thereby obtaining the i-th coding unit data corresponding to the i-th node. Furthermore, after obtaining the corresponding i-th coding unit data, the decoder can continue to segment the i-th node to obtain the next layer node of the i-th layer, that is, obtain the (i+1)-th node of the (i+1)-th layer corresponding to the coding tree unit.

[0054] Furthermore, in the embodiments of this application, when the i-th detection result is that no data exists and the segmentation occurs, the i-th node is segmented to obtain the (i+1)-th node of the (i+1)-th layer corresponding to the coding tree unit. In the embodiments of this application, after the decoder performs detection processing on the i-th node of the i-th layer corresponding to the coding tree unit and obtains the i-th detection result, if the i-th detection result is that no data exists and the segmentation occurs, then the decoder does not need to acquire data, but directly performs segmentation processing to obtain the node of the next layer, that is, the (i+1)-th node of the (i+1)-th layer.

[0055] Furthermore, in the embodiments of this application, since there can be at least one i-th node in the i-th layer corresponding to the coding tree unit, after the decoder performs detection processing on all i-th nodes in the i-th layer in sequence, it can perform segmentation processing on the i-th nodes whose detection results are that they can be further segmented, and obtain the i+1-th node of the i+1-th layer corresponding to each i-th node. That is to say, for each i-th node that can be further segmented, the decoder can segment and obtain at least one i+1-th node.

[0056] Therefore, in the embodiments of this application, as long as the i-th node can be segmented, the decoder needs to continue to segment the i-th node regardless of whether the i-th node has data, so as to obtain the i+1-th node of the i+1-th layer.

[0057] Furthermore, in the embodiments of this application, when the i-th detection result is that data exists and is not segmented, the i-th encoding unit data of the i-th layer is obtained, and the parsing process of the i-th node ends.

[0058] It should be noted that, in the implementation of this application, after the decoder performs detection processing on the i-th node, if it determines that data exists on the i-th node and the i-th node cannot be further segmented, then the decoder needs to first acquire the corresponding data, that is, obtain the i-th coding unit data corresponding to the i-th node in the coding tree unit. Since there can be at least one i-th node in the i-th layer corresponding to the coding tree unit, after the decoder sequentially performs detection processing on all i-th nodes in the i-th layer, it can acquire the data of the i-th node whose detection result indicates the presence of data, thereby obtaining the i-th coding unit data corresponding to the i-th node. Furthermore, since the i-th node cannot be further segmented, the decoder can end the parsing processing of the i-th node after obtaining the corresponding i-th coding unit data.

[0059] Furthermore, in the embodiments of this application, when the i-th detection result is that there is no data and no segmentation is required, the decoder does not need to acquire data, nor does it need to perform segmentation processing. Instead, it directly ends the parsing process of the i-th node.

[0060] It should be noted that, in the embodiments of this application, the encoder can determine whether data exists in each rectangular region generated by segmentation, and if data exists, obtain the coding unit data corresponding to that node. For example, for the i-th node with data, the i-th coding unit data of the i-th node can be obtained. Furthermore, in the embodiments of this application, the i-th coding unit data may include identification information, prediction information, and transform coefficients, etc. Furthermore, the decoder can obtain the corresponding i-th background pixel data based on the i-th coding unit data.

[0061] Step 105: Continue to detect and process the (i+1)th node, and traverse all nodes corresponding to the coding tree unit until all coding unit data corresponding to the coding tree unit is obtained.

[0062] In the embodiments of this application, after the decoder obtains the (i+1)th node of the (i+1)th layer corresponding to the coding tree unit based on the (i)th detection result, it can continue to perform detection processing on the (i+1)th node, and then traverse all nodes corresponding to the coding tree unit, that is, perform detection processing on all nodes of the coding tree unit until all coding units corresponding to the coding tree unit are obtained.

[0063] It should be noted that, in the embodiments of this application, after the decoder obtains the i+1th node of the i+1th layer through segmentation, it can continue to detect and process the i+1th node according to the methods of steps 101 to 104 above, thereby obtaining the i+1th coding unit data corresponding to the i+1th node and the i+2th node of the i+2th layer. After recursively processing according to the methods of steps 101 to 104 above, all coding unit data corresponding to the coding tree unit can be obtained.

[0064] Furthermore, in the embodiments of this application, for any node in the coding tree unit, the decoder can recursively process it according to steps 101 to 104 above. That is, for any node, the decoder can first perform detection processing based on state parameters and flag parameters, then acquire data for nodes that have data and are segmented, obtain the corresponding coding unit data, and continue segmentation processing to obtain the next layer of nodes; for nodes that do not have data and are segmented, the segmentation processing is directly performed to obtain the next layer of nodes; for nodes that have data and are not segmented, the data is acquired to obtain the corresponding coding unit data, and the decoding processing ends; for nodes that do not have data and are not segmented, the decoding processing ends directly. In summary, after the decoder performs recursive processing layer by layer on the coding tree unit according to steps 101 to 104 above, it can obtain all the coding unit data corresponding to the coding tree unit.

[0065] Step 106: Generate the decoded image corresponding to the bitstream data based on all node and all coding unit data.

[0066] In the embodiments of this application, after the decoder obtains all the coding unit data corresponding to the coding tree unit, it can generate the decoded image corresponding to the bit stream data based on all nodes and all coding unit data.

[0067] It should be noted that, in the embodiments of this application, when the decoder generates the decoded image corresponding to the bitstream data based on all node and all coding unit data, it can first perform decoding processing on all coding unit data to obtain all pixel data corresponding to the coding tree unit; then it can generate the decoded image corresponding to the bitstream data according to all pixel data.

[0068] Furthermore, in the implementation of this application, when the decoder decodes all the data of the coding unit to obtain all the pixel data corresponding to the coding tree unit, if the i-th node has data and is not split, then the decoder can decode the data of the i-th coding unit to obtain the i-th pixel data; if the i-th node has data and is split, the decoder decodes the data of the i-th coding unit to obtain the i-th background pixel data, decodes the data of the i+1-th coding unit to obtain the i-th refresh pixel data, and obtains the i-th pixel data, and traverses all nodes until all pixel data is obtained.

[0069] Furthermore, in the implementation of this application, when the decoder generates the decoded image corresponding to the bitstream data according to all pixel data, when the i-th node has data and is segmented, the i-th background pixel data is refreshed according to the i-th refreshed pixel data to obtain the refreshed pixel data, that is, the i-th pixel data is obtained; continue to traverse all nodes until the decoded image is obtained.

[0070] In other words, if the i-th node cannot be further segmented, meaning the i-th node is a leaf node in the coding tree unit, then the i-th pixel data obtained by the decoder is the pixel data corresponding to the i-th coding unit. If the i-th node can be further segmented, meaning the i-th node is not a leaf node in the coding tree unit, then the decoder needs to obtain the pixel data corresponding to the (i+1)-th coding unit of the (i+1)-th node, and then refresh the corresponding area of ​​the pixel data corresponding to the i-th coding unit with the pixel data corresponding to the (i+1)-th coding unit of the (i+1)-th node, to obtain the pixel data corresponding to the i-th coding unit.

[0071] It should be noted that, in the implementation of this application, when the decoder decodes all the coding unit data to obtain all the pixel data corresponding to the coding tree unit, it can also decode the lower layer data first and then decode the upper layer data. Specifically, when the decoder decodes all the coding unit data to obtain all the pixel data corresponding to the coding tree unit, if the i-th node has data and is segmented, the decoder can obtain the (i+1)-th coding unit data, decode the (i+1)-th coding unit data to obtain the i-th refresh pixel data corresponding to the i-th node; then decode the i-th coding unit data to obtain the i-th background pixel data; then set the i-th background pixel data as the background of the i-th refresh pixel data, thereby obtaining the i-th coding unit; the encoder can continue to traverse all nodes until all pixel data is obtained.

[0072] It should be noted that, in the embodiments of this application, if the i-th detection result is that no data exists, the i-th background pixel data remains empty.

[0073] It should be noted that, in the embodiments of this application, when the decoder generates a decoded image based on all coding unit data, it can first perform decoding processing on all coding unit data to obtain all pixel data corresponding to the coding tree unit. If the background pixel data corresponding to the background coding unit in all pixel data overlaps with the refresh pixel data corresponding to the refresh coding unit, then the decoder can replace the corresponding area pixel data of the background coding unit according to the pixel data of the refresh coding unit, that is, refresh the background coding unit with the refresh coding unit.

[0074] In other words, in the embodiments of this application, when the decoder generates the decoded image corresponding to the bitstream data based on all coding units, if there is an overlapping area between the pixel data corresponding to the m-th coding unit and the pixel data corresponding to the n-th coding unit, the decoder can refresh the pixel data corresponding to the m-th coding unit according to the pixel data corresponding to the n-th coding unit to generate the decoded image. Here, m is an integer greater than 0, and n is an integer greater than m, meaning the n-th coding unit is the refresh coding unit of the m-th coding unit.

[0075] In existing technologies, encoders do not overlap between encoding units when encoding video images. Therefore, even small image information requires the division into small encoding units. Consequently, decoders do not have overlapping regions when decoding video images. In contrast, the image decoding method proposed in this application supports overlapping encoding units when encoding images, thus avoiding the need for fine division of the image. Consequently, when decoding video images, if the background pixel data corresponding to the background encoding unit overlaps with the refresh pixel data corresponding to the refresh encoding unit, the decoder can replace the corresponding region pixel data of the background encoding unit with the pixel data of the refresh encoding unit, i.e., refresh the background encoding unit with the refresh encoding unit.

[0076] Furthermore, in the embodiments of this application, during the decoding process, the data of the background coding unit, such as prediction information, identification information, and transform coefficients, can also be refreshed and replaced by the data of the refresh coding unit.

[0077] In other words, in the embodiments of this application, during the decoding process, the decoder uses the latest data, regardless of whether it is cached pixel data, prediction information, identification information, or transformation coefficients. The latest data can be the pixel data corresponding to the background coding unit of the coding tree unit. It can be the data of the background coding unit that has not yet been refreshed and covered, or it can be the data after the image of the refreshed coding unit is replaced.

[0078] It should be noted that, in the embodiments of this application, the encoder and decoder may also allow the regions of the coding units to overlap in the prediction and / or transformation stages. Accordingly, a coding tree unit may have a corresponding background prediction unit and a refresh prediction unit, and may also have a corresponding background transformation unit and a refresh transformation unit.

[0079] Furthermore, in the embodiments of this application, during the decoding process, the decoder may refresh the information used for subsequent block prediction in a timely manner or not.

[0080] Based on the image decoding method proposed in steps 101 to 106 above, Figure 9 This is a schematic flowchart of the image decoding method proposed in the embodiments of this application. Figure 1 ,like Figure 9As shown, for any node in the coding tree unit that can be further segmented, the decoder can first perform parsing processing. Based on the state parameters and flag parameters obtained from the parsing processing, it can determine whether there is data at the node. If the detection result is that there is data, the decoder can acquire the data, obtain the corresponding identification information, prediction information, and transform coefficients, and then obtain the corresponding coding unit through decoding processing, and then enter the segmentation processing flow. If the detection result is that there is no data, the decoder can directly enter the segmentation processing flow. In the segmentation process, the decoder first determines whether a node can be segmented into a quadtree. If quadtree segmentation is not possible, the decoder then checks whether it can be segmented into a binary or ternary tree. If quadtree segmentation is possible, the decoder performs the segmentation on the node and then checks each of the resulting nodes again. If the segmentation is possible, the decoder recursively decodes each node; otherwise, it checks whether each of the resulting nodes can be segmented into a binary or ternary tree. When determining whether to perform binary or ternary tree segmentation, the segmentation direction—whether it's vertical or horizontal—must be determined. Finally, the segmented nodes are recursively decoded. Ultimately, all the coded unit data corresponding to this coded tree unit can be obtained.

[0081] It should be noted that, in the embodiments of this application, when the data exists on the upper left side of the coding tree unit, the decoder can first recursively decode the upper left coding unit and then parse the data; when the data exists on the left side of the coding tree unit, the decoder can first recursively decode the left coding unit and then parse the data; when the data exists on the upper side of the coding tree unit, the decoder can first recursively decode the upper coding unit and then parse the data.

[0082] Furthermore, in embodiments of this application, when the decoder performs image decoding, the process of determining whether data exists at a node can be placed on each branch after the segmentation and identification parsing of that node, thereby effectively saving the number of bits of the transmitted signal. Based on the above... Figure 9 , Figure 10 This is a schematic flowchart of the image decoding method proposed in the embodiments of this application. Figure 2 ,like Figure 10As shown, for any node in the coding tree unit that can be further split, the decoder first determines whether the node can be split into a quadtree. If it is determined that quadtree splitting is not possible, the decoder can then determine whether the node can be split into a binary tree or a ternary tree. If quadtree splitting is possible, after splitting the node into a quadtree, the decoder can again determine whether each of the resulting nodes can be split into a quadtree. If it can, the decoder recursively decodes each node to obtain the splitting identifier of the branch on that node. If it cannot, the decoder can continue to determine whether each of the resulting nodes can be split into a quadtree. The decoder determines whether to perform binary or ternary tree partitioning to obtain the partition identifiers of the branches at a given node. After parsing and obtaining the partition identifiers for each branch of the node, the decoder processes each branch and then determines whether data exists at the node based on the state parameters and flag parameters obtained from the parsing process. If data exists, the decoder acquires the data, obtains the corresponding identifier information, prediction information, and transform coefficients, thereby obtaining the coding unit corresponding to the node, and recursively decodes each of the partitioned branches. If no data exists, the decoder directly recursively decodes each of the partitioned branches. Finally, all coding unit data corresponding to the coding tree unit can be obtained.

[0083] This application provides an image decoding method. The decoder receives bitstream data and parses the bitstream data to obtain the coding tree unit corresponding to the bitstream data; it parses the i-th node of the i-th layer corresponding to the coding tree unit to obtain the i-th state parameter and the i-th flag parameter corresponding to the i-th node; where i is an integer greater than 0; the i-th state parameter is used to determine whether the i-th node supports refresh; the i-th flag parameter is used to determine whether the i-th node enables refresh; the i-th node is detected based on the i-th state parameter and the i-th flag parameter to obtain the i-th detection result; based on the i-th detection result, the i+1-th node of the (i+1)-th layer corresponding to the coding tree unit is obtained; the (i+1)-th node is detected and processed again, and all nodes corresponding to the coding tree unit are traversed until all coding unit data corresponding to the coding tree unit is obtained; based on all nodes and all coding unit data, a decoded image corresponding to the bitstream data is generated. Therefore, in the embodiments of this application, during the decoding of images in a video, after receiving the bitstream data and parsing it to obtain the coding tree unit, the nodes of each layer corresponding to the coding tree unit can be parsed to obtain the state parameters and flag parameters of that layer's nodes. Then, the nodes are detected based on the state parameters and flag parameters, and the nodes containing data are decoded to obtain all the coding units corresponding to the coding tree unit, thus obtaining the corresponding decoded image. Since overlapping division between coding units is supported during encoding, if at least two coding units with overlapping regions exist among all the coding units obtained by the decoder from the nodes containing data, the decoder can refresh the image information corresponding to the background coding unit according to the image information corresponding to the refresh coding unit. This avoids excessive division of the video image, reduces unnecessary header information, and avoids the scattered and repeated representation of data with similar characteristics in the same region, thereby improving encoding efficiency.

[0084] In another embodiment of this application, based on the above embodiments, for step 102, the method by which the decoder determines whether data exists in the i-th node based on the i-th state parameter and the i-th flag parameter may include the following steps: Step 103a: Determine the leaf parameters corresponding to the i-th node; where the leaf parameters are used to determine whether the i-th node should continue to be split.

[0085] In the embodiments of this application, the decoder can first determine the leaf parameters of the i-th node. Specifically, the leaf parameters can be used to determine whether the i-th node should continue to be segmented, that is, the decoder first determines whether the i-th node is a leaf of the coding tree unit.

[0086] It should be noted that in the embodiments of this application, if the i-th node is a leaf, that is, the i-th node does not have a branch, then the decoder can determine that there is no need to refresh the i-th node, but directly perform the normal decoding process.

[0087] It should be noted that, in the embodiments of this application, if the i-th node is not a leaf, that is, if the i-th node has a branch, then the decoder can further determine whether to refresh the i-th node.

[0088] Furthermore, in the embodiments of this application, when the leaf parameter is assigned a value of 0, it can represent that it is not a leaf node, and when the leaf parameter is assigned a value of 1, it can represent that it is a leaf node.

[0089] Step 103b: Obtain the i-th detection result according to the leaf parameter, the i-th state parameter, and the i-th flag parameter.

[0090] In the embodiments of this application, after determining the leaf parameters of the i-th node, the decoder can obtain the i-th detection result according to the leaf parameters, the i-th state parameters, and the i-th flag parameters.

[0091] It should be noted that, in the embodiments of this application, during the specific syntax transmission of video encoding and decoding, since bAncFlag, Refresh_CU_enable_flag[x0][y0], and Refresh_CU_flag[x0][y0] may not be transmitted, and the existence of Refresh_CU_flag[x0][y0] and Refresh_CU_flag[x0][y0] is always based on whether the current node is a leaf node, and the values ​​of bRfrsEnblFlag and bAncFlag, the decoder needs to further calculate and determine whether the i-th node has data based on the leaf parameter, the i-th state parameter, and the i-th flag parameter.

[0092] In the embodiments of this application, the decoder further needs to transmit the (i+1)th state parameter according to the leaf parameter, the i-th state parameter and the i-th flag parameter before continuing to perform parsing, segmentation and / or decoding processing on the (i+1)th node.

[0093] It should be noted that, in the embodiments of this application, the (i+1)th state parameter can be used to determine the default state of the (i+1)th node. Specifically, the (i+1)th state parameter can include the default state of the (i+1)th subtree and the default state of the (i+1)th data. Specifically, the default state of the (i+1)th subtree indicates whether the ith node supports refreshing; the default state of the (i+1)th data is used to determine whether the ith node contains source data.

[0094] Furthermore, in the embodiments of this application, for the (i+1)th node of the coding tree unit, the default state of the (i+1)th subtree can be determined by the default state of the subtree of the previous level, that is, the default state of the (i+1)th subtree can be determined based on the default state of the ith subtree.

[0095] Furthermore, in the embodiments of this application, for the (i+1)th node of the coding tree unit, the default state of the (i+1)th data can be determined by the default state of the data in the previous layer, that is, the default state of the (i+1)th data can be determined based on the default state of the (i)th data.

[0096] In the embodiments of this application, when the decoder transmits the (i+1)th state parameter based on the leaf parameter, the i-th state parameter, and the i-th flag parameter, it can first determine whether to perform a state refresh based on the leaf parameter, the i-th state parameter, and the i-th flag parameter. If it is determined that a default state refresh should be performed, the decoder can refresh the i-th state parameter to obtain the (i+1)-th state parameter. If it is determined that no state refresh should be performed, the decoder can determine the i-th state parameter as the (i+1)-th state parameter.

[0097] Table 1 is a combination analysis table of syntax transmission and state refresh in the embodiments of this application. As shown in Table 1, the decoder can further determine whether data exists in a node based on five parameters: the leaf parameter of a node, the subtree default state represented by bRfrsEnblFlag, the data default state represented by bAncFlag, the subtree flag represented by Refresh_CU_enable_flag[x0][y0], and the data flag represented by Refresh_CU_flag[x0][y0]. Simultaneously, the decoder can also determine the subtree default state and data default state of the next layer node using these five parameters. Specifically, for the first node of the first layer of the coding tree unit (i.e., when i=1), the default value of the first subtree default state is SPSRfrsEnbl, where SPSRfrsEnbl is a flag that can be declared at the SPS layer to indicate whether refresh is supported, or it can be determined by enable control at the PPS layer; while the default value of the first data default state is 0.

[0098] Table 1: Analysis of Combined Syntax Transmission and State Refresh Situations

[0099] Furthermore, based on Table 1 above, when a node in the coding tree unit is not a leaf node (i.e., the leaf parameter is 0), the subtree default state bRfrsEnblFlag is set to 1 (meaning the subtree supports coding unit refresh processing), the data default state bAncFlag is 0 (meaning the node does not have source data), the subtree flag Refresh_CU_enable_flag[x0][y0] is 0 (meaning there are no coding units that can be refreshed in the subtree of the node), and the data flag Refresh_CU_flag[x0][y0] has not been transmitted, then, according to the above 5 parameters, the decoder can determine that the node does not have data, and therefore determines not to perform decoding processing on the node. Furthermore, the decoder can also refresh the subtree default state of the next level according to the subtree default state bRfrsEnblFlag of the node, i.e., the subtree default state of the next level is set to 1. At the same time, the decoder can determine not to refresh the data default state of the next level, i.e., the data default state of the next level remains 0.

[0100] Based on Table 1 above, Figure 11 This is a schematic diagram of the state parameters and flag parameters in the embodiments of this application, as shown below. Figure 11 As shown, for the first node of the first layer of the coding tree unit, the default state bRfrsEnblFlag of the subtree of this first node is set to 1, which means that the subtree supports the refresh processing of coding units. Different subtrees of this first node have different support situations. The default state bAncFlag of the data is 0, which means that there is no source data in this node. The subtree flag Refresh_CU_enable_flag[x0][y0] is 1, which means that there is a coding unit that can be refreshed in the subtree of this first node. The data flag Refresh_CU_flag[x0][y0] is 0, which means that there is no data in this first node. Since the first node is not a leaf node, that is, the leaf parameter is 0, the decoder can determine that it does not perform decoding processing on the first node based on the above Table 1. At the same time, it can be determined that the default state of the subtree of the node transmitted to the next layer is 1, and the default state of the data is 0. It can be seen that for the four second nodes of the second layer of the coding tree unit, the default state of the subtree is 1 and the default state of the data is 0.

[0101] This application provides an image decoding method, a decoder, and a storage medium. The decoder receives bitstream data and parses the bitstream data to obtain the coding tree unit corresponding to the bitstream data; it parses the i-th node of the i-th layer corresponding to the coding tree unit to obtain the i-th state parameter and the i-th flag parameter corresponding to the i-th node; where i is an integer greater than 0; the i-th state parameter is used to determine whether the i-th node supports refresh; the i-th flag parameter is used to determine whether the i-th node enables refresh; the i-th node is detected based on the i-th state parameter and the i-th flag parameter to obtain the i-th detection result; based on the i-th detection result, the i+1-th node of the (i+1)-th layer corresponding to the coding tree unit is obtained; the (i+1)-th node is detected again, and all nodes corresponding to the coding tree unit are traversed until all coding unit data corresponding to the coding tree unit is obtained; based on all nodes and all coding unit data, a decoded image corresponding to the bitstream data is generated. Therefore, in the embodiments of this application, during the decoding of images in a video, after receiving the bitstream data and parsing it to obtain the coding tree unit, the nodes of each layer corresponding to the coding tree unit can be parsed to obtain the state parameters and flag parameters of the nodes at that layer. Then, the nodes are detected based on the state parameters and flag parameters, and the nodes with data are decoded to obtain all the coding units corresponding to the coding tree unit, thereby obtaining the corresponding decoded image. Since overlapping division between coding units is supported during encoding, if at least two coding units with overlapping regions exist among all the coding units obtained by the decoder from the nodes with data, the decoder can refresh the image information corresponding to the background coding unit according to the image information corresponding to the refresh coding unit. This avoids excessive division of the video image, reduces unnecessary header information, and avoids the scattered and repeated representation of data with similar characteristics in the same region, thereby improving encoding efficiency.

[0102] Based on the above embodiments, the method for the decoder to segment the i-th node and obtain the (i+1)-th node of the (i+1)-th layer corresponding to the coding tree unit may include the following steps. Step 201: Obtain the i-th segmentation pattern corresponding to the i-th node.

[0103] In the embodiments of this application, when the decoder segments the i-th node, it can first obtain the i-th segmentation mode corresponding to the i-th node.

[0104] It should be noted that, in the embodiments of this application, the i-th segmentation mode may include one of the following: QT, QTBT, TT, and BT. It should also be noted that the i-th segmentation mode can be MTT, where MTT is not a scheme parallel to QT, BT, and TT; it encompasses multiple segmentation methods, that is, a general term for the coexistence of QT, BT, and TT. Similarly, QTBT is a scheme parallel to QT and BT, encompassing multiple segmentation methods, that is, a general term for the coexistence of QT and BT.

[0105] Step 202: Segment the i-th node according to the i-th segmentation pattern to obtain the (i+1)-th node.

[0106] In the embodiments of this application, after the decoder obtains the i-th segmentation mode corresponding to the i-th node, it can perform segmentation processing on the i-th node according to the i-th segmentation mode, thereby obtaining the (i+1)-th node.

[0107] It should be noted that in the implementation of this application, the decoder performs segmentation processing on the i-th node based on the i-th segmentation mode. Each i-th node can be segmented to obtain at least two leaves, which means at least two (i+1)-th nodes can be obtained.

[0108] This application provides an image decoding method, a decoder, and a storage medium. The decoder receives bitstream data and parses the bitstream data to obtain the coding tree unit corresponding to the bitstream data; it parses the i-th node of the i-th layer corresponding to the coding tree unit to obtain the i-th state parameter and the i-th flag parameter corresponding to the i-th node; where i is an integer greater than 0; the i-th state parameter is used to determine whether the i-th node supports refresh; the i-th flag parameter is used to determine whether the i-th node enables refresh; the i-th node is detected based on the i-th state parameter and the i-th flag parameter to obtain the i-th detection result; based on the i-th detection result, the i+1-th node of the (i+1)-th layer corresponding to the coding tree unit is obtained; the (i+1)-th node is detected again, and all nodes corresponding to the coding tree unit are traversed until all coding unit data corresponding to the coding tree unit is obtained; based on all nodes and all coding unit data, a decoded image corresponding to the bitstream data is generated. Therefore, in the embodiments of this application, during the decoding of images in a video, after receiving the bitstream data and parsing it to obtain the coding tree unit, the nodes of each layer corresponding to the coding tree unit can be parsed to obtain the state parameters and flag parameters of the nodes at that layer. Then, the nodes are detected based on the state parameters and flag parameters, and the nodes with data are decoded to obtain all the coding units corresponding to the coding tree unit, thereby obtaining the corresponding decoded image. Since overlapping division between coding units is supported during encoding, if at least two coding units with overlapping regions exist among all the coding units obtained by the decoder from the nodes with data, the decoder can refresh the image information corresponding to the background coding unit according to the image information corresponding to the refresh coding unit. This avoids excessive division of the video image, reduces unnecessary header information, and avoids the scattered and repeated representation of data with similar characteristics in the same region, thereby improving encoding efficiency.

[0109] In another embodiment of this application, based on the above embodiments, the segmentation process of the decoder when performing image decoding according to the image decoding method of steps 101 to 106 described above is illustrated by way of example.

[0110] Figure 12 Schematic diagram of segmentation processing Figure 1 , Figure 13 Schematic diagram of segmentation processing Figure 2 ,like Figure 12 and Figure 13As shown, after the coding tree unit performs QT segmentation on the first node A11 which has no data, the resulting upper left coding block A21, upper right coding block A22, lower left coding block A23, and lower right coding block A24 all contain data. That is, all four second nodes of the second layer of the coding tree unit contain data. Since A23 can be further segmented, the encoder can perform QT ​​segmentation on A23 to obtain four third nodes of the third layer. None of the four third nodes contain data. One of the third nodes can be further segmented vertically by BT. After the segmentation, two fourth nodes of the fourth layer are obtained, A41 and A42. Neither A41 nor A42 can be further segmented, and A42 contains data. Therefore, the image decoding method proposed in this application only needs to decode the data A21, A22, A23, A24 and A42 to obtain the corresponding coding units. Since there is an overlapping area between A42 and A23, the decoder can refresh the coding unit corresponding to A23 according to the coding unit corresponding to A42, and finally obtain the decoded image corresponding to the coding tree.

[0111] Figure 14 Schematic diagram of segmentation processing Figure 3 , Figure 15 Schematic diagram of segmentation processing Figure 4 ,like Figure 14 and Figure 15 As shown, the first node of the first layer of the coding tree unit contains data. After QT segmentation of the first node B11, among the obtained upper left coding block B21, upper right coding block B22, lower left coding block B23, and lower right coding block B24, B23 contains data. Since B23 can be further segmented, the encoder can perform QT ​​segmentation on B23 to obtain four third nodes of the third layer. None of the four third nodes contain data. One of the third nodes can be further segmented vertically by BT. After segmentation, two fourth nodes of the fourth layer are obtained, B41 and B42. Neither B41 nor B42 can be further segmented, and B42 contains data. Therefore, the image decoding method proposed in this application only needs to decode the B11, B23, and B42 data to obtain the corresponding coding units. Since B23 and B11 have overlapping areas, and B23 and B42 have overlapping areas, the decoder can refresh the coding unit corresponding to B11 according to the coding unit corresponding to B23 to obtain the refreshed coding unit corresponding to B23. Then, it refreshes the refreshed coding unit corresponding to B23 according to the coding unit corresponding to B42. Finally, the decoded image corresponding to the coding tree can be obtained.

[0112] Figure 16 Schematic diagram of segmentation processing Figure 5 , Figure 17 Schematic diagram of segmentation processing Figure 6 ,like Figure 16 and Figure 17 As shown, the first node of the first layer of the coding tree unit contains data. After QT segmentation of the first node C11, the resulting upper left coding block C21, upper right coding block C22, lower left coding block C23, and lower right coding block C24 do not contain data. Since C23 and C24 can be further segmented, the encoder can perform QT ​​segmentation on C22 and C23 respectively to obtain eight third nodes of the third layer, including four third nodes corresponding to C22 and four third nodes corresponding to C23. None of the eight third nodes contain data. Two of the third nodes can be further segmented by vertical CT to obtain four fourth nodes of the fourth layer, namely C41, C42, C43, and C44. C41, C42, C43, and C44 cannot be further segmented, while C41 and C44 contain data. Therefore, the image decoding method proposed in this application only needs to decode the existing data C11, C41, and C44 to obtain the corresponding coding units. Since C41 and C44 have overlapping areas with C11, the decoder can refresh the coding unit corresponding to C11 according to the coding unit corresponding to C41, and at the same time, refresh the coding unit corresponding to C11 according to the coding unit corresponding to C44. Finally, the decoded image corresponding to the coding tree can be obtained.

[0113] This application provides an image decoding method, a decoder, and a storage medium. The decoder receives bitstream data and parses the bitstream data to obtain the coding tree unit corresponding to the bitstream data; it parses the i-th node of the i-th layer corresponding to the coding tree unit to obtain the i-th state parameter and the i-th flag parameter corresponding to the i-th node; where i is an integer greater than 0; the i-th state parameter is used to determine whether the i-th node supports refresh; the i-th flag parameter is used to determine whether the i-th node enables refresh; the i-th node is detected based on the i-th state parameter and the i-th flag parameter to obtain the i-th detection result; based on the i-th detection result, the i+1-th node of the (i+1)-th layer corresponding to the coding tree unit is obtained; the (i+1)-th node is detected again, and all nodes corresponding to the coding tree unit are traversed until all coding unit data corresponding to the coding tree unit is obtained; based on all nodes and all coding unit data, a decoded image corresponding to the bitstream data is generated. Therefore, in the embodiments of this application, during the decoding of images in a video, after receiving the bitstream data and parsing it to obtain the coding tree unit, the nodes of each layer corresponding to the coding tree unit can be parsed to obtain the state parameters and flag parameters of the nodes at that layer. Then, the nodes are detected based on the state parameters and flag parameters, and the nodes with data are decoded to obtain all the coding units corresponding to the coding tree unit, thereby obtaining the corresponding decoded image. Since overlapping division between coding units is supported during encoding, if at least two coding units with overlapping regions exist among all the coding units obtained by the decoder from the nodes with data, the decoder can refresh the image information corresponding to the background coding unit according to the image information corresponding to the refresh coding unit. This avoids excessive division of the video image, reduces unnecessary header information, and avoids the scattered and repeated representation of data with similar characteristics in the same region, thereby improving encoding efficiency.

[0114] In another embodiment of this application, the image decoding method proposed in the above embodiments is based on the encoder supporting the overlapping of encoding units during image encoding. The encoder supports the overlapping of encoding units during encoding, which can avoid fine division of the image. Correspondingly, when the decoder decodes the video image, if the background pixel data corresponding to the background encoding unit in all pixel data overlaps with the refresh pixel data corresponding to the refresh encoding unit, the decoder can replace the corresponding area pixel data of the background encoding unit according to the pixel data of the refresh encoding unit, that is, refresh the background encoding unit with the refresh encoding unit.

[0115] In summary, Figure 18 This is a schematic diagram of an image encoding method proposed in an embodiment of this application, as shown below. Figure 18As shown, the method of image encoding by the encoder may include the following steps: Step 301: Divide the current encoded image to obtain the coding tree unit corresponding to the current encoded image.

[0116] In the embodiments of this application, the encoder can first divide the current encoded image to obtain the coding tree unit corresponding to the current encoded image.

[0117] Furthermore, in the embodiments of this application, when the encoder performs video encoding, it encodes multiple frames of images in the video frame by frame. At any given moment, the frame being encoded can be referred to as the current encoded image. When encoding the current encoded image in the video, the encoder needs to first divide the current encoded image into coding tree units of identical size. For example, the encoder can divide the current encoded image to obtain coding tree units of identical size, that is, obtain coding tree units composed of 64 x 64 pixels.

[0118] It should be noted that, in the embodiments of this application, the encoder can perform overlapping partitioning on the current encoded image. Specifically, the encoder can perform overlapping partitioning on the current encoded image using multi-type tree partitioning techniques.

[0119] It should be noted that, in the embodiments of this application, the encoder can be set to a preset refresh encoding mode and a normal encoding mode, respectively. The normal encoding mode is a common encoding mode that does not allow overlap between encoding tree units, and there is no overlap between encoding units. In contrast, the preset refresh encoding mode allows overlap between encoding tree units. That is, regardless of whether it is the preset refresh encoding mode or the normal encoding mode, there will be no overlap between encoding tree units.

[0120] Furthermore, in the embodiments of this application, the encoder can choose to enable a preset refresh encoding mode or a normal encoding mode when performing video encoding. From the encoding side, the preset refresh encoding mode can be compared and judged at different levels by using rate distortion optimization (RDO) with the original method. In the implementation process, the number of supported refresh layers, the number of regions, etc., can also be flexibly selected.

[0121] Furthermore, in the embodiments of this application, before the encoder divides the current encoded image and obtains the encoding tree unit corresponding to the current encoded image, that is, before step 401, the encoding mode can be switched to the preset refresh encoding mode.

[0122] It should be noted that, in the embodiments of this application, when the encoder divides the current encoded image, it can divide the encoding tree units according to the raster order, and the encoder can obtain multiple encoding tree units after division.

[0123] Furthermore, in the embodiments of this application, after the current encoded image is divided into coding tree units, it will continue to be further divided using MTT technology or other segmentation techniques, and finally encoded in units of coding units.

[0124] Step 302: Continue to divide the coding tree unit to obtain the background coding unit and refresh coding unit corresponding to the coding tree unit; wherein, the refresh coding unit is used to cover part of the background coding unit.

[0125] In the embodiments of this application, after the encoder divides the current encoded image and obtains the corresponding coding tree unit, it can continue to divide the coding tree unit to obtain the background coding unit and refresh coding unit corresponding to the coding tree unit. The background coding unit and refresh coding unit are both coding units obtained by further dividing the coding tree unit and used for image encoding.

[0126] It should be noted that, in the embodiments of this application, the refresh encoding unit can be used to cover a portion of the background encoding unit.

[0127] Furthermore, in the embodiments of this application, after obtaining the coding tree unit, the encoder can further divide the coding tree unit according to a preset refresh coding mode, thereby obtaining the background coding unit and refresh coding unit corresponding to the coding tree unit. Specifically, the encoder can first extract the pixel information in the coding tree unit, and then divide the coding tree unit according to the pixel information, thereby dividing the coding tree unit into background coding units and refresh coding units. That is to say, the encoder can further divide the coding tree unit into background coding units and refresh coding units according to the pixel information in the coding tree unit, thereby enabling image encoding based on the background coding units and refresh coding units. A portion of the background coding unit can be covered and refreshed by the refresh coding unit.

[0128] Figure 19 A diagram showing a non-overlapping division. Figure 1 , Figure 20 A diagram showing a non-overlapping division. Figure 2 ,like Figure 19 and Figure 20 As shown, according to existing video coding methods, for small regions with content different from other regions, such as region a, where the content differs from other regions, the encoder, when dividing the coding tree units, needs to follow a specific procedure because overlapping coding units are not allowed. Figure 19or Figure 20 Only by meticulously segmenting the coding tree units can better video coding results be obtained. Figure 21 A diagram illustrating overlapping divisions Figure 1 , Figure 22 A diagram illustrating overlapping divisions Figure 2 ,like Figure 21 and Figure 22 As shown, for the same region a, when the encoder divides the coding tree units, since the coding units are allowed to overlap, specifically, the coding tree units can be divided into refresh coding units that cover and replace background coding units, and then the refresh coding units are used to cover and replace part of the background coding units, thereby avoiding overly fine block division and effectively reducing the amount of header information.

[0129] Furthermore, in the embodiments of this application, the pixel domain data is transformed into the frequency domain through Discrete Cosine Transform (DCT) and Discrete Sine Transform (DST) transformations before quantization encoding and transmission. For example, in a frame of the current image, a flat image region with less pixel information is dominated by low-frequency components. Therefore, the energy of this flat image region after transformation is concentrated in the upper left corner. That is, during image encoding and transmission, except for a few values ​​in the upper left corner, the values ​​in other regions are basically 0. In this way, only these few values ​​can be transmitted to represent the pixel data of the entire region. Correspondingly, if encoding and transmitting this flat image region requires n data points, then dividing the flat image region into four sub-regions before encoding and transmission may require 4n non-zero data points to represent this region. From an information perspective, this is a repetitive expression of the same information.

[0130] Furthermore, in the embodiments of this application, both MTT partitioning and QTBT partitioning are performed by first performing QT partitioning, and then performing other types of partitioning on each leaf node of QT.

[0131] Furthermore, in the embodiments of this application, in the background coding unit and refresh coding unit obtained by the encoder dividing the coding tree unit, it is permissible for one background coding unit to be refreshed by multiple refresh coding units, and it is also permissible for a refresh coding unit to be refreshed by the next layer refresh coding unit as a background coding unit. That is to say, in the embodiments of this application, the preset refresh coding mode can allow multi-region refresh and multi-layer refresh.

[0132] It should be noted that, in the embodiments of this application, the method for the encoder to divide the coding tree unit and obtain the background coding unit and refresh coding unit corresponding to the coding tree unit may specifically include the following steps: Step 302a: Divide the coding tree units to obtain the j-th background coding unit and the j-th refresh coding unit corresponding to the j-th layer; where j is an integer greater than 0.

[0133] In the embodiments of this application, after the encoder divides the current encoded image and obtains the coding tree unit corresponding to the current encoded image, it can divide the coding tree unit according to MTT, thereby obtaining the j-th background coding unit and the j-th refresh coding unit corresponding to the j-th layer; where j is an integer greater than 0.

[0134] It should be noted that in the implementation of this application, since the preset refresh encoding mode allows for multiple refreshes, the encoder can obtain at least one layer of encoding units after dividing the encoding tree units.

[0135] Step 302b: Divide the j-th refresh coding unit to obtain the j+1-th background coding unit and the j+1-th refresh coding unit corresponding to the j+1-th layer.

[0136] In the embodiments of this application, after the encoder divides the coding tree units according to MTT to obtain the j-th background coding unit and the j-th refresh coding unit corresponding to the j-th layer, it can continue to divide the j-th refresh coding unit according to MTT to obtain the (j+1)-th background coding unit and the (j+1)-th refresh coding unit corresponding to the (j+1)-th layer.

[0137] It should be noted that, in the implementation of this application, if the coding tree unit has multiple layers of coding units, then the j-th refresh coding unit of the j-th layer can be further divided into the (j+1)-th background coding unit and the (j+1)-th refresh coding unit corresponding to the j+1-th layer. That is, among the background coding units and refresh coding units obtained by the encoder in dividing the coding tree unit, it is permissible for a background coding unit to be refreshed by multiple refresh coding units, and it is also permissible for a refresh coding unit to be refreshed by the next layer refresh coding unit as a background coding unit.

[0138] Step 303: Encode the coding tree unit according to the background coding unit and the refresh coding unit to generate the bitstream data corresponding to the current coded image.

[0139] In the embodiments of this application, after the encoder divides the coding tree unit and obtains the background coding unit and refresh coding unit corresponding to the coding tree unit, it can encode the current coding image according to the background coding unit and refresh coding unit to generate the bitstream data corresponding to the current coding image.

[0140] Furthermore, in the embodiments of this application, when the encoder encodes the coding tree unit according to the background coding unit and the refresh coding unit, it can encode the background coding unit first and then encode the refresh coding unit. That is, the encoder encodes the background coding unit to generate background bitstream data, and then encodes the refresh coding unit to generate refresh bitstream data.

[0141] It should be noted that, in the embodiments of this application, the bitstream data includes background bitstream data and refresh bitstream data.

[0142] Furthermore, in the embodiments of this application, after the encoder encodes the current encoded image according to the background encoding unit and the refresh encoding unit to generate the bitstream data corresponding to the current encoded image, it can transmit the bitstream data. Specifically, in the embodiments of this application, when transmitting bitstream data, the encoder can transmit the background bitstream data first, and then transmit the refresh bitstream data. That is, when the encoder transmits bitstream data, it transmits the background bitstream data first, and then transmits the refresh bitstream data.

[0143] Therefore, in the embodiments of this application, when the encoder encodes the coding tree unit according to the preset refresh coding mode, it first encodes and transmits the large background coding unit, and then encodes and transmits the refresh coding unit; correspondingly, during decoding, it first decodes the background coding unit and then decodes the refresh coding unit.

[0144] Furthermore, the encoding method proposed in this application can be understood as a way to achieve irregular shape division. During the encoding process using encoding units as the unit, there is no overlap between encoding units. Instead, the encoder divides the encoding tree unit into background encoding units and refresh encoding units. Part of the background encoding unit is covered by the refresh encoding unit, and the uncovered area is irregularly shaped; this is the area that the background encoding unit needs to represent. The covered area belongs to virtual extended data. QTBT can be considered a special case of MTT; therefore, after VVC introduces MTT, the implementation of the proposed method is similar.

[0145] Furthermore, in the embodiments of this application, the encoder and decoder may also allow overlapping coding unit regions in the prediction and / or transformation stages. Accordingly, a coding tree unit may have a corresponding background prediction unit and a refresh prediction unit, and may also have a corresponding background transformation unit and a refresh transformation unit.

[0146] Furthermore, in the embodiments of this application, the encoder can implement an irregular region segmentation method through block subtraction.

[0147] The image encoding method proposed in this application involves the encoder segmenting the current encoded image into encoding units during the encoding and decoding process. By using a preset refresh encoding mode, it can obtain background encoding units and refresh encoding units that overlap in some areas before encoding. Correspondingly, when the decoder decodes the current decoded image according to the preset refresh decoding mode, it allows the refresh encoding units to refresh in local areas of the background encoding units. This avoids over-segmentation of the video image, reduces unnecessary header information, and improves encoding efficiency.

[0148] Based on the above embodiments, in another embodiment of this application, Figure 23 A schematic diagram of the decoder structure proposed in the embodiments of this application. Figure 1 ,like Figure 23 As shown, the decoder 100 proposed in this application embodiment may include a receiving part 101, a parsing part 102, a detection part 103, an acquisition part 104, a generation part 105, a transmission part 106, and an enabling part 107.

[0149] The receiving section 101 is configured to receive bitstream data.

[0150] The parsing section 102 is configured to parse the bitstream data to obtain the coding tree unit corresponding to the bitstream data.

[0151] The parsing part 102 is further configured to parse the i-th node of the i-th layer corresponding to the coding tree unit, so as to obtain the i-th state parameter and the i-th flag parameter corresponding to the i-th node; wherein, i is an integer greater than 0; the i-th state parameter is used to determine whether the i-th node supports refresh; the i-th flag parameter is used to determine whether the i-th node enables refresh.

[0152] The detection section 103 is configured to perform detection processing on the i-th node according to the i-th state parameter and the i-th flag parameter to obtain the i-th detection result.

[0153] The acquisition part 104 is configured to acquire the (i+1)th node of the (i+1)th layer corresponding to the coding tree unit based on the (i)th detection result.

[0154] The detection section 103 is further configured to continue performing the detection process on the (i+1)th node and traverse all nodes corresponding to the coding tree unit until all coding unit data corresponding to the coding tree unit is obtained.

[0155] The generation section 105 is configured to generate a decoded image corresponding to the bitstream data based on all nodes and all encoding unit data.

[0156] Furthermore, in an embodiment of this application, the acquisition part 104 is specifically configured to determine the leaf parameter corresponding to the i-th node; wherein the leaf parameter is used to determine whether the i-th node should continue to be segmented; and to obtain the i-th detection result according to the leaf parameter, the i-th state parameter and the i-th flag parameter.

[0157] Further, in the embodiments of this application, the acquisition part 104 is specifically configured to: when the i-th detection result is that data exists and is segmented, acquire the i-th coding unit data of the i-th layer, and perform segmentation processing on the i-th node to obtain the (i+1)-th node of the (i+1)-th layer corresponding to the coding tree unit; when the i-th detection result is that data does not exist and is segmented, perform segmentation processing on the i-th node to obtain the (i+1)-th node of the (i+1)-th layer corresponding to the coding tree unit; when the i-th detection result is that data exists and is not segmented, acquire the i-th coding unit data of the i-th layer and end the parsing processing of the i-th node; and when the i-th detection result is that data does not exist and is not segmented, end the parsing processing of the i-th node.

[0158] Furthermore, in an embodiment of this application, the generation part 105 is specifically configured to perform decoding processing on all coding unit data based on all nodes to obtain all pixel data corresponding to the coding tree unit; and generate the decoded image corresponding to the bitstream data according to the all pixel data.

[0159] Furthermore, in an embodiment of this application, the transmission section 106 is configured to transmit the (i+1)th state parameter according to the leaf parameter, the i-th state parameter, and the i-th flag parameter before continuing to perform the detection processing on the (i+1)th node.

[0160] Furthermore, in the embodiments of this application, the transmission section 106 is specifically configured to determine whether to perform a state refresh based on the leaf parameter, the i-th state parameter, and the i-th flag parameter; and when it is determined that a default state refresh should be performed, to refresh the i-th state parameter to obtain the (i+1)-th state parameter; and when it is determined that a state refresh should not be performed, to determine the i-th state parameter as the (i+1)-th state parameter.

[0161] Furthermore, in the embodiments of this application, the acquisition part 104 is specifically configured to acquire the i-th segmentation mode corresponding to the i-th node; and to perform segmentation processing on the i-th node according to the i-th segmentation mode to acquire the (i+1)-th node.

[0162] Furthermore, in the embodiments of this application, the acquisition part 104 is specifically configured to: when the i-th node has data and is not segmented, decode the i-th encoding unit data to obtain the i-th pixel data; and when the i-th node has data and is segmented, decode the i-th encoding unit data to obtain the i-th background pixel data, decode the (i+1)-th encoding unit data to obtain the i-th refresh pixel data, so as to obtain the i-th pixel data, and traverse all the nodes until all the pixel data is obtained.

[0163] Furthermore, in an embodiment of this application, the acquisition part 104 is specifically configured to refresh the i-th background pixel data according to the i-th refresh pixel data to obtain the i-th pixel data; and to traverse all the nodes until the decoded image is obtained.

[0164] Furthermore, in the embodiments of this application, the acquisition portion 104 is specifically configured to: acquire the (i+1)th encoding unit data when the i-th node has data and is segmented; decode the (i+1)th encoding unit data to obtain the i-th refresh pixel data corresponding to the i-th node; decode the i-th encoding unit data to obtain the i-th background pixel data; set the i-th background pixel data as the background of the i-th refresh pixel data to obtain the i-th pixel data; and traverse all nodes until all pixel data is obtained.

[0165] Furthermore, in an embodiment of this application, the acquisition part 104 is specifically configured to set the i-th background pixel data to empty when the i-th node does not have data.

[0166] Furthermore, in the embodiments of this application, the generation part 105 is also configured to continue to perform the detection processing on the (i+1)th node, and traverse all nodes corresponding to the coding tree unit until all coding unit data corresponding to the coding tree unit is obtained, and then refresh the i-th coding unit data according to the (i+1)th coding unit data.

[0167] Furthermore, in an embodiment of this application, the enabling portion 107 is configured to enable a preset refresh mode after receiving the bitstream data and parsing the bitstream data to obtain the encoding tree unit corresponding to the bitstream data; wherein, the preset refresh mode is used to perform overlapping decoding between encoding units.

[0168] Figure 24 A schematic diagram of the decoder structure proposed in the embodiments of this application. Figure 2 ,like Figure 24As shown, the decoder 100 proposed in this application embodiment may further include a processor 108, a memory 109 storing executable instructions of the processor 108, a communication interface 110, and a bus 111 for connecting the processor 108, the memory 109, and the communication interface 110.

[0169] Further, in the embodiments of this application, the processor 108 is configured to receive bitstream data and parse the bitstream data to obtain the coding tree unit corresponding to the bitstream data; parse the i-th node of the i-th layer corresponding to the coding tree unit to obtain the i-th state parameter and the i-th flag parameter corresponding to the i-th node; wherein, i is an integer greater than 0; the i-th state parameter is used to determine whether the i-th node supports refresh; the i-th flag parameter is used to determine whether the i-th node enables refresh; perform detection processing on the i-th node according to the i-th state parameter and the i-th flag parameter to obtain the i-th detection result; obtain the i+1-th node of the (i+1)-th layer corresponding to the coding tree unit according to the i-th detection result; continue to perform the detection processing on the (i+1)-th node and traverse all nodes corresponding to the coding tree unit until all coding unit data corresponding to the coding tree unit is obtained; generate the decoded image corresponding to the bitstream data according to all nodes and all coding unit data.

[0170] In the embodiments of this application, the processor 108 can be at least one of the following: Application-Specific Integrated Circuit (ASIC), Digital Signal Processor (DSP), Digital Signal Processing Device (DSPD), Programmable Logic Device (PLD), Field-Programmable Gate Array (FPGA), Central Processing Unit (CPU), Controller, Microcontroller, and Microprocessor. It is understood that for different devices, the electronic device used to implement the above-mentioned processor function can also be other, and this application embodiment does not specifically limit it. The memory 109 can be connected to the processor 108, wherein the memory 109 is used to store executable program code, which includes computer operation instructions. The memory 109 may include high-speed RAM memory and may also include non-volatile memory, such as at least two disk drives.

[0171] In embodiments of this application, bus 111 is used to connect communication interface 110, processor 108, and memory 109, as well as the communication between these devices. In embodiments of this application, memory 109 is used to store instructions and data.

[0172] In practical applications, the aforementioned memory 109 can be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or a combination of the above types of memory, and provide instructions and data to the processor.

[0173] Furthermore, in this embodiment, the functional modules can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional module.

[0174] If the integrated unit is implemented as a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the method of this embodiment. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0175] This application provides an image decoder that receives and parses bitstream data to obtain the corresponding coding tree unit; it parses the i-th node of the i-th layer of the coding tree unit to obtain the i-th state parameter and the i-th flag parameter corresponding to the i-th node; where i is an integer greater than 0; the i-th state parameter is used to determine whether the i-th node supports refresh; the i-th flag parameter is used to determine whether the i-th node enables refresh; the i-th node is detected based on the i-th state parameter and the i-th flag parameter to obtain the i-th detection result; based on the i-th detection result, the i+1-th node of the (i+1)-th layer of the coding tree unit is obtained; the (i+1)-th node is detected again, and all nodes corresponding to the coding tree unit are traversed until all coding unit data corresponding to the coding tree unit is obtained; based on all nodes and all coding unit data, a decoded image corresponding to the bitstream data is generated. Therefore, in the embodiments of this application, during the decoding of images in a video, after receiving the bitstream data and parsing it to obtain the coding tree unit, the nodes of each layer corresponding to the coding tree unit can be parsed to obtain the state parameters and flag parameters of the nodes at that layer. Then, the nodes are detected based on the state parameters and flag parameters, and the nodes with data are decoded to obtain all the coding units corresponding to the coding tree unit, thereby obtaining the corresponding decoded image. Since overlapping division between coding units is supported during encoding, if at least two coding units with overlapping regions exist among all the coding units obtained by the decoder from the nodes with data, the decoder can refresh the image information corresponding to the background coding unit according to the image information corresponding to the refresh coding unit. This avoids excessive division of the video image, reduces unnecessary header information, and avoids the scattered and repeated representation of data with similar characteristics in the same region, thereby improving encoding efficiency.

[0176] This application provides a computer-readable storage medium and a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the methods described in the above embodiments.

[0177] Specifically, the program instructions corresponding to an image decoding method in this embodiment can be stored on storage media such as optical discs, hard disks, and USB flash drives. When the program instructions corresponding to an image decoding method in the storage media are read or executed by an electronic device, the following steps are included: Receive bitstream data and parse the bitstream data to obtain the coding tree unit corresponding to the bitstream data; The ith node of the ith layer corresponding to the cipher unit is parsed to obtain the ith state parameter and the ith flag parameter corresponding to the ith node; wherein, i is an integer greater than 0; the ith state parameter is used to determine whether the ith node supports refresh; the ith flag parameter is used to determine whether the ith node enables refresh. The i-th node is detected based on the i-th state parameter and the i-th flag parameter to obtain the i-th detection result; Based on the i-th detection result, obtain the (i+1)-th node of the (i+1)-th layer corresponding to the coding tree unit; Continue to perform the detection process on the (i+1)th node, and traverse all nodes corresponding to the coding tree unit until all coding unit data corresponding to the coding tree unit is obtained; Based on all the nodes and all the encoding unit data, a decoded image corresponding to the bitstream data is generated.

[0178] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0179] This application is described with reference to schematic and / or block diagrams of implementations of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the schematic and / or block diagrams can be implemented by computer program instructions, and combinations of blocks in the schematic and / or block diagrams can be implemented. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the schematic and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0180] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in the implementation flow diagram. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0181] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0182] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.

[0183] Industrial applicability This application provides an image decoding method, a decoder, and a storage medium. The decoder receives bitstream data and parses the bitstream data to obtain the coding tree unit corresponding to the bitstream data; it parses the i-th node of the i-th layer corresponding to the coding tree unit to obtain the i-th state parameter and the i-th flag parameter corresponding to the i-th node; where i is an integer greater than 0; the i-th state parameter is used to determine whether the i-th node supports refresh; the i-th flag parameter is used to determine whether the i-th node enables refresh; the i-th node is detected based on the i-th state parameter and the i-th flag parameter to obtain the i-th detection result; based on the i-th detection result, the i+1-th node of the (i+1)-th layer corresponding to the coding tree unit is obtained; the (i+1)-th node is detected again, and all nodes corresponding to the coding tree unit are traversed until all coding unit data corresponding to the coding tree unit is obtained; based on all nodes and all coding unit data, a decoded image corresponding to the bitstream data is generated. Therefore, in the embodiments of this application, during the decoding of images in a video, after receiving the bitstream data and parsing it to obtain the coding tree unit, the nodes of each layer corresponding to the coding tree unit can be parsed to obtain the state parameters and flag parameters of the nodes at that layer. Then, the nodes are detected based on the state parameters and flag parameters, and the nodes with data are decoded to obtain all the coding units corresponding to the coding tree unit, thereby obtaining the corresponding decoded image. Since overlapping division between coding units is supported during encoding, if at least two coding units with overlapping regions exist among all the coding units obtained by the decoder from the nodes with data, the decoder can refresh the image information corresponding to the background coding unit according to the image information corresponding to the refresh coding unit. This avoids excessive division of the video image, reduces unnecessary header information, and avoids the scattered and repeated representation of data with similar characteristics in the same region, thereby improving encoding efficiency.

Claims

1. An image decoding method, characterized in that, The method includes: Receive bitstream data and parse the bitstream data to obtain the coding tree unit corresponding to the bitstream data; Enable a preset refresh decoding mode; wherein, the preset refresh decoding mode is used to refresh the decoding between encoding units; A node in a layer corresponding to a decoding encoding tree unit is used to determine the state parameters and flag parameters corresponding to the node; the state parameters are used to determine whether the node supports refresh; the flag parameters are used to determine whether refresh is enabled for the node; wherein, enabling refresh allows the pixel region corresponding to the node to be refreshed and decoded based on the state parameters and the flag parameters; Determine the leaf parameters corresponding to the node; wherein the leaf parameters are used to determine whether to split the node. Continue the detection process on the nodes of the next layer to obtain all coding unit data corresponding to the coding tree unit; Based on the nodes and all the encoding unit data, a decoded image corresponding to the bitstream data is generated.

2. The method according to claim 1, characterized in that, The step of generating the decoded image corresponding to the bitstream data based on the node and all the encoding unit data includes: Based on the node, all the data of the coding unit are decoded to obtain all the pixel data corresponding to the coding tree unit; The decoded image corresponding to the bitstream data is generated based on all the pixel data.

3. The method according to claim 1, characterized in that, Before continuing the detection process on the nodes of the next layer, the method further includes: Based on the leaf parameters, the state parameters, and the flag parameters, the state parameters of the next layer are transmitted.

4. The method according to claim 3, characterized in that, The step of transmitting the state parameters of the next layer based on the leaf parameters, the state parameters, and the flag parameters includes: Based on the leaf parameter, the state parameter, and the flag parameter, determine whether to perform a state refresh; When it is determined that the default state needs to be refreshed, the state parameters are refreshed to obtain the state parameters of the next layer. When it is determined that no state refresh should be performed, the state parameter is determined as the state parameter of the next layer.

5. A decoder, characterized in that, The decoder includes: a receiving section, a parsing section, an enabling section, a detection section, an acquisition section, and a generation section. The receiving section is configured to receive bitstream data; The parsing section is configured to parse the bitstream data to obtain the coding tree unit corresponding to the bitstream data; The enabling portion is configured to enable a preset refresh decoding mode; wherein, the preset refresh decoding mode is used to refresh decoding between encoding units; The parsing section is further configured at a node in a layer corresponding to the decoding encoding tree unit to determine the state parameters and flag parameters corresponding to the node; the state parameters are used to determine whether the node supports refresh; the flag parameters are used to determine whether the node enables refresh; wherein, enabling refresh allows the pixel region corresponding to the node to be refreshed and decoded based on the state parameters and the flag parameters; The acquisition section is configured to determine the leaf parameters corresponding to the node; wherein, the leaf parameters are used to determine whether to split the node; The detection section is configured to continue the detection process on the nodes of the next layer to obtain all coding unit data corresponding to the coding tree unit. The generation section is configured to generate a decoded image corresponding to the bitstream data based on the node and all the encoding unit data.

6. The decoder according to claim 5, characterized in that, The generation part is specifically configured to perform decoding processing on all the coding unit data based on all nodes to obtain all pixel data corresponding to the coding tree unit; and generate the decoded image corresponding to the bitstream data according to the all pixel data.

7. The decoder according to claim 5, characterized in that, The decoder also includes: a transmission section, The transmission section is configured to transmit the state parameters of the next layer according to the leaf parameters, the state parameters, and the flag parameters before continuing the detection processing of the nodes of the next layer.

8. The decoder according to claim 7, characterized in that, The transmission section is specifically configured to determine whether to perform a state refresh based on the leaf parameter, the state parameter, and the flag parameter; and when it is determined that a default state refresh should be performed, to refresh the state parameter to obtain the state parameter of the next layer; and when it is determined that a state refresh should not be performed, to determine the state parameter as the state parameter of the next layer.

9. A decoder, characterized in that, The decoder includes a processor, a memory storing processor-executable instructions, a communication interface, and a bus for connecting the processor, the memory, and the communication interface. When the instructions are executed by the processor, the method as described in any one of claims 1-4 is implemented.

10. A computer-readable storage medium, characterized in that, It stores a program that is applied to the decoder, and when the program is executed by the processor, it implements the method as described in any one of claims 1-4.

11. A method for receiving a code stream, characterized in that, Receive a bitstream and perform the image decoding method according to any one of claims 1-4 to decode the bitstream to generate a video or image.