Video coding system and method, electronic equipment and storage medium

By encoding the first video frame sequence in the video encoding system and determining the encoding cost parameters, and then determining the quantization parameters for the second video frame sequence based on the inter-frame reference relationship, the frame-level fixed quantization parameters in the prior art are solved. The problems of poor video encoding performance and high computational complexity achieve more efficient video encoding compression performance and quality.

CN118972580AActive Publication Date: 2024-11-15MOORE THREADS TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411220726.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-11-15
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

In the existing GPU-based video encoding technology, the frame-level fixed quantization parameters lead to poor video encoding performance and high computational complexity.

Method used

A video encoding system is proposed, through a video encoding configuration program and a video encoding engine, the first encoding process is performed on the first video frame sequence, the encoding cost parameters are determined, and the quantization parameter determination module is used to be the second video frame based on the inter-frame reference relationship. The quantization parameters are determined in the sequence and the second encoding process is performed.

Benefits of technology

It improves the compression performance and efficiency of video encoding, reduces the occupation of hardware resources, and realizes more accurate quantitative parameter determination, thereby improving the quality of video encoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118972580A_ABST
    Figure CN118972580A_ABST
Patent Text Reader

Abstract

The invention relates to a video coding system and method, electronic equipment and a storage medium. The system comprises a video coding configuration program used for configuring an ith first video frame sequence; the video coding engine is used for carrying out first coding processing on the ith first video frame sequence and determining a coding cost parameter of the ith first video frame sequence; the quantization parameter determination module is used for determining a quantization parameter of an ith second video frame sequence by using a coding cost parameter of the ith first video frame sequence, and the ith second video frame sequence is composed of the first N video frames in the M video frames included in the ith first video frame sequence; and the video coding engine is used for carrying out second coding processing on the ith second video frame sequence by utilizing the quantization parameter of the ith second video frame sequence to obtain a coding result of the ith second video frame sequence. According to the embodiment of the invention, the video coding compression performance can be effectively improved based on fewer hardware resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In existing video encoding and decoding technologies based on graphics processing units (GPUs), fixed constants are usually used to initialize quantization parameters, and rate-distortion optimization techniques are used within a video frame to continuously adjust the quantization parameters of the coding blocks within the video frame. Due to the use of frame-level fixed quantization parameters, the compression performance of video encoding is poor and the computational complexity is high. Summary of the invention

[0003] The present disclosure proposes a video encoding system and method, an electronic device, and a technical solution for a storage medium.

[0004] According to one aspect of the present 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 the i-th first video frame sequence, wherein 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 the 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 is composed of the first N video frames of the M video frames included in the i-th first video frame sequence, 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: downsample the i-th first video frame sequence; perform a first encoding process on any one video frame in the i-th first video frame sequence after the downsampling process, and determine the encoding cost parameters of the video frame.

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

[0008] In one possible implementation, the coding cost parameters of the i-th first video frame sequence include 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 intra-frame coding cost and inter-frame coding cost of each coding block in the video frame.

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

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

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

[0012] In a possible implementation, the quantization parameter determination module is specifically used to: for any video frame in the i-th first video frame sequence, determine the reference video frame and the referenced video frame of the video frame based on the inter-frame reference relationship of the video frame; for any coding block in the video frame, determine 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 based on the motion reference information of the coding block; determine 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 according to the inter-frame coding cost and intra-frame coding cost of the coding block; and sum the genetic information and inheritance information of the coding block to determine the target coding cost of the coding block.

[0013] In a possible implementation, the quantization parameter determination module is specifically used to: for any coding block in any video frame in the i-th first video frame sequence, when 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 according to the intra-frame coding cost of the coding block.

[0014] In a possible implementation, when the video encoding engine starts to perform the first encoding process on the i-th first video frame sequence, the video encoding configuration program starts to configure the i+1-th first video frame sequence.

[0015] In a possible implementation, when the video encoding engine starts to perform a second encoding process on the i-th second video frame sequence, the quantization parameter determination module starts to determine the quantization parameter of the (i+1)-th second video frame sequence.

[0016] According to one aspect of the present 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 an encoding cost parameter of the i-th first video frame sequence; determining a quantization parameter of an i-th second video frame sequence based on a quantization parameter determination module using the encoding cost parameter of the i-th first video frame sequence, wherein the i-th second video frame sequence is composed of the first N video frames of the M video frames included in the i-th first video frame sequence, M and N are positive integers, and M is greater than N; performing a second encoding process on the i-th second video frame sequence based on the video encoding engine using the quantization parameter of the i-th second video frame sequence to obtain an encoding result of the i-th second video frame sequence.

