CN117440157B - Video coding method, device, equipment and storage medium - Google Patents

Video coding method, device, equipment and storage medium Download PDF

Info

Publication number
CN117440157B
CN117440157B CN202311255245.4A CN202311255245A CN117440157B CN 117440157 B CN117440157 B CN 117440157B CN 202311255245 A CN202311255245 A CN 202311255245A CN 117440157 B CN117440157 B CN 117440157B
Authority
CN
China
Prior art keywords
coding unit
prediction
prediction unit
unit
coding
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.)
Active
Application number
CN202311255245.4A
Other languages
Chinese (zh)
Other versions
CN117440157A (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.)
Shuhang Technology Beijing Co ltd
Original Assignee
Shuhang Technology Beijing 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 Shuhang Technology Beijing Co ltd filed Critical Shuhang Technology Beijing Co ltd
Priority to CN202311255245.4A priority Critical patent/CN117440157B/en
Publication of CN117440157A publication Critical patent/CN117440157A/en
Application granted granted Critical
Publication of CN117440157B publication Critical patent/CN117440157B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • 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/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/96Tree coding, e.g. quad-tree coding

Landscapes

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

Abstract

The embodiment of the application discloses a video coding method, a video coding device, video coding equipment and a storage medium. The method comprises the following steps: acquiring a target video, traversing each frame of image in the target video, dividing the target image by a coding unit, and determining a coding unit division strategy; the strategy includes at least one coding unit size; if the at least one coding unit size is larger than the first preset coding unit size, acquiring a candidate coding unit size, and adding the candidate coding unit size into a coding unit division strategy; performing coding unit division on the target image based on the sizes of all the coding units in the coding unit division strategy to obtain at least one coding unit; determining a prediction mode of each prediction unit based on at least one coding unit and the prediction units of each coding unit; and compressing the target video based on the prediction mode to obtain the encoded target video. The embodiment of the application can improve the coding speed of the coder.

Description

