CN114520916A - Video encoding method, video encoding device, terminal device and storage medium - Google Patents

Video encoding method, video encoding device, terminal device and storage medium Download PDF

Info

Publication number
CN114520916A
CN114520916A CN202011302700.8A CN202011302700A CN114520916A CN 114520916 A CN114520916 A CN 114520916A CN 202011302700 A CN202011302700 A CN 202011302700A CN 114520916 A CN114520916 A CN 114520916A
Authority
CN
China
Prior art keywords
division
sub
block
mode
partition
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.)
Granted
Application number
CN202011302700.8A
Other languages
Chinese (zh)
Other versions
CN114520916B (en
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 CN202011302700.8A priority Critical patent/CN114520916B/en
Publication of CN114520916A publication Critical patent/CN114520916A/en
Application granted granted Critical
Publication of CN114520916B publication Critical patent/CN114520916B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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/176Methods 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 block, e.g. a macroblock
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • 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

Abstract

The embodiment of the application discloses a video coding method, a video coding device, terminal equipment and a storage medium, wherein the method comprises the following steps: and performing block division processing on the unit to be coded based on the determined first division mode to obtain N sub-blocks. Traversing and selecting one subblock from N subblocks as a subblock N1iDetermining the sub-block N in the first coding tree1iIs divided into sub-blocks of depth. In sub-block N1iWithin the sub-block division depth of (1), sub-block N is determined1iAnd the first quantity in the first dividing direction and the second quantity in the second dividing direction are obtained until each subblock in the N subblocks is traversed. According to a first number of each sub-block in a first division direction and a second number of each sub-block in a second division directionThe second number in the division direction determines the division direction of the second division manner. By adopting the embodiment of the application, the time for video coding can be reduced and the coding complexity can be reduced.

Description

Video encoding method, video encoding device, terminal device and storage medium
Technical Field
The present application relates to the field of video processing, and in particular, to a video encoding method, apparatus, terminal device, and storage medium.
Background
With the development of network technology, more and more users watch videos through various terminals. Because the storage space occupied by the video is often very large and the network bandwidth is limited, when the video is transmitted, the video needs to be compressed, i.e. encoded, so as to reduce the occupation of the storage space by the video. In the related art, when a video encoder encodes a video, for each partition mode, various partition attempts in different partition directions need to be performed, so as to select an optimal partition mode. However, the encoding method for traversing all the division modes and the division directions needs to consume much time, and the encoding complexity is high.
Disclosure of Invention
Embodiments of the present application provide a video encoding method, an apparatus, a terminal device, and a storage medium, which can reduce video encoding time and encoding complexity.
In a first aspect, an embodiment of the present application provides a video encoding method, where the method includes:
determining a first partition mode for carrying out block partition processing on a unit to be coded in a target video frame, and carrying out block partition processing on the unit to be coded according to the first partition mode to obtain N subblocks of the unit to be coded; the N subblocks all belong to a first layer subblock in a first coding tree corresponding to the first division mode; the N is the number of subblocks on a first layer subblock in the first coding tree, and is determined by the first partition mode;
traversing and selecting one sub-block from the N sub-blocks as a sub-block N1iDetermining said sub-block N in said first coding tree1iThe subblock division depth of (a); the subblock division depth is equal to the subblock N1iDetermined by the associated subdivision mode; the dividing directions of the sub-dividing modes comprise a first dividing direction and a second dividing direction; i is a non-negative integer less than N;
in the sub-block N1iWithin the subblock division depth of (2), determining the subblock N1iObtaining a first number of each sub-block in the first dividing direction and a second number of each sub-block in the second dividing direction until each sub-block of the N sub-blocks is traversed;
taking a next division mode of the first division mode as a second division mode, and determining the division direction of the second division mode according to the first number of each sub-block in the first division direction and the second number of each sub-block in the second division direction; the dividing direction of the second dividing mode is used for indicating an encoder corresponding to the unit to be encoded and carrying out block dividing processing on the unit to be encoded; the second division manner is different from the first division manner.
With reference to the first aspect, in a possible implementation manner, before the determining the first partition mode for performing the block partition processing on the unit to be encoded in the target video frame, the method further includes:
the method comprises the steps of obtaining an encoder used for carrying out video encoding on a target image frame in video data, and obtaining at least one image block in the target video frame in the process of adopting the encoder to carry out video encoding on the target image frame;
acquiring a unit to be encoded from the at least one image block, and determining a block division strategy for performing block division processing on the unit to be encoded based on the encoder; the block partitioning policy includes at least the first partitioning manner.
With reference to the first aspect, in a possible implementation manner, the determining, by taking a next partitioning manner of the first partitioning manner as a second partitioning manner, a partitioning direction of the second partitioning manner according to a first number of each sub-block in the first partitioning direction and a second number of each sub-block in the second partitioning direction includes:
taking a next partitioning mode of the first partitioning mode as a second partitioning mode based on a block partitioning strategy corresponding to the coding unit; the second division manner is different from the first division manner;
determining a first accumulated number of the N sub-blocks in the first dividing direction according to the first number of each sub-block in the first dividing direction;
determining a second accumulated number of the N sub-blocks in the second dividing direction according to a second number of each sub-block in the second dividing direction;
determining the dividing direction of the second dividing mode according to the first accumulated quantity and the second accumulated quantity; and the dividing direction of the second dividing mode is used for indicating the encoder corresponding to the unit to be encoded and carrying out block dividing processing on the unit to be encoded.
With reference to the first aspect, in a possible implementation manner, the determining a dividing direction of the second dividing manner according to the first cumulative quantity and the second cumulative quantity includes:
comparing the first accumulated quantity with the second accumulated quantity to obtain a comparison result;
if the comparison processing result indicates that the first accumulated quantity is greater than the second accumulated quantity, terminating the division decision of the second division mode in the second division direction, and determining the first division direction as the division direction of the second division mode;
if the comparison processing result indicates that the first accumulated quantity is smaller than the second accumulated quantity, the division decision of the second division mode in the first division direction is terminated, and the second division direction is determined as the division direction of the second division mode.
With reference to the first aspect, in a possible implementation manner, the first dividing direction is a horizontal dividing direction, and the second dividing direction is a vertical dividing direction;
if the comparison processing result indicates that the first cumulative number is greater than the second cumulative number, terminating the partition decision of the second partition mode in the second partition direction, and determining the first partition direction as the partition direction of the second partition mode includes:
if the comparison processing result indicates that the first accumulated quantity is larger than the second accumulated quantity, taking the block division mode corresponding to the vertical division direction as a first to-be-optimized division mode in the second division mode, and determining the block division modes except the first to-be-optimized division mode as the first to-be-optimized division mode in the second division mode;
when the second partition mode is used for carrying out block partition processing on the unit to be coded, the partition decision of the first partition mode to be optimized in the second partition mode in the vertical partition direction is terminated, and the horizontal partition direction corresponding to the first partition mode is determined as the partition direction of the second partition mode.
With reference to the first aspect, in a possible implementation manner, the first dividing direction is a horizontal dividing direction, and the second dividing direction is a vertical dividing direction;
if the comparison processing result indicates that the first cumulative number is smaller than the second cumulative number, terminating the partition decision of the second partition mode in the first partition direction, and determining the second partition direction as the partition direction of the second partition mode includes:
if the comparison processing result indicates that the first accumulated quantity is smaller than the second accumulated quantity, taking the block division mode corresponding to the vertical division direction as a second to-be-optimized division mode in the second division mode, and determining the block division modes except the second to-be-optimized division mode as the second optimized division mode in the second division mode;
when the second partition mode is used for carrying out block partition processing on the unit to be coded, the partition decision of the second partition mode to be optimized in the second partition mode in the horizontal partition direction is terminated, and the vertical partition direction corresponding to the second optimized partition mode is determined as the partition direction of the second partition mode.
With reference to the first aspect, in a possible implementation manner, the first partition manner is a quadtree partition manner; the second division mode is one of a binary tree division mode, a ternary tree division mode and an extended quaternary tree division mode;
the method further comprises the following steps:
determining the dividing direction of the second dividing mode as a target dividing direction, and after block dividing processing is performed on the unit to be encoded according to the second dividing mode corresponding to the target dividing direction, obtaining M subblocks of the unit to be encoded; the M subblocks all belong to a first layer subblock in a second coding tree corresponding to the second division mode; the M is the number of subblocks on a first layer subblock in the second coding tree, and the M is determined by the second division mode;
determining first rate-distortion costs of the N sub-blocks in the first coding tree and second rate-distortion costs of the M sub-blocks in the second coding tree; the first rate distortion cost and the second rate distortion cost are the sum of the coding rate of the unit to be coded and the image distortion rate; the image distortion rate is the image distortion rate between a unit obtained by encoding the divided sub-blocks and the unit to be encoded after the unit to be encoded is divided by adopting a dividing mode;
determining a partition mode with the minimum rate-distortion cost in the first partition mode and the second partition mode based on the sum of first rate-distortion costs of the N sub-blocks and the sum of second rate-distortion costs of the M sub-blocks;
determining the determined division mode with the minimum rate distortion cost as a target division mode; and performing coding prediction on the unit to be coded based on the target division mode.
In a second aspect, an embodiment of the present application provides a video encoding apparatus, including:
the first block division processing module is used for determining a first division mode for carrying out block division processing on a unit to be coded in a target video frame, and carrying out block division processing on the unit to be coded according to the first division mode to obtain N subblocks of the unit to be coded; the N subblocks all belong to a first layer subblock in a first coding tree corresponding to the first division mode; the N is the number of subblocks on a first layer subblock in the first coding tree, and is determined by the first partition mode;
a sub-block dividing depth determining module for selecting one sub-block from the N sub-blocks in a traversal manner as a sub-block N1iIn the first editionDetermining the subblock N in a code tree1iThe subblock division depth of (a); the subblock division depth is equal to the subblock N1iDetermined by the associated subdivision mode; the dividing directions of the sub-dividing modes comprise a first dividing direction and a second dividing direction; i is a non-negative integer less than N;
a sub-block number counting module for counting the number of sub-blocks in the sub-block N1iWithin the subblock division depth of (2), determining the subblock N1iObtaining a first number of each sub-block in the first dividing direction and a second number of each sub-block in the second dividing direction until each sub-block in the N sub-blocks is traversed;
a dividing direction determining module, configured to determine a dividing direction of a second dividing manner according to a first number of each sub-block in the first dividing direction and a second number of each sub-block in the second dividing direction, where a next dividing manner of the first dividing manner is used as the second dividing manner; the dividing direction of the second dividing mode is used for indicating the encoder corresponding to the unit to be encoded and carrying out block dividing processing on the unit to be encoded; the second division manner is different from the first division manner.
With reference to the second aspect, in one possible implementation, the apparatus further includes:
the image block acquisition module is used for acquiring an encoder for performing video coding on a target image frame in video data, and acquiring at least one image block in the target video frame in the process of performing video coding on the target image frame by adopting the encoder;
the block division strategy determining module is used for acquiring a unit to be coded from the at least one image block and determining a block division strategy for carrying out block division processing on the unit to be coded based on the encoder; the block partitioning policy includes at least the first partitioning manner.
With reference to the second aspect, in one possible implementation manner, the dividing direction determining module includes:
a second partition mode determining unit, configured to use a next partition mode of the first partition mode as a second partition mode based on a block partition policy corresponding to the encoding unit; the second division manner is different from the first division manner;
a first cumulative number determining unit, configured to determine, according to a first number of each sub-block in the first division direction, a first cumulative number of the N sub-blocks in the first division direction;
a second cumulative number determining unit, configured to determine, according to a second number of each sub-block in the second dividing direction, a second cumulative number of the N sub-blocks in the second dividing direction;
the dividing direction determining unit is used for determining the dividing direction of the second dividing mode according to the first accumulative quantity and the second accumulative quantity; and the dividing direction of the second dividing mode is used for indicating the encoder corresponding to the unit to be encoded and carrying out block dividing processing on the unit to be encoded.
With reference to the second aspect, in one possible implementation manner, the dividing direction determining unit includes:
the comparison processing subunit is configured to compare the first accumulated quantity with the second accumulated quantity to obtain a comparison processing result;
a first comparison result processing subunit, configured to terminate a division decision of the second division manner in the second division direction if the comparison processing result indicates that the first accumulated number is greater than the second accumulated number, and determine the first division direction as the division direction of the second division manner;
a second comparison result processing subunit, configured to terminate the division decision of the second division manner in the first division direction if the comparison processing result indicates that the first cumulative number is smaller than the second cumulative number, and determine the second division direction as the division direction of the second division manner.
With reference to the second aspect, in a possible implementation manner, the first dividing direction is a horizontal dividing direction, and the second dividing direction is a vertical dividing direction;
the first comparison result processing subunit is specifically configured to:
if the comparison processing result indicates that the first accumulated quantity is larger than the second accumulated quantity, taking the block division mode corresponding to the vertical division direction as a first to-be-optimized division mode in the second division mode, and determining the block division modes except the first to-be-optimized division mode as the first to-be-optimized division mode in the second division mode;
when the second partition mode is used for carrying out block partition processing on the unit to be coded, the partition decision of the first partition mode to be optimized in the second partition mode in the vertical partition direction is terminated, and the horizontal partition direction corresponding to the first partition mode is determined as the partition direction of the second partition mode.
With reference to the second aspect, in one possible implementation, the first dividing direction is a horizontal dividing direction, and the second dividing direction is a vertical dividing direction;
the second comparison result processing subunit is specifically configured to:
if the comparison processing result indicates that the first accumulated quantity is smaller than the second accumulated quantity, taking the block division mode corresponding to the vertical division direction as a second to-be-optimized division mode in the second division mode, and determining the block division modes except the second to-be-optimized division mode as the second optimized division mode in the second division mode;
when the second partition mode is used for carrying out block partition processing on the unit to be coded, the partition decision of the second partition mode to be optimized in the second partition mode in the horizontal partition direction is terminated, and the vertical partition direction corresponding to the second optimized partition mode is determined as the partition direction of the second partition mode.
With reference to the second aspect, in a possible implementation manner, the first partition manner is a quadtree partition manner; the second division mode is one of a binary tree division mode, a ternary tree division mode and an extended quaternary tree division mode;
the device further comprises:
a second block division processing module, configured to determine a division direction of the second division manner as a target division direction, and perform block division processing on the unit to be encoded according to the second division manner corresponding to the target division direction, so as to obtain M sub-blocks of the unit to be encoded; the M subblocks all belong to a first layer subblock in a second coding tree corresponding to the second division mode; the M is the number of subblocks on a first layer subblock in the second coding tree, and the M is determined by the second division mode;
a rate-distortion cost determination module, configured to determine a first rate-distortion cost for the N sub-blocks in the first coding tree, and determine a second rate-distortion cost for the M sub-blocks in the second coding tree; the first rate distortion cost and the second rate distortion cost are the sum of the coding rate of the unit to be coded and the image distortion rate; the image distortion rate is the image distortion rate between a unit obtained by encoding the divided sub-blocks and the unit to be encoded after the unit to be encoded is divided by adopting a dividing mode;
a minimum rate-distortion cost determination module, configured to determine, based on a sum of first rate-distortion costs of the N sub-blocks and a sum of second rate-distortion costs of the M sub-blocks, a partition manner having a minimum rate-distortion cost in the first partition manner and the second partition manner;
the target division mode determining module is used for determining the determined division mode with the minimum rate distortion cost as a target division mode; and performing coding prediction on the unit to be coded based on the target division mode.
In a third aspect, an embodiment of the present application provides a terminal device, where the terminal device includes a processor and a memory, and the processor and the memory are connected to each other. The memory is configured to store a computer program that enables the terminal device to perform the method provided by the first aspect and/or any one of the possible implementation manners of the first aspect, where the computer program includes program instructions, and the processor is configured to call the program instructions to perform the method provided by the first aspect and/or any one of the possible implementation manners of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, where the computer program includes program instructions, and the program instructions, when executed by a processor, cause the processor to execute the method provided by the first aspect and/or any one of the possible implementation manners of the first aspect.
In the embodiment of the application, a first partition mode used for performing block partition processing on a unit to be coded in a target video frame is determined, and the block partition processing is performed on the unit to be coded according to the first partition mode, so that N sub-blocks of the unit to be coded are obtained. And the N subblocks all belong to a first layer subblock in a first coding tree corresponding to the first division mode. N is the number of sub-blocks on the first layer of sub-blocks in the first coding tree, and N is determined by the first partition. Traversing and selecting one subblock from N subblocks as a subblock N1iDetermining the sub-block N in the first coding tree1iIs divided into sub-blocks of depth. The sub-block division depth is determined by the sub-block N1iDetermined by the associated subdivision scheme. The dividing direction of the sub-dividing mode comprises a first dividing direction and a second dividing direction. i is a non-negative integer less than N. In sub-block N1iWithin the sub-block division depth of (1), sub-block N is determined1iThe first number of each subblock in the first dividing direction and the second number of each subblock in the second dividing direction are obtained until each subblock in the N subblocks is traversed. And taking the next division mode of the first division mode as a second division mode, and determining the division direction of the second division mode according to the first number of each sub-block in the first division direction and the second number of each sub-block in the second division direction. Second drawingAnd the division direction of the division mode is used for indicating the encoder corresponding to the unit to be encoded and carrying out block division processing on the unit to be encoded. The second division manner is different from the first division manner. By adopting the embodiment of the application, the time for video coding can be reduced and the coding complexity can be reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of partitioning for a video frame;
fig. 2 is a schematic diagram of a horizontal division mode and a vertical division mode of BT, TT and EQT division provided by the present application;
fig. 3 is a schematic diagram of an implementation environment of a video encoding method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a video encoding method according to an embodiment of the present application;
FIG. 5 is a flow chart illustrating a partitioning decision provided by an embodiment of the present application;
fig. 6 is a schematic structural diagram of a coding tree provided in an embodiment of the present application;
FIG. 7 is a schematic diagram of an application scenario for determining partitioning depth of sub-blocks provided in the present application;
fig. 8 is a schematic view of an application scenario for determining a partitioning direction of a second partitioning manner according to an embodiment of the present application;
fig. 9 is a schematic view of an application scenario for determining a partitioning direction of a second partitioning manner according to an embodiment of the present application;
fig. 10 is a flowchart illustrating a video encoding method according to an embodiment of the present application;
fig. 11 is a schematic view of an application scenario of a partition decision provided in an embodiment of the present application;
fig. 12 is a schematic structural diagram of a video encoding apparatus according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a video encoding apparatus according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
In order to more clearly explain the technical solutions provided in the present application, first, terms related in the embodiments of the present application are described:
coding Unit (CU): generally, a video sequence is subjected to a frame dropping process to obtain a plurality of video frames. Wherein one video frame may include a plurality of coding units. In a video encoding process, a video frame needs to be divided, wherein the division includes a plurality of levels. For example, referring to fig. 1, fig. 1 is a schematic diagram of a video frame division. As shown in fig. 1, it is assumed that a video sequence includes 99 video frames, which are video frame 1 to video frame 99. Video encoder encoding of video frame 99 is divided into examples. Suppose that a Quad Tree (QT) partition of a video frame 99 results in four tiles, CU1, CU2, CU3, and CU4, respectively. The four image blocks are also coding units. Further, the video encoder may continue to divide any one or more of the four image blocks to obtain the first layer sub-block. For example, taking the division manner for the image block CU4 as a Binary Tree (BT) division, the video encoder can divide the image block CU4 into two first-layer sub-blocks, a first-layer sub-block 101 and a first-layer sub-block 102, respectively. The video encoder may further divide any 1 or 2 of the two first-layer sub-blocks to obtain a second-layer sub-block (not shown temporarily in fig. 1), and so on to obtain a deeper sub-block.
Currently, a video encoder mainly includes 4 kinds of partitioning modes, such as QT partitioning, BT partitioning, Ternary Tree (TT) partitioning, Extended Quad-Tree (EQT) partitioning, and the like. The BT partition, the TT partition, and the EQT partition all have two partition modes, vertical and horizontal. Specifically, please refer to fig. 2, fig. 2 is a schematic diagram of a horizontal division mode and a vertical division mode of BT, TT and EQT division provided by the present application. Wherein, a number (1) in fig. 2 represents a binary tree division in the vertical direction (abbreviated as vertical binary division), a number (2) in fig. 2 represents a binary tree division in the horizontal direction (abbreviated as horizontal binary division), a number (3) in fig. 2 represents a ternary tree division in the vertical direction (abbreviated as vertical trifurcation), a number (4) in fig. 2 represents a ternary tree division in the horizontal direction (abbreviated as horizontal trifurcation), a number (5) in fig. 2 represents an extended quaternary tree division in the vertical direction (abbreviated as vertical extended quaternary division), and a number (6) in fig. 2 represents an extended quaternary tree division in the horizontal direction (abbreviated as horizontal extended quaternary division). Generally, QT and BT can be recursively divided, i.e. the sub-blocks obtained after QT division can continue BT division, but the sub-blocks after BT division can no longer be QT divided. The EQT and TT may also be recursively divided with BT, i.e. the subblocks after EQT/TT division may continue BT division, while the subblocks after BT division may also continue EQT/BT division.
The Video encoding method provided by the present application can be applied in the context of multiple Video encoding standards, such as in the multifunctional Video encoding Standard (VVC/h.266), or in the High Efficiency Video encoding Standard (HEVC), or in the second generation digital Video encoding Standard (AVS 2), or in the third generation digital Video encoding Standard (AVS 3), and the present application does not limit this.
Referring to fig. 3, fig. 3 is a schematic diagram of an implementation environment of a video encoding method according to an embodiment of the present disclosure. As shown in fig. 3, the implementation environment may include a terminal device 210 and a server 220. The terminal device 210 is connected to the server 220 through a wireless network or a wired network. Optionally, the terminal device 210 includes a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, and the like, which is not limited herein. The terminal device 210 is installed and operated with an encoder supporting video encoding. Optionally, the server 220 is an independent physical server, or a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, a distribution Network (CDN), a big data and artificial intelligence platform, and the like. The terminal device and the server can be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
In the embodiment of the present application, the server or the terminal device may be used as an execution subject to implement the technical solution provided in the embodiment of the present application, and the technical method provided in the present application may also be implemented through interaction between the terminal device and the server, which is not limited in the embodiment of the present application. For convenience of description, the following description will be given taking a terminal device as an example. Specifically, in the method in the embodiment of the present application, the terminal device determines a first partition mode used for performing block partition processing on a unit to be encoded in a target video frame, and performs block partition processing on the unit to be encoded according to the first partition mode, so as to obtain N sub-blocks of the unit to be encoded. And the N subblocks all belong to a first layer subblock in a first coding tree corresponding to the first division mode. N is the number of sub-blocks on the first layer of sub-blocks in the first coding tree, and N is determined by the first partition. Traversing and selecting one subblock from N subblocks as a subblock N1iDetermining sub-blocks N in a first coding tree1iIs divided into sub-blocks of depth. The sub-block division depth is determined by the sub-block N1iDetermined by the associated subdivision scheme. The dividing direction of the subdivision mode comprises a first dividing direction and a second dividing direction. i.e. iIs a non-negative integer less than N. In sub-block N1iWithin the sub-block division depth of (1), sub-block N is determined1iThe first number of each subblock in the first dividing direction and the second number of each subblock in the second dividing direction are obtained until each subblock in the N subblocks is traversed. And taking the next division mode of the first division mode as a second division mode, and determining the division direction of the second division mode according to the first number of each sub-block in the first division direction and the second number of each sub-block in the second division direction. And the dividing direction of the second dividing mode is used for indicating the encoder corresponding to the unit to be encoded and carrying out block dividing processing on the unit to be encoded. The second division manner is different from the first division manner. By adopting the embodiment of the application, the time for video coding can be reduced and the coding complexity can be reduced.
The method and the related apparatus provided by the embodiments of the present application will be described in detail with reference to fig. 4 to 14, respectively.
Referring to fig. 4, fig. 4 is a flowchart illustrating a video encoding method according to an embodiment of the present disclosure. The method provided by the embodiment of the application can comprise the following steps S301 to S304:
s301, determining a first partition mode for carrying out block partition processing on a unit to be coded in a target video frame, and carrying out block partition processing on the unit to be coded according to the first partition mode to obtain N sub-blocks of the unit to be coded.
In some possible embodiments, a first partition mode for performing block partition processing on a unit to be encoded in a target video frame is determined, and the unit to be encoded is subjected to block partition processing according to the first partition mode, so as to obtain N sub-blocks of the unit to be encoded. The N subblocks all belong to a first layer subblock in a first coding tree corresponding to a first division mode, N is the number of subblocks on the first layer subblock in the first coding tree, and N is determined by the first division mode. That is to say, the first partition manner in the embodiment of the present application is only a partition manner for dividing the unit to be encoded into the first layer sub-blocks, and then, the partition manner is only for dividing each first layer sub-block, and the partition manner of the sub-blocks of the first layer sub-blocks (for convenience of description, the second layer sub-blocks are abbreviated for short), the partition manner of the sub-blocks of the first layer sub-blocks (for convenience of description, the third layer sub-blocks are abbreviated for short), and even the partition manner of the deeper sub-blocks is not limited by the first partition manner any more. For example, assuming that the first partition manner is QT partition (i.e., m is 4), the unit to be encoded may be divided into 4 first-layer sub-blocks, and further, for each subsequent first-layer sub-block and the deeper sub-block, QT partition and/or BT partition and/or TT partition and/or EQT partition and the like may be adopted, which is determined according to an actual application scenario and is not limited herein.
Generally, subsequently, for the partitioning manner of the first layer sub-block and the deeper sub-block, a Rate-distortion Optimization (RDO) method is adopted to determine, and finally, the partitioning manner with the minimum Rate-distortion (RD) cost is selected and stored as the optimal partitioning manner of the whole unit to be encoded.
Wherein, the execution sequence of the above 4 partitions (i.e. QT, BT, TT and EQT) in different encoders is different. Assuming that the execution order in the encoder is T0 → T1 → T2 → T3, T0 may select QT partition in general. Alternatively, T0 may be one of BT, TT and EQT, but is not limited thereto. For convenience of description, T0 in the embodiments of the present application is described as an example of QT division. Referring to fig. 5, fig. 5 is a schematic flow chart of a partitioning decision according to an embodiment of the present disclosure. As shown in fig. 5, the execution order in the encoder is QT → T1 → T2 → T3, wherein, when T0 is QT split, the remaining T1, T2, T3 may only be any one of BT, TT, EQT and T1, T2, T3 cannot be the same split. Therefore, there are six combinations of T1, T2, and T3: t1, T2, T3 may be BT, TT, EQT, respectively, i.e. the order of execution of the encoder is QT → BT → TT → EQT. T1, T2, T3 may also be BT, EQT, TT respectively, i.e. the order of encoder execution is QT → BT → EQT → TT. T1, T2, T3 may also be TT, BT, EQT, respectively, i.e. the order of execution of the encoder is QT → TT → BT → EQT. T1, T2 and T3 may also be TT, EQT and BT, respectively, i.e. the order of execution of the encoder is QT → TT → EQT → BT. T1, T2, T3 may also be EQT, BT, TT respectively, i.e. the order of encoder execution is QT → EQT → BT → TT. T1, T2, T3 may also be EQT, TT, BT respectively, i.e. the order of execution of the encoder is QT → EQT → TT → BT. The selection of the 6 execution sequences is not limited in the present application. Therefore, when the first partition method is QT partition, the next partition method (i.e., the second partition method) of the first partition method may be any one of BT, TT, and EQT, specifically based on the execution order of the actually used encoders. For example, it is assumed that the execution order of the encoder used in the present application is QT → BT → TT → EQT, the second partition is BT when the first partition is QT, TT when the first partition is BT, and EQT when the first partition is TT.
It should be understood that when the partitioning decision is made based on the flow shown in fig. 5, then at the time of the T1 partitioning decision, the QT partitioning decision of the current CU has been completed, i.e., the partitioning modes of the four sub-blocks of the QT partitioning of the current CU have also been determined. When the T2 partition decision is made, the QT and T1 partition decisions of the current CU have been completed, i.e., the optimal partition mode of the current CU is one of QT and T1 partitions. When the T3 partition decision is made, the QT, T1 and T2 partition decisions of the current CU are already completed, i.e., the optimal partition mode of the current CU is one of QT, T1 and T2 partitions. Until the T3 partition decision is performed, a final optimal partition mode may be selected from QT, T1, T2, and T3, and the optimal partition mode is used for subsequent coding prediction of the coding unit to find a prediction block corresponding to the coding unit, and then coding is performed based on the difference of content variation between the prediction block and the coding unit.
For convenience of description, the following embodiments of the present application are described by taking the execution order of the encoder as QT → BT → TT → EQT as an example. Therefore, QT, BT, TT and EQT may be sequentially taken as the first division. Wherein the value of N is equal to 4 when the first partition method is QT partition, equal to 2 when the first partition method is BT partition, equal to 3 when the first partition method is TT partition, and equal to 4 when the first partition method is EQT partition. It is understood that, when the unit to be encoded is divided based on the above-described execution order (i.e., QT → BT → TT → EQT), the dividing direction of BT is determined by QT, the dividing direction of TT is determined by BT, and the dividing direction of EQT is determined by TT.
It should be understood that, in the present application, the first coding tree is a coding tree corresponding to the first partition mode, where the first coding tree includes information that the unit to be coded is divided into N first-layer sub-blocks based on the first partition mode, and also includes information that the first-layer sub-blocks are divided into second-layer sub-blocks, and the second-layer sub-blocks are divided into third-layer sub-blocks and deeper sub-blocks. For example, please refer to fig. 6, fig. 6 is a schematic structural diagram of a coding tree according to an embodiment of the present application. As shown in fig. 6, a root node of the coding tree is a unit to be coded, where if the first partition manner is BT partition, 2 first-layer sub-blocks, which are sub-block 1 and sub-block 2 in fig. 6 respectively, can be obtained after block partition processing is performed on the unit to be coded based on BT partition in the horizontal direction (i.e., horizontal binary partition). Further, by performing horizontal three-way division on the sub-block 1 in the first layer sub-block and performing horizontal two-way division on the sub-block 2 in the first layer sub-block, 5 second layer sub-blocks can be obtained, which are respectively the sub-block 3, the sub-block 4, the sub-block 5, the sub-block 6 and the sub-block 7 shown in fig. 6. Wherein, by performing vertical expansion quad-fork division on the sub-block 4 in the second layer of sub-blocks and performing horizontal tri-fork division on the sub-block 7, 7 third layer sub-blocks can be obtained, which are respectively a sub-block 8, a sub-block 9, a sub-block 10, a sub-block 11, a sub-block 12, a sub-block 13, and a sub-block 14 shown in fig. 6. In order to make the representation of the coding tree more concise, the graphical representation of the sub-blocks in the coding tree may be omitted, i.e. as shown in fig. 6, the squares used to represent the sub-blocks are omitted to obtain a simplified representation of the coding tree.
S302, traversing and selecting one sub-block from N sub-blocks as a sub-block N1iDetermining the sub-block N in the first coding tree1iIs divided into sub-blocks of depth.
In some possible embodiments, one sub-block is selected from the N sub-blocks as sub-block N in a traversal manner1iDetermining the sub-block N in the first coding tree1iIs divided into sub-blocks of depth. Wherein the sub-block division depth is determined by the sub-block N1iDetermined by the associated subdivision scheme. The dividing directions of the sub-dividing modes comprise a first dividing direction and a second dividing direction, wherein i is a non-negative integer smaller than N. Here, the subdivision scheme is a scheme for dividing the first layer subblock and a scheme for dividing the deeper layer subblocks, for example, the second layer subblock and the third layer subblock.
For example, please refer to fig. 7, fig. 7 is a schematic diagram of an application scenario for determining subblock division depth provided in the present application. As shown in fig. 7, assuming that the first partition is QT partition, after performing first-layer partition on the unit to be encoded based on QT partition, 4 first-layer sub-blocks (i.e., N is 4) may be obtained, and thereafter, for each first-layer sub-block, the optimal partition for each first-layer sub-block may be determined based on RDO method, and the optimal partition for the sub-block of the first-layer sub-block (i.e., the second-layer sub-block) may be determined based on RDO method, and so on, and finally, the one with the lowest RD cost of the whole unit to be encoded, which is obtained based on QT partition, is selected as the best partition for this time.
It is assumed that the optimal partition manner of the entire unit to be encoded, which is obtained by QT partition, is determined based on the RDO method as the partition manner presented in the left unit to be encoded in fig. 7, where a line 01 in the unit to be encoded indicates QT partition, a line 02 indicates BT partition, and a line 03 indicates TT partition. As shown in fig. 7 to the right for the corresponding tree representation. Therefore, for 4 sub-blocks (i.e., 4 first-layer sub-blocks), the division depth of each of the 4 sub-blocks may be counted in turn, thereby obtaining 4 division depths. As shown in fig. 7, the first layer subblock N at the upper left corner10Is divided horizontally into 2 second layer sub-blocks, so that first layer sub-block N10Sub-block division depth dN of102, top right first layer subblock N11Is divided into 2 second layer sub-blocks by a horizontal binary division, so that the first layer sub-block N11Sub-block division depth dN of112, first layer sub-block N in lower left corner12Is divided horizontally into 2 second layer sub-blocks, so that first layer sub-block N12Sub-block division depth dN of122, first layer sub-block N in lower right corner13Is divided into 2 second parts by a horizontal binary divisionLayer sub-block, thus first layer sub-block N13Sub-block division depth dN of13=2。
S303, in sub-block N1iWithin the sub-block division depth of (1), sub-block N is determined1iThe first number of each subblock in the first dividing direction and the second number of each subblock in the second dividing direction are obtained until each subblock in the N subblocks is traversed.
In some possible embodiments, in sub-block N1iWithin the sub-block division depth of (1), sub-block N is determined1iThe first number of each subblock in the first dividing direction and the second number of each subblock in the second dividing direction are obtained until each subblock in the N subblocks is traversed. Wherein the first division direction may be a vertical division direction and the second division direction may be a horizontal division direction. Alternatively, the first division direction may be a horizontal division direction, and the second division direction may be a vertical division direction. Optionally, the first dividing direction and the second dividing direction may also be a diagonal left dividing direction and a diagonal right dividing direction, respectively, which is not limited herein. For convenience of description, the following embodiments of the present application are described by taking the first dividing direction as a vertical dividing direction and the second dividing direction as a horizontal dividing direction as an example.
For example, please refer to FIG. 7 together with the description of the embodiment10Within the subblock division depth of 2, a subblock N in the first layer subblock may be obtained10Is divided into 2 second layer subblocks by the horizontal binary branch, and the 2 second layer subblocks are not further divided, so subblock N is10First number HN in the horizontal division direction10Sub-block N ═ 110A second number VN in the vertical dividing direction100. At dN11Sub-block N in first layer sub-block within sub-block division depth of 211Is horizontally trifurcated into 3 second layer sub-blocks, and the 3 second layer sub-blocks are not further divided, and thus, sub-block N11In the horizontal dividing directionIs the first number HN11Sub-block N ═ 111A second number VN in the vertical dividing direction110. At dN12Sub-block N in first layer sub-block within sub-block division depth of 212Is vertically trifurcated into 3 second layer sub-blocks and the 3 second layer sub-blocks are not further divided, therefore, sub-block N12First number HN in the horizontal division direction120, subblock N12A second number VN in the vertical dividing direction 121. At dN13Sub-block N in first layer sub-block within sub-block division depth of 213Is divided into 2 second layer subblocks by a horizontal binary division and the 2 second layer subblocks are not further divided, thus subblock N13First number HN in the horizontal division direction13Sub-block N ═ 113A second number VN in the vertical dividing direction13=0。
S304, taking the next division mode of the first division mode as a second division mode, and determining the division direction of the second division mode according to the first number of each sub-block in the first division direction and the second number of each sub-block in the second division direction.
In some possible embodiments, a next division manner of the first division manner is used as the second division manner, and the division direction of the second division manner is determined according to the first number of each sub-block in the first division direction and the second number of each sub-block in the second division direction. The dividing direction of the second dividing mode is used for indicating the encoder corresponding to the unit to be encoded, and the unit to be encoded is subjected to block dividing processing, and the second dividing mode is different from the first dividing mode.
Specifically, the next partition method of the first partition method is used as the second partition method based on the block partition strategy corresponding to the coding unit. Wherein the second division manner is different from the first division manner. And determining a first accumulated number of the N sub-blocks in the first dividing direction according to the first number of each sub-block in the first dividing direction. And determining a second accumulated number of the N sub-blocks in the second dividing direction according to the second number of each sub-block in the second dividing direction. Further, the dividing direction of the second dividing manner may be determined based on the first cumulative number and the second cumulative number. And the dividing direction of the second dividing mode is used for indicating the encoder corresponding to the unit to be encoded and carrying out block dividing processing on the unit to be encoded. The first accumulated quantity is equal to the sum of the first quantity corresponding to each sub-block in the first layer of sub-blocks, and the second accumulated quantity is equal to the sum of the second quantity corresponding to each sub-block in the first layer of sub-blocks.
For example, please refer to FIG. 7 together, which shows the sub-block N in FIG. 710First number HN in the horizontal division direction10Sub-block N ═ 110A second number VN in the vertical dividing direction100. Subblock N11First number HN in horizontal division direction11Sub-block N ═ 111A second number VN in the vertical dividing direction110. Subblock N12First number HN in the horizontal division direction120, subblock N12A second number VN in the vertical dividing direction 121. Subblock N13First number HN in the horizontal division direction 131, subblock N13A second number VN in the vertical dividing direction130. Thus, the first cumulative number H ═ HN can be obtained10+HN11+HN12+HN 133, and a second cumulative number V VN10+VN11+VN12+VN13=1。
Specifically, in order to determine the dividing direction of the second dividing manner, the first cumulative number and the second cumulative number may be compared to obtain a comparison result. If the comparison processing result indicates that the first accumulation quantity is larger than the second accumulation quantity, the division decision of the second division mode in the second division direction is terminated, and the first division direction is determined as the division direction of the second division mode. If the comparison processing result indicates that the first accumulation quantity is smaller than the second accumulation quantity, the division decision of the second division mode in the first division direction is terminated, and the second division direction is determined as the division direction of the second division mode.
Optionally, when the first cumulative number is equal to the second cumulative number, any one of the first dividing direction and the second dividing direction may be randomly selected as the dividing direction of the second dividing manner.
Optionally, when the first cumulative number is equal to the second cumulative number, the number of sub-blocks in the first division direction may be used as a third cumulative number, and the number of sub-blocks in the second division direction may be used as a fourth cumulative number in the N sub-blocks. And the third accumulation number and the fourth accumulation number are both less than or equal to N. It should be understood that, here, the third cumulative number and the fourth cumulative number only count the subblock information when the current unit to be encoded is divided into one layer, and do not count the subblock of the subblock or the subblock information of a deeper layer, so that both the third cumulative number and the fourth cumulative number are less than or equal to N. That is, the present application only counts whether the first layer subblock includes the vertical direction division and the horizontal direction division, but does not count how many times the first layer subblock includes the vertical direction division and the horizontal direction division. Wherein. If any one of the m first-layer subblocks only comprises the vertical division, the first accumulated quantity is added by 1, and if any one of the m first-layer subblocks comprises the vertical division and the horizontal division, the first accumulated quantity and the second accumulated quantity are respectively added by 1. For example, assume that there are 4 first-layer sub-blocks, respectively sub-block N10,N11,N12And N13Wherein, sub-block N10And N11Both the vertical and horizontal division are included, N12And N13If only the division in the horizontal direction is included, the first cumulative number corresponding to the horizontal division direction is 4, and the second cumulative number corresponding to the vertical division direction is 2. Therefore, the dividing direction of the second dividing manner can be determined according to the third accumulation number and the fourth accumulation number. For example, the first division direction may be determined as the division direction of the second division manner when the third cumulative number is greater than the fourth cumulative number, and the second division direction may be determined as the division direction of the second division manner when the third cumulative number is less than the fourth cumulative number.
Optionally, when the first cumulative quantity is equal to the second cumulative quantity and the third cumulative quantity and the fourth cumulative quantity are obtained through statistics, the sub-block quantity threshold corresponding to the first dividing manner may also be obtained, and the dividing direction of the second dividing manner is further determined according to the third cumulative quantity, the fourth cumulative quantity and the sub-block quantity threshold. When the third accumulated quantity is larger than or equal to the sub-block quantity threshold value, the first dividing direction is determined as the dividing direction of the second dividing mode, and when the fourth accumulated quantity is larger than or equal to the sub-block quantity threshold value, the second dividing direction is determined as the dividing direction for determining the second dividing mode.
Specifically, the first division direction is taken as a horizontal division direction, and the second division direction is taken as a vertical division direction as an example. And if the comparison processing result indicates that the first accumulated quantity is larger than the second accumulated quantity, taking the block division mode corresponding to the vertical division direction as a first to-be-optimized division mode in the second division mode, and determining the block division modes except the first to-be-optimized division mode as the first to-be-optimized division mode in the second division mode. Therefore, when the block division processing is performed on the unit to be coded by using the second division mode, the division decision of the first division mode to be optimized in the second division mode in the vertical division direction is terminated, and the horizontal division direction corresponding to the first division mode is determined as the division direction of the second division mode. Correspondingly, if the comparison processing result indicates that the first accumulated quantity is smaller than the second accumulated quantity, the block division mode corresponding to the vertical division direction is taken as a second to-be-optimized division mode in the second division mode, and the block division modes except the second to-be-optimized division mode in the second division mode determine the second optimized division mode. Therefore, when the block division processing is performed on the unit to be coded by using the second division mode, the division decision of the second division mode to be optimized in the second division mode in the horizontal division direction is terminated, and the vertical division direction corresponding to the second optimization division mode is determined as the division direction of the second division mode.
For example, please refer to fig. 7 together, wherein the first cumulative number H ═ HN10+HN11+HN12+HN 133, second cumulative numberQuantity V is VN10+VN11+VN12+VN 131. Since the first cumulative number H is 3 > the second cumulative number V is 1, the partition decision of the second partition manner in the second partition direction may be terminated, and the first partition direction may be determined as the partition direction of the second partition manner. The first division direction is taken as a horizontal division direction, the second division direction is taken as a vertical division direction, and the division decision of the second division mode in the vertical division direction can be terminated, and the horizontal division direction is determined as the division direction of the second division mode.
For another example, please refer to fig. 8, wherein fig. 8 is a schematic view of an application scenario for determining a dividing direction of a second dividing manner according to an embodiment of the present application. As shown in fig. 8, assuming that the first division manner is BT division, after performing first-layer division on the unit to be encoded based on BT division, 2 first-layer sub-blocks (i.e., N is 2) can be obtained, and thereafter, for each first-layer sub-block, the optimal division manner for each first-layer sub-block can be determined based on the RDO method, and the optimal division manner for the sub-block of the first-layer sub-block (i.e., the second-layer sub-block) and the sub-blocks of the deeper layers can be determined based on the RDO method, and so on, and finally, the one with the lowest RD cost is selected as the best division manner for this division.
It is assumed that the optimal partition manner of the entire unit to be encoded, which is obtained by BT partition, is determined based on the RDO method, as the partition manner presented in the left unit to be encoded in fig. 8, where a line 02 in the unit to be encoded represents BT partition, a line 03 represents TT partition, and a line 04 represents ETQ partition. As shown in fig. 8 to the right for the corresponding tree representation. Wherein, the first layer sub-block N above the unit to be coded10Sub-block division depth dN of103, first layer subblock N11Sub-block division depth dN of113. Accordingly, a first number in a first division direction (i.e., a horizontal direction) and a second number in a second division direction (i.e., a vertical direction) may be counted, respectively, within a subblock division depth of each first-layer subblock. Wherein, the sub-block N10First number HN in the horizontal division direction10Sub-block N ═ 110In the vertical dividing directionTwo numbers VN 101. Subblock N11First number HN in the horizontal division direction 112, subblock N11A second number VN in the vertical dividing direction110. Thus, it can be determined that the first cumulative number H ═ HN10+HN11(vi) 3, VN10+VN 111. Since the first accumulation number H is 3 > the second accumulation number V is 1, the partitioning decision of the second partitioning manner in the vertical partitioning direction may be terminated, and the second partitioning direction may be determined as the horizontal partitioning direction.
For another example, please refer to fig. 9, fig. 9 is a schematic view of an application scenario for determining a partitioning direction of a second partitioning manner according to an embodiment of the present application. As shown in fig. 9, assuming that the first division manner is TT division, after performing first-layer division on the unit to be encoded based on TT division, 3 first-layer sub-blocks (i.e., N is 3) can be obtained, and then, for each first-layer sub-block, the optimal division manner for each first-layer sub-block can be determined based on the RDO method, and the optimal division manner for the sub-block of the first-layer sub-block (i.e., the second-layer sub-block) and the sub-blocks of the deeper layers can be determined based on the RDO method, and so on, and finally, the one with the lowest RD cost is selected as the best division manner for this division.
It is assumed that the optimal partition manner of the entire unit to be encoded, which is obtained by dividing the first layer sub-blocks by using TT, is determined based on the RDO method as the partition manner presented in the left unit to be encoded in fig. 9, where a line 02 in the unit to be encoded represents BT partition, a line 03 represents TT partition, and a line 04 represents ETQ partition. As shown in fig. 9 at the right for the corresponding tree representation. Wherein, the first layer sub-block N above the unit to be coded10Sub-block division depth dN of103, first layer subblock N11Sub-block division depth dN of112, first layer subblock N12Sub-block division depth dN of121. Accordingly, a first number in a first division direction (i.e., a horizontal direction) and a second number in a second division direction (i.e., a vertical direction) may be counted, respectively, within a subblock division depth of each first-layer subblock. Wherein, the sub-block N10In the horizontal dividing directionA quantity HN10Sub-block N ═ 110A second number VN in the vertical dividing direction 102. Subblock N11First number HN in the horizontal division direction11Sub-block N ═ 111A second number VN in the vertical dividing direction110. Subblock N12First number HN in the horizontal division direction120, subblock N12A second number VN in the vertical dividing direction120. Thus, it can be determined that the first cumulative number H ═ HN10+HN11+HN 122, VN is the second cumulative quantity V10+VN11+VN 122. Since the first cumulative number H2 and the second cumulative number V2 are equal to each other, one of the division directions may be randomly selected from the horizontal division direction and the vertical division direction as the division direction of the second division manner.
For example, the horizontal division direction may be selected as the division direction of the second division manner and the division of the second division manner in the vertical division direction is terminated, and for example, the vertical division direction may be selected as the division direction of the second division manner and the division of the second division manner in the horizontal division direction is terminated. For convenience of understanding, the embodiments of the present application will be described by taking an example in which the horizontal division direction is randomly selected as the division direction of the second division manner, and the division of the second division manner in the vertical division direction is terminated.
Optionally, the third cumulative number H 'and the fourth cumulative number V' may be further counted in 3 first-layer sub-blocks. That is, of the 3 first-layer sub-blocks, the number of sub-blocks adopting the first division direction is taken as the third accumulated number, and the number of sub-blocks adopting the second division direction is taken as the fourth accumulated number. As shown in FIG. 9, in TT division, sub-block N is selected from 3 sub-blocks of the first layer10Including both horizontal and vertical division, sub-block N11In which only a horizontal division is involved, sub-block N12Is not further divided, and thus, a third cumulative number H' of 2 (i.e., the sub-block N) may be obtained10And sub-block N11In all the cases, the horizontal division direction is adopted, so that H' is 2), and the fourth accumulationThe count V' is 1 (i.e. only the sub-block N)10The vertical division direction is adopted, so that V' is 1). Here, since H '2 > V' 1, the horizontal division direction may be determined as the division direction of the second division manner.
Optionally, after the third cumulative number (H '═ 2) and the fourth cumulative number (V' ═ 1) are obtained through statistics, a sub-block number threshold T corresponding to the TT dividing manner may be further obtained, and the dividing direction of the second dividing manner is further determined according to the sub-block number threshold T, the third cumulative number H ', and the fourth cumulative number V'. For example, assuming that the sub-block number threshold T is 2, a dividing direction corresponding to the sub-block number threshold T or more may be determined from the third cumulative number H 'and the fourth cumulative number V' as the dividing direction of the second division manner. Here, since H '═ 2 ═ T ═ 2 > V' ═ 1, the horizontal division direction is determined as the division direction of the second division method.
In the embodiment of the application, the to-be-encoded unit is subjected to block division processing based on the determined first division mode to obtain N sub-blocks. Traversing and selecting one subblock from N subblocks as a subblock N1iDetermining the sub-block N in the first coding tree1iIs divided into sub-blocks of depth. In sub-block N1iWithin the sub-block division depth of (1), sub-block N is determined1iAnd the first quantity of each subblock in the first dividing direction and the second quantity of each subblock in the second dividing direction are obtained until each subblock in the N subblocks is traversed. And determining the dividing direction of the second dividing mode according to the first quantity of each sub-block in the first dividing direction and the second quantity of each sub-block in the second dividing direction. By adopting the embodiment of the application, the time for video coding can be reduced and the coding complexity can be reduced.
Referring to fig. 10, fig. 10 is a flowchart illustrating a video encoding method according to an embodiment of the present application. The method provided by the embodiment of the present application can be explained by the following implementation manners provided in steps S401 to S409:
s401, an encoder used for carrying out video encoding on a target image frame in video data is obtained, and at least one image block in the target video frame is obtained in the process of carrying out video encoding on the target image frame by the encoder.
It will be appreciated that video is a sequence of still images (frames) that are played continuously at a rate that makes use of the persistence of vision of the human eye to make a person see a continuous moving image. Therefore, by performing a frame splitting process on video data or a video sequence (for convenience of description, referred to as a video), a plurality of video frames, also referred to as image frames, constituting a video can be obtained, and a target video frame can be determined from the plurality of video frames constituting the video. It should be understood that the target video frame is the object of the current video coding. For example, suppose that video frame 1, video frame 2, video frame 3, video frame 4, …, and video frame 99 are obtained after the video data is subjected to the frame dropping process. The target video frame is the video frame 1 if the object of the video coding is the video frame 1, and the target video frame is the video frame 2 if the object of the video coding is the video frame 2.
In some possible embodiments, by obtaining an encoder for video encoding a target video frame in video data, at least one image block in the target video frame may be obtained during video encoding of the target video frame using the encoder. It should be understood that the block partitioning schemes used by different encoders and the order of execution of the respective block partitioning schemes are typically different, i.e. the block partitioning strategies are different. Therefore, when an encoder for video encoding a target image frame in video data is acquired, it is equivalent to determining each block division method used in the video encoding process and determining the execution order of each block division method. Generally, the block division manner includes QT division, BT division, TT division, EQT division, and the like, which is determined according to an actual application scenario and is not limited herein. For the sake of understanding, the encoders employed in the present application all include QT partition, BT partition, TT partition and EQT partition.
S402, acquiring a unit to be coded from at least one image block, and determining a block division strategy for performing block division processing on the unit to be coded based on an encoder.
In some possible embodiments, after at least one image block in the target video frame is acquired, the unit to be encoded may be further acquired from the at least one image block. That is, a video frame may be generally divided into at least one CU, also referred to as an image block or a macroblock, and each CU may be sequentially encoded with the CU as a basic coding unit. In the embodiments of the present application, by obtaining any CU (i.e., any image block) from at least one CU (i.e., at least one image block) in a target video frame, the obtained CU (image block) can be used as a unit to be encoded. The encoder can determine a block division strategy for performing block division processing on the unit to be encoded. Here, the block division policy includes at least one block division method and an execution order of each block division method, and the first division method is included in the at least one block division method.
S403, determining a first partition mode for performing block partition processing on a unit to be coded in the target video frame, and performing block partition processing on the unit to be coded according to the first partition mode to obtain N sub-blocks of the unit to be coded.
S404, traversing and selecting one sub-block from the N sub-blocks as a sub-block N1iDetermining sub-blocks N in a first coding tree1iIs divided into sub-blocks of depth.
S405, in sub-block N1iWithin the sub-block division depth of (1), sub-block N is determined1iThe first number of each subblock in the first dividing direction and the second number of each subblock in the second dividing direction are obtained until each subblock in the N subblocks is traversed.
And S406, taking the next division mode of the first division mode as a second division mode, and determining the division direction of the second division mode according to the first number of each sub-block in the first division direction and the second number of each sub-block in the second division direction.
The specific implementation manner of steps S403 to S406 may refer to the description of steps S301 to S304 in the embodiment corresponding to fig. 4, and is not described herein again.
And S407, determining the dividing direction of the second dividing mode as a target dividing direction, and dividing the blocks of the unit to be encoded according to the second dividing mode corresponding to the target dividing direction to obtain M subblocks of the unit to be encoded.
In some feasible embodiments, the dividing direction of the second dividing manner is determined as the target dividing direction, and after the block division processing is performed on the unit to be encoded according to the second dividing manner corresponding to the target dividing direction, M sub-blocks of the unit to be encoded are obtained. The M subblocks all belong to a first layer subblock in a second coding tree corresponding to the second division mode. The value of M is the number of sub-blocks on the first layer sub-block in the second coding tree, and M is determined by the second division. For example, assume that the current encoder includes QT partition, BT partition, TT partition, and EQT partition, and the encoding order is QT → BT → TT → EQT. And if the first partition mode is QT partition, the second partition mode is BT partition. Assuming that the dividing direction (target dividing direction) of the second dividing manner is determined to be horizontal division based on QT division, it can be determined that the second dividing manner is binary division in the horizontal dividing direction (i.e., horizontal binary division). Therefore, when the unit to be encoded is divided based on the horizontal binary division, 2 subblocks (i.e., M — 2) can be obtained.
The second coding tree is a coding tree corresponding to the second division mode, the second coding tree includes information that the unit to be coded is divided into M first-layer sub-blocks based on the second division mode, and also includes information that the first-layer sub-blocks are divided into second-layer sub-blocks, and the second-layer sub-blocks are divided into third-layer sub-blocks and deeper sub-blocks. It should be understood that the second division manner in the embodiment of the present application is also directed to the division manner of dividing the unit to be encoded into the first-layer sub-blocks, and then to the division of each first-layer sub-block, and the division of the sub-blocks of the first-layer sub-blocks (for convenience of description, the second-layer sub-blocks are abbreviated for short), the division of the sub-blocks of the first-layer sub-blocks (for convenience of description, the third-layer sub-blocks are abbreviated for short), and the division of the sub-blocks of even deeper layers is no longer limited by the second division manner.
S408, determining first rate distortion costs of the N sub-blocks in the first coding tree, and determining second rate distortion costs of the M sub-blocks in the second coding tree.
In some possible embodiments, a first rate-distortion cost is determined for the N sub-blocks in the first coding tree and a second rate-distortion cost is determined for the M sub-blocks in the second coding tree. And the first rate distortion cost and the second rate distortion cost are the sum of the coding rate of the unit to be coded and the image distortion rate. It should be understood that the image distortion ratio is an image distortion ratio between a unit obtained by encoding the divided sub-blocks and a unit to be encoded after the unit to be encoded is divided in a dividing manner. That is, for the first division manner, a rate-distortion cost (i.e., a first rate-distortion cost) of each of the N first-layer sub-blocks divided based on the first division manner may be calculated to obtain N first rate-distortion costs. For the second division manner, a rate-distortion cost (i.e., a second rate-distortion cost) of each of the M first-layer sub-blocks divided based on the second division manner may be calculated to obtain M second rate-distortion costs.
S409, determining the partitioning mode with the minimum rate-distortion cost in the first partitioning mode and the second partitioning mode based on the sum of the first rate-distortion costs of the N sub-blocks and the sum of the second rate-distortion costs of the M sub-blocks, and determining the determined partitioning mode with the minimum rate-distortion cost as the target partitioning mode.
In some possible embodiments, when determining a first rate-distortion cost (i.e., N first rate-distortion costs) corresponding to each sub-block of the N sub-blocks and M second rate-distortion costs (i.e., M second rate-distortion costs) corresponding to each sub-block of the M sub-blocks, a partitioning manner having a minimum rate-distortion cost may be determined in the first partitioning manner and the second partitioning manner based on a sum of the first rate-distortion costs of the N sub-blocks and a sum of the second rate-distortion costs of the M sub-blocks, and the determined partitioning manner having the minimum rate-distortion cost is taken as a target partitioning manner. That is to say, the sum of the N first rate-distortion costs and the sum of the M second rate-distortion costs may be compared, and then the partitioning manner with the minimum rate-distortion cost is determined from the first partitioning manner and the second partitioning manner, so as to determine the determined partitioning manner with the minimum rate-distortion cost as the target partitioning manner.
For example, assuming that the encoding order of the current encoder is QT → BT → TT → EQT, where the first partition manner is QT partition (i.e., N ═ 4), and the target partition direction determined based on the QT partition is horizontal partition, it is possible to determine that the second partition manner is horizontal binary partition (i.e., M ═ 2). Assuming that first rate-distortion costs of each first-layer subblock in 4 first-layer subblocks obtained by QT division are respectively cost 1-1, cost 1-2, cost 1-3 and cost 1-4, and second rate-distortion costs of each first-layer subblock in 2 first-layer subblocks obtained by BT division based on the horizontal direction are respectively cost 2-1 and cost 2-2. Therefore, the sum of 4 first rate-distortion costs (i.e., cost 1-1+ cost 1-2+ cost 1-3+ cost 1-4) corresponding to the 4 sub-blocks can be determined as the rate-distortion cost of the unit to be coded corresponding to the QT partition, and the sum of 2 second rate-distortion costs (i.e., cost 2-1+ cost 2-2) corresponding to the 2 sub-blocks can be determined as the rate-distortion cost of the unit to be coded corresponding to the QT partition. Furthermore, the partition mode with the minimum rate distortion cost can be determined from the first partition mode and the second partition mode, and the determined partition mode with the minimum rate distortion cost is determined as the target partition mode. That is, the target division manner is an optimal division manner determined from the first division manner and the second division manner. Further, the second partition method may be used as a new first partition method, and the implementation processes described in the above steps S401 to S409 are performed until each partition method is tried, and then a final optimal partition method for the unit to be encoded is determined. Furthermore, the finally determined optimal partition mode can be used for performing coding prediction on the unit to be coded subsequently to find a prediction block corresponding to the coding unit, and then coding is performed based on the difference of content change degrees between the prediction block and the coding unit.
Generally, there is only one partition execution order for one encoder, and if the 4 partitions execution order in a certain encoder is QT → BT → TT → EQT, QT, BT and EQT can be regarded as the first partition in turn. Therefore, the dividing direction of BT may be determined by QT, the dividing direction of TT may be determined by BT, and the dividing direction of EQT may be determined by EQT. Finally, a partition mode with the minimum RD cost can be determined from the 4 partition modes as the final optimal partition mode of the unit to be encoded.
For example, please refer to fig. 11, fig. 11 is a schematic view of an application scenario of a partition decision according to an embodiment of the present application. As shown in fig. 11, it is assumed that the execution order of the encoder used in the present application is QT → BT → TT → EQT. QT is first used as the first partition method, wherein after performing the first-layer partition on the unit to be encoded based on the QT partition, 4 first-layer sub-blocks (i.e., N is 4) are obtained, and thereafter, for each first-layer sub-block and the sub-blocks at the deeper layers, the optimal partition method of each sub-block can be determined based on the RDO method. For example, assume that the partitioning scheme presented in fig. 11 (i) is the optimal partitioning scheme for the whole unit to be encoded in the case of obtaining the first-layer sub-blocks based on QT partitioning. Therefore, the first cumulative number H is 3, and the second cumulative number V is 1. Since H3 > V1, the division direction of the second division manner may be determined as the horizontal division. That is, when the first partition manner is QT partition, the horizontal direction may be determined as the partition direction in the second partition manner (i.e., BT partition), that is, the second partition manner is horizontal binary partition (as shown in fig. 11 (a), the unit to be encoded is horizontally divided into 2 first-layer sub-blocks). Further, the horizontal division of BT is determined as the first division, and it is assumed that the division shown in fig. 11 (c) is the optimal division of the entire unit to be encoded in the case of obtaining the first layer sub-blocks based on BT division. Therefore, the BT partition may be statistically obtained, where the first accumulation amount H is 3 and the second accumulation amount V is 1. Since H3 > V1, the division direction of the second division manner may be determined as the horizontal division. That is, when the first division manner is BT division, the horizontal direction may be determined as the division direction when the second division manner (i.e., TT division), that is, the second division manner is horizontal three-fork division (as shown in fig. 11, the unit to be encoded is horizontally divided into 3 first layer sub-blocks). Further, the horizontal division of TT is determined as the first division mode, and it is assumed that the division mode shown in fig. 11 c is the optimal division mode of the entire unit to be encoded when the sub-blocks of the first layer are obtained based on the TT division. Therefore, the TT partition may be statistically obtained, where the first accumulation amount H is 2 and the second accumulation amount V is 2. Since H-2-V-2, a third accumulation amount and a fourth accumulation amount may be further counted, where the third accumulation amount is 2 and the fourth accumulation amount is 1, and thus, the dividing direction of the second division manner may be determined as the horizontal division. That is, when the first division manner is TT division, the horizontal direction may be determined as the division direction in the second division manner (i.e., EQT division), that is, the second division manner is horizontal extension quad-cross division, and as shown in a diagram (r) in fig. 11, the unit to be encoded is divided into 4 first-layer sub-blocks based on the horizontal extension quad-cross division manner.
In the embodiment of the application, the to-be-encoded unit is subjected to block division processing based on the determined first division mode to obtain N subblocks. Traversing and selecting one subblock from N subblocks as a subblock N1iDetermining the sub-block N in the first coding tree1iIs divided into sub-blocks of depth. In sub-block N1iWithin the sub-block division depth of (1), sub-block N is determined1iAnd the first quantity of each subblock in the first dividing direction and the second quantity of each subblock in the second dividing direction are obtained until each subblock in the N subblocks is traversed. And determining the dividing direction of the second dividing mode according to the first quantity of each sub-block in the first dividing direction and the second quantity of each sub-block in the second dividing direction. And further, determining the dividing direction of the second dividing mode as a target dividing direction, and after block dividing processing is performed on the unit to be coded according to the second dividing mode corresponding to the target dividing direction, obtaining M sub-blocks of the unit to be coded. First rate-distortion costs for the N sub-blocks are determined in a first coding tree and second rate-distortion costs for the M sub-blocks are determined in a second coding tree. Based on N sub-blocksDetermining the partitioning mode with the minimum rate-distortion cost in the first partitioning mode and the second partitioning mode, and determining the determined partitioning mode with the minimum rate-distortion cost as the target partitioning mode. By adopting the embodiment of the application, the time for video coding can be reduced and the coding complexity can be reduced.
Referring to fig. 12, fig. 12 is a schematic structural diagram of a video encoding apparatus according to an embodiment of the present application. The video encoding device provided by the embodiment of the application comprises:
a first block division processing module 51, configured to determine a first division manner used for performing block division processing on a unit to be encoded in a target video frame, and perform block division processing on the unit to be encoded according to the first division manner to obtain N sub-blocks of the unit to be encoded; the N subblocks all belong to a first layer subblock in a first coding tree corresponding to the first division mode; the N is the number of subblocks on a first layer subblock in the first coding tree, and is determined by the first partition mode;
a sub-block dividing depth determining module 52 for selecting one sub-block from the N sub-blocks as sub-block N1iDetermining said sub-block N in said first coding tree1iThe subblock division depth of (a); the sub-block division depth is determined by the sub-division manner associated with the sub-block N1 i; the dividing directions of the sub-dividing modes comprise a first dividing direction and a second dividing direction; i is a non-negative integer less than N;
a sub-block number statistic module 53 for counting the number of sub-blocks N1iWithin the subblock division depth of (2), determining the subblock N1iObtaining a first number of each sub-block in the first dividing direction and a second number of each sub-block in the second dividing direction until each sub-block of the N sub-blocks is traversed;
a dividing direction determining module 54, configured to determine, by using a next dividing manner of the first dividing manner as a second dividing manner, a dividing direction of the second dividing manner according to a first number of each sub-block in the first dividing direction and a second number of each sub-block in the second dividing direction; the dividing direction of the second dividing mode is used for indicating an encoder corresponding to the unit to be encoded and carrying out block dividing processing on the unit to be encoded; the second division manner is different from the first division manner.
Referring to fig. 13, fig. 13 is a schematic structural diagram of a video encoding apparatus according to an embodiment of the present disclosure.
In some possible embodiments, the apparatus further comprises:
an image block obtaining module 55, configured to obtain an encoder for performing video encoding on a target image frame in video data, and obtain at least one image block in the target video frame in a process of performing video encoding on the target image frame by using the encoder;
a block division policy determining module 56, configured to acquire a unit to be encoded from the at least one image block, and determine, based on the encoder, a block division policy for performing block division processing on the unit to be encoded; the block partitioning policy includes at least the first partitioning manner.
In some possible embodiments, the dividing direction determining module 54 includes:
a second partition method determining unit 541, configured to use a next partition method of the first partition method as a second partition method based on a block partition policy corresponding to the encoding unit; the second division manner is different from the first division manner;
a first cumulative number determining unit 542, configured to determine, according to a first number of each sub-block in the first division direction, a first cumulative number of the N sub-blocks in the first division direction;
a second cumulative number determining unit 543, configured to determine, according to a second number of each sub-block in the second dividing direction, a second cumulative number of the N sub-blocks in the second dividing direction;
a dividing direction determining unit 544, configured to determine a dividing direction of the second dividing manner according to the first cumulative quantity and the second cumulative quantity; and the dividing direction of the second dividing mode is used for indicating the encoder corresponding to the unit to be encoded and carrying out block dividing processing on the unit to be encoded.
In some possible embodiments, the dividing direction determining unit 544 includes:
a comparison processing subunit 5441, configured to perform comparison processing on the first cumulative quantity and the second cumulative quantity to obtain a comparison processing result;
a first comparison result processing subunit 5442, configured to terminate the division decision of the second division manner in the second division direction and determine the first division direction as the division direction of the second division manner if the comparison processing result indicates that the first accumulated number is greater than the second accumulated number;
a second comparison result processing subunit 5443, configured to terminate the division decision of the second division manner in the first division direction if the comparison processing result indicates that the first cumulative number is smaller than the second cumulative number, and determine the second division direction as the division direction of the second division manner.
In some possible embodiments, the first division direction is a horizontal division direction, and the second division direction is a vertical division direction;
the first comparison result processing subunit 5442 is specifically configured to:
if the comparison processing result indicates that the first accumulated quantity is larger than the second accumulated quantity, taking the block division mode corresponding to the vertical division direction as a first to-be-optimized division mode in the second division mode, and determining the block division modes except the first to-be-optimized division mode as the first to-be-optimized division mode in the second division mode;
when the second partition mode is used for carrying out block partition processing on the unit to be coded, the partition decision of the first partition mode to be optimized in the second partition mode in the vertical partition direction is terminated, and the horizontal partition direction corresponding to the first partition mode is determined as the partition direction of the second partition mode.
In some possible embodiments, the first division direction is a horizontal division direction, and the second division direction is a vertical division direction;
the second comparison result processing subunit 5443 is specifically configured to:
if the comparison processing result indicates that the first accumulated quantity is smaller than the second accumulated quantity, taking the block division mode corresponding to the vertical division direction as a second to-be-optimized division mode in the second division mode, and determining the block division modes except the second to-be-optimized division mode as the second optimized division mode in the second division mode;
when the second partition mode is used for carrying out block partition processing on the unit to be coded, the partition decision of the second partition mode to be optimized in the second partition mode in the horizontal partition direction is terminated, and the vertical partition direction corresponding to the second optimized partition mode is determined as the partition direction of the second partition mode.
In some possible embodiments, the first partition manner is a quadtree partition manner; the second division mode is one of a binary tree division mode, a ternary tree division mode and an extended quaternary tree division mode;
the device further comprises:
a second block division processing module 57, configured to determine a division direction of the second division manner as a target division direction, and perform block division processing on the unit to be encoded according to the second division manner corresponding to the target division direction, so as to obtain M sub-blocks of the unit to be encoded; the M subblocks all belong to a first layer subblock in a second coding tree corresponding to the second division mode; the M is the number of subblocks on a first layer subblock in the second coding tree, and the M is determined by the second division mode;
a rate distortion cost determination module 58, configured to determine a first rate distortion cost for the N sub-blocks in the first coding tree, and determine a second rate distortion cost for the M sub-blocks in the second coding tree; the first rate distortion cost and the second rate distortion cost are the sum of the coding rate of the unit to be coded and the image distortion rate; the image distortion rate is the image distortion rate between a unit obtained by encoding the divided sub-blocks and the unit to be encoded after the unit to be encoded is divided by adopting a dividing mode;
a minimum rate-distortion cost determining module 59, configured to determine, based on a sum of first rate-distortion costs of the N sub-blocks and a sum of second rate-distortion costs of the M sub-blocks, a partition manner having a minimum rate-distortion cost in the first partition manner and the second partition manner;
a target partition mode determining module 510, configured to determine the determined partition mode with the minimum rate-distortion cost as a target partition mode; and performing coding prediction on the unit to be coded based on the target division mode.
In an embodiment of the present application, a video encoding apparatus may acquire at least one image block in a target video frame during video encoding of the target image frame by using an encoder, by acquiring the encoder used for video encoding of the target image frame in video data. And acquiring a unit to be coded from at least one image block, and determining a block division strategy for carrying out block division processing on the unit to be coded based on an encoder. And determining a first partition mode for carrying out block partition processing on the unit to be coded in the target video frame from the block partition strategy, and carrying out block partition processing on the unit to be coded according to the first partition mode to obtain N sub-blocks of the unit to be coded. And the N subblocks all belong to a first layer subblock in a first coding tree corresponding to the first division mode. N is the number of sub-blocks on the first layer of sub-blocks in the first coding tree, and N is determined by the first partition. Traversing and selecting one subblock from N subblocks as a subblock N1iDetermining the sub-block N in the first coding tree1iSub-block of (A)And dividing the depth. The sub-block division depth is determined by the sub-block N1iDetermined by the associated subdivision scheme. The dividing direction of the sub-dividing mode comprises a first dividing direction and a second dividing direction. i is a non-negative integer less than N. In sub-block N1iWithin the sub-block division depth of (1), sub-block N is determined1iThe first number of each subblock in the first dividing direction and the second number of each subblock in the second dividing direction are obtained until each subblock in the N subblocks is traversed. And taking the next division mode of the first division mode as a second division mode, and determining the division direction of the second division mode according to the first number of each sub-block in the first division direction and the second number of each sub-block in the second division direction. And the division direction of the second division mode is used for indicating the encoder corresponding to the unit to be encoded and carrying out block division processing on the unit to be encoded. The second division manner is different from the first division manner. And further, determining the dividing direction of the second dividing mode as a target dividing direction, and after block dividing processing is performed on the unit to be coded according to the second dividing mode corresponding to the target dividing direction, obtaining M sub-blocks of the unit to be coded. First rate-distortion costs for the N sub-blocks are determined in a first coding tree and second rate-distortion costs for the M sub-blocks are determined in a second coding tree. And determining the division mode with the minimum rate-distortion cost in the first division mode and the second division mode based on the sum of the first rate-distortion costs of the N sub-blocks and the sum of the second rate-distortion costs of the M sub-blocks, and determining the determined division mode with the minimum rate-distortion cost as a target division mode. By adopting the embodiment of the application, the time for video coding can be reduced and the coding complexity can be reduced. By adopting the embodiment of the application, the time for video coding can be reduced and the coding complexity can be reduced.
Referring to fig. 14, fig. 14 is a schematic structural diagram of a terminal device provided in an embodiment of the present application. As shown in fig. 14, the terminal device in this embodiment may include: one or more processors 401, memory 402, and a transceiver 403. The processor 401, memory 402, and transceiver 403 are connected by a bus 404. The memory 402 is used to store a computer program comprising program instructions, and the processor 401 is used to execute the program instructions stored in the memory 402 to perform the following operations:
determining a first partition mode for carrying out block partition processing on a unit to be coded in a target video frame, and carrying out block partition processing on the unit to be coded according to the first partition mode to obtain N subblocks of the unit to be coded; the N subblocks all belong to a first layer subblock in a first coding tree corresponding to the first division mode; the N is the number of subblocks on a first layer subblock in the first coding tree, and is determined by the first partition mode;
traversing and selecting one sub-block from the N sub-blocks as a sub-block N1iDetermining said sub-block N in said first coding tree1iThe subblock division depth of (a); the subblock division depth is equal to the subblock N1iDetermined by the associated subdivision mode; the dividing directions of the subdivision modes comprise a first dividing direction and a second dividing direction; i is a non-negative integer less than N;
in the sub-block N1iWithin the subblock division depth of (2), determining the subblock N1iObtaining a first number of each sub-block in the first dividing direction and a second number of each sub-block in the second dividing direction until each sub-block of the N sub-blocks is traversed;
taking a next division mode of the first division mode as a second division mode, and determining the division direction of the second division mode according to the first number of each sub-block in the first division direction and the second number of each sub-block in the second division direction; the dividing direction of the second dividing mode is used for indicating an encoder corresponding to the unit to be encoded and carrying out block dividing processing on the unit to be encoded; the second division manner is different from the first division manner.
In some possible embodiments, the processor 401 is configured to:
the method comprises the steps of obtaining an encoder used for carrying out video coding on a target image frame in video data, and obtaining at least one image block in the target video frame in the process of adopting the encoder to carry out video coding on the target image frame;
acquiring a unit to be encoded from the at least one image block, and determining a block division strategy for performing block division processing on the unit to be encoded based on the encoder; the block partitioning policy includes at least the first partitioning manner.
In some possible embodiments, the processor 401 is configured to:
taking a next partitioning mode of the first partitioning mode as a second partitioning mode based on a block partitioning strategy corresponding to the coding unit; the second division manner is different from the first division manner;
determining a first accumulated number of the N sub-blocks in the first dividing direction according to the first number of each sub-block in the first dividing direction;
determining a second accumulated number of the N sub-blocks in the second dividing direction according to a second number of each sub-block in the second dividing direction;
determining the dividing direction of the second dividing mode according to the first accumulated quantity and the second accumulated quantity; and the dividing direction of the second dividing mode is used for indicating the encoder corresponding to the unit to be encoded and carrying out block dividing processing on the unit to be encoded.
In some possible embodiments, the processor 401 is configured to:
comparing the first accumulated quantity with the second accumulated quantity to obtain a comparison result;
if the comparison processing result indicates that the first accumulated quantity is greater than the second accumulated quantity, terminating the division decision of the second division mode in the second division direction, and determining the first division direction as the division direction of the second division mode;
if the comparison processing result indicates that the first accumulated quantity is smaller than the second accumulated quantity, the division decision of the second division mode in the first division direction is terminated, and the second division direction is determined as the division direction of the second division mode.
In some possible embodiments, the first division direction is a horizontal division direction, and the second division direction is a vertical division direction;
the processor 401 is configured to:
if the comparison processing result indicates that the first accumulated quantity is larger than the second accumulated quantity, taking the block division mode corresponding to the vertical division direction as a first to-be-optimized division mode in the second division mode, and determining the block division modes except the first to-be-optimized division mode as the first to-be-optimized division mode in the second division mode;
when the second partition mode is used for carrying out block partition processing on the unit to be coded, the partition decision of the first partition mode to be optimized in the second partition mode in the vertical partition direction is terminated, and the horizontal partition direction corresponding to the first partition mode is determined as the partition direction of the second partition mode.
In some possible embodiments, the first division direction is a horizontal division direction, and the second division direction is a vertical division direction;
the processor 401 is configured to:
if the comparison processing result indicates that the first accumulated quantity is smaller than the second accumulated quantity, the block division mode corresponding to the vertical division direction is taken as a second to-be-optimized division mode in the second division mode, and the block division modes except the second to-be-optimized division mode in the second division mode are determined as second optimized division modes;
when the second partition mode is used for carrying out block partition processing on the unit to be coded, the partition decision of the second partition mode to be optimized in the second partition mode in the horizontal partition direction is terminated, and the vertical partition direction corresponding to the second optimized partition mode is determined as the partition direction of the second partition mode.
In some possible embodiments, the first partition manner is a quadtree partition manner; the second division mode is one of a binary tree division mode, a ternary tree division mode and an extended quaternary tree division mode;
the processor 401 is configured to:
determining the dividing direction of the second dividing mode as a target dividing direction, and after block dividing processing is performed on the unit to be encoded according to the second dividing mode corresponding to the target dividing direction, obtaining M subblocks of the unit to be encoded; the M subblocks all belong to a first layer subblock in a second coding tree corresponding to the second division mode; the M is the number of subblocks on a first layer subblock in the second coding tree, and the M is determined by the second division mode;
determining first rate-distortion costs of the N sub-blocks in the first coding tree and second rate-distortion costs of the M sub-blocks in the second coding tree; the first rate distortion cost and the second rate distortion cost are the sum of the coding rate of the unit to be coded and the image distortion rate; the image distortion rate is the image distortion rate between a unit obtained by encoding the divided sub-blocks and the unit to be encoded after the unit to be encoded is divided by adopting a dividing mode;
determining a partition mode with the minimum rate-distortion cost in the first partition mode and the second partition mode based on the sum of first rate-distortion costs of the N sub-blocks and the sum of second rate-distortion costs of the M sub-blocks;
determining the determined division mode with the minimum rate distortion cost as a target division mode; and performing coding prediction on the unit to be coded based on the target division mode.
It should be understood that in some possible embodiments, the processor 601 may be a Central Processing Unit (CPU), and the processor may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The memory 602 may include both read-only memory and random access memory and provides instructions and data to the processor 601. A portion of the memory 602 may also include non-volatile random access memory. For example, the memory 602 may also store device type information.
In a specific implementation, the terminal device may execute the implementation manners provided in the steps in fig. 4 and fig. 10 through the built-in functional modules, which may specifically refer to the implementation manners provided in the steps, and are not described herein again.
In the embodiment of the application, the terminal device may acquire at least one image block in the target video frame during the video coding of the target image frame by using the encoder by acquiring the encoder for video coding of the target image frame in the video data. And acquiring a unit to be coded from at least one image block, and determining a block division strategy for carrying out block division processing on the unit to be coded based on an encoder. And determining a first partition mode for carrying out block partition processing on the unit to be coded in the target video frame from the block partition strategy, and carrying out block partition processing on the unit to be coded according to the first partition mode to obtain N sub-blocks of the unit to be coded. And the N subblocks all belong to a first layer subblock in a first coding tree corresponding to the first division mode. N is the number of sub-blocks on the first layer of sub-blocks in the first coding tree, and N is determined by the first partition. Traversing and selecting one subblock from N subblocks as a subblock N1iDetermining the sub-block N in the first coding tree1iIs divided into sub-blocks of depth. The subblock division depth is formed by a subblock N1iDetermined by the associated subdivision scheme. The dividing direction of the subdivision mode comprises a first dividing direction anda second division direction. i is a non-negative integer less than N. In sub-block N1iWithin the sub-block division depth of (1), sub-block N is determined1iThe first number of each subblock in the first dividing direction and the second number of each subblock in the second dividing direction are obtained until each subblock in the N subblocks is traversed. And taking the next division mode of the first division mode as a second division mode, and determining the division direction of the second division mode according to the first number of each sub-block in the first division direction and the second number of each sub-block in the second division direction. And the division direction of the second division mode is used for indicating the encoder corresponding to the unit to be encoded and carrying out block division processing on the unit to be encoded. The second division manner is different from the first division manner. And further, determining the dividing direction of the second dividing mode as a target dividing direction, and after block dividing processing is performed on the unit to be coded according to the second dividing mode corresponding to the target dividing direction, obtaining M sub-blocks of the unit to be coded. First rate-distortion costs for the N sub-blocks are determined in a first coding tree and second rate-distortion costs for the M sub-blocks are determined in a second coding tree. And determining the division mode with the minimum rate-distortion cost in the first division mode and the second division mode based on the sum of the first rate-distortion costs of the N sub-blocks and the sum of the second rate-distortion costs of the M sub-blocks, and determining the determined division mode with the minimum rate-distortion cost as a target division mode. By adopting the embodiment of the application, the time for video coding can be reduced and the coding complexity can be reduced. By adopting the embodiment of the application, the time for video coding can be reduced and the coding complexity can be reduced.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by a processor, the video encoding method provided in each step in fig. 4 and 10 is implemented.
The computer-readable storage medium may be the video encoding apparatus provided in any of the foregoing embodiments or an internal storage unit of the terminal device, such as a hard disk or a memory of an electronic device. The computer readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) card, a flash card (flash card), and the like, which are provided on the electronic device. Further, the computer readable storage medium may also include both an internal storage unit and an external storage device of the electronic device. The computer-readable storage medium is used for storing the computer program and other programs and data required by the electronic device. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
The terms "first", "second", "third", "fourth", and the like in the claims and in the description and drawings of the present application are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments. The term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items. Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical 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 present application.
The method and the related apparatus provided by the embodiments of the present application are described with reference to the flowchart and/or the structural diagram of the method provided by the embodiments of the present application, and each flow and/or block of the flowchart and/or the structural diagram of the method, and the combination of the flow and/or block in the flowchart and/or the block diagram can be specifically implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block or blocks of the block diagram. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block or blocks of the block diagram. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block or blocks.

