CN116405665A - Encoding method, apparatus, device and storage medium - Google Patents

Encoding method, apparatus, device and storage medium Download PDF

Info

Publication number
CN116405665A
CN116405665A CN202310469001.XA CN202310469001A CN116405665A CN 116405665 A CN116405665 A CN 116405665A CN 202310469001 A CN202310469001 A CN 202310469001A CN 116405665 A CN116405665 A CN 116405665A
Authority
CN
China
Prior art keywords
target sub
encoded
prediction mode
determining
coded
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310469001.XA
Other languages
Chinese (zh)
Inventor
张佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202310469001.XA priority Critical patent/CN116405665A/en
Publication of CN116405665A publication Critical patent/CN116405665A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the application provides a coding method, a device, equipment and a storage medium, comprising the following steps: dividing an image frame by adopting a first dividing mode to obtain CUs of the image frame, determining that the CUs to be encoded meet preset conditions aiming at each CU to be encoded of the image frame, and obtaining first encoding information of a target sub CU, wherein the preset conditions are as follows: the CU to be encoded has a parent CU, the CU to be encoded and the target sub CU are located at the same position in an image frame and have the same size, the target sub CU is divided by a second division mode, the prediction mode of the CU to be encoded is determined according to the first encoding information of the target sub CU and the type of the target sub CU, the CU to be encoded is determined to not meet the preset condition, the prediction mode of the CU to be encoded is determined in a traversing mode, and the CU to be encoded is encoded according to the determined prediction mode. Therefore, the computational complexity of the partial CU of the image frame in the predictive coding process can be reduced, and the coding time can be shortened.

Description