[0017] According to one aspect of the present disclosure, an electronic device is provided, the electronic device comprising the above system.

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

[0019] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor.

[0020] In an embodiment of the present disclosure, a 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 i-th second video frame sequence consisting of the first N video frames out of the M video frames included in the i-th first 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 video encoding engine on the hardware side and utilizing the quantization parameter determination module added on the hardware side, a quantization parameter with higher accuracy can be determined for the first N video frames of the M video frames included in the first video frame sequence to constitute a second video frame sequence based on the inter-frame reference relationship of the M video frames included in the first video frame sequence, so that the video encoding engine on the hardware side can effectively implement secondary encoding based on the quantization parameter of the second video frame sequence, thereby effectively improving the video encoding compression performance based on fewer hardware resources.

[0021] It should be understood that the above general description and the following detailed description are exemplary and explanatory only and do not limit the present disclosure. Other features and aspects of the present disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.

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

[0024] Figure 2A schematic diagram showing video encoding of an original video according to an embodiment of the present disclosure is shown.

[0025] Figure 3 A flowchart of 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 DESCRIPTION

[0027] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0028] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0029] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.

[0030] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

[0031] Figure 1 A block diagram of a video coding system according to an embodiment of the present disclosure is shown. The video coding system is mounted in an electronic device such as a terminal device or a server, and the terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a 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, wherein 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 the 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 is composed of the first N video frames of the M video frames included in the i-th first video frame sequence, 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.

[0033] Among them, the video encoding configuration program is implemented by the software side, and the video encoding engine and quantization parameter determination module are implemented by the hardware side.

[0034] By utilizing the video encoding system of the embodiment of the present disclosure, the first encoding process is performed on the first video frame sequence through the video encoding engine on the hardware side, and by utilizing the quantization parameter determination module added on the hardware side, a quantization parameter with higher accuracy can be determined for the first N video frames of the M video frames included in the first video frame sequence to constitute a second video frame sequence based on the inter-frame reference relationship of the M video frames included in the first video frame sequence, so that the video encoding engine on the hardware side can effectively implement secondary encoding based on the quantization parameter of the second video frame sequence, thereby effectively improving the video encoding compression performance based on fewer hardware resources.

[0035] In one example, the i-th first video frame sequence may be a forward encoding queue. During the video encoding process, the unencoded original video frames may first be sent to a queue, waiting to be subsequently encoded by the video encoding engine. This queue may be arranged according to the playback order of the video frames (i.e., time order) to ensure that the order of the encoded video frames is consistent with the original video. Such a queue may 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. The larger the number M of video frames in the first video frame sequence, the more accurate the determination of the inter-frame reference relationship, but the slower the calculation process. Therefore, the number M of video frames in the video frame sequence is determined by comprehensively considering the accuracy requirements and the computational complexity requirements.

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

[0038] In one example, when the number of video frames in the second video frame sequence is N, in order to determine the quantization parameter of the second video frame sequence as accurately as possible by using the inter-frame reference relationship between the larger video frame sequence, the number M of video frames in the first video frame sequence may be set to a positive integer greater than N. In an actual encoding scenario, in order to facilitate calculation, M may be set to an integer multiple of N, such as 2N, 3N, etc. The specific values ​​of M and N may be flexibly set according to actual needs, and the present disclosure does not specifically limit this.

[0039] For example, M = 8, N = 4. The video encoding system updates and configures the first video frame sequence and the first encoding process in units of 8 video frames each time, and performs the second encoding process in units of 4 video frames. At this time, the i=1th first video frame sequence includes the 1st to M=8th video frames in the original video, and the i=1th second video frame sequence includes the 1st to N=4th video frames in the original video; the i=2th first video frame sequence includes the N+1=5th to M+N=12th video frames in the original video, and the i=2th second video frame sequence includes the N+1=5th to 2N=8th video frames in the original video; the i=3th first video frame sequence includes the 2N+1=9th to M+2N=16th video frames in the original video, and the i=3th 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.

[0040] In one example, the video encoding format of the i-th first video frame sequence may be set based on actual user configuration requirements. The video encoding format may adopt a common video encoding format, such as HEVC, AVC, etc., which is not specifically limited in the embodiments of the present disclosure.

[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] According to the temporal relationship and spatial relationship 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, wherein the frame type includes: I frame, P frame, and B frame.

[0043] In video coding, the reference relationship between I-frames, P-frames, and B-frames forms the basis of video compression. I-frames are key frames, which are compressed through intra-frame coding, do not rely on other frames, and can be encoded and decoded independently. P-frames are forward predictive coded frames, which are encoded through inter-frame coding and have an inter-frame reference relationship with previously encoded I-frames or P-frames. B-frames are bidirectional predictive coded frames, which not only consider the inter-frame reference relationship with previously encoded I-frames or P-frames, but also the inter-frame reference relationship with later encoded I-frames or P-frames.