Claims (10)

1. A method of video encoding, the method comprising:
determining a first partition mode for carrying out block partition processing on a unit to be coded in a target video frame, and carrying out block partition processing on the unit to be coded according to the first partition mode to obtain N subblocks of the unit to be coded; the N subblocks all belong to a first layer subblock in a first coding tree corresponding to the first division mode; the N is the number of subblocks on a first layer subblock in the first coding tree, and is determined by the first partition mode;
traversing and selecting one sub-block from the N sub-blocks as a sub-block N1iDetermining said sub-block N in said first coding tree1iThe subblock division depth of (a); the subblock division depth is equal to the subblock N1iDetermined by the associated subdivision mode; the dividing directions of the sub-dividing modes comprise a first dividing direction and a second dividing direction; i is a non-negative integer less than N;
in the sub-block N1iWithin the subblock division depth of (2), determining the subblock N1iObtaining a first number of each sub-block in the first dividing direction and a second number of each sub-block in the second dividing direction until each sub-block of the N sub-blocks is traversed;
taking a next division mode of the first division mode as a second division mode, and determining the division direction of the second division mode according to the first number of each sub-block in the first division direction and the second number of each sub-block in the second division direction; the dividing direction of the second dividing mode is used for indicating an encoder corresponding to the unit to be encoded and carrying out block dividing processing on the unit to be encoded; the second division manner is different from the first division manner.
2. The method according to claim 1, wherein before determining the first partition mode for block partition processing of the unit to be encoded in the target video frame, the method further comprises:
the method comprises the steps of obtaining an encoder used for carrying out video coding on a target image frame in video data, and obtaining at least one image block in the target video frame in the process of adopting the encoder to carry out video coding on the target image frame;
acquiring a unit to be encoded from the at least one image block, and determining a block division strategy for performing block division processing on the unit to be encoded based on the encoder; the block partitioning policy includes at least the first partitioning manner.
3. The method according to claim 1, wherein the determining the partition direction of the second partition manner according to the first number of each sub-block in the first partition direction and the second number of each sub-block in the second partition direction by using the next partition manner of the first partition manner as the second partition manner comprises:
taking a next partitioning mode of the first partitioning mode as a second partitioning mode based on a block partitioning strategy corresponding to the coding unit; the second division manner is different from the first division manner;
determining a first accumulated number of the N sub-blocks in the first dividing direction according to the first number of each sub-block in the first dividing direction;
determining a second accumulated number of the N sub-blocks in the second dividing direction according to a second number of each sub-block in the second dividing direction;
determining the dividing direction of the second dividing mode according to the first accumulated quantity and the second accumulated quantity; and the dividing direction of the second dividing mode is used for indicating the encoder corresponding to the unit to be encoded and carrying out block dividing processing on the unit to be encoded.
4. The method according to claim 3, wherein the determining the dividing direction of the second dividing manner according to the first cumulative quantity and the second cumulative quantity comprises:
comparing the first accumulated quantity with the second accumulated quantity to obtain a comparison processing result;
if the comparison processing result indicates that the first accumulated quantity is greater than the second accumulated quantity, terminating the division decision of the second division mode in the second division direction, and determining the first division direction as the division direction of the second division mode;
if the comparison processing result indicates that the first accumulated quantity is smaller than the second accumulated quantity, the division decision of the second division mode in the first division direction is terminated, and the second division direction is determined as the division direction of the second division mode.
5. The method according to claim 4, wherein the first division direction is a horizontal division direction and the second division direction is a vertical division direction;
if the comparison processing result indicates that the first cumulative number is greater than the second cumulative number, terminating the partition decision of the second partition mode in the second partition direction, and determining the first partition direction as the partition direction of the second partition mode includes:
if the comparison processing result indicates that the first accumulated quantity is larger than the second accumulated quantity, taking the block division mode corresponding to the vertical division direction as a first to-be-optimized division mode in the second division mode, and determining the block division modes except the first to-be-optimized division mode as the first to-be-optimized division mode in the second division mode;
when the second partition mode is used for carrying out block partition processing on the unit to be coded, the partition decision of the first partition mode to be optimized in the second partition mode in the vertical partition direction is terminated, and the horizontal partition direction corresponding to the first partition mode is determined as the partition direction of the second partition mode.
6. The method according to claim 4, wherein the first division direction is a horizontal division direction and the second division direction is a vertical division direction;
if the comparison processing result indicates that the first cumulative number is smaller than the second cumulative number, terminating the partition decision of the second partition mode in the first partition direction, and determining the second partition direction as the partition direction of the second partition mode includes:
if the comparison processing result indicates that the first accumulated quantity is smaller than the second accumulated quantity, taking the block division mode corresponding to the vertical division direction as a second to-be-optimized division mode in the second division mode, and determining the block division modes except the second to-be-optimized division mode as the second optimized division mode in the second division mode;
when the second partition mode is used for carrying out block partition processing on the unit to be coded, the partition decision of the second partition mode to be optimized in the second partition mode in the horizontal partition direction is terminated, and the vertical partition direction corresponding to the second optimized partition mode is determined as the partition direction of the second partition mode.
7. The method according to any one of claims 1 to 6, wherein the first partition is a quadtree partition; the second division mode is one of a binary tree division mode, a ternary tree division mode and an extended quaternary tree division mode;
the method further comprises the following steps:
determining the dividing direction of the second dividing mode as a target dividing direction, and after block dividing processing is performed on the unit to be encoded according to the second dividing mode corresponding to the target dividing direction, obtaining M subblocks of the unit to be encoded; the M subblocks all belong to a first layer subblock in a second coding tree corresponding to the second division mode; the M is the number of subblocks on a first layer subblock in the second coding tree, and the M is determined by the second division mode;
determining first rate-distortion costs of the N sub-blocks in the first coding tree and second rate-distortion costs of the M sub-blocks in the second coding tree; the first rate distortion cost and the second rate distortion cost are the sum of the coding rate of the unit to be coded and the image distortion rate; the image distortion rate is the image distortion rate between a unit obtained by encoding the divided subblocks and the unit to be encoded after the unit to be encoded is divided by adopting a dividing mode;
determining a partition mode with the minimum rate-distortion cost in the first partition mode and the second partition mode based on the sum of first rate-distortion costs of the N sub-blocks and the sum of second rate-distortion costs of the M sub-blocks;
determining the determined division mode with the minimum rate distortion cost as a target division mode; and performing coding prediction on the unit to be coded based on the target division mode.
8. A video encoding apparatus, characterized in that the apparatus comprises:
the first block division processing module is used for determining a first division mode for carrying out block division processing on a unit to be coded in a target video frame, and carrying out block division processing on the unit to be coded according to the first division mode to obtain N subblocks of the unit to be coded; the N subblocks all belong to a first layer subblock in a first coding tree corresponding to the first division mode; the N is the number of subblocks on a first layer subblock in the first coding tree, and is determined by the first partition mode;
a sub-block dividing depth determining module for selecting one sub-block from the N sub-blocks in a traversal manner as a sub-block N1iDetermining said sub-block N in said first coding tree1iThe subblock division depth of (a); the sub-block division depth is determined bySubblock N1iDetermined by the associated subdivision mode; the dividing directions of the sub-dividing modes comprise a first dividing direction and a second dividing direction; i is a non-negative integer less than N;
a sub-block number counting module for counting the number of sub-blocks in the sub-block N1iWithin the subblock division depth of (2), determining the subblock N1iObtaining a first number of each sub-block in the first dividing direction and a second number of each sub-block in the second dividing direction until each sub-block of the N sub-blocks is traversed;
a dividing direction determining module, configured to determine a dividing direction of a second dividing manner according to a first number of each sub-block in the first dividing direction and a second number of each sub-block in the second dividing direction, where a next dividing manner of the first dividing manner is used as the second dividing manner; the dividing direction of the second dividing mode is used for indicating an encoder corresponding to the unit to be encoded and carrying out block dividing processing on the unit to be encoded; the second division manner is different from the first division manner.
9. A terminal device, comprising a processor and a memory, the processor and the memory being interconnected;
the memory for storing a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a processor, cause the processor to carry out the method according to any one of claims 1-7.
CN202011302700.8A 2020-11-19 2020-11-19 Video encoding method, video encoding device, terminal equipment and storage medium Active CN114520916B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011302700.8A CN114520916B (en) 2020-11-19 2020-11-19 Video encoding method, video encoding device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011302700.8A CN114520916B (en) 2020-11-19 2020-11-19 Video encoding method, video encoding device, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114520916A true CN114520916A (en) 2022-05-20
CN114520916B CN114520916B (en) 2024-02-23

