A video encoding system and method, electronic device and storage medium

By configuring the video frame sequence and combining the inter-frame reference relationship to determine the quantization parameters, the problems of poor video coding compression performance and high computational complexity in the existing technology are solved, and more efficient video coding compression and computation optimization are achieved.

CN118972580BActive Publication Date: 2026-04-07MOORE THREADS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing GPU-based video coding technologies, the use of fixed frame-level quantization parameters results in poor video coding compression performance and high computational complexity.

Method used

The video frame sequence is configured through the video encoding configuration program. The video encoding engine performs the first encoding process to determine the encoding cost parameters. The quantization parameter determination module uses the encoding cost parameters to determine the quantization parameters for the second video frame sequence and performs a second encoding process in combination with the inter-frame reference relationship.

Benefits of technology

It improves the compression performance of video encoding and reduces computational complexity. By flexibly configuring the number of video frames and encoding format, it expands the encoding capabilities of the video encoding system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972580B_ABST
    Figure CN118972580B_ABST
Patent Text Reader

Abstract

This disclosure relates to a video encoding system and method, an electronic device, and a storage medium. The system includes: a video encoding configuration program for configuring an i-th first video frame sequence; a video encoding engine for performing a first encoding process on the i-th first video frame sequence to determine the encoding cost parameters of the i-th first video frame sequence; a quantization parameter determination module for determining the quantization parameters of an i-th second video frame sequence using the encoding cost parameters of the i-th first video frame sequence, wherein the i-th second video frame sequence consists of the first N video frames out of the M video frames included in the i-th first video frame sequence; and a video encoding engine for performing a second encoding process on the i-th second video frame sequence using the quantization parameters of the i-th second video frame sequence to obtain the encoding result of the i-th second video frame sequence. Embodiments of this disclosure can effectively improve video encoding compression performance with relatively few hardware resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a video encoding system and method, electronic device and storage medium. Background Technology

[0002] In existing GPU-based video encoding and decoding technologies, fixed constants are typically used to initialize quantization parameters. Within a single video frame, rate-distortion optimization techniques are used to continuously adjust the quantization parameters of the coded blocks within that frame. This use of frame-level fixed quantization parameters results in poor compression performance and high computational complexity. Summary of the Invention

[0003] This disclosure presents a technical solution for a video coding system and method, an electronic device, and a storage medium.

[0004] According to one aspect of this disclosure, a video encoding system is provided, comprising: a video encoding configuration program, a video encoding engine, and a quantization parameter determination module; the video encoding configuration program is used to configure an i-th first video frame sequence, where i is a positive integer greater than or equal to 1; the video encoding engine is used to perform a first encoding process on the i-th first video frame sequence to determine the encoding cost parameter of the i-th first video frame sequence; the quantization parameter determination module is used to determine the quantization parameter of an i-th second video frame sequence using the encoding cost parameter of the i-th first video frame sequence, wherein the i-th second video frame sequence consists of the first N video frames from the M video frames included in the i-th first video frame sequence, where M and N are positive integers, and M is greater than N; the video encoding engine is used to perform a second encoding process on the i-th second video frame sequence using the quantization parameter of the i-th second video frame sequence to obtain the encoding result of the i-th second video frame sequence.

[0005] In one possible implementation, the video encoding configuration program is specifically used to: determine the frame type of each video frame in the i-th first video frame sequence, wherein the frame type of each video frame in the i-th first video frame sequence is used to indicate the inter-frame reference relationship of each video frame in the i-th first video frame sequence.

[0006] In one possible implementation, the video encoding engine is specifically used to: perform downsampling processing on the i-th first video frame sequence; and for any video frame in the downsampled i-th first video frame sequence, perform a first encoding process on the video frame to determine the encoding cost parameter of the video frame.

[0007] In one possible implementation, the system further includes: a storage module; and the video encoding engine, used to send the encoding cost parameters of the i-th first video frame sequence to the storage module for storage.

[0008] In one possible implementation, the coding cost parameter of the i-th first video frame sequence includes the coding cost parameter of each video frame in the i-th first video frame sequence, and the coding cost parameter of each video frame in the i-th first video frame sequence includes the intra-frame coding cost and inter-frame coding cost of each coding block within that video frame.

[0009] In one possible implementation, the quantization parameter determination module is specifically used to: for any coding block within any video frame in the i-th first video frame sequence, determine the target coding cost of the coding block based on the inter-frame coding cost and intra-frame coding cost of the coding block; and for any coding block within any video frame in the i-th second video frame sequence, determine the quantization parameters of the coding block based on the target coding cost of the coding block.

[0010] In one possible implementation, the system further includes: a storage module; the quantization parameter determination module is used to send the quantization parameters of each coded block in each video frame of the i-th second video frame sequence to the storage module for storage.

[0011] In one possible implementation, the quantization parameter determination module is specifically used to: for any coded block within any video frame in the i-th first video frame sequence, if the inter-frame coding cost of the coded block is less than the intra-frame coding cost of the coded block, determine the genetic information and inheritance information of the coded block based on the inter-frame reference relationship of the coded block, wherein the genetic information of the coded block is used to indicate the information passed from the coded block to other coded blocks, and the inheritance information of the coded block is used to indicate the information passed from other coded blocks to the coded block; and determine the target coding cost of the coded block based on the genetic information and inheritance information of the coded block.

[0012] In one possible implementation, the quantization parameter determination module is specifically configured to: for any video frame in the i-th first video frame sequence, determine the reference video frame and the referenced video frame based on the inter-frame reference relationship of the video frame; for any coded block in the video frame, determine the reference coded block in the corresponding reference video frame and the referenced coded block in the corresponding referenced video frame based on the motion reference information of the coded block; determine the inheritance information of the coded block relative to the corresponding reference coded block and the genetic information of the coded block relative to the corresponding reference coded block according to the inter-frame coding cost and intra-frame coding cost of the coded block; and sum the genetic information and inheritance information of the coded block to determine the target coding cost of the coded block.

[0013] In one possible implementation, the quantization parameter determination module is specifically used to: for any coding block within any video frame in the i-th first video frame sequence, if the inter-frame coding cost of the coding block is greater than or equal to the intra-frame coding cost of the coding block, determine the target coding cost of the coding block based on the intra-frame coding cost of the coding block.

[0014] In one possible implementation, when the video encoding engine starts executing the first encoding process for the i-th first video frame sequence, the video encoding configuration program starts executing the configuration of the (i+1)-th first video frame sequence.