[0044] After configuring the ith first video frame sequence, the video encoding configuration program sends the encoding parameters of the ith 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 ith first video frame sequence.

[0045] Since the number of video frames in the first video frame sequence and the video encoding format can be flexibly configured, the encoding capability of the video encoding system is expanded.

[0046] In one possible implementation, the video encoding engine is specifically used to: downsample the i-th first video frame sequence; for any video frame in the i-th first video frame sequence after the downsampling process, 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 the inter-frame encoding cost of each encoding block in the video frame;.

[0047] The video encoding 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. In order to reduce the amount of calculation, when the video encoding engine performs the first encoding process on the i-th first video frame sequence, the encoded data is not the original video frame included in the i-th first video frame sequence, but a low-resolution video frame after the i-th first video frame sequence is downsampled based on the downsampling parameters. For example, the encoding parameters of the i-th first video frame sequence include: the width and height of the low-resolution video frame corresponding to the first encoding process are half the width and height of the original video frame. In other words, the video encoding engine downsamples the i-th first video frame sequence and reduces the width and height of each original video frame in the i-th first video frame sequence by half.

[0048] For any video frame in the i-th first video frame sequence after downsampling, the video frame is subjected to a first encoding process. The first encoding process does not perform a true entropy encoding process, but only performs intra-frame encoding and inter-frame encoding on each encoding block in each video frame in the i-th first video frame sequence to determine the encoding cost parameter of the i-th first video frame sequence. The size of the encoding block can be flexibly set according to actual encoding requirements. For example, the size of the encoding block is 16×16, which is not specifically limited in the present disclosure.

[0049] In a possible line of sight mode, the video encoding system further includes: a storage module; and a video encoding engine, configured to send the encoding cost parameter 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 of the i-th first video frame sequence, the encoding cost parameter of the i-th first video frame sequence is sent to the storage module for storage, so as to be used when the subsequent quantization parameter determination module determines the quantization parameter of the i-th second video frame sequence.

[0051] In one example, the storage module may be a DDR memory, or other forms of storage modules may be provided according to actual needs, which is not specifically limited in the present disclosure.

[0052] In one possible implementation, 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 the inter-frame coding cost of each coding block in the video frame.

[0053] Since the first encoding process is performed on the i-th first video frame sequence, intra-frame coding and inter-frame coding are performed on each coding block in each video frame in the i-th first video frame sequence. Therefore, after the first encoding process is performed on the i-th first video frame sequence, the intra-frame coding cost and inter-frame coding cost of each coding block in each video frame in 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 in each video frame in the i-th first video frame sequence are sent to the storage module for storage.

[0054] For example, in the process of the video coding engine performing the first coding process on the i=1 first video frame sequence (including the 1st to M video frames in the original video): first, start the execution to determine the intra-frame coding cost and inter-frame coding cost of each coding block in the first video frame, and after the determination is completed, send the intra-frame coding cost and inter-frame coding cost of each coding block in the first video frame to the storage module for storage; then, start the execution to determine the intra-frame coding cost and inter-frame coding cost of each coding block in the second video frame, and after the determination is completed, send the intra-frame coding cost and inter-frame coding cost of each coding block in the second video frame to the storage module for storage; and so on, until the intra-frame coding cost and inter-frame coding cost of each coding block in each video frame in the i=1 video frame sequence are determined and stored and sent to the storage module for storage, completing the first coding process of the i=1 video frame sequence. The process of the video coding engine performing the first coding process on any first video frame sequence can refer to the above process and will not be repeated. In addition, for repeated video frames in different first video frame sequences, the first encoding process may be performed only once, and it is ensured 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=2th first video frame sequence includes the 5th to 12th video frames in the original video, the i=3th 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. At this time, when the first encoding process is performed on the i=1th first video frame sequence, the encoding cost parameters of the 1st to 8th video frames are determined, and the encoding cost parameters of the 1st to 8th video frames are sent to the storage module for storage; when the first encoding process is performed on the i=2th first video frame sequence, the encoding cost parameters of the 9th to 12th video frames are determined, and the encoding cost parameters of the 9th to 12th video frames are sent to the storage module. At this time, the storage module stores the encoding cost parameters of the 5th to 12th video frames included in the i=2th first video frame sequence; the first encoding process is performed on the i=3th first video frame sequence. When performing the first encoding process on the i=4th first video frame sequence, the encoding cost parameters of the 17th to 20th video frames are determined, and the encoding cost parameters of the 17th to 20th video frames are sent to the storage module. At this time, the storage module stores the encoding cost parameters of the 9th to 16th video frames included in the i=3th first video frame sequence; when performing the first encoding process on the i=4th first video frame sequence, the encoding cost parameters of the 17th to 20th video frames are determined, and the encoding cost parameters of the 17th to 20th video frames are sent to the storage module. At this time, the storage module stores the encoding cost parameters of the 13th to 20th video frames included in the i=4th first video frame sequence. And so on, no further description is given.

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