Family

ID=81594101

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011302700.8A Active CN114520916B (en) 2020-11-19 2020-11-19 Video encoding method, video encoding device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114520916B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114938453A (en) * 2022-07-19 2022-08-23 深流微智能科技(深圳)有限公司 Video coding method, chip, storage medium and computer equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111294599A (en) * 2019-03-13 2020-06-16 北京达佳互联信息技术有限公司 Video decoding method, video encoding method and device
CN111698504A (en) * 2019-03-11 2020-09-22 杭州海康威视数字技术股份有限公司 Encoding method, decoding method and device
CN111901602A (en) * 2020-08-07 2020-11-06 北京奇艺世纪科技有限公司 Video data encoding method, video data encoding device, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111698504A (en) * 2019-03-11 2020-09-22 杭州海康威视数字技术股份有限公司 Encoding method, decoding method and device
CN111294599A (en) * 2019-03-13 2020-06-16 北京达佳互联信息技术有限公司 Video decoding method, video encoding method and device
CN111901602A (en) * 2020-08-07 2020-11-06 北京奇艺世纪科技有限公司 Video data encoding method, video data encoding device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114938453A (en) * 2022-07-19 2022-08-23 深流微智能科技(深圳)有限公司 Video coding method, chip, storage medium and computer equipment
CN114938453B (en) * 2022-07-19 2022-09-30 深流微智能科技(深圳)有限公司 Video coding method, chip, storage medium and computer equipment