Video coding method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a video encoding method, apparatus, device, and storage medium.
Background
Video coding is a process of converting a video signal into digital data and performing data compression while maintaining as high visual quality as possible. The goal of video coding is to reduce the storage space and transmission bandwidth requirements of video data in order to efficiently store, transmit and process video content under limited resource conditions. In video coding, a video signal is decomposed into a series of image frames or inter-frame differences (prediction residuals) and then processed and compressed by various techniques and algorithms.
In the video coding process, on the premise of ensuring the compression efficiency, the video is expected to finish coding at the fastest speed, so that play clamping is reduced, and the play is smoother. Therefore, how to effectively improve the encoding speed is a technical problem to be solved.
Disclosure of Invention
The embodiment of the invention provides a video coding method, a video coding device, video coding equipment and a storage medium, which can improve the coding speed of an encoder.
In one aspect, an embodiment of the present invention provides a video encoding method, including:
Acquiring a target video, traversing each frame of image in the target video, dividing a coding unit of the currently traversed target image, and determining a coding unit division strategy of the target image; the coding unit partitioning strategy includes at least one coding unit size;
If the at least one coding unit size is larger than the first preset coding unit size, acquiring a candidate coding unit size, and adding the candidate coding unit size into the coding unit division strategy; the candidate coding unit size is greater than or equal to a second preset coding unit size, which is greater than the first preset coding unit size;
Performing coding unit division on the target image based on the sizes of all the coding units in the coding unit division strategy to obtain at least one coding unit;
Determining a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit;
And compressing the target video based on the prediction modes of the prediction units of each frame of image to obtain the encoded target video.
In one embodiment, the coding unit dividing the target image based on each coding unit size in the coding unit dividing policy to obtain at least one coding unit includes:
traversing the coding unit size in the coding unit division strategy, and dividing the coding unit of the target image based on the currently traversed coding unit size to obtain at least one coding unit;
the determining a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit includes:
aiming at any coding unit, traversing the prediction unit division mode in the prediction unit division strategy, and carrying out prediction unit division on the any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of the any coding unit;
If the rate distortion cost of the target prediction unit with the prediction unit size larger than or equal to the first preset prediction unit size in at least one prediction unit of any coding unit is successfully obtained, and the prediction mode of the target prediction unit is the first inter-frame prediction mode, determining the coding mode of the target image includes: and obtaining a coding unit division mode performed by the at least one coding unit and obtaining a prediction unit division mode performed by the target prediction unit.
In one embodiment, the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the first preset prediction unit size is not obtained or the mode of the target prediction unit is not the first inter prediction mode, traversing the next prediction unit division mode in the prediction unit division strategy, triggering and executing the prediction unit division mode based on the current traversal to divide the prediction unit of any coding unit, and obtaining at least one prediction unit of any coding unit.
In one embodiment, the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the first preset prediction unit size is not obtained or the mode of the target prediction unit is not the first inter-frame prediction mode, and the prediction unit division mode in the prediction unit division strategy is traversed, traversing the next coding unit size in the coding unit division strategy, triggering and executing the coding unit division on the target image based on the current traversed coding unit size, and obtaining at least one coding unit.
In one embodiment, the coding unit dividing the target image based on each coding unit size in the coding unit dividing policy to obtain at least one coding unit includes:
traversing the coding unit size in the coding unit division strategy, and dividing the coding unit of the target image based on the currently traversed coding unit size to obtain at least one coding unit;
the determining a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit includes:
aiming at any coding unit, traversing the prediction unit division mode in the prediction unit division strategy, and carrying out prediction unit division on the any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of the any coding unit;
If the rate distortion cost of the target prediction unit, the prediction unit size of which is greater than or equal to the first preset prediction unit size, in at least one prediction unit of any coding unit is successfully obtained, and the prediction mode of the target prediction unit is the second inter-frame prediction mode, and the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is equal to the first preset number, determining the coding mode of the target image includes: and obtaining a coding unit division mode performed by the at least one coding unit and obtaining a prediction unit division mode performed by the target prediction unit.
In one embodiment, the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size larger than or equal to the first preset prediction unit size is not obtained or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is not equal to the first preset number, traversing the next prediction unit division mode in the prediction unit division strategy, triggering and executing the prediction unit division of any coding unit based on the currently traversed prediction unit division mode, and obtaining at least one prediction unit of any coding unit.
In one embodiment, the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the first preset prediction unit size is not obtained, or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is not equal to the first preset number, and the prediction unit dividing mode in the prediction unit dividing strategy is traversed, traversing the next coding unit size in the coding unit dividing strategy, and triggering and executing the coding unit division on the target image based on the currently traversed coding unit size to obtain at least one coding unit.
In one embodiment, the coding unit dividing the target image based on each coding unit size in the coding unit dividing policy to obtain at least one coding unit includes:
traversing the coding unit size in the coding unit division strategy, and dividing the coding unit of the target image based on the currently traversed coding unit size to obtain at least one coding unit;
the determining a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit includes:
aiming at any coding unit, traversing the prediction unit division mode in the prediction unit division strategy, and carrying out prediction unit division on the any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of the any coding unit;
If the rate distortion cost of the target prediction unit, of which the prediction unit size is greater than or equal to the second preset prediction unit size, in at least one prediction unit of any coding unit is successfully obtained, and the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is smaller than the second preset number, determining the coding mode of the target image includes: and obtaining a coding unit division mode performed by the at least one coding unit and obtaining a prediction unit division mode performed by the target prediction unit.
In one embodiment, the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the second preset prediction unit size or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is greater than or equal to the second preset number, traversing the next prediction unit division mode in the prediction unit division strategy, triggering and executing the prediction unit division mode based on the current traversal to divide the prediction unit of any coding unit, and obtaining at least one prediction unit of any coding unit.
In one embodiment, the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the second preset prediction unit size or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is greater than or equal to the second preset number, and the prediction unit division mode in the prediction unit division strategy is traversed, traversing the next coding unit size in the coding unit division strategy, and triggering and executing the coding unit division on the target image based on the currently traversed coding unit size to obtain at least one coding unit.
In one embodiment, said traversing the coding unit sizes in the coding unit partitioning strategy comprises:
And traversing the sizes of the coding units in the coding unit division strategy according to the sequence of the sizes of the coding units from large to small.
In one embodiment, traversing the prediction unit partition manner in the prediction unit partition policy includes:
Traversing the prediction unit division modes in the prediction unit division strategy according to the sequence from small to large of the number of the prediction units obtained in the prediction unit division modes.
In another aspect, an embodiment of the present application provides a video encoding apparatus, including:
The dividing strategy determining unit is used for acquiring a target video, traversing each frame of image in the target video, dividing the currently traversed target image by a coding unit and determining the coding unit dividing strategy of the target image; the coding unit partitioning strategy includes at least one coding unit size;
The partition strategy determining unit is further configured to obtain a candidate coding unit size if a coding unit size greater than a first preset coding unit size exists in the at least one coding unit size, and add the candidate coding unit size to the coding unit partition strategy; the candidate coding unit size is greater than or equal to a second preset coding unit size, which is greater than the first preset coding unit size;
The dividing unit is used for dividing the coding unit of the target image based on the sizes of the coding units in the coding unit dividing strategy to obtain at least one coding unit;
The dividing unit is further configured to determine a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit;
And the video coding unit is used for compressing the target video based on the prediction modes of the prediction units of the frame images to obtain the coded target video.
In another aspect, an embodiment of the present application provides a computer device, including a processor, a storage device, and a communication interface, where the processor, the storage device, and the communication interface are connected to each other, where the storage device is configured to store a computer program that supports the computer device to execute the method, the computer program includes program instructions, and the processor is configured to invoke the program instructions to perform the following steps:
Acquiring a target video, traversing each frame of image in the target video, dividing a coding unit of the currently traversed target image, and determining a coding unit division strategy of the target image; the coding unit partitioning strategy includes at least one coding unit size;
If the coding units with the coding unit sizes larger than the first preset coding unit size exist in the plurality of coding units, obtaining candidate coding unit sizes, and adding the candidate coding unit sizes into the coding unit division strategy; the candidate coding unit size is greater than or equal to a second preset coding unit size, which is greater than the first preset coding unit size;
Performing coding unit division on the target image based on the sizes of all the coding units in the coding unit division strategy to obtain at least one coding unit;
Determining a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit;
And compressing the target video based on the prediction modes of the prediction units of each frame of image to obtain the encoded target video.
In another aspect, embodiments of the present application provide a computer readable storage medium storing a computer program comprising program instructions that, when executed by a processor, cause the processor to perform the video encoding method described above.
In the embodiment of the invention, the target image can be subjected to coarse granularity division through the first stage, the candidate division scheme can be rapidly screened, namely, the target image is subjected to coding unit division, and the coding unit division strategy of the target image is determined. In the second stage, if there is a coding unit size larger than the first preset coding unit size in the coding unit division policy, the candidate coding unit size may be added to the coding unit division policy, and since the candidate coding unit size is larger than or equal to the second preset coding unit size, and the second preset coding unit size is larger than the first preset coding unit size, the coding unit division may be performed on the target image based on the candidate coding unit size to obtain at least one coding unit, and if the at least one coding unit is the optimal block division, the continuous division of the at least one coding unit may be unnecessary.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a video coding system according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a video encoding method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an optimal partitioning of a super-block of size 64×64 according to an embodiment of the present application;
FIG. 4 is a diagram of an optimally partitioned quadtree form of a superblock of size 64×64 provided by an embodiment of the present application;
FIG. 5 is a graph of a superblock full quadtree partition of size 64×64 provided by an embodiment of the present application;
FIG. 6 is a flow chart of a process for reconstructing a pixel according to an embodiment of the present application;
FIG. 7 is a diagram illustrating a partition manner of a prediction unit according to an embodiment of the present application;
fig. 8 is a flowchart of another video encoding method according to an embodiment of the present application;
fig. 9 is a flowchart of another video encoding method according to an embodiment of the present application;
fig. 10 is a flowchart of another video encoding method according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a video encoding apparatus according to an embodiment of the present application;
Fig. 12 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following describes the background art related to the embodiments of the present application so as to better understand the technical solutions of the embodiments of the present application.
The block partitioning process (Block Partitioning) in the (AOMedia Video, AV1) encoder is a critical process that partitions video frames into blocks of different sizes and structures. Wherein the AV1 encoder is an open source, royalty-free codec.
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The image coding method provided by the embodiment of the application can be applied to a client, a server or computer equipment. The client or server may include a video player, an image encoding plug-in, etc., and may be installed or integrated in a content distribution platform or browser that may be running in a computer device. Computer devices include, but are not limited to, smartphones, cameras, wearable devices, or computers, among others.
In the specific embodiment of the present application, related data of a user, such as images, etc., when the embodiment of the present application is applied to a specific product or technology, user permission or consent needs to be obtained, and the collection, use and processing of related data need to comply with local laws and regulations and standards.
Referring to fig. 1, fig. 1 is a schematic diagram of a video coding system according to an embodiment of the application. For example, a video may be input from the outside, each frame of image in the video is traversed, a coding unit division policy is calculated, and the coding unit division policy of the image is determined according to the calculation result; the coding unit division strategy comprises at least one coding unit size, and if the coding unit size larger than the first preset coding unit size exists in the at least one coding unit size, the candidate coding unit size is added into the coding unit division strategy; dividing the coding units of the target image according to a coding unit strategy to obtain at least one coding unit, and determining the prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit; and compressing the target video based on the prediction modes of the prediction units of each frame of image to obtain the encoded target video.
Specifically, for example, an input image is divided into super blocks of 64×64 in size, the super blocks are divided into 4 encoded blocks of 32×32 in size according to a quadtree division, and the rate distortion cost of each encoded block is calculated. For any one of 4 code blocks of size 32 x 32, if the rate distortion cost of the code block is minimal, the code block is no longer quadtree partitioned. If the rate distortion cost of the coding block is not the minimum, continuing to divide the coding block into quadtrees until the minimum rate distortion cost is calculated, and determining a coding unit division strategy.
For example, assuming that the first preset coding unit size is 16×16 and the candidate coding unit size is 128×128, if there is a coding unit having a size greater than 16×16, the coding unit size of 128×128 is added to the coding unit division policy, and the image is divided according to the coding unit division policy.
Based on the above description, please refer to fig. 2, fig. 2 is a flowchart of a video encoding method provided in an embodiment of the present application, where the video encoding method may be executed by a client, a server or a computer device; the video coding scheme as shown in fig. 2 includes, but is not limited to, steps S201 to S205, wherein:
s201, acquiring a target video, traversing each frame of image in the target video, dividing the currently traversed target image by coding units, and determining a coding unit division strategy of the target image; the coding unit partitioning strategy includes at least one coding unit size.
In this embodiment, the step of determining the coding unit partitioning strategy of the target image specifically includes: the target image is first divided into super-blocks of size 64x64, which may be 64x64 or 128x128 in AV1, and then the super-blocks are quadtree-divided, wherein the quadtree-divided refers to AV1 dividing the super-blocks into coding units of appropriate size using a quadtree-division method. Specifically, one super block is recursively divided into code blocks of smaller size according to the quadtree division method until the smallest code block (the smallest code block allowed by AV1 is 4×4 pixels). The coded blocks that do not continue to be split using quadtrees are referred to as coding units. For example, AV1 divides a super block of size 64×64 into coding units of an appropriate size using a quadtree division. Specifically, a super block is recursively divided into smaller-sized coding blocks according to a quadtree partitioning method, and during the block partitioning process, the encoder uses a rate-Distortion cost to search for an optimal block partition, i.e., selects a block partition with the smallest rate-Distortion cost, where the rate-Distortion cost is d+λ×r, D (distorsion) represents Distortion, which is the difference between the original pixel and the reconstructed pixel; r (Rate) represents the code Rate, which is the bit consumed to represent the transform coefficient and mode information; lambda is a constant. And determining a final dividing result of the coding block according to the calculating result of the rate distortion cost, and finally determining a coding unit dividing strategy of the target image.
Specifically, referring to fig. 3, fig. 3 is a super block with a size of 64×64, the super block with the size of 64×64 is divided into 4 coding blocks with a size of 32×32, the rate distortion cost of each coding block is calculated, if the rate distortion cost is minimum, the coding block is not divided into quadtree, if the rate distortion cost calculation result of the coding block 303 and the coding block 304 in fig. 3 is minimum, the coding block 303 and the coding block 304 are not divided, and a coding unit 303 and a coding unit 304 are obtained; if the rate distortion cost is not the minimum, continuing to divide the coding block into four branches, if the rate distortion cost of the 301 coding block in fig. 3 is not the minimum, continuing to divide the 301 coding block into four branches until the coding block with the minimum rate distortion cost is obtained, thereby determining a coding unit division strategy of the target image.
Referring to fig. 4, fig. 4 is a quadtree shape of the optimal division, in which 1 indicates that the current node continues to divide, and 0 indicates that the current node is a leaf node, i.e., the current node is a coding unit. Taking fig. 3 as an example, for a 64x64 superblock, if the superblock is to be divided further, the superblock may be marked as 1. The 64x64 super-block may be divided into 4 32x32 encoded blocks, 301 encoded block, 303 encoded block, 304 encoded block, and 305 encoded block, respectively, wherein to continue dividing the 301 encoded block, the 301 encoded block may be marked as 1. If the 303 encoded block is not to be divided further, the 303 encoded block may be marked as 0. The size of the coding block represented by each layer of nodes is listed at the dotted line; the square 401 marked node in fig. 4 corresponds to the 302 area marked 16x16 code block in fig. 3, which is the parent node of the code element with index 0-3.
Fig. 3 and 4 are optimal partitions of a super-block, which contain a number of coding units of different sizes, identified as 0-15. Thus, the optimal partitioning of a super-block may be considered a combination of some coding units. In addition, the optimal partition in fig. 3 and 4 is the partition with the smallest rate distortion cost selected from the full quadtree partitions in fig. 5. The block partitioning process of the encoder is to determine whether each node in the full quadtree partition needs to continue partitioning, i.e., to decide whether the value of each node is 1 or 0.
S202, if the coding unit size larger than the first preset coding unit size exists in the at least one coding unit size, acquiring a candidate coding unit size, and adding the candidate coding unit size into a coding unit division strategy.
The candidate coding unit size is greater than or equal to a second preset coding unit size, which is greater than the first preset coding unit size.
In this embodiment, specifically, assuming that the size of the first preset coding unit is 16×16, if there is at least one coding unit size greater than 16×16, the candidate coding unit size is added to the coding unit division policy, where the candidate coding unit size may be 128×128, for example. Compared with the prior art that after the optimal coding mode is determined in the first stage, only the optimal coding mode and the last size of the optimal coding mode and the next size of the optimal coding mode are selected in the second stage, the method and the device can adaptively determine whether to check 128x128 and related prediction units in the second stage according to the result of the first stage, so that the coding time can be kept unchanged, and the coding performance of 128x128 can be fully mined under the condition of even lower coding time.
S203, coding unit division is carried out on the target image based on the sizes of all the coding units in the coding unit division strategy, so as to obtain at least one coding unit.
In this embodiment, the target superblock is subjected to coding unit partitioning by finally obtaining each coding unit size in the coding unit partitioning policy, for example, please refer to fig. 3, fig. 3 is a schematic diagram of optimal partitioning of the superblock with a size of 64×64, the coding unit partitioning policy of the target superblock has been determined, and the coding unit partitioning of the target superblock is completed according to the coding unit partitioning policy, so as to obtain the optimal partitioning of the target superblock.
S204, determining the prediction mode of each prediction unit based on at least one coding unit and the prediction units of each coding unit.
In this embodiment, there are various prediction unit partitioning modes of each coding unit, for example, please refer to fig. 7, fig. 7 is a diagram of a partitioning mode of a prediction unit, in which the sizes of the prediction units are different.
Further, referring to fig. 6, for example, for each prediction unit, the AV1 encoder will select one prediction mode from the intra prediction mode or the inter prediction mode, and generate a prediction pixel value of the prediction unit using the prediction mode and a reconstruction pixel value of a neighboring block or a reconstruction pixel value of a neighboring frame. Then, subtracting the predicted pixel value of the original pixel value of the prediction unit to generate a predicted residual; transforming and quantizing the prediction residual to generate a transformed quantized coefficient, and performing inverse quantization and inverse transformation on the transformed quantized coefficient to generate a reconstructed residual; the reconstructed residual plus the predicted pixel value generates a reconstructed pixel value.
For example, assuming that a coding unit size of 128×128 is added to the coding unit division policy, the target image may be subjected to coding unit division based on the coding unit size of 128×128 to obtain at least one coding unit of 128×128. For each 128×128 coding unit, the coding unit may be subjected to prediction unit division by a certain prediction unit division manner to obtain at least one prediction unit of the coding unit, for example, the coding unit may be subjected to prediction unit division by a preset prediction unit division manner to obtain one prediction unit of the coding unit, such as prediction unit 0 in fig. 1. The rate-distortion cost of the prediction unit 0 can be obtained through calculation, if the condition that the rate-distortion cost of the prediction unit 0 is not met is determined to be no longer continuously divided, the other prediction units are not divided, the coding unit where the prediction unit is located is not divided into quadtrees, if the condition that the rate-distortion cost of the prediction unit 0 is not met is not continuously divided, the other prediction units are divided, see the prediction units 1 and 2 and the prediction units 3 and 4 of fig. 7, the rate-distortion cost is calculated according to the newly divided prediction units, if the rate-distortion cost of the prediction units 1 and 2 and the rate-distortion cost of the prediction units 3 and 4 are not met, the other prediction units are divided, see the prediction units 5, 6 and 7, the prediction units 8, 9 and 10, the prediction units 11, 12 and 13 and the prediction units 14, 15 and 16 of fig. 7, the steps are repeated until the rate-distortion cost of the prediction unit meets the condition that the no longer continuously divided, and the other prediction units of the coding unit are divided; if the division modes of all the prediction units of the coding unit have already calculated the rate distortion cost and the rate distortion cost is not the minimum, please refer to fig. 7, that is, the rate distortion cost of the prediction units 17, 18, 19, 20 and the prediction units 21, 22, 23, 24 in fig. 7 still does not meet the condition of no further division, the coding unit is subjected to quadtree division, and the above-mentioned division steps of the prediction units are repeated, so as to finally determine the coding mode of the target image. Wherein, whether the condition of no further division is satisfied is determined according to the rate distortion cost of the prediction unit, and the description of the following embodiments can be seen.
S205, compressing the target video based on the prediction modes of the prediction units of each frame of image to obtain the encoded target video.
In the embodiment of the application, the target image is acquired, the coding unit division strategy of the target image is determined by carrying out coding unit division on the target image, the coding unit division strategy comprises at least one coding unit size, if the coding unit size larger than the first preset coding unit size exists in the at least one coding unit size, the candidate coding unit size is acquired, the candidate coding unit size is added into the coding unit division strategy, the coding unit division is carried out on the target image based on each coding unit size in the coding unit division strategy, the at least one coding unit is obtained, the coding mode of the target image is determined based on the at least one coding unit and the prediction units of each coding unit, and the target image is coded based on the coding mode, so that the coding time can be kept unchanged, and the 128×128 coding performance can be fully mined under the even lower condition.
Based on the above description, please refer to fig. 8, fig. 8 is a flowchart of another video encoding method provided in an embodiment of the present application, where the video encoding method may be performed by a client, a server, or a computer device. The video encoding method as shown in fig. 8 includes, but is not limited to, steps S801 to S805, wherein:
S801, acquiring a target video, traversing each frame of image in the target video, dividing the currently traversed target image by coding units, and determining a coding unit division strategy of the target image; the coding unit partitioning strategy includes at least one coding unit size.
S802, if the coding unit size larger than the first preset coding unit size exists in the at least one coding unit size, acquiring a candidate coding unit size, and adding the candidate coding unit size into a coding unit division strategy.
S803, coding unit division is carried out on the target image based on the sizes of all the coding units in the coding unit division strategy, and at least one coding unit is obtained.
S804, determining a prediction mode of each prediction unit based on at least one coding unit and size information and mode information of the prediction unit of each coding unit.
In one implementation manner, the coding unit division is performed on the target image based on each coding unit size in the coding unit division policy, so as to obtain at least one coding unit, and the method includes:
traversing the coding unit size in the coding unit division strategy, and dividing the coding unit of the target image based on the currently traversed coding unit size to obtain at least one coding unit;
the determining a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit includes:
aiming at any coding unit, traversing the prediction unit division mode in the prediction unit division strategy, and carrying out prediction unit division on the any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of the any coding unit;
If the rate distortion cost of the target prediction unit with the prediction unit size larger than or equal to the first preset prediction unit size in at least one prediction unit of any coding unit is successfully obtained, and the prediction mode of the target prediction unit is the first inter-frame prediction mode, determining the coding mode of the target image includes: and obtaining a coding unit division mode performed by the at least one coding unit and obtaining a prediction unit division mode performed by the target prediction unit.
Specifically, the first preset unit size is 32×32, the first inter-frame prediction mode is a skip mode, please refer to fig. 7, and assume that the size of the prediction unit 0 in fig. 1 is 32×32, and the inter-frame prediction mode of the prediction unit 0 is the skip mode, and the rate distortion cost of the prediction unit 0 has been calculated, which indicates that the texture of the coding unit obtained by the current partition mode is simple enough, no further partition is needed, so that the coding unit where the prediction unit 0 is located is not further subjected to quadtree partition, and the coding unit partition mode performed by at least one coding unit is obtained, and the coding unit partition mode performed by the target prediction unit is obtained.
In one implementation, the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the first preset prediction unit size is not obtained or the mode of the target prediction unit is not the first inter prediction mode, traversing the next prediction unit division mode in the prediction unit division strategy, triggering and executing the prediction unit division mode based on the current traversal to divide the prediction unit of any coding unit, and obtaining at least one prediction unit of any coding unit.
Specifically, please refer to fig. 7, if the size of the prediction unit 0 in fig. 7 is smaller than 32×32 or the inter prediction mode of the prediction unit is not skip mode or the rate distortion cost is not calculated, the next prediction unit division mode in the prediction unit division policy is traversed, the prediction unit division of any coding unit based on the current traversed prediction unit division mode is triggered to be performed, so as to obtain at least one prediction unit of any coding unit, such as1, 2,3, and 4 prediction units in fig. 7, and if 1,2,3, and 4 in fig. 7 still do not satisfy the above conditions, the above steps are continuously performed.
In one implementation, the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the first preset prediction unit size is not obtained or the mode of the target prediction unit is not the first inter-frame prediction mode, and the prediction unit division mode in the prediction unit division strategy is traversed, traversing the next coding unit size in the coding unit division strategy, triggering and executing the coding unit division on the target image based on the current traversed coding unit size, and obtaining at least one coding unit.
Specifically, referring to fig. 7, assuming that the sizes of all prediction units in fig. 7 are smaller than 32×32 or that the modes of all prediction units are not skip modes or that the rate distortion costs of all prediction units are not calculated, traversing the next coding unit size in the coding unit partitioning strategy, triggering the execution of coding unit partitioning on the target image based on the currently traversed coding unit size, and obtaining at least one coding unit.
In one implementation, the traversing the coding unit sizes in the coding unit partitioning policy includes:
And traversing the sizes of the coding units in the coding unit division strategy according to the sequence of the sizes of the coding units from large to small.
For example, the coding unit size in the coding unit division policy is traversed sequentially from large to small according to the coding unit with the largest coding unit size, please refer to fig. 3, which traverses 301, 303, 304, 305 first, and then traverses 302 and 306.
In one implementation, traversing the prediction unit partitioning manner in the prediction unit partitioning policy includes:
Traversing the prediction unit division modes in the prediction unit division strategy according to the sequence from small to large of the number of the prediction units obtained in the prediction unit division modes.
For example, the prediction unit division manner in the prediction unit division policy is traversed in the order from small to large in the number of prediction units obtained in the prediction unit division manner, that is, in the order from large to small in the prediction unit size, and referring to fig. 7, the prediction units are traversed in the order from small to large in the number of prediction units starting from the prediction unit 0 in which the number of prediction units is 1.
S805, compressing the target video based on the prediction modes of the prediction units of each frame of image to obtain the encoded target video.
In the embodiment of the application, the target image is acquired, the coding unit division strategy of the target image is determined by carrying out coding unit division on the target image, the coding unit division strategy comprises at least one coding unit size, if the coding unit size larger than the first preset coding unit size exists in the at least one coding unit size, the candidate coding unit size is acquired, the candidate coding unit size is added into the coding unit division strategy, the coding unit division is carried out on the target image based on the coding unit sizes in the coding unit division strategy to obtain at least one coding unit, the prediction mode of each prediction unit is determined based on the size information and the mode information of the at least one coding unit and each prediction unit, the coding mode is determined based on the coding mode, and when the prediction unit meets the preset size information and the mode information, the coding mode is not further divided, so that the coding efficiency is improved.
Based on the above description, please refer to fig. 9, fig. 9 is a flowchart of another video encoding method provided in an embodiment of the present application, where the video encoding method may be performed by a client, a server, or a computer device. The video encoding method as shown in fig. 9 includes, but is not limited to, steps S901 to S905, wherein:
s901, acquiring a target video, traversing each frame of image in the target video, dividing the currently traversed target image into coding units, and determining a coding unit division strategy of the target image; the coding unit partitioning strategy includes at least one coding unit size.
S902, if the coding unit size larger than the first preset coding unit size exists in the at least one coding unit size, acquiring a candidate coding unit size, and adding the candidate coding unit size into a coding unit division strategy.
S903, coding unit division is carried out on the target image based on the sizes of all the coding units in the coding unit division strategy, so as to obtain at least one coding unit.
S904, determining a prediction mode of each prediction unit based on at least one coding unit and size information, mode information, and the number of non-zero coefficients in the transform quantized coefficients of the prediction units of each coding unit.
In one implementation manner, the coding unit division is performed on the target image based on each coding unit size in the coding unit division policy, so as to obtain at least one coding unit, and the method includes:
traversing the coding unit size in the coding unit division strategy, and dividing the coding unit of the target image based on the currently traversed coding unit size to obtain at least one coding unit;
the determining a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit includes:
aiming at any coding unit, traversing the prediction unit division mode in the prediction unit division strategy, and carrying out prediction unit division on the any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of the any coding unit;
If the rate distortion cost of the target prediction unit, the prediction unit size of which is greater than or equal to the first preset prediction unit size, in at least one prediction unit of any coding unit is successfully obtained, and the prediction mode of the target prediction unit is the second inter-frame prediction mode, and the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is equal to the first preset number, determining the coding mode of the target image includes: and obtaining a coding unit division mode performed by the at least one coding unit and obtaining a prediction unit division mode performed by the target prediction unit.
Specifically, the first preset unit size is 32×32, the second inter prediction mode is NEARESTMV, the first preset number is 0, please refer to fig. 7, the size of the prediction unit 0 in fig. 7 is 32×32, the inter prediction mode of the prediction unit 0 is NEARESTMV, the number of non-zero coefficients in the transform quantization coefficients of the prediction unit 0 is equal to 0, and the rate distortion cost of the prediction unit 0 has been calculated, which indicates that the texture of the coding unit obtained in the current partition mode is simple enough, no further partition is needed, therefore, no quadtree partition is performed on the coding unit where the prediction unit 0 is located, no other prediction unit partition is performed on the coding unit where the prediction unit 0 is located, and a coding unit partition mode performed by at least one coding unit and a prediction unit partition mode performed by a target prediction unit are obtained.
In one implementation, the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size larger than or equal to the first preset prediction unit size is not obtained or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is not equal to the first preset number, traversing the next prediction unit division mode in the prediction unit division strategy, triggering and executing the prediction unit division mode based on the current traversal to divide the prediction unit of any coding unit, and obtaining at least one prediction unit of any coding unit.
Specifically, referring to fig. 7, assuming that the size of the prediction unit 0 in fig. 7 is smaller than 32×32 or that the inter prediction mode of the prediction unit is not NEARESTMV modes or that the number of non-zero coefficients in the transform quantization coefficients of the prediction unit is not equal to 0 or that there is no calculated rate distortion cost, traversing the next prediction unit partition mode in the prediction unit partition policy, triggering to execute the prediction unit partition of any coding unit based on the currently traversed prediction unit partition mode to obtain at least one prediction unit of any coding unit, such as 1, 2 and 3,4 prediction units in fig. 7, and if 1, 2 and 3,4 in fig. 7 still do not satisfy the above conditions, continuing to execute the above steps.
In one implementation, the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the first preset prediction unit size is not obtained, or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is not equal to the first preset number, and the prediction unit dividing mode in the prediction unit dividing strategy is traversed, traversing the next coding unit size in the coding unit dividing strategy, and triggering and executing the coding unit division on the target image based on the currently traversed coding unit size to obtain at least one coding unit.
Specifically, referring to fig. 7, assuming that the sizes of all prediction units in fig. 7 are smaller than 32×32 or that the modes of all prediction units are not NEARESTMV modes or that the number of non-zero coefficients in the transform quantization coefficients of all prediction units is not equal to 0 or that the rate-distortion cost of all prediction units is not calculated, traversing the next coding unit size in the coding unit partitioning strategy triggers execution of coding unit partitioning on the target image based on the currently traversed coding unit size, to obtain at least one coding unit.
In one implementation, the traversing the coding unit sizes in the coding unit partitioning policy includes:
And traversing the sizes of the coding units in the coding unit division strategy according to the sequence of the sizes of the coding units from large to small.
For example, the coding unit size in the coding unit division policy is traversed sequentially from large to small according to the coding unit with the largest coding unit size, please refer to fig. 3, which traverses 301, 303, 304, 305 first, and then traverses 302 and 306.
In one implementation, traversing the prediction unit partitioning manner in the prediction unit partitioning policy includes:
Traversing the prediction unit division modes in the prediction unit division strategy according to the sequence from small to large of the number of the prediction units obtained in the prediction unit division modes.
For example, the prediction unit division manner in the prediction unit division policy is traversed in the order from small to large in the number of prediction units obtained in the prediction unit division manner, that is, in the order from large to small in the prediction unit size, and referring to fig. 7, the prediction units are traversed in the order from small to large in the number of prediction units starting from the prediction unit 0 in which the number of prediction units is 1.
S905, performing compression processing on the target video based on the prediction modes of the prediction units of each frame image, to obtain the encoded target video.
In the embodiment of the application, a target image is acquired, and is subjected to coding unit division, a coding unit division strategy of the target image is determined, the coding unit division strategy comprises at least one coding unit size, if the coding unit size larger than a first preset coding unit size exists in the at least one coding unit size, the candidate coding unit size is acquired, and is added to the coding unit division strategy, the coding unit division is performed on the target image based on the coding unit sizes in the coding unit division strategy, so as to obtain at least one coding unit, the coding mode of the target image is determined based on the size information, the mode information and the number of non-zero coefficients in the transformation quantization coefficients of the at least one coding unit and the coding units, the coding mode is determined based on the coding mode, and the coding mode is determined by utilizing the size information, the mode information and the number of the non-zero coefficients in the transformation quantization coefficients of the prediction units, and the coding efficiency is not further divided when the prediction units meet the size information, the mode information and the number of the non-zero coefficients in the transformation quantization coefficients.
Based on the above description, please refer to fig. 10, fig. 10 is a flowchart of another video encoding method provided in an embodiment of the present application, where the video encoding method may be performed by a client, a server, or a computer device. The video encoding method as shown in fig. 10 includes, but is not limited to, steps S1001 to S1005, in which:
S1001, acquiring a target video, traversing each frame of image in the target video, dividing the currently traversed target image by coding units, and determining a coding unit division strategy of the target image; the coding unit partitioning strategy includes at least one coding unit size.
S1002, if the coding unit size larger than the first preset coding unit size exists in the at least one coding unit size, acquiring a candidate coding unit size, and adding the candidate coding unit size into a coding unit division strategy.
S1003, coding unit division is carried out on the target image based on the sizes of all the coding units in the coding unit division strategy, so as to obtain at least one coding unit.
S1004, determining the prediction mode of each prediction unit based on the size information of at least one coding unit and the prediction units of each coding unit and the number of non-zero coefficients in the transformation quantization coefficients.
In one implementation manner, the coding unit division is performed on the target image based on each coding unit size in the coding unit division policy, so as to obtain at least one coding unit, and the method includes:
traversing the coding unit size in the coding unit division strategy, and dividing the coding unit of the target image based on the currently traversed coding unit size to obtain at least one coding unit;
the determining a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit includes:
aiming at any coding unit, traversing the prediction unit division mode in the prediction unit division strategy, and carrying out prediction unit division on the any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of the any coding unit;
If the rate distortion cost of the target prediction unit, of which the prediction unit size is greater than or equal to the second preset prediction unit size, in at least one prediction unit of any coding unit is successfully obtained, and the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is smaller than the second preset number, determining the coding mode of the target image includes: and obtaining a coding unit division mode performed by the at least one coding unit and obtaining a prediction unit division mode performed by the target prediction unit.
Specifically, the second preset unit size is 16×16, the second preset number is 4, please refer to fig. 7, and assume that the size of the prediction unit 0 in fig. 7 is 16×16, and the number of non-zero coefficients in the transform quantized coefficients of the prediction unit 0 is less than 4, and the rate distortion cost of the prediction unit 0 has been calculated, which indicates that the current division manner is already sufficiently fine, if the number of non-zero coefficients in the transform quantized coefficients is equal to 0 again, the finally determined division manner is necessarily fine, but the goal of the present scheme is to select as large a size as possible, so the number of non-zero coefficients in the transform quantized coefficients is slightly relaxed so that the finally determined division manner is not particularly fine. Therefore, the coding unit where the prediction unit 0 is located is not subjected to quadtree division, and the coding unit where the prediction unit 0 is located is not subjected to other prediction unit division, so that the coding unit division mode performed by at least one coding unit and the prediction unit division mode performed by the target prediction unit are obtained.
In one implementation, the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the second preset prediction unit size or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is greater than or equal to the second preset number, traversing the next prediction unit division mode in the prediction unit division strategy, triggering and executing the prediction unit division mode based on the current traversal to divide the prediction unit of any coding unit, and obtaining at least one prediction unit of any coding unit.
Specifically, referring to fig. 7, assuming that the size of the prediction unit 0 in fig. 7 is smaller than 16×16 or the number of non-zero coefficients in the transform quantization coefficients of the prediction unit is greater than or equal to 4 or no calculated rate distortion cost, traversing the next prediction unit division mode in the prediction unit division policy, triggering to execute the prediction unit division on any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of any coding unit, such as 1,2 and 3, 4 prediction units in fig. 7, and if 1,2 and 3, 4 in fig. 7 still do not satisfy the above conditions, continuing to execute the above steps.
In one implementation, the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the second preset prediction unit size or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is greater than or equal to the second preset number, and the prediction unit division mode in the prediction unit division strategy is traversed, traversing the next coding unit size in the coding unit division strategy, and triggering and executing the coding unit division on the target image based on the currently traversed coding unit size to obtain at least one coding unit.
Specifically, referring to fig. 7, assuming that the sizes of all prediction units in fig. 7 are smaller than 16×16 or the number of non-zero coefficients in the transform quantization coefficients of all prediction units is greater than or equal to 4 or the rate distortion cost of all prediction units is not calculated, traversing the next coding unit size in the coding unit partitioning strategy, triggering execution of coding unit partitioning on the target image based on the currently traversed coding unit size, and obtaining at least one coding unit.
In one implementation, the traversing the coding unit sizes in the coding unit partitioning policy includes:
And traversing the sizes of the coding units in the coding unit division strategy according to the sequence of the sizes of the coding units from large to small.
For example, the coding unit size in the coding unit division policy is traversed sequentially from large to small according to the coding unit with the largest coding unit size, please refer to fig. 3, which traverses 301, 303, 304, 305 first, and then traverses 302 and 306.
In one implementation, traversing the prediction unit partitioning manner in the prediction unit partitioning policy includes:
Traversing the prediction unit division modes in the prediction unit division strategy according to the sequence from small to large of the number of the prediction units obtained in the prediction unit division modes.
For example, the prediction unit division manner in the prediction unit division policy is traversed in the order from small to large in the number of prediction units obtained in the prediction unit division manner, that is, in the order from large to small in the prediction unit size, and referring to fig. 7, the prediction units are traversed in the order from small to large in the number of prediction units starting from the prediction unit 0 in which the number of prediction units is 1.
S1005, performing compression processing on the target video based on the prediction modes of the prediction units of each frame image, to obtain the encoded target video.
In the embodiment of the application, a target image is acquired, coding unit division is carried out on the target image, a coding unit division strategy of the target image is determined, the coding unit division strategy comprises at least one coding unit size, if the coding unit size larger than a first preset coding unit size exists in the at least one coding unit size, candidate coding unit sizes are acquired, the candidate coding unit sizes are added into the coding unit division strategy, the coding unit division is carried out on the target image based on the coding unit sizes in the coding unit division strategy, at least one coding unit is obtained, the coding mode of the target image is determined based on the size information of the at least one coding unit and the prediction units of the at least one coding unit and the number of the non-zero coefficients in the transformation quantization coefficients, the coding mode is determined based on the coding mode, and when the size information of the prediction units and the number of the non-zero coefficients in the transformation quantization coefficients are met, the coding efficiency is improved without further division.
The embodiment of the present application also provides a computer storage medium having stored therein program instructions for implementing the corresponding method described in the above embodiment when executed.
Referring to fig. 11 again, fig. 11 is a schematic structural diagram of a video encoding apparatus according to an embodiment of the present application.
In one implementation of the video encoding apparatus of the embodiment of the present application, the video encoding apparatus includes the following structure.
The partition strategy determining unit 1101 is configured to obtain a target video, traverse each frame of image in the target video, perform coding unit partition on a currently traversed target image, and determine a coding unit partition strategy of the target image; the coding unit partitioning strategy includes at least one coding unit size.
The partition policy determining unit 1101 is further configured to obtain a candidate coding unit size if there is a coding unit size greater than a first preset coding unit size in the at least one coding unit size, and add the candidate coding unit size to the coding unit partition policy; the candidate coding unit size is greater than or equal to a second preset coding unit size, which is greater than the first preset coding unit size.
And the dividing unit 1102 is configured to divide the coding unit of the target image based on each coding unit size in the coding unit division policy, so as to obtain at least one coding unit.
The dividing unit 1102 is further configured to determine a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit.
The video encoding unit 1103 is configured to compress the target video based on the prediction modes of the prediction units of the frame images, so as to obtain an encoded target video.
In one embodiment, the dividing unit 1102 performs coding unit division on the target image based on each coding unit size in the coding unit division policy to obtain at least one coding unit, including:
traversing the coding unit size in the coding unit division strategy, and dividing the coding unit of the target image based on the currently traversed coding unit size to obtain at least one coding unit;
the dividing unit 1102 determines a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit, and includes:
aiming at any coding unit, traversing the prediction unit division mode in the prediction unit division strategy, and carrying out prediction unit division on the any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of the any coding unit;
If the rate distortion cost of the target prediction unit with the prediction unit size larger than or equal to the first preset prediction unit size in at least one prediction unit of any coding unit is successfully obtained, and the prediction mode of the target prediction unit is the first inter-frame prediction mode, determining the coding mode of the target image includes: and obtaining a coding unit division mode performed by the at least one coding unit and obtaining a prediction unit division mode performed by the target prediction unit.
In one embodiment, the dividing unit 1102 further includes:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the first preset prediction unit size is not obtained or the mode of the target prediction unit is not the first inter prediction mode, traversing the next prediction unit division mode in the prediction unit division strategy, triggering and executing the prediction unit division mode based on the current traversal to divide the prediction unit of any coding unit, and obtaining at least one prediction unit of any coding unit.
In one embodiment, the dividing unit 1102 further includes:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the first preset prediction unit size is not obtained or the mode of the target prediction unit is not the first inter-frame prediction mode, and the prediction unit division mode in the prediction unit division strategy is traversed, traversing the next coding unit size in the coding unit division strategy, triggering and executing the coding unit division on the target image based on the current traversed coding unit size, and obtaining at least one coding unit.
In one embodiment, the dividing unit 1102 performs coding unit division on the target image based on each coding unit size in the coding unit division policy to obtain at least one coding unit, including:
traversing the coding unit size in the coding unit division strategy, and dividing the coding unit of the target image based on the currently traversed coding unit size to obtain at least one coding unit;
the dividing unit 1102 determines a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit, and includes:
aiming at any coding unit, traversing the prediction unit division mode in the prediction unit division strategy, and carrying out prediction unit division on the any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of the any coding unit;
If the rate distortion cost of the target prediction unit, the prediction unit size of which is greater than or equal to the first preset prediction unit size, in at least one prediction unit of any coding unit is successfully obtained, and the prediction mode of the target prediction unit is the second inter-frame prediction mode, and the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is equal to the first preset number, determining the coding mode of the target image includes: and obtaining a coding unit division mode performed by the at least one coding unit and obtaining a prediction unit division mode performed by the target prediction unit.
In one embodiment, the dividing unit 1102 further includes:
If the rate distortion cost of the target prediction unit with the prediction unit size larger than or equal to the first preset prediction unit size is not obtained or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is not equal to the first preset number, traversing the next prediction unit division mode in the prediction unit division strategy, triggering and executing the prediction unit division of any coding unit based on the currently traversed prediction unit division mode, and obtaining at least one prediction unit of any coding unit.
In one embodiment, the dividing unit 1102 further includes:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the first preset prediction unit size is not obtained, or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is not equal to the first preset number, and the prediction unit dividing mode in the prediction unit dividing strategy is traversed, traversing the next coding unit size in the coding unit dividing strategy, and triggering and executing the coding unit division on the target image based on the currently traversed coding unit size to obtain at least one coding unit.
In one embodiment, the dividing unit 1102 performs coding unit division on the target image based on each coding unit size in the coding unit division policy to obtain at least one coding unit, including:
traversing the coding unit size in the coding unit division strategy, and dividing the coding unit of the target image based on the currently traversed coding unit size to obtain at least one coding unit;
the dividing unit 1102 determines a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit, and includes:
aiming at any coding unit, traversing the prediction unit division mode in the prediction unit division strategy, and carrying out prediction unit division on the any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of the any coding unit;
If the rate distortion cost of the target prediction unit, of which the prediction unit size is greater than or equal to the second preset prediction unit size, in at least one prediction unit of any coding unit is successfully obtained, and the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is smaller than the second preset number, determining the coding mode of the target image includes: and obtaining a coding unit division mode performed by the at least one coding unit and obtaining a prediction unit division mode performed by the target prediction unit.
In one embodiment, the dividing unit 1102 further includes:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the second preset prediction unit size or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is greater than or equal to the second preset number, traversing the next prediction unit division mode in the prediction unit division strategy, triggering and executing the prediction unit division mode based on the current traversal to divide the prediction unit of any coding unit, and obtaining at least one prediction unit of any coding unit.
In one embodiment, the dividing unit 1102 further includes:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the second preset prediction unit size or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is greater than or equal to the second preset number, and the prediction unit division mode in the prediction unit division strategy is traversed, traversing the next coding unit size in the coding unit division strategy, and triggering and executing the coding unit division on the target image based on the currently traversed coding unit size to obtain at least one coding unit.
In one embodiment, the partitioning unit 1102 traverses coding unit sizes in the coding unit partitioning policy, including:
And traversing the sizes of the coding units in the coding unit division strategy according to the sequence of the sizes of the coding units from large to small.
In one embodiment, the partitioning unit 1102 traverses a prediction unit partitioning manner in a prediction unit partitioning policy, including:
Traversing the prediction unit division modes in the prediction unit division strategy according to the sequence from small to large of the number of the prediction units obtained in the prediction unit division modes.
In the embodiment of the present application, the partition policy determining unit 1101 performs coarse granularity partition on the target image through the first stage, and quickly screens out candidate partition schemes, that is, performs coding unit partition on the target image, and determines a coding unit partition policy of the target image. In the second stage, if there is a coding unit size larger than the first preset coding unit size in the coding unit division policy, the candidate coding unit size may be added to the coding unit division policy, and since the candidate coding unit size is larger than or equal to the second preset coding unit size, and the second preset coding unit size is larger than the first preset coding unit size, the dividing unit 1102 divides the target image into coding units based on the candidate coding unit size, so as to obtain at least one coding unit, if the at least one coding unit is an optimal block division, the at least one coding unit may not need to be further divided, and the video coding unit 1103 performs compression processing on the target video based on the prediction modes of the prediction units of each frame image, so as to obtain the encoded target video.
Referring to fig. 12 again, fig. 12 is a schematic structural diagram of a computer device according to an embodiment of the present application, where the computer device according to the embodiment of the present application includes a power supply module and other structures, and includes a processor 1201, a storage device 1202, and a communication interface 1203. Data can be interacted among the processor 1201, the storage device 1202 and the communication interface 1203, and a corresponding video encoding method is realized by the processor 1201.
The storage 1202 may include volatile memory (RAM), such as random-access memory (RAM); the storage 1202 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a solid state disk (SSD-STATE DRIVE), etc.; the storage 1202 may also include a combination of the above types of memory.
The processor 1201 may be a central processing unit (central processing unit, CPU). The processor 1201 may also be a combination of a CPU and a GPU. In the server, a plurality of CPUs and GPUs can be included as required to perform corresponding video encoding. In one embodiment, the storage 1202 is configured to store program instructions. The processor 1201 may invoke program instructions to implement the various methods as referred to above in embodiments of the present application.
In a first possible implementation manner, the processor 1201 of the computer device invokes the program instructions stored in the storage 1202 to obtain a target video, traverse each frame of image in the target video, and divide the currently traversed target image into coding units, so as to determine a coding unit division policy of the target image; the coding unit partitioning strategy includes at least one coding unit size; if the at least one coding unit size is larger than the first preset coding unit size, acquiring a candidate coding unit size, and adding the candidate coding unit size into the coding unit division strategy; the candidate coding unit size is greater than or equal to a second preset coding unit size, which is greater than the first preset coding unit size; performing coding unit division on the target image based on the sizes of all the coding units in the coding unit division strategy to obtain at least one coding unit; determining a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit; and compressing the target video based on the prediction modes of the prediction units of each frame of image to obtain the encoded target video.
In one embodiment, when the processor 1201 performs coding unit division on the target image based on each coding unit size in the coding unit division policy to obtain at least one coding unit, the following operations may be performed:
traversing the coding unit size in the coding unit division strategy, and dividing the coding unit of the target image based on the currently traversed coding unit size to obtain at least one coding unit;
the processor 1201 determines a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit, and may perform the following operations:
aiming at any coding unit, traversing the prediction unit division mode in the prediction unit division strategy, and carrying out prediction unit division on the any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of the any coding unit;
If the rate distortion cost of the target prediction unit with the prediction unit size larger than or equal to the first preset prediction unit size in at least one prediction unit of any coding unit is successfully obtained, and the prediction mode of the target prediction unit is the first inter-frame prediction mode, determining the coding mode of the target image includes: and obtaining a coding unit division mode performed by the at least one coding unit and obtaining a prediction unit division mode performed by the target prediction unit.
In one embodiment, the processor 1201 may also perform the following operations:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the first preset prediction unit size is not obtained or the mode of the target prediction unit is not the first inter prediction mode, traversing the next prediction unit division mode in the prediction unit division strategy, triggering and executing the prediction unit division mode based on the current traversal to divide the prediction unit of any coding unit, and obtaining at least one prediction unit of any coding unit.
In one embodiment, the processor 1201 may also perform the following operations:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the first preset prediction unit size is not obtained or the mode of the target prediction unit is not the first inter-frame prediction mode, and the prediction unit division mode in the prediction unit division strategy is traversed, traversing the next coding unit size in the coding unit division strategy, triggering and executing the coding unit division on the target image based on the current traversed coding unit size, and obtaining at least one coding unit.
In one embodiment, when the processor 1201 performs coding unit division on the target image based on each coding unit size in the coding unit division policy to obtain at least one coding unit, the following operations may be performed:
traversing the coding unit size in the coding unit division strategy, and dividing the coding unit of the target image based on the currently traversed coding unit size to obtain at least one coding unit;
The processor 1201 may determine a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit by performing the following operations:
aiming at any coding unit, traversing the prediction unit division mode in the prediction unit division strategy, and carrying out prediction unit division on the any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of the any coding unit;
If the rate distortion cost of the target prediction unit, the prediction unit size of which is greater than or equal to the first preset prediction unit size, in at least one prediction unit of any coding unit is successfully obtained, and the prediction mode of the target prediction unit is the second inter-frame prediction mode, and the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is equal to the first preset number, determining the coding mode of the target image includes: and obtaining a coding unit division mode performed by the at least one coding unit and obtaining a prediction unit division mode performed by the target prediction unit.
In one embodiment, the processor 1201 may also perform the following operations:
If the rate distortion cost of the target prediction unit with the prediction unit size larger than or equal to the first preset prediction unit size is not obtained or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is not equal to the first preset number, traversing the next prediction unit division mode in the prediction unit division strategy, triggering and executing the prediction unit division of any coding unit based on the currently traversed prediction unit division mode, and obtaining at least one prediction unit of any coding unit.
In one embodiment, the processor 1201 may also perform the following operations:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the first preset prediction unit size is not obtained, or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is not equal to the first preset number, and the prediction unit dividing mode in the prediction unit dividing strategy is traversed, traversing the next coding unit size in the coding unit dividing strategy, and triggering and executing the coding unit division on the target image based on the currently traversed coding unit size to obtain at least one coding unit.
In one embodiment, when the processor 1201 performs coding unit division on the target image based on each coding unit size in the coding unit division policy to obtain at least one coding unit, the following operations may be performed:
traversing the coding unit size in the coding unit division strategy, and dividing the coding unit of the target image based on the currently traversed coding unit size to obtain at least one coding unit;
The processor 1201 may determine a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit by performing the following operations:
aiming at any coding unit, traversing the prediction unit division mode in the prediction unit division strategy, and carrying out prediction unit division on the any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of the any coding unit;
If the rate distortion cost of the target prediction unit, of which the prediction unit size is greater than or equal to the second preset prediction unit size, in at least one prediction unit of any coding unit is successfully obtained, and the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is smaller than the second preset number, determining the coding mode of the target image includes: and obtaining a coding unit division mode performed by the at least one coding unit and obtaining a prediction unit division mode performed by the target prediction unit.
In one embodiment, the processor 1201 may also perform the following operations:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the second preset prediction unit size or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is greater than or equal to the second preset number, traversing the next prediction unit division mode in the prediction unit division strategy, triggering and executing the prediction unit division mode based on the current traversal to divide the prediction unit of any coding unit, and obtaining at least one prediction unit of any coding unit.
In one embodiment, the processor 1201 may also perform the following operations:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the second preset prediction unit size or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is greater than or equal to the second preset number, and the prediction unit division mode in the prediction unit division strategy is traversed, traversing the next coding unit size in the coding unit division strategy, and triggering and executing the coding unit division on the target image based on the currently traversed coding unit size to obtain at least one coding unit.
In one embodiment, the processor 1201 may perform the following operations when traversing the coding unit sizes in the coding unit partitioning policy:
And traversing the sizes of the coding units in the coding unit division strategy according to the sequence of the sizes of the coding units from large to small.
In one embodiment, the processor 1201 may perform the following operations when traversing the prediction unit partition manner in the prediction unit partition policy:
Traversing the prediction unit division modes in the prediction unit division strategy according to the sequence from small to large of the number of the prediction units obtained in the prediction unit division modes.
In the embodiment of the present application, the processor 1201 performs coarse granularity division on the target image through the first stage, and rapidly screens out candidate division schemes, that is, performs coding unit division on the target image, and determines a coding unit division policy of the target image. In the second stage, if the coding unit size larger than the first preset coding unit size exists in the coding unit division policy, the candidate coding unit size may be added to the coding unit division policy, and since the candidate coding unit size is larger than or equal to the second preset coding unit size, the second preset coding unit size is larger than the first preset coding unit size, and coding unit division is performed on the target image based on the candidate coding unit size, so as to obtain at least one coding unit, and if the at least one coding unit is the optimal block division, the at least one coding unit may not need to be continuously divided, so that the coding speed of the encoder may be improved.
Those of ordinary skill in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by a computer program to instruct related hardware, the program may be stored in a computer readable storage medium, and the program may include the above-described method embodiments when executed. And the aforementioned storage medium includes: ROM or random access memory RAM, magnetic or optical disk, etc.
The above disclosure is only a few examples of the present application, and it is not intended to limit the scope of the present application, but it is understood by those skilled in the art that all or a part of the above embodiments may be implemented and equivalent changes may be made in the claims of the present application.