[0057] The quantization parameter determination module reads the encoding cost parameter of each video frame in the i-th first video frame sequence from the storage module, and further determines the quantization parameter of the i-th second video frame sequence based on the encoding cost parameter 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, the encoding cost parameters of each video frame in the i-th second video frame sequence already stored in the storage module can be overwritten.

[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=2th first video frame sequence includes the 5th to 12th video frames in the original video, and the i=2th second video frame sequence includes the 5th to 8th video frames in the original video. At this time, after the i=1th first video frame sequence is subjected to the first encoding process, 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; so that after the i=2th first video frame sequence is subjected to the first encoding process, the encoding cost parameters of the 9th to 12th video frames are sent to the storage module for storage, and at this time, the encoding cost parameters of the 5th to 12th video frames included in the i=2th first video frame sequence are stored in the storage module. And so on, I won’t go into details.

[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 frame, the quantization parameter determination module determines the target encoding cost of the coding block within the video frame starting from the last video frame of the i-th first video frame sequence.

[0061] For example, 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 in the i=1th first video frame sequence is determined.

[0062] After determining the target coding cost of each coding block in each video frame in the i-th first video frame sequence, the quantization parameter of each coding block in each video frame in the i-th second video frame sequence may be further determined.

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

[0064] After the quantization parameter determination module determines the quantization parameter of each coding block in each video frame in the i-th second video frame sequence, the quantization parameter of each coding block in each video frame in the i-th second video frame sequence is sent to the storage module for storage, so as to be used when the subsequent video encoding engine performs a second encoding process on the i-th second video frame sequence.

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

[0066] For any coding block in any video frame in 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, it means that the coding information of the coding block will be affected by other coding blocks. At this time, based on the inter-frame reference relationship of the coding block, the inheritance information and genetic information of the coding block pair are determined.

[0067] In a possible implementation, the quantization parameter determination module is specifically used to: for any video frame in the i-th first video frame sequence, determine the reference video frame and the referenced video frame of the video frame based on the inter-frame reference relationship of the video frame; for any coding block in the video frame, determine 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 based on the motion reference information of the coding block; determine 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 according to the inter-frame coding cost and intra-frame coding cost of the coding block; and sum the genetic information and the inheritance information of the coding block to determine the target coding cost of the coding block.

[0068] For any video frame in the i-th first video frame sequence, the reference video frame and the referenced video frame of the 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 in 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 are determined based on the motion reference information of the coding block, and further, the inheritance information of the coding block relative to the corresponding reference coding block and the inheritance 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 the 1st to M-th video frames. The reference coding block of the I-th coding block in the M-th video frame (hereinafter referred to as the M-frame I block) is the P-th coding block in the M-1-th video frame (hereinafter referred to as the M-1-frame P block). Then, according to the inter-frame coding cost and intra-frame coding cost of the M-frame I block, it is determined that the inheritance information of the M-frame I block to the M-1-frame P block is A, that is, the inheritance information of the M-1-frame P block to the 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 the M-frame I block, the inheritance information of the M-frame I block is 0; the inheritance information 0 and the inheritance information A of the M-frame I block are summed to determine that the target coding cost of the M-frame I block is A. The reference coding block of the Jth coding block in the Mth video frame (hereinafter referred to as the M-frame J block) is the Qth coding block in the M-1th video frame (hereinafter referred to as the M-1 frame Q block). According to the inter-frame coding cost and intra-frame coding cost of the M-frame J block, it is determined that the inheritance information of the M-frame J block to the M-1 frame Q block is D, that is, the inheritance information of the M-1 frame Q block to the M-frame J block is D; since the Mth video frame is the last video frame in the i-th first video frame sequence, that is, there is no reference coding block for the M-frame J block, the inheritance information of the M-frame J block is 0; the inheritance information 0 and the inheritance information D of the M-frame J block are summed to determine that the target coding cost of the M-frame J block is D.

[0070] The reference coding block of the M-1 frame P block is the Sth coding block in the first video frame (hereinafter referred to as 1-frame S block). According to the inter-frame coding cost and intra-frame coding cost of the M-1 frame P block, the inheritance information of the M-1 frame P block to the 1-frame S block is determined to be B, that is, the inheritance information of the 1-frame S block to the M-1 frame P block is B; the inheritance information A and the inheritance information B of the M-1 frame P block are summed to determine the target coding cost of the M-1 frame P block to be A+B. The reference coding block of the M-1 frame Q block is also 1-frame S block. According to the inter-frame coding cost and intra-frame coding cost of the M-1 frame Q block, the inheritance information of the M-1 frame Q block to the 1-frame S block is determined to be C, that is, the inheritance information of the 1-frame S block to the M-1 frame Q block is C; the inheritance information D and the inheritance information C of the M-1 frame Q block are summed to determine the target coding cost of the M-1 frame Q block to be C+D.

[0071] Since there is no reference coding block in the first video frame, that is, the inheritance information of the S block of 1 frame is 0, the inheritance information B+C of the S block of 1 frame and the inheritance information 0 are summed to determine the target coding cost of the S block of 1 frame to be B+C.

[0072] By analogy, the target coding cost of each coding block in each video frame in the i-th first video frame sequence can be determined. The specific method of determining the inheritance information based on the inter-frame coding cost and the intra-frame coding cost can refer to the relevant technology, and the present disclosure does not make specific limitations on this.

[0073] In a possible implementation, the quantization parameter determination module is specifically used to: for any coding block in any video frame in the i-th first video frame sequence, when 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 according to the intra-frame coding cost of the coding block.

[0074] For any coding block in 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, it means that the coding information of the coding block comes from the intra-frame information. At this time, the intra-frame coding cost of the coding block can be determined as the target coding cost of the coding block.

[0075] After determining the target coding cost of each coding block in 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 of the M video frames included in the i-th first video frame sequence, the quantization parameter of the coding block can be determined according to the target coding cost of each coding block in the first N video frames in the i-th first video frame sequence, that is, according to the target coding cost of each coding block in each video frame in the i-th second video frame sequence.

[0076] If a coding block has more information referenced by other coding blocks, it is considered that the coding block belongs to a slowly changing scene. Since the human eye is more sensitive to slowly changing scenes, the quantization parameter of the coding block needs to be lowered. The lower the quantization parameter, the smaller the image quality loss and the higher the bit rate occupied by the coding block. If a coding block has less information referenced by other coding blocks, it is considered that the coding block belongs to a rapidly changing scene. Since the human eye is not sensitive to rapidly changing scenes, even if some of the image quality of rapidly changing scenes is reduced, it will not affect the viewing experience. Therefore, the quantization parameter of the coding block can be increased and a smaller bit rate value can be allocated. By weakening these high-frequency information that is not easily perceived by the human eye, the bit rate can be saved, the video volume can be saved, and the video compression quality can be improved.

[0077] For any coding block, the target coding cost of the coding block can reflect the weight of the coding information of the coding block as referenced by other coding blocks. The larger the target coding cost of the coding block, the slower the scene changes of the coding block, and at this time, the smaller the quantization parameter of the coding block needs to be; the smaller the target coding cost of the coding block, the faster the scene changes of the coding block, and at this time, the larger the quantization parameter of the coding block needs to be. In this way, by simply adjusting the quantization parameter of the coding block in a certain video frame, the encoding quality of all other video frames that refer to the video frame for encoding can be effectively improved, effectively improving the video encoding quality.

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

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

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

[0081] In a possible implementation, when the video encoding engine starts to perform the first encoding process on the i-th first video frame sequence, the video encoding configuration program starts to configure 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 synchronously start to execute the configuration of the i+1-th first video frame sequence, without waiting for the i-th first video frame sequence to be finally encoded and the encoding result to be determined before starting to execute the configuration of the i+1-th first video frame sequence, thereby realizing efficient coordinated operation of software and hardware and improving video encoding efficiency.

[0083] In a possible implementation, when the video encoding engine starts to perform a second encoding process on the i-th second video frame sequence, the quantization parameter determination module starts to determine the quantization parameter of the i+1-th second video frame sequence.

[0084] When the video encoding engine starts to execute the second encoding process for the i-th second video frame sequence, the quantization parameter determination module can synchronously start to determine the quantization parameter of the i+1-th second video frame sequence, preparing for the subsequent second encoding process for the i+1-th second video frame sequence to improve video encoding efficiency.

[0085] Figure 2 FIG. 4 is a schematic diagram showing a method of encoding an original video according to an embodiment of the present disclosure. N=4, M is a positive integer greater than 4. Figure 2 As shown, the video encoding configuration program configures the 1st first video frame sequence (the 1st to Mth video frames in the original video); after the video encoding configuration program configures the 1st first video frame sequence and sends the encoding parameters of the 1st first video frame sequence to the video encoding engine, the video encoding engine starts to execute the first encoding process of the 1st to Mth video frames. At this time, the video encoding configuration program can synchronously start to configure the 2nd first video frame sequence (since the N+1=5th to Mth video frames in the original video have been configured, it is only necessary to configure the M+1th to M+N=M+4th video frames).

[0086] In one example, after the video encoding engine completes the first encoding process of the i-th first video frame sequence, the quantization parameter determination module starts to determine the quantization parameter of the i-th second video frame sequence according to the encoding cost parameter of the i-th first video frame sequence.

[0087] like Figure 2As shown, after the video encoding engine completes the first encoding process of the 1st to Mth video frames, the quantization parameter determination module starts to determine the quantization parameters of the 1st second video frame sequence (the 1st to N=4th video frames in the original video) according to the encoding cost parameters of the 1st first video frame sequence (the 1st to Mth video frames in the original video). At this time, since the quantization parameters of the 1st second video frame sequence are not currently determined, the video encoding engine cannot perform the second encoding process of the 1st second video frame sequence. If the video encoding configuration program has configured the 2nd first video frame sequence (since the N+1=5th to Mth video frames in the original video have been configured, only the M+1th to M+N=M+4th video frames in the original video need to be configured), the encoding parameters of the M+1th to M+4th video frames are sent to the video encoding engine, so that the video encoding engine starts to perform the first encoding process of the M+1th to M+4th 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 parameter of the i-th second video frame sequence, the video encoding engine starts to perform a 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 of the first second video frame sequence (the first to fourth video frames in the original video), the video encoding engine starts to perform the second encoding process on the first to fourth video frames. At this time, if the video encoding engine has completed the first encoding process on the M+1th to M+4th video frames in the original video, the quantization parameter determination module can start to determine the quantization parameters of the second second video frame sequence (the N+1th=5th to 2N=8th video frames in the original video) according to the encoding cost parameters of the second first video frame sequence (the N+1th=5th to M+4th video frames in the original video).

[0090] After the video encoding engine completes the second encoding process of the 1st second video frame sequence (the 1st to 4th video frames in the original video), if the video encoding configuration program has configured the 3rd first video frame sequence (since the 2N+1=9th to M+N=M+4th video frames in the original video have been configured, it is only necessary to configure the M+N+1=M+5th to M+2N=M+8th video frames in the original video), the encoding parameters of the M+5th to M+8th video frames are sent to the video encoding engine, so that the video encoding engine starts the first encoding process of the M+5th to M+8th video frames.

[0091] After the video encoding engine completes the first encoding process of the M+5th to M+8th video frames, since the quantization parameter determination module has completed determining the quantization parameters of the second video frame sequence (the 5th to 8th video frames in the original video), the video encoding engine can start the second video encoding of the second second video frame sequence (the 5th to 8th video frames in the original video), and the quantization parameter determination module can synchronously start determining the quantization parameters of 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 of the second video frame sequence (the 5th to 8th video frames in the original video), if the video encoding configuration program has configured the 4th first video frame sequence (since the 3N+1=13th to M+2N=M+8th video frames in the original video have been configured, it is only necessary to configure the M+2N+1=M+9th to M+3N=M+12th video frames in the original video), the encoding parameters of the M+9th to M+12th video frames are sent to the video encoding engine, so that the video encoding engine starts to perform the first encoding process of the M+9th to M+12th video frames.

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

[0094] The video encoding process of other video frame sequences is similar and will not be described here. When the video encoding configuration program of the software layer is configuring the video frame sequence, the video encoding engine and quantization parameter determination module of the hardware layer are synchronously performing the first encoding process, quantization parameter determination, and the second encoding process. The efficient operation of the software layer and the hardware layer can effectively improve the encoding capability of the video encoding system.

[0095] In addition, the video encoding engine and quantization parameter determination module on the hardware side complete the quantization parameter determination and the secondary encoding of the video frame sequence. Compared with the existing technology that determines the quantization parameter based on the software side CPU and performs one encoding on the hardware side, it reduces the calculation time consumption of determining the quantization parameter on the software side, occupies less CPU system resources, and improves the encoding performance of the video encoding system.

[0096] In an embodiment of the present disclosure, a 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 i-th second video frame sequence consisting of the first N video frames out of the M video frames included in the i-th first 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 video encoding engine on the hardware side and utilizing the quantization parameter determination module added on the hardware side, a quantization parameter with higher accuracy can be determined for the first N video frames of the M video frames included in the first video frame sequence to constitute a second video frame sequence based on the inter-frame reference relationship of the M video frames included in the first video frame sequence, so that the video encoding engine on the hardware side can effectively implement secondary encoding based on the quantization parameter of the second video frame sequence, thereby effectively improving the video encoding compression performance based on fewer hardware resources.

[0097] Figure 3 FIG. 1 is a flowchart of a video encoding method according to an embodiment of the present disclosure. The video encoding and decoding method may be executed by the above-mentioned video encoding system. Figure 3 As shown, the video encoding method includes:

[0098] In step S31, 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;

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

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

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

[0102] In one possible implementation, based on a video encoding configuration program, configuring the i-th first video frame sequence includes: determining a 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 an inter-frame reference relationship between each video frame in the i-th first video frame sequence.

[0103] In one possible implementation, based on a video encoding engine, a 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: downsampling the i-th first video frame sequence; for any video frame in the i-th first video frame sequence after the downsampling process, a first encoding process is performed on the video frame to determine the encoding cost parameters of the video frame.

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

[0105] In one possible implementation, 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 the inter-frame coding cost of each coding block in the video frame.

[0106] In a possible implementation, based on a quantization parameter determination module, the quantization parameter of the i-th second video frame sequence is determined using the coding cost parameter of the i-th first video frame sequence, including: for any coding block in any video frame in the i-th first video frame sequence, the target coding cost of the coding block is determined according to the inter-frame coding cost and the intra-frame coding cost of the coding block; for any coding block in any video frame in the i-th second video frame sequence, the quantization parameter of the coding block is determined according to the target coding cost of the coding block.

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

[0108] In a possible implementation, based on a quantization parameter determination module, a quantization parameter of an i-th second video frame sequence is determined using a coding cost parameter of an i-th first video frame sequence, including: for any coding block in any video frame in the i-th first video frame sequence, when the inter-frame coding cost of the coding block is less than the intra-frame coding cost of the coding block, based on the inter-frame reference relationship of the coding block, determining the genetic information and inheritance information of the coding block, wherein the genetic information of the coding block is used to indicate information passed by the coding block to other coding blocks, and the inheritance information of the coding block is used to indicate information passed by other coding blocks to the coding block; based on the genetic information and inheritance information of the coding block, determining the target coding cost of the coding block.

[0109] In a possible implementation, based on a quantization parameter determination module, a quantization parameter of an i-th second video frame sequence is determined using a coding cost parameter of an i-th first video frame sequence, including: for any video frame in the i-th first video frame sequence, based on the inter-frame reference relationship of the video frame, determining a reference video frame and a referenced video frame of the video frame; for any coding block in the video frame, based on motion reference information of the coding block, determining a reference coding block of the coding block in a corresponding reference video frame and a referenced coding block of the coding block in a corresponding referenced video frame; determining inheritance information of the coding block relative to a corresponding reference coding block and genetic information of the coding block relative to a corresponding referenced coding block according to an inter-frame coding cost and an intra-frame coding cost of the coding block; and determining a target coding cost of the coding block by summing the genetic information and the inheritance information of the coding block.

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

[0111] In a possible implementation, when the video encoding engine starts to execute the first encoding process of the i-th first video frame sequence, the video encoding configuration program starts to execute the configuration of the i+1-th first video frame sequence.

[0112] In a possible implementation, when the video encoding engine starts to perform the second encoding process on the i-th second video frame sequence, the quantization parameter determination module starts to determine the quantization parameter of the (i+1)-th second video frame sequence.

[0113] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.

[0114] In addition, the present disclosure also provides an electronic device, a computer-readable storage medium, and a program, all of which can be used to implement any video encoding method provided by the present disclosure. The corresponding technical solutions and descriptions are referred to in the corresponding records of the method part and will not be repeated here.

[0115] This method has a specific technical connection with the internal structure of the computer system, and can solve the technical problem of how to improve the hardware computing efficiency or execution effect (including reducing the amount of data storage, reducing the amount of data transmission, increasing the hardware processing speed, etc.), thereby obtaining the technical effect of improving the internal performance of the computer system in accordance with the laws of nature.

[0116] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0117] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.

[0118] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to call the instructions stored in the memory to execute the above method.

[0119] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.

[0120] The electronic device may be provided as a terminal, a server, or a device in other forms.

[0121] Figure 4A block diagram of an electronic device according to an embodiment of the present disclosure is shown. Figure 4 , the electronic device 1900 can be provided as a server or a terminal device. Figure 4 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0122] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958. The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as a Microsoft Server operating system (Windows Server 2003). TM ), a graphical user interface operating system launched by Apple (Mac OS X TM ), a multi-user, multi-process computer operating system (Unix TM ), a free and open source Unix-like operating system (Linux TM ), an 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, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.