Also Published As

Publication number Publication date
CN114520916B (en) 2024-02-23

Similar Documents

Publication Publication Date Title
US20190110045A1 (en) Position-dependent prediction combinations in video coding
RU2577207C2 (en) Video encoding method and device
WO2020176459A1 (en) Method and device for picture encoding and decoding
CN111373749B (en) Method and apparatus for low complexity bi-directional intra prediction in video encoding and decoding
CN109587479A (en) Inter-frame prediction method, device and the codec of video image
JP7250927B2 (en) INTRA-FRAME PREDICTION ENCODING METHOD, APPARATUS, ELECTRONIC DEVICE AND COMPUTER PROGRAM
US10742989B2 (en) Variable frame rate encoding method and device based on a still area or a motion area
US20210203980A1 (en) Coding Method, Device, System with Merge Mode
JP2015526020A (en) Limited intra-deblocking filtering for video coding
CN111988607B (en) Encoding unit processing method and device, electronic equipment and storage medium
EP3706421A1 (en) Method and apparatus for video encoding and decoding based on affine motion compensation
CN114520916A (en) Video encoding method, video encoding device, terminal device and storage medium
CN110324668B (en) Transform method in image block coding, inverse transform method and device in decoding
CN111654696B (en) Intra-frame multi-reference-line prediction method and device, storage medium and terminal
CN112511843B (en) Video encoding method, video encoding device, terminal device and storage medium
CN116405665A (en) Encoding method, apparatus, device and storage medium
CN114520917B (en) Video encoding method, video encoding device, terminal equipment and storage medium
CN115118990A (en) Chroma prediction method, device, encoding device, decoding device and storage medium
CN113068050B (en) Method and device for determining sample point adaptive compensation mode of tree-shaped coding block
CN112437307B (en) Video coding method, video coding device, electronic equipment and video coding medium
KR20220035108A (en) Method and apparatus for video encoding and decoding using matrix-based intra prediction
US20170188035A1 (en) Transcoding method and electronic apparatus
CN110784719B (en) Efficient encoding of video data in the presence of video annotations
CN108769695B (en) Frame type conversion method, system and terminal
CN116527890A (en) Intra-frame prediction mode determination method, device, equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant