Video coders and corresponding methods
By determining the block partitioning strategy based on the aspect ratio of image blocks and using binary tree partitioning, the problem of low partitioning efficiency in video encoding and decoding is solved, achieving more efficient encoding and decoding performance.
Patent Information
- Application Number
- CN202211333863.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-12-16
- Filing Date
- 2019-05-06
- Publication Date
- 2026-07-03
- Estimated Expiration
- 2039-05-06
AI Technical Summary
In existing technologies, how to improve the performance of block-based video encoding and decoding, especially how to effectively divide video frames or a portion of video frames to improve encoding and decoding efficiency, is an urgent problem to be solved.
By determining the block partitioning strategy based on the aspect ratio of the current image blocks, including whether partitioning direction information needs to be encoded into the bitstream, the ratio of leaf nodes in the coding tree is optimized. A binary tree partitioning method is adopted to reduce complexity and save transmission bit overhead.
It improves video encoding and decoding performance, reduces segmentation complexity and saves transmission bit overhead, while also improving encoding accuracy.
Smart Images

Figure CN115714861B_ABST
Abstract
Description
[0001] This application is a divisional application. The original application has the application number 201910372891.6 and the original application date is May 6, 2019. The entire contents of the original application are incorporated herein by reference. Technical Field
[0002] This application relates to the field of video encoding and decoding technology, and in particular to video decoders and corresponding methods. Background Technology
[0003] Digital video capabilities can be incorporated into a wide variety of devices, including digital television, digital live broadcasting systems, wireless broadcasting systems, personal digital assistants (PDAs), laptops or desktop computers, tablets, e-book readers, digital cameras, digital recording devices, digital media players, video game devices, video game consoles, cellular or satellite radio phones (so-called "smartphones"), video conferencing devices, video streaming devices, and the like. Digital video devices implement video compression technologies, such as those described in standards defined by MPEG-2, MPEG-4, ITU-T H.263, ITU-T H.264 / MPEG-4 Part 10 Advanced Video Coding (AVC), the H.265 / High Efficiency Video Coding (HEVC) standard, and extensions thereof. Video devices can more efficiently transmit, receive, encode, decode, and / or store digital video information by implementing such video compression technologies. MPEG stands for Moving Picture Experts Group. ITU-T is the abbreviation for ITU Telecommunication Standardization Sector of the International Telecommunication Union.
[0004] For block-based video coding, a video strip (i.e., a video frame or a portion thereof) can be divided into several image blocks, which may also be referred to as tree blocks, coding units (CUs), and / or coding nodes. How to divide video frames or video strips to improve video encoding and decoding performance has become a pressing technical problem. Summary of the Invention
[0005] This application provides a video decoder and corresponding method, which helps improve video encoding and decoding performance. In this application, encoding and decoding are collectively referred to as decoding.
[0006] Firstly, a video decoding method is provided, comprising: firstly, determining a block partitioning strategy for the current image block based on the width-to-height relationship; then, applying the block partitioning strategy to the current image block to obtain a coding block; and finally, reconstructing the current image block by reconstructing the obtained coding block. In this technical solution, the block partitioning strategy for the current image block is conditionally determined to obtain the coding block, which helps to reduce partitioning complexity and thus improve video encoding and decoding performance.
[0007] In this context, a coding block can also be called a coding unit. In one example, this technique can be applied to the second-level coding tree in an extended quad-tree (EQT) scheme; that is, the current image block can be any image block in the second-level coding tree. A coding block can be a leaf node in a coding tree such as a second-level coding tree.
[0008] In one possible design, the block partitioning strategy for the current image block is determined based on the width-to-height relationship, including: determining whether the current image block satisfies a first condition. The first condition includes: the width of the current image block is less than the product of a first threshold and the height of the current image block. Then, if the current image block does not satisfy the first condition, the block partitioning strategy is determined to be a vertical partition. The vertical direction is perpendicular to the direction of the edge containing the width of the current image block. Thus, when the width of the current image block is greater than or equal to the product of the first threshold and the height, it is not necessary to encode information indicating the partitioning direction of the current image block into the bitstream, thereby saving transmission bit overhead. Furthermore, this technical solution helps to limit the width-to-height ratio of leaf nodes in the coding tree to a certain range, thus facilitating encoding.
[0009] In one possible design, the block partitioning strategy for the current image block is determined based on the relationship between its width and height. This includes determining whether the current image block satisfies a second condition. The second condition includes that the height of the current image block is less than the product of a first threshold and the width of the current image block. Then, if the current image block does not satisfy the second condition, the block partitioning strategy is determined to be a horizontal partition. The horizontal direction is perpendicular to the direction of the edge containing the height of the current image block. Thus, when the height of the current image block is greater than or equal to the product of the first threshold and its width, it is not necessary to encode information indicating the partitioning direction of the current image block into the bitstream, thereby saving transmission bit overhead. Furthermore, this technical solution helps to limit the height-to-width ratio of leaf nodes in the coding tree to a certain range, thus facilitating encoding.
[0010] In one possible design, the block partitioning strategy for the current image block is determined based on the width-to-height relationship of the current image block. This includes determining whether the current image block satisfies a first condition. The first condition includes: the width of the current image block is less than the product of a first threshold and the height of the current image block. Then, if the current image block does not satisfy the first condition, the block partitioning strategy for the current image block is determined to exclude partitions with a horizontal partitioning direction. The horizontal direction is perpendicular to the direction of the edge containing the height of the current image block. Based on this, the current image block can be partitioned or not. For example, the block partitioning strategy for the current image block can be combined with other information, such as the minimum CU size principle and the minimum rate distortion optimization (RDO) principle, to determine whether to partition the current image block. If it is determined that the current image block should be partitioned, it is not necessary to encode information indicating the partitioning direction of the current image block into the bitstream, thus saving transmission bit overhead. In addition, this technique helps to limit the width-to-height ratio of the leaf nodes in the coding tree to a certain range, thereby facilitating encoding.
[0011] In one possible design, the block partitioning strategy for the current image block is determined based on the width-to-height relationship, including: determining whether the current image block satisfies a second condition. The second condition includes: the height of the current image block is less than the product of a first threshold and the width of the current image block. Then, if the current image block does not satisfy the second condition, the block partitioning strategy for the current image block is determined to exclude partitions with a vertical partitioning direction. The vertical direction is perpendicular to the side containing the width of the current image block. Based on this, the current image block can be partitioned or not. If it is determined that the current image block should be partitioned, it is not necessary to encode information indicating the partitioning direction of the current image block into the bitstream, thus this technical solution helps to save transmission bit overhead. In addition, this technical solution helps to limit the height-to-width ratio of leaf nodes in the coding tree to a certain range, thereby facilitating encoding.
[0012] In one possible design, the first threshold is the maximum value of the ratio of the long side length to the short side length of a node in an allowed coding tree (such as the second-level coding tree in the EQT scheme).
[0013] In one possible design, the first threshold is a value greater than 1. Optionally, the first threshold can be an integer power of 2.
[0014] In one possible design, the method may further include: parsing the bitstream to obtain identification information, which indicates the partitioning type of the current image block. Accordingly, applying the block partitioning strategy to the current image block to obtain a coded block includes: based on the block partitioning strategy (specifically, the block partitioning strategy determined when the first condition is not met), using the partitioning type indicated by the identification information, partitioning the current image block vertically to obtain the coded block. In this possible design, the video decoding method is specifically a video decoding method.
[0015] In one possible design, the method may further include: parsing the bitstream to obtain identification information, which indicates the partitioning type of the current image block. Accordingly, applying the block partitioning strategy to the current image block to obtain coded blocks includes: partitioning the current image block horizontally based on the block partitioning strategy (specifically, the block partitioning strategy determined when the second condition is not met), using the partitioning type indicated by the identification information. In this possible design, the video decoding method is specifically a video decoding method.
[0016] In one possible design, the block partitioning strategy for the current image block is determined based on the width-to-height relationship, including determining whether the current image block satisfies a third condition. The third condition includes: the width of the current image block is less than the product of a second threshold and the height of the current image block. Then, if the current image block does not satisfy the third condition, the block partitioning strategy is determined to be an extended quadtree partition with the partitioning direction vertical. The vertical direction is perpendicular to the side containing the width of the current image block. Thus, when the width of the current image block is greater than or equal to the product of the second threshold and the height, and an extended quadtree partition is performed on the current image block, it is not necessary to encode information indicating the partitioning direction of the current image block into the bitstream, thereby saving transmission bit overhead. Furthermore, this technical solution helps to limit the width-to-height ratio of leaf nodes in the coding tree to a certain range, thus facilitating encoding.
[0017] In one possible design, the block partitioning strategy for the current image block is determined based on the relationship between its width and height. This includes determining whether the current image block satisfies a fourth condition. The fourth condition includes: the height of the current image block is less than the product of a second threshold and the width of the current image block. Then, if the current image block does not satisfy the fourth condition, the block partitioning strategy is determined to be an extended quadtree partition with the partitioning direction horizontal. The horizontal direction is perpendicular to the direction of the edge containing the height of the current image block. Thus, when the height of the current image block is greater than or equal to the product of the second threshold and its width, and an extended quadtree partition is performed on the current image block, it is not necessary to encode information indicating the partitioning direction of the current image block into the bitstream, thereby saving transmission bit overhead. Furthermore, this technical solution helps to limit the height-to-width ratio of leaf nodes in the coding tree to a certain range, thus facilitating encoding.
[0018] In one possible design, the block partitioning strategy for the current image patch is determined based on the relationship between its width and height. This includes determining whether the current image patch satisfies a third condition. The third condition includes: the width of the current image patch is less than the product of a second threshold and the height of the current image patch. Then, if the current image patch does not satisfy the third condition, the block partitioning strategy for the current image patch is determined to exclude horizontally oriented extended quadtree partitioning, where the horizontal direction is perpendicular to the edge containing the height of the current image patch. Based on this, the current image patch can be partitioned subsequently, or it can remain unpartitioned.
[0019] In one possible design, the block partitioning strategy for the current image patch is determined based on the relationship between its width and height. This includes determining whether the current image patch satisfies a fourth condition. The fourth condition is that the height of the current image patch is less than the product of a second threshold and its width. Then, if the current image patch does not satisfy the fourth condition, the block partitioning strategy for the current image patch does not include vertically oriented extended quadtree partitioning, where the vertical direction is perpendicular to the side containing the width of the current image patch. Based on this, the current image patch can be partitioned subsequently, or it can remain unpartitioned.
[0020] In one possible design, the second threshold is half the maximum value of the ratio of the long side length to the short side length of a node in an allowed coding tree (such as the second-level coding tree in the EQT scheme).
[0021] In one possible design, the second threshold is a value greater than 1. Optionally, the second threshold can be an integer power of 2.
[0022] In one possible design, the method may further include: parsing the bitstream to obtain identification information, which indicates the partitioning type of the current image block. Accordingly, applying a block partitioning strategy to the current image block to obtain coded blocks includes: based on the block partitioning strategy (specifically, the block partitioning strategy determined when the third condition is not met), when the identification information indicates that the current image block is to be partitioned into an extended quadtree, performing an extended quadtree partitioning of the current image block with the partitioning direction in the vertical direction. In this possible design, the video decoding method is specifically a video decoding method.
[0023] In one possible design, the method may further include: parsing the bitstream to obtain identification information, which indicates the partitioning type of the current image block. Accordingly, applying the block partitioning strategy to the current image block to obtain coded blocks includes: based on the block partitioning strategy (specifically, the block partitioning strategy determined when the fourth condition is not met), when the identification information indicates that the current image block is to be partitioned into an extended quadtree, performing an extended quadtree partitioning of the current image block with the partitioning direction in the horizontal direction. In this possible design, the video decoding method is specifically a video decoding method.
[0024] Secondly, a video decoding method is provided, comprising: if the length of the longer side of the image block to be divided in the image to be decoded is twice the length of the shorter side, then the image block to be divided is partitioned into binary trees with the partitioning direction perpendicular to the longer side, resulting in the partitioned image blocks. For example, if the width of the image block to be divided in the image to be decoded is twice the height, then the image block to be divided is partitioned into vertical binary trees, resulting in the partitioned image blocks. Similarly, if the height of the image block to be divided in the image to be decoded is twice the width, then the image block to be divided is partitioned into horizontal binary trees, resulting in the partitioned image blocks. Then, the image to be decoded is reconstructed based on the partitioned image blocks. This conditional partitioning of the image blocks helps reduce partitioning complexity, thereby improving video encoding and decoding performance. Furthermore, if the length of the longer side of the image block to be divided is twice the length of the shorter side, it is not necessary to encode information indicating the partitioning method (including partitioning type and partitioning direction) for the current image block into the bitstream, thus saving transmission bit overhead. In addition, by performing binary tree partitioning on the current image block with the partitioning direction perpendicular to the long side of the current image block, the current image block can be divided into two square image blocks. Compared with non-square rectangular image blocks, square image blocks are more likely to be partitioned into subsequent blocks. Therefore, this technical solution helps to improve the encoding accuracy of video images.
[0025] In one possible design, the longer side of the image block to be divided is 128 pixels long, and the shorter side is 64 pixels long. For example, when the size of the image block to be divided is 128*64 (i.e., the width is 128 pixels and the height is 64 pixels), the image block is divided into a vertical binary tree. Alternatively, when the size of the image block to be divided is 64*128 (i.e., the width is 64 pixels and the height is 128 pixels), the image block is divided into a horizontal binary tree.
[0026] In one possible design, the short side length of the image block to be divided is equal to the side size of the maximum transform unit (TU), or the short side length of the image block to be divided is equal to the side size of the virtual pipeline data unit (VPDU).
[0027] In one possible design, the image block to be divided is a boundary image block. Specifically, if one or more pixels in the current node exceed the current image boundary, the current node is said to exceed the image boundary, and in this case, the current node is a boundary image block.
[0028] Thirdly, a video decoding method is provided, comprising: if the width of the image block to be divided in the image to be decoded is greater than its height, then the image block to be divided is vertically partitioned into binary trees to obtain the partitioned image blocks; and / or, if the height of the image block to be divided in the image to be decoded is greater than its width, then the image block to be divided is horizontally partitioned into binary trees to obtain the partitioned image blocks. Then, the image to be decoded is reconstructed based on the partitioned image blocks. This conditional partitioning of the image block helps reduce partitioning complexity, thereby improving video encoding and decoding performance. Furthermore, this technical solution does not require encoding information indicating the partitioning method (including partitioning type and partitioning direction) of the current image block into the bitstream, thus saving transmission bit overhead. Additionally, this technical solution divides the current image block into two square image blocks. Compared to non-square rectangular image blocks, square image blocks are more likely to be partitioned into subsequent blocks; therefore, this technical solution helps improve the encoding accuracy of video images.
[0029] In one possible design, when the size of the image block to be divided is 128*64 (i.e., the width is 128 pixels and the height is 64 pixels), the image block to be divided is partitioned into a vertical binary tree.
[0030] In one possible design, when the size of the image block to be divided is 64*128 (i.e., the width is 64 pixels and the height is 128 pixels), the image block to be divided is partitioned into a horizontal binary tree.
[0031] In one possible design, the image block to be divided is a boundary image block.
[0032] Fourthly, a video decoding apparatus is provided, the apparatus including a module (or unit) for performing the methods described in the first, second, or third aspects above, or any possible design of the first, second, or third aspects.
[0033] Fifthly, a video decoder is provided, comprising: a non-volatile memory and a processor coupled to each other. The processor invokes program code stored in the memory to execute some or all of the steps of the method in the first, second, or third aspect, or any possible design of the first, second, or third aspect.
[0034] In a sixth aspect, a computer-readable storage medium is provided that stores program code, wherein the program code includes instructions for performing some or all of the steps of the method in any of the first, second, or third aspects, or any implementation of the first, second, or third aspects.
[0035] In a seventh aspect, a computer program product is provided that, when run on a computer, causes the computer to execute instructions for some or all of the steps of the method in any of the first, second, or third aspects, or any implementation of the first, second, or third aspects.
[0036] It should be understood that the beneficial effects of any of the video decoding devices, video decoders, computer-readable storage media, and computer program products provided above can be referred to in relation to the beneficial effects of the method embodiments provided in the corresponding aspects above, and will not be repeated here. Attached Figure Description
[0037] Figure 1A This is a schematic block diagram of a video encoding and decoding system used in the embodiments of this application;
[0038] Figure 1B A schematic block diagram of another video encoding and decoding system used in the embodiments of this application;
[0039] Figure 2 A schematic / conceptual block diagram illustrating an example of an encoder according to an embodiment of this application;
[0040] Figure 3 A schematic / conceptual block diagram illustrating an example of a decoder according to an embodiment of this application;
[0041] Figure 4 This is a schematic diagram of the structure of a video decoding device provided in an embodiment of this application;
[0042] Figure 5 This is a schematic block diagram illustrating one implementation of the decoding device according to an embodiment of this application;
[0043] Figure 6 This is a schematic diagram illustrating several division methods applicable to embodiments of this application;
[0044] Figure 7 This is a schematic diagram of an encoding tree and its corresponding partitioning method applicable to embodiments of this application;
[0045] Figure 8 A flowchart illustrating a video decoding method provided in an embodiment of this application;
[0046] Figure 9 A flowchart illustrating an image block segmentation method provided in an embodiment of this application;
[0047] Figure 10 A flowchart illustrating another image block segmentation method provided in an embodiment of this application;
[0048] Figure 11 A flowchart illustrating another image block segmentation method provided in an embodiment of this application;
[0049] Figure 12 A flowchart illustrating another image block segmentation method provided in an embodiment of this application;
[0050] Figure 13 A flowchart illustrating a video encoding method provided in an embodiment of this application;
[0051] Figure 14 A flowchart illustrating a video decoding method provided in an embodiment of this application;
[0052] Figure 15 This is a schematic diagram of the structure of a video decoder provided in an embodiment of this application;
[0053] Figure 16 A schematic diagram of another video decoder provided in an embodiment of this application;
[0054] Figure 17 This is a schematic diagram of a video communication system applicable to embodiments of this application;
[0055] Figure 18 A flowchart illustrating another video decoding method provided in an embodiment of this application;
[0056] Figure 19 This is a flowchart illustrating another video decoding method provided in an embodiment of this application. Detailed Implementation
[0057] The embodiments of this application are described below with reference to the accompanying drawings. In the following description, reference is made to the accompanying drawings, which form part of this disclosure and illustrate specific aspects of the embodiments of this application or to which specific aspects of the embodiments of this application may be used. It should be understood that the embodiments of this application may be used in other aspects and may include structural or logical variations not depicted in the drawings. Therefore, the following detailed description should not be construed in a limiting sense, and the scope of this application is defined by the appended claims. For example, it should be understood that the disclosure of the described methods is equally applicable to corresponding devices or systems for performing the methods, and vice versa. For example, if one or more specific method steps are described, the corresponding device may include one or more units, such as functional units, to perform the described one or more method steps (e.g., one unit performs one or more steps, or multiple units, each performing one or more of multiple steps), even if such one or more units are not explicitly described or illustrated in the drawings. On the other hand, for example, if a specific apparatus is described based on one or more units such as functional units, the corresponding method may include a step to perform the functionality of one or more units (e.g., a step to perform the functionality of one or more units, or multiple steps, each of which performs the functionality of one or more units among a plurality of units), even if such one or more steps are not explicitly described or illustrated in the accompanying drawings. Furthermore, it should be understood that, unless otherwise expressly stated, features of the various exemplary embodiments and / or aspects described herein can be combined with each other.
[0058] Video encoding generally refers to the processing of a sequence of images that form a video or video sequence. In the field of video encoding, the terms "picture," "frame," or "image" can be used synonymously. As used herein, video decoding refers to either video encoding or video decoding. Video encoding is performed on the source side and typically involves processing (e.g., by compression) the raw video images to reduce the amount of data required to represent them, thereby enabling more efficient storage and / or transmission. Video decoding is performed on the destination side and typically involves inverse processing relative to the encoder to reconstruct the video images. The term "encoding" of video images in the embodiments should be understood as referring to the "encoding" or "decoding" of a video sequence. The combination of encoding and decoding portions is also referred to as encoding and decoding (encoding and decoding).
[0059] A video sequence consists of a series of pictures, which are further divided into slices, and slices into blocks. Video coding is performed on a block-by-block basis, and in some newer video coding standards, the concept of a block has been further extended. For example, a macroblock can be further divided into multiple prediction blocks (partitions) that can be used for predictive coding. Alternatively, basic concepts such as coding units (CUs), prediction units (PUs), and transform units (TUs) are used to functionally divide various block units, described using a novel tree-based structure. Similar tree structures exist for PUs and TUs. A PU corresponds to a prediction block and is the basic unit of predictive coding. A CU is further divided into multiple PUs according to a partitioning pattern. A TU corresponds to a transform block and is the basic unit for transforming the prediction residual. However, regardless of whether it's a CU, PU, or TU, they all essentially belong to the concept of a block (or image block).
[0060] Coding tree units (CUs) are split into multiple CUs using a quadtree structure represented as a coding tree. At the CU level, a decision is made on whether to use inter-picture (temporal) or intra-picture (spatial) prediction to encode picture regions. Each CU can be further split into one, two, or four PUs based on the PU splitting type. The same prediction process is applied within a PU, and relevant information is transmitted to the decoder based on the PU. After obtaining residual blocks by applying the prediction process based on the PU splitting type, the CUs can be divided into TUs according to other quadtree structures similar to those used for CUs. In recent developments in video compression technology, quadtree and binary tree (QTBT) partitioning of frames is used to divide coding blocks. In the QTBT block structure, CUs can be square or rectangular in shape.
[0061] In this paper, for ease of description and understanding, the image block to be encoded in the currently encoded image is referred to as the current block (or current image block). For example, in encoding, it refers to the block currently being encoded; in decoding, it refers to the block currently being decoded. The decoded image block in the reference image used to predict the current block is called the reference block. That is, the reference block is the block that provides a reference signal for the current block, where the reference signal represents the pixel value within the image block. The block in the reference image that provides the prediction signal for the current block can be called the prediction block, where the prediction signal represents the pixel value, sampled value, or sampled signal within the prediction block. For example, after traversing multiple reference blocks, an optimal reference block is found. This optimal reference block will provide prediction for the current block; this block is called the prediction block.
[0062] In lossless video coding, the original video images can be reconstructed, meaning the reconstructed video images have the same quality as the original (assuming no transmission loss or other data loss during storage or transmission). In lossy video coding, further compression is performed, for example, through quantization, to reduce the amount of data required to represent the video images. However, the decoder cannot fully reconstruct the video images, meaning the quality of the reconstructed video images is lower or worse than the original.
[0063] Several H.261 video coding standards fall under the category of "lossy hybrid video coding and decoding" (i.e., combining spatial and temporal prediction in the sample domain with 2D transform coding in the transform domain for applying quantization). Each frame in a video sequence is typically divided into a set of non-overlapping blocks, which are usually encoded at the block level. In other words, the encoder typically processes, i.e., encodes the video at the block (video block) level, for example, by generating prediction blocks through spatial (intra-frame) and temporal (inter-frame) predictions, subtracting the prediction blocks from the current block (the block currently being processed or yet to be processed) to obtain residual blocks, transforming and quantizing the residual blocks in the transform domain to reduce the amount of data to be transmitted (compressed), while the decoder applies the inverse processing relative to the encoder to the encoded or compressed blocks to reconstruct the current block for representation. Additionally, the encoder replicates the decoder processing loop, causing the encoder and decoder to generate the same predictions (e.g., intra-frame and inter-frame predictions) and / or reconstructions for processing, i.e., encoding subsequent blocks.
[0064] The system architecture used in the embodiments of this application is described below. See also Figure 1A , Figure 1A A schematic block diagram of the video encoding and decoding system 10 used in the embodiments of this application is provided as an example. Figure 1A As shown, the video encoding and decoding system 10 may include a source device 12 and a destination device 14. The source device 12 generates encoded video data; therefore, the source device 12 may be referred to as a video encoding device. The destination device 14 can decode the encoded video data generated by the source device 12; therefore, the destination device 14 may be referred to as a video decoding device. Various embodiments of the source device 12, the destination device 14, or both may include one or more processors and memory coupled to said one or more processors. The memory may include, but is not limited to, RAM, ROM, EEPROM, flash memory, or any other media that can be used to store desired program code in the form of computer-accessible instructions or data structures, as described herein.
[0065] A communication connection can be established between source device 12 and destination device 14 via link 13, through which destination device 14 can receive encoded video data from source device 12. Link 13 may include one or more media or devices capable of moving encoded video data from source device 12 to destination device 14. In one example, link 13 may include one or more communication media enabling source device 12 to transmit encoded video data directly to destination device 14 in real time. In this example, source device 12 may modulate the encoded video data according to a communication standard (e.g., a wireless communication protocol) and transmit the modulated video data to destination device 14. The one or more communication media may include wireless and / or wired communication media, such as radio frequency (RF) spectrum or one or more physical transmission lines. The one or more communication media may form part of a packet-based network, such as a local area network, wide area network, or global network (e.g., the Internet). The one or more communication media may include routers, switches, base stations, or other devices facilitating communication from source device 12 to destination device 14.
[0066] The source device 12 includes an encoder 20. Optionally, the source device 12 may also include an image source 16, an image preprocessor 18, and a communication interface 22. In specific implementations, the encoder 20, image source 16, image preprocessor 18, and communication interface 22 may be hardware components or software programs within the source device 12. These are described below:
[0067] Image source 16 may include or be any type of image capture device for, for example, capturing real-world images, and / or any type of image or commentary (for screen content encoding, some text on the screen is also considered part of the image or picture to be encoded) generation device, such as a computer graphics processor for generating computer-animated images, or any type of device for acquiring and / or providing real-world images, computer-animated images (e.g., screen content, virtual reality (VR) images), and / or any combination thereof (e.g., augmented reality (AR) images). Image source 16 may be a camera for capturing images or a memory for storing images. Image source 16 may also include any type of (internal or external) interface for storing previously captured or generated images and / or acquiring or receiving images. When image source 16 is a camera, image source 16 may be, for example, a local or integrated camera integrated into a source device; when image source 16 is a memory, image source 16 may be a local or, for example, integrated memory integrated into a source device. When the image source 16 includes an interface, the interface may be, for example, an external interface for receiving images from an external video source. The external video source may be, for example, an external image capture device, such as a camera, external storage, or an external image generation device. The external image generation device may be, for example, an external computer graphics processor, a computer, or a server. The interface may be any type of interface according to any proprietary or standardized interface protocol, such as a wired or wireless interface, or an optical interface.
[0068] An image can be viewed as a two-dimensional array or matrix of pixels. Pixels in the array are also called sampling points. The number of sampling points in the array or image along the horizontal and vertical directions (or axes) defines the image's size and / or resolution. To represent color, three color components are typically used; that is, an image can be represented as or contain three sampling arrays. For example, in RGB format or color space, an image includes corresponding red, green, and blue sampling arrays. However, in video coding, each pixel is typically represented in a luma / chroma format or color space. For example, for a YUV format image, this includes a luma component indicated by Y (sometimes also indicated by L) and two chroma components indicated by U and V. The luma component Y represents the brightness or grayscale level intensity (e.g., both are the same in grayscale images), while the two chroma components U and V represent chroma or color information components. Accordingly, a YUV format image includes a luma sampling array of luma sample values (Y) and two chroma sampling arrays of chroma values (U and V). An RGB format image can be converted or transformed to a YUV format, and vice versa; this process is also called color transformation or conversion. If the image is black and white, it may only include a luminance sampling array. In this embodiment, the image transmitted from image source 16 to image processor can also be referred to as raw image data 17.
[0069] Image preprocessor 18 is configured to receive raw image data 17 and perform preprocessing on the raw image data 17 to obtain a preprocessed image 19 or preprocessed image data 19. For example, the preprocessing performed by image preprocessor 18 may include retouching, color format conversion (e.g., from RGB format to YUV format), color correction, or noise reduction.
[0070] Encoder 20 (or video encoder 20) is used to receive preprocessed image data 19 and process the preprocessed image data 19 using a relevant prediction mode (such as the prediction mode in the various embodiments of this document), thereby providing encoded image data 21 (which will be further based on...). Figure 2 or Figure 4 or Figure 5 (Describe the structural details of encoder 20). In some embodiments, encoder 20 can be used to perform the various embodiments described below to implement the partitioning method described in this application on the encoding side.
[0071] Communication interface 22 can be used to receive encoded image data 21 and transmit the encoded image data 21 to destination device 14 or any other device (such as a memory) via link 13 for storage or direct reconstruction. The other device can be any device used for decoding or storage. Communication interface 22 can, for example, be used to encapsulate the encoded image data 21 into a suitable format, such as data packets, for transmission over link 13.
[0072] Destination device 14 includes decoder 30. Optionally, destination device 14 may also include communication interface 28, image post-processor 32, and display device 34. These are described below:
[0073] Communication interface 28 can be used to receive encoded image data 21 from source device 12 or any other source, such as a storage device, for example, an encoded image data storage device. Communication interface 28 can be used to transmit or receive encoded image data 21 via link 13 between source device 12 and destination device 14 or via any type of network, such as a direct wired or wireless connection, any type of network such as wired or wireless networks or any combination thereof, or any type of private and public network, or any combination thereof. Communication interface 28 can be used, for example, to decapsulate data packets transmitted by communication interface 22 to obtain encoded image data 21.
[0074] Both communication interface 28 and communication interface 22 can be configured as unidirectional or bidirectional communication interfaces, and can be used, for example, to send and receive messages to establish connections, acknowledge and exchange any other information related to the communication link and / or data transmission, such as encoded image data transmission.
[0075] Decoder 30 (or decoder 30) is used to receive encoded image data 21 and provide decoded image data 31 or decoded image 31 (hereinafter further based on...) Figure 3 or Figure 4 or Figure 5 (Description of structural details of decoder 30). In some embodiments, decoder 30 can be used to perform the various embodiments described below to implement the partitioning method described in this application on the decoding side.
[0076] Image post-processor 32 is used to perform post-processing on decoded image data 31 (also known as reconstructed image data) to obtain post-processed image data 33. The post-processing performed by image post-processor 32 may include: color format conversion (e.g., from YUV format to RGB format), color correction, retouching or resampling, or any other processing, and may also be used to transmit the post-processed image data 33 to display device 34.
[0077] Display device 34 is used to receive post-processed image data 33 to display the image to, for example, a user or viewer. Display device 34 can be or may include any class of displays for presenting reconstructed images, such as integrated or external displays or monitors. For example, the display may include a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro-LED display, liquid crystal on silicon (LCoS), a digital light processor (DLP), or any other class of display.
[0078] Although, Figure 1A Source device 12 and destination device 14 are illustrated as separate devices, but device embodiments may also include the functionality of both source device 12 and destination device 14, or both; that is, the functionality of source device 12 or its corresponding functionality and the functionality of destination device 14 or its corresponding functionality. In such embodiments, the functionality of source device 12 or its corresponding functionality and the functionality of destination device 14 or its corresponding functionality may be implemented using the same hardware and / or software, or using separate hardware and / or software, or any combination thereof.
[0079] Based on the description, it is obvious to those skilled in the art that the functionality of different units is different. Figure 1A The presence and (precise) division of the functionality of the source device 12 and / or destination device 14 shown may vary depending on the actual device and application. The source device 12 and destination device 14 may include any of a variety of devices, encompassing any category of handheld or stationary devices, such as laptops or notebooks, mobile phones, smartphones, tablets or tablet computers, cameras, desktop computers, set-top boxes, televisions, cameras, in-vehicle devices, display devices, digital media players, video game consoles, video streaming devices (e.g., content service servers or content distribution servers), broadcast receiver devices, broadcast transmitter devices, etc., and may or may not use any type of operating system.
[0080] Both encoder 20 and decoder 30 can be implemented as any of a variety of suitable circuits, such as one or more microprocessors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), discrete logic, hardware, or any combination thereof. If the technology is implemented in part in software, the device can store software instructions in a suitable non-transitory computer-readable storage medium, and one or more processors can be used to execute the instructions in hardware to perform the technology of this disclosure. Any of the foregoing (including hardware, software, combinations of hardware and software, etc.) can be considered as one or more processors.
[0081] In some cases, Figure 1A The video encoding and decoding system 10 shown is merely an example, and the technology of this application can be applied to video encoding setups (e.g., video encoding or video decoding) that do not necessarily involve any data communication between the encoding and decoding devices. In other instances, data may be retrieved from local storage, streamed over a network, etc. A video encoding device may encode data and store it in storage, and / or a video decoding device may retrieve data from storage and decode it. In some instances, encoding and decoding are performed by devices that do not communicate with each other but only encode data to storage and / or retrieve data from storage and decode the data.
[0082] See Figure 1B , Figure 1B It is included according to an exemplary embodiment. Figure 2 encoder 20 and / or Figure 3 The illustrated diagram shows an example of a video decoding system 40 with decoder 30. The video decoding system 40 can implement various combinations of technologies according to embodiments of this application. In the illustrated embodiments, the video decoding system 40 may include an imaging device 41, an encoder 20, a decoder 30 (and / or a video codec implemented by logic circuitry of a processing unit 46), an antenna 42, one or more processors 43, one or more memories 44, and / or a display device 45.
[0083] like Figure 1B As shown, the imaging device 41, antenna 42, processing unit 46, encoder 20, decoder 30, processor 43, memory 44, and / or display device 45 are capable of communicating with each other. As discussed, although the video decoding system 40 is illustrated with encoder 20 and decoder 30, in different instances, the video decoding system 40 may contain only encoder 20 or only decoder 30.
[0084] In some instances, antenna 42 can be used to transmit or receive encoded bitstreams of video data. Additionally, in some instances, display device 45 can be used to present video data. In some instances, logic circuitry can be implemented using processing unit 46. Processing unit 46 can include application-specific integrated circuit (ASIC) logic, a graphics processor, a general-purpose processor, etc. Video decoding system 40 can also include an optional processor 43, which can similarly include ASIC logic, a graphics processor, a general-purpose processor, etc. In some instances, logic circuitry can be implemented in hardware, such as dedicated video encoding hardware, while processor 43 can be implemented in general-purpose software, an operating system, etc. Furthermore, memory 44 can be any type of memory, such as volatile memory (e.g., static random access memory (SRAM), dynamic random access memory (DRAM), etc.) or non-volatile memory (e.g., flash memory, etc.). In a non-limiting instance, memory 44 can be implemented using cache memory. In some instances, logic circuitry can access memory 44 (e.g., for implementing an image buffer). In other instances, the logic circuitry and / or processing unit 46 may include memory (e.g., cache, etc.) for implementing image buffers, etc.
[0085] In some instances, the encoder 20 implemented via logic circuitry may include (e.g., implemented via processing unit 46 or memory 44) an image buffer and (e.g., implemented via processing unit 46) a graphics processing unit. The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include the encoder 20 implemented via logic circuitry to implement a reference... Figure 2 And / or any other encoder system or subsystem described herein, and the various modules discussed herein. Logic circuits may be used to perform the various operations discussed herein.
[0086] In some instances, decoder 30 can be implemented via logic circuitry in a similar manner to implement the reference. Figure 3 The decoder 30 and / or any other decoder system or subsystem described herein, and various modules discussed. In some instances, the logic circuit-implemented decoder 30 may include an image buffer (implemented via processing unit or memory 44) and a graphics processing unit (e.g., implemented via processing unit 46). The graphics processing unit may be communicatively coupled to the image buffer. The graphics processing unit may include the logic circuit-implemented decoder 30 to implement reference... Figure 3And / or the various modules discussed in any other decoder system or subsystem described herein.
[0087] In some instances, antenna 42 can be used to receive encoded bitstreams of video data. As discussed herein, the encoded bitstream may contain data related to encoded video frames, indicators, index values, mode selection data, etc., such as data related to coding partitions (e.g., transform coefficients or quantized transform coefficients, optional indicators, and / or data defining coding partitions). Video decoding system 40 may also include decoder 30 coupled to antenna 42 for decoding the encoded bitstream. Display device 45 is used to display the video frames.
[0088] It should be understood that, for the instances described with reference to encoder 20 in the embodiments of this application, decoder 30 can be used to perform the reverse process. Regarding signaling syntax elements, decoder 30 can be used to receive and parse such syntax elements, and accordingly decode the associated video data. In some examples, encoder 20 can entropy-encode syntax elements into an encoded video bitstream. In such instances, decoder 30 can parse such syntax elements and accordingly decode the associated video data.
[0089] It should be noted that the decoding method described in the embodiments of this application is mainly used in the decoding process, which exists in both the encoder 20 and the decoder 30.
[0090] See Figure 2 , Figure 2 A schematic / conceptual block diagram illustrating an example of an encoder 20 used to implement embodiments of this application is shown. Figure 2 In this example, encoder 20 includes a residual calculation unit 204, a transform processing unit 206, a quantization unit 208, an inverse quantization unit 210, an inverse transform processing unit 212, a reconstruction unit 214, a buffer 216, a loop filter unit 220, a decoded picture buffer (DPB) 230, a prediction processing unit 260, and an entropy coding unit 270. Prediction processing unit 260 may include inter-frame prediction unit 244, intra-frame prediction unit 254, and mode selection unit 262. Inter-frame prediction unit 244 may include a motion estimation unit and a motion compensation unit (not shown). Figure 2 The encoder 20 shown can also be called a hybrid video encoder or a video encoder based on a hybrid video codec.
[0091] For example, the residual calculation unit 204, transform processing unit 206, quantization unit 208, prediction processing unit 260, and entropy coding unit 270 form the forward signal path of the encoder 20, while the inverse quantization unit 210, inverse transform processing unit 212, reconstruction unit 214, buffer 216, loop filter 220, DPB 230, and prediction processing unit 260 form the backward signal path of the encoder, where the backward signal path of the encoder corresponds to the signal path of the decoder (see [link]). Figure 3 Decoder 30 in the middle.
[0092] Encoder 20 receives image 201 or image block 203 of image 201 via input 202, for example, images in an image sequence forming a video or video sequence. Image block 203 may also be referred to as current image block or image block to be encoded, and image 201 may be referred to as current image or image to be encoded (especially in video encoding when distinguishing the current image from other images, such as previously encoded and / or decoded images in the same video sequence, i.e., including the current image).
[0093] Embodiments of encoder 20 may include a partitioning unit ( Figure 2 (Not shown in the image) is used to divide image 201 into multiple blocks, such as image blocks 203, typically into multiple non-overlapping blocks. The partitioning unit can be used to apply the same block size and corresponding grid defining the block size to all images in a video sequence, or to change the block size between images, subsets, or groups of images, dividing each image into corresponding blocks.
[0094] In one instance, the prediction processing unit 260 of encoder 20 can be used to perform any combination of the above-described partitioning techniques.
[0095] As with image 201, image patch 203 is also, or can be considered as, a two-dimensional array or matrix of sampled points with sampled values, although its size is smaller than that of image 201. In other words, image patch 203 may include, for example, a single sampled array (e.g., a luminance array in the case of black and white image 201) or three sampled arrays (e.g., a luminance array and two chrominance arrays in the case of a color image) or any other number and / or type of array depending on the applied color format. The number of sampled points in the horizontal and vertical directions (or axes) of image patch 203 defines the size of image patch 203.
[0096] like Figure 2 The encoder 20 shown is used to encode the image 201 block by block, for example, to perform encoding and prediction for each image block 203.
[0097] The residual calculation unit 204 is used to calculate the residual block 205 based on the image block 203 and the prediction block 265 (other details of the prediction block 265 are provided below). For example, the residual block 205 is obtained in the sample domain by subtracting the sample value of the prediction block 265 from the sample value of the image block 203 on a sample-by-sample (pixel-by-pixel) basis.
[0098] The transform processing unit 206 applies a transform, such as a discrete cosine transform (DCT) or a discrete sine transform (DST), to the sample values of the residual block 205 to obtain transform coefficients 207 in the transform domain. The transform coefficients 207 can also be called transform residual coefficients and represent the residual block 205 in the transform domain.
[0099] Transform processing unit 206 can be used to apply integer approximations of DCT / DST, such as those specified for AVS, AVS2, and AVS3. These integer approximations are typically scaled by a certain factor compared to orthogonal DCT transforms. To maintain the norm of the residual blocks processed by the forward and inverse transforms, an additional scaling factor is applied as part of the transform process. The scaling factor is typically chosen based on certain constraints, such as a power of 2 for the shift operation, the bit depth of the transform coefficients, accuracy, and implementation cost. For example, a specific scaling factor can be specified on the decoder 30 side via, for example, the inverse transform processing unit 212 (and on the encoder 20 side via, for example, the corresponding inverse transform processing unit 212), and correspondingly, a corresponding scaling factor can be specified on the encoder 20 side via transform processing unit 206 for the forward transform.
[0100] Quantization unit 208 is used to quantize the transform coefficients 207, for example, by applying scalar quantization or vector quantization, to obtain quantized transform coefficients 209. Quantized transform coefficients 209 may also be referred to as quantized residual coefficients 209. The quantization process can reduce the bit depth associated with some or all of the transform coefficients 207. For example, n-bit transform coefficients can be rounded down to m-bit transform coefficients during quantization, where n is greater than m. The degree of quantization can be modified by adjusting the quantization parameter (QP). For example, for scalar quantization, different scales can be applied to achieve finer or coarser quantization. Smaller quantization step sizes correspond to finer quantization, while larger quantization step sizes correspond to coarser quantization. The appropriate quantization step size can be indicated by the QP. For example, the quantization parameter can be an index of a predefined set of appropriate quantization step sizes. For example, a smaller quantization parameter can correspond to fine quantization (smaller quantization step size), a larger quantization parameter can correspond to coarse quantization (larger quantization step size), and vice versa. Quantization can involve division by the quantization step size and a corresponding quantization or inverse quantization performed, for example, by inverse quantization 210, or it can involve multiplication by the quantization step size. According to some standard implementations such as AVS, AVS2, and AVS3, quantization parameters can be used to determine the quantization step size. Generally, the quantization step size can be calculated based on the quantization parameters using a fixed-point approximation of an equation involving division. Additional scaling factors can be introduced for quantization and dequantization to recover the norm of the residual block, which may have been modified due to the scaling used in the fixed-point approximation of the equations used for the quantization step size and quantization parameters. In one example implementation, the scaling of the inverse transform and dequantization can be combined. Alternatively, a custom quantization table can be used and transmitted from the encoder to the decoder via a signal, for example, in a bitstream. Quantization is a lossy operation, where the loss increases with the quantization step size.
[0101] The inverse quantization unit 210 is used to apply the inverse quantization of the quantization unit 208 to the quantized coefficients to obtain the dequantized coefficients 211. For example, it applies the inverse quantization scheme of the quantization scheme applied by the quantization unit 208 based on or using the same quantization step size as the quantization unit 208. The dequantized coefficients 211 can also be called the dequantized residual coefficients 211, corresponding to the transform coefficients 207, although the loss due to quantization is usually different from that of the transform coefficients.
[0102] The inverse transform processing unit 212 is used to apply the inverse transform of the transform applied by the transform processing unit 206, such as inverse DCT or inverse DST, to obtain the inverse transform block 213 in the sample domain. The inverse transform block 213 may also be referred to as the inverse transform dequantized block 213 or the inverse transform residual block 213.
[0103] Reconstruction unit 214 (e.g., summer 214) is used to add inverse transform block 213 (i.e. reconstructed residual block 213) to prediction block 265 to obtain reconstructed block 215 in the sample domain, for example, by adding the sample value of reconstructed residual block 213 to the sample value of prediction block 265.
[0104] Optionally, for example, buffer unit 216 (or simply "buffer" 216) of line buffer 216 is used to buffer or store reconstructed block 215 and corresponding sample values for, for example, intra-frame prediction. In other embodiments, the encoder can be used to perform any type of estimation and / or prediction, such as intra-frame prediction, using the unfiltered reconstructed block and / or corresponding sample values stored in buffer unit 216.
[0105] For example, embodiments of encoder 20 can be configured such that buffer unit 216 is used not only to store the reconstructed block 215 for intra-frame prediction 254, but also for loop filter unit 220 (in Figure 2 (not shown in the image), and / or, for example, such that buffer unit 216 and decoded image buffer unit 230 form a buffer. Other embodiments may be used to filter block 221 and / or blocks or samples from decoded image buffer 230 (not shown in the image), and / or, for example, such that buffer unit 216 and decoded image buffer unit 230 form a buffer. Figure 2 (Not shown in the image) is used as input or basis for intra-frame prediction 254.
[0106] Loop filter unit 220 (or simply "loop filter" 220) is used to filter the reconstructed block 215 to obtain the filtered block 221, thereby facilitating pixel transformation or improving video quality. Loop filter unit 220 is intended to represent one or more loop filters, such as a deblocking filter, a sample-adaptive offset (SAO) filter, or other filters such as a bilateral filter, an adaptive loop filter (ALF), or a sharpening or smoothing filter, or a co-filter. Although loop filter unit 220 is used in... Figure 2 The image shown is an in-loop filter, but in other configurations, the loop filter unit 220 may be implemented as a post-loop filter. The filtered block 221 may also be referred to as the filtered reconstructed block 221. The decoded image buffer 230 can store the reconstructed encoded block after the loop filter unit 220 performs the filtering operation on the reconstructed encoded block.
[0107] An embodiment of encoder 20 (correspondingly, loop filter unit 220) can be used to output loop filter parameters (e.g., sample adaptive offset information), for example, directly output or entropy encoded by entropy coding unit 270 or any other entropy coding unit, such that decoder 30 can receive and apply the same loop filter parameters for decoding.
[0108] The decoded picture buffer (DPB) 230 can be a reference picture memory for storing reference picture data for the encoder 20 to encode video data. The DPB 230 can be formed from any of a variety of memory devices, such as dynamic random access memory (DRAM) (including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM)) or other types of memory devices. The DPB 230 and buffer 216 can be provided by the same memory device or separate memory devices. In one example, the decoded picture buffer (DPB) 230 is used to store filtered block 221. The decoded picture buffer 230 can be further used to store other previously filtered blocks of the same current picture or different pictures, such as previously reconstructed pictures, for example, previously reconstructed and filtered blocks 221, and can provide complete previously reconstructed, i.e., decoded pictures (and corresponding reference blocks and samples) and / or partially reconstructed current pictures (and corresponding reference blocks and samples), for example, for inter-frame prediction. In one instance, if reconstructed block 215 can be reconstructed without in-loop filtering, the decoded picture buffer (DPB) 230 is used to store reconstructed block 215.
[0109] The prediction processing unit 260, also known as the block prediction processing unit 260, is used to receive or acquire image block 203 (current image block 203 of current image 201) and reconstructed image data, such as reference samples of the same (current) image from buffer 216 and / or reference image data 231 of one or more previously decoded images from decoded image buffer 230, and to process such data to make predictions, i.e., to provide prediction block 265 which can be inter-frame prediction block 245 or intra-frame prediction block 255.
[0110] The mode selection unit 262 can be used to select a prediction mode (e.g., intra-frame or inter-frame prediction mode) and / or the corresponding prediction block 245 or 255 used as prediction block 265 to compute residual block 205 and reconstructed block 215.
[0111] Embodiments of the mode selection unit 262 can be used to select a prediction mode (e.g., from those prediction modes supported by the prediction processing unit 260), which provides the best match or minimum residual (minimum residual means better compression in transmission or storage), or provides minimum signaling overhead (minimum signaling overhead means better compression in transmission or storage), or considers or balances both. The mode selection unit 262 can be used to determine the prediction mode based on rate distortion optimization (RDO), i.e., selecting the prediction mode that provides minimum RDO optimization, or selecting the prediction mode whose relevant rate distortion at least meets the prediction mode selection criteria.
[0112] The following will explain in detail the prediction processing performed by instances of encoder 20 (e.g., by prediction processing unit 260) and the mode selection performed (e.g., by mode selection unit 262).
[0113] As described above, encoder 20 is used to determine or select the best or optimal prediction mode from a (predetermined) set of prediction modes. The set of prediction modes may include, for example, intra-frame prediction modes and / or inter-frame prediction modes.
[0114] The intra-prediction mode set can include 35 different intra-prediction modes, such as non-directional modes like DC (or mean) mode and planar mode, or directional modes as defined in H.265, or it can include 67 different intra-prediction modes, such as non-directional modes like DC (or mean) mode and planar mode, or directional modes as defined in the developing H.266.
[0115] In possible implementations, the set of inter-frame prediction modes depends on the available reference image (i.e., at least a portion of the decoded image stored in the DBP 230 as described above) and other inter-frame prediction parameters, such as whether to use the entire reference image or only a portion of the reference image, such as a search window region surrounding the current block, to search for the best matching reference block, and / or whether to apply pixel interpolation such as half-pixel and / or quarter-pixel interpolation. The set of inter-frame prediction modes may include, for example, an advanced motion vector prediction (AMVP) mode and a merge mode. In specific implementations, the set of inter-frame prediction modes may include the control point-based AMVP mode improved in embodiments of this application, and an improved control point-based merge mode. In one instance, the intra-frame prediction unit 254 may be used to perform any combination of the inter-frame prediction techniques described below.
[0116] In addition to the prediction modes mentioned above, the embodiments of this application may also apply skip mode and / or direct mode.
[0117] The prediction processing unit 260 can be further used to divide the image patch 203 into smaller block partitions or sub-blocks, for example, by iteratively using quad-tree (QT) partitioning, binary-tree (BT) partitioning, or triple-tree (TT) or extended quad-tree (i.e., EQT) partitioning, or any combination thereof, and to perform prediction for each of the block partitions or sub-blocks, for example, wherein mode selection includes selecting the tree structure of the divided image patch 203 and selecting a prediction mode to be applied to each of the block partitions or sub-blocks.
[0118] Inter-frame prediction unit 244 may include motion estimation (ME) units. Figure 2 (not shown in the image) and motion compensation (MC) unit ( Figure 2 (Not shown in the image). The motion estimation unit is used to receive or acquire image block 203 (current image block 203 of current image 201) and decoded image 231, or at least one or more previously reconstructed blocks, such as reconstructed blocks of one or more other / different previously decoded images 231, to perform motion estimation. For example, a video sequence may include the current image and the previously decoded image 31, or in other words, the current image and the previously decoded image 31 may be part of an image sequence that forms a video sequence, or form that image sequence.
[0119] For example, encoder 20 can be used to select a reference block from multiple reference blocks of the same or different images in multiple other images, and send it to the motion estimation unit (…). Figure 2 (Not shown in the image) Provides a reference image and / or provides the offset (spatial offset) between the position (X, Y coordinates) of the reference block and the position of the current block as an inter-frame prediction parameter. This offset is also called a motion vector (MV).
[0120] The motion compensation unit is used to acquire inter-frame prediction parameters and perform inter-frame prediction based on or using these parameters to obtain inter-frame prediction block 245. (The motion compensation unit...) Figure 2Motion compensation performed (not shown) can involve extracting or generating prediction blocks based on motion / block vectors determined through motion estimation (possibly performing interpolation with subpixel accuracy). Interpolation filtering can generate additional pixel samples from known pixel samples, potentially increasing the number of candidate prediction blocks available for encoding picture blocks. Once the motion vector of the PU for the current picture block is received, the motion compensation unit 246 can locate the prediction block pointed to by the motion vector in a list of reference pictures. The motion compensation unit 246 can also generate syntax elements associated with blocks and video stripes for the decoder 30 to use when decoding picture blocks of the video stripe.
[0121] Specifically, the inter-frame prediction unit 244 can transmit syntax elements to the entropy coding unit 270. These syntax elements include inter-frame prediction parameters (e.g., indication information for selecting the inter-frame prediction mode for the current block prediction after traversing multiple inter-frame prediction modes). In some application scenarios, if there is only one inter-frame prediction mode, the inter-frame prediction parameters may not be carried in the syntax elements; in this case, the decoding end 30 can directly use the default prediction mode for decoding. It is understood that the inter-frame prediction unit 244 can be used to perform any combination of inter-frame prediction techniques.
[0122] Intra-prediction unit 254 is used to acquire, for example, image block 203 (current image block) of the same image and one or more previously reconstructed blocks, such as reconstructed adjacent blocks, for intra-prediction. For example, encoder 20 can be used to select an intra-prediction mode from a plurality of (predetermined) intra-prediction modes.
[0123] An embodiment of encoder 20 can be used to select an intra-prediction mode based on optimization criteria, such as based on minimum residual (e.g., providing an intra-prediction mode that most closely resembles the current image block 203) or minimum bitrate distortion.
[0124] Intra-prediction unit 254 is further configured to determine intra-prediction block 255 based on intra-prediction parameters as selected for the intra-prediction mode. In any case, after selecting the intra-prediction mode for the block, intra-prediction unit 254 is also configured to provide intra-prediction parameters to entropy coding unit 270, i.e., to provide information indicating the selected intra-prediction mode for the block. In one instance, intra-prediction unit 254 can be used to perform any combination of intra-prediction techniques.
[0125] Specifically, the intra-prediction unit 254 can transmit syntax elements to the entropy coding unit 270. These syntax elements include intra-prediction parameters (e.g., indication information for selecting the intra-prediction mode for the current block prediction after traversing multiple intra-prediction modes). In some application scenarios, if there is only one intra-prediction mode, the intra-prediction parameters may not be carried in the syntax elements; in this case, the decoder 30 can directly use the default prediction mode for decoding.
[0126] Entropy coding unit 270 is used to apply an entropy coding algorithm or scheme (e.g., variable length coding (VLC), context adaptive VLC (CAVLC), arithmetic coding, context adaptive binary arithmetic coding (CABAC), syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or other entropy coding methods or techniques) to one or all (or not to apply) of the quantized residual coefficients 209, inter-frame prediction parameters, intra-frame prediction parameters, and / or loop filter parameters to obtain encoded picture data 21 that can be output as, for example, an encoded bitstream 21, via output 272. The encoded bitstream can be transmitted to video decoder 30, or archived for later transmission or retrieval by video decoder 30. Entropy coding unit 270 can also be used to entropy code other syntax elements of the current video strip being encoded.
[0127] Other structural variations of the video encoder 20 can be used to encode video streams. For example, a non-transform-based encoder 20 can directly quantize the residual signal without a transform processing unit 206 for certain blocks or frames. In another embodiment, the encoder 20 may have a quantization unit 208 and an inverse quantization unit 210 combined into a single unit.
[0128] Specifically, in the embodiments of this application, the encoder 20 can be used to implement the encoding method described in the embodiments below.
[0129] It should be understood that other structural variations of the video encoder 20 can be used to encode the video stream. For example, for certain image blocks or frames, the video encoder 20 can directly quantize the residual signal without processing by the transform processing unit 206, and correspondingly, without processing by the inverse transform processing unit 212; or, for certain image blocks or frames, the video encoder 20 does not generate residual data, and correspondingly, without processing by the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210, and the inverse transform processing unit 212; or, the video encoder 20 can directly store the reconstructed image block as a reference block without processing by the filter 220; or, the quantization unit 208 and the inverse quantization unit 210 in the video encoder 20 can be combined. The loop filter 220 is optional, and for lossless compression coding, the transform processing unit 206, the quantization unit 208, the inverse quantization unit 210, and the inverse transform processing unit 212 are optional. It should be understood that, depending on the application scenario, the inter-frame prediction unit 244 and the intra-frame prediction unit 254 may be selectively enabled.
[0130] See Figure 3 , Figure 3 A schematic / conceptual block diagram illustrating an example of a decoder 30 for implementing embodiments of this application is shown. The video decoder 30 is used to receive encoded picture data (e.g., encoded bitstream) 21, for example, encoded by the encoder 20, to obtain a decoded picture 231. During the decoding process, the video decoder 30 receives video data from the video encoder 20, such as encoded video bitstreams representing picture blocks of encoded video stripes and associated syntax elements.
[0131] exist Figure 3 In one example, decoder 30 includes an entropy decoding unit 304, an inverse quantization unit 310, an inverse transform processing unit 312, a reconstruction unit 314 (e.g., a summer 314), a buffer 316, a loop filter 320, a decoded image buffer 330, and a prediction processing unit 360. Prediction processing unit 360 may include an inter-frame prediction unit 344, an intra-frame prediction unit 354, and a mode selection unit 362. In some instances, video decoder 30 can perform substantially the same functions as the referenced unit. Figure 2 The video encoder 20 describes the encoding passes as the inverse of the decoding passes.
[0132] Entropy decoding unit 304 is used to perform entropy decoding on encoded image data 21 to obtain, for example, quantization coefficients 309 and / or decoded encoded parameters. Figure 3(Not shown in the image), for example, any one or all of the (decoded) inter-frame prediction, intra-frame prediction parameters, loop filter parameters, and / or other syntax elements. The entropy decoding unit 304 is further configured to forward the inter-frame prediction parameters, intra-frame prediction parameters, and / or other syntax elements to the prediction processing unit 360. The video decoder 30 may receive syntax elements at the video strip level and / or video block level.
[0133] The inverse quantization unit 310 can function the same as the inverse quantization unit 110, the inverse transform processing unit 312 can function the same as the inverse transform processing unit 212, the reconstruction unit 314 can function the same as the reconstruction unit 214, the buffer 316 can function the same as the buffer 216, the loop filter 320 can function the same as the loop filter 220, and the decoded image buffer 330 can function the same as the decoded image buffer 230.
[0134] The prediction processing unit 360 may include an inter-frame prediction unit 344 and an intra-frame prediction unit 354, wherein the inter-frame prediction unit 344 may be functionally similar to the inter-frame prediction unit 244, and the intra-frame prediction unit 354 may be functionally similar to the intra-frame prediction unit 254. The prediction processing unit 360 is typically used to perform block prediction and / or obtain prediction blocks 365 from encoded data 21, and to receive or obtain prediction-related parameters and / or information about the selected prediction mode from, for example, an entropy decoding unit 304 (explicitly or implicitly).
[0135] When a video strip is encoded as an intra-coded (I) strip, the intra-prediction unit 354 of the prediction processing unit 360 generates a prediction block 365 for a picture block of the current video strip based on the intra-prediction mode of the signal representation and data from previously decoded blocks of the current frame or picture. When a video frame is encoded as an inter-coded (i.e., B or P) strip, the inter-prediction unit 344 (e.g., a motion compensation unit) of the prediction processing unit 360 generates a prediction block 365 for a video block of the current video strip based on motion vectors and other syntax elements received from the entropy decoding unit 304. For inter-frame prediction, a prediction block can be generated from a reference picture within a list of reference pictures. The video decoder 30 can construct a list of reference frames, list 0 and list 1, based on reference pictures stored in the DPB 330 using a default construction technique.
[0136] The prediction processing unit 360 is used to determine prediction information for video blocks of the current video slice by parsing motion vectors and other syntax elements, and to generate prediction blocks for the current video slice for proper decoding using the prediction information. In one embodiment of this application, the prediction processing unit 360 uses some received syntax elements to determine the prediction mode (e.g., intra-frame or inter-frame prediction), inter-frame prediction slice type (e.g., B-slice, P-slice, or GPB-slice) for the video blocks used to encode the video slice, the construction information of one or more of the reference picture lists for the slice, the motion vector for each inter-frame coded video block of the slice, the inter-frame prediction state of each inter-frame coded video block of the slice, and other information to decode the video blocks of the current video slice. In another embodiment of this disclosure, the syntax elements received by the video decoder 30 from the bitstream include syntax elements from one or more of the adaptive parameter set (APS), sequence parameter set (SPS), picture parameter set (PPS), or slice header.
[0137] The inverse quantization unit 310 can be used to inverse quantize (i.e., dequantize) the quantized transform coefficients provided in the bitstream and decoded by the entropy decoding unit 304. The inverse quantization process may involve using quantization parameters calculated by the video encoder 20 for each video block in the video strip to determine the degree of quantization to be applied and similarly determine the degree of inverse quantization to be applied.
[0138] The inverse transform processing unit 312 is used to apply an inverse transform (e.g., inverse DCT, inverse integer transform, or a conceptually similar inverse transform process) to the transform coefficients in order to generate a residual block in the pixel domain.
[0139] Reconstruction unit 314 (e.g., summer 314) is used to add inverse transform block 313 (i.e. reconstructed residual block 313) to prediction block 365 to obtain reconstructed block 315 in the sample domain, for example by adding the sample values of reconstructed residual block 313 to the sample values of prediction block 365.
[0140] Loop filter unit 320 (during or after the encoding loop) is used to filter the reconstructed block 315 to obtain the filtered block 321, thereby facilitating pixel transformation or improving video quality. In one example, loop filter unit 320 can be used to perform any combination of the filtering techniques described below. Loop filter unit 320 is intended to represent one or more loop filters, such as deblocking filters, SAO filters, or other filters, such as bilateral filters, ALF, or sharpening or smoothing filters, or cooperative filters. Although loop filter unit 320 is used in... Figure 3The loop filter unit 320 is shown as an in-loop filter, but in other configurations, it can be implemented as a post-loop filter.
[0141] The decoded video block 321 in the given frame or image is then stored in the decoded image buffer 330, which stores a reference image for subsequent motion compensation.
[0142] Decoder 30 is used, for example, to output decoded image 31 via output 332 for presentation to or viewing by the user.
[0143] Other variations of the video decoder 30 can be used to decode compressed bitstreams. For example, the decoder 30 can generate an output video stream without the loop filter unit 320. For example, the non-transform-based decoder 30 can directly inverse quantize the residual signal without the inverse transform processing unit 312 for certain blocks or frames. In another embodiment, the video decoder 30 may have an inverse quantization unit 310 and an inverse transform processing unit 312 combined into a single unit.
[0144] Specifically, in this embodiment, the decoder 30 is used to implement the decoding method described in the following embodiments.
[0145] It should be understood that other structural variations of the video decoder 30 can be used to decode the encoded video bitstream. For example, the video decoder 30 may generate an output video stream without processing by filter 320; or, for certain image blocks or frames, the entropy decoding unit 304 of the video decoder 30 may not decode the quantized coefficients, and accordingly, processing by the inverse quantization unit 310 and the inverse transform processing unit 312 is unnecessary. The loop filter 320 is optional; and for lossless compression, the inverse quantization unit 310 and the inverse transform processing unit 312 are optional. It should be understood that, depending on the application scenario, the inter-frame prediction unit and the intra-frame prediction unit may be selectively enabled.
[0146] It should be understood that in the encoder 20 and decoder 30 of this application, the processing result of a certain stage can be further processed and output to the next stage. For example, after the interpolation filtering, motion vector derivation or loop filtering stages, the processing result of the corresponding stage can be further clipped or shifted.
[0147] See Figure 4 , Figure 4 This is a schematic diagram of the structure of a video decoding device 400 (e.g., a video encoding device 400 or a video decoding device 400) provided in an embodiment of this application. The video decoding device 400 is suitable for implementing the embodiments described herein. In one embodiment, the video decoding device 400 may be a video decoder (e.g., ... Figure 1Adecoder 30) or video encoder (e.g. Figure 1A The encoder 20). In another embodiment, the video decoding device 400 may be the one described above. Figure 1A decoder 30 or Figure 1A One or more components in encoder 20.
[0148] The video decoding device 400 includes: an input port 410 and a receiving unit (Rx) 420 for receiving data; a processor, logic unit, or central processing unit (CPU) 430 for processing data; a transmitter unit (Tx) 440 and an output port 450 for transmitting data; and a memory 460 for storing data. The video decoding device 400 may also include photoelectric conversion components and electro-optical (EO) components coupled to the input port 410, receiver unit 420, transmitter unit 440, and output port 450 for the input or output of optical or electrical signals.
[0149] Processor 430 is implemented in both hardware and software. Processor 430 can be implemented as one or more CPU chips, cores (e.g., multi-core processors), FPGAs, ASICs, and DSPs. Processor 430 communicates with ingress port 410, receiver unit 420, transmitter unit 440, egress port 450, and memory 460. Processor 430 includes a decoding module 470 (e.g., encoding module 470 or decoding module 470). Encoding / decoding module 470 implements the embodiments disclosed herein to implement the partitioning methods provided by the embodiments of this application. For example, encoding / decoding module 470 implements, processes, or provides various encoding operations. Therefore, encoding / decoding module 470 provides a substantial improvement to the functionality of video decoding device 400 and affects the transitions of video decoding device 400 to different states. Alternatively, encoding / decoding module 470 can be implemented with instructions stored in memory 460 and executed by processor 430.
[0150] Memory 460 includes one or more disks, tape drives, and solid-state drives, which can be used as overflow data storage devices to store programs while they are selectively executed, and to store instructions and data read during program execution. Memory 460 can be volatile and / or non-volatile, and can be read-only memory (ROM), random access memory (RAM), ternary content-addressable memory (TCAM), and / or static random access memory (SRAM).
[0151] See Figure 5 , Figure 5 It is available as an exemplary embodiment. Figure 1AA simplified block diagram of device 500 comprising one or both of the source device 12 and the destination device 14. Device 500 can implement the technology of this application. In other words, Figure 5 This is a schematic block diagram illustrating one implementation of an encoding or decoding device (hereinafter referred to as decoding device 500) according to an embodiment of this application. The decoding device 500 may include a processor 510, a memory 530, and a bus system 550. The processor and memory are connected via the bus system. The memory stores instructions, and the processor executes the instructions stored in the memory. The memory of the decoding device stores program code, and the processor can call the program code stored in the memory to execute various video encoding or decoding methods described in this application, especially various novel decoding methods. To avoid repetition, detailed descriptions are omitted here.
[0152] In this embodiment, the processor 510 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0153] The memory 530 may include a ROM device or a RAM device. Any other suitable type of storage device may also be used as memory 530. Memory 530 may include code and data 531 accessed by processor 510 using bus 550. Memory 530 may further include an operating system 533 and an application program 535, which includes at least one program that allows processor 510 to execute the video encoding or decoding methods described in this application (especially the decoding methods described in this application). For example, application program 535 may include applications 1 to N, which further include a video encoding or decoding application (hereinafter referred to as a video decoding application) that executes the video encoding or decoding methods described in this application.
[0154] In addition to the data bus, the bus system 550 may also include a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as bus system 550 in the diagram.
[0155] Optionally, the decoding device 500 may also include one or more output devices, such as a display 570. In one example, the display 570 may be a haptic display that combines a display with a haptic unit capable of operatively sensing touch input. The display 570 may be connected to the processor 510 via a bus 550.
[0156] The following describes the key terms and technologies involved in the embodiments of this application to facilitate the reader's understanding:
[0157] CTU: An image is composed of multiple CTUs. A CTU typically corresponds to a square image region. A CTU contains both luma and chroma pixels within this image region, or only luma pixels, or only chroma pixels. The size of a CTU can be set to 64×64, but other values such as 128×128 or 256×256 are also possible. A 64×64 CTU is a rectangular pixel array containing 64 columns, with each column containing 64 pixels. The explanation for other CTU sizes is similar and will not be repeated here. A CTU can correspond to several syntax elements that indicate how to divide the CTU into at least one CU, and the information used to decode each CU to obtain the reconstructed image.
[0158] A Cubic Array (CU) typically corresponds to a rectangular region of size A×B, containing A×B luminance pixels and their corresponding chrominance pixels. Here, A is the width of the rectangle, and B is the height; A and B can be the same or different. The values of A and B are usually integer powers of 2, such as 128, 64, 32, 16, 8, 4, etc. A CU can be decoded to obtain a reconstructed image of an A×B rectangular region. Decoding typically includes prediction, inverse quantization, and inverse transform.
[0159] The partitioning method can be characterized by partition type and partition direction. The partition type can be a binary tree partition or an extended quadtree partition, etc. The partition direction can be vertical or horizontal. The horizontal direction is perpendicular to the edge containing the height of the current image patch. The vertical direction is perpendicular to the edge containing the width of the current image patch. Based on this, the partitioning method can be a horizontal binary tree partition, a vertical binary tree partition, a horizontal extended quadtree partition, or a vertical extended quadtree partition. Alternatively, the partitioning method can also be characterized solely by the partition type; for example, quadtree partition and quadtree partition type have the same meaning.
[0160] Binary Tree (BT): A tree-like structure where a node can be divided into two child nodes. In binary tree encoding methods, a node in a binary tree structure may not be divided, or it may be divided into two child nodes. Methods for dividing a node into two nodes include horizontal binary tree partitioning and vertical binary tree partitioning. Horizontal binary tree partitioning specifically involves dividing the region corresponding to a node into two equal-sized regions, each region corresponding to one node, such as... Figure 6 As shown in Figure (a), the vertical binary tree partitioning method is as follows: the region corresponding to a node is divided into two regions of equal size, left and right, with each region corresponding to one node, as shown in Figure (a). Figure 6 As shown in Figure (b) of the document.
[0161] Quadtree (QT): A tree-like structure where one node can be divided into four child nodes. The AVS video standard uses a quadtree-based CTU partitioning method. Specifically, the CTU is the root node, and each node corresponds to a square region. A node can remain unpartitioned (in which case its corresponding region is a CU), or it can be divided into four nodes at the next level, that is, the square region is divided into four square regions of the same size. The height and width of each square region after partitioning are half the height and width of the original region, and each region corresponds to one node. For example... Figure 6 As shown in Figure (c).
[0162] EQT (Extended Quadtree): A tree structure where a node can be divided into four child nodes. In EQT encoding, a node in an extended quadtree structure can be left undivided, or it can be divided into four child nodes at the next level. Methods for dividing a node into four child nodes include horizontal and vertical expansion quadtree partitioning. Specifically, the horizontal quadtree partitioning method involves first dividing the area corresponding to the node horizontally into three regions: upper, middle, and lower. Each region corresponds to one node, with the heights of the upper, middle, and lower regions being 1 / 4, 1 / 2, and 1 / 4 of the node's height, respectively. Then, the node in the middle region is further divided into two equal-sized regions, left and right, as shown below. Figure 6 As shown in Figure (d), the vertical expansion quadtree partitioning method is as follows: First, divide the area corresponding to each node vertically into three regions: left, middle, and right. Each region corresponds to one node, and the widths of the left, middle, and right regions are 1 / 4, 1 / 2, and 1 / 4 of the node height, respectively. Then, divide the node in the middle region into two regions of equal size, as shown in Figure (d). Figure 6 As shown in Figure (e).
[0163] The QTBT scheme is a cascaded approach combining QT and BT partitioning. Specifically, the CTU is first partitioned using QT, and the leaf nodes of the QT can then be further partitioned using BT, such as... Figure 7 As shown, the first-level coding tree is QT, and the second-level coding tree is BT. Figure 7 In the diagram on the right, each endpoint represents a node. Four solid lines connecting a node represent a quadtree partition, and two dashed lines connecting a node represent a binary tree partition. There are 13 leaf nodes from a to m, and each leaf node corresponds to one CTU. A "1" on a binary tree node indicates a vertical partition, and a "0" indicates a horizontal partition. A CTU is divided according to... Figure 7 Dividing the diagram on the right, we can obtain 13 CUs from a to m, as shown below. Figure 7 As shown in the left figure.
[0164] The QTBT scheme offers advantages such as more diverse CU shapes, allowing for better adaptation to local image content. In the AVS2 video coding standard, QT partitioning dictates that all CUs must be square, meaning the CU's width equals its height. The CU's width is the number of columns of pixels it contains, and its height is the number of rows. With BT partitioning, the CU's width and height can differ, for example, the width-to-height ratio can be 2, 4, 8, 16, 1 / 2, 1 / 4, 1 / 8, or 1 / 16. Under QTBT, the width and height of all CUs cannot be less than the side length of the smallest CU. The smallest CU size can be included in the SPS (Size of Partition), for example, the smallest CU can be set to 4×4.
[0165] Building upon the QTBT scheme, the AVS3 video coding standard proposed the EQT scheme. This means the first-level coding tree can be partitioned using QT, while the second-level coding tree can be partitioned using BT and EQT. More specifically, the CTU is the root node of the first-level coding tree, which is partitioned using QT, making the CTU a leaf node. Then, the leaf node of the first-level coding tree becomes the root node of the second-level coding tree, which can be further partitioned using the four methods mentioned above: horizontal BT, vertical BT, horizontal EQT, and vertical EQT, further dividing the leaf nodes of the first-level coding tree into leaf nodes of the second-level coding tree.
[0166] In the second-level coding tree, the encoder typically determines whether to partition the current image block (i.e., the current node) and, if so, which partitioning method to use, based on the minimum CU size principle and the minimum rate distortion optimization (RDO) principle. Specifically: First, based on the minimum CU size principle, the possible partitioning methods for the current image block are determined. This means that the size of each partitioned image block must be greater than or equal to the minimum CU size. If all candidate partitioning methods (i.e., horizontal BT partitioning, vertical BT partitioning, horizontal EQT partitioning, and vertical EQT partitioning) are not applicable, then the current image block cannot be partitioned. Otherwise, the RDO of not partitioning the current image block is calculated and compared with the RDO of using each possible partitioning method. If the RDO is the smallest when not partitioning, then the current image block will not be partitioned; if the RDO is the smallest when using a certain partitioning method, then that partitioning method will be used to partition the current image block subsequently. This method requires traversing all possible partitioning methods applicable to the current image block based on the minimum CU size principle to determine the appropriate partitioning method for the current image block. Therefore, the encoding complexity is high. Furthermore, if a certain partitioning method is chosen for the current image block, the bitstream carries information indicating the partitioning type and direction, resulting in significant bitstream transmission overhead.
[0167] Based on this, embodiments of this application provide a video encoding method and a corresponding decoding method. The technical solutions provided by the embodiments of this application are described in detail below with reference to the accompanying drawings.
[0168] like Figure 8 The diagram shown is a flowchart of a video decoding method provided in an embodiment of this application. Figure 8 The method shown includes the following steps:
[0169] S001: The decoder determines the block partitioning strategy of the current image block based on the relationship between the width and height of the current image block.
[0170] Specifically, when the video decoding method is a video encoding method, the decoder is specifically an encoder. When the video decoding method is a video decoding method, the decoder is specifically a decoder.
[0171] The current image block can be any image block in the process of dividing the image to be decoded. For example, any image block in the second-level coding tree.
[0172] A block partitioning strategy refers to the strategy used to obtain coded blocks based on the current image block. For example, the block partitioning strategy for the current image block may include: which partitioning methods are invalid for the current image block. Another example is: the target partitioning method used when partitioning the current image block.
[0173] Understandably, the decoder can determine the appropriate partitioning method for the current image block based on the minimum CU size principle. Therefore, in one possible implementation, the "minimum CU size principle" can be considered as part of the block partitioning strategy. In another possible implementation, the "minimum CU size principle" and the block partitioning strategy can be considered as two independent strategies. For ease of description, the latter will be used as an example in the following text.
[0174] S002: The decoder applies the block partitioning strategy to the current image block to obtain the encoded block.
[0175] A coding block can be considered a leaf node in a coding tree (such as the second-level coding tree in the EQT scheme). For a related explanation of coding blocks, please refer to the above text or existing technologies.
[0176] Specifically: If the decoder determines not to partition the current image block based on the block partitioning strategy (optionally, it can also be based on other strategies such as the minimum CU size principle and the minimum RDO principle), then the current image block can be used as a leaf node in the coding tree. In this case, the current image block can be used as a coding block.
[0177] If the decoder determines that the current image block needs to be divided based on a block partitioning strategy (optionally, it can also be based on other strategies such as the minimum CU size principle and the minimum RDO principle), then the resulting image blocks can be used as the current image block, and then S001 to S002 are executed, and so on, until no further partitioning of the current image block is required. At this point, the current image block is used as a leaf node in the coding tree. In this case, the current image block can be considered as a coding block.
[0178] S003: The decoder reconstructs the current image block by reconstructing the obtained coded block. The specific implementation of this step can be found in the description above, or in existing technologies.
[0179] In this technical solution, the block partitioning strategy of the current image block is conditionally determined to obtain the coded block. This helps to reduce the partitioning complexity and thus improve the video encoding and decoding performance.
[0180] The above S001 to S002 can be considered as the image block division method provided in the embodiments of this application. Hereinafter, through... Figures 9-12This application describes the image block division method provided in its embodiments.
[0181] like Figure 9 The diagram shown is a flowchart of an image block segmentation method provided in an embodiment of this application. Figure 9 The method shown includes the following steps:
[0182] S101: The encoder determines whether the width of the current image block is less than the product of the first threshold and the height of the current image block.
[0183] If not, proceed to S102. If yes, proceed to S103.
[0184] Optionally, the first threshold is the maximum value of the ratio of the long side length to the short side length of a node in an allowed coding tree (such as the second-level coding tree described above). Optionally, the first threshold is a value greater than 1, such as an integer greater than 1. Optionally, the first threshold is an integer power of 2, for example, the first threshold is 4, 8, or 16. It should be noted that, unless otherwise specified, the specific examples in the embodiments of this application are all illustrated with the first threshold being a value greater than 1.
[0185] S102: The encoder determines the first candidate set. The first candidate set is a set of legal partitioning methods for the current image block. The first candidate set does not include partitioning methods with a horizontal partitioning direction. That is, horizontal partitioning methods are invalid. Then, based on the first candidate set, it is determined whether to partition the current image block, and if so, the target partitioning method to be used.
[0186] If it is determined that the current image block should be divided, then execute S105.
[0187] If it is determined that the current image block should not be divided, then execute S108.
[0188] Specifically, the encoder can first determine the block partitioning strategy for the current image block, which includes whether or not horizontal partitioning is used. That is, if the current image block does not meet the first condition, the block partitioning strategy for the current image block excludes horizontal partitioning. The first condition includes the width of the current image block being less than the product of a first threshold and the height of the current image block. Then, based at least on this block partitioning strategy, a first candidate set is determined. For example, the encoder can determine the first candidate set based on the "minimum CU size principle" and this block partitioning strategy. Assuming that based on the "minimum CU principle," the partitioning methods applicable to the current image block include vertical binary tree partitioning, vertically extended quadtree partitioning, horizontal binary tree partitioning, and horizontally extended quadtree partitioning, then: the first candidate set can include vertical binary tree partitioning and vertically extended quadtree partitioning, but excludes horizontal binary tree partitioning and horizontally extended quadtree partitioning. In other words, the legal partitioning method for the current image block is vertical partitioning.
[0189] In one example, determining whether to partition the current image patch based on the candidate set, and if so, the target partitioning method, may include: calculating and comparing the Relative Displacement (RDO) when the current image patch is not partitioned with the RDO when partitioning using each possible partitioning method in the candidate set; if the RDO is minimized when not partitioning, then it is determined that the current image patch will not be partitioned; if the RDO is minimized when using a certain partitioning method in the candidate set, then that partitioning method is determined to be the target partitioning method. In another example, if the candidate set is empty, then it is determined that the current image patch will not be partitioned. In these two examples, the candidate set can be the first candidate set, or the second or third candidate set as described below.
[0190] Understandably, when the first threshold is greater than 1, the judgment result of S101 is "No," meaning the width of the current image patch is greater than or equal to the product of the first threshold and the height of the current image patch. This indicates that the width of the current image patch is the longer side, and the height is the shorter side. According to the description of S102, the encoder defaults to delimiting the partitioning method perpendicular to the shorter side (specifically, the height) of the current image patch as invalid. In specific implementations, the encoder and decoder can predefine that when the judgment result of S101 is "No," the partitioning method perpendicular to the shorter side (specifically, the height) of the current image patch is invalid.
[0191] S103: The encoder determines whether the height of the current image block in the image to be encoded is less than the product of the first threshold and the width of the current image block.
[0192] If not, proceed to S104. If yes, proceed to S106.
[0193] S104: The encoder determines the second candidate set. The second candidate set is a set of legal partitioning methods for the current image block. The second candidate set does not include partitioning methods with a vertical partitioning direction. That is, vertical partitioning methods are invalid. Then, based on the second candidate set, it is determined whether to partition the current image block, and if so, the target partitioning method to be used.
[0194] If it is determined that the current image block should be divided, then execute S105.
[0195] If it is determined that the current image block should not be divided, then execute S108.
[0196] Specifically, the encoder first determines the block partitioning strategy for the current image block, which includes whether or not vertical partitioning is used. That is, if the current image block does not meet the second condition, the block partitioning strategy for the current image block excludes vertical partitioning. The second condition includes that the height of the current image block is less than the product of a first threshold and the width of the current image block. Then, based at least on this block partitioning strategy, a second candidate set is determined. For example, the encoder can determine the second candidate set based on the "minimum CU size principle" and this block partitioning strategy. Assuming that based on the "minimum CU principle," the partitioning methods applicable to the current image block include vertical binary tree partitioning, vertically extended quadtree partitioning, horizontal binary tree partitioning, and horizontally extended quadtree partitioning, then: the second candidate set can include horizontal binary tree partitioning and horizontally extended quadtree partitioning, but excludes vertical binary tree partitioning and vertically extended quadtree partitioning. In other words, the legal partitioning method for the current image block is horizontal.
[0197] Understandably, when the first threshold is greater than 1, the judgment result of S103 is "No," meaning the height of the current image block is greater than or equal to the product of the first threshold and the width of the current image block. This indicates that the height of the current image block is the longer side, and the width is the shorter side. According to the description of S104, the encoder defaults to delineating the image block perpendicular to its shorter side (specifically, its width) as invalid. In specific implementations, the encoder and decoder can predefine that when the judgment result of S103 is "No," the delineation method perpendicular to the shorter side (specifically, its width) of the current image block is invalid.
[0198] S105: The encoder divides the current image block according to the target partitioning method. Furthermore, it encodes the first and second identifier information into the bitstream. The first identifier information indicates whether the current image block is partitioned (specifically, partitioning). The second identifier information indicates the partitioning type of the target partitioning method (e.g., binary tree partitioning or extended quadtree partitioning).
[0199] After executing S105, execute S109.
[0200] S106: The encoder determines the third candidate set. The third candidate set is a set of legal partitioning methods for the current image block. Then, based on the third candidate set, it determines whether to partition the current image block, and if so, the target partitioning method to be used.
[0201] If it is determined that the current image block should be divided, then execute S107.
[0202] If it is determined that the current image block should not be divided, then execute S108.
[0203] In practice, the encoder can determine the third candidate set based on the "minimum CU size principle". For example, the third candidate set may include horizontal binary tree partitioning, horizontal extended quadtree partitioning, vertical binary tree partitioning, and vertical extended quadtree partitioning.
[0204] It should be noted that the execution order of S101-S102 and S103-S104 is not critical. For example, the encoder can execute S103 first, and if the result of S103 is "yes", then execute S101; if the result of S103 is "no", then execute S104. Furthermore, if the result of S101 is "yes", then execute S106; if the result of S101 is "no", then execute S102.
[0205] Alternatively, the encoder may choose not to execute S101 to S102, or S103 to S104. For example, when S103 to S104 are not executed, the encoder may directly execute S106 if the judgment result of S101 is "yes".
[0206] S107: The encoder divides the current image block according to the target partitioning method. Furthermore, the first identifier information, the second identifier information, and the third identifier information are all encoded into the bitstream. The first identifier information indicates whether the current image block is partitioned (specifically, partitioning). The second identifier information indicates the partitioning type of the target partitioning method (e.g., binary tree partitioning or extended quadtree partitioning), and the third identifier information indicates the partitioning direction of the target partitioning method (e.g., horizontal or vertical).
[0207] After executing S107, execute S109.
[0208] S108: The encoder encodes the first identification information into the bitstream. The first identification information is used to indicate whether the current image block should be divided (specifically, whether it should be divided).
[0209] S109: The encoder sends the bitstream to the decoder.
[0210] It should be noted that the encoder can use the "divided image block" obtained after the division operation as the current image block and return to execute S101 to S109.
[0211] The video coding method provided in this embodiment conditionally determines the block partitioning strategy for the current image block. Compared with the partitioning method for nodes in the second-level coding tree in the existing EQT scheme, it can reduce partitioning complexity and thus improve coding efficiency. Furthermore, when the width of the current image block is greater than or equal to the product of a first threshold and its height, and / or the height of the current image block is greater than or equal to the product of a first threshold and its width, the default partitioning direction perpendicular to the short side of the current image block is invalid. Therefore, it is not necessary to encode information indicating the partitioning direction of the current image block into the bitstream, thus saving transmission bit overhead. In addition, this technical solution helps to limit the width-to-height ratio (or height-to-width ratio) of leaf nodes in the coding tree to a certain range, which helps to avoid "long and thin" nodes during the encoding process, thereby facilitating encoding.
[0212] like Figure 10 The diagram shown is a flowchart illustrating an image block segmentation method provided in an embodiment of this application. Figure 10 The video decoding method shown is the same as Figure 9 The video encoding method shown corresponds to the method described above; therefore, the explanation of the relevant content in this embodiment can be found by referring to the above. Figure 9 The example shown. Figure 10 The method shown includes the following steps:
[0213] S201: The decoder receives the bitstream from the encoder.
[0214] S202: The decoder parses the bitstream to obtain the first identification information, which is used to indicate whether the current image block is to be divided.
[0215] If the first identifier indicates that the current image block should not be divided, then the division process for the current image block ends. In this case, the current image block can be treated as a single coded block.
[0216] If the first identification information indicates that the current image block is to be divided, then the following S203 is executed.
[0217] S203: The decoder determines whether the width of the current image block is less than the product of the first threshold and the height.
[0218] If not, proceed to S204. If yes, proceed to S207.
[0219] S204: The decoder continues to parse the bitstream to obtain the second identification information, which is used to indicate the division type of the current image block; and uses the division type indicated by the second identification information to divide the current image block in a vertical direction.
[0220] After executing S204, the partitioning process for the current image block ends.
[0221] Specifically, when the judgment result of S203 is "no", the decoder can determine, based on this judgment result, that the block partitioning strategy of the current image block does not include partitioning in the horizontal direction. Then, based on this block partitioning strategy, the current image block is partitioned in the vertical direction using the partitioning type represented by the second identification information.
[0222] For example, the partitioning type represented by the second identifier information may include a binary tree partitioning type or an extended quadtree partitioning type, etc. If the partitioning type represented by the second identifier information is a binary tree partitioning type, then the current image block is partitioned into a vertical binary tree; if the partitioning type represented by the second identifier information is an extended quadtree partitioning type, then the current image block is partitioned into a vertical extended quadtree.
[0223] When the first threshold is greater than 1, the judgment result of S203 is "no", that is, the width of the current image block is greater than or equal to the product of the first threshold and the height, indicating that the width of the current image block is the long side and the height is the short side.
[0224] S205: The decoder determines whether the height of the current image block is less than the product of the first threshold and the width.
[0225] If not, proceed to S206. If yes, proceed to S207.
[0226] S206: The decoder continues to parse the bitstream to obtain the second identification information, which is used to indicate the division type of the current image block; and uses the division type indicated by the second identification information to divide the current image block in a horizontal direction.
[0227] After executing S206, the partitioning process for the current image block ends.
[0228] Specifically, when the judgment result of S205 is "no", the decoder can determine, based on this judgment result, that the current image block's block partitioning strategy does not include partitioning in the vertical direction. Then, based on this block partitioning strategy, the current image block is partitioned in the horizontal direction using the partitioning type represented by the second identifier information.
[0229] For example, the partitioning type represented by the second identifier information may include a binary tree partitioning type or an extended quadtree partitioning type, etc. If the partitioning type represented by the second identifier information is a binary tree partitioning type, then the current image block is partitioned into a horizontal binary tree; if the partitioning type represented by the second identifier information is an extended quadtree partitioning type, then the current image block is partitioned into a horizontal extended quadtree.
[0230] When the first threshold is greater than 1, the judgment result of S205 is "no", that is, the height of the current image block is greater than or equal to the product of the first threshold and the width, indicating that the height of the current image block is the long side and the width is the short side.
[0231] S207: The decoder continues to parse the bitstream to obtain second identification information and third identification information. The second identification information is used to indicate the partitioning type of the current image block and the third identification information is used to indicate the partitioning direction of the current image block. The current image block is partitioned according to the partitioning type indicated by the second identification information and the partitioning direction indicated by the third identification information.
[0232] After executing S207, the partitioning process for the current image block ends.
[0233] For example, if the partition type represented by the second identifier is a binary tree partition type, and the partition direction represented by the third identifier is a horizontal partition, then a horizontal binary tree partition is performed on the current image patch. Other examples are not listed here.
[0234] Specifically, the decoder can perform one bitstream parsing operation to obtain the second and third identification information. Alternatively, the decoder can perform one bitstream parsing operation to obtain the second identification information and another bitstream parsing operation to obtain the third identification information, and the two parsing steps can be performed in any order.
[0235] It should be noted that the execution order of S203-S204 and S205-S206 is not critical. For example, the decoder can execute S205 first, and if the result of S205 is "yes", then execute S203; if the result of S205 is "no", then execute S206. Furthermore, if the result of S203 is "yes", then execute S207; if the result of S203 is "no", then execute S204.
[0236] Alternatively, the decoder may choose not to execute S203-S204, or S205-S206. For example, when S205-S206 are not executed, the decoder can directly execute S207 if the judgment result of S203 is "yes". It is understandable that in a specific implementation, if the encoder executes S101-S102, the decoder executes S203-S204; if the encoder executes S103-S104, the decoder executes S205-S206.
[0237] It should be noted that the decoder can use the "divided image block" obtained after the division operation as the current image block to execute S202 to S207.
[0238] The video decoding method provided in this embodiment stipulates that when the width of the current image block is greater than or equal to the product of a first threshold and its height, and / or the height of the current image block is greater than or equal to the product of the first threshold and its width, the decoder's default partitioning direction is invalid if the partitioning method is perpendicular to the short side of the current image block. This eliminates the need for the encoder to encode information indicating the partitioning direction of the current image block into the bitstream, thus saving transmission bit overhead. Furthermore, this technical solution helps to limit the width-to-height ratio (or height-to-width ratio) of leaf nodes in the coding tree to a certain range, helping to avoid "long and thin" nodes during the encoding process, thereby facilitating encoding.
[0239] like Figure 11 The diagram shown is a flowchart illustrating an image block segmentation method provided in an embodiment of this application. The descriptions of the current image block, first identifier information, second identifier information, and third identifier information in this embodiment can be found above. Figure 11 The method shown includes the following steps:
[0240] S301: The encoder determines whether the width of the current image block is less than the product of the second threshold and the height of the current image block.
[0241] If not, proceed to S302. If yes, proceed to S303.
[0242] Optionally, the second threshold is half the maximum value of the ratio of the long side length to the short side length of a node in the allowed coding tree. Optionally, the second threshold is a value greater than 1, such as an integer greater than 1. Optionally, the second threshold is an integer power of 2, for example, the second threshold is 2, 4, or 8. It should be noted that, unless otherwise specified, the specific examples in the embodiments of this application are all illustrated with the second threshold being a value greater than 1.
[0243] S302: The encoder determines the first candidate set. The first candidate set is a set of legal partitioning methods for the current image patch. The first candidate set does not include horizontally oriented extended quadtree partitioning methods. That is, horizontally oriented extended quadtree partitioning methods are invalid. Then, based on the first candidate set, it is determined whether to partition the current image patch, and if so, the target partitioning method to be used.
[0244] If it is determined that the current image block should be divided, then execute S305.
[0245] If it is determined that the current image block should not be divided, then execute S308.
[0246] Specifically, the encoder can first determine the block partitioning strategy for the current image block, which includes or excludes horizontally oriented extended quadtree partitioning. That is, if the current image block does not meet the third condition, the block partitioning strategy for the current image block is determined to exclude horizontally oriented extended quadtree partitioning. The third condition includes the width of the current image block being less than the product of a second threshold and the height of the current image block. Then, based at least on this block partitioning strategy, a first candidate set is determined. For example, the encoder can determine the first candidate set based on the "minimum CU size principle" and this block partitioning strategy. Assuming that based on the "minimum CU principle," the partitioning methods applicable to the current image block include vertical binary tree partitioning, vertically oriented extended quadtree partitioning, horizontal binary tree partitioning, and horizontally oriented extended quadtree partitioning, then: the first candidate set can include horizontal binary tree partitioning, vertical binary tree partitioning, and vertically oriented extended quadtree partitioning, but excludes horizontally oriented extended quadtree partitioning.
[0247] S303: The encoder determines whether the height of the current image block in the image to be encoded is less than the product of the second threshold and the width of the current image block.
[0248] If not, execute S304; if yes, execute S306.
[0249] S304: The encoder determines the second candidate set. The second candidate set is a set of legal partitioning methods for the current image patch. The second candidate set does not include extended quadtree partitioning methods with a vertical partitioning direction. In other words, extended quadtree partitioning methods with a vertical partitioning direction are invalid. Then, based on the second candidate set, it is determined whether to partition the current image patch, and if so, the target partitioning method to be used.
[0250] If it is determined that the current image block should be divided, then execute S305.
[0251] If it is determined that the current image block should not be divided, then execute S308.
[0252] Specifically, the encoder can first determine the block partitioning strategy for the current image block, which includes or excludes vertically oriented extended quadtree partitioning. That is, if the current image block does not satisfy the fourth condition, the block partitioning strategy for the current image block is determined to exclude vertically oriented extended quadtree partitioning. The fourth condition includes that the height of the current image block is less than the product of a second threshold and the width of the current image block. Then, based at least on this block partitioning strategy, a second candidate set is determined. For example, the encoder can determine the second candidate set based on the "minimum CU size principle" and this block partitioning strategy. Assuming that based on the "minimum CU principle," the partitioning methods applicable to the current image block include vertical binary tree partitioning, vertically oriented extended quadtree partitioning, horizontal binary tree partitioning, and horizontally oriented extended quadtree partitioning, then: the second candidate set can include horizontal binary tree partitioning, vertical binary tree partitioning, and horizontally oriented extended quadtree partitioning, but excludes vertically oriented extended quadtree partitioning.
[0253] S305: The encoder divides the current image block according to the target partitioning method. And:
[0254] If the target partitioning method is a binary tree partitioning type, then the first identifier, the second identifier, and the third identifier are all encoded into the bitstream. The first identifier is used to indicate whether the current image block is partitioned (specifically, it is partitioned), the second identifier is used to indicate the partitioning type of the target partitioning method (specifically, a binary tree partitioning type), and the third identifier is used to indicate the partitioning direction of the target partitioning method (specifically, the horizontal or vertical direction).
[0255] If the target partitioning method is an extended quadtree partitioning type, then the first and second identifier information are encoded into the bitstream. The first identifier information is used to indicate whether the current image block is partitioned (specifically, it is partitioned), and the second identifier information is used to indicate the partitioning type of the target partitioning method (specifically, an extended quadtree partitioning type).
[0256] After executing S305, execute S309.
[0257] For S306 to S309, please refer to S106 to S109 above.
[0258] It should be noted that the encoder can use the "divided image block" obtained after the division operation as the current image block and return to execute S301 to S309.
[0259] In this embodiment, the encoder determines whether to divide the current image block, and the specific implementation of the target division method used when dividing can be referred to the above, and will not be repeated here.
[0260] It should be noted that the execution order of S301-S302 and S303-S304 is not critical. For example, the encoder can execute S303 first, and if the result of S303 is "yes", then execute S301; if the result of S303 is "no", then execute S304. Furthermore, if the result of S301 is "yes", then execute S306; if the result of S301 is "no", then execute S302.
[0261] Alternatively, the encoder may choose not to execute S301 to S302, or S303 to S304. For example, when S303 to S304 are not executed, the encoder may directly execute S306 if the judgment result of S301 is "yes".
[0262] The video coding method provided in this embodiment conditionally determines the block partitioning strategy for the current image block. Compared with the partitioning method for nodes in the second-level coding tree in the existing EQT scheme, it can reduce partitioning complexity and thus improve coding efficiency. Furthermore, when the width of the current image block is greater than or equal to the product of the second threshold and its height, and / or the height of the current image block is greater than or equal to the product of the second threshold and its width, the default partitioning direction, which is perpendicular to the short side of the current image block, is invalid (using an extended quadtree partitioning method). Therefore, when the partitioning type is extended quadtree partitioning, it is not necessary to encode information indicating the partitioning direction of the current image block into the bitstream, thus saving transmission bit overhead. In addition, this technical solution helps to limit the width-to-height ratio (or height-to-width ratio) of leaf nodes in the coding tree to a certain range, which helps to avoid "long and thin" nodes during the encoding process, thus facilitating encoding.
[0263] like Figure 12 The diagram shown is a flowchart illustrating an image block segmentation method provided in an embodiment of this application. Figure 12 The video decoding method shown is the same as Figure 11 The video encoding method shown corresponds to this. Figure 12 The method shown includes the following steps:
[0264] S401: The decoder receives the bitstream from the encoder.
[0265] S402: The decoder parses the bitstream to obtain the first identification information, which is used to indicate whether the current image block is to be divided.
[0266] If the first identification information indicates that the current image block is to be divided, then S403 is executed.
[0267] If the first identifier indicates that the current image block should not be divided, then the division process for the current image block ends.
[0268] S403: The decoder determines whether the width of the current image block is less than the product of the second threshold and the height of the current image block.
[0269] If not, proceed to S404. If yes, proceed to S405.
[0270] S404: The decoder continues to parse the bitstream to obtain the second identification information, which indicates the partitioning type of the current image block. Furthermore:
[0271] If the second identifier indicates that the current image block is to be partitioned into a binary tree, the decoder continues to parse the bitstream to obtain the third identifier, which indicates the partitioning direction of the current image block. When the third identifier indicates that the current image block is to be partitioned horizontally, a horizontal binary tree partition is performed. When the third identifier indicates that the current image block is to be partitioned vertically, a vertical binary tree partition is performed.
[0272] If the second identifier is used to indicate that the current image block is to be partitioned into an extended quadtree, then the current image block is to be partitioned into a vertically extended quadtree.
[0273] After executing S404, the partitioning process for the current image block ends.
[0274] S405: The decoder determines whether the height of the current image block is less than the product of the second threshold and the width of the current image block.
[0275] If not, proceed to S406. If yes, proceed to S407.
[0276] S406: The decoder continues to parse the bitstream to obtain the second identification information, which indicates the partitioning type of the current image block. Furthermore:
[0277] If the second identifier indicates that the current image block is to be partitioned into a binary tree, the decoder continues to parse the bitstream to obtain the third identifier, which indicates the partitioning direction of the current image block. When the third identifier indicates that the current image block is to be partitioned horizontally, a horizontal binary tree partition is performed. When the third identifier indicates that the current image block is to be partitioned vertically, a vertical binary tree partition is performed.
[0278] If the second identifier information is used to indicate that the current image block is to be partitioned into an extended quadtree, then the current image block is to be partitioned into an extended quadtree horizontally.
[0279] After executing S406, the partitioning process for the current image block ends.
[0280] S407: Refer to S207 above.
[0281] After executing S407, the partitioning process for the current image block ends.
[0282] It should be noted that the decoder can use the "divided image block" obtained after the division operation as the current image block to execute S402 to S407.
[0283] It should be noted that the execution order of S403-S404 and S405-S406 is not critical. For example, the decoder can execute S405 first, and if the result of S405 is "yes", then execute S403; if the result of S405 is "no", then execute S406. Furthermore, if the result of S403 is "yes", then execute S407; if the result of S403 is "no", then execute S404.
[0284] Alternatively, the decoder may choose not to execute S403-S404, or S405-S406. For example, when S405-S406 are not executed, the decoder can directly execute S407 if the judgment result of S403 is "yes". It is understandable that in a specific implementation, if the encoder executes S301-S302, the decoder executes S403-S404; if the encoder executes S303-S304, the decoder executes S405-S406.
[0285] In the video decoding method provided in this embodiment, when the width of the current image block is greater than or equal to the product of the second threshold and the height, and / or the height of the current image block is greater than or equal to the product of the second threshold and the width, the decoder's default partitioning direction is an invalid extended quadtree partitioning method perpendicular to the short side of the current image block. Thus, when the partitioning type is extended quadtree partitioning, the encoder does not need to encode information indicating the partitioning direction of the current image block into the bitstream, thereby saving transmission bit overhead. Furthermore, this technical solution helps to limit the width-to-height ratio (or height-to-width ratio) of leaf nodes in the coding tree to a certain range, helping to avoid "long and thin" nodes during the encoding process, thereby facilitating encoding.
[0286] like Figure 13 The diagram shown is a flowchart illustrating a video encoding method provided in an embodiment of this application. Figure 13 The method shown includes the following steps:
[0287] S501: The encoder determines whether the length of the longer side of the current image block in the image to be encoded is twice the length of the shorter side of the current image block.
[0288] If yes, then execute S502. If no, then execute S503.
[0289] S502: The encoder determines a first candidate set. The first candidate set includes binary tree partitions of the current image block with the partitioning direction perpendicular to the long side of the current image block. Based on the first candidate set, it is determined whether to partition the current image block. If it is determined that the current image block should be partitioned, then the current image block can be referred to as the image block to be partitioned.
[0290] If it is determined that the current image block should be divided, then S503 is executed.
[0291] If it is determined that the current image block should not be divided, then execute S506.
[0292] Specifically: when the width of the current image patch is the longer side and the height is the shorter side, the first candidate set includes vertical binary tree partitioning methods. When the width of the current image patch is the shorter side and the height is the longer side, the first candidate set includes horizontal binary tree partitioning methods.
[0293] S503: The encoder performs a binary tree partitioning of the current image block with the partitioning direction perpendicular to the long side of the current image block. Furthermore, it encodes the first identification information into the bitstream. The first identification information indicates whether the current image block is partitioned (specifically, whether it is partitioned).
[0294] After executing S503, execute S507.
[0295] S504~S507: Refer to S104~S107 above.
[0296] It should be noted that the encoder can use the "divided image block" obtained after the division operation as the current image block and then return to execute S501 to S507.
[0297] In the video encoding method provided in this embodiment, when the length of the longer side of the current image block is twice the length of the shorter side, if the current image block is to be divided, the encoder defaults to performing a binary tree partitioning with the partitioning direction perpendicular to the longer side of the current image block. This reduces partitioning complexity and improves encoding efficiency compared to the partitioning methods for nodes in the second-level coding tree in existing EQT schemes. Furthermore, if the current image block is partitioned, it is not necessary to encode information indicating the partitioning method (including partitioning type and direction) into the bitstream, thus saving transmission bit overhead. Additionally, performing a binary tree partitioning with the partitioning direction perpendicular to the longer side of the current image block can divide the current image block into two square image blocks. Compared to non-square rectangular image blocks, square image blocks are more likely to be partitioned into subsequent blocks, thus helping to improve the encoding accuracy of video images.
[0298] like Figure 14 The diagram shown is a flowchart illustrating a video decoding method provided in an embodiment of this application. Figure 14 The video decoding method shown is the same as Figure 13 The video encoding method shown corresponds to this. Figure 14 The method shown includes the following steps:
[0299] S601: The decoder receives the bitstream from the encoder.
[0300] S602: The decoder parses the bitstream to obtain first identification information, which is used to indicate whether to divide the current image block in the image to be decoded.
[0301] If the first identifier indicates that the current image block should not be divided, then the division process for the current image block ends.
[0302] If the first identification information indicates that the current image block is to be divided, then S603 is executed.
[0303] S603: The decoder determines whether the length of the longer side of the current image block is equal to twice the length of the shorter side of the current image block.
[0304] If yes, then execute S604. If no, then execute S605.
[0305] S604: The decoder performs a binary tree partitioning of the current image block with the partitioning direction perpendicular to the long side of the current image block.
[0306] After executing S604, the partitioning process for the current image block ends.
[0307] S605: Refer to S205 above.
[0308] It should be noted that the decoder can use the "divided image block" obtained after the division operation as the current image block to execute S602 to S605.
[0309] In the video decoding method provided in this embodiment, when the length of the longer side of the current image block is twice the length of the shorter side, if the current image block is to be divided, the decoder defaults to performing a binary tree partitioning with the partitioning direction perpendicular to the longer side of the current image block. In this way, the encoder does not need to encode information indicating the partitioning method (including partitioning type and partitioning direction) for the current image block into the bitstream, thus saving transmission bit overhead.
[0310] for Figure 13 or Figure 14 The embodiments shown below provide several optional implementation methods:
[0311] Optionally, the current image patch has a long side length of 2a pixels and a short side length of a pixels. Here, a is an integer, typically a power of 2. For example, the current image patch may have a long side length of 128 pixels and a short side length of 64 pixels.
[0312] Optionally, the short side length of the current image block is equal to the side size of the maximum transform unit (TU), or the short side length of the current image block is equal to the side size of the virtual pipeline data unit (VPDU).
[0313] In a hardware pipeline, a VPDU (Vertical Transform Unit) is defined as a non-overlapping unit in an image, with a size of a*a and sides of a pixels. In a hardware decoder, consecutive VPDUs are processed simultaneously in parallel by multiple pipelines. The size of a VPDU is roughly proportional to the buffer size in most pipeline stages, so keeping the VPDU size small is important. In most hardware decoders, the VPDU size can be set to the size of the largest transform unit. However, in the AVS3 video coding standard, expanding quadtree (EQT) and binary tree (BT) partitions can lead to an increase in VPDU size. To maintain a VPDU size of a*a (e.g., 64x64) for a luma sample, the same luma sample cannot span different VPDUs.
[0314] Optionally, the current image patch is a boundary image patch. Specifically, if one or more pixels in the current node exceed the current image boundary, the current node is said to exceed the image boundary, and in this case, the current node is a boundary image patch.
[0315] It should be noted that for any of the video decoding (including encoding and decoding) methods provided above, if the current image block is divided, the decoder can reconstruct the image block to be decoded based on the divided image block; if the current image block is not divided, the decoder can perform operations such as reconstructing the image block to be decoded based on the current image block. For specific implementation processes, please refer to existing technologies.
[0316] It should also be noted that, where there is no conflict, the at least two video coding methods described above (such as...) Figure 9 , Figure 11 or Figure 13 Some features in the described video coding method can be combined to form a new video coding method. Correspondingly, corresponding features in the video decoding methods corresponding to these at least two video coding methods can be combined to form a new video decoding method.
[0317] For example, when the second threshold is half of the first threshold, in one example, Figure 9 and Figure 11 The combined video encoding method can include:
[0318] If the ratio of the length of the long side to the length of the short side of the current image block is greater than or equal to the first threshold, then the legal division methods for the current image block do not include the division method in which the division direction of the current image block is perpendicular to the short side of the image block to be divided.
[0319] If the ratio of the length of the longer side to the length of the shorter side of the current image patch is less than the first threshold and greater than or equal to the second threshold, then the valid partitioning methods for the current image patch do not include the extended quadtree partitioning method where the partitioning direction of the current image patch is perpendicular to the shorter side of the image patch to be partitioned. It is understandable that, since the width and height of the current image patch are usually integer powers of 2, when both the second and first thresholds are integer powers of 2, "the ratio of the length of the longer side to the length of the shorter side of the current image patch is less than the first threshold and greater than or equal to the second threshold" is equivalent to "the ratio of the length of the longer side to the length of the shorter side of the current image patch is equal to the second threshold." For example, assuming the first threshold is 8 and the second threshold is 4, then "the ratio of the length of the longer side to the length of the shorter side is less than 8 and greater than or equal to 4" has only one possibility: the ratio of the length of the longer side to the length of the shorter side is equal to 4.
[0320] If the ratio of the length of the long side to the length of the short side of the current image block is less than the second threshold, then the legal partitioning methods for the current image block can include horizontal binary tree partitioning, vertical binary tree partitioning, horizontal extended quadtree partitioning, and vertical extended quadtree partitioning.
[0321] Other examples will not be listed one by one.
[0322] Based on any of the embodiments provided above, the specific implementation methods of the first identification information, the second identification information, and the third identification information are described below.
[0323] For example, if the current image patch is not divided, the first identification information can be the binary number "0". If the current image patch is divided, the first identification information can be the binary number "1".
[0324] For example, if the target partitioning method is a binary tree partitioning type, the second identifier can be a binary number "0". If the determined partitioning type is an extended quadtree partitioning type, the second identifier can be a binary number "1".
[0325] For example, if the division direction of the target is horizontal, the third identification information can be the binary number "0". If the determined division direction is vertical, the third identification information can be the binary number "1".
[0326] For example, the first identification information could be the information contained in the "split_flag" field in the bitstream.
[0327] For example, the second identification information could be the information contained in the "SplitMode" field of the bitstream. When SplitMode is 1, it indicates a binary tree partitioning type; when SplitMode is 0, it indicates an extended quadtree partitioning type. Of course, it is not limited to this.
[0328] For example, the third identification information could be the information contained in the "SplitDir" field of the bitstream. When SplitMode is 1, it indicates a vertical division; when SplitDir is 0, it indicates a horizontal division. Of course, this is not the only possibility.
[0329] The foregoing mainly describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the above functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0330] This application embodiment can divide the encoder / decoder into functional modules according to the above method example. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0331] like Figure 15 The diagram shown is a schematic block diagram of a video decoder 140 provided in an embodiment of this application. The video decoder 140 can specifically be an encoder or a decoder. When the video decoder 140 is an encoder, it can be used to execute any of the video encoding methods provided in the embodiments of this application, such as... Figure 9 , Figure 11 or Figure 13 The video encoding method shown. When the video decoder 140 is a decoder, the video decoder 140 can be used to execute any of the video decoding methods provided in the embodiments of this application, such as... Figure 10 , Figure 12 or Figure 14 The video decoding method shown.
[0332] The video decoder 140 may include a partitioning unit 1401 and a reconstruction unit 1402. Optionally, such as... Figure 16 As shown, when the video decoder 140 is specifically a video decoder, the video decoder may further include an entropy decoding unit 1403.
[0333] For example, the video decoder 140 could be Figure 2 In the encoder 20, the partitioning unit 1401 can be a sub-unit of the prediction processing unit 260, or it can be a unit connected to the prediction processing unit 260, the reconstruction unit 214 and the entropy coding unit 270; the reconstruction unit 1402 can be the reconstruction unit 214.
[0334] For example, video decoder 140 can be Figure 3 In the decoder 30, the partitioning unit 1401 can be a sub-unit of the prediction processing unit 360, or it can be a unit connected to the prediction processing unit 360, the reconstruction unit 314 and the entropy decoding unit 304; the reconstruction unit 1402 can be the reconstruction unit 314.
[0335] In some embodiments, the partitioning unit 1401 is configured to determine a block partitioning strategy for the current image block based on the width-to-height relationship of the current image block; and to apply the block partitioning strategy to the current image block to obtain a coded block. The reconstruction unit 1402 is configured to reconstruct the current image block by reconstructing the obtained coded block.
[0336] Optionally, the partitioning unit 1401 is specifically used to: determine whether the current image block meets the first condition, the first condition including: the width of the current image block is less than the product of the first threshold and the height of the current image block; when the current image block does not meet the first condition, determine that the partitioning strategy of the block is a partitioning in the vertical direction, the vertical direction being perpendicular to the direction of the edge where the width of the current image block is located.
[0337] Optionally, the partitioning unit 1401 is specifically used to: determine whether the current image block satisfies the second condition, the second condition including: the height of the current image block is less than the product of the first threshold and the width of the current image block; when the current image block does not satisfy the second condition, determine that the partitioning strategy of the block is a partitioning in the horizontal direction, the horizontal direction being perpendicular to the direction of the edge where the height of the current image block is located.
[0338] Optionally, the partitioning unit 1401 is specifically used to: determine whether the current image block satisfies a first condition, the first condition including: the width of the current image block is less than the product of a first threshold and the height of the current image block; when the current image block does not satisfy the first condition, determine that the block partitioning strategy of the current image block does not include partitioning in the horizontal direction, where the horizontal direction is perpendicular to the direction of the edge containing the height of the current image block. For example, combined with Figure 9 The partitioning unit 1401 can be used to execute S102 and S105. For example, combined with... Figure 10 The partitioning unit 1401 can be used to execute S203 and S204.
[0339] Optionally, the partitioning unit 1401 is specifically used to: determine whether the current image block satisfies a second condition, the second condition including: the height of the current image block is less than the product of a first threshold and the width of the current image block; when the current image block does not satisfy the second condition, determine that the block partitioning strategy of the current image block does not include partitioning in the vertical direction, the vertical direction being perpendicular to the direction of the edge containing the width of the current image block. For example, combined with Figure 9 The partitioning unit 1401 can be used to execute S103 and S104. For example, combined with... Figure 10 The partitioning unit 1401 can be used to execute S205 and S207.
[0340] Optionally, the entropy decoding unit 1403 can be used to parse the bitstream to obtain identification information, which indicates the partitioning type of the current image block. Correspondingly, the partitioning unit 1401 is specifically used to: based on the block partitioning strategy (specifically, the block partitioning strategy determined when the first condition is not met), and using the partitioning type indicated by the identification information, partition the current image block vertically to obtain a coded block. For example, combined with... Figure 10 The entropy decoding unit 1403 can be used to perform the parsing step in S204. The partitioning unit 1401 can be used to perform the partitioning step in S204.
[0341] Optionally, the entropy decoding unit 1403 can be used to parse the bitstream to obtain identification information, which indicates the partitioning type of the current image block. Correspondingly, the partitioning unit 1401 is specifically used to: based on the block partitioning strategy (specifically, the block partitioning strategy determined when the second condition is not met), and using the partitioning type indicated by the identification information, partition the current image block in a horizontal direction. For example, combined with... Figure 10 The entropy decoding unit 1403 can be used to perform the parsing step in S207. The partitioning unit 1401 can be used to perform the partitioning step in S207.
[0342] Optionally, the first threshold is the maximum value of the ratio of the long side length to the short side length of a node in the allowed coding tree.
[0343] Optionally, the first threshold is a value greater than 1. Optionally, the first threshold is an integer power of 2.
[0344] Optionally, the partitioning unit 1401 is specifically used to: determine whether the current image block satisfies the third condition, the third condition including: the width of the current image block is less than the product of the second threshold and the height of the current image block; when the current image block does not satisfy the third condition, determine that the partitioning strategy of the block is an extended quadtree partitioning with the partitioning direction in the vertical direction, the vertical direction being perpendicular to the direction of the edge where the width of the current image block is located.
[0345] Optionally, the partitioning unit 1401 is specifically used to: determine whether the current image block satisfies the fourth condition, the fourth condition including: the height of the current image block is less than the product of the second threshold and the width of the current image block; when the current image block does not satisfy the fourth condition, determine that the partitioning strategy of the block is an extended quadtree partitioning with the partitioning direction in the horizontal direction, the horizontal direction being perpendicular to the direction of the edge where the height of the current image block is located.
[0346] Optionally, the partitioning unit 1401 is specifically used to: determine whether the current image block satisfies the third condition, the third condition including: the width of the current image block is less than the product of the second threshold and the height of the current image block; when the current image block does not satisfy the third condition, determine that the block partitioning strategy of the current image block does not include the extended quadtree partitioning with the partitioning direction in the horizontal direction, and the horizontal direction is perpendicular to the direction of the edge where the height of the current image block is located. For example, combined with Figure 11 The partitioning unit 1401 can be used to execute steps S301 and S302, including determining the first candidate set. For example, combined with... Figure 12 The partitioning unit 1401 can be used to perform the partitioning step in S404 when the second identification information is used to indicate the expansion quadtree partitioning of the current image block.
[0347] Optionally, the partitioning unit 1401 is specifically used to: determine whether the current image block satisfies the fourth condition, the fourth condition including: the height of the current image block is less than the product of the second threshold and the width of the current image block; when the current image block does not satisfy the fourth condition, determine that the block partitioning strategy of the current image block does not include the extended quadtree partitioning with the partitioning direction in the vertical direction, the vertical direction being perpendicular to the direction of the edge containing the width of the current image block. For example, combined with Figure 11 The partitioning unit 1401 can be used to execute steps S303 and S304, including determining the second candidate set. For example, combined with... Figure 12 The partitioning unit 1401 can be used to perform the partitioning step in S406 when the second identification information is used to indicate the expansion quadtree partitioning of the current image block.
[0348] Optionally, the entropy decoding unit 1403 can be used to parse the bitstream to obtain identification information, which indicates the partitioning type of the current image block. Correspondingly, the partitioning unit 1401 is specifically used to: based on the block partitioning strategy (specifically, the block partitioning strategy determined when the third condition is not met), when the identification information indicates that the current image block is to be partitioned into an extended quadtree, perform an extended quadtree partitioning of the current image block with the partitioning direction in the vertical direction. For example, combined with... Figure 12 The entropy decoding unit 1403 can be used to execute the parsing step in S404 when the second identification information is used to indicate the expansion quadtree partitioning of the current image block, and the partitioning unit 1401 can be used to execute the partitioning step in S404 when the second identification information is used to indicate the expansion quadtree partitioning of the current image block.
[0349] Optionally, the entropy decoding unit 1403 can be used to parse the bitstream to obtain identification information, which indicates the partitioning type of the current image block. Correspondingly, the partitioning unit 1401 is specifically used to: based on the block partitioning strategy (specifically, the block partitioning strategy determined when the fourth condition is not met), when the identification information indicates that the current image block is to be partitioned into an extended quadtree, perform an extended quadtree partitioning of the current image block with the partitioning direction being horizontal. For example, combined with... Figure 12 The entropy decoding unit 1403 can be used to execute the parsing step in S406 when the second identification information is used to indicate that the current image block is to be partitioned into an extended quadtree. The partitioning unit 1401 can be used to execute the partitioning step in S406 when the second identification information is used to indicate that the current image block is to be partitioned into an extended quadtree.
[0350] Optionally, the second threshold is half the maximum value of the ratio of the long side length to the short side length of a node in the allowed coding tree.
[0351] Optionally, the second threshold is a value greater than 1. Optionally, the second threshold is an integer power of 2.
[0352] In other embodiments, the partitioning unit 1401 is configured to perform binary tree partitioning of the image block to be partitioned, with the partitioning direction perpendicular to the long side of the image block to be partitioned, if the length of the long side of the image block to be partitioned in the image to be decoded is twice the length of the short side of the image block to be partitioned, to obtain the partitioned image blocks. The reconstruction unit 1402 is configured to reconstruct the image to be decoded based on the partitioned image blocks. For example, combined with Figure 13 The partitioning unit 1401 can be used to perform the partitioning operation in S503. For example, combined with... Figure 14 The partitioning unit 1401 can be used to execute S604.
[0353] Optionally, the longer side of the image block to be divided is 128 pixels and the shorter side is 64 pixels.
[0354] Optionally, the short side length of the image block to be divided is equal to the side size of the maximum transform unit (TU), or the short side length of the image block to be divided is equal to the side size of the virtual pipeline data unit (VPDU).
[0355] Optionally, the image patch to be divided is a boundary image patch.
[0356] It is understood that each module in the video decoder 140 provided in this application embodiment is a functional entity that implements the various execution steps included in the corresponding methods provided above, that is, a functional entity that has the ability to fully implement each step in the embodiments of this application as well as the extension and variation of these steps. For details, please refer to the description of the corresponding methods above. For the sake of brevity, this article will not repeat it.
[0357] It should be noted that for the EQT scheme, since the nodes of the second-level coding tree can be partitioned using BT and EQT, encoding a single node requires trying a maximum of four partitions, and its child nodes can also try a maximum of four partitions, resulting in high encoding complexity. Therefore, this invention provides a new CU partitioning method and apparatus to reduce the complexity of system CU partitioning.
[0358] This invention applies to video codecs. Video communication systems, such as... Figure 17 As shown. The communication system includes a source device 12 and a receiver 14, and a connecting line 15 between them. The source device includes a video memory 16, a video encoder 18, a transmitter 20, and a video capture device 23. The receiver 14 includes a receiver 22, a video decoder 24, and a display device 26. The present invention relates to the video encoder 18 and the video decoder 24.
[0359] Example 1 relates to a video decoding method.
[0360] Based on the encoding information of at least one CTU in the compressed bitstream, a decoding operation is performed on the CTU to obtain the reconstructed image block of the CTU. When decoding a CTU, CU parsing processing (steps 1 and 2) and CU decoding processing (step 3) are performed on each CU, ultimately obtaining all the reconstructed pixels of the CTU. Step 2 is the key to this invention, while steps 1 and 3 are existing technologies. The flowchart is as follows: Figure 18 As shown.
[0361] The size of a CTU can be 64×64, 128×128, or 256×256, etc. A CTU is divided into a group of non-overlapping CUs, which cover the entire CTU; a group of CUs includes one or more CUs. A CU contains N rows and M columns of luma pixels, or N rows and M columns of chroma pixels, or N rows and M columns of luma pixels and N / 2 rows and M / 2 columns of chroma pixels (e.g., YUV420 format), or N rows and M columns of luma pixels and N rows and M columns of chroma pixels (e.g., YUV444 format), or N rows and M columns of RGB pixels (e.g., RGB format). Where N and M are integer powers of 2.
[0362] Step 1: Using CTU as the root node of the first-level coding tree, parse the partitioning information of the first-level coding tree to obtain the leaf nodes of the first-level coding tree. The partitioning method of the first-level coding tree is either QT partitioning or no partitioning.
[0363] This step is based on existing technology, such as the process of dividing the CTU into QT leaf nodes in the AVS scheme. More specifically, it includes: taking the CTU as the root node, parsing the bitstream to obtain the syntax element SplitFlag. If SplitFlag is 0, the node is a first-level coding tree leaf node; otherwise, the node is divided into four child nodes on the first-level coding tree according to the quadtree partitioning method, with the width and height of each child node being half of the node itself. For each child node, the bitstream is parsed to obtain the syntax element SplitFlag to determine whether this node is a first-level coding tree leaf node; if not, the quadtree partitioning continues; and so on, until the width of the node equals the threshold MinQTSize (e.g., 4), at which point this node is defaulted to a first-level coding tree leaf node, and SplitFlag defaults to 0.
[0364] Step 2: Using the leaf nodes of the first-level coding tree as the root node of the second-level coding tree, parse the information of the second-level coding tree to obtain the leaf nodes of the second-level coding tree, and parse the coding units (CUs) corresponding to the leaf nodes of the second-level coding tree. The partitioning methods of the second-level coding tree include two types of binary tree partitioning (horizontal and vertical) and two types of extended quadtree partitioning (horizontal and vertical). In the node partitioning methods, if the size of a node is 64×128 or 128×64, then the node is divided into two 64×64 sub-blocks by default or not divided at all.
[0365] The partitioning method of the second-level coding tree is different from that of the first-level coding tree. For example, in this embodiment, the second-level coding tree contains 4 partitioning methods, while the first-level coding tree contains 1 partitioning method.
[0366] The above-mentioned "analysis of the coding unit CU corresponding to the leaf node of the second-level coding" is existing technology, and the coding unit analysis in the AVS standard can be referred to. This invention does not limit it.
[0367] "Parsing the second-level coding tree information and obtaining the leaf nodes of the second-level coding tree" includes:
[0368] Parse the STSplitMode partitioning information of each node in the second-level coding tree;
[0369] If the partitioning information indicates that the node is not partitioned (e.g., STSplitMode=0), then the node is a second-level encoded leaf node;
[0370] If the partitioning information indicates that the node is to be partitioned into a binary tree (e.g., STSplitMode = 1 or 2), then one of the partitioning methods indicated by the partitioning information is selected to divide the node into 2 child nodes. For each child node, its partitioning information is parsed in turn to determine its partitioning method. For example, when STSplitMode = 1, the partitioning information indicates that the node is to be partitioned into a horizontal binary tree, dividing the node into 2 horizontal child nodes; when STSplitMode = 2, the partitioning information indicates that the node is to be partitioned into a vertical binary tree, dividing the node into 2 vertical child nodes.
[0371] If the partitioning information indicates that the node is to be partitioned into an extended quadtree (e.g., STSplitMode=3 or 4), then one of the partitioning methods indicated by the partitioning information is selected to divide the node into 4 child nodes, and for each child node, its partitioning information is parsed in turn to determine its partitioning method; when STSplitMode=3, the partitioning information indicates that the node is to be partitioned into a horizontally extended quadtree; when STSplitMode=4, the partitioning information indicates that the node is to be partitioned into a vertically extended quadtree.
[0372] It should be understood that STSplitMode and its value are only used to represent different partitioning modes. Using other distinguishable representations (e.g., using different codewords) is also within the scope of protection of this invention.
[0373] In this invention, determining the node partitioning method means determining whether the node should not be partitioned or should continue to be partitioned, and if it should continue to be partitioned, which partitioning method should be used.
[0374] In this invention, a partitioning constraint for nodes in an extended quadtree is added, namely, "if any side of a node has a length greater than 32, then the node will not be partitioned into an extended quadtree by default".
[0375] The leaf nodes of the second-level coding tree correspond to a coding unit (CU). The coding unit syntax structure in the bitstream (such as the coding_unit() syntax structure in H.265) is parsed to obtain the coding information of the CU, including the prediction mode, transform coefficients, and other information of the CU.
[0376] Preferably, in step 2 above, the determination of the second-level encoded leaf nodes and the parsing of the encoding units can be performed alternately. More specifically: after obtaining a second-level encoded leaf node, the encoding unit information corresponding to this node is parsed; after parsing the encoding unit information, the next second-level encoded leaf node is obtained and the encoding unit information of this leaf node is parsed; and so on, until the last second-level encoded leaf node in the first-level encoded leaf nodes.
[0377] Step 3: Based on the encoding information of each CU determined in Step 2, decode and reconstruct each CU to obtain the reconstructed pixels of each CU, thereby obtaining the reconstructed image of the CTU.
[0378] CU decoding includes entropy decoding, inverse quantization, inverse transform, prediction, and loop filtering. The process mainly includes:
[0379] Entropy decoding is used to obtain the CU's prediction mode, quantization parameters, transform coefficients, transform mode and other encoding information;
[0380] Based on the prediction mode, intra-frame prediction or inter-frame prediction is selected to obtain the predicted pixels of the CU.
[0381] If the CU has transform coefficients, then based on the quantization parameters and transform mode, the transform coefficients are dequantized and detransformed to obtain the reconstruction residual of the CU. If the CU has no transform coefficients, then the reconstruction residual of the CU is 0, meaning that the reconstruction residual value of each pixel in the CU is 0.
[0382] The predicted pixels and the reconstructed residuals are added together and then subjected to loop filtering to obtain the reconstructed pixels of the CU.
[0383] The decoding device corresponding to this invention may include two modules:
[0384] The coding tree node parsing module completes steps 1 and 2, namely parsing the bitstream, determining the partitioning method of each node on the coding tree, obtaining the way the CTU is divided into CUs and the encoding information of each CU. Specifically, if the node size is 64×32 or 32×64, the node is either divided into two 32×32 sub-blocks by default or not divided at all.
[0385] The CU decoding module completes the processing in step 3, that is, it decodes each CU to obtain the reconstructed image of the CTU.
[0386] Technical effects of Embodiment 1 of the present invention
[0387] In Embodiment 1 of the present invention, by defining a specific partitioning method for a specific block (64×32 or 32×64), the partitioning of the CTU can be made more detailed, which can reduce the complexity of CTU partitioning (multiple partitioning methods are reduced to one partitioning method) and also increase the possibility of improving processing accuracy (the 32×32 block has a higher possibility of being further partitioned).
[0388] Embodiment 2 of the present invention
[0389] Example 2 is an extension of Example 1.
[0390] In Example 2, if the width, height, and ratio of the long side to the short side of a node meet certain conditions (i.e., invalid conditions), the node is considered to be divided in an invalid way (i.e., the way the node is divided is actually not allowed to be used).
[0391] For example, a node is considered invalid by default if at least one of the following invalid conditions is met.
[0392] 1) If the ratio of the longer side to the shorter side of a node is greater than the threshold minRatio, the node is considered invalid. The threshold can be an integer greater than or equal to 1, such as 4.
[0393] 2) If the edge length of a node is less than the threshold minCUSize, the node is considered not to be partitioned. Here, minCUSize is called the minimum CU edge length, for example, equal to 4.
[0394] The threshold values for each of the above conditions can be specified in the higher-level syntax or preset to default values.
[0395] Specifically, if the child nodes obtained after applying a certain partitioning method to the current node satisfy any of the illegal conditions, then this partitioning method cannot be applied to the current node. Therefore, based on the restriction of illegal conditions, the number of syntax elements that need to be parsed can be further reduced.
[0396] Specifically, if the ratio of the parent node's long side to its short side equals the threshold minRatio, then the short side cannot be further divided into child nodes. In one example, this threshold minRatio can correspond to the first threshold mentioned above. For example, if the ratio of the parent node's width to its height equals the threshold 4, then horizontal division cannot continue because if horizontal division is performed: in the case of horizontal BT division, the ratio of the child node's width to its height will be equal to 8, exceeding the threshold 4, which is invalid; in the case of horizontal EQT division, the ratio of the child node's width to its height will be equal to 16, exceeding the threshold 4, which is also invalid. However, as long as the child node does not meet other invalid conditions, vertical division can still be performed. Therefore, in this case, in Example 1, it is not necessary to parse the division cases of STSplitMode=1 and STSplitMode=3; it is only possible that STSplitMode=2 or STSplitMode=4. In Example 3, it is only necessary to parse the value of BTSplitMode or EQTSplitMode to deduce the values of BtSplitDir and EqtSplitDir, without needing to parse the values of BtSplitDir and EqtSplitDir separately. Specifically, if BTSplitMode = 1 is parsed, then BtSplitDir = 1 can be inferred; if BTSplitMode = 1 is parsed, then EqtSplitDir = 1 can be inferred.
[0397] Similarly, it can be deduced that when dividing child nodes:
[0398] If the length of the short side of a parent node is equal to the threshold minCUSize, then it can only be BT-split on the long side; that is, when it is determined that the length of the short side of the current node is equal to the threshold minCUSize, the partitioning method of the current node can be obtained by parsing the value of BTSplitMode.
[0399] If the ratio of the long side to the short side of a parent node is twice the threshold minRatio, then it cannot perform EQT partitioning on the short side. That is, when it is determined that the ratio of the long side to the short side of the current node is twice the threshold minRatio, as long as the value of EQTSplitMode is 1, it can be obtained that the partitioning method of the current node is EQT along the long side (i.e., without using EqtSplitDir).
[0400] If the length of the short side of a parent node is twice the threshold minCUSize, then it cannot perform EQT partitioning on the short side; that is, when it is determined that the length of the short side of the current node is equal to twice the threshold minCUSize, as long as the value of EQTSplitMode is 1, it can be obtained that the partitioning method of the current node is EQT along the long side (i.e., without using EqtSplitDir).
[0401] If the width and height of a parent node are both twice the threshold minCUSize, then it cannot be split into EQT partitions; that is, when it is determined that the width and height of the current node are both twice the threshold minCUSize, only BTSplitMode and BtSpliDir need to be parsed, and EQTSplitMode does not need to be parsed.
[0402] Technical effects of embodiment two of the present invention
[0403] In Embodiment 2 of the present invention, by comparing the relationship between the size of the current node and the thresholds minCUSize and / or minRatio, impossible partitioning patterns of the current node are eliminated (the inventive point of Embodiment 2), thereby reducing the complexity of the entire parsing process and improving the efficiency of the system.
[0404] Embodiment 3 of the present invention
[0405] Example 3 is an extension of Example 1. This example is a variation of the following step in step two of Example 1:
[0406] Step two, "parse the second-level coding tree information and obtain the leaf nodes of the second-level coding tree," may also include:
[0407] Parse the partitioning information BTSplitMode and EQTSplitMode of each node in the second-level coding tree;
[0408] If the partitioning information indicates that the node is not partitioned (e.g., BTSplitMode=0 and EQTSplitMode=0), then the node is a second-level encoded leaf node;
[0409] If the partitioning information indicates that the node is to be partitioned into a binary tree (e.g., BtSplitMode=1), then one of the partitioning methods indicated by the partitioning information is selected to divide the node into 2 child nodes. For each child node, its partitioning information is parsed in turn to determine its partitioning method. For example, when BtSplitDir=0, the partitioning information indicates that the node is to be partitioned into a horizontal binary tree, dividing the node into 2 horizontal child nodes; when BtSplitDir=1, the partitioning information indicates that the node is to be partitioned into a vertical binary tree, dividing the node into 2 vertical child nodes.
[0410] If the partitioning information indicates that the node is to be partitioned into an extended quadtree (e.g., EQTSplitMode=1), then one of the partitioning methods indicated by the partitioning information is selected to divide the node into 4 child nodes, and for each child node, its partitioning information is parsed in turn to determine its partitioning method; when EqtSplitDir=0, the partitioning information indicates that the node is to be partitioned into a horizontal extended quadtree; when EqtSplitDir=1, the partitioning information indicates that the node is to be partitioned into a vertical quadtree.
[0411] An example flowchart is as follows Figure 19 As shown in the figure. It should be understood that the determination of BTSplitMode and EQTSplitMode in the figure is for illustration only, and they can be performed in any order or simultaneously, and are not a limitation of this embodiment.
[0412] Technical effects of embodiment three of the present invention
[0413] In Embodiment 3 of the present invention, by introducing independent parameters to determine the type of binary tree or extended quadtree for nodes, the partitioning method and approach can be located more quickly, improving parallel processing capabilities and thus enhancing system efficiency.
[0414] In this embodiment of the invention, a specific partitioning method is defined for a specific block (64×32 or 32×64 block) (divided into 32×32);
[0415] The present invention provides a limitation on the partitioning of nodes in an extended quadtree, namely, "if any side of a node has a length greater than 32, then the node is not partitioned into an extended quadtree by default";
[0416] This invention compares the size of the current node with the threshold minCUSize and / or the threshold minRatio, eliminating impossible partitioning patterns for the current node (Example 2), thereby reducing the complexity of the entire parsing process.
[0417] The beneficial effect is that it reduces the complexity of CTU partitioning (multiple partitioning methods are reduced to one partitioning method, or no partitioning is required), thereby improving the efficiency of the entire system.
[0418] Those skilled in the art will appreciate that the functionality described in conjunction with the various illustrative logic blocks, modules, and algorithmic steps disclosed herein can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functionality described by the various illustrative logic blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. The computer-readable medium may comprise a computer-readable storage medium, which corresponds to a tangible medium, such as a data storage medium, or a communication medium that includes any medium facilitating the transfer of a computer program from one place to another (e.g., according to a communication protocol). In this way, the computer-readable medium may substantially correspond to (1) a non-transitory tangible computer-readable storage medium, or (2) a communication medium, such as a signal or carrier wave. The data storage medium may be any available medium accessible by one or more computers or one or more processors to retrieve instructions, code, and / or data structures for implementing the techniques described in this application. A computer program product may comprise a computer-readable medium.
[0419] By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disc storage devices, magnetic disk storage devices or other magnetic storage devices, flash memory, or any other media that can be used to store desired program code in the form of instructions or data structures and is accessible by a computer. Furthermore, any connection is properly referred to as computer-readable media. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of media. However, it should be understood that the computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other temporary media, but are specifically addressed to non-temporary tangible storage media. As used herein, disks and optical discs include compact optical discs (CDs), laser optical discs, optical discs, digital versatile optical discs (DVDs), and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers. The combination of the above items should also be included in the scope of computer-readable media.
[0420] Instructions can be executed by one or more processors, such as digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Therefore, the term "processor" as used herein can refer to any of the foregoing structures or any other structures suitable for implementing the techniques described herein. Furthermore, in some aspects, the functionality described in the various illustrative logic blocks, modules, and steps described herein can be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into combined codecs. Moreover, the techniques can be fully implemented within one or more circuit or logic elements.
[0421] The technology of this application can be implemented in a wide variety of devices or apparatuses, including wireless handheld devices, integrated circuits (ICs), or a set of ICs (e.g., chipsets). The various components, modules, or units described in this application are intended to emphasize functional aspects of the apparatus for performing the disclosed technology, but do not necessarily need to be implemented by different hardware units. In fact, as described above, the various units can be combined with suitable software and / or firmware within a codec hardware unit, or provided via interoperable hardware units (containing one or more processors as described above).
[0422] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0423] The above description is merely an exemplary embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A video decoding method, characterized in that, The method, applied to the second-level coding tree in the Extended Quadtree EQT scheme, includes: If the length of the long side of the image block to be divided in the image to be decoded is twice the length of the short side of the image block to be divided, and it is determined that the image block to be divided should be divided, then the image block to be divided is partitioned into binary trees with the partitioning direction perpendicular to the long side of the image block, until the rate-distortion optimization (RDO) is minimized when not partitioned or the minimum coding unit (CU) size is reached, resulting in the partitioned image block; determining that the image block to be divided should be divided includes: the rate-distortion cost of binary tree partitioning with the partitioning direction perpendicular to the long side of the image block to be divided is less than the rate-distortion cost of not partitioning; or, the first identification information in the bitstream indicates that the current image block should be divided. The image to be decoded is reconstructed based on the divided image blocks.
2. The method according to claim 1, characterized in that, The image block to be divided has a long side length of 128 pixels and a short side length of 64 pixels.
3. The method according to claim 1 or 2, characterized in that, The short side length of the image block to be divided is equal to the side size of the maximum transform unit (TU), or the short side length of the image block to be divided is equal to the side size of the virtual pipeline data unit (VPDU).
4. The method according to claim 1 or 2, characterized in that, The image block to be divided is a boundary image block.
5. A video decoder, characterized in that, The video decoder, applied to the second-level coding tree in the extended quadtree EQT scheme, includes: A partitioning unit is configured to perform binary tree partitioning of the image block to be partitioned in a direction perpendicular to the long side of the image block to be partitioned if the length of the long side of the image block to be partitioned is twice the length of the short side of the image block to be partitioned, and it is determined that the image block to be partitioned should be partitioned. This partitioning continues until the Rate-Distortion Optimization (RDO) is minimized or the Minimum Code Unit (CU) size is reached, resulting in a partitioned image block. The determination to partition the image block to be partitioned includes: the rate-distortion cost of binary tree partitioning in a direction perpendicular to the long side of the image block to be partitioned is less than the rate-distortion cost of not partitioning; or, the first identifier information in the bitstream indicates that the current image block should be partitioned. The reconstruction unit is used to reconstruct the image to be decoded based on the divided image blocks.
6. The video decoder according to claim 5, characterized in that, The image block to be divided has a long side length of 128 pixels and a short side length of 64 pixels.
7. The video decoder according to claim 5 or 6, characterized in that, The short side length of the image block to be divided is equal to the side size of the maximum transform unit (TU), or the short side length of the image block to be divided is equal to the side size of the virtual pipeline data unit (VPDU).
8. The video decoder according to claim 5 or 6, characterized in that, The image block to be divided is a boundary image block.
9. A video decoding device, characterized in that, It includes a memory and a processor; the memory is used to store program code; the processor is used to invoke the program code to perform the method as described in any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that, Includes program code that, when run on a computer, causes the computer to perform the method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Method and apparatus for prediction based on block shape
KR1020180107762A
Intra-prediction mode-based image processing method and device therefor
WO2018030599A1