[0124] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0125] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, (but not limited to) an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.

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

[0127] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related 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 "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of 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., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0128] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram 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 device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in 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 so that a series of operating steps are 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 implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0131] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0132] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK) and the like.

[0133] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0134] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0135] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, 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 type of personal information processed.

[0136] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill 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; The video encoding engine is used to perform a first encoding process on the i-th first video frame sequence to determine an encoding cost parameter of the i-th first video frame sequence; The quantization parameter determination module is used to determine the quantization parameter of the i-th second video frame sequence by using the encoding cost parameter of the i-th first video frame sequence, wherein the i-th second video frame sequence is composed of the first N video frames of the M video frames included in the i-th first video frame sequence, 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 an encoding result of the i-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 a 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 an 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: Performing down-sampling processing on the i-th first video frame sequence; For any video frame in the i-th first video frame sequence after downsampling processing, a first encoding processing is performed on the video frame to determine an encoding cost parameter of the video frame.

4. The system according to claim 1, characterized in that The system further comprises: a storage module; The video encoding engine is used to send the encoding cost parameter 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 encoding cost parameters of the i-th first video frame sequence include the encoding cost parameters of each video frame in the i-th first video frame sequence, and the encoding cost parameters of each video frame in the i-th first video frame sequence include the intra-frame encoding cost and the inter-frame encoding cost of each encoding block in the video frame.