[0015] In one possible implementation, when the video encoding engine starts executing the second encoding process for the i-th second video frame sequence, the quantization parameter determination module starts executing to determine the quantization parameters for the (i+1)-th second video frame sequence.

[0016] According to one aspect of this disclosure, a video encoding method is provided, comprising: configuring an i-th first video frame sequence based on a video encoding configuration program, wherein i is a positive integer greater than or equal to 1; performing a first encoding process on the i-th first video frame sequence based on a video encoding engine to determine the encoding cost parameters of the i-th first video frame sequence; determining quantization parameters of an i-th second video frame sequence based on a quantization parameter determination module using the encoding cost parameters of the i-th first video frame sequence, wherein the i-th second video frame sequence consists of the first N video frames of the M video frames included in the i-th first video frame sequence, where M and N are positive integers, and M is greater than N; and performing a second encoding process on the i-th second video frame sequence based on the video encoding engine using the quantization parameters of the i-th second video frame sequence to obtain the encoding result of the i-th second video frame sequence.

[0017] According to one aspect of this disclosure, an electronic device is provided, the electronic device including the above-described system.

[0018] According to one aspect of this disclosure, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to perform the method described above.

[0019] According to one aspect of this disclosure, a computer-readable storage medium is provided that stores computer program instructions thereon, which, when executed by a processor, implement the above-described method.

[0020] In this embodiment of the disclosure, the video encoding system includes: a video encoding configuration program, a video encoding engine, and a quantization parameter determination module. The video encoding configuration program configures the i-th first video frame sequence. The video encoding engine performs a first encoding process on the i-th first video frame sequence to determine the encoding cost parameters of the i-th first video frame sequence. The quantization parameter determination module uses the encoding cost parameters of the i-th first video frame sequence to determine the quantization parameters of the first N video frames out of the M video frames included in the i-th first video frame sequence to form the i-th second video frame sequence. The video encoding engine uses the quantization parameters of the i-th second video frame sequence to perform a second encoding process on the i-th second video frame sequence to obtain the encoding result of the i-th second video frame sequence. By performing the first encoding process on the first video frame sequence through the hardware-side video encoding engine, and utilizing the quantization parameter determination module added to the hardware side, the quantization parameters for the first N video frames in the first video frame sequence, which constitute the second video frame sequence, can be determined with high accuracy based on the inter-frame reference relationship of the M video frames included in the first video frame sequence. This allows the hardware-side video encoding engine to effectively perform secondary encoding based on the quantization parameters of the second video frame sequence, thereby effectively improving the video encoding compression performance with less hardware resources.

[0021] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0022] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the specification, serve to illustrate the technical solutions of this disclosure.

[0023] Figure 1 A block diagram of a video encoding system according to an embodiment of the present disclosure is shown.

[0024] Figure 2This diagram illustrates video encoding of an original video according to an embodiment of the present disclosure.

[0025] Figure 3 A flowchart illustrating a video encoding method according to an embodiment of the present disclosure is shown.

[0026] Figure 4 A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation

[0027] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0028] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0029] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0030] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.

[0031] Figure 1 A block diagram of a video encoding system according to an embodiment of the present disclosure is shown. The video encoding system is mounted in an electronic device such as a terminal device or a server. The terminal device can be a user equipment (UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (PDA), handheld device, computing device, in-vehicle device, wearable device, etc.

[0032] like Figure 1As shown, the video encoding system includes: a video encoding configuration program, a video encoding engine, and a quantization parameter determination module; the video encoding configuration program is used to configure the i-th first video frame sequence, where i is a positive integer greater than or equal to 1; the video encoding engine is used to perform a first encoding process on the i-th first video frame sequence to determine the encoding cost parameters of the i-th first video frame sequence; the quantization parameter determination module is used to determine the quantization parameters of the i-th second video frame sequence using the encoding cost parameters of the i-th first video frame sequence, where the i-th second video frame sequence consists of the first N video frames out of the M video frames included in the i-th first video frame sequence, where M and N are positive integers, and M is greater than N; the video encoding engine is used to perform a second encoding process on the i-th second video frame sequence using the quantization parameters of the i-th second video frame sequence to obtain the encoding result of the i-th second video frame sequence.

[0033] The video encoding configuration program is implemented on the software side, while the video encoding engine and quantization parameter determination module are implemented on the hardware side.

[0034] The video encoding system of this disclosure performs a first encoding process on a first video frame sequence through a hardware-side video encoding engine, and utilizes a quantization parameter determination module added to the hardware side. Based on the inter-frame reference relationship of the M video frames included in the first video frame sequence, it can determine highly accurate quantization parameters for the first N video frames in the first video frame sequence to form a second video frame sequence. This allows the hardware-side video encoding engine to effectively perform secondary encoding based on the quantization parameters of the second video frame sequence, thereby effectively improving video encoding compression performance with fewer hardware resources.

[0035] In one example, the i-th first video frame sequence can be a forward encoding queue. During video encoding, the unencoded raw video frames may first be sent to a queue, waiting to be encoded by the video encoding engine. This queue can be arranged according to the playback order of the video frames (i.e., chronological order) to ensure that the order of the encoded video frames is consistent with the original video. Such a queue can be called a forward encoding queue.

[0036] In one example, the number M of video frames in each first video frame sequence can be set based on actual user configuration requirements. A larger number of video frames M in the first video frame sequence results in more accurate determination of inter-frame reference relationships, but also slower calculation. Therefore, considering both accuracy and computational complexity requirements, the number M of video frames in the video frame sequence is determined.

[0037] In one example, the number N of video frames in each second video frame sequence can be set based on the actual encoding scenario. The smaller the number N of video frames in the second video frame sequence, the faster the encoding speed.

[0038] In one example, when the number of video frames in the second video frame sequence is N, in order to accurately utilize the inter-frame referencing relationships between larger video frame sequences to determine the quantization parameters of the second video frame sequence, the number M of video frames in the first video frame sequence can be set to a positive integer greater than N. In actual encoding scenarios, for ease of calculation, M can be set to an integer multiple of N, such as 2N, 3N, etc. The specific values ​​of M and N can be flexibly set according to actual needs, and this disclosure does not impose specific limitations on them.

[0039] For example, M=8, N=4. The video encoding system updates the configuration of the first video frame sequence and performs the first encoding process in units of 8 video frames each time, and performs the second encoding process in units of 4 video frames each time. At this point, the i=1th first video frame sequence includes the 1st to M=8th video frames in the original video, and the i=1st second video frame sequence includes the 1st to N=4th video frames in the original video; the i=2nd first video frame sequence includes the N+1=5th to M+N=12th video frames in the original video, and the i=2nd second video frame sequence includes the N+1=5th to 2N=8th video frames in the original video; the i=3rd first video frame sequence includes the 2N+1=9th to M+2N=16th video frames in the original video, and the i=3rd second video frame sequence includes the 2N+1=9th to 3N=12th video frames in the original video; the i=4th first video frame sequence includes the 3N+1=13th to M+3N=20th video frames in the original video, and the i=4th second video frame sequence includes the 3N+1=13th to 4N=16th video frames in the original video; and so on, without further explanation.

[0040] In one example, the video encoding format of the i-th first video frame sequence can be set based on actual user configuration requirements. The video encoding format can be a common format, such as HEVC, AVC, etc., and this disclosure does not specifically limit this choice.

[0041] In one possible implementation, the video encoding configuration program is specifically used to: determine the frame type of each video frame in the i-th first video frame sequence, wherein the frame type of each video frame in the i-th first video frame sequence is used to indicate the inter-frame reference relationship of each video frame in the i-th first video frame sequence.

[0042] Based on the temporal and spatial relationships of each video frame in the i-th first video frame sequence, the frame type of each video frame in the i-th first video frame sequence is determined. The frame types include: I-frame, P-frame, and B-frame.

[0043] In video coding, the referencing relationships between I-frames, P-frames, and B-frames form the basis of video compression. I-frames are keyframes; they are compressed through intra-frame coding, independent of other frames, and can be encoded and decoded independently. P-frames are forward predictive coded frames, encoded using inter-frame coding, and have inter-frame referencing relationships with previously encoded I-frames or P-frames. B-frames are bi-directional predictive coded frames; they consider inter-frame referencing relationships not only with previously encoded I-frames or P-frames but also with subsequently encoded I-frames or P-frames.

[0044] After configuring the i-th first video frame sequence, the video encoding configuration program sends the encoding parameters of the i-th first video frame sequence to the video encoding engine, including: the frame type, video encoding format, downsampling parameters, etc. of each video frame in the i-th first video frame sequence.

[0045] The ability to flexibly configure the number of video frames and the video encoding format in the first video frame sequence expands the encoding capabilities of the video encoding system.

[0046] In one possible implementation, the video coding engine is specifically used to: perform downsampling processing on the i-th first video frame sequence; for any video frame in the downsampled i-th first video frame sequence, perform a first encoding process on the video frame to determine the encoding cost parameters of the video frame, wherein the encoding cost parameters of the video frame include the intra-frame encoding cost and inter-frame encoding cost of each coding block within the video frame;

[0047] The video coding engine performs a first encoding process on the i-th first video frame sequence based on the encoding parameters of the i-th first video frame sequence. To reduce computational load, the encoded data during this first encoding process is not the original video frames included in the i-th first video frame sequence, but rather low-resolution video frames resulting from downsampling based on downsampling parameters. For example, the encoding parameters for the i-th first video frame sequence include: the width and height of the low-resolution video frames corresponding to the first encoding process are half the width and height of the original video frames. In other words, the video coding engine downsamples the i-th first video frame sequence, halving the width and height of each original video frame in the i-th first video frame sequence.

[0048] For any video frame in the i-th first video frame sequence after downsampling, a first encoding process is performed on that video frame. This first encoding process does not involve actual entropy coding; instead, intra-frame coding and inter-frame coding are performed on each coding block within each video frame in the i-th first video frame sequence to determine the coding cost parameters for the i-th first video frame sequence. The size of the coding block can be flexibly set according to actual coding requirements; for example, the coding block size can be 16×16. This disclosure does not impose a specific limitation on this.

[0049] In one possible viewing method, the video encoding system further includes: a storage module; and a video encoding engine for sending the encoding cost parameters of the i-th first video frame sequence to the storage module for storage.

[0050] After the video encoding engine completes the first encoding process for the i-th first video frame sequence, it sends the encoding cost parameters of the i-th first video frame sequence to the storage module for storage, so that the subsequent quantization parameter determination module can use it to determine the quantization parameters of the i-th second video frame sequence.

[0051] In one example, the storage module can be DDR memory, or other types of storage modules can be set according to actual needs. This disclosure does not make any specific limitations in this regard.

[0052] In one possible implementation, the coding cost parameter of the i-th first video frame sequence includes the coding cost parameter of each video frame in the i-th first video frame sequence, and the coding cost parameter of each video frame in the i-th first video frame sequence includes the intra-frame coding cost and inter-frame coding cost of each coding block within that video frame.

[0053] Since the first encoding process for the i-th first video frame sequence involves performing intra-frame coding and inter-frame coding on each coding block within each video frame of the i-th first video frame sequence, after the first encoding process for the i-th first video frame sequence, the intra-frame coding cost and inter-frame coding cost of each coding block within each video frame of the i-th first video frame sequence can be obtained, and the intra-frame coding cost and inter-frame coding cost of each coding block within each video frame of the i-th first video frame sequence can be sent to the storage module for storage.

[0054] For example, during the first encoding process of the i=1th first video frame sequence (including the 1st to Mth video frames in the original video): First, the process begins by determining the intra-frame coding cost and inter-frame coding cost of each coding block within the first video frame, and then sending these costs to the storage module for storage. Next, the process continues by determining the intra-frame coding cost and inter-frame coding cost of each coding block within the second video frame, and then sending these costs to the storage module for storage. This process is repeated until the intra-frame coding cost and inter-frame coding cost of each coding block within each video frame of the i=1th video frame sequence are determined and stored, thus completing the first encoding process for the i=1th video frame sequence. The process of the video encoding engine performing the first encoding process on any first video frame sequence can refer to the above process and will not be elaborated further. Furthermore, for video frames that are repeated in different first video frame sequences, the first encoding process can be performed only once, ensuring that the encoding cost parameters of these repeated video frames are stored in the storage module.

[0055] For example, the i=1th first video frame sequence includes the 1st to 8th video frames in the original video, the i=2nd first video frame sequence includes the 5th to 12th video frames in the original video, the i=3rd first video frame sequence includes the 9th to 16th video frames in the original video, and the i=4th first video frame sequence includes the 13th to 20th video frames in the original video. When performing the first encoding process on the i=1st first video frame sequence, the encoding cost parameters for the 1st to 8th video frames are determined and sent to the storage module for storage. When performing the first encoding process on the i=2nd first video frame sequence, the encoding cost parameters for the 9th to 12th video frames are determined and sent to the storage module. At this time, the storage module stores the encoding cost parameters for the 5th to 12th video frames included in the i=2nd first video frame sequence. The first encoding process is then performed on the i=3rd first video frame sequence. When performing the first encoding process on the i=3rd first video frame sequence, the encoding cost parameters for the 13th to 16th video frames are determined and sent to the storage module. At this time, the storage module stores the encoding cost parameters for the 9th to 16th video frames included in the i=3rd first video frame sequence. When performing the first encoding process on the i=4th first video frame sequence, the encoding cost parameters for the 17th to 20th video frames are determined and sent to the storage module. At this time, the storage module stores the encoding cost parameters for the 13th to 20th video frames included in the i=4th first video frame sequence. And so on, without further elaboration.

[0056] In one possible implementation, the quantization parameter determination module is specifically used to: for any coded block within any video frame in the i-th first video frame sequence, determine the target coding cost of the coded block based on the inter-frame coding cost and intra-frame coding cost of the coded block; and for any coded block within any video frame in the i-th second video frame sequence, determine the quantization parameters of the coded block based on the target coding cost of the coded block.

[0057] The quantization parameter determination module reads the encoding cost parameters of each video frame in the i-th first video frame sequence from the storage module, and then determines the quantization parameters of the i-th second video frame sequence based on the encoding cost parameters of each video frame in the i-th first video frame sequence.

[0058] In one example, after the quantization parameter determination module reads the encoding cost parameters of each video frame in the i-th first video frame sequence from the storage module, in order to save storage space, when the subsequent video encoding engine sends the encoding cost parameters of each video frame in the (i+1)-th video frame sequence to the storage module, it can overwrite the encoding cost parameters of each video frame in the i-th second video frame sequence already stored in the storage module.

[0059] For example, the i=1th first video frame sequence includes the 1st to 8th video frames in the original video, and the i=1th second video frame sequence includes the 1st to 4th video frames in the original video; the i=2nd first video frame sequence includes the 5th to 12th video frames in the original video, and the i=2nd second video frame sequence includes the 5th to 8th video frames in the original video. After performing the first encoding process on the i=1th first video frame sequence, the encoding cost parameters of the 1st to 8th video frames are sent to the storage module for storage. After the quantization parameter determination module reads the encoding cost parameters of the 1st to 8th video frames included in the i=1th first video frame sequence from the storage module, the encoding cost parameters of the 1st to 4th video frames can be deleted from the storage module. This ensures that after performing the first encoding process on the i=2nd first video frame sequence, the encoding cost parameters of the 9th to 12th video frames are sent to the storage module for storage. At this time, the storage module stores the encoding cost parameters of the 5th to 12th video frames included in the i=2nd first video frame sequence. And so on, without going into further detail.

[0060] In one example, based on the inter-frame reference relationship, since the encoding information of the last video frame in the i-th first video frame sequence depends on the information of the previously encoded frames, the quantization parameter determination module determines the target encoding cost of the intra-video frame coding block starting from the last video frame of the i-th first video frame sequence.

[0061] For example, if the i=1th first video frame sequence includes the 1st to 8th video frames of the original video frames, then the target coding cost is determined starting from the first coding block of the 8th video frame until the target coding cost of each coding block in each video frame of the i=1th first video frame sequence is determined.

[0062] By determining the target coding cost of each coding block within each video frame in the i-th first video frame sequence, the quantization parameters of each coding block within each video frame in the i-th second video frame sequence can be further determined.

[0063] In one possible implementation, a quantization parameter determination module is used to send the quantization parameters of each coded block in each video frame of the i-th second video frame sequence to the storage module for storage.

[0064] After the quantization parameter determination module determines the quantization parameters of each coding block in each video frame of the i-th second video frame sequence, it sends the quantization parameters of each coding block in each video frame of the i-th second video frame sequence to the storage module for storage, so that the video encoding engine can use them when performing the second encoding process on the i-th second video frame sequence.

[0065] In one possible implementation, the quantization parameter determination module is specifically used to: for any coded block within any video frame in the i-th first video frame sequence, if the inter-frame coding cost of the coded block is less than the intra-frame coding cost of the coded block, determine the genetic information and inheritance information of the coded block based on the inter-frame reference relationship of the coded block, wherein the genetic information of the coded block is used to indicate the information passed from the coded block to other coded blocks, and the inheritance information of the coded block is used to indicate the information passed from other coded blocks to the coded block; and determine the target coding cost of the coded block based on the genetic information and inheritance information of the coded block.

[0066] For any coded block within any video frame in the i-th first video frame sequence, if the inter-frame coding cost of the coded block is less than the intra-frame coding cost, it means that the coding information of the coded block will be affected by other coded blocks. In this case, based on the inter-frame reference relationship of the coded block, the inheritance information and genetic information of the coded block pair are determined.

[0067] In one possible implementation, the quantization parameter determination module is specifically used for: for any video frame in the i-th first video frame sequence, determining the reference video frame and the referenced video frame based on the inter-frame reference relationship of the video frame; for any coded block in the video frame, determining the reference coded block in the corresponding reference video frame and the referenced coded block in the corresponding referenced video frame based on the motion reference information of the coded block; determining the inheritance information of the coded block relative to the corresponding reference coded block and the genetic information of the coded block relative to the corresponding reference coded block according to the inter-frame coding cost and intra-frame coding cost of the coded block; and summing the genetic information and inheritance information of the coded block to determine the target coding cost of the coded block.

[0068] For any video frame in the i-th first video frame sequence, the reference video frame and the referenced video frame can be determined based on the inter-frame reference relationship of the video frame. Furthermore, when the inter-frame coding cost of any coding block within the video frame is less than the intra-frame coding cost, the reference coding block of the coding block in the corresponding reference video frame and the referenced coding block of the coding block in the corresponding referenced video frame can be determined based on the motion reference information of the coding block. Thus, the inheritance information of the coding block relative to the corresponding reference coding block and the genetic information of the coding block relative to the corresponding referenced coding block can be determined.

[0069] For example, the i-th first video frame sequence includes video frames 1 to M. The reference coding block for the i-th coding block in the M-th video frame (hereinafter referred to as M-frame I block) is the P-th coding block in the (M-1)-th video frame (hereinafter referred to as M-1-frame P block). Based on the inter-frame coding cost and intra-frame coding cost of M-frame I block, the inherited information of M-frame I block from M-1-frame P block is determined to be A, that is, the genetic information of M-1-frame P block from M-frame I block is A. Since the M-th video frame is the last video frame in the i-th first video frame sequence, that is, there is no reference coding block for M-frame I block, the genetic information of M-frame I block is 0. The genetic information 0 and the inherited information A of M-frame I block are summed to determine the target coding cost of M-frame I block as A. The reference coding block for the J-th coding block in the M-th video frame (hereinafter referred to as M-frame J block) is the Q-th coding block in the (M-1)-th video frame (hereinafter referred to as M-1-frame Q block). Based on the inter-frame coding cost and intra-frame coding cost of M-frame J block, the inherited information of M-frame J block from M-1-frame Q block is determined to be D, that is, the genetic information of M-1-frame Q block from M-frame J block is D. Since the M-th video frame is the last video frame in the i-th first video frame sequence, that is, there is no reference coding block for M-frame J block, the genetic information of M-frame J block is 0. The genetic information 0 and the inherited information D of M-frame J block are summed to determine the target coding cost of M-frame J block as D.

[0070] The reference coding block for block P of frame M-1 is the S-th coding block in the first video frame (hereinafter referred to as block S of frame 1). Based on the inter-frame coding cost and intra-frame coding cost of block P of frame M-1, the inherited information of block P of frame M-1 from block S of frame 1 is determined to be B, that is, the genetic information of block S of frame M-1 from block P of frame M-1 is B. Summing the genetic information A and the inherited information B of block P of frame M-1, the target coding cost of block P of frame M-1 is determined to be A+B. The reference coding block for block Q of frame M-1 is also block S of frame 1. Based on the inter-frame coding cost and intra-frame coding cost of block Q of frame M-1, the inherited information of block Q of frame M-1 from block S of frame 1 is determined to be C, that is, the genetic information of block S of frame M-1 from block Q of frame M-1 is C. Summing the genetic information D and the inherited information C of block Q of frame M-1, the target coding cost of block Q of frame M-1 is determined to be C+D.

[0071] Since the first video frame does not have a reference coding block, that is, the inherited information of the S block of the first frame is 0, the genetic information B+C of the S block of the first frame is summed with the inherited information 0, and the target coding cost of the S block of the first frame is determined to be B+C.

[0072] By analogy, the target coding cost of each coding block within each video frame in the i-th first video frame sequence can be determined. The specific method for determining inherited information based on inter-frame coding cost and intra-frame coding cost can be found in relevant technologies, and this disclosure does not impose specific limitations on it.

[0073] In one possible implementation, the quantization parameter determination module is specifically used to: for any coded block within any video frame in the i-th first video frame sequence, if the inter-frame coding cost of the coded block is greater than or equal to the intra-frame coding cost of the coded block, determine the target coding cost of the coded block based on the intra-frame coding cost of the coded block.

[0074] For any coded block within any video frame in the i-th first video frame sequence, if the inter-frame coding cost of the coded block is greater than or equal to the intra-frame coding cost, it means that the coding information of the coded block comes from the intra-frame information. In this case, the intra-frame coding cost of the coded block can be determined as the target coding cost of the coded block.

[0075] After determining the target coding cost of each coding block within each video frame in the i-th first video frame sequence, since the i-th second video frame sequence is composed of the first N video frames out of the M video frames included in the i-th first video frame sequence, the quantization parameters of the coding block can be determined based on the target coding cost of each coding block within the first N video frames in the i-th first video frame sequence, that is, based on the target coding cost of each coding block within each video frame in the i-th second video frame sequence.

[0076] If a coded block receives more reference information from other coded blocks, it is considered to belong to a slowly changing scene. Since the human eye is more sensitive to slowly changing scenes, the quantization parameter of the coded block needs to be lowered. The lower the quantization parameter, the less image quality loss, and the higher the bitrate of the coded block. If a coded block receives less reference information from other coded blocks, it is considered to belong to a rapidly changing scene. Since the human eye is not sensitive to rapidly changing scenes, even reducing the image quality of rapidly changing scenes will not affect the viewing experience. Therefore, the quantization parameter of the coded block can be increased, allocating less bitrate value. By weakening these high-frequency information that are not easily perceived by the human eye, bitrate can be saved, video file size can be reduced, and video compression quality can be improved.

[0077] For any given coding block, the target coding cost reflects the weight with which other coding blocks reference the coded information of that block. A higher target coding cost indicates slower scene changes within the block, requiring a smaller quantization parameter; conversely, a lower target coding cost indicates faster scene changes, requiring a larger quantization parameter. In this way, adjusting the quantization parameter of a coding block within a single video frame effectively improves the coding quality of all other video frames that reference that frame, thus significantly enhancing overall video coding quality.

[0078] After the quantization parameter determination module determines the quantization parameters of each coding block in each video frame of the i-th second video frame sequence, it sends the quantization parameters of each coding block in each video frame of the i-th second video frame sequence to the storage module for storage, so that the video encoding engine can perform a second encoding process on the i-th second video frame sequence in the future.

[0079] In one example, when the quantization parameter determination module sends the quantization parameters of each coding block in each video frame of the i-th second video frame sequence to the storage module for storage, and the video encoding engine has already completed the first encoding process for the (i+1)-th first video frame sequence, the video encoding engine starts to execute the second encoding process for the i-th second video frame sequence.

[0080] The video encoding engine reads the quantization parameters of each coding block within each video frame in the i-th second video frame sequence from the storage module, and performs a second encoding process, namely entropy encoding, on each coding block based on the quantization parameters of each coding block within each video frame in the i-th second video frame sequence, and outputs the encoding result of each video frame in the i-th second video frame sequence.

[0081] In one possible implementation, when the video encoding engine starts performing the first encoding process on the i-th first video frame sequence, the video encoding configuration program starts performing the configuration of the (i+1)-th first video frame sequence.

[0082] After the video encoding configuration program configures the i-th first video frame sequence and sends the encoding parameters of the i-th first video frame sequence to the video encoding engine, the video encoding engine starts to execute the first encoding process of the i-th first video frame sequence. At this time, the video encoding configuration program can simultaneously start to execute the configuration of the (i+1)-th first video frame sequence without waiting for the final encoding of the i-th first video frame sequence to be completed and the encoding result to be determined before starting to execute the configuration of the (i+1)-th first video frame sequence. This achieves efficient operation of hardware and software collaboration and improves video encoding efficiency.

[0083] In one possible implementation, when the video encoding engine starts executing the second encoding process for the i-th second video frame sequence, the quantization parameter determination module starts executing to determine the quantization parameters for the (i+1)-th second video frame sequence.

[0084] When the video encoding engine starts executing the second encoding process for the i-th second video frame sequence, the quantization parameter determination module can simultaneously start executing the determination of the quantization parameters for the (i+1)-th second video frame sequence, in order to prepare for the subsequent second encoding process for the (i+1)-th second video frame sequence and improve video encoding efficiency.

[0085] Figure 2 This diagram illustrates video encoding of an original video according to an embodiment of the present disclosure. N = 4, and M is a positive integer greater than 4. For example... Figure 2 As shown, the video encoding configuration program configures the first video frame sequence (the first to M video frames in the original video). After configuring the first video frame sequence and sending the encoding parameters of the first video frame sequence to the video encoding engine, the video encoding engine starts to perform the first encoding process on the first to M video frames. At this time, the video encoding configuration program can simultaneously start to configure the second video frame sequence (since the N+1 = 5 to M video frames in the original video have already been configured, only the M+1 to M+N = M+4 video frames need to be configured).

[0086] In one example, after the video encoding engine completes the first encoding process for the i-th first video frame sequence, the quantization parameter determination module starts the process of determining the quantization parameters for the i-th second video frame sequence based on the encoding cost parameters of the i-th first video frame sequence.

[0087] like Figure 2As shown, after the video encoding engine completes the first encoding process for the first to M video frames, the quantization parameter determination module starts determining the quantization parameters for the first second video frame sequence (the first to M video frames in the original video) based on the encoding cost parameters of the first first video frame sequence. At this time, since the quantization parameters for the first second video frame sequence are not yet determined, the video encoding engine cannot perform the second encoding process for the first second video frame sequence. If the video encoding configuration program has already configured the second first video frame sequence (since the N+1 = 5 to M video frames in the original video have already been configured, only the M+1 to M+N = M+4 video frames in the original video need to be configured), then it sends the encoding parameters for the M+1 to M+4 video frames to the video encoding engine, so that the video encoding engine can start performing the first encoding process for the M+1 to M+4 video frames, thereby effectively improving the utilization rate of the video encoding engine.

[0088] In one example, after the quantization parameter determination module determines the quantization parameters of the i-th second video frame sequence, the video encoding engine starts to perform the second encoding process on the i-th second video frame sequence.

[0089] like Figure 2 As shown, after the quantization parameter determination module completes the determination of the quantization parameters for the first second video frame sequence (the first to fourth video frames in the original video), the video encoding engine starts the second encoding process for the first to fourth video frames. At this time, if the video encoding engine has already completed the first encoding process for the (M+1)th to (M+4)th video frames in the original video, the quantization parameter determination module can start the determination of the quantization parameters for the second second video frame sequence (the (N+1)th to (M+4)th video frames in the original video) based on the encoding cost parameters of the second first video frame sequence (the (N+1)th to (2N)th video frames in the original video).

[0090] After the video encoding engine completes the second encoding process for the first second video frame sequence (the first to fourth video frames in the original video), if the video encoding configuration program has already configured the third first video frame sequence (since the second N+1 = 9 to M+N = M+4 video frames in the original video have already been configured, only the M+N+1 = M+5 to M+2N = M+8 video frames in the original video need to be configured), it sends the encoding parameters for the M+5 to M+8 video frames to the video encoding engine, so that the video encoding engine can start executing the first encoding process for the M+5 to M+8 video frames.

[0091] After the video encoding engine completes the first encoding process for the (M+5)th to (M+8)th video frames, since the quantization parameter determination module has already determined the quantization parameters for the second video frame sequence (the 5th to 8th video frames in the original video), the video encoding engine can start executing the second video encoding for the second second video frame sequence (the 5th to 8th video frames in the original video). The quantization parameter determination module can also synchronously start executing the determination of the quantization parameters for the third second video frame sequence (the 9th to 12th video frames in the original video) based on the encoding cost parameters of the third first video frame sequence (the 2N+1=9th to M+2N=M+8th video frames in the original video).

[0092] After the video encoding engine completes the second encoding process for the second video frame sequence (the 5th to 8th video frames in the original video), if the video encoding configuration program has already configured the fourth first video frame sequence (since the 3N+1=13 to M+2N=M+8 video frames in the original video have already been configured, only the M+2N+1=M+9 to M+3N=M+12 video frames in the original video need to be configured), it sends the encoding parameters for the M+9 to M+12 video frames to the video encoding engine, so that the video encoding engine can start executing the first encoding process for the M+9 to M+12 video frames.

[0093] After the video encoding engine completes the first encoding process for video frames M+9 to M+12, since the quantization parameter determination module has already determined the quantization parameters for the third second video frame sequence (video frames 9 to 12 in the original video), the video encoding engine can start executing the second video encoding for video frames 9 to 12. At this time, the quantization parameter determination module can synchronously start executing the determination of the quantization parameters for the fourth second video frame sequence (video frames 13 to 16 in the original video) based on the encoding cost parameters of the fourth first video frame sequence (video frames 3N+1=13 to M+3N=M+12 in the original video).

[0094] The video encoding process for other video frame sequences follows the same logic and will not be elaborated here. During the video frame sequence configuration process in the software layer, the video encoding engine and quantization parameter determination module in the hardware layer simultaneously perform the first encoding process, quantization parameter determination, and the second encoding process. Through the efficient collaborative operation of the software and hardware layers, the encoding capability of the video encoding system can be effectively improved.

[0095] Furthermore, the hardware-based video encoding engine and quantization parameter determination module complete the determination of quantization parameters and the secondary encoding of the video frame sequence. Compared with the existing technology that determines quantization parameters based on the software-based CPU and performs primary encoding based on the hardware, this reduces the computation time consumed by determining quantization parameters on the software side, consumes less CPU system resources, and improves the encoding performance of the video encoding system.

[0096] In this embodiment of the disclosure, the video encoding system includes: a video encoding configuration program, a video encoding engine, and a quantization parameter determination module. The video encoding configuration program configures the i-th first video frame sequence. The video encoding engine performs a first encoding process on the i-th first video frame sequence to determine the encoding cost parameters of the i-th first video frame sequence. The quantization parameter determination module uses the encoding cost parameters of the i-th first video frame sequence to determine the quantization parameters of the first N video frames out of the M video frames included in the i-th first video frame sequence to form the i-th second video frame sequence. The video encoding engine uses the quantization parameters of the i-th second video frame sequence to perform a second encoding process on the i-th second video frame sequence to obtain the encoding result of the i-th second video frame sequence. By performing the first encoding process on the first video frame sequence through the hardware-side video encoding engine, and utilizing the quantization parameter determination module added to the hardware side, the quantization parameters for the first N video frames in the first video frame sequence, which constitute the second video frame sequence, can be determined with high accuracy based on the inter-frame reference relationship of the M video frames included in the first video frame sequence. This allows the hardware-side video encoding engine to effectively perform secondary encoding based on the quantization parameters of the second video frame sequence, thereby effectively improving the video encoding compression performance with less hardware resources.

[0097] Figure 3 A flowchart illustrating a video encoding method according to an embodiment of the present disclosure is shown. This video encoding / decoding method can be executed by the aforementioned video encoding system. Figure 3 As shown, the video encoding method includes:

[0098] In step S31, the i-th first video frame sequence is configured based on the video encoding configuration program, where i is a positive integer greater than or equal to 1;

[0099] In step S32, based on the video coding engine, the first encoding process is performed on the i-th first video frame sequence to determine the encoding cost parameters of the i-th first video frame sequence;

[0100] In step S33, based on the quantization parameter determination module, the quantization parameters of the i-th second video frame sequence are determined using the encoding cost parameters of the i-th first video frame sequence. The i-th second video frame sequence is composed of the first N video frames among the M video frames included in the i-th first video frame sequence, where M and N are positive integers and M is greater than N.

[0101] In step S31, based on the video coding engine, the quantization parameters of the i-th second video frame sequence are used to perform a second encoding process on the i-th second video frame sequence to obtain the encoding result of the i-th second video frame sequence.

[0102] In one possible implementation, the i-th first video frame sequence is configured based on a video encoding configuration procedure, including: determining the frame type of each video frame in the i-th first video frame sequence, wherein the frame type of each video frame in the i-th first video frame sequence is used to indicate the inter-frame reference relationship of each video frame in the i-th first video frame sequence.

[0103] In one possible implementation, based on a video coding engine, the first encoding process is performed on the i-th first video frame sequence to determine the encoding cost parameters of the i-th first video frame sequence, including: performing downsampling processing on the i-th first video frame sequence; and for any video frame in the downsampled i-th first video frame sequence, performing the first encoding process on that video frame to determine the encoding cost parameters of that video frame.

[0104] In one possible implementation, the method further includes: based on the video coding engine, sending the coding cost parameters of the i-th first video frame sequence to the storage module for storage.

[0105] In one possible implementation, the coding cost parameter of the i-th first video frame sequence includes the coding cost parameter of each video frame in the i-th first video frame sequence, and the coding cost parameter of each video frame in the i-th first video frame sequence includes the intra-frame coding cost and inter-frame coding cost of each coding block within that video frame.

[0106] In one possible implementation, the quantization parameter determination module determines the quantization parameters of the i-th second video frame sequence using the coding cost parameters of the i-th first video frame sequence. This includes: for any coding block within any video frame of the i-th first video frame sequence, determining the target coding cost of the coding block based on the inter-frame coding cost and intra-frame coding cost of the coding block; and for any coding block within any video frame of the i-th second video frame sequence, determining the quantization parameters of the coding block based on the target coding cost of the coding block.

[0107] In one possible implementation, the method further includes: based on the quantization parameter determination module, sending the quantization parameters of each coding block in each video frame of the i-th second video frame sequence to the storage module for storage.

[0108] In one possible implementation, the quantization parameter determination module determines the quantization parameters of the i-th second video frame sequence using the coding cost parameters of the i-th first video frame sequence. This includes: for any coding block within any video frame of the i-th first video frame sequence, if the inter-frame coding cost of the coding block is less than the intra-frame coding cost of the coding block, determining the genetic information and inheritance information of the coding block based on the inter-frame reference relationship of the coding block. The genetic information of the coding block is used to indicate the information passed from the coding block to other coding blocks, and the inheritance information of the coding block is used to indicate the information passed from other coding blocks to the coding block. Based on the genetic information and inheritance information of the coding block, the target coding cost of the coding block is determined.

[0109] In one possible implementation, the quantization parameter determination module determines the quantization parameters of the i-th second video frame sequence using the coding cost parameters of the i-th first video frame sequence. This includes: for any video frame in the i-th first video frame sequence, determining the reference video frame and the referenced video frame based on the inter-frame reference relationship of the video frame; for any coding block in the video frame, determining the reference coding block in the corresponding reference video frame and the referenced coding block in the corresponding referenced video frame based on the motion reference information of the coding block; determining the inheritance information of the coding block relative to the corresponding reference coding block and the genetic information of the coding block relative to the corresponding referenced coding block based on the inter-frame coding cost and intra-frame coding cost of the coding block; and summing the genetic information and inheritance information of the coding block to determine the target coding cost of the coding block.

[0110] In one possible implementation, the quantization parameter determination module determines the quantization parameters of the i-th second video frame sequence using the coding cost parameters of the i-th first video frame sequence, including: for any coding block within any video frame in the i-th first video frame sequence, if the inter-frame coding cost of the coding block is greater than or equal to the intra-frame coding cost of the coding block, determining the target coding cost of the coding block based on the intra-frame coding cost of the coding block.

[0111] In one possible implementation, when the video encoding engine starts executing the first encoding process for the i-th first video frame sequence, the video encoding configuration program starts executing the configuration for the (i+1)-th first video frame sequence.

[0112] In one possible implementation, when the video coding engine starts executing the second encoding process for the i-th second video frame sequence, the quantization parameter determination module starts executing to determine the quantization parameters for the (i+1)-th second video frame sequence.

[0113] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.

[0114] In addition, this disclosure also provides electronic devices, computer-readable storage media, and programs, all of which can be used to implement any of the video encoding methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the relevant section on methods and will not be repeated here.

[0115] This method is specifically technically related to the internal structure of computer systems and can solve technical problems of how to improve hardware computing efficiency or execution performance (including reducing data storage, reducing data transmission, and increasing hardware processing speed), thereby achieving technical effects that improve the internal performance of computer systems in accordance with natural laws.

[0116] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0117] This disclosure also proposes a computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the above-described method. The computer-readable storage medium can be volatile or non-volatile.