Claims (14)

1. A video encoding method, comprising:
Acquiring a target video, traversing each frame of image in the target video, dividing a coding unit of the currently traversed target image, and determining a coding unit division strategy of the target image; the coding unit partitioning strategy includes at least one coding unit size;
If the at least one coding unit size is larger than the first preset coding unit size, acquiring a candidate coding unit size, and adding the candidate coding unit size into the coding unit division strategy; the candidate coding unit size is greater than or equal to a second preset coding unit size, which is greater than the first preset coding unit size;
traversing the coding unit sizes in the coding unit division strategy according to the sequence of the coding unit sizes from large to small, and dividing the coding unit of the target image based on the currently traversed coding unit sizes to obtain at least one coding unit;
Determining a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit;
And compressing the target video based on the prediction modes of the prediction units of each frame of image to obtain the encoded target video.
2. The method of claim 1, wherein the determining a prediction mode for each prediction unit based on the at least one coding unit and the prediction unit for each coding unit comprises:
aiming at any coding unit, traversing the prediction unit division mode in the prediction unit division strategy, and carrying out prediction unit division on the any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of the any coding unit;
if the rate distortion cost of the target prediction unit with the prediction unit size larger than or equal to the first preset prediction unit size in at least one prediction unit of any coding unit is successfully obtained, and the prediction mode of the target prediction unit is the first inter-frame prediction mode, determining the coding mode of the target image includes: obtaining a coding unit division mode performed by the at least one coding unit and obtaining a prediction unit division mode performed by the target prediction unit; wherein the first inter prediction mode includes a skip mode.
3. The method of claim 2, wherein the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the first preset prediction unit size is not obtained or the mode of the target prediction unit is not the first inter prediction mode, traversing the next prediction unit division mode in the prediction unit division strategy, triggering and executing the prediction unit division mode based on the current traversal to divide the prediction unit of any coding unit, and obtaining at least one prediction unit of any coding unit.
4. The method of claim 2, wherein the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the first preset prediction unit size is not obtained or the mode of the target prediction unit is not the first inter-frame prediction mode, and the prediction unit division mode in the prediction unit division strategy is traversed, traversing the next coding unit size in the coding unit division strategy, triggering and executing the coding unit division on the target image based on the current traversed coding unit size, and obtaining at least one coding unit.
5. The method of claim 1, wherein the determining a prediction mode for each prediction unit based on the at least one coding unit and the prediction unit for each coding unit comprises:
aiming at any coding unit, traversing the prediction unit division mode in the prediction unit division strategy, and carrying out prediction unit division on the any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of the any coding unit;
If the rate distortion cost of the target prediction unit, the prediction unit size of which is greater than or equal to the first preset prediction unit size, in at least one prediction unit of any coding unit is successfully obtained, and the prediction mode of the target prediction unit is the second inter-frame prediction mode, and the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is equal to the first preset number, determining the coding mode of the target image includes: and obtaining a coding unit division mode performed by the at least one coding unit and obtaining a prediction unit division mode performed by the target prediction unit.
6. The method of claim 5, wherein the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size larger than or equal to the first preset prediction unit size is not obtained or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is not equal to the first preset number, traversing the next prediction unit division mode in the prediction unit division strategy, triggering and executing the prediction unit division of any coding unit based on the currently traversed prediction unit division mode, and obtaining at least one prediction unit of any coding unit.
7. The method of claim 5, wherein the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the first preset prediction unit size is not obtained, or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is not equal to the first preset number, and the prediction unit dividing mode in the prediction unit dividing strategy is traversed, traversing the next coding unit size in the coding unit dividing strategy, and triggering and executing the coding unit division on the target image based on the currently traversed coding unit size to obtain at least one coding unit.
8. The method of claim 1, wherein the determining a prediction mode for each prediction unit based on the at least one coding unit and the prediction unit for each coding unit comprises:
aiming at any coding unit, traversing the prediction unit division mode in the prediction unit division strategy, and carrying out prediction unit division on the any coding unit based on the current traversed prediction unit division mode to obtain at least one prediction unit of the any coding unit;
If the rate distortion cost of the target prediction unit, of which the prediction unit size is greater than or equal to the second preset prediction unit size, in at least one prediction unit of any coding unit is successfully obtained, and the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is smaller than the second preset number, determining the coding mode of the target image includes: and obtaining a coding unit division mode performed by the at least one coding unit and obtaining a prediction unit division mode performed by the target prediction unit.
9. The method of claim 8, wherein the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the second preset prediction unit size or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is greater than or equal to the second preset number, traversing the next prediction unit division mode in the prediction unit division strategy, triggering and executing the prediction unit division mode based on the current traversal to divide the prediction unit of any coding unit, and obtaining at least one prediction unit of any coding unit.
10. The method of claim 8, wherein the method further comprises:
If the rate distortion cost of the target prediction unit with the prediction unit size being greater than or equal to the second preset prediction unit size or the number of non-zero coefficients in the transformation quantization coefficients of the target prediction unit is greater than or equal to the second preset number, and the prediction unit division mode in the prediction unit division strategy is traversed, traversing the next coding unit size in the coding unit division strategy, and triggering and executing the coding unit division on the target image based on the currently traversed coding unit size to obtain at least one coding unit.
11. The method of any of claims 2-10, wherein traversing the prediction unit partitioning manner in the prediction unit partitioning policy comprises:
Traversing the prediction unit division modes in the prediction unit division strategy according to the sequence from small to large of the number of the prediction units obtained in the prediction unit division modes.
12. A video encoding device, the device comprising:
The dividing strategy determining unit is used for acquiring a target video, traversing each frame of image in the target video, dividing the currently traversed target image by a coding unit and determining the coding unit dividing strategy of the target image; the coding unit partitioning strategy includes at least one coding unit size;
The partition strategy determining unit is further configured to obtain a candidate coding unit size if a coding unit size greater than a first preset coding unit size exists in the at least one coding unit size, and add the candidate coding unit size to the coding unit partition strategy; the candidate coding unit size is greater than or equal to a second preset coding unit size, which is greater than the first preset coding unit size;
The dividing unit is used for traversing the coding unit sizes in the coding unit dividing strategy according to the sequence from the large coding unit sizes to the small coding unit sizes, and carrying out coding unit division on the target image based on the currently traversed coding unit sizes to obtain at least one coding unit;
The dividing unit is further configured to determine a prediction mode of each prediction unit based on the at least one coding unit and the prediction units of each coding unit;
And the video coding unit is used for compressing the target video based on the prediction modes of the prediction units of the frame images to obtain the coded target video.
13. A computer device comprising a processor, a storage device, and a communication interface, the processor, storage device, and communication interface being interconnected, wherein:
the storage device is used for storing a computer program, and the computer program comprises program instructions;
The processor being configured to invoke the program instructions to perform the video encoding method of any of claims 1 to 11.
14. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program comprising program instructions for performing the video encoding method according to any of claims 1 to 11 when executed by a processor.
CN202311255245.4A 2023-09-26 2023-09-26 Video coding method, device, equipment and storage medium Active CN117440157B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311255245.4A CN117440157B (en) 2023-09-26 2023-09-26 Video coding method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311255245.4A CN117440157B (en) 2023-09-26 2023-09-26 Video coding method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117440157A CN117440157A (en) 2024-01-23
CN117440157B true CN117440157B (en) 2024-05-28