Encoding method, apparatus, device and storage medium
Technical Field
The embodiment of the application relates to the technical field of video coding, in particular to a coding method, a device, equipment and a storage medium.
Background
As a latest generation coding standard, the multi-functional video coding (Versatile Video Coding, VVC) has a half reduced code rate under the same subjective quality compared to the previous generation coding standard HEVC, and requires less memory space and bandwidth for video streams of the same quality. However, VVC introduces more complex coding tools to achieve higher video compression ratios, resulting in a corresponding increase in coding complexity of VVC by a factor of two.
The VVC uses a Coding framework based on block division, and the encoder performs prediction, transformation, quantization and entropy Coding in units of Coding Units (CU), where an image frame is divided into several CUs when the encoder performs Coding, and for each CU, the encoder determines that a suitable prediction mode is selected for the CU by using a traversal manner when not dividing, and the prediction modes include two types of inter prediction and intra prediction, and there are multiple modes for inter prediction and intra prediction. The standard prescribes six dividing modes, namely: the method comprises the steps of non-dividing, horizontal binary tree dividing, vertical binary tree dividing, quadtree dividing, horizontal tri-dividing and vertical tri-dividing. In addition to the non-division manner, the sub-blocks obtained by division by other division manners can be further divided according to the six manners until the block size reaches the division limit. For one image frame, different block partitions tend to result in different rate-distortion performance. To obtain the best rate-distortion performance, the encoder typically encodes the possible block partitions in a full-traversal manner, and finally selects the block partition with the best rate-distortion performance for encoding.
It can be seen that the computational complexity of each CU in the predictive coding process is high, resulting in long coding time and low coding efficiency.
Disclosure of Invention
The embodiment of the application provides an encoding method, an encoding device, encoding equipment and a storage medium, which can reduce the computational complexity of a part of CU of an image frame in the predictive encoding process, shorten the encoding time and improve the encoding efficiency.
In a first aspect, there is provided an encoding method comprising:
dividing an image frame by adopting a first division mode to obtain a coding unit CU of the image frame;
for each CU to be encoded of the image frame, if it is determined that the CU to be encoded meets a preset condition, acquiring first encoding information of a target sub-CU, where the preset condition is: the CU to be coded is a parent CU, the CU to be coded and the target sub CU are positioned at the same position in the image frame and have the same size, and the target sub CU is obtained by dividing the image frame in a second dividing mode;
determining a prediction mode of the CU to be coded according to the first coding information of the target sub CU and the type of the target sub CU;
if the CU to be coded does not meet the preset condition, determining a prediction mode of the CU to be coded in a traversing mode;
And encoding the CU to be encoded according to the determined prediction mode.
In a second aspect, there is provided an encoding apparatus comprising:
the division module is used for dividing the image frames in a first division mode to obtain coding units CU of the image frames;
the coding module is configured to, for each CU to be coded of the image frame, obtain first coding information of a target sub-CU if it is determined that the CU to be coded meets a preset condition, where the preset condition is: the CU to be coded is a parent CU, the CU to be coded and the target sub CU are positioned at the same position in the image frame and have the same size, and the target sub CU is obtained by dividing the image frame in a second dividing mode;
determining a prediction mode of the CU to be coded according to the first coding information of the target sub CU and the type of the target sub CU;
if the CU to be coded does not meet the preset condition, determining a prediction mode of the CU to be coded in a traversing mode;
and encoding the CU to be encoded according to the determined prediction mode.
In a third aspect, there is provided an encoding apparatus comprising: a processor and a memory for storing a computer program, the processor being for invoking and running the computer program stored in the memory for performing the method as in the first aspect or embodiments thereof.
In a fourth aspect, a computer-readable storage medium is provided for storing a computer program for causing a computer to perform the method as in the first aspect or embodiments thereof.
In a fifth aspect, there is provided a computer program product comprising computer program instructions for causing a computer to perform the method as in the first aspect or embodiments thereof.
In summary, in this embodiment, an image frame is divided by first adopting a first division manner to obtain CUs of the image frame, and for each CU to be encoded of the image frame, determining that the CU to be encoded meets a preset condition, and obtaining first encoding information of a target sub-CU, where the preset condition is that the CU to be encoded has a parent CU, the CU to be encoded and the target sub-CU are located at the same position and have the same size in the image frame, and the target sub-CU is divided by a second division manner. According to the first coding information of the target sub CU and the type of the target sub CU, determining a prediction mode of the CU to be coded, determining that the CU to be coded does not meet the preset condition, determining the prediction mode of the CU to be coded in a traversing mode, and finally coding the CU to be coded according to the determined prediction mode. For CUs with the same position and the same size obtained by different division modes, when the CUs are subjected to predictive coding, the CUs can be subjected to fast predictive coding according to the first coding information of the CUs, the computational complexity of the CUs in the predictive coding process can be reduced, and other CUs are subjected to predictive coding in a traversing mode, so that the computational complexity of partial CUs of image frames in the predictive coding process can be reduced, the coding time can be shortened, and the coding efficiency can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a video image processing procedure according to an embodiment of the present application;
fig. 2 is a schematic diagram of a video image processing procedure according to an embodiment of the present application;
fig. 3 is an application scenario schematic diagram of an encoding method provided in an embodiment of the present application;
FIG. 4 is a schematic block diagram of an encoder provided by an embodiment of the present application;
FIG. 5 is a diagram illustrating six partitioning schemes defined in H.266;
FIG. 6 is a flowchart of an encoding method according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a possible final division of an image frame according to an embodiment of the present application;
FIG. 8 is a schematic diagram showing the presence of a co-located and co-sized CU according to an embodiment of the present application;
fig. 9 is a schematic diagram of four co-located and co-sized sub-CUs according to an embodiment of the present application;
Fig. 10 is a schematic flow chart of an encoding method according to an embodiment of the present application;
FIG. 11 is a schematic flow chart of an encoding method according to an embodiment of the present disclosure;
fig. 12 is a schematic structural diagram of an encoding device according to an embodiment of the present application;
fig. 13 is a schematic block diagram of an encoding apparatus provided in an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Before the technical scheme of the embodiment of the application is introduced, the following description is made on the related knowledge of the embodiment of the application:
1. cloud technology (Cloud technology) refers to a hosting technology for integrating hardware, software, network and other series resources in a wide area network or a local area network to realize calculation, storage, processing and sharing of data. Cloud technology (Cloud technology) is based on the general terms of network technology, information technology, integration technology, management platform technology, application technology and the like applied by Cloud computing business models, and can form a resource pool, so that the Cloud computing business model is flexible and convenient as required. Cloud computing technology will become an important support. Background services of technical networking systems require a large amount of computing, storage resources, such as video websites, picture-like websites, and more portals. Along with the high development and application of the internet industry, each article possibly has an own identification mark in the future, the identification mark needs to be transmitted to a background system for logic processing, data with different levels can be processed separately, and various industry data needs strong system rear shield support and can be realized only through cloud computing.
2. Video coding, the manner of converting a file in an original video format into a file in another video format by compression technology, and the converted data can be called a code stream.
3. H.266, also known as VVC (Versatile Video Coding ), is the latest generation of coding standard, which specifies the decoding flow and syntax for h.266 decoding.
4. Coding Unit (CU), basic Coding block in h.266.
5. Coding Tree Unit (CTU) consisting of one or more CUs. A frame of image will first be divided into a series of equally sized CTUs, each of which in turn determines its own CU partition.
6. Intra-frame prediction, a type of coding prediction technique, uses intra-frame prediction, where the current frame is coded without reference to information of other frames.
7. Inter-frame prediction, a type of coding prediction technique, uses information of neighboring frames to predict a current frame.
8. Bit Rate, also known as Bit Rate (Bit Rate), is the amount of video (or audio) data per unit time, in bps (bits per second), typically kbps (kilobits per second) or Mbps (megabits per second). The different code rates determine how much video is compressed by the encoder, which is a key factor in determining the final quality of the video and the file size.
In the related art, when encoding an image frame, one image frame is divided into a plurality of CUs, and the calculation complexity of each CU in the predictive encoding process is high, resulting in long encoding time and low encoding efficiency.
In order to solve the technical problem, in the embodiment of the present application, in the process of performing division encoding on an image frame by using different division modes, the characteristic that the image content covered by CUs with the same position and the same size obtained by division in different division modes is the same and repeated encoding is utilized, for CUs with the same position and the same size obtained by different division modes, the encoding information of the first CU to be encoded is stored, and then when the first CU is obtained by other division modes and is subjected to predictive encoding, fast predictive encoding can be performed according to the first encoding information of the first CU, so that the computational complexity of the first CU in the predictive encoding process can be reduced, and other CUs are predictive encoded according to the traversal mode, thereby reducing the computational complexity of part of the CU in the predictive encoding process of the image frame, shortening the encoding time and improving the encoding efficiency.
The technical scheme provided by the embodiment of the application can be applied to video-on-demand service scenes, video live broadcast service scenes and the like, and can also be applied to audio-video interaction scenes, such as cloud games, interaction live broadcast, video conferences, video calls and the like.
It should be understood that the technical solution of the embodiment of the present application may be applied to the following scenarios, but is not limited to:
The video or image processing procedure in some cloud-based scenarios can now be as follows: fig. 1 is a schematic diagram of a video image processing process provided in an embodiment of the present application, and fig. 2 is a schematic diagram of a video image processing process provided in an embodiment of the present application. As shown in fig. 1, a cloud server generates a video, performs video image acquisition, processes the acquired video image, encodes the processed video image to obtain a code stream of the video image, and further, the cloud server may send the code stream to a terminal device, decodes the code stream by the terminal device, and finally displays the video image according to a decoding result. Or as shown in fig. 2, the cloud server generates a video, performs video image acquisition, encodes the acquired video image to obtain a code stream of the video image, and further, the cloud server may send the code stream to the terminal device, decode the code stream by the terminal device, process the decoded video image, such as sharpening, blurring, noise reduction, and the like, and finally display the processed video image.
For example, fig. 3 is an application scenario schematic diagram of an encoding method provided in the embodiment of the present application, as shown in fig. 3, where the terminal device 110 may communicate with the server 120, where the server 120 may be any independent physical server, or may be a cloud server that provides cloud services, a cloud database, cloud computing, a cloud function, cloud storage, network services, cloud communication, middleware services, domain name services, security services, basic cloud services such as big data and an artificial intelligent platform, or may be a server cluster or a distributed system formed by multiple physical servers. The server 120 may include an encoding module for image encoding, which may include hardware devices/software codes that compress analog audio-video signals into encoded data (encoded files).
The terminal device 110 may be a device having basic streaming media playing capability, man-machine interaction capability, and communication capability, such as a smart phone, a tablet computer, a desktop computer, a smart television, etc., in which a game client is installed and operated in the terminal device 110, and the game client may be an application program operated in the terminal device 110. Alternatively, an instant messaging client or an audio/video conference supporting client is installed and operated in the terminal device 110, and a decoding module for performing image decoding may be included in the terminal device 110, and the decoding module may include a hardware device/software code for converting encoded data (or encoded files) into analog audio/video signals.
In the video on demand scenario, the cloud server is a server running in the cloud, and has functions of video enhancement (pre-coding processing), video coding, and the like, but is not limited thereto. The terminal equipment is equipment with rich man-machine interaction modes, internet access capability, various operating systems and stronger processing capability. The terminal device may be, but is not limited to, a smart phone, a living room television, a tablet computer, a vehicle-mounted terminal, a player gaming terminal, such as a palm game console, etc.
In some embodiments, the application scenario shown in fig. 3 may further include: base station, core network side device, etc., and fig. 3 illustrates one terminal device, one server, and may actually include other numbers of terminal devices and servers, which is not limited by the embodiment of the present application.
Illustratively, an applicable coding framework of an embodiment of the present application is described in connection with fig. 4.
Fig. 4 is a schematic block diagram of an encoder 100 provided by an embodiment of the present application. As shown in fig. 4, the encoder 100 may include a prediction unit 110, a transform, quantization unit 120, an inverse quantization, inverse transform unit 130, a loop filtering unit 140, a decoded picture buffer (Decoded Picture Buffer, DPB) unit 150, and an entropy encoding unit 160.
Optionally, in the encoder 100, a video slice, a frame of pictures or a series of pictures is divided into basic units in Coding Tree Units (CTUs), and based on this, further divided into blocks in units of smaller Coding Units (CUs). The CU may also be divided into Prediction Units (PUs), and the like, without limitation. The encoded block may be transferred to the prediction unit 110. In general, the prediction unit 110 may include a motion estimation (estimation) and compensation (compensation) unit 111 and an intra prediction unit 112. The prediction unit 102 may obtain an inter prediction value of a current block (e.g., CU) using the motion estimation and compensation unit 111. The intra prediction unit 112 may use the intra prediction value of the current block, for example, obtain the intra prediction value based on a derived mode manner, or the like.
Because of the strong correlation between adjacent pixels in a frame of video, the use of intra-prediction methods in video codec techniques can help to eliminate spatial redundancy between adjacent pixels. Because of the strong similarity between adjacent frames in video, the use of inter-frame prediction methods in video coding techniques can help to eliminate temporal redundancy between adjacent frames, thereby improving coding efficiency.
The prediction unit 110 outputs a prediction value of the current block, and then may calculate a difference value between an original value of the current block and the prediction value of the current block, i.e., a residual value, using an adder. The transform and quantization unit 120 may read the residual values and perform one or more transform operations on the residual values to obtain coefficients, further quantize the coefficients and output quantized coefficients (i.e., levels). The inverse quantization, inverse transformation unit 130 performs a scaling operation on the quantized coefficients to output reconstructed coefficients, and may further perform one or more inverse transformations and output residual values. Then, the residual value output from the inverse quantization and inverse transformation unit 130 and the predicted value of the current block from the prediction unit 110 may be added using an adder to calculate a reconstructed value. The reconstructed value may also be output to the prediction unit 110 to be used as an intra prediction reference. After all blocks in the image slice are reconstructed, the loop filtering unit 140 performs loop filtering on the reconstructed image.
The output of the loop filter unit 140 is decoded pictures, which are buffered to a decoded picture buffer (Decoded Picture Buffer, DPB) unit 150. The DPB unit 150 outputs a decoded picture according to timing and control information. Here, the picture stored in the DPB unit 150 may also be used as a reference for the prediction unit 110 to perform inter prediction or intra prediction. Finally, the entropy encoding unit 160 writes parameters (such as block division information, prediction, transformation, quantization, entropy encoding, loop filtering, etc. mode information or parameter information, etc.) necessary for decoding the picture from the encoder 100 into the bitstream, i.e., the encoder 100 finally outputs the bitstream.
Further, the encoder 100 may be a memory having a processor and including a computer program. When the processor reads and runs the computer program, the encoder 100 reads the input video and generates a corresponding code stream. In addition, encoder 100 may also be a computing device having one or more chips. These units, implemented on a chip as integrated circuits, have similar connection and data exchange functions as the corresponding units in fig. 4.
In order to better understand the embodiments of the present application, the intra prediction mode and inter prediction related to the embodiments of the present application are described below.
In the intra prediction unit 112 of the encoder 100, a current encoding block is usually predicted by various angle modes and non-angle modes to obtain a predicted value, and the predicted mode of the current encoding unit is screened according to the predicted value and the rate distortion information obtained by calculating the original block, and then the predicted mode is transmitted to a decoding end through a code stream. The decoding end analyzes the prediction mode, predicts the prediction image of the current decoding block, and superimposes residual pixels transmitted by the code stream to obtain a reconstructed image. Through the development of the digital video coding and decoding standard of the past generation, the non-angle mode is kept relatively stable, and has a mean mode and a Planar (Planar) mode; the angle mode is increased along with the evolution of the digital video coding and decoding standard, taking the international digital video coding standard H series as an example, the H.264/AVC standard only has 8 angle prediction modes and 1 non-angle prediction mode; 265/HEVC is extended to 33 angular prediction modes and 2 non-angular prediction modes; in H.266/VVC, intra prediction modes are Planar mode, DC mode and 65 angle modes.
The basic idea of inter prediction is to use the temporal correlation of video data to select a region with the most similar pixel distribution from one or two previously encoded frames to predict the current CU, and then only need to encode the position information of the similar region and the pixel difference between the CU to be encoded and the similar region. In general, the smaller the pixel difference, the fewer the number of bytes that need to be transmitted, and the higher the coding efficiency. In inter prediction, the encoder builds a reference frame list for the current frame. The reference frame list comprises two parts, a forward reference frame list and a backward reference frame list. The forward reference frame list contains several frames, both in coding order and in play order, before the current frame. The backward reference frame list contains frames that are encoded in order before the current frame, but played in order after the current frame. In inter-prediction of a CU in a current frame, the encoder may select one frame as a reference frame in a forward reference frame list or a backward reference frame list (forward prediction/backward prediction), or may select one frame together with two frames in two reference frame lists, respectively, as reference frames. The encoder can also generate a standard compliant code stream if the final selection is not the most reasonable reference frame, except that the coding efficiency is compromised. Finding the best reference frame is a very computationally complex process, and encoders are often implemented by frame-by-frame, region-by-region, and pixel-by-pixel comparison.
In order to better understand the embodiments of the present application, the following describes six divisions specified by h.266 in the embodiments of the present application, and fig. 5 is a schematic diagram of the six divisions specified by h.266, as shown in fig. 5, (a) the diagram indicates no division, (b) the diagram indicates a horizontal binary tree division, (c) the diagram indicates a vertical binary tree division, (d) the diagram indicates a quadtree division, (e) the diagram indicates a horizontal three division, and (f) the diagram indicates a vertical three division. The h.266 is coded in a block division manner, and one image frame (also referred to as an image block) is divided into several CUs when coding, and the CUs are basic units for coding prediction. In addition to not dividing, other divided sub-blocks may continue to be divided in the six ways shown in fig. 5 until the block size reaches the division limit. All possible sub-CUs may be organized into a search tree. The encoder typically traverses this block partition tree in a top-down recursive process to determine the final partition form of the current image block. Similar to the way the precedent traverses, the encoder attempts to un-divide first, and then recursively repeats the various cases of continued division in sequence. After having traversed all possible partitions, the encoder will use the mode that is optimal for rate-distortion performance. When a CU tries to be un-divided, the encoder selects a suitable prediction mode for the CU, where the prediction modes include inter prediction and intra prediction, and in general inter prediction has multiple modes, intra prediction also has multiple modes, and the existing coding flow adopts a traversal mode to encode various prediction modes one by one when the CU is not divided, and tries a combination of various reference frames when the inter prediction, so that the computational complexity in the prediction encoding process of each CU is higher, resulting in longer encoding time and lower encoding efficiency. The coding method provided by the embodiment of the application can reduce the computational complexity of partial CU of the image frame in the predictive coding process, shorten the coding time and improve the coding efficiency.
The technical scheme of the embodiment of the present application will be described in detail below:
fig. 6 is a flowchart of an encoding method provided in an embodiment of the present application, which may be performed by an encoder, but is not limited thereto, and as shown in fig. 6, the method includes the following steps:
s101, dividing the image frames by adopting a first dividing mode to obtain CUs of the image frames.
In particular, h.266 encodes in a block-divided manner, and one image frame (also referred to as an image block) is divided into several CUs, which are basic units for encoding prediction. After an image frame has traversed through all possible partitions, the encoder uses the partition with the best rate-distortion performance. And obtaining a plurality of CUs which are finally determined not to be divided any more by adopting different division modes for one image frame, wherein the CUs correspond to one division mode. In the following description of the division manner with reference to fig. 7, fig. 7 is a schematic diagram of a possible final division manner of an image frame provided in the embodiment of the present application, and as shown in fig. 7, the image frame is divided into 4 CUs of the same size, two CUs of the 4 CUs are not further divided, two CUs are further divided, the CU at the upper left corner is further divided into 4 sub-CUs, and one sub-CU at the lower right corner is further divided into two sub-CUs by a vertical binary tree. The lower right corner of one CU is further divided into 3 sub-CUs. The image frame is divided into four branches (or a horizontal binary tree is divided into two branches, or a vertical binary tree is divided into two branches, then a horizontal binary tree is divided into two branches), then one CU is divided into four branches, one sub CU obtained by the four branches is divided into two branches, and then one CU is divided into three branches horizontally. For a CU, it also corresponds to a partition, and the partition of each CU may be the same or different. For example, the target CU is divided in a quadtree manner for the parent CU of the target CU in fig. 7. For a CU, the existence of a parent CU means that the CU is obtained by performing a one-level division on the parent CU, and the existence of a grandparent CU means that the CU is obtained by performing a two-level division on the grandparent CU. It is understood that for a CU, the grandparent CU of the CU is the parent CU of the CU.
S102, for each CU to be coded of an image frame, if the CU to be coded meets the preset condition, acquiring first coding information of a target sub CU, wherein the preset condition is as follows: the CU to be encoded has a parent CU, the CU to be encoded and the target sub CU are positioned at the same position in the image frame and have the same size, and the target sub CU is obtained by dividing in a second dividing mode.
Specifically, after the image frames are divided in the first division manner, CU of the image frames may be obtained, and the CU of the image may be one or more, for example, 10 CUs of the image frames obtained in fig. 7. Each CU of an image frame is a CU to be encoded. Each CU to be encoded of an image frame is predictive encoded in turn. For each CU to be coded of an image frame, determining whether the CU to be coded meets a preset condition, and if so, acquiring first coding information of a target sub CU, wherein the first coding information refers to coding information of first coding. In the preset condition, the existence of the parent CU in the CU to be encoded means that the CU to be encoded is obtained by dividing the parent CU, the CU to be encoded and the target sub CU are located at the same position in the image frame and have the same size, and the target sub CU is obtained by a second dividing mode, wherein the second dividing mode can be the dividing mode of the target sub CU, and the second dividing mode also corresponds to the dividing mode of the image frame.
The CU to be encoded and the target sub-CU are in the same position and the same size in the image frame, the CU is generally rectangular, the CU has 4 vertices, the same position may be that the position coordinates of any vertex of the CU to be encoded in the image frame are the same as the position coordinates of the corresponding vertex of the target sub-CU in the image frame, and the same size means that the width and height of the CU are the same. Fig. 8 is a schematic diagram showing the appearance of a co-located CU with the same size in the embodiment of the present application, as shown in fig. 8, where the gray sub-CU shown in fig. 8 (a) is obtained by performing quadtree division on a CU, and the gray sub-CU shown in fig. 8 (b) is obtained by performing horizontal binary tree division on a left CU obtained by performing vertical binary tree division on a CU, where the gray sub-CU shown in fig. (a) and the gray sub-CU shown in fig. (b) are located at the same position and have the same size in an image frame, and the image content covered by the co-located CU with the same size is completely the same, and is repeatedly encoded when encoded in different division forms, so that this characteristic is utilized in the embodiment of the present application.
In the embodiment of the application, through analysis, it is found that in the direct partition of one CU, only four sub-CUs obtained by quadtree partitioning exist in the same-position and same-size CU. Fig. 9 is a schematic diagram of four sub-CUs with the same position and the same size, where, as shown in fig. 9, the sub-CUs with the four positions are respectively denoted by A, B, C and D, and hereinafter, the four sub-CUs are referred to as four target sub-CUs. The generation approach of the target sub-CU may be that the current CU is first divided into a horizontal binary tree, then two sub-CUs are further divided into vertical binary trees, or that the current CU is first divided into vertical binary trees, then two sub-CUs are further divided into horizontal binary trees. Since CU partitioning is a recursive process, each CU only needs to consider its own target sub-CU.
Accordingly, in one implementation manner, the second partition manner is performing quadtree partitioning for the parent CU of the target sub-CU, or the second partition manner is performing horizontal binary tree partitioning for the grandparent CU of the target sub-CU and then performing vertical binary tree partitioning, or the second partition manner is performing vertical binary tree partitioning for the grandparent CU of the target sub-CU and then performing horizontal binary tree partitioning.
A specific procedure for determining that the CU to be encoded satisfies the preset condition is shown below.
Optionally, in an implementation manner, the determining that the CU to be encoded meets the preset condition in S102 may specifically be:
s1021, determining that the CU to be coded has a parent CU.
S1022, if the CU to be encoded is obtained by performing horizontal binary tree division or vertical binary tree division on the parent CU of the CU to be encoded, determining that the grandparent CU exists in the CU to be encoded, and the CU to be encoded and the target child CU are located at the same position in the image frame and have the same size, determining that the CU to be encoded meets the preset condition, performing vertical binary tree division on the target child CU which is the target child CU, and performing horizontal binary tree division on the target child CU which is the target child CU, or performing horizontal binary tree division on the target child CU which is the target child CU, and performing vertical binary tree division on the target child CU.
S1023, if the CU to be encoded is not obtained by dividing a parent CU of the CU to be encoded by a horizontal binary tree or a vertical binary tree, determining that the CU to be encoded is obtained by dividing the parent CU of the CU to be encoded by a quadtree, determining that the CU to be encoded meets a preset condition, and performing quadtree division on a target sub CU which is the parent CU of the target sub CU.
Before the first encoding of the target sub-CU, the first encoding information of the target sub-CU cannot be obtained in the above procedure, and optionally, the method of this embodiment may further include:
and S106, if the first coding information of the target sub CU is not acquired, determining a prediction mode of the CU to be coded in a traversing mode, and coding the CU to be coded according to the determined prediction mode.
Specifically, the prediction mode of the target sub-CU is determined in a traversal manner and encoded when the target sub-CU is encoded for the first time.
S107, determining the coding information of the CU to be coded as the first coding information of the target sub CU, and storing the first coding information of the target sub CU.
Optionally, in S107, the first encoded information of the target sub CU is stored, which may specifically be:
s1071, if the target sub CU is obtained by performing quadtree division on the parent CU of the target sub CU, storing the first coding information of the target sub CU in the storage of the parent CU of the target sub CU.
S1072, if the target sub CU is obtained by performing horizontal binary tree division and then vertical binary tree division through the grandparent CU of the target sub CU, or is obtained by performing vertical binary tree division and then horizontal binary tree division through the grandparent CU of the target sub CU, the first coding information of the target sub CU is stored in the storage of the grandparent CU of the target sub CU.
In this embodiment, for the 4 target sub-CUs shown in fig. 9, the encoder stores the coding information of the first codes of the four target sub-CUs for each CU, and optionally, for a CU to be coded, in this embodiment, four buffers are created for the CU to be coded, where the first coding information is used to store the first coding information of each target sub-CU in the coding process, the first coding information may include parameter information of a prediction mode and a prediction mode, the prediction mode is inter-prediction or intra-prediction, when the prediction mode is inter-prediction, the parameter information of the prediction mode includes inter-prediction mode (unidirectional/bidirectional) and inter-frame reference frame index, and when the prediction mode is intra-frame prediction, the parameter information of the prediction mode includes intra-frame angle mode information.
S103, determining a prediction mode of the CU to be coded according to the first coding information of the target sub CU and the type of the target sub CU.
Specifically, the types of the target sub-CUs include four types shown in fig. 9, in which a is a first type sub-CU, B, C, and D is a second type sub-CU, the coding order corresponding to the first type sub-CU is a first order, the coding order corresponding to the second type sub-CU is any one of a second order, a third order, and a fourth order, a is generally encoded first at the time of encoding, so that the coding order of a is a first order, and then any one of B, C and D is selected for encoding, and thus, the coding orders of B, C and D are changed. Therefore, in determining the prediction mode of the CU to be encoded based on the first encoding information of the target sub-CU, the type of the target sub-CU is also referred to.
Optionally, in an implementation manner, the first encoding information includes a prediction mode and parameter information of the prediction mode, and S103 may specifically be:
s1031, determining the target sub CU as a first type sub CU, determining the prediction mode of the target sub CU as the prediction mode of the CU to be encoded, determining the parameter information of the prediction mode of the target sub CU as the parameter information of the prediction mode of the CU to be encoded, and determining the encoding sequence corresponding to the first type sub CU as a first sequence.
S1032, determining the target sub CU as a second type sub CU, and determining the prediction mode of the CU to be coded according to the prediction mode of the target sub CU, the parameter information of the prediction mode of the target sub CU and whether the target sub CU continues to divide, wherein the coding sequence corresponding to the second type sub CU is any one of the second sequence, the third sequence and the fourth sequence.
In particular, this information whether the target sub-CU continues to partition may be carried in the encoded information or may be obtained in other ways, since during the encoding process, whether the target sub-CU continues to partition is preserved.
Further, in an implementation manner, in S1032, the prediction mode of the CU to be encoded is determined according to the prediction mode of the target sub-CU, the parameter information of the prediction mode of the target sub-CU, and whether the target sub-CU continues to be divided, which may specifically be:
s11, if the prediction mode of the target sub CU is intra prediction, determining the prediction mode of the CU to be coded as intra prediction.
Specifically, if the prediction mode of the target sub-CU is intra prediction, in this embodiment, the CU to be encoded is considered to be not suitable for inter prediction, and is encoded only using the intra prediction mode.
S12, if the prediction mode of the target sub CU is inter prediction and the target sub CU is not continuously divided, determining the prediction mode of the target sub CU as the prediction mode of the CU to be encoded, and determining the parameter information of the prediction mode of the target sub CU as the parameter information of the prediction mode of the CU to be encoded.
Specifically, if the prediction mode of the target sub-CU is inter-prediction and the target sub-CU does not continue to be divided, in this embodiment, the inter-prediction result of the target sub-CU is considered to be good enough, so that the CU to be encoded can directly multiplex the prediction mode of the target sub-CU and the reference frame index, and does not perform intra-prediction encoding.
S13, if the prediction mode of the target sub CU is inter prediction and the target sub CU continues to divide, determining the prediction mode of the CU to be coded as inter prediction.
Specifically, if the prediction mode of the target sub-CU is inter prediction and the target sub-CU continues to be divided, in this case, the likelihood that the prediction mode of the target sub-CU is the same as the optimal prediction mode of the CU to be encoded is not high enough, and direct multiplexing may result in a large rate distortion loss, so for this case, the present embodiment encodes using a conventional inter prediction procedure, and thus determines the prediction mode of the CU to be encoded as inter prediction.
And S104, if the CU to be coded does not meet the preset condition, determining the prediction mode of the CU to be coded in a traversing mode.
Specifically, when the CU to be encoded does not meet the preset condition, determining the prediction mode of the CU to be encoded by using a traversal method, and specifically, traversing all the prediction modes by using an existing traversal method.
S105, coding the CU to be coded according to the determined prediction mode.
According to the coding method provided by the embodiment of the invention, the image frame is divided by adopting the first division mode to obtain the CU of the image frame, the CU to be coded is determined to meet the preset condition aiming at each CU to be coded of the image frame, the first coding information of the target sub CU is obtained, wherein the preset condition is that the CU to be coded has a father CU, the CU to be coded and the target sub CU are positioned at the same position and the same size in the image frame, and the target sub CU is divided by the second division mode. According to the first coding information of the target sub CU and the type of the target sub CU, determining a prediction mode of the CU to be coded, determining that the CU to be coded does not meet the preset condition, determining the prediction mode of the CU to be coded in a traversing mode, and finally coding the CU to be coded according to the determined prediction mode. For CUs with the same position and the same size obtained by different division modes, when the CUs are subjected to predictive coding, the CUs can be subjected to fast predictive coding according to the first coding information of the CUs, the computational complexity of the CUs in the predictive coding process can be reduced, and other CUs are subjected to predictive coding in a traversing mode, so that the computational complexity of partial CUs of image frames in the predictive coding process can be reduced, the coding time can be shortened, and the coding efficiency can be improved.
The following describes in detail the technical scheme of the encoding method provided in the embodiment of the present application with reference to a specific embodiment.
Fig. 10 is a flow chart of an encoding method provided in the embodiment of the present application, where an execution body of the embodiment may be an encoder, and the method of the embodiment may include:
s201, dividing the image frames by adopting a first dividing mode to obtain CUs of the image frames.
S202, judging whether a parent CU exists in each CU to be encoded of the image frames, and obtaining the CU to be encoded through horizontal binary tree division or vertical binary tree division through the parent CU of the CU to be encoded.
If yes, S203 is executed, and if no, S207 is executed.
S203, judging whether the CU to be encoded has a grandparent CU, wherein the CU to be encoded and the target child CU are positioned at the same position in an image frame and have the same size, and the target child CU is obtained by dividing a vertical binary tree into two or more horizontal binary trees, or is obtained by dividing the target child CU into two or more horizontal binary trees and then dividing the vertical binary tree.
If yes, S204 is executed, and if no, S205 is executed.
S204, determining whether the first coding information of the target sub CU is acquired from the storage of the grandparent CU of the target sub CU.
If yes, S209 is executed, and if no, S205 is executed.
S205, determining a prediction mode of the CU to be coded in a traversing mode, and coding according to the determined prediction mode.
S206, storing the coding information of the CU to be coded in the storage of the grandparent CU of the target child CU.
Specifically, the coding information of the CU to be coded is stored in a cache of the target sub-CU corresponding to the target sub-CU in the grandparent CU of the target sub-CU.
S207, judging whether the CU to be encoded has a parent CU or not, and obtaining the CU through the parent CU of the CU to be encoded through quadtree division.
If yes, execution is S208, otherwise execution is S210.
S208, determining whether the first coding information of the target sub CU is acquired from the storage of the parent CU of the target sub CU.
If yes, S209 is executed, and if no, S210 is executed.
S209, determining a prediction mode of the CU to be encoded according to the first encoding information of the target sub CU and the type of the target sub CU, and encoding the CU to be encoded according to the determined prediction mode.
S210, determining a prediction mode of the CU to be coded in a traversing mode, and coding according to the determined prediction mode.
S211, storing the coding information of the CU to be coded in the storage of the parent CU of the target sub CU.
Specifically, the coding information of the CU to be coded is stored in a cache of the target sub-CU corresponding to the parent CU of the target sub-CU.
To this end, the CU to be encoded is not divided into the end of encoding, and each CU to be encoded performs the operations of S202 to S211 described above, and finally, all the CUs of the image frame are encoded.
Specifically, in S209, according to the first encoding information of the target sub-CU and the type of the target sub-CU, a prediction mode of the CU to be encoded is determined, and the CU to be encoded is encoded according to the determined prediction mode, fig. 11 shows a specific implementation manner, fig. 11 is a schematic flow diagram of an encoding method provided in an embodiment of the present application, and as shown in fig. 11, the method in this embodiment may include:
s301, judging whether the target sub CU is a first type sub CU.
If yes, execution is S302, if no, execution is S303.
The coding sequence corresponding to the first type of sub CU is a first sequence. Specifically, it may be determined whether or not the target sub-CU is a target sub-CU of type a shown in fig. 9. If the target sub-CU is not a first type sub-CU, the target sub-CU is a second type sub-CU.
S302, determining a prediction mode of the target sub CU as a prediction mode of the CU to be coded, and determining parameter information of the prediction mode of the target sub CU as parameter information of the prediction mode of the CU to be coded.
S303, judging whether the prediction mode of the target sub CU is inter prediction.
If yes, S304 is executed, and if no, S305 is executed.
S304, judging whether the target sub CU continues to divide.
If yes, S306 is executed, and if no, S302 is executed.
S305, determining a prediction mode of the CU to be coded as intra prediction.
S306, determining the prediction mode of the CU to be coded as inter prediction.
It should be noted that, the specific implementation process or term explanation of the relevant steps in this embodiment may be referred to the description of the previous embodiments, and will not be repeated here.
The coding method provided by the embodiment can reduce the calculation complexity of partial CU in the predictive coding process on the premise of not obviously damaging the coding rate distortion efficiency, thereby shortening the coding time and saving the calculation resources.
Fig. 12 is a schematic structural diagram of an encoding device according to an embodiment of the present application, and as shown in fig. 12, the encoding device may include: a dividing module 11 and an encoding module 12.
The dividing module 11 is configured to divide the image frame in a first dividing manner to obtain a coding unit CU of the image frame;
the encoding module 12 is configured to, for each CU to be encoded of the image frame, obtain first encoding information of the target sub-CU if it is determined that the CU to be encoded satisfies a preset condition, where the preset condition is: the CU to be encoded has a parent CU, the CU to be encoded and the target sub CU are located at the same position in an image frame and have the same size, the target sub CU is divided by a second division mode, if the CU to be encoded is determined to not meet the preset condition according to the first encoding information of the target sub CU and the type of the target sub CU, the prediction mode of the CU to be encoded is determined by adopting a traversing mode, and the CU to be encoded is encoded according to the determined prediction mode.
In an embodiment, the second partition manner is quad-tree partition for a parent CU of the target sub-CU, or the second partition manner is horizontal binary tree partition for a grandparent CU of the target sub-CU and then vertical binary tree partition, or the second partition manner is vertical binary tree partition for a grandparent CU of the target sub-CU and then horizontal binary tree partition.
In one embodiment, the encoding module 12 is further configured to:
if the first coding information of the target sub CU is not acquired, determining a prediction mode of the CU to be coded in a traversing mode, and coding the CU to be coded according to the determined prediction mode;
determining the coding information of the CU to be coded as the first coding information of the target sub CU;
the first encoded information of the target sub-CU is stored.
In one embodiment, the encoding module 12 is configured to:
if the target sub CU is obtained by performing quadtree division on the parent CU of the target sub CU, storing the first coding information of the target sub CU in the storage of the parent CU of the target sub CU;
if the target sub CU is obtained by performing horizontal binary tree division and then vertical binary tree division through the grandparent CU of the target sub CU, or is obtained by performing vertical binary tree division and then horizontal binary tree division through the grandparent CU of the target sub CU, storing the first coding information of the target sub CU in the storage of the grandparent CU of the target sub CU.
In one embodiment, the encoding module 12 is configured to:
determining that a parent CU exists in the CU to be coded;
if the CU to be encoded is obtained by performing horizontal binary tree division or vertical binary tree division on the parent CU of the CU to be encoded, determining that the grandparent CU exists in the CU to be encoded, and the CU to be encoded and the target child CU are located at the same position in an image frame and have the same size, determining that the CU to be encoded meets the preset condition, performing vertical binary tree division on the target child CU which is the target child CU, and performing horizontal binary tree division on the target child CU, or performing horizontal binary tree division on the target child CU which is the target child CU, and performing vertical binary tree division on the target child CU.
In one embodiment, the encoding module 12 is further configured to:
if the CU to be encoded is not obtained by the parent CU of the CU to be encoded through horizontal binary tree division or vertical binary tree division, determining that the CU to be encoded is obtained by the parent CU of the CU to be encoded through quadtree division, and determining that the CU to be encoded meets the preset condition, wherein the target sub CU is obtained by quadtree division of the parent CU of the target sub CU.
In one embodiment, the first encoding information includes a prediction mode and parameter information of the prediction mode, and the encoding module 12 is configured to:
determining a target sub-CU as a first type sub-CU, determining a prediction mode as a prediction mode of the CU to be encoded, determining parameter information of the prediction mode as parameter information of the prediction mode of the CU to be encoded, and determining the corresponding encoding sequence of the first type sub-CU as a first sequence;
And determining the target sub CU as a second type sub CU, and determining the prediction mode of the CU to be coded according to the prediction mode, the parameter information of the prediction mode and whether the target sub CU is continuously divided, wherein the coding sequence corresponding to the second type sub CU is any one of a second sequence, a third sequence and a fourth sequence.
In one embodiment, the encoding module 12 is specifically configured to:
if the prediction mode is intra-frame prediction, determining the prediction mode of the CU to be coded as intra-frame prediction;
if the prediction mode is inter prediction and the target sub CU is not continuously divided, determining the prediction mode as the prediction mode of the CU to be encoded, and determining the parameter information of the prediction mode as the parameter information of the prediction mode of the CU to be encoded;
if the prediction mode is inter prediction and the target sub-CU continues to divide, the prediction mode of the CU to be coded is determined to be inter prediction.
It should be understood that apparatus embodiments and method embodiments may correspond with each other and that similar descriptions may refer to the method embodiments. To avoid repetition, no further description is provided here. Specifically, the encoding apparatus shown in fig. 12 may perform the method embodiment corresponding to fig. 6, and the foregoing and other operations and/or functions of each module in the encoding apparatus are respectively for implementing the corresponding flow in the method embodiment corresponding to fig. 6, which is not described herein for brevity.
The encoding device of the embodiment of the present application is described above from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module may be implemented in hardware, or may be implemented by instructions in software, or may be implemented by a combination of hardware and software modules. Specifically, each step of the method embodiments in the embodiments of the present application may be implemented by an integrated logic circuit of hardware in a processor and/or an instruction in software form, and the steps of the method disclosed in connection with the embodiments of the present application may be directly implemented as a hardware encoding processor or implemented by a combination of hardware and software modules in the encoding processor. Alternatively, the software modules may be located in a well-established storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, and the like. The storage medium is located in a memory, and the processor reads information in the memory, and in combination with hardware, performs the steps in the above method embodiments.
Fig. 13 is a schematic block diagram of an encoding apparatus provided in an embodiment of the present application. The encoding device may be a server in the above-described method embodiment.
As shown in fig. 13, the encoding apparatus may include:
a memory 210 and a processor 220, the memory 210 being configured to store a computer program and to transfer the program code to the processor 220. In other words, the processor 220 may call and run a computer program from the memory 210 to implement the methods of embodiments of the present application.
For example, the processor 220 may be configured to perform the above-described method embodiments according to instructions in the computer program.
In some embodiments of the present application, the processor 220 may include, but is not limited to:
a general purpose processor, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like.
In some embodiments of the present application, the memory 210 includes, but is not limited to:
volatile memory and/or nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM) which acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (Double Data Rate SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), and Direct memory bus RAM (DR RAM).
In some embodiments of the present application, the computer program may be partitioned into one or more modules that are stored in the memory 210 and executed by the processor 220 to perform the methods provided by embodiments of the present application. The one or more modules may be a series of computer program instruction segments capable of performing the specified functions, which are used to describe the execution of the computer program in the coding device.
As shown in fig. 13, the encoding apparatus may further include:
a transceiver 230, the transceiver 230 being connectable to the processor 220 or the memory 210.
The processor 220 may control the transceiver 230 to communicate with other devices, and in particular, may send information or data to other devices or receive information or data sent by other devices. Transceiver 230 may include a transmitter and a receiver. Transceiver 230 may further include antennas, the number of which may be one or more.
It will be appreciated that the various components in the encoding device are connected by a bus system that includes, in addition to a data bus, a power bus, a control bus, and a status signal bus.
The present application also provides a computer storage medium having stored thereon a computer program which, when executed by a computer, enables the computer to perform the method of the above-described method embodiments. Alternatively, embodiments of the present application also provide a computer program product comprising instructions which, when executed by a computer, cause the computer to perform the method of the method embodiments described above.
When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces, in whole or in part, a flow or function consistent with embodiments of the present application. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
Those of ordinary skill in the art will appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules illustrated as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. For example, each functional module in the embodiments of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
The foregoing is merely a specific implementation of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto, and any person skilled in the art may easily think about changes or substitutions within the technical scope of the embodiments of the present application, and all changes and substitutions are included in the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. A method of encoding, the method comprising:
dividing an image frame by adopting a first division mode to obtain a coding unit CU of the image frame;
For each CU to be encoded of the image frame, if it is determined that the CU to be encoded meets a preset condition, acquiring first encoding information of a target sub-CU, where the preset condition includes: the CU to be coded is a parent CU, the CU to be coded and the target sub CU are positioned at the same position in the image frame and have the same size, and the target sub CU is obtained by dividing the image frame in a second dividing mode;
determining a prediction mode of the CU to be coded according to the first coding information of the target sub CU and the type of the target sub CU;
if the CU to be coded does not meet the preset condition, determining a prediction mode of the CU to be coded in a traversing mode;
and encoding the CU to be encoded according to the determined prediction mode.
2. The method of claim 1, wherein the second partitioning method performs quadtree partitioning for a parent CU of the target sub-CU, or wherein the second partitioning method performs horizontal binary tree partitioning for a grandparent CU of the target sub-CU followed by vertical binary tree partitioning, or wherein the second partitioning method performs vertical binary tree partitioning for a grandparent CU of the target sub-CU followed by horizontal binary tree partitioning.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
if the first coding information of the target sub CU is not acquired, determining a prediction mode of the CU to be coded in a traversing mode, and coding the CU to be coded according to the determined prediction mode;
determining the coding information of the CU to be coded as the first coding information of the target sub CU;
and storing the first coding information of the target sub CU.
4. The method of claim 3, wherein the storing the first encoded information of the target sub-CU comprises:
if the target sub CU is obtained by performing quadtree division on the parent CU of the target sub CU, storing the first coding information of the target sub CU in the storage of the parent CU of the target sub CU;
and if the target sub CU is obtained by performing horizontal binary tree division and then vertical binary tree division through the grandparent CU of the target sub CU, or is obtained by performing vertical binary tree division and then horizontal binary tree division through the grandparent CU of the target sub CU, storing the first coding information of the target sub CU in the storage of the grandparent CU of the target sub CU.
5. The method of claim 1, wherein the determining that the CU to be encoded satisfies a preset condition comprises:
Determining that a parent CU exists in the CU to be coded;
if the CU to be encoded is obtained by performing horizontal binary tree division or vertical binary tree division on the parent CU of the CU to be encoded, determining that the grandparent CU exists in the CU to be encoded, and the CU to be encoded and the target child CU are located at the same position in the image frame and have the same size, determining that the CU to be encoded meets a preset condition, and performing vertical binary tree division on the target child CU for the grandparent CU of the target child CU and then performing horizontal binary tree division, or performing horizontal binary tree division on the target child CU for the grandparent CU of the target child CU and then performing vertical binary tree division.
6. The method of claim 5, wherein the method further comprises:
if the CU to be encoded is not obtained by dividing the parent CU of the CU to be encoded by a horizontal binary tree or a vertical binary tree, determining that the CU to be encoded is obtained by dividing the parent CU of the CU to be encoded by a quadtree, determining that the CU to be encoded meets a preset condition, and performing quadtree division on the target sub CU which is the parent CU of the target sub CU.
7. The method according to claim 1, wherein the first coding information includes a prediction mode and parameter information of the prediction mode, and wherein determining the prediction mode of the CU to be coded according to the first coding information of the target sub-CU and the type of the target sub-CU includes:
Determining the target sub-CU as a first type sub-CU, determining the prediction mode as the prediction mode of the CU to be coded, determining parameter information of the prediction mode as parameter information of the prediction mode of the CU to be coded, wherein the coding sequence corresponding to the first type sub-CU is a first sequence;
and determining the target sub-CU as a second type sub-CU, and determining the prediction mode of the CU to be coded according to the prediction mode, the parameter information of the prediction mode and whether the target sub-CU continues to divide, wherein the coding sequence corresponding to the second type sub-CU is any one of a second sequence, a third sequence and a fourth sequence.
8. The method of claim 7, wherein the determining the prediction mode of the CU to be encoded based on the prediction mode, parameter information of the prediction mode, and whether the target sub-CU continues to partition comprises:
if the prediction mode is intra-frame prediction, determining that the prediction mode of the CU to be coded is intra-frame prediction;
if the prediction mode is inter prediction and the target sub-CU does not continue to divide, determining the prediction mode as the prediction mode of the CU to be encoded, and determining the parameter information of the prediction mode as the parameter information of the prediction mode of the CU to be encoded;
If the prediction mode is inter prediction and the target sub-CU continues to partition, determining that the prediction mode of the CU to be encoded is inter prediction.
9. An encoding device, comprising:
the division module is used for dividing the image frames in a first division mode to obtain coding units CU of the image frames;
the coding module is configured to, for each CU to be coded of the image frame, obtain first coding information of a target sub-CU if it is determined that the CU to be coded meets a preset condition, where the preset condition is: the CU to be coded is a parent CU, the CU to be coded and the target sub CU are positioned at the same position in the image frame and have the same size, and the target sub CU is obtained by dividing the image frame in a second dividing mode;
determining a prediction mode of the CU to be coded according to the first coding information of the target sub CU and the type of the target sub CU;
if the CU to be coded does not meet the preset condition, determining a prediction mode of the CU to be coded in a traversing mode;
and encoding the CU to be encoded according to the determined prediction mode.
10. An encoding apparatus, comprising:
A processor and a memory for storing a computer program, the processor being for invoking and running the computer program stored in the memory to perform the method of any of claims 1-8.
11. A computer readable storage medium storing a computer program for causing a computer to perform the method of any one of claims 1-8.
CN202310469001.XA 2023-04-25 2023-04-25 Encoding method, apparatus, device and storage medium Pending CN116405665A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310469001.XA CN116405665A (en) 2023-04-25 2023-04-25 Encoding method, apparatus, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310469001.XA CN116405665A (en) 2023-04-25 2023-04-25 Encoding method, apparatus, device and storage medium