[0118] This disclosure also proposes an electronic device, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to invoke the instructions stored in the memory to execute the above-described method.

[0119] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the above-described method.

[0120] Electronic devices can be provided as terminals, servers, or other forms of devices.

[0121] Figure 4A block diagram of an electronic device according to an embodiment of the present disclosure is shown. (Refer to...) Figure 4 The electronic device 1900 can be provided as a server or a terminal device. (See reference...) Figure 4 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.

[0122] Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input / output interface 1958. Electronic device 1900 can operate on an operating system stored in memory 1932, such as Microsoft Server operating system (Windows Server). TM Apple's graphical user interface-based operating system (Mac OS X) TM ), a multi-user, multi-process computer operating system (Unix) TM Linux is a free and open-source Unix-like operating system. TM ), the open-source Unix-like operating system (FreeBSD) TM (or similar.)

[0123] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by a processing component 1922 of an electronic device 1900 to perform the above-described method.

[0124] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.

[0125] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, (but not limited to) electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0126] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0127] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions to implement various aspects of this disclosure.

[0128] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0129] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0130] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0131] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0132] The computer program product can be implemented in hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0133] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0134] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0135] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.

[0136] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A video encoding system, characterized in that, include: Video encoding configuration program, video encoding engine, quantization parameter determination module; The video encoding configuration program is used to configure the i-th first video frame sequence, where i is a positive integer greater than or equal to 1, and the i-th first video frame sequence includes M unencoded raw video frames; The video encoding engine is used to perform a first encoding process on the i-th first video frame sequence based on the inter-frame reference relationship of the video frames in the i-th first video frame sequence, and to determine the encoding cost parameters of the i-th first video frame sequence. The quantization parameter determination module is used to determine the quantization parameters of the i-th second video frame sequence using the encoding cost parameters of the i-th first video frame sequence, wherein the i-th second video frame sequence is composed of the first N video frames among the M video frames included in the i-th first video frame sequence, where M and N are positive integers, and M is greater than N; The video encoding engine is used to perform a second encoding process on the i-th second video frame sequence using the quantization parameters of the i-th second video frame sequence, so as to obtain the encoding result of the i-th second video frame sequence; When the video encoding engine starts executing the first encoding process for the i-th first video frame sequence, the video encoding configuration program starts executing the configuration for the (i+1)-th first video frame sequence. When the video encoding engine starts executing the second encoding process for the i-th second video frame sequence, the quantization parameter determination module starts executing to determine the quantization parameters for the (i+1)-th second video frame sequence.