6. The system according to claim 5, characterized in that The quantization parameter determination module is specifically used to: For any coding block in any video frame in the i-th first video frame sequence, determine a target coding cost of the coding block according to an inter-frame coding cost and an intra-frame coding cost of the coding block; For any coding block in any video frame in the i-th second video frame sequence, a quantization parameter of the coding block is determined according to a target coding cost of the coding block.

7. The system according to claim 6, characterized in that The system further comprises: a storage module; The quantization parameter determination module is used to send the quantization parameter of each coding block in each video frame in 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 to: For any coding block in any video frame in the i-th first video frame sequence, when the inter-frame coding cost of the coding block is less than the intra-frame coding cost of the coding block, based on the inter-frame reference relationship of the coding block, determining the inheritance information and the succession information of the coding block, wherein the inheritance information of the coding block is used to indicate the information transmitted by the coding block to other coding blocks, and the succession information of the coding block is used to indicate the information transmitted by other coding blocks to the coding block; Based on the genetic information and inheritance information of the coding block, a 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 to: For any video frame in the i-th first video frame sequence, determining a reference video frame and a referenced video frame of the video frame based on an inter-frame reference relationship of the video frame; For any coding block in the video frame, based on the motion reference information of the coding block, determine a reference coding block of the coding block in a corresponding reference video frame and a referenced coding block of the coding block in a corresponding referenced video frame; Determine, according to the inter-frame coding cost and the intra-frame coding cost of the coding block, inheritance information of the coding block relative to the corresponding reference coding block, and inheritance information of the coding block relative to the corresponding referenced coding block; The genetic information and the inherited 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 to: For any coding block in any video frame in the i-th first video frame sequence, when the inter-frame coding cost of the coding block is greater than or equal to the intra-frame coding cost of the coding block, the target coding cost of the coding block is determined according to the intra-frame coding cost of the coding block.