Family

ID=89547072

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311255245.4A Active CN117440157B (en) 2023-09-26 2023-09-26 Video coding method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117440157B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954806A (en) * 2015-06-24 2015-09-30 上海交通大学 Intra-frame video optimization coding method
CN105530518A (en) * 2014-09-30 2016-04-27 联想(北京)有限公司 Video encoding method, and video decoding method and device
CN105721866A (en) * 2016-02-01 2016-06-29 北京奇艺世纪科技有限公司 Method and device for dividing coding unit
CN108322747A (en) * 2018-01-05 2018-07-24 中国软件与技术服务股份有限公司 A kind of coding unit Partitioning optimization method towards ultra high-definition video
CN109963151A (en) * 2017-12-14 2019-07-02 腾讯科技(深圳)有限公司 Coding unit, which divides, determines method and device, terminal device and readable storage medium storing program for executing
CN110719490A (en) * 2019-10-22 2020-01-21 腾讯科技(深圳)有限公司 Video encoding method, video encoding device, computer-readable storage medium, and computer apparatus
CN115278235A (en) * 2022-09-27 2022-11-01 北京达佳互联信息技术有限公司 Video coding method and device, electronic equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5719401B2 (en) * 2013-04-02 2015-05-20 日本電信電話株式会社 Block size determination method, video encoding device, and program
CN113630596A (en) * 2021-06-25 2021-11-09 杭州未名信科科技有限公司 AVS3 intra-frame prediction mode rough selection method, system and medium
CN116723328A (en) * 2023-06-19 2023-09-08 北京达佳互联信息技术有限公司 Video coding method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105530518A (en) * 2014-09-30 2016-04-27 联想(北京)有限公司 Video encoding method, and video decoding method and device
CN104954806A (en) * 2015-06-24 2015-09-30 上海交通大学 Intra-frame video optimization coding method
CN105721866A (en) * 2016-02-01 2016-06-29 北京奇艺世纪科技有限公司 Method and device for dividing coding unit
CN109963151A (en) * 2017-12-14 2019-07-02 腾讯科技(深圳)有限公司 Coding unit, which divides, determines method and device, terminal device and readable storage medium storing program for executing
CN108322747A (en) * 2018-01-05 2018-07-24 中国软件与技术服务股份有限公司 A kind of coding unit Partitioning optimization method towards ultra high-definition video
CN110719490A (en) * 2019-10-22 2020-01-21 腾讯科技(深圳)有限公司 Video encoding method, video encoding device, computer-readable storage medium, and computer apparatus
CN115278235A (en) * 2022-09-27 2022-11-01 北京达佳互联信息技术有限公司 Video coding method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Adaptive CU Depth Range;Xiang Li等;Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 5th Meeting: Geneva, CH, 16-23 March, 2011,JCTVC-E090;20110319;全文 *

