Video encoding method, device, storage medium and code stream
By determining unnecessary block orientations based on the texture features of video data blocks, the problem of wasted computational resources in text-based content processing in existing video coding standards is solved, resulting in a more efficient coding process.
Patent Information
- Application Number
- CN202280097191.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-19
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-07-19
AI Technical Summary
Existing video coding standards waste significant computing resources and take too long to encode text-based content, making it difficult to efficiently compress text-based screen content video images.
Based on the texture features of the data block to be encoded, unnecessary block directions are avoided, such as horizontal or vertical block partitioning. The texture feature values are used to determine whether to perform binary or ternary tree block partitioning, thereby reducing unnecessary computational overhead.
By skipping unnecessary blocks, coding complexity is reduced, computing resources are saved, coding time is shortened, and coding efficiency is improved.
Smart Images

Figure CN119384825B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to, but is not limited to, the field of video data processing technology, and particularly to a video data encoding method, device, storage medium, and bitstream. Background Technology
[0002] Digital video compression technology primarily compresses massive amounts of digital video data to facilitate transmission and storage. With the surge in internet video and increasing demands for video clarity, while existing digital video compression standards can save considerable video data, there is still a need to pursue better digital video compression technologies to reduce bandwidth and traffic pressure during digital video transmission, achieving more efficient video encoding / decoding, transmission, and storage.
[0003] In order to provide the best video data compression results, the encoding end often needs to try encoding under a variety of specific available configuration schemes and make the best choice. Therefore, while meeting the requirements of video data playback and transmission, the field of encoding technology needs to seek better video compression technology solutions on the one hand, and on the other hand, it also needs to take encoding efficiency into account. Summary of the Invention
[0004] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.
[0005] This disclosure provides a video encoding method, including:
[0006] Based on the texture features corresponding to the data block to be encoded, determine the first direction block partitioning identifier corresponding to the data block to be encoded;
[0007] When the first direction block partitioning identifier is set to a first value, the first direction block partitioning method is not used when performing block partitioning processing on the data block to be encoded.
[0008] This disclosure also provides a video encoding device, including a processor and a memory storing a computer program executable on the processor, wherein the processor executes the computer program to implement the video encoding method as described in any embodiment of this disclosure.
[0009] This disclosure also provides a non-transient computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the video encoding method as described in any embodiment of this disclosure.
[0010] This disclosure also provides a bitstream, wherein the bitstream is generated according to a video encoding method as described in any embodiment of this disclosure.
[0011] After reading and understanding the accompanying diagrams and detailed descriptions, the other aspects can be understood. Attached Figure Description
[0012] The accompanying drawings are provided to illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the technical solutions of this disclosure and do not constitute a limitation on the technical solutions of this disclosure.
[0013] Figure 1 This is a structural block diagram of a video encoding and decoding system that can be used in the embodiments of this disclosure;
[0014] Figure 2 This is a structural block diagram of a video encoder that can be used in the embodiments of this disclosure;
[0015] Figure 3 This is a structural block diagram of a video decoder that can be used in the embodiments of this disclosure;
[0016] Figure 4 This is a schematic diagram of the various types of trees that can be used in the embodiments of this disclosure;
[0017] Figure 5 This is a schematic diagram of a block partitioning process that can be used in embodiments of this disclosure;
[0018] Figure 6 This is a schematic diagram of a QTMT block partitioning result that can be used in the embodiments of this disclosure;
[0019] Figure 7 This is a flowchart of a video encoding method that can be used in embodiments of this disclosure;
[0020] Figure 8 This is a schematic diagram of a first texture feature value calculation that can be used in embodiments of this disclosure;
[0021] Figure 9 This is a flowchart of another video encoding method that can be used in the embodiments of this disclosure;
[0022] Figure 10 This is a flowchart of another video encoding method that can be used in the embodiments of this disclosure;
[0023] Figure 11 This is a schematic diagram of a video encoding device structure that can be used in embodiments of this disclosure. Detailed Implementation
[0024] This disclosure describes several embodiments, but these descriptions are exemplary and not restrictive, and it will be apparent to those skilled in the art that more embodiments and implementations are possible within the scope of the embodiments described herein.
[0025] In this disclosure, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or illustration. Any embodiment described as "exemplary" or "for example" in this disclosure should not be construed as being more preferred or advantageous than other embodiments.
[0026] In describing representative exemplary embodiments, the specification may have presented methods and / or processes as a specific sequence of steps. However, the method or process should not be limited to the specific order of steps described herein, to the extent that it does not depend on such a specific order. Other sequences of steps are possible, as will be understood by those skilled in the art. Therefore, the specific order of steps set forth in the specification should not be construed as a limitation of the claims. Furthermore, the claims relating to the method and / or process should not be limited to the steps performed in the order written, and those skilled in the art will readily understand that these orders may be varied and still remain within the spirit and scope of the embodiments disclosed herein.
[0027] Currently, most common video codec standards employ a block-based hybrid coding framework. Each frame in a video is divided into square largest coding units (LCUs) or coding tree units (CTUs) of the same size (e.g., 128x128, 64x64, etc.). Each LCU or CTU can be further divided into rectangular coding units (CUs) according to rules. Coding units may also be further divided into prediction units (PUs), transform units (TUs), etc. The hybrid coding framework includes modules for prediction, transform, quantization, entropy coding, and in-loop filtering. The prediction module includes intra-prediction and inter-prediction. Inter-prediction includes motion estimation and motion compensation. Because there is a strong correlation between adjacent pixels in a video frame, intra-prediction is used in video codec technology to eliminate spatial redundancy between adjacent pixels. Because there is a strong similarity between adjacent frames in a video, inter-frame prediction methods are used in video encoding and decoding technology to eliminate temporal redundancy between adjacent frames, thereby improving encoding efficiency.
[0028] Internationally, mainstream video codec standards include H.264 / Advanced Video Coding (AVC), H.265 / High Efficiency Video Coding (HEVC), H.266 / Versatile Video Coding (VVC), MPEG (Moving Picture Experts Group), AOM (Alliance for Open Media), AVS (Audio Video Coding Standard), and extensions to these standards, or any other custom standards. These standards reduce the amount of data transmitted and stored through video compression technology to achieve more efficient video encoding / decoding, transmission, and storage.
[0029] In H.264 / AVC, the input image is divided into fixed-size blocks as the basic coding unit, called macroblocks (MBs). Each macroblock consists of one luma block and two chroma blocks, with the luma block being 16×16 in size. If 4:2:0 sampling is used, the chroma block size is half that of the luma block. During prediction, the macroblock is further divided into smaller blocks for prediction, depending on the prediction mode. In intra-frame prediction, the macroblock can be divided into 16×16, 8×8, or 4×4 blocks, with each block undergoing intra-frame prediction separately. In the transform and quantization stages, the macroblock is divided into 4×4 or 8×8 blocks, and the prediction residuals in each block are transformed and quantized to obtain the quantized coefficients.
[0030] Compared to H.264 / AVC, H.265 / HEVC incorporates improvements in several coding stages. In H.265 / HEVC, an image is divided into Coding Tree Units (CTUs), which are the basic units of coding (corresponding to macroblocks in H.264 / AVC). A CTU contains one Luminance Coding Tree Block (CTB) and two Chroma Coding Tree Blocks. The maximum size of a CTU in the H.265 / HEVC standard is typically 64×64. To accommodate diverse video content and features, CTUs are iteratively divided into a series of Coding Units (CUs) using a Quadro Tree (QT) approach. CUs are the basic units of intra / inter-frame coding. A CU contains one Luminance Coding Block (CB) and two Chroma Coding Blocks, along with related syntax structures. The maximum CU size is the CTU, and the minimum CU size is 8×8. The leaf nodes (CUs) obtained after coding tree partitioning can be divided into three types according to the prediction method: intra CU (intra-prediction), inter CU (inter-prediction), and skipped CU. Skipped CU can be considered a special case of inter CU, as it does not contain motion information or prediction residual information. Each leaf node CU contains one or more prediction units (PUs). H.265 / HEVC supports PUs ranging from 4×4 to 64×64, with eight partitioning modes. For intra-coding modes, there are two possible partitioning modes: Part_2Nx2N and Part_NxN. For prediction residual signals, the CU is partitioned into Transform Units (TUs) using a prediction residual quadtree. A TU contains one luma transform block (TB) and two chroma transform blocks. Only square partitioning is allowed, dividing a CB into one or four PBs. The same TU has the same transformation and quantization process, supporting sizes from 4×4 to 32×32. Unlike previous coding standards, in inter-frame prediction, TB can cross the boundary of PB to further maximize the coding efficiency of inter-frame coding.
[0031] In H.266 / VVC, the video encoded image is first divided into Coding Units (CTUs) similar to those in H.265 / HEVC, but the maximum size is increased from 64×64 to 128×128. H.266 / VVC introduces quadtree and nested multi-type tree (MTT) partitioning. MTTs include binary trees (BTs) and ternary trees (TTs), and unify the concepts of CU, PU, and TU in H.265 / HEVC, while supporting more flexible CU partitioning shapes. CTUs are partitioned according to a quadtree structure, and leaf nodes are further partitioned using MTTs. Leaf nodes of multi-type trees become Coding Units (CUs). When a CU is not larger than the maximum transform unit (64×64), subsequent prediction and transform will not be further partitioned. In most cases, CUs, PUs, and TUs have the same size. Considering the different characteristics of luma and chroma and the parallelism of specific implementations, in H.266 / VVC, chroma can use a separate partitioning tree structure, without having to maintain consistency with the luma partitioning tree. In H.266 / VVC, the chroma partitioning of I-frames uses a chroma separation tree, while the chroma partitioning of P-frames and B-frames is consistent with the luminance partitioning.
[0032] Figure 1 This is a block diagram of a video encoding / decoding system that can be used in embodiments of this disclosure. Figure 1 As shown, the system consists of an encoding-side device 1 and a decoding-side device 2. The encoding-side device 1 encodes the video images to generate a bitstream. The decoding-side device 2 decodes the bitstream to obtain the reconstructed video images. The encoding-side device 1 and the decoding-side device 2 may include one or more processors and memory coupled to the one or more processors, such as random access memory, electrically erasable programmable read-only memory, flash memory, or other media. The encoding-side device 1 and the decoding-side device 2 can be implemented using various devices, such as desktop computers, mobile computing devices, laptops, tablet computers, set-top boxes, televisions, cameras, display devices, digital media players, in-vehicle computers, or other similar devices.
[0033] Decoding device 2 can receive a bitstream from encoding device 1 via link 3. Link 3 includes one or more media or devices capable of moving the bitstream from encoding device 1 to decoding device 2. In one example, link 3 includes one or more communication media enabling encoding device 1 to send the bitstream directly to decoding device 2. Encoding device 1 can modulate the bitstream according to a communication standard (e.g., a wireless communication protocol) and can send the modulated bitstream to decoding device 2. 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 encoding device 1 to decoding device 2. In another example, the bitstream may also be output from output interface 15 to a storage device, from which decoding device 2 can read the stored data via streaming or downloading. The storage device may include any of a variety of distributed or local access data storage media, such as hard disk drives, Blu-ray discs, digital multifunction discs, read-only discs, flash memory, volatile or non-volatile memory, file servers, etc.
[0034] exist Figure 1 In the example shown, the encoding-side device 1 includes a data source 11, an encoder 13, and an output interface 15. In some examples, the data source 11 may include a video capture device (e.g., a camera), an archive containing previously captured data, a feed interface for receiving data from a content provider, a computer graphics system for generating data, or a combination of these sources. The encoder 13 may encode the data from the data source 11 and output it to the output interface 15, which may include at least one of a regulator, a modem, and a transmitter.
[0035] exist Figure 1 In the example shown, the decoding-side device 2 includes an input interface 21, a decoder 23, and a display device 25. In some examples, the input interface 21 includes at least one of a receiver and a modem. The input interface 21 may receive a bitstream via link 3 or from a storage device. The decoder 23 decodes the received bitstream. The display device 25 is used to display the decoded data, and the display device 25 may be integrated with other devices of the decoding-side device 2 or be set up separately. The display device 25 may be, for example, a liquid crystal display, a plasma display, an organic light-emitting diode display, or other types of display devices. In other examples, the decoding-side device 2 may not include the display device 25, or may include other devices or equipment for applying the decoded data.
[0036] Figure 1 The encoder 13 and decoder 23 can be implemented using any one or any combination of the following circuits: one or more microprocessors, digital signal processors, application-specific integrated circuits, field-programmable gate arrays, discrete logic, or hardware. If this disclosure is implemented in part in software, then instructions for software can be stored in a suitable non-volatile computer-readable storage medium, and said instructions can be executed in hardware using one or more processors to implement the methods of this disclosure.
[0037] Figure 2 The diagram shown is a block diagram of an exemplary video encoder. In this example, the description is primarily based on the terminology and block division method of the H.265 / HEVC standard, but the structure of this video encoder can also be used for video encoding of H.264 / AVC, H.266 / VVC, and other similar standards.
[0038] As shown in the figure, the video encoder 20 is used to encode video data and generate a bitstream. The video encoder 20 includes a prediction processing unit 100, a partitioning unit 101, a prediction residual generation unit 102, a transform processing unit 104, a quantization unit 106, an inverse quantization unit 108, an inverse transform processing unit 110, a reconstruction unit 112, a filter unit 113, a decoded image buffer 114, and an entropy coding unit 116. The prediction processing unit 100 includes an inter-frame prediction processing unit 121 and an intra-frame prediction processing unit 126. In other embodiments, the video encoder 20 may include more, fewer, or different functional components than in this example. The prediction residual generation unit 102 and the reconstruction unit 112 are both indicated by circles with plus signs in the figure.
[0039] The segmentation unit 101 works in conjunction with the prediction processing unit 100 to divide the received video data into slices, CTUs, or other larger units. The video data received by the segmentation unit 101 can be a video sequence including video frames such as I-frames, P-frames, or B-frames.
[0040] The prediction processing unit 100 can divide the CTU into CUs and perform intra-frame prediction coding or inter-frame prediction coding on the CUs. When performing intra-frame coding on the CUs, a 2N×2N CU can be divided into 2N×2N or N×N prediction units (PUs) for intra-frame prediction. When performing inter-frame prediction on the CUs, a 2N×2N CU can be divided into 2N×2N, 2N×N, N×2N, N×N or other sizes of PUs for inter-frame prediction, and asymmetric partitioning of PUs is also supported.
[0041] The inter-frame prediction processing unit 121 can perform inter-frame prediction on the PU to generate prediction data for the PU. The prediction data includes prediction blocks of the PU, motion information of the PU, and various syntax elements.
[0042] The intra-prediction processing unit 126 can perform intra-prediction on the PU, generating prediction data for the PU. The prediction data for the PU may include prediction blocks of the PU and various syntax elements. The intra-prediction processing unit 126 can try multiple selectable intra-prediction modes and select the intra-prediction mode with the lowest cost to perform intra-prediction on the PU.
[0043] The prediction residual generation unit 102 can generate prediction residual blocks of CU based on the original blocks of CU and the prediction blocks of PU divided by CU.
[0044] The transform processing unit 104 can divide the CU into one or more transform units (TUs), and the prediction residual block associated with the TU is a sub-block obtained by dividing the prediction residual block of the CU. A coefficient block associated with the TU is generated by applying one or more transforms to the prediction residual block associated with the TU. For example, the transform processing unit 104 can apply a discrete cosine transform (DCT), a directional transform, or other transforms to the prediction residual block associated with the TU, transforming the prediction residual block from the pixel domain to the frequency domain.
[0045] The quantization unit 106 can quantize the coefficients in the coefficient block based on the selected quantization parameter (QP). Quantization may result in quantization losses. The degree of quantization of the coefficient block can be adjusted by adjusting the QP value.
[0046] The inverse quantization unit 108 and the inverse transform unit 110 can apply inverse quantization and inverse transform to the coefficient block, respectively, to obtain the reconstruction prediction residual block associated with TU.
[0047] The reconstruction unit 112 can generate a reconstruction block of the CU based on the reconstruction prediction residual block and the prediction block generated by the prediction processing unit 100.
[0048] After performing loop filtering on the reconstructed block, the filter unit 113 stores it in the decoded image buffer 114. The intra-frame prediction processing unit 126 can extract the reconstructed reference information of the PU's neighbors from the reconstructed block cached in the decoded image buffer 114 to perform intra-frame prediction on the PU. The inter-frame prediction processing unit 121 can use the reference image containing the reconstructed block cached in the decoded image buffer 114 to perform inter-frame prediction on the PU of other images.
[0049] The entropy coding unit 116 can perform entropy coding operations on the received data (such as syntax elements, quantized system blocks, motion information, etc.), such as performing context-adaptive variable length coding (CAVLC) and context-based adaptive binary arithmetic coding (CABAC), and output the bitstream (i.e. the encoded video bitstream).
[0050] Figure 3 The diagram shown is a block diagram of an exemplary video decoder. In this example, the description is primarily based on the terminology and block division of the H.265 / HEVC standard, but this video decoder structure can also be used for video decoding of H.264 / AVC, H.266 / VVC, and other similar standards.
[0051] The video decoder 30 decodes the received bitstream and outputs decoded video data. As shown in the figure, the video decoder 30 includes an entropy decoding unit 150, a prediction processing unit 152, an inverse quantization unit 154, an inverse transform processing unit 156, a reconstruction unit 158 (represented by circles with plus signs in the figure), a filter unit 159, and an image buffer 160. In other embodiments, the video decoder 30 may include more, fewer, or different functional components.
[0052] The entropy decoding unit 150 can perform entropy decoding on the received bitstream to extract information such as syntax elements, quantized coefficient blocks, and motion information of the PU. The prediction processing unit 152, the dequantization unit 154, the inverse transform processing unit 156, the reconstruction unit 158, and the filter unit 159 can all perform corresponding operations based on the syntax elements extracted from the bitstream.
[0053] As a functional component for performing reconstruction operations, the dequantization unit 154 can dequantize the coefficient block associated with the quantized TU. The inverse transform processing unit 156 can apply one or more inverse transforms to the dequantized coefficient block to generate a reconstruction prediction residual block of the TU.
[0054] The prediction processing unit 152 includes an inter-frame prediction processing unit 162 and an intra-frame prediction processing unit 164. If the PU uses intra-frame prediction coding, the intra-frame prediction processing unit 164 can determine the intra-frame prediction mode of the PU based on the syntax elements parsed from the bitstream, and perform intra-frame prediction based on the determined intra-frame prediction mode and the reconstructed reference information of the PU's neighbors obtained from the image buffer device 60 to generate a prediction block for the PU. If the PU uses inter-frame prediction coding, the inter-frame prediction processing unit 162 can determine one or more reference blocks of the PU based on the PU's motion information and the corresponding syntax elements, and generate a prediction block for the PU based on the reference blocks.
[0055] The reconstruction unit 158 can obtain the reconstruction block of the CU based on the reconstruction prediction residual block associated with the TU and the prediction block of the PU generated by the prediction processing unit 152 (i.e., intra-frame prediction data or inter-frame prediction data).
[0056] The filter unit 159 can perform loop filtering on the reconstructed blocks of the CU to obtain the reconstructed image. The reconstructed image is stored in the image buffer 160. The image buffer 160 can provide reference images for subsequent motion compensation, intra-frame prediction, inter-frame prediction, etc., and can also output the reconstructed video data as decoded video data for display on the display device.
[0057] Because video encoding includes both encoding and decoding, for ease of description later, encoding at the encoder end and decoding at the decoder end can be collectively referred to as encoding or decoding. Based on the context of the relevant steps, those skilled in the art will understand whether the encoding (decoding) mentioned later refers to encoding at the encoder end or decoding at the decoder end. In this application, the terms "coded block" or "video block" may be used to refer to one or more blocks of samples, and the syntactic structure for encoding (decoding) one or more sample blocks; instance types of coded blocks or video blocks may include CTU, CU, PU, TU, and subblock in H.265 / HEVC, CTU and CU in H.266 / VVC, or macroblocks, macroblock partitions, etc., in other video codec standards.
[0058] The following section introduces some concepts involved in the embodiments of this disclosure. The relevant descriptions in the embodiments of this disclosure use terminology from H.265 / HEVC or H.266 / VVC for ease of explanation. However, the solutions provided in the embodiments of this disclosure are not limited to H.265 / HEVC or H.266 / VVC. In fact, the technical solutions provided in the embodiments of this disclosure can also be implemented in H.264 / AVC, MPEG, AOM, AVS, and subsequent versions and extensions of these standards.
[0059] CTU is an abbreviation for Coding Tree Unit, which is the coding processing unit in H.265 / HEVC or H.266 / VVC, equivalent to a macroblock in H.264 / AVC. According to the YUV sampling format, a Coding Tree Unit (CTU) should contain one Luminance Coding Tree Block (CTB) and two Chroma Coding Tree Blocks (CTBs) (Cr, Cb) at the same location.
[0060] A Coding Unit (CU) is the basic unit for performing various encoding or decoding operations during video encoding and decoding, such as CU-based prediction, transform, entropy coding, and other operations. A CU refers to a two-dimensional array of sample points, which can be a square array or a rectangular array. For example, a 4x8 CU can be viewed as a square array of 32 sample points. A CU can also be called an image block. A CU includes one luma coding block and two chroma (Cr, Cb) coding blocks, along with the relevant syntax structure.
[0061] A prediction unit, also known as a prediction block, consists of one luminance prediction block and two chromaticity (Cr, Cb) prediction blocks.
[0062] A residual block is a residual image block formed by subtracting the prediction block from the current block to be encoded after inter-frame prediction and / or intra-frame prediction has generated the prediction block of the current block. It can also be called residual data or residual image, and includes: one luminance residual block and two chrominance (Cr, Cb) residual blocks.
[0063] A coefficient block includes a transform block (TU) containing transform coefficients obtained by transforming a residual block, or a residual block containing residual data (residual signal) without transformation. In this embodiment, coefficients include the coefficients of the transform block obtained by transforming the residual block, or the coefficients of the residual block. Entropy encoding of coefficients includes entropy encoding of the coefficients of the transform block after quantization, or, if the transformation is not applied to the residual data, entropy encoding of the coefficients of the residual block after quantization. The untransformed residual signal and the transformed residual signal can also be collectively referred to as coefficients. For effective compression, coefficients generally need to be quantized; the quantized coefficients can also be called levels. The transform block TU includes: one luminance transform block and two chrominance (Cr, Cb) transform blocks.
[0064] Quantization is typically used to reduce the dynamic range of coefficients, thereby representing video with fewer codewords. The quantized value is usually called a level. Quantization is usually performed by dividing the coefficient by the quantization step size, which is determined by the quantization factor transmitted in the bitstream. Inverse quantization is performed by multiplying the level by the quantization step size. For an N×M block, the quantization of all coefficients can be performed independently. This technique is widely used in many international video compression standards, such as H.265 / HEVC and H.266 / VVC. A specific scan order can transform a two-dimensional coefficient block into a one-dimensional coefficient stream. The scan order can be Z-shaped, horizontal, vertical, or any other sequence. In international video compression standards, quantization operations can utilize the correlation between coefficients and the characteristics of quantized coefficients to select a better quantization method, thereby optimizing quantization.
[0065] As can be seen, residual blocks are usually much simpler than the original image. Therefore, predicting and determining the residuals before encoding can significantly improve compression efficiency. The residual blocks are not directly encoded; instead, a transformation is typically performed first. This transformation converts the residual image from the spatial domain to the frequency domain, removing correlations. After the residual image is transformed to the frequency domain, since most of the energy is concentrated in the low-frequency region, the non-zero coefficients are mostly concentrated in the upper left corner. After the transformation, quantization is used for further compression. Moreover, because the human eye is not sensitive to high frequencies, a larger quantization step size can be used in the high-frequency region to further improve compression efficiency.
[0066] The CTU can be further divided into multiple CUs. H.266 / VVC uses a more complex coding unit partitioning structure than H.265 / HEVC (QTMT, a nested multi-type tree quadtree), adding two binary tree (BT) partitions and two ternary tree (TT) partitions to the HEVC quadtree (QT) partition. BT and TT are collectively referred to as multi-type tree MT, such as... Figure 4 As shown. The CTU is first partitioned using a quadtree, and then the leaf nodes of the quadtree can be further partitioned using a median tree (MT). Specifically, the CU partitioning process is as follows: Figure 5 As shown.
[0067] The default size of the CTU in VVC is 128*128, and the minimum CU size is 4*4. The CTU is first divided into 4 sub-CUs using the QT method by default. Once a CU uses the MT partitioning method, it cannot be further partitioned using QT.
[0068] In theory, QT nodes can be configured according to... Figure 5 There are 5 partitioning methods in the diagram, and MT nodes are partitioned according to 4 of them. For example, the possible QTMT partitioning results for a CTU are as follows: Figure 6 As shown.
[0069] In the encoder, QTMT block partitioning is located in the intra / inter-frame prediction processing unit. Based on different block partitions, it searches for corresponding reference blocks for prediction, finding the partitioning mode with the lowest rate-distortion cost (i.e., the block partitioning method optimization process described in this embodiment to determine the corresponding optimal partitioning mode), thereby obtaining the final prediction residual. This residual is then used for further transformation and quantization processes to complete block encoding. In the decoder, QTMT block partitioning is located in the intra / inter-frame prediction processing unit. Based on the block partitioning mode and other prediction information, it determines the current CU's partitioning tree and further completes subsequent decoding steps.
[0070] Some feasible encoding schemes encode according to the following methods:
[0071] (1) The input image is divided into multiple non-overlapping CU blocks (i.e., the largest CU block: CTU);
[0072] (2) Process each CU in sequence according to the raster scanning order. First, determine the possible partitioning methods according to the standard. Then, try each block partitioning method in sequence. The method with the lowest rate distortion cost is the optimal partitioning method.
[0073] (3) If the current CU can be further divided, repeat process (2) for the divided sub-CU; otherwise, end the current CU encoding, determine the optimal block division method and optimal prediction mode of the current CU, calculate the residual block, transform, quantize, entropy encode the residual block, encode the prediction information such as the block division mode, and output the code stream for transmission.
[0074] Accordingly, some feasible decoding schemes perform decoding according to the following method: First, the input bitstream is entropy decoded, dequantized, and inverse transformed to obtain residual values; then, the image is reconstructed based on the residual blocks. The CU reconstruction process mainly includes the following three steps:
[0075] (a) Determine the partition tree of the current CU based on prediction information such as block partitioning pattern.
[0076] (b) Use information such as motion vectors to find the prediction block.
[0077] (c) The residual value of the current CU and the predicted value are superimposed to obtain the reconstructed CU. Finally, the reconstructed image is fed into the DBF / SAO / ALF filter, and the filtered image is sent to the buffer to wait for video playback.
[0078] As can be seen, among these feasible H.266 / VVC codec schemes, even considering only quadtree partitioning, there are 4 5 +4 4 +4 3 +4 2 +4 1 +40 =1365 partitioning patterns, far exceeding the 341 patterns of H.265 / HEVC. Adding binary tree and ternary tree partitioning methods, the total number of partitioning possibilities theoretically reaches several thousand. Therefore, these feasible QTMT technology solutions result in H.266 / VVC having a much higher encoding complexity than H.265 / HEVC. For example, encoding a high-definition video sequence (1080p) might take several days.
[0079] Research has found that text in video images containing text-based content, whether English words, Chinese characters, or other languages, is generally written from left to right. Therefore, text segmentation is more likely to be vertical. For example, if an image contains the word "OBBO," when segmenting this word region, it's more likely that the letters "O" or "B" will be segmented for prediction (inter-frame prediction or intra-frame block copy prediction) to find similar matching blocks (e.g., the reference image contains the word "WTO"). Therefore, when encoding video images containing text-based content, feasible QTMT (Quick Time Measuring) techniques may generate significant unnecessary overhead related to horizontal segmentation, wasting computational resources and increasing encoding time.
[0080] Similarly, for a top-down writing pattern, the segmentation of characters is more likely to be horizontal. In this case, the relevant QTMT technology solutions may generate a lot of unnecessary overhead related to vertical segmentation.
[0081] This disclosure provides a video encoding scheme that, based on the spatial distribution characteristics of pixels in the image corresponding to the data block to be encoded (also known as the texture features of the image), skips unnecessary block division methods during relevant block division processing, thereby reducing encoding overhead, saving computing resources, and shortening encoding time.
[0082] This disclosure provides a video encoding scheme, such as... Figure 7 As shown, it includes:
[0083] Step 710: Determine the first direction block partitioning identifier corresponding to the data block to be encoded based on the texture features corresponding to the data block to be encoded;
[0084] Step 720: When the first direction block partitioning identifier is a first value, the first direction block partitioning method is not used when performing block partitioning processing of the data block to be encoded.
[0085] In one embodiment of this disclosure, the block partitioning process of the data block to be encoded does not use the first direction block partitioning method, including:
[0086] When performing optimization of available partitioning methods for the data block to be encoded, the available partitioning methods do not include the first direction block partitioning method.
[0087] It should be noted that the optimization process for the available partitioning methods of the data block to be encoded includes: attempting to partition the current data block to be encoded using at least one available partitioning method, and selecting the method with the lowest rate-distortion cost as the preferred partitioning method; or, selecting a partitioning method with a rate-distortion rate less than a set rate-distortion threshold as the preferred partitioning method. The specific optimization process is implemented according to relevant schemes, and the specific aspects are not discussed in detail in the embodiments of this application.
[0088] As can be seen, compared with the relevant feasible block partitioning schemes, the block partitioning scheme provided in this embodiment of the present disclosure, within the range of available partitioning methods determined in the relevant feasible block partitioning schemes, further considers the texture features corresponding to the video data blocks. When trying multiple partitioning methods for video data blocks that meet the set conditions, it skips horizontal or vertical block partitioning methods to reduce coding complexity and improve coding efficiency.
[0089] In one embodiment of this disclosure, the first value is FALSE or 0; or other set values.
[0090] In one embodiment of this disclosure, the first direction includes either a horizontal direction or a vertical direction.
[0091] In one embodiment of this disclosure, the first direction includes: a tilting direction with a set angle. For example, a 45-degree tilt to the left, a 30-degree tilt to the right, etc.; it is not limited to a specific angle.
[0092] In one embodiment of this disclosure, the texture feature includes a first texture feature value;
[0093] When the first direction is horizontal, the first texture feature value is determined as follows:
[0094] Horizontal pixel aggregation is performed on the data block to be encoded to obtain a single-column pixel vector;
[0095] Calculate the gradient of each component in the single-column pixel vector;
[0096] The maximum gradient among all components of the single-column pixel vector is determined as the first texture feature value.
[0097] In one embodiment of this disclosure, when the first direction is a vertical direction, the first texture feature value is determined according to the following method:
[0098] Vertical pixel aggregation is performed on the data block to be encoded to obtain a single-row pixel vector;
[0099] Calculate the gradient of each component in the single-row pixel vector;
[0100] The maximum gradient among all components of the single-row pixel vector is determined as the first texture feature value.
[0101] In one embodiment of this disclosure, the first direction block division identifier is determined according to the following method:
[0102] If the first texture feature value is less than the first feature threshold, the first directional block division identifier is determined to be the first value.
[0103] Accordingly, the first directional block partitioning identifier includes: a horizontal binary tree block partitioning identifier and a horizontal ternary tree block partitioning identifier;
[0104] or,
[0105] The first directional block partitioning identifier includes: a vertical binary tree block partitioning identifier and a vertical ternary tree block partitioning identifier.
[0106] In one embodiment of this disclosure, the allowed horizontal binary tree partitioning identifier is allowedSplitBtHor as defined in the H.266 / VVC specification.
[0107] In one embodiment of this disclosure, the allowSplitTtHor identifier for horizontal ternary tree partitioning is defined in the H.266 / VVC specification.
[0108] In one embodiment of this disclosure, the allowed vertical binary tree partitioning identifier is allowedSplitBtVer as defined in the H.266 / VVC specification.
[0109] In one embodiment of this disclosure, the allowSplitTtVer identifier for vertical ternary tree partitioning is defined in the H.266 / VVC specification.
[0110] It is understood that, in one embodiment of this disclosure, when the first direction is horizontal, if the first texture feature value determined according to the video data block to be encoded is less than the first feature threshold, it indicates that the single line of text characters contained in the image corresponding to the video data block fills the entire vertical direction of the data block, and therefore there is no need to divide the video data block horizontally; when the first direction is vertical, if the text feature value determined according to the video data block to be encoded is less than the first feature threshold, it indicates that the single column of text characters contained in the image corresponding to the video data block fills the entire horizontal direction of the data block, and therefore there is no need to divide the video data block vertically.
[0111] In one embodiment of this disclosure, the texture feature includes: a second texture feature value and a third texture feature value;
[0112] When the first direction is horizontal, the second and third texture feature values are determined as follows:
[0113] Horizontal pixel aggregation is performed on the data block to be encoded to obtain a single-column pixel vector;
[0114] Calculate the gradient of all N components in the single-column pixel vector;
[0115] The maximum value among the gradients of the first M components in the single-column pixel vector is determined as the second texture feature value;
[0116] The maximum value among the gradients of the last NM components in the single-column pixel vector is determined as the third texture feature value.
[0117] In one embodiment of this disclosure, when the first direction is a vertical direction, the second texture feature value and the third texture feature value are determined according to the following method:
[0118] Vertical pixel aggregation is performed on the data block to be encoded to obtain a single-row pixel vector;
[0119] Calculate the gradient of all N components in the single-row pixel vector;
[0120] The maximum value among the gradients of the first M components in the single-row pixel vector is determined as the second texture feature value;
[0121] The maximum value among the gradients of the last NM components in the single-row pixel vector is determined as the third texture feature value.
[0122] In one embodiment of this disclosure, the first direction block division identifier is determined according to the following method:
[0123] If the second texture feature value is less than the second feature threshold and the third texture feature value is less than the second feature threshold, the first directional block partitioning identifier is determined to be the first value.
[0124] Accordingly, the first directional block partitioning identifier includes: an identifier that allows horizontal binary tree block partitioning;
[0125] or,
[0126] The first directional block partitioning identifier includes: a vertical binary tree block partitioning identifier.
[0127] In one embodiment of this disclosure, the allowed horizontal binary tree partitioning identifier is allowedSplitBtHor as defined in the H.266 / VVC specification.
[0128] In one embodiment of this disclosure, the allowed vertical binary tree partitioning identifier is allowedSplitBtVer as defined in the H.266 / VVC specification.
[0129] It should be noted that, taking the first value as FALSE and the first direction as horizontal as an example, this embodiment of the disclosure describes a scheme where the first direction block partitioning identifier is determined to be FALSE; if the first direction block partitioning identifier is FALSE, it indicates that the horizontal block partitioning method is not used when performing block partitioning processing of the data block to be encoded. However, if the above judgment rule is not met and it is not determined to be FALSE, whether the first direction block partitioning identifier of the data block to be encoded is determined to be TRUE still needs to be judged according to other constraints in the relevant scheme. The final judgment result can be FALSE or TRUE. Taking the first value as FALSE and the first direction as vertical as an example, this embodiment of the disclosure describes a scheme where the first direction block partitioning identifier is determined to be FALSE; if the first direction block partitioning identifier is FALSE, it indicates that the vertical block partitioning method is not used when performing block partitioning processing of the data block to be encoded. For cases where the above judgment rules are not met and the result is not determined to be FALSE, whether the data block to be encoded is determined to have its first-direction block partitioning identifier set to TRUE still needs to be judged based on other constraints in the relevant scheme. The final judgment result can be either FALSE or TRUE. Specific judgments of other constraints in the relevant scheme are not detailed here. Similar judgment schemes apply to cases where the first direction is other directions, which are also not detailed here.
[0130] In one embodiment of this disclosure, the y-th component line(y) of the single-column pixel vector Line is calculated according to the following formula:
[0131]
[0132] Wherein, CU(x,y) is the pixel value of the video data block to be encoded at position (x,y), and CUWidth is the width of the video data block to be encoded.
[0133] In one embodiment of this disclosure, the gradient of each component in the single-column pixel vector is calculated according to the following formula:
[0134] G(y) = |line(y) - line(y+1)|
[0135] Wherein, G(y) is the gradient of the y-th component in the single-column pixel vector.
[0136] In one embodiment of this disclosure, the first texture feature value MG is determined based on the maximum gradient value of each component in a single column vector:
[0137] MG = maximum(G)
[0138] For example, Figure 8 The upper and lower video data blocks shown are subjected to horizontal pixel aggregation, and then the gradient of each component of the single column vector is calculated to determine the maximum gradient value MG of each component as the first texture feature value. Figure 8 If the first texture feature value of the upper middle video data block is less than the first feature threshold of 80, then when performing block partitioning optimization processing on the video data block, skip the horizontal binary tree and horizontal ternary tree block partitioning attempts; Figure 8 If the first texture feature value of the video data block in the middle and lower part is greater than the first feature threshold of 80, then block division will be attempted according to the existing scheme.
[0139] In one embodiment of this disclosure, the first feature threshold is 80; then, if the first texture feature value MG of the data block to be encoded is less than the first feature threshold (80), the first directional block partitioning identifier is determined to be FALSE. In one embodiment of this disclosure, when performing multi-partitioning method optimization processing, horizontal binary tree partitioning and horizontal ternary tree partitioning methods are skipped.
[0140] Alternatively, based on the characteristics of the text characters, the first feature threshold can be set to other values, not limited to the examples above.
[0141] In one embodiment of this disclosure, according to the H.266 / VVC specification, the following is added to the criteria for determining the allowable horizontal binary tree split identifier (allowSplitBtHor) in the allowed binary split process:
[0142] If MG < the first feature threshold, then the binary tree block identifier (allowBtSplit) is FALSE.
[0143] In one embodiment of this disclosure, according to the H.266 / VVC specification, the following is added to the criteria for determining the allowable horizontal ternary split identifier (allowSplitTtHor) in the allowed ternary split process:
[0144] If MG < the first feature threshold, then the allowed ternary tree splitting identifier (allowTtSplit) is FALSE.
[0145] In one embodiment of this disclosure, according to the H.266 / VVC specification, the following is added to the criteria for determining the allowed vertical binary tree split identifier (allowSplitBtVer) in the allowed binary split process:
[0146] If MG < the first feature threshold, then the binary tree block identifier (allowBtSplit) is FALSE.
[0147] In one embodiment of this disclosure, according to the H.266 / VVC specification, the following is added to the criteria for determining the allowable vertical ternary split identifier (allowSplitTtVer) in the allowed ternary split process:
[0148] If MG < the first feature threshold, then the allowed ternary tree splitting identifier (allowTtSplit) is FALSE.
[0149] It should be noted that, when the first direction is horizontal and the first value is FALSE, the above embodiment describes the case where the first direction block partitioning identifier is determined to be FALSE based on the first texture feature value of the image corresponding to the video data block to be encoded. If the first direction block partitioning identifier is FALSE, it indicates that the horizontal block partitioning method is not used when performing block partitioning processing on the data block to be encoded. This does not mean that if MG >= the first feature threshold, the corresponding allowed horizontal binary tree block partitioning identifier (allowSplitBtHor) or allowed horizontal ternary tree block partitioning identifier (allowSplitTtHor) is TRUE. According to the H.266 / VVC specification, the criteria for determining the allowable binary split identifier (allowBtSplit) in allowed binary split processing include other conditions. If any one or more of these conditions are met (TRUE), the allowable binary split identifier (allowBtSplit) is FALSE, and correspondingly, the allowable horizontal binary split identifier (allowSplitBtHor) is also FALSE. Only when none of the conditions are met is the allowable binary split identifier (allowBtSplit) TRUE, and correspondingly, the allowable horizontal binary split identifier (allowSplitBtHor) is TRUE. The allowable horizontal ternary tree split identifier (allowSplitTtHor) and the allowable ternary tree split identifier (allowTtSplit) are determined in a similar manner, and will not be discussed in detail here.
[0150] The relevant markings in the vertical direction are also determined in a similar way, which will not be discussed in detail here.
[0151] In some feasible embodiments, other judgment conditions can be found in sections 6.4.2 and 6.4.3 of the H.266 / VVC specification.
[0152] In one embodiment of this disclosure, the x-th component line(x) in the single-row pixel vector Line is calculated according to the following formula:
[0153]
[0154] Wherein, CU(x,y) is the pixel value of the video data block to be encoded at position (x,y), and CUHeight is the height of the video data block to be encoded.
[0155] The gradient of each component in the single-row pixel vector is calculated according to the following formula:
[0156] G(x) = |line(x) - line(x+1)|
[0157] Wherein, G(x) is the gradient of the x-th component in the single-row pixel vector.
[0158] In one embodiment of this disclosure, the first texture feature value MG is determined based on the maximum gradient value of each component in a single row vector:
[0159] MG = maximum(G).
[0160] In one embodiment of this disclosure, the second texture feature value MG1 and the third texture feature value MG2 are determined based on the gradient values of each component in a single column vector as follows:
[0161]
[0162]
[0163] In one embodiment of this disclosure, N = CUHeight is the height of the video data block to be encoded, and M = CUHeight / 2. Accordingly,
[0164]
[0165]
[0166] In one embodiment of this disclosure, N = CUWidth is the width of the video data block to be encoded, and M = CUWidth / 2. Accordingly,
[0167]
[0168]
[0169] As can be seen, the scheme of determining the first direction block partitioning identifier as the first value based on the second texture feature value and the third texture feature value can more accurately filter out the data blocks to be encoded that do not need to be partitioned into a first direction binary tree.
[0170] In one embodiment of this disclosure, the second feature threshold is 80; then, if the second texture feature value MG1 of the data block to be encoded is less than the second feature threshold (80), and the third texture feature value MG2 is less than the second feature threshold (80), the first directional block partitioning identifier is determined to be the first value. In one embodiment of this disclosure, when performing multi-partitioning optimization processing, the first directional binary tree block is skipped.
[0171] Alternatively, based on the characteristics of the text characters, the second feature threshold can be set to other values, not limited to the examples above. The first and second feature thresholds can be set independently, and can be the same or different.
[0172] In one embodiment of this disclosure, according to the H.266 / VVC specification, the following is added to the criteria for determining the allowable horizontal binary tree split identifier (allowSplitBtHor) in the allowed binary split process:
[0173] If MG1 < the second feature threshold and MG2 < the second feature threshold, then the binary tree block identifier (allowBtSplit) is FALSE.
[0174] In one embodiment of this disclosure, according to the H.266 / VVC specification, the following is added to the criteria for determining the allowable horizontal ternary split identifier (allowSplitTtHor) in the allowed ternary split process:
[0175] If MG1 < the second feature threshold and MG2 < the second feature threshold, then the allowed ternary tree splitting identifier (allowTtSplit) is FALSE.
[0176] In one embodiment of this disclosure, according to the H.266 / VVC specification, the following is added to the criteria for determining the allowed vertical binary tree split identifier (allowSplitBtVer) in the allowed binary split process:
[0177] If MG1 < the second feature threshold and MG2 < the second feature threshold, then the binary tree block identifier (allowBtSplit) is FALSE.
[0178] In one embodiment of this disclosure, according to the H.266 / VVC specification, the following is added to the criteria for determining the allowable vertical ternary split identifier (allowSplitTtVer) in the allowed ternary split process:
[0179] If MG1 < the second feature threshold and MG2 < the second feature threshold, then the allowed ternary tree splitting identifier (allowTtSplit) is FALSE.
[0180] It should be noted that, when the first direction is horizontal and the first value is FALSE, the above embodiment describes the case where the first direction block partitioning identifier is determined to be FALSE based on the second and third texture feature values corresponding to the data block to be encoded. If the first direction block partitioning identifier is FALSE, it indicates that the horizontal block partitioning method is not used when performing block partitioning processing on the data block to be encoded. This does not mean that if MG1>= the second feature threshold, or MG2>= the second feature threshold, the corresponding allowed horizontal binary tree block partitioning identifier (allowSplitBtHor) or allowed horizontal ternary tree block partitioning identifier (allowSplitTtHor) is TRUE. According to the H.266 / VVC specification, the criteria for determining the allowable binary split identifier (allowBtSplit) in allowed binary split processing include other conditions. If any one or more of these conditions are met (TRUE), the allowable binary split identifier (allowBtSplit) is FALSE, and correspondingly, the allowable horizontal binary split identifier (allowSplitBtHor) is also FALSE. Only when none of the conditions are met is the allowable binary split identifier (allowBtSplit) TRUE, and correspondingly, the allowable horizontal binary split identifier (allowSplitBtHor) is TRUE. The allowable horizontal ternary tree split identifier (allowSplitTtHor) and the allowable ternary tree split identifier (allowTtSplit) are determined in a similar manner, and will not be discussed in detail here.
[0181] The relevant markings in the vertical direction are also determined in a similar way, which will not be discussed in detail here.
[0182] In some feasible embodiments, other judgment conditions can be found in sections 6.4.2 and 6.4.3 of the H.266 / VVC specification.
[0183] This disclosure provides a video encoding method, such as... Figure 9 As shown, it includes:
[0184] Step 910: According to the method described in steps 710 and 720, perform an optimal partitioning process on the data block to be encoded, determine the optimal partitioning method corresponding to the current block partitioning depth of the data block to be encoded, and determine whether to continue partitioning to the next depth.
[0185] Step 920: If it is determined that the next depth of partitioning will not be continued, the data block to be encoded is partitioned according to the determined preferred partitioning method, and the subsequent encoding steps of the data block to be encoded are completed.
[0186] In one embodiment of this disclosure, such as Figure 10 As shown, the video encoding method further includes:
[0187] Step 930: If it is determined to continue the division to the next depth, the data block to be encoded is divided according to the determined preferred division method, and then the block division and encoding steps of the next depth are performed sequentially on each of the divided data sub-blocks to be encoded.
[0188] It is understood that after determining the first direction block partitioning identifier in step 910 according to the encoding method described in any embodiment of this disclosure, when the first direction block partitioning identifier is a first value, the first direction block partitioning method is not used when performing the available partitioning method optimization process for the data block to be encoded; that is, when performing the available partitioning method optimization process for the data block to be encoded, the available partitioning method does not include the first direction block partitioning method.
[0189] In one embodiment of this disclosure, step 910 includes:
[0190] Based on the texture features corresponding to the data block to be encoded, determine the first direction block partitioning identifier corresponding to the data block to be encoded;
[0191] When the first direction block partitioning identifier is a first value, when performing the optimization process of available partitioning methods for the data block to be encoded, the available partitioning methods do not include the first direction block partitioning method.
[0192] After performing the optimal partitioning process on the data block to be encoded, a partitioning evaluation result corresponding to at least one available partitioning method is obtained;
[0193] From the partitioning evaluation results corresponding to the at least one available partitioning method, select a partitioning method that is the preferred partitioning method corresponding to the current block partitioning depth of the video data block to be encoded.
[0194] Understandably, when it is determined that further partitioning to the next depth is necessary, the current video data block is divided according to the determined preferred partitioning method, resulting in multiple data sub-blocks. For each data sub-block, the process starts again from step 910. It can be seen that when each data sub-block starts again from step 910, its corresponding block partitioning depth is increased by 1.
[0195] It should be noted that the determination of whether to continue to the next depth is executed according to the relevant feasible scheme, and the specific aspects are not further discussed in the embodiments of this application.
[0196] The process of optimizing available partitioning methods for the data block to be encoded, and determining the optimal partitioning method corresponding to the current block partitioning depth, includes: attempting to partition the current data block using at least one available partitioning method, and selecting the method with the lowest rate-distortion cost as the optimal partitioning method; or, selecting a partitioning method with a rate-distortion rate less than a set rate-distortion threshold as the optimal partitioning method. The specific optimization process is implemented according to relevant schemes, and specific aspects are not discussed in detail in this embodiment.
[0197] In some feasible embodiments, the encoding method provided in this disclosure is implemented on the VVC reference software VTM11.0. Tests were conducted on text-based screen content videos (WebBrowsing, WordEditing, ChineseDocumentEditing, etc.) in intra-frame mode. For text-based screen content videos, adaptively skipping horizontal binary tree partitioning and horizontal ternary tree partitioning resulted in an average encoding performance loss of 0.71% and an average reduction in encoding time of 12.6%. The data shows that the scheme of this disclosure can effectively save encoding time without significantly reducing encoding performance. In other words, for text-based screen content videos, this technology can significantly reduce encoding complexity while maintaining encoding performance substantially equivalent to related technologies.
[0198] It is understood that the video encoding scheme provided in this disclosure analyzes the spatial distribution of pixels in the image corresponding to the video data block to determine whether its texture features do not require block partitioning in the first direction. For example, if a single line of words fills the entire vertical direction of the block, it indicates that horizontal partitioning is required. Each horizontal sub-block is only a part of the word, and the possibility of finding similar matching blocks is small. Therefore, it is determined that this type of data block meets the condition of not performing horizontal partitioning. When performing block partitioning related processing for this data block, horizontal partitioning is not required. For example, when performing optimization processing of available partitioning methods, horizontal partitioning methods are not included among the available partitioning methods, that is, attempts at horizontal partitioning methods are skipped. This can save computing resources and shorten encoding time.
[0199] It should be noted that the embodiments of this disclosure exemplify a comparison scheme based on MG and a first feature threshold, as well as a comparison scheme based on MG1, MG2, and a second feature threshold, and a calculation scheme for MG, MG1, and MG2. Based on these examples, other equivalent variations of the judgment scheme can also be used to determine that the spatial distribution of pixels in the image corresponding to the video data block is not suitable for division using the first direction, thereby skipping these unsuitable block division attempts in subsequent block processing.
[0200] One embodiment of this disclosure also provides a video encoding device, such as... Figure 11 As shown, it includes a processor and a memory storing a computer program that can run on the processor, wherein the processor executes the computer program to implement the video encoding method as described in any embodiment of this disclosure.
[0201] An embodiment of this disclosure also provides a non-transient computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the video encoding method as described in any embodiment of this disclosure.
[0202] An embodiment of this disclosure also provides a bitstream, wherein the bitstream is generated according to a video encoding method as described in any embodiment of this disclosure.
[0203] As can be seen, the block partitioning and encoding / decoding method provided in this embodiment analyzes the pixel spatial distribution of the image to be encoded to determine the corresponding texture features. Based on the texture features, when performing block partitioning related processing, unsuitable block partitioning methods are skipped, which can effectively reduce the amount of computation at the encoding end and shorten the encoding time.
[0204] In one or more exemplary embodiments, the described functionality may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functionality may be stored as one or more instructions or code on or transmitted via a computer-readable medium and executed by a hardware-based processing unit. The computer-readable medium may comprise a computer-readable storage medium corresponding to a tangible medium, such as a data storage medium, or a communication medium comprising any medium facilitating the transfer of a computer program from one place to another, such as according to a communication protocol. In this manner, a computer-readable medium may generally correspond to a non-transitory tangible computer-readable storage medium or 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 disclosure. Computer program products may comprise computer-readable media.
[0205] For example, and not as a 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 medium 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 may also be referred to as a computer-readable medium. 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 medium. However, it should be understood that computer-readable storage media and data storage media do not include connections, carrier waves, signals, or other transient media, but rather refer to non-transient tangible storage media. As used herein, disks and optical discs include compact optical discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks, or Blu-ray discs, where disks typically reproduce data magnetically, while optical discs use lasers to reproduce data optically. The above combinations should also be included within the scope of computer-readable media.
[0206] Instructions can be executed by one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field-programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Therefore, the term "processor" as used herein can refer to any of the above-described structures or any other structures suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described herein can be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into combined codecs. Furthermore, the techniques can be fully implemented in one or more circuit or logic elements.
[0207] The technical solutions of the embodiments of this disclosure can be implemented in a wide variety of devices or equipment, including wireless mobile phones, integrated circuits (ICs), or a set of ICs (e.g., chipsets). Various components, modules, or units are described in the embodiments of this disclosure to emphasize functional aspects of a device configured to perform the described techniques, but they do not necessarily need to be implemented through different hardware units. Rather, as described above, the various units can be combined in codec hardware units or provided by a collection of interoperable hardware units (including one or more processors as described above) combined with suitable software and / or firmware.
[0208] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
Claims
1. A video encoding method, characterized in that, include: Based on the texture features corresponding to the data block to be encoded, determine the first direction block partitioning identifier corresponding to the data block to be encoded; When the first direction block partitioning identifier is a first value, the first direction block partitioning method is not used when performing block partitioning processing on the data block to be encoded; The texture features include: a second texture feature value and a third texture feature value; When the first direction is horizontal, the second and third texture feature values are determined as follows: Horizontal pixel aggregation is performed on the data block to be encoded to obtain a single-column pixel vector; Calculate the gradient of all N components in the single-column pixel vector; The maximum value among the gradients of the first M components in the single-column pixel vector is determined as the second texture feature value; The maximum value among the gradients of the last NM components in the single-column pixel vector is determined as the third texture feature value; or, When the first direction is vertical, the second and third texture feature values are determined as follows: Vertical pixel aggregation is performed on the data block to be encoded to obtain a single-row pixel vector; Calculate the gradient of all N components in the single-row pixel vector; The maximum value among the gradients of the first M components in the single-row pixel vector is determined as the second texture feature value; The maximum value among the gradients of the last NM components in the single-row pixel vector is determined as the third texture feature value; The first direction block division identifier is determined according to the following method: If the second texture feature value is less than the second feature threshold and the third texture feature value is less than the second feature threshold, the first directional block partitioning identifier is determined to be the first value.
2. The video encoding method as described in claim 1, characterized in that, The step of not using the first direction block partitioning method when performing block partitioning processing of the data block to be encoded includes: When performing optimization of available partitioning methods for the data block to be encoded, the available partitioning methods do not include the first direction block partitioning method.
3. The video encoding method as described in claim 1, characterized in that, The first directional block partitioning identifier includes: an identifier that allows horizontal binary tree block partitioning; or, The first directional block partitioning identifier includes: a vertical binary tree block partitioning identifier.
4. The video encoding method as described in claim 1, characterized in that, The y-th component line(y) in the single-column pixel vector Line is calculated according to the following formula: Wherein, CU(x,y) is the pixel value of the data block to be encoded at position (x,y), and CUWidth is the width of the data block to be encoded; or, The x-th component line(x) in the single-row pixel vector Line is calculated according to the following formula: Wherein, CU(x,y) is the pixel value of the data block to be encoded at position (x,y), and CUHeight is the height of the data block to be encoded.
5. The video encoding method as described in claim 4, characterized in that, The gradient of each component in the single-column pixel vector is calculated according to the following formula: G(y) = |line(y) - line(y+1)| Where G(y) is the gradient of the y-th component in the single-column pixel vector; or, The gradient of each component in the single-row pixel vector is calculated according to the following formula: G(x) = |line(x) - line(x+1)| Wherein, G(x) is the gradient of the x-th component in the single-row pixel vector.
6. A video encoding device, characterized in that, It includes a processor and a memory storing a computer program that can run on the processor, wherein the processor executes the computer program to implement the video encoding method as described in any one of claims 1 to 5.
7. A non-transient computer-readable storage medium, wherein the computer-readable storage medium stores a computer program and a bitstream, wherein, When the computer program is executed by a processor, it implements the steps of the video encoding method as described in any one of claims 1 to 5 to generate the bitstream.
Citation Information
Patent Citations
Multifunctional video coding CU division rapid decision method and storage medium
CN111147867A