2. The system according to claim 1, characterized in that, The video encoding configuration program is specifically used for: Determine the frame type of each video frame in the i-th first video frame sequence, wherein the frame type of each video frame in the i-th first video frame sequence is used to indicate the inter-frame reference relationship of each video frame in the i-th first video frame sequence.

3. The system according to claim 1, characterized in that, The video encoding engine is specifically used for: The i-th first video frame sequence is downsampled; For any video frame in the i-th first video frame sequence after downsampling, perform the first encoding process on the video frame to determine the encoding cost parameters of the video frame.

4. The system according to claim 1, characterized in that, The system also includes: a storage module; The video encoding engine is used to send the encoding cost parameters of the i-th first video frame sequence to the storage module for storage.

5. The system according to any one of claims 1 to 4, characterized in that, The coding cost parameters of the i-th first video frame sequence include the coding cost parameters of each video frame in the i-th first video frame sequence, and the coding cost parameters of each video frame in the i-th first video frame sequence include the intra-frame coding cost and inter-frame coding cost of each coding block within that video frame.

6. The system according to claim 5, characterized in that, The quantization parameter determination module is specifically used for: For any coding block within any video frame in the i-th first video frame sequence, the target coding cost of the coding block is determined based on the inter-frame coding cost and intra-frame coding cost of the coding block. For any coded block within any video frame in the i-th second video frame sequence, the quantization parameters of the coded block are determined based on the target coding cost of the coded block.