Also Published As

Publication number Publication date
CN117440157A (en) 2024-01-23

Similar Documents

Publication Publication Date Title
JP7336004B2 (en) Codec using neural network
US8218641B2 (en) Picture encoding using same-picture reference for pixel reconstruction
US8218640B2 (en) Picture decoding using same-picture reference for pixel reconstruction
JP4700491B2 (en) Adaptive coefficient scan ordering
JP6037341B2 (en) Method for decoding video
US10225569B2 (en) Data storage control apparatus and data storage control method
KR101941955B1 (en) Recursive block partitioning
KR102185377B1 (en) Method for encoding and decoding images, encoding and decoding device, and corresponding computer programs
TWI455594B (en) Method and apparatus for frame memory
US8660191B2 (en) Software video decoder display buffer underflow prediction and recovery
US8594189B1 (en) Apparatus and method for coding video using consistent regions and resolution scaling
TW202002636A (en) Trellis coded quantization coefficient coding
JP2011511592A (en) Video coding system with reference frame compression
KR101375667B1 (en) Method and apparatus for Video encoding and decoding
CN117440157B (en) Video coding method, device, equipment and storage medium
CN114257810A (en) Context model selection method, device, equipment and storage medium
KR20130006578A (en) Residual coding in compliance with a video standard using non-standardized vector quantization coder
CN114025166A (en) Video compression method, electronic device and computer-readable storage medium
Lee et al. Low latency variable length coding scheme for frame memory recompression
US10057583B2 (en) Encoding method of image encoding device
Lin A low latency coding scheme for compressing reference frame in video codec
CN111885378B (en) Multimedia data encoding method, apparatus, device and medium
CN108965880B (en) Image compression method, image decompression method, image compression device, image decompression device, storage medium and terminal
CN117119198A (en) Video processing method and related equipment
KR102636100B1 (en) Encoder performing quantization based on deadzone and video processing system comprising the same

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