Video coding method and device, storage medium and code stream
Patent Information
- Application Number
- CN202280097191.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-19
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2042-07-19
AI Technical Summary
Existing video coding technology has unnecessary computational overhead and waste of coding time when processing text content. Especially for left-to-right or top-to-bottom writing modes, the traditional block division method may produce a large number of unnecessary The overhead of horizontal or vertical segmentation results in increased coding complexity.
The first direction block division identifier is determined according to the texture characteristics of the data block to be encoded. If certain conditions are met, the horizontal or vertical block division method is skipped and a more suitable block method is used to reduce coding overhead and save computing resources.
By skipping unnecessary chunking, the encoding complexity and time are significantly reduced, and the encoding efficiency is improved. Especially when processing text-based screen content videos, the encoding performance loss is only 0.71%, and the encoding time is reduced by 12.6%. .
Smart Images

Figure CN119384825A_ABST
Abstract
Description
Video encoding method, device, storage medium and code stream Technical Field
[0001] The embodiments of the present disclosure relate to, but are not limited to, the field of video data processing technology, and in particular to a video data encoding method, device, storage medium, and code stream. Background Art
[0002] Digital video compression technology primarily compresses massive amounts of digital video data for easier transmission and storage. With the surge in Internet video usage and increasing demand for higher-quality video, while existing digital video compression standards can save significant amounts of video data, there is a continued need for better digital video compression technologies to reduce bandwidth and traffic pressures associated with digital video transmission, enabling 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 multiple specific available configuration schemes and make the best selection. Therefore, under the premise of meeting the requirements of video data playback and transmission, in the field of encoding technology, on the one hand, it is necessary to seek better video compression technology solutions, and on the other hand, it is also necessary to take into account encoding efficiency.
[0004] Summary of the Invention
[0005] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0006] The present disclosure provides a video encoding method, including:
[0007] Determining a first direction block division identifier corresponding to the data block to be encoded according to a texture feature corresponding to the data block to be encoded;
[0008] When the first-direction block division identifier is a first value, the first-direction block division method is not used when performing block division processing on the data block to be encoded.
[0009] An embodiment of the present disclosure further provides a video encoding device, comprising a processor and a memory storing a computer program that can be run on the processor, wherein when the processor executes the computer program, the video encoding method as described in any embodiment of the present disclosure is implemented.
[0010] An embodiment of the present disclosure further provides a non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the video encoding method as described in any embodiment of the present disclosure.
[0011] The embodiment of the present disclosure further provides a code stream, wherein the code stream is generated according to the video encoding method as described in any embodiment of the present disclosure.
[0012] Still other aspects will become apparent upon reading and understanding the accompanying drawings and detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings are used to provide an understanding of the embodiments of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solutions of the present disclosure and do not constitute a limitation to the technical solutions of the present disclosure.
[0014] FIG1 is a structural block diagram of a video encoding and decoding system that can be used in an embodiment of the present disclosure;
[0015] FIG2 is a structural block diagram of a video encoder that can be used in an embodiment of the present disclosure;
[0016] FIG3 is a structural block diagram of a video decoder that can be used in an embodiment of the present disclosure;
[0017] FIG4 is a schematic diagram of multiple types of trees that may be used in embodiments of the present disclosure;
[0018] FIG5 is a schematic diagram of a block partitioning process that can be used in an embodiment of the present disclosure;
[0019] FIG6 is a schematic diagram of a QTMT block partitioning result that can be used in an embodiment of the present disclosure;
[0020] FIG7 is a flowchart of a video encoding method that can be used in an embodiment of the present disclosure;
[0021] FIG8 is a schematic diagram of calculating a first texture feature value that can be used in an embodiment of the present disclosure;
[0022] FIG9 is a flow chart of another video encoding method that can be used in an embodiment of the present disclosure;
[0023] FIG10 is a flow chart of another video encoding method that can be used in an embodiment of the present disclosure;
[0024] FIG11 is a schematic diagram of the structure of a video encoding device that can be used in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] The present disclosure describes multiple embodiments, but the description is exemplary rather than restrictive, and it is obvious to those skilled in the art that there may be more embodiments and implementations within the scope of the embodiments described in the present disclosure.
[0026] In this disclosure, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment described as "exemplary" or "for example" in this disclosure should not be interpreted as being preferred or advantageous over other embodiments.
[0027] When describing representative exemplary embodiments, the specification may have presented the method and / or process as a specific sequence of steps. However, to the extent that the method or process does not rely on the specific order of the steps described herein, the method or process should not be limited to the steps in the specific order described. As will be understood by those skilled in the art, other orders of steps are also possible. Therefore, the specific order of the steps set forth in the specification should not be interpreted as a limitation on the claims. In addition, the claims to the method and / or process should not be limited to performing their steps in the order written, and those skilled in the art can readily understand that these orders can be changed and still remain within the spirit and scope of the disclosed embodiments.
[0028] Currently, common video codec standards all use a block-based hybrid coding framework. Each video frame is divided into square maximum coding units (LCUs) or coding tree units (CTUs) of the same size (e.g., 128x128, 64x64, etc.). Each LCU or CTU can be divided into rectangular coding units (CUs) according to a rule. Coding units may also be divided into prediction units (PUs) and transform units (TUs). The hybrid coding framework includes modules such as prediction, transform, quantization, entropy coding, and in-loop filtering. The prediction module includes intra-frame prediction and inter-frame prediction. Inter-frame prediction includes motion estimation and motion compensation. Because there is a strong correlation between adjacent pixels in a video frame, intra-frame prediction is used in video coding and decoding technology to eliminate spatial redundancy between adjacent pixels. Since there is a strong similarity between adjacent frames in a video, the inter-frame prediction method is used in video coding and decoding technology to eliminate the temporal redundancy between adjacent frames, thereby improving coding efficiency.
[0029] Internationally, mainstream video coding and decoding 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 of these standards, or any other customized standards. These standards use video compression technology to reduce the amount of transmitted and stored data to achieve more efficient video coding and decoding and transmission and storage.
[0030] In H.264 / AVC, the input image is divided into fixed-size blocks as the basic encoding unit, called macroblocks (MBs). These blocks consist of one luminance block and two chrominance blocks, with the luminance block size being 16×16. If 4:2:0 sampling is used, the chrominance block size is half the size of the luminance block. During the prediction phase, macroblocks are further divided into smaller blocks for prediction, depending on the prediction mode. In intra-frame prediction, macroblocks can be divided into 16×16, 8×8, or 4×4 blocks, with each block performing intra-frame prediction separately. During the transform and quantization phase, macroblocks are divided into 4×4 or 8×8 blocks, and the prediction residuals in each block are transformed and quantized to obtain quantized coefficients.
[0031] Compared with H.264 / AVC, H.265 / HEVC has taken improvements in multiple coding links. 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 a luma coding tree block (CTB) and two chroma coding tree blocks. The maximum size of a CU in the H.265 / HEVC standard is generally 64×64. To accommodate a variety of video content and video features, the CTU is iteratively divided into a series of coding units (CUs) using a quadtree (QT) method. The CU is the basic unit for intra / inter coding. A CU contains a luma coding block (CB) and two chroma coding blocks and related syntax structures. The maximum CU size is CTU, and the minimum CU size is 8×8. The leaf CUs obtained by coding tree partitioning can be divided into three types based on the prediction method: intra CUs (for intra-frame prediction), inter CUs (for inter-frame prediction), and skipped CUs. Skipped CUs can be considered a special case of inter CUs, lacking motion information or prediction residual information. A leaf 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 mode, two possible partitioning modes are Part_2Nx2N and Part_NxN. For the prediction residual signal, the CU is partitioned into transform units (TUs) using a prediction residual quadtree. A TU consists of 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 uses the same transform and quantization process, supporting sizes from 4×4 to 32×32. Different from previous coding standards, in inter-frame prediction, TB can cross the boundary of PB to further maximize the coding efficiency of inter-frame coding.
[0032] In H.266 / VVC, the video encoding image is first divided into coding tree units (CTUs), similar to those in H.265 / HEVC, but with a maximum size increased from 64×64 to 128×128. H.266 / VVC introduces quadtree and nested multi-type tree (MTT) partitioning. MTT includes binary tree (BT) and ternary tree (TT). It unifies the concepts of CU, PU, and TU in H.265 / HEVC and supports more flexible CU partitioning structures. CTUs are partitioned using a quadtree structure, with leaf nodes further partitioned using MTT. The leaf nodes of the MTT become coding units (CUs). When a CU is no larger than the maximum transform unit (64×64), it is not further partitioned for subsequent prediction and transform. In most cases, CUs, PUs, and TUs are of the same size. Considering the different characteristics of luma and chroma and the parallelism required for specific implementations, H.266 / VVC allows chroma to use a separate partitioning tree, rather than aligning it with the luma partitioning tree. In H.266 / VVC, the chroma division of I frames uses a chroma separation tree, while the chroma division of P frames and B frames is consistent with the luminance division.
[0033] FIG1 is a block diagram of a video encoding and decoding system that can be used in an embodiment of the present disclosure. As shown in FIG1 , the system is divided into an encoding side device 1 and a decoding side device 2. The encoding side device 1 encodes the video image to generate a code stream. The decoding side device 2 can decode the code stream to obtain a reconstructed video image. The encoding side device 1 and the decoding side device 2 can include one or more processors and a memory coupled to the one or more processors, such as a random access memory, a electrically erasable programmable read-only memory, a flash memory, or other media. The encoding side device 1 and the decoding side device 2 can be implemented using various devices, such as a desktop computer, a mobile computing device, a laptop computer, a tablet computer, a set-top box, a television, a camera, a display device, a digital media player, an in-vehicle computer, or other similar devices.
[0034] The decoding device 2 can receive a code stream from the encoding device 1 via a link 3. Link 3 includes one or more media or devices capable of transferring the code stream from the encoding device 1 to the decoding device 2. In one example, link 3 includes one or more communication media that enable the encoding device 1 to send the code stream directly to the decoding device 2. The encoding device 1 can modulate the code stream according to a communication standard (e.g., a wireless communication protocol) and transmit the modulated code stream to the 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, a wide area network, or a global network (e.g., the Internet). The one or more communication media may include routers, switches, base stations, or other devices that facilitate communication from the encoding device 1 to the decoding device 2. In another example, the code stream may be output from the output interface 15 to a storage device, from which the decoding device 2 can read the stored data via streaming or downloading. The storage device may include any of a variety of distributed or locally accessed data storage media, such as hard drives, Blu-ray discs, DVDs, CD-ROMs, flash memory, volatile or non-volatile memory, file servers, and the like.
[0035] In the example shown in FIG1 , encoding device 1 includes a data source 11, an encoder 13, and an output interface 15. In some examples, 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. Encoder 13 may encode the data from data source 11 and output it to output interface 15, which may include at least one of a regulator, a modem, and a transmitter.
[0036] In the example shown in FIG1 , 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 can receive a code stream via the link 3 or from a storage device. The decoder 23 decodes the received code stream. The display device 25 is used to display the decoded data. The display device 25 can be integrated with other devices of the decoding side device 2 or provided separately. The display device 25 can 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.
[0037] The encoder 13 and decoder 23 of FIG1 may be implemented using any one of the following circuits or any combination thereof: one or more microprocessors, digital signal processors, application specific integrated circuits, field programmable gate arrays, discrete logic, or hardware. If the present disclosure is implemented in part in software, instructions for the software may be stored in a suitable non-volatile computer-readable storage medium, and one or more processors may be used to execute the instructions in hardware to implement the disclosed method.
[0038] Figure 2 shows a block diagram of an exemplary video encoder structure. This example describes the terminology and block partitioning method based on the H.265 / HEVC standard, but the structure of this video encoder can also be used for video encoding in H.264 / AVC, H.266 / VVC, and other similar standards.
[0039] As shown in the figure, the video encoder 20 is used to encode video data and generate a bitstream. As shown in the figure, 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 picture 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 shown in this example. The prediction residual generation unit 102 and the reconstruction unit 112 are both represented by circles with plus signs in the figure.
[0040] The division unit 101 cooperates 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 division unit 101 may be a video sequence including video frames such as I frames, P frames or B frames.
[0041] 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 CU, the 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 CU, the 2N×2N CU can be divided into PUs of 2N×2N, 2N×N, N×2N, N×N, or other sizes for inter-frame prediction. Asymmetric partitioning of PUs is also supported.
[0042] Inter-prediction processing unit 121 may perform inter prediction on a PU, generating prediction data for the PU, which includes the prediction block of the PU, motion information of the PU, and various syntax elements.
[0043] Intra-prediction processing unit 126 may perform intra prediction on a PU and generate prediction data for the PU. The prediction data for the PU may include the PU's prediction block and various syntax elements. Intra-prediction processing unit 126 may try multiple selectable intra-prediction modes and select the one with the lowest cost to perform intra prediction on the PU.
[0044] The prediction residual generation unit 102 may generate a prediction residual block of the CU based on the original block of the CU and the prediction block of the PU partitioned by the CU.
[0045] The transform processing unit 104 may divide a CU into one or more transform units (TUs). The prediction residual block associated with a TU is a sub-block obtained by dividing the prediction residual block of the CU. One or more transforms are applied to the prediction residual block associated with the TU to generate a coefficient block associated with the TU. For example, the transform processing unit 104 may apply a discrete cosine transform (DCT), a directional transform, or other transform to the prediction residual block associated with the TU to convert the prediction residual block from the pixel domain to the frequency domain.
[0046] The quantization unit 106 may quantize the coefficients in the coefficient block based on a selected quantization parameter (QP). Quantization may result in quantitative losses. The degree of quantization of the coefficient block may be adjusted by adjusting the QP value.
[0047] The inverse quantization unit 108 and the inverse transform unit 110 may apply inverse quantization and inverse transform to the coefficient block, respectively, to obtain a reconstructed prediction residual block associated with a TU.
[0048] The reconstruction unit 112 may generate a reconstructed block of the CU based on the reconstructed prediction residual block and the prediction block generated by the prediction processing unit 100 .
[0049] Filter unit 113 performs loop filtering on the reconstructed block and stores it in decoded picture buffer 114. Intra-prediction processing unit 126 can extract reconstructed reference information adjacent to the PU from the reconstructed block cached in decoded picture buffer 114 to perform intra-prediction on the PU. Inter-prediction processing unit 121 can use the reference picture containing the reconstructed block cached in decoded picture buffer 114 to perform inter-prediction on PUs of other pictures.
[0050] The entropy coding unit 116 may perform entropy coding operations, such as context-adaptive variable length coding (CAVLC) and context-adaptive binary arithmetic coding (CABAC), on the received data (e.g., syntax elements, quantized systematic blocks, motion information, etc.), and output a bitstream (i.e., an encoded video bitstream).
[0051] Figure 3 shows a block diagram of an exemplary video decoder structure. This example describes the terminology and block partitioning of the H.265 / HEVC standard, but the structure of this video decoder can also be used for video decoding in H.264 / AVC, H.266 / VVC, and other similar standards.
[0052] The video decoder 30 can decode the received bitstream and output 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 (indicated by a circle with a plus sign in the figure), a filter unit 159, and a picture buffer 160. In other embodiments, the video decoder 30 may include more, fewer, or different functional components.
[0053] Entropy decoding unit 150 performs entropy decoding on the received bitstream, extracting information such as syntax elements, quantized coefficient blocks, and PU motion information. Prediction processing unit 152, inverse quantization unit 154, inverse transform processing unit 156, reconstruction unit 158, and filter unit 159 can all perform corresponding operations based on the syntax elements extracted from the bitstream.
[0054] As a functional component performing reconstruction operations, inverse quantization unit 154 may inverse quantize the coefficient block associated with the quantized TU. Inverse transform processing unit 156 may apply one or more inverse transforms to the inverse quantized coefficient block to generate a reconstructed prediction residual block for the TU.
[0055] Prediction processing unit 152 includes inter-prediction processing unit 162 and intra-prediction processing unit 164. If a PU is encoded using intra prediction, intra-prediction processing unit 164 may determine an intra prediction mode for the PU based on syntax elements parsed from the codestream, perform intra prediction based on the determined intra prediction mode and reconstructed reference information of the PU's neighbors obtained from picture buffer 60, and generate a prediction block for the PU. If a PU is encoded using inter prediction, inter-prediction processing unit 162 may determine one or more reference blocks for the PU based on the motion information of the PU and corresponding syntax elements, and generate a prediction block for the PU based on the reference blocks.
[0056] The reconstruction unit 158 may obtain a reconstructed block of the CU based on the reconstructed prediction residual block associated with the TU and the prediction block of the PU generated by the prediction processing unit 152 (ie, intra-frame prediction data or inter-frame prediction data).
[0057] Filter unit 159 may perform loop filtering on the reconstructed blocks of the CU to obtain a reconstructed picture. The reconstructed picture is stored in picture buffer 160. Picture buffer 160 may provide reference pictures for subsequent motion compensation, intra-frame prediction, inter-frame prediction, etc., and may also output the reconstructed video data as decoded video data for presentation on a display device.
[0058] Because video coding includes two parts, encoding and decoding, for the convenience of subsequent description, encoding on the encoder side and decoding on the decoder side can also be collectively referred to as encoding or decoding. According to the context of the relevant steps, those skilled in the art can know whether the encoding (decoding) mentioned later refers to encoding on the encoder side or decoding on the decoder side. The term "coding block" or "video block" may be used in this application to refer to one or more blocks of samples, and the grammatical structure for encoding (decoding) one or more sample blocks; instance types of coding blocks or video blocks may include CTU, CU, PU, TU, subblock in H.265 / HEVC, CTU, CU in H.266 / VVC, or macroblocks, macroblock partitions, etc. in other video coding and decoding standards.
[0059] The following is an introduction to some of the concepts involved in the embodiments of the present disclosure. The relevant records of the embodiments of the present disclosure use the terms in H.265 / HEVC or H.266 / VVC for easy explanation. However, the solution provided by the embodiments of the present disclosure is not limited to H.265 / HEVC or H.266 / VVC. In fact, the technical solution provided by the embodiments of the present disclosure can also be implemented in H.264 / AVC, MPEG, AOM, AVS, etc., as well as the subsequent and extension of these standards.
[0060] CTU is the abbreviation of Coding Tree Unit, which is the coding processing unit in H.265 / HEVC or H.266 / VVC, equivalent to the macroblock in H.264 / AVC. According to the YUV sampling format, a coding tree unit (CTU) should contain a luma coding tree block (CTB) and two chroma coding tree blocks (CTBs) (Cr, Cb) at the same position.
[0061] A coding unit (CU) is the basic unit for performing various types of encoding or decoding operations during the video encoding and decoding process, such as CU-based prediction, transform, entropy coding, and other operations. A CU is a two-dimensional array of sampling points, which can be a square array or a rectangular array. For example, a 4x8 CU can be viewed as a square sampling point array consisting of 4x8, totaling 32 sampling points. A CU is also called an image block. A CU consists of: a luma coding block and two chroma (Cr, Cb) coding blocks, and related syntax structures.
[0062] A prediction unit (Prediction Unit), also known as a prediction block, includes: a luma prediction block and two chroma (Cr, Cb) prediction blocks.
[0063] A residual block refers to a residual image block formed by subtracting the prediction block from the current block to be encoded after the prediction block of the current block is generated through inter-frame prediction and / or intra-frame prediction. It can also be called residual data or residual image, and includes: a luminance residual block and two chrominance (Cr, Cb) residual blocks.
[0064] The coefficient block includes a transform block (TU, Transform Unit) containing transform coefficients obtained by transforming the residual block, or a residual block containing residual data (residual signal) without transforming the residual block. In the embodiment of the present disclosure, the coefficient includes the coefficient of the transform block obtained by transforming the residual block, or the coefficient of the residual block, and entropy coding the coefficient includes entropy coding the coefficient of the transform block after quantization, or, if the transform is not applied to the residual data, including entropy coding the coefficient of the residual block after quantization. The untransformed residual signal and the transformed residual signal can also be collectively referred to as coefficients (coefficient). In order to perform effective compression. Generally, the coefficients need to be quantized, and the quantized coefficients can also be called levels. Among them, the transform block TU includes: a luminance transform block and two chrominance (Cr, Cb) transform blocks.
[0065] Quantization is commonly used to reduce the dynamic range of coefficients, thereby achieving the goal of expressing video with fewer codewords. The quantized value is often called a level. Quantization is typically 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, all coefficients can be quantized 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 scan order. In international video compression standards, quantization can exploit the correlation between coefficients and the characteristics of the quantized coefficients to select the optimal quantization method, thereby achieving quantization optimization.
[0066] As you can see, the residual block is typically much simpler than the original image. Therefore, predicting the residual before encoding can significantly improve compression efficiency. The residual block isn't encoded directly; instead, it's usually transformed first. This transform converts the residual image from the spatial domain to the frequency domain, removing correlation within the residual image. Since the energy of the residual image is mostly concentrated in the low-frequency region, the non-zero coefficients after the transformation are mostly concentrated in the upper left corner. After the transformation, quantization is used for further compression. Furthermore, since the human eye is less sensitive to high frequencies, a larger quantization step size can be used in high-frequency regions to further improve compression efficiency.
[0067] A CTU can be further divided into multiple CUs. H.266 / VVC uses a more complex coding unit partitioning structure (QTMT, a quadtree with nested multi-type trees) than H.265 / HEVC. It adds two binary tree (BT) partitioning methods and two ternary tree (TT) partitioning methods to the HEVC quadtree (QT) partitioning method. BT and TT are collectively referred to as multi-type trees (MTs), as shown in Figure 4. A CTU is first partitioned using a quadtree, and then the leaf nodes of the quadtree can be further partitioned using MTs. Specifically, the CU partitioning process is shown in Figure 5.
[0068] Among them, the default size of VVC's CTU 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 division method, QT division cannot be performed subsequently.
[0069] Theoretically, QT nodes can be divided in the five ways shown in Figure 5, and MT nodes can be divided in the four ways shown in the figure. For example, the possible QTMT division results of a CTU are shown in Figure 6.
[0070] In the encoder, the QTMT block division is located in the intra-frame / inter-frame prediction processing unit. According to different block divisions, the corresponding reference block is searched for prediction, and the division mode with the lowest rate-distortion cost is found (that is, the block division method is optimized as described in the embodiment of the present disclosure to determine the corresponding preferred division mode), thereby obtaining the final prediction residual, and performing the next step of transformation and quantization to complete the block coding. In the decoder, the QTMT block division is located in the intra-frame / inter-frame prediction processing unit. After determining the division tree of the current CU based on prediction information such as the block division mode, the subsequent decoding steps are further completed.
[0071] Some possible encoding schemes are as follows:
[0072] (1) The input image is divided into multiple non-overlapping CU blocks (i.e., the largest CU block: CTU);
[0073] (2) Process each CU in sequence according to the raster scan order, first determine the possible partitioning methods according to the standard, then try each block partitioning method in turn, and take the method with the lowest rate-distortion cost as the optimal partitioning method;
[0074] (3) If the current CU can be further divided, repeat the process (2) for the divided sub-CU; otherwise, end the current CU encoding, and determine the optimal block division method and optimal prediction mode of the current CU. At the same time, calculate the residual block, transform, quantize, and entropy encode the residual block, encode the prediction information such as the block division mode, and output the code stream for transmission.
[0075] Accordingly, some feasible decoding schemes use the following method for decoding: first, the input bitstream is entropy decoded, inversely quantized, and inversely transformed to obtain the residual value; then, the image is reconstructed based on the residual block. The CU reconstruction process mainly includes the following three steps:
[0076] (a) Determine the partition tree of the current CU based on prediction information such as block partition mode.
[0077] (b) Use information such as motion vector to find the prediction block.
[0078] (c) The residual value of the current CU is superimposed with the predicted value to obtain the reconstructed CU. Finally, the reconstructed image is sent to the DBF / SAO / ALF filter, and the filtered image is sent to the buffer and waits for the video to be played.
[0079] It can be seen that among these achievable H.266 / VVC codec schemes, even if only quadtree partitioning is considered, there are 4 5 +4 4 +4 3 +4 2 +4 1 +4 0= 1365 partitioning modes, far exceeding the 341 modes in H.265 / HEVC. Adding binary and ternary tree partitioning methods, the theoretical total number of possible partitioning methods reaches several thousand. Therefore, these feasible QTMT technical solutions result in H.266 / VVC encoding complexity far exceeding that of H.265 / HEVC. For example, encoding a single high-definition video sequence (1080p) can take several days.
[0080] The study found that for text-based screen content video images, whether English words, Chinese characters, or other text, they are generally written from left to right, so the text segmentation is more likely to be vertical segmentation. For example, if the image contains the word OBBO, then when dividing the word area into blocks, it is more likely that the letters O or B will be separated out for prediction (inter-frame prediction or intra-frame block copy prediction) in order to find similar matching blocks (such as the word WTO contained in the reference image). Therefore, when encoding video images with text-based content, the relevant implementable QTMT technical solutions may generate a large amount of unnecessary overhead related to horizontal segmentation, wasting computing resources and increasing encoding time.
[0081] Similarly, for the top-down writing mode, the text segmentation is more likely to be horizontal segmentation. In this case, the relevant implementable QTMT technical solutions may generate a large amount of unnecessary overhead related to vertical segmentation.
[0082] The disclosed embodiment provides a video coding scheme that, based on the pixel spatial distribution characteristics (also called the texture characteristics or texture features of the image) in the image corresponding to the data block to be encoded, skips unnecessary block division methods when performing relevant block division processing to reduce encoding overhead, save computing resources, and shorten encoding time.
[0083] The present disclosure provides a video encoding solution, as shown in FIG7 , including:
[0084] Step 710: determining a first direction block division identifier corresponding to the data block to be encoded according to a texture feature corresponding to the data block to be encoded;
[0085] Step 720: When the first direction block division identifier is a first value, the first direction block division method is not used when performing block division processing on the data block to be encoded.
[0086] In one embodiment of the present disclosure, the block division process of the to-be-encoded data block does not use the first direction block division method, including:
[0087] When performing optimal selection processing on the available division modes for the data block to be encoded, the available division modes do not include the first direction block division mode.
[0088] It should be noted that the preferred processing of available partitioning methods for 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 ratio less than a set rate-distortion threshold as the preferred partitioning method. The specific preferred processing process is implemented according to the relevant solution, and the specific aspects are not discussed in detail in the embodiments of this application.
[0089] It can be seen that compared with the relevant feasible block division schemes, the block division scheme provided by the embodiment of the present disclosure further considers the texture features corresponding to the video data blocks within the range of available division methods determined in the relevant feasible block division schemes. For video data blocks that meet the set conditions, when trying multiple division methods, the horizontal or vertical block division method is skipped to reduce the encoding complexity and improve the encoding efficiency.
[0090] In an embodiment of the present disclosure, the first value is FALSE or 0; or other set values.
[0091] In an embodiment of the present disclosure, the first direction includes: a horizontal direction or a vertical direction.
[0092] In one embodiment of the present disclosure, the first direction includes: an inclined direction at a set angle, for example, a direction inclined 45 degrees to the left, a direction inclined 30 degrees to the right, etc., and is not limited to a specific angle.
[0093] In one embodiment of the present disclosure, the texture feature includes a first texture feature value;
[0094] When the first direction is a horizontal direction, the first texture feature value is determined according to the following method:
[0095] Performing horizontal pixel aggregation on the to-be-encoded data block to obtain a single-column pixel vector;
[0096] Calculating the gradient of each component in the single column pixel vector;
[0097] The maximum gradient among the gradients of all components of the single-column pixel vector is determined as the first texture feature value.
[0098] In one embodiment of the present disclosure, when the first direction is a vertical direction, the first texture feature value is determined according to the following method:
[0099] Performing vertical pixel aggregation on the to-be-encoded data block to obtain a single-row pixel vector;
[0100] Calculating the gradient of each component in the single row of pixel vectors;
[0101] The maximum gradient among the gradients of all components of the single-row pixel vector is determined as the first texture feature value.
[0102] In one embodiment of the present disclosure, the first direction block division identifier is determined according to the following method:
[0103] When the first texture feature value is less than a first feature threshold, the first direction block division identifier is determined to be a first value.
[0104] Accordingly, the first direction block division flag includes: a horizontal binary tree block division flag and a horizontal ternary tree block division flag;
[0105] or,
[0106] The first direction block division flag includes: a vertical binary tree block division flag and a vertical ternary tree block division flag.
[0107] In an embodiment of the present disclosure, the allowed horizontal binary tree block partitioning identifier is allowSplitBtHor defined in the H.266 / VVC specification.
[0108] In an embodiment of the present disclosure, the allowed horizontal ternary tree block partitioning identifier is allowSplitTtHor defined in the H.266 / VVC specification.
[0109] In an embodiment of the present disclosure, the vertical binary tree block partitioning allowed identifier is allowSplitBtVer defined in the H.266 / VVC specification.
[0110] In an embodiment of the present disclosure, the vertical ternary tree partitioning allowed identifies allowSplitTtVer defined in the H.266 / VVC specification.
[0111] It can be understood that in one embodiment of the present disclosure, when the first direction is the horizontal direction, when the first texture feature value determined corresponding to the video data block to be encoded is less than the first feature threshold, it indicates that the image corresponding to the video data block contains a single row of text characters that fills the entire data block in the vertical direction, and there is no need to divide the video data block in the horizontal direction; when the first direction is the vertical direction, when the text feature value determined corresponding to the video data block to be encoded is less than the first feature threshold, it indicates that the image corresponding to the video data block contains a single column of text characters that fills the entire data block in the horizontal direction, and there is no need to divide the video data block in the vertical direction.
[0112] In one embodiment of the present disclosure, the texture features include: a second texture feature value and a third texture feature value;
[0113] When the first direction is a horizontal direction, the second texture feature value and the third texture feature value are determined according to the following method:
[0114] Performing horizontal pixel aggregation on the to-be-encoded data block to obtain a single-column pixel vector;
[0115] Calculating the gradients of all N components in the single column pixel vector;
[0116] Determine the maximum value among the gradients of the first M components in the single column pixel vector as the second texture feature value;
[0117] 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.
[0118] In an embodiment of the present 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:
[0119] Performing vertical pixel aggregation on the to-be-encoded data block to obtain a single-row pixel vector;
[0120] Calculating the gradients of all N components in the single row of pixel vectors;
[0121] Determine the maximum value among the gradients of the first M components in the single-row pixel vector as the second texture feature value;
[0122] 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.
[0123] In one embodiment of the present disclosure, the first direction block division identifier is determined according to the following method:
[0124] When the second texture feature value is smaller than the second feature threshold and the third texture feature value is smaller than the second feature threshold, the first direction block division flag is determined to be a first value.
[0125] Accordingly, the first direction block division flag includes: a horizontal binary tree block division flag;
[0126] or,
[0127] The first direction block division flag includes: a flag allowing vertical binary tree block division.
[0128] In an embodiment of the present disclosure, the allowed horizontal binary tree block partitioning identifier is allowSplitBtHor defined in the H.266 / VVC specification.
[0129] In an embodiment of the present disclosure, the vertical binary tree block partitioning allowed identifier is allowSplitBtVer defined in the H.266 / VVC specification.
[0130] It should be noted that, taking the first value being FALSE and the first direction being the horizontal direction as an example, the embodiment of the present disclosure records a scheme in which the first direction block division flag is determined to be FALSE; if the first direction block division flag is FALSE, it indicates that the horizontal block division method is not used when the block division processing of the data block to be encoded is performed. For the case where the above judgment rules are not satisfied and it is not determined to be FALSE, whether the data block to be encoded is determined to have its first direction block division flag as TRUE needs to be judged according to other constraints in the relevant scheme, and the final judgment result can be FALSE or TRUE. Taking the first value being FALSE and the first direction being the vertical direction as an example, the embodiment of the present disclosure records a scheme in which the first direction block division flag is determined to be FALSE; if the first direction block division flag is FALSE, it indicates that the vertical block division method is not used when the block division processing of the data block to be encoded is performed. If 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 division flag set to TRUE needs to be determined based on other constraints in the relevant scheme. The final judgment result can be FALSE or TRUE. The specific judgment of other constraints in the relevant scheme is not illustrated in detail here. For the case where the first direction is other directions, a similar judgment scheme is also applied, which is not illustrated in detail here.
[0131] In one embodiment of the present disclosure, the y-th component line(y) in the single-column pixel vector Line is calculated according to the following formula:
[0132]
[0133] CU(x, y) is the pixel value of the video data block to be encoded at the position (x, y), and CUWidth is the width of the video data block to be encoded.
[0134] In one embodiment of the present disclosure, the gradient of each component in the single-column pixel vector is calculated according to the following formula:
[0135] G(y)=|line(y)-line(y+1)|
[0136] Wherein, G(y) is the gradient of the y-th component in the single column pixel vector.
[0137] In one embodiment of the present disclosure, the first texture feature value MG is determined according to the maximum gradient value of each component in a single column vector:
[0138] MG=maximum(G)
[0139] For example, after horizontal pixel aggregation is performed on the upper and lower video data blocks shown in Figure 8 , the gradients of the components of the single-column vectors are calculated, and the respective maximum gradient values MG are determined as the first texture feature values. If the first texture feature value of the upper video data block in Figure 8 is less than the first feature threshold of 80, then when performing the optimal block partitioning process for that video data block, attempts at horizontal binary tree and horizontal ternary tree block partitioning are skipped. If the first texture feature value of the lower video data block in Figure 8 is greater than the first feature threshold of 80, then attempts at block partitioning are performed according to the existing scheme.
[0140] In one embodiment of the present disclosure, the first feature threshold is 80; if the first texture feature value MG of the data block to be encoded is less than the first feature threshold (80), the first direction block division flag is determined to be FALSE. In one embodiment of the present disclosure, when performing a multi-partitioning method to try to select the best processing, the horizontal binary tree block and the horizontal ternary tree block are skipped.
[0141] Alternatively, the first feature threshold is set to other values according to the characteristics of the text characters, which is not limited to the above example.
[0142] In one embodiment of the present disclosure, according to the H.266 / VVC specification, the following is added to the judgment condition for determining the allowed horizontal binary tree split flag (allowSplitBtHor) in the allowed binary tree split process:
[0143] If MG is less than the first characteristic threshold, the binary tree split flag (allowBtSplit) is allowed to be FALSE.
[0144] In one embodiment of the present disclosure, according to the H.266 / VVC specification, the following is added to the judgment condition for determining the allowed horizontal ternary split flag (allowSplitTtHor) in the allowed ternary split process:
[0145] If MG<the first characteristic threshold, the ternary tree split flag (allowTtSplit) is allowed to be FALSE.
[0146] In one embodiment of the present disclosure, according to the H.266 / VVC specification, the following is added to the judgment condition for determining the vertical binary tree split flag (allowSplitBtVer) in the allowed binary tree split process (Allowed binary split process):
[0147] If MG is less than the first characteristic threshold, the binary tree split flag (allowBtSplit) is allowed to be FALSE.
[0148] In one embodiment of the present disclosure, according to the H.266 / VVC specification, the following is added to the judgment condition for determining the vertical ternary split flag (allowSplitTtVer) in the allowed ternary split process:
[0149] If MG<the first characteristic threshold, the ternary tree split flag (allowTtSplit) is allowed to be FALSE.
[0150] It should be noted that, when the first direction is the horizontal direction and the first value is FALSE, the above embodiment describes the case where the first direction block division flag is determined to be FALSE based on the first texture feature value of the image corresponding to the video data block to be encoded; the first direction block division flag being FALSE indicates that the horizontal block division method is not used when performing block division processing on the data block to be encoded. It does not mean that if MG>=the first feature threshold, the corresponding horizontal binary tree block division flag (allowSplitBtHor) or horizontal ternary tree block division flag (allowSplitTtHor) is TRUE. According to the H.266 / VVC specification, the conditions for determining the allowed binary tree split flag (allowBtSplit) in the allowed binary split process (Allowed binary split process) also include other conditions. If any one or more of the conditions are met (TRUE), the allowed binary tree split flag (allowBtSplit) is FALSE, and accordingly, the allowed horizontal binary tree split flag (allowSplitBtHor) is FALSE; when all conditions are not met, the allowed binary tree split flag (allowBtSplit) is TRUE, and accordingly, the allowed horizontal binary tree split flag (allowSplitBtHor) is TRUE. The allowed horizontal ternary tree split flag (allowSplitTtHor) and the allowed ternary tree split flag (allowTtSplit) are also determined in a similar manner and will not be discussed in detail here.
[0151] The vertical direction related identification is also determined in a similar manner and will not be discussed in detail here.
[0152] In some feasible embodiments, other judgment conditions may refer to sections 6.4.2 and 6.4.3 of the H.266 / VVC specification.
[0153] In one embodiment of the present disclosure, the xth component line(x) in the single-line pixel vector Line is calculated according to the following formula:
[0154]
[0155] CU(x, y) is the pixel value of the video data block to be encoded at the position (x, y), and CUHeight is the height of the video data block to be encoded.
[0156] The gradient of each component in the single-row pixel vector is calculated according to the following formula:
[0157] G(x)=|line(x)-line(x+1)|
[0158] Wherein, G(x) is the gradient of the xth component in the single row pixel vector.
[0159] In one embodiment of the present disclosure, the first texture feature value MG is determined according to the maximum gradient value of each component in a single row vector:
[0160] MG=maximum(G).
[0161] In one embodiment of the present disclosure, the second texture feature value MG1 and the third texture feature value MG2 are determined according to the gradient value of each component in a single column vector as follows:
[0162]
[0163]
[0164] In one embodiment of the present disclosure, N=CUHeight is the height of the video data block to be encoded, and M=CUHeight / 2.
[0165]
[0166]
[0167] In one embodiment of the present disclosure, N=CUWidth is the width of the video data block to be encoded, and M=CUWidth / 2.
[0168]
[0169]
[0170] It can be seen that the solution of determining the first direction block division identifier as the first value according to 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 divided into a binary tree in the first direction.
[0171] In one embodiment of the present disclosure, the second feature threshold is 80; 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 direction block division identifier is determined to be the first value. In one embodiment of the present disclosure, when performing a multi-partitioning method to try to select the best process, the first direction binary tree block is skipped.
[0172] Alternatively, the second feature threshold value may be set to other values according to the characteristics of the text characters, and is not limited to the above examples. The first feature threshold value and the second feature threshold value are set independently and may be the same or different.
[0173] In one embodiment of the present disclosure, according to the H.266 / VVC specification, the following is added to the judgment condition for determining the allowed horizontal binary tree split flag (allowSplitBtHor) in the allowed binary tree split process:
[0174] If MG1<the second characteristic threshold and MG2<the second characteristic threshold, the binary tree split flag (allowBtSplit) is FALSE.
[0175] In one embodiment of the present disclosure, according to the H.266 / VVC specification, the following is added to the judgment condition for determining the allowed horizontal ternary split flag (allowSplitTtHor) in the allowed ternary split process:
[0176] If MG1<the second characteristic threshold and MG2<the second characteristic threshold, the ternary tree split flag (allowTtSplit) is FALSE.
[0177] In one embodiment of the present disclosure, according to the H.266 / VVC specification, the following is added to the judgment condition for determining the vertical binary tree split flag (allowSplitBtVer) in the allowed binary tree split process (Allowed binary split process):
[0178] If MG1<the second characteristic threshold and MG2<the second characteristic threshold, the binary tree split flag (allowBtSplit) is FALSE.
[0179] In one embodiment of the present disclosure, according to the H.266 / VVC specification, the following is added to the judgment condition for determining the vertical ternary split flag (allowSplitTtVer) in the allowed ternary split process:
[0180] If MG1<the second characteristic threshold and MG2<the second characteristic threshold, the ternary tree split flag (allowTtSplit) is FALSE.
[0181] It should be noted that, when the first direction is the horizontal direction and the first value is FALSE, the above embodiment describes the case where the first direction block division flag is determined to be FALSE based on the second texture feature value and the third texture feature value corresponding to the data block to be encoded; the first direction block division flag being FALSE indicates that the horizontal block division method is not used when performing block division processing on the data block to be encoded. It does not mean that if MG1>=the second feature threshold, or MG2>=the second feature threshold, the corresponding horizontal binary tree block division flag (allowSplitBtHor) or horizontal ternary tree block division flag (allowSplitTtHor) is TRUE. According to the H.266 / VVC specification, the conditions for determining the allowed binary tree split flag (allowBtSplit) in the allowed binary split process (Allowed binary split process) also include other conditions. If any one or more of the conditions are met (TRUE), the allowed binary tree split flag (allowBtSplit) is FALSE, and accordingly, the allowed horizontal binary tree split flag (allowSplitBtHor) is FALSE; when all conditions are not met, the allowed binary tree split flag (allowBtSplit) is TRUE, and accordingly, the allowed horizontal binary tree split flag (allowSplitBtHor) is TRUE. The allowed horizontal ternary tree split flag (allowSplitTtHor) and the allowed ternary tree split flag (allowTtSplit) are also determined in a similar manner and will not be discussed in detail here.
[0182] The vertical direction related identification is also determined in a similar manner and will not be discussed in detail here.
[0183] In some feasible embodiments, other judgment conditions may refer to sections 6.4.2 and 6.4.3 of the H.266 / VVC specification.
[0184] The present disclosure provides a video encoding method, as shown in FIG9 , including:
[0185] Step 910: performing a preferred partitioning process on the data block to be encoded according to the method described in steps 710 and 720, determining a preferred partitioning process corresponding to a current block partitioning depth of the data block to be encoded, and determining whether to continue partitioning to the next depth.
[0186] Step 920 : When it is determined not 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 subsequent encoding steps of the data block to be encoded are completed.
[0187] In one embodiment of the present disclosure, as shown in FIG10 , the video encoding method further includes:
[0188] Step 930: When it is determined to continue the division at the next depth, after dividing the data block to be encoded according to the determined preferred division method, the block division and encoding steps at the next depth are sequentially performed on each sub-block of the data to be encoded obtained by the division.
[0189] It can be understood that after the first-direction block division identifier is determined in step 910 according to the encoding method described in any embodiment of the present disclosure, when the first-direction block division identifier is the first value, the first-direction block division method is not used when selecting the available division methods for the data block to be encoded; that is, when selecting the available division methods for the data block to be encoded, the first-direction block division method is not included in the available division methods.
[0190] In one embodiment of the present disclosure, step 910 includes:
[0191] Determining a first direction block division identifier corresponding to the data block to be encoded according to a texture feature corresponding to the data block to be encoded;
[0192] When the first direction block division identifier is a first value, when performing optimal processing on the available division modes for the to-be-encoded data block, the available division modes do not include the first direction block division mode;
[0193] After performing optimal processing of available partitioning modes on the data block to be encoded, obtaining a partitioning evaluation result corresponding to at least one available partitioning mode;
[0194] A preferred partitioning method corresponding to the current block partitioning depth of the to-be-encoded video data block is selected from the partitioning evaluation results corresponding to the at least one available partitioning method.
[0195] It is understood that when it is determined that the next depth of division is required, the current video data block is divided according to the determined preferred division method to obtain multiple data sub-blocks, and the process is repeated from step 910 for each data sub-block. It can be seen that when the process is repeated from step 910 for each data sub-block, the corresponding block division depth is increased by 1.
[0196] It should be noted that the determination of whether to continue the division to the next depth is performed according to relevant feasible solutions, and the specific aspects will not be further discussed in the embodiments of this application.
[0197] The preferred partitioning method is performed on the data block to be encoded, and determining the preferred partitioning method corresponding to the current block partition depth 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 ratio less than a set rate-distortion threshold as the preferred partitioning method. The specific preferred processing process is implemented according to the relevant scheme, and the specific aspects are not discussed in detail in the embodiments of this application.
[0198] In some achievable embodiments, the encoding method provided by the embodiments of the present disclosure is adopted and implemented on the VVC reference software VTM11.0. Then, text-type screen content videos (Web Browsing, Word Editing, Chinese Document Editing, etc.) are tested in intra-frame mode. For text-type screen content videos, the horizontal binary tree division and horizontal ternary tree division are adaptively skipped, and the average encoding performance loss is 0.71%, and the encoding time is reduced by an average of 12.6%. The data shows that the embodiment of the present disclosure can effectively save encoding time without almost reducing encoding performance. That is, for text-type screen content videos, this technology can significantly reduce the encoding complexity while maintaining encoding performance that is basically equivalent to that of related technologies.
[0199] It can be understood that the video encoding scheme provided by the embodiment of the present disclosure analyzes the spatial distribution of pixels in the image corresponding to the video data block to determine whether the texture features contained therein do not require block division processing in the first direction. For example, if a single line of words fills the entire vertical direction of the block, it indicates that horizontal division is to be performed, and each horizontal sub-block is only a part of the word. The possibility of finding similar matching blocks is small. Therefore, it is determined that this type of data block meets the conditions for not performing horizontal blocking, and when performing block division related processing on the data block, there is no need to perform horizontal division. For example, when performing the optimization process of available division methods, the available division methods do not include the horizontal block division method, that is, the attempt of the horizontal block division method is skipped. This can save computing resources and shorten encoding time.
[0200] It should be noted that the disclosed embodiments illustrate a scheme for comparing MG with a first characteristic threshold, a scheme for comparing MG1, MG2 with a second characteristic threshold, and a scheme for calculating MG, MG1, and MG2. Based on these examples, other equivalent variations of the determination scheme can also be employed to determine whether the spatial distribution of pixels in the image corresponding to the video data block is unsuitable for first-direction segmentation, thereby skipping these unsuitable segmentation attempts in subsequent segmentation processing.
[0201] An embodiment of the present disclosure further provides a video encoding device, as shown in FIG11 , comprising a processor and a memory storing a computer program that can be run on the processor, wherein when the processor executes the computer program, the video encoding method as described in any embodiment of the present disclosure is implemented.
[0202] An embodiment of the present disclosure further provides a non-transitory computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the video encoding method as described in any embodiment of the present disclosure.
[0203] An embodiment of the present disclosure further provides a code stream, wherein the code stream is generated according to the video encoding method as described in any embodiment of the present disclosure.
[0204] It can be seen that the block division and encoding and decoding method provided by the embodiments of the present disclosure determines the corresponding texture features by analyzing the pixel spatial distribution of the encoded data block image. According to the texture features, when performing block division related processing, unsuitable block division methods are skipped, which can effectively reduce the amount of calculation on the encoding end and shorten the encoding time.
[0205] In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored as one or more instructions or codes on or transmitted via a computer-readable medium and executed by a hardware-based processing unit. A computer-readable medium may include a computer-readable storage medium corresponding to a tangible medium such as a data storage medium, or a communication medium that facilitates 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. A data storage medium may be any available medium that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the techniques described in this disclosure. A computer program product may include a computer-readable medium.
[0206] By way of example and not limitation, such computer-readable storage media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage, flash memory, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed 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 a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves 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 (transient) media, but rather refer to non-transient tangible storage media. As used herein, disk and optical disk include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, or Blu-ray disc, among others, where disks typically reproduce data magnetically, while optical discs use lasers to reproduce data optically. Combinations of the above should also be included within the scope of computer-readable media.
[0207] Instructions may 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. Thus, the term "processor," as used herein, may refer to any of the aforementioned structures or any other structure suitable for implementing the techniques described herein. Additionally, in some aspects, the functionality described herein may be provided within dedicated hardware and / or software modules configured for encoding and decoding, or incorporated into a combined codec. Furthermore, the techniques may be fully implemented in one or more circuits or logic elements.
[0208] The technical solutions of the embodiments of the present disclosure can be implemented in a wide variety of devices or equipment, including wireless mobile phones, integrated circuits (ICs), or a group of ICs (e.g., chipsets). Various components, modules, or units are described in the embodiments of the present disclosure to emphasize the functional aspects of the devices configured to perform the described techniques, but they do not necessarily need to be implemented by different hardware units. Instead, as described above, the various units can be combined in a codec hardware unit or provided by a collection of interoperable hardware units (including one or more processors as described above) in combination with appropriate software and / or firmware.
[0209] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description 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 by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is well known to those skilled in the art, the term computer storage medium 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 technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
Claims
1. A video encoding method, characterized in that: include: Determining a first direction block division identifier corresponding to the data block to be encoded according to a texture feature corresponding to the data block to be encoded; When the first-direction block division identifier is a first value, the first-direction block division method is not used when performing block division processing on the data block to be encoded.
2. The video encoding method according to claim 1, wherein: The block division processing of the data block to be encoded is performed without using the first direction block division method, including: When performing optimal selection processing on the available division modes for the data block to be encoded, the available division modes do not include the first direction block division mode.
3. The video encoding method according to claim 1 or 2, wherein: The first direction includes: a horizontal direction or a vertical direction.
4. The video encoding method according to claim 1, wherein: The texture feature includes a first texture feature value; When the first direction is a horizontal direction, the first texture feature value is determined according to the following method: Performing horizontal pixel aggregation on the to-be-encoded data block to obtain a single-column pixel vector; Calculating the gradient of each component in the single column pixel vector; Determining the maximum gradient among the gradients of all components of the single-column pixel vector as the first texture feature value; or, When the first direction is a vertical direction, the first texture feature value is determined according to the following method: Performing vertical pixel aggregation on the to-be-encoded data block to obtain a single-row pixel vector; Calculating the gradient of each component in the single row of pixel vectors; The maximum gradient among the gradients of all components of the single-row pixel vector is determined as the first texture feature value.
5. The video encoding method according to claim 4, wherein: The first direction block division identifier is determined according to the following method: When the first texture feature value is less than a first feature threshold, the first direction block division identifier is determined to be a first value.
6. The video encoding method according to claim 4, wherein: The first direction block division flag includes: a horizontal binary tree block division flag and a horizontal ternary tree block division flag; or, The first direction block division flag includes: a vertical binary tree block division flag and a vertical ternary tree block division flag.
7. The video encoding method according to claim 1, wherein: The texture features include: a second texture feature value and a third texture feature value; When the first direction is a horizontal direction, the second texture feature value and the third texture feature value are determined according to the following method: Performing horizontal pixel aggregation on the to-be-encoded data block to obtain a single-column pixel vector; Calculating the gradients of all N components in the single column pixel vector; Determine the maximum value among the gradients of the first M components in the single column pixel vector as the second texture feature value; Determine the maximum value among the gradients of the last NM components in the single column pixel vector as the third texture feature value; or, 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: Performing vertical pixel aggregation on the to-be-encoded data block to obtain a single-row pixel vector; Calculating the gradients of all N components in the single row of pixel vectors; Determine the maximum value among the gradients of the first M components in the single-row pixel vector 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.
8. The video encoding method according to claim 7, wherein: The first direction block division identifier is determined according to the following method: When the second texture feature value is smaller than the second feature threshold and the third texture feature value is smaller than the second feature threshold, the first direction block division flag is determined to be a first value.
9. The video encoding method according to claim 7, wherein: The first direction block division flag includes: a horizontal binary tree block division flag; or, The first direction block division flag includes: a flag allowing vertical binary tree block division.
10. The video encoding method according to claim 4 or 7, wherein: 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 the 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-line 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 the position (x, y), and CUHeight is the height of the data block to be encoded.
11. The video encoding method according to claim 10, wherein: 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)| Wherein, 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.
12. A video encoding device, characterized in that The apparatus comprises a processor and a memory storing a computer program that can be run on the processor, wherein when the processor executes the computer program, the video encoding method according to any one of claims 1 to 11 is implemented.
13. A non-transitory computer-readable storage medium storing a computer program, wherein: When the computer program is executed by a processor, the video encoding method according to any one of claims 1 to 11 is implemented.
14. A code stream, wherein The code stream is generated according to the video encoding method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Multifunctional video coding CU division rapid decision method and storage medium
CN111147867A
Gabor-based CU division fast decision-making method and device and medium
CN113286144A
Coding block division method, device and system and storage medium
CN113691811A
Video decoding method, device and equipment
CN114286095A
CU block division method and device based on AVS3 coding historical information and medium
CN114666592A