7. The system according to claim 6, characterized in that, The system also includes: a storage module; The quantization parameter determination module is used to send the quantization parameters of each coding block in each video frame of the i-th second video frame sequence to the storage module for storage.

8. The system according to claim 5, characterized in that, The quantization parameter determination module is specifically used for: For any coded block within any video frame in the i-th first video frame sequence, if the inter-frame coding cost of the coded block is less than the intra-frame coding cost of the coded block, the genetic information and inheritance information of the coded block are determined based on the inter-frame reference relationship of the coded block. The genetic information of the coded block is used to indicate the information passed from the coded block to other coded blocks, and the inheritance information of the coded block is used to indicate the information passed from other coded blocks to the coded block. Based on the genetic and inheritance information of the coding block, the target coding cost of the coding block is determined.

9. The system according to claim 5, characterized in that, The quantization parameter determination module is specifically used for: For any video frame in the i-th first video frame sequence, the reference video frame and the referenced video frame are determined based on the inter-frame reference relationship of the video frame. For any coded block in the video frame, based on the motion reference information of the coded block, determine the reference coded block in the corresponding reference video frame and the reference coded block in the corresponding referenced video frame. Based on the inter-frame coding cost and intra-frame coding cost of the coding block, determine the inheritance information of the coding block relative to the corresponding reference coding block, as well as the genetic information of the coding block relative to the corresponding reference coding block. The genetic and inheritance information of the coding block are summed to determine the target coding cost of the coding block.