Publications (1)

Publication Number Publication Date
CN116405665A true CN116405665A (en) 2023-07-07

Family

ID=87014219

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310469001.XA Pending CN116405665A (en) 2023-04-25 2023-04-25 Encoding method, apparatus, device and storage medium

Country Status (1)

Country Link
CN (1) CN116405665A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117440156A (en) * 2023-09-22 2024-01-23 书行科技(北京)有限公司 Video coding method, video publishing method and related products

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117440156A (en) * 2023-09-22 2024-01-23 书行科技(北京)有限公司 Video coding method, video publishing method and related products
CN117440156B (en) * 2023-09-22 2024-06-25 书行科技(北京)有限公司 Video coding method, video publishing method and related products

Similar Documents

Publication Publication Date Title
US11889073B2 (en) Encoding and decoding methods and corresponding devices
US9699472B2 (en) Restriction of prediction units in B slices to uni-directional inter prediction
US11700398B2 (en) Method and apparatus for entropy-encoding and entropy-decoding video signal
CN115334303A (en) Intra-frame prediction method and device
US11006109B2 (en) Intra prediction mode based image processing method, and apparatus therefor
JP2019505144A (en) Geometric transformation for filters for video coding
KR20170016994A (en) Unified merge mode and adaptive motion vector prediction mode candidates selection
US10638132B2 (en) Method for encoding and decoding video signal, and apparatus therefor
CN111316642B (en) Method and apparatus for signaling image coding and decoding partition information
CN110832869B (en) Motion information acquisition method and device for video coding or decoding
CN118101935A (en) Method for processing image and apparatus therefor
JP2023510441A (en) Image encoding method, image decoding method, and related device and system
KR20130054408A (en) Coding and decoding utilizing adaptive context model selection with zigzag scan
CN112166606A (en) Method for processing image and apparatus thereof
CN116405665A (en) Encoding method, apparatus, device and storage medium
CN116868571A (en) Improved local illumination compensation for inter prediction
US11323706B2 (en) Method and apparatus for aspect-ratio dependent filtering for intra-prediction
JP2021530909A (en) Luma intramode signaling
US20200154103A1 (en) Image processing method on basis of intra prediction mode and apparatus therefor
CN113992635A (en) Multimedia data processing method, device, equipment and storage medium
US10523945B2 (en) Method for encoding and decoding video signal
JP2021524707A (en) Partitioning boundary blocks in video coding
CN113225558B (en) Smoothing orientation and DC intra prediction
US20240214580A1 (en) Intra prediction modes signaling
CN117581547A (en) Side window bilateral filtering for video encoding and decoding

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40090417

Country of ref document: HK