11. The system according to claim 1, characterized in that When the video encoding engine starts to execute the first encoding process on the i-th first video frame sequence, the video encoding configuration program starts to configure the i+1-th first video frame sequence.

12. The system according to claim 1, characterized in that When the video encoding engine starts to perform a second encoding process on the i-th second video frame sequence, the quantization parameter determination module starts to determine the quantization parameter of the (i+1)-th second video frame sequence.

13. A video encoding method, characterized in that: include: Based on the video encoding configuration program, configure the i-th first video frame sequence, where i is a positive integer greater than or equal to 1; Based on the video encoding engine, performing a first encoding process on the i-th first video frame sequence to determine an encoding cost parameter of the i-th first video frame sequence; Based on the quantization parameter determination module, determine the quantization parameter of the 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 is composed of the first N video frames of the M video frames included in the i-th first video frame sequence, M and N are positive integers, and M is greater than N; Based on the video encoding engine, the quantization parameter of the i-th second video frame sequence is used to perform a second encoding process on the i-th second video frame sequence to obtain an encoding result of the i-th second video frame sequence.

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

15. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to call the instructions stored in the memory to execute the method of claim 13.

16. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method of claim 13 is implemented.

Citation Information

Patent Citations

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

    CN117478881A

  • Video coding method and device, electronic equipment and storage medium

    CN118264798A

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

    US20070064794A1

  • Video encoding method, apparatus, and device, and storage medium

    US20200260085A1