10. The system according to claim 5, characterized in that, The quantization parameter determination module is specifically used for: For any coded block within any video frame in the i-th first video frame sequence, if the inter-frame coding cost of the coded block is greater than or equal to the intra-frame coding cost of the coded block, the target coding cost of the coded block is determined based on the intra-frame coding cost of the coded block.

11. A video encoding method, characterized in that, include: Based on the video encoding configuration program, the i-th first video frame sequence is configured, where i is a positive integer greater than or equal to 1, and the i-th first video frame sequence includes M unencoded raw video frames; Based on the video coding engine, according to the inter-frame reference relationship of the video frames in the i-th first video frame sequence, the i-th first video frame sequence is subjected to the first encoding process to determine the encoding cost parameter of the i-th first video frame sequence. Based on the quantization parameter determination module, the quantization parameters of the i-th second video frame sequence are determined using the encoding cost parameters of the i-th first video frame sequence. The i-th second video frame sequence is composed of the first N video frames among the M video frames included in the i-th first video frame sequence, where M and N are positive integers and M is greater than N. Based on the video encoding engine, the quantization parameters of the i-th second video frame sequence are used to perform a second encoding process on the i-th second video frame sequence to obtain the encoding result of the i-th second video frame sequence; When the first encoding process for the i-th first video frame sequence is started and executed based on the video encoding engine, the configuration of the (i+1)-th first video frame sequence is started and executed based on the video encoding configuration program. When the video encoding engine starts executing the second encoding process for the i-th second video frame sequence, the quantization parameter determination module starts executing to determine the quantization parameters for the (i+1)-th second video frame sequence.

12. An electronic device, characterized in that, include: The electronic device includes the system according to any one of claims 1 to 10.

13. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method of claim 11.

14. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method of claim 11.

Citation Information

Patent Citations

  • Video information processing method, system and device and storage medium

    CN117478881A

  • Two pass rate control techniques for video coding using a min-max approach

    US20070064794A1