Video encoding method, video encoder, system and program product

By analyzing the block-level coding parameters of video frames and reference frames, determining the importance value and adjusting the quantization parameters, the problems of file size and transmission bandwidth in video coding are solved, and more efficient video coding is achieved.

CN120614461APending Publication Date: 2025-09-09BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510855806.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

How to efficiently reduce the size of encoded video files while maintaining video quality, thereby reducing storage space and transmission bandwidth requirements.

Method used

By analyzing the block-level initial coding parameters of the current video frame and the backward reference frame, the importance value of each block is determined, and the quantization parameters are adjusted to generate the target coding parameters for encoding.

Benefits of technology

While ensuring the quality of key areas, it reduces unnecessary data redundancy, reduces the size of encoded video files, and reduces storage space and transmission bandwidth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120614461A_ABST
    Figure CN120614461A_ABST
Patent Text Reader

Abstract

The invention provides a video encoding method, a video encoder, a system and a program product, and relates to the technical field of video encoding and decoding. The method comprises the following steps: acquiring an initial coding parameter of each block in a current video frame and an initial coding parameter of each block in a preset number of reference frames; based on the initial coding parameter of each block in the current video frame and the initial coding parameter of each block in a preset number of reference frames, analyzing the current video frame and the preset number of reference frames to obtain an importance value of each block in the current video frame; based on the importance value of each block in the current video frame, adjusting the initial coding parameter of each block in the current video frame to obtain a target coding parameter of each block in the current video frame; and coding the current video frame by using the target coding parameter of each block. According to the embodiment of the invention, the video quality can be maintained, the size of the coded video file is further reduced, and the required storage space and transmission bandwidth are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of video coding and decoding technology, and in particular to a video coding method, a video encoder, a system, and a program product. Background Art

[0002] In today's digital age, the production and consumption of video content is experiencing unprecedented growth. Whether it's high-definition television programs, booming online streaming platforms, or user-generated content on social media, video has become a primary form of information transmission and entertainment. With this growth, the efficient storage and transmission of this massive amount of video data has become a pressing challenge. Summary of the Invention

[0003] The present disclosure provides a video encoding method, a video encoder, a system, and a program product, which can further reduce the size of the encoded video file compared to the existing technology while maintaining the video quality, thereby reducing the required storage space and transmission bandwidth.

[0004] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by practice of the present disclosure.

[0005] According to one aspect of the present disclosure, a video encoding method is provided, including: obtaining initial encoding parameters of each block in a current video frame and initial encoding parameters of each block in a preset number of reference frames, where the reference frame is a video frame that is temporally subsequent to the current video frame; based on the initial encoding parameters of each block in the current video frame and the initial encoding parameters of each block in the preset number of reference frames, analyzing the current video frame and the preset number of reference frames to obtain an importance value of each block in the current video frame; based on the importance value of each block in the current video frame, adjusting the initial encoding parameters of each block in the current video frame to obtain target encoding parameters for each block in the current video frame; and encoding the current video frame using the target encoding parameters of each block.

[0006] According to another aspect of the present disclosure, a video encoder is provided, comprising an image analysis module, a pre-analysis module, a bit rate control module, and an encoding module connected in sequence.

[0007] an image analysis module, configured to perform image analysis on a current video frame of the video to be encoded and a preset number of reference frames, and determine initial encoding parameters for each block in the current video frame and initial encoding parameters for each reference frame in the preset number of reference frames, where the reference frames are video frames that are temporally subsequent to the current video frame;

[0008] a pre-analysis module, configured to analyze the current video frame and a preset number of reference frames based on initial encoding parameters of each block in the current video frame and initial encoding parameters of each block in a preset number of reference frames, to obtain an importance value of each block in the current video frame;

[0009] A bit rate control module is used to adjust the initial encoding parameters of each block in the current video frame based on the importance value of each block in the current video frame to obtain the target encoding parameters of each block in the current video frame;

[0010] The encoding module is used to encode the current video frame using the target encoding parameters of each block.

[0011] According to yet another aspect of the present disclosure, a video coding and decoding system is provided, comprising a video decoder and the above-mentioned video encoder.

[0012] According to another aspect of the present disclosure, an electronic device is provided, including: a memory for storing instructions; and a processor for calling the instructions stored in the memory to implement the above-mentioned video encoding method.

[0013] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which computer instructions are stored. When the computer instructions are executed by a processor, the above-mentioned video encoding method is implemented.

[0014] According to another aspect of the present disclosure, a computer program product is provided. The computer program product stores instructions, and when the instructions are executed by a computer, the computer implements the above-mentioned video encoding method.

[0015] According to another aspect of the present disclosure, a chip is provided, comprising at least one processor and an interface; the interface is configured to provide program instructions or data to the at least one processor; and the at least one processor is configured to execute program instructions to implement the above-mentioned video encoding method.

[0016] The video encoding method, video encoder, system and program product provided by the embodiments of the present disclosure, by introducing block-level initial encoding parameters, not only consider the global content characteristics, but also deeply analyze the initial encoding parameters of each block, and then make local optimization decisions from a global perspective, more accurately evaluate the importance of each block, and generate more reasonable target encoding parameters. This can reduce unnecessary data redundancy while ensuring the quality of key areas, reduce the size of the encoded video file while maintaining or even improving the video quality, and reduce the required storage space and transmission bandwidth.

[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0019] Obviously, the drawings described below are only some embodiments of the present disclosure. A person skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0020] Figure 1 A flow chart of a video encoding method according to an embodiment of the present disclosure is shown;

[0021] Figure 2 A schematic diagram of a video frame in an embodiment of the present disclosure is shown;

[0022] Figure 3 A schematic diagram showing dependency relationships between video frames in an embodiment of the present disclosure is shown;

[0023] Figure 4 A flowchart of determining an importance value in an embodiment of the present disclosure is shown;

[0024] Figure 5 Another importance value determination flow chart according to an embodiment of the present disclosure is shown;

[0025] Figure 6 A flow chart of another video encoding method according to an embodiment of the present disclosure is shown;

[0026] Figure 7 A flow chart of another video encoding method according to an embodiment of the present disclosure is shown;

[0027] Figure 8 A schematic diagram of a video encoder according to an embodiment of the present disclosure is shown;

[0028] Figure 9 A schematic diagram of a video encoding and decoding system according to an embodiment of the present disclosure is shown;

[0029] Figure 10 A structural block diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the disclosure for which protection is sought, but merely represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present disclosure.

[0031] Before using the technical solutions disclosed in the various embodiments of this disclosure, users must be informed of the type, scope, and usage scenarios of the personal information involved in this disclosure and their authorization must be obtained in accordance with relevant laws and regulations. The data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws and regulations and relevant provisions.

[0032] This exemplary implementation is described in detail below with reference to the accompanying drawings and examples.

[0033] First, an embodiment of the present disclosure provides a video encoding method, which can be executed by any electronic device with computing and processing capabilities.

[0034] Figure 1 A flow chart of a video encoding method according to an embodiment of the present disclosure is shown as follows: Figure 1 As shown, the video encoding method provided in the embodiment of the present disclosure includes S101-S104.

[0035] In S101 , initial encoding parameters of each block in the current video frame and initial encoding parameters of each block in a preset number of reference frames are obtained, where the reference frames are video frames that are temporally subsequent to the current video frame.

[0036] The current video frame is the frame being encoded. The reference frame is a frame used to predict other frames (including the current video frame). In the embodiment of the present disclosure, the reference frame is a backward reference frame, that is, a video frame that is temporally located after the current video frame.

[0037] The video frames are divided into "blocks", which can also be called macroblocks or coding units (CU).

[0038] In some embodiments, the initial encoding parameters for each block in the current video frame may include a quantization parameter (QP). The initial encoding parameters for each block in a preset number of reference frames may also include a quantization parameter. The quantization parameter is a parameter used in video coding to control the balance between image quality and compression efficiency during compression. The quantization parameter determines the level of quantization of transform coefficients during video compression, directly affecting the quality and file size of the final encoded video. A smaller QP value means finer quantization, which preserves more image detail and results in higher-quality output video, but also increases the file size. Conversely, a larger QP value results in coarser quantization, which significantly reduces file size but may cause blocking artifacts or other distortion in the image. At a fixed bitrate, adjusting the QP can help distribute bits more evenly across scenes of varying complexity. For example, using a higher QP value in flat areas can save bits, while using a lower QP value in detail-rich areas can maintain quality. In H.264 / AVC, the typical QP value range is from 0 to 51, with 0 representing the lowest quantization level (highest quality) and 51 representing the highest quantization level (most severe compression).

[0039] In some embodiments, as Figure 2 As shown, the video to be encoded may include multiple video frames, for example, including video frame 201, video frame 202, video frame 203, video frame 204, and video frame 205 in the order of appearance when the video is played. Assuming that video frame 203 is the current video frame (referred to as the current frame), video frame 204 and video frame 205 are reference frames. The reference frames can refer to the current video frame during encoding and decoding, and the reference frames are referenced during the pre-analysis stage when the current frame is encoded. In some embodiments, the reference frames may also be referred to as reference frames.

[0040] In S102, based on the initial coding parameters of each block in the current video frame and the initial coding parameters of each block in a preset number of reference frames, the current video frame and the preset number of reference frames are analyzed to obtain the importance value of each block in the current video frame.

[0041] The reference frame can refer to the current video frame during encoding and decoding. The importance of each block in the current video frame is related to the degree to which the block is referenced by the reference frame. The more reference frames the block is referenced by, the higher the importance of the block, that is, the greater the importance value.

[0042] In some embodiments, as Figure 3As shown in the figure, block 7 of frame 3 references blocks {1, 2, 5, 6} of frame 2, and block 10 of frame 3 references blocks {5, 6, 9, 10} of frame 2. Similarly, blocks 1, 2, 5, 6, 9, and 10 of frame 2 all reference block 5 of frame 1. Assume that block 7 of frame 3 references blocks {1, 2, 5, 6} of frame 2, and the shaded areas of each block are the same. Similarly, the shaded areas of {5, 6, 9, 10} are also the same. Since blocks 7 and 10 of frame 3 both reference block {5, 6} of frame 2, and blocks {1, 2} and {9, 10} of frame 2 are only referenced once, blocks 5 and 6 of frame 2 are more important than blocks 1, 2, 9, and 10, and have a higher importance value.

[0043] In S103 , based on the importance value of each block in the current video frame, the initial coding parameters of each block in the current video frame are adjusted to obtain target coding parameters of each block in the current video frame.

[0044] exist Figure 3 In this example, blocks 5 and 6 of frame 2 are more important than blocks 1, 2, 9, and 10, and therefore have a higher importance value. Therefore, during encoding, blocks {5, 6} in frame 2 should be assigned a smaller quantization parameter and a higher bitrate. By determining the importance value, the disclosed embodiment can predetermine the optimal encoding parameter (QP value) for each frame or block before encoding, thereby optimizing the encoding performance of the entire video sequence.

[0045] In S104 , the current video frame is encoded using the target encoding parameters of each block.

[0046] The disclosed embodiment, by introducing block-level initial encoding parameters, not only considers global content features, but also deeply analyzes the initial encoding parameters of each block, and then makes local optimization decisions from a global perspective, more accurately evaluates the importance of each block, and generates more reasonable target encoding parameters. This can reduce unnecessary data redundancy while ensuring the quality of key areas, reduce the size of the encoded video file while maintaining or even improving the video quality, and reduce the required storage space and transmission bandwidth.

[0047] It should be noted that the encoding process of solution S104 of the embodiment of the present disclosure is the same as that of the related technology. Therefore, the corresponding decoding process is also the same as that of the related technology. That is to say, the solution of the embodiment of the present disclosure only needs to change the encoding segment, and there is no need to change the decoding end. The changes to the existing solution are smaller and the modification cost is lower.

[0048] In some embodiments, as Figure 4As shown, based on the initial encoding parameters of each block in the current video frame and the initial encoding parameters of each block in a preset number of reference frames, the current video frame and the preset number of reference frames are analyzed to obtain the importance value of each block in the current video frame, which may include S401-S402.

[0049] In S401 , the current video frame and a preset number of reference frames are analyzed to obtain dependency relationships between each block in the current video frame and each block in the preset number of reference frames.

[0050] like Figure 3 As shown, blocks 1, 2, 5, 6, 9 and 10 of the second frame all refer to the fifth block of the first frame, that is, blocks 1, 2, 5, 6, 9 and 10 of the second frame all have a dependency relationship with the fifth block of the first frame.

[0051] In S402 , the importance value of each block in the current video frame is determined based on the dependency relationship, the initial encoding parameters of each block in the current video frame, and the initial encoding parameters of each block in a preset number of reference frames.

[0052] In some embodiments, the importance value of each block in the current video frame is determined based on the dependency relationship, the initial encoding parameters of each block in the current video frame, and the initial encoding parameters of each block in a preset number of reference frames. The importance value of each block in the current video frame can be determined based on the dependency relationship, the quantization parameter of the current video frame, the pixel value variance of each block in the current video frame, the quantization parameter of each reference frame, the pixel value variance of each block in each reference frame, and the pixel value variance of each block with a dependency relationship in the current video frame and each reference frame.

[0053] In some embodiments, as Figure 5 As shown, based on the dependency, the quantization parameter of the current video frame, the pixel value variance of each block in the current video frame, the quantization parameter of each reference frame, the pixel value variance of each block in each reference frame, and the pixel value variance of each block with a dependency relationship in the current video frame and each reference frame, the importance value of each block in the current video frame is determined, including S501-S502.

[0054] In S501, based on the quantization parameter of the current video frame, the pixel value variance of each block in the current video frame, the quantization parameter of each reference frame, the pixel value variance of each block in each reference frame, and the pixel value variance of each block with a dependent relationship in the current video frame and each reference frame, the importance value of each block in the current video frame is determined, and the distortion propagation rate between each block with a dependent relationship in the current video frame and each reference frame is calculated respectively.

[0055] Among them, the distortion propagation rate is positively correlated with the following parameters: the quantization parameter of the current video frame and the pixel value variance of each block in the current video frame; the distortion propagation rate is negatively correlated with the following parameters: the quantization parameter of each reference frame, the pixel value variance of each block in each reference frame, and the pixel value variance of each dependent block in the current video frame and each reference frame.

[0056] In S502 , the importance value of each block in the current video frame is determined based on the dependency relationship and the distortion propagation rate between the blocks having the dependency relationship in the current video frame and each reference frame.

[0057] like Figure 3 As shown, the current video frame is the 1st frame, and the current block in the current video frame is the 5th block. Assuming that the number of reference frames is 1, that is, the reference frame is the 2nd frame, then the importance value of the 5th block in the 1st frame can be the sum of the distortion propagation rates of the blocks in all reference frames that have a dependent relationship with it, that is, the sum of the distortion propagation rates between blocks 1, 2, 5, 6, 9 and 10 in the 2nd frame and the 5th block in the 1st frame, that is, I51=p12+p22+p52+p62+p92+p102, where I51 represents the importance value of the 5th block in the 1st frame, p12 represents the distortion propagation rate between block 1 in the 2nd frame and the 5th block in the 1st frame, and similarly, p22 represents the distortion propagation rate between block 2 in the 2nd frame and the 5th block in the 1st frame.

[0058] Assuming that the reference frame is 2 frames, then when calculating I51, it is also necessary to add the distortion propagation rate between blocks 7 and 10 in the third frame and block 5 in the first frame, and the distortion propagation rate between blocks 7 and 10 in the third frame and block 5 in the first frame.

[0059] The inventors of the disclosed embodiments obtain a more accurate propagation rate p through modeling, effectively estimate distortion propagation, and improve coding performance.

[0060]

[0061] Based on the above formulas (1) and (2), the above formula (3) can be obtained. Where p represents the distortion propagation rate, n is the coefficient, and the value of n can be determined through multiple experiments. curr Indicates the quantization parameter of the current video frame, Indicates the variance of pixel values ​​of each block in the current video frame, Q ref Indicates the quantization parameter of the reference frame of the current video frame, represents the variance of pixel values ​​of each block in each reference frame, Indicates the variance of pixel values ​​of each block with dependency between the current video frame and each reference frame.

[0062] In some embodiments, n may be 12, that is, the above formula 3 may be as follows:

[0063]

[0064] In the embodiment of the present disclosure, after obtaining the initial coding parameters of each block in the current video frame (quantization parameters of the current video frame) and the initial coding parameters of each block in a preset number of reference frames (quantization parameters of the reference frames), for the current video frame, each block is processed in turn according to the processed block size, and the variance of each block is calculated. And the variance of pixel values ​​of each block with dependency relationship between the current video frame and each reference frame

[0065] In some embodiments, if the blocks with dependency relationships in the current video frame and each reference frame are estimated based on whole pixels, the variance of the pixel values ​​of the blocks with dependency relationships in the current video frame and each reference frame are calculated directly using pixels; if the blocks with dependency relationships in the current video frame and each reference frame are estimated based on fractional pixels, the variance of the pixel values ​​of the blocks with dependency relationships in the current video frame and each reference frame are calculated using pixels after interpolation.

[0066] After all parameters are calculated, p is calculated using the above formula (3), and the propagated distortion is calculated backward using the obtained p.

[0067] Figure 6 A flow chart of a video encoding method according to an embodiment of the present disclosure is shown as follows: Figure 6 As shown, the video encoding method provided in the embodiment of the present disclosure includes S601-S605, wherein S603-S605 are similar to the above S102-S104 and are not described again here.

[0068] In S601, a video to be encoded is obtained;

[0069] In S602, image analysis is performed on the current video frame of the video to be encoded and a preset number of reference frames to determine initial encoding parameters of each block in the current video frame and initial encoding parameters of each reference frame in the preset number of reference frames, where the reference frame is a video frame that is temporally subsequent to the current video frame.

[0070] The disclosed embodiments perform image analysis on video frames, such as image complexity analysis and pixel value analysis, to determine the initial encoding parameters of each block in the current video frame and the initial encoding parameters of each reference frame in a preset number of reference frames. Quantization information is then introduced in the pre-analysis stage to adjust the propagation rate of distortion and more reasonably adjust the encoding QP of each block, thereby improving encoding performance.

[0071] Figure 7 A flow chart of a video encoding method according to an embodiment of the present disclosure is shown as follows: Figure 7As shown, the video encoding method provided in the embodiment of the present disclosure includes S701-S706, wherein S704-S706 are similar to the above S102-S104 and are not described again here.

[0072] In S701, a video to be encoded is obtained;

[0073] In S702, based on the current video frame of the video to be encoded and a preset number of reference frames, the importance value of each block in the current video frame is determined;

[0074] In S703 , initial encoding parameters of each block in the current video frame are determined based on the importance value of each block in the current video frame.

[0075] The embodiment of the present disclosure may also perform a second pre-analysis after pre-analysis and obtaining initial coding parameters, and introduce quantization information during the second pre-analysis process to adjust the propagation rate of distortion and more reasonably adjust the coding QP of each block, thereby improving coding performance.

[0076] It should be noted that the process of calculating the importance value of each block in the above S702 may be different from the process of calculating the importance value in the previous embodiment. The process of calculating the importance value in the initial coding parameter determination link may adopt a simplified calculation process, thereby saving computing power resources.

[0077] In the embodiments of the present disclosure, the terms “first,” “second,” and “third” are used for descriptive purposes only and should not be understood as indicating or implying relative importance.

[0078] In this disclosure, the term "and / or" simply describes an association relationship between related objects, indicating that three possible relationships exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0079] Furthermore, although the steps of the methods of the present disclosure are depicted in a particular order in the drawings, this does not require or imply that the steps must be performed in this particular order, or that all illustrated steps must be performed to achieve desired results.

[0080] In some embodiments, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.

[0081] Based on the same inventive concept, the embodiment of the present disclosure further provides a video encoder, such as Figure 8 As shown, the video encoder includes an image analysis module 801, a pre-analysis module 802, a bit rate control module 803 and an encoding module 804 which are connected in sequence.

[0082] An image analysis module 801 is configured to perform image analysis on a current video frame of a video to be encoded and a preset number of reference frames to determine initial encoding parameters for each block in the current video frame and initial encoding parameters for each reference frame in the preset number of reference frames, where the reference frames are video frames that are temporally subsequent to the current video frame.

[0083] A pre-analysis module 802 is configured to analyze the current video frame and a preset number of reference frames based on initial encoding parameters of each block in the current video frame and initial encoding parameters of each block in a preset number of reference frames to obtain an importance value of each block in the current video frame;

[0084] A bit rate control module 803 is configured to adjust initial coding parameters of each block in the current video frame based on the importance value of each block in the current video frame to obtain target coding parameters for each block in the current video frame;

[0085] The encoding module 804 is configured to encode the current video frame using the target encoding parameters of each block.

[0086] The disclosed embodiment adjusts the encoder structure and adds an image analysis module before the pre-analysis module performs Lookahead to obtain the initial encoding parameters of each frame (such as SliceQP). Based on the initial encoding parameters (such as QP), pre-analysis is performed to more accurately evaluate the importance of each block and generate more reasonable target encoding parameters. This can reduce unnecessary data redundancy while ensuring the quality of key areas, reduce the size of the encoded video file while maintaining or even improving the video quality, and reduce the required storage space and transmission bandwidth.

[0087] Regarding the video encoder in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the video encoding method, and will not be elaborated here.

[0088] Based on the same inventive concept, the present disclosure also provides a video encoding and decoding system. Figure 9 As shown, the video encoding and decoding system includes a video encoder 901 and a video decoder 902 .

[0089] The video encoder 901 is Figure 8 The video encoder of the embodiment; the video decoder 902 can be used to decode Figure 8 Video encoded by the video encoder of the embodiment. It is understandable that in actual applications, multiple video codec systems can be interconnected, and one video codec system can transmit the video encoded by the video encoder to another video codec system, and the other video codec system can use a video decoder to decode the received encoded video.

[0090] In some embodiments, the video encoding and decoding system may further include a display device, which may be used to display the video decoded by the video decoder 902 .

[0091] Regarding the video encoder in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the video encoding method, and will not be elaborated here.

[0092] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, such division is not mandatory.

[0093] In fact, according to the embodiment of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0094] Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0095] Refer to the following Figure 10 To describe the electronic device provided by the embodiment of the present disclosure. Figure 10 The electronic device 1000 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0096] Figure 10 FIG. 1 shows a schematic diagram of the architecture of an electronic device 1000 provided by an embodiment of the present invention. Figure 10 As shown, the electronic device 1000 includes but is not limited to: at least one processor 1010 and at least one memory 1020.

[0097] The memory 1020 is used to store instructions.

[0098] In some embodiments, the memory 1020 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 10201 and / or a cache 10202 , and may further include a read-only memory unit (ROM) 10203 .

[0099] In some embodiments, the memory 1020 may also include a program / utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0100] In some embodiments, the memory 1020 may store an operating system, which may be a real-time operating system (RTX), LINUX, UNIX, WINDOWS, or OS X.

[0101] In some embodiments, data may also be stored in the memory 1020 .

[0102] As an example, the processor 1010 may read data stored in the memory 1020 . The data may be stored at the same storage address as the instruction, or the data may be stored at a different storage address from the instruction.

[0103] The processor 1010 is configured to call instructions stored in the memory 1020 to implement the steps of various exemplary embodiments of the present disclosure described in the "Exemplary Method" section above. For example, the processor 1010 may execute the steps of the aforementioned video encoding method embodiment.

[0104] It should be noted that the processor 1010 may be a general-purpose processor or a dedicated processor. The processor 1010 may include one or more processing cores, and the processor 1010 executes various functional applications and data processing by running instructions.

[0105] In some embodiments, the processor 1010 may include a central processing unit (CPU) and / or a baseband processor.

[0106] In some embodiments, the processor 1010 may determine an instruction based on the priority identifier and / or function category information carried in each control instruction.

[0107] In the present disclosure, the processor 1010 and the memory 1020 may be provided separately or integrated together.

[0108] As an example, the processor 1010 and the memory 1020 may be integrated on a single board or a system on chip (SOC).

[0109] like Figure 10As shown, the electronic device 1000 is implemented as a general-purpose computing device. The electronic device 1000 may further include a bus 1030 .

[0110] The bus 1030 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.

[0111] The electronic device 1000 may also communicate with one or more external devices 1040 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1000, and / or any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 1050.

[0112] Furthermore, the electronic device 1000 can also communicate with one or more networks (eg, a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through the network adapter 1060 .

[0113] like Figure 10 As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 via the bus 1030 .

[0114] It should be understood that although not shown in the figures, other hardware and / or software modules may be used in conjunction with the electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0115] It is understood that the structure shown in the embodiment of the present disclosure does not constitute a specific limitation on the electronic device 1000. In other embodiments of the present disclosure, the electronic device 1000 may include Figure 10 More or fewer components may be shown, or some components may be combined or separated, or the components may be arranged differently. Figure 10 The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0116] The present disclosure also provides a computer-readable storage medium having computer instructions stored thereon. When the computer instructions are executed by a processor, the video encoding method described in the above method embodiment is implemented.

[0117] The computer-readable storage medium in the embodiments of the present disclosure is a computer instruction that can be sent, propagated or transmitted for use by or in conjunction with an instruction execution system, apparatus or device.

[0118] As an example, computer readable storage media are non-volatile storage media.

[0119] In some embodiments, more specific examples of computer-readable storage media in the present disclosure may include, but are not limited to: an electrical connection with one or more wires, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, a USB flash drive, a mobile hard disk, or any suitable combination of the foregoing.

[0120] In the embodiments of the present disclosure, the computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer instructions (readable program codes).

[0121] Such a propagated data signal may take any of a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof.

[0122] In some examples, computing instructions contained on a computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0123] The embodiments of the present disclosure further provide a computer program product, which stores instructions. When the instructions are executed by a computer, the computer implements the video encoding method described in the above method embodiment.

[0124] The above instructions may be program codes. In specific implementation, the program codes may be written in any combination of one or more programming languages.

[0125] Programming languages ​​include object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages.

[0126] The program code may execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server.

[0127] Where a remote computing device is involved, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0128] The embodiment of the present disclosure further provides a chip, comprising at least one processor and an interface;

[0129] An interface for providing program instructions or data to at least one processor;

[0130] At least one processor is configured to execute program instructions to implement the video encoding method described in the above method embodiment.

[0131] In some embodiments, the chip may further include a memory for storing program instructions and data, and the memory may be located inside or outside the processor.

[0132] Those skilled in the art will appreciate that all or part of the steps for implementing the above embodiments may be implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software, which may be collectively referred to herein as a "circuit," "module," or "system."

[0133] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein.

[0134] This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the appended claims.

Claims

1. A video encoding method, characterized in that: include: Obtaining initial encoding parameters of each block in a current video frame and initial encoding parameters of each block in a preset number of reference frames, where the reference frames are video frames that are temporally subsequent to the current video frame; Analyzing the current video frame and the preset number of reference frames based on initial encoding parameters of each block in the current video frame and initial encoding parameters of each block in the preset number of reference frames to obtain an importance value of each block in the current video frame; Adjusting initial coding parameters of each block in the current video frame based on the importance value of each block in the current video frame to obtain target coding parameters of each block in the current video frame; The current video frame is encoded using the target encoding parameters of each block.

2. The method according to claim 1, characterized in that The initial encoding parameters and the target encoding parameters include quantization parameters.

3. The method according to claim 1, characterized in that The analyzing the current video frame and the preset number of reference frames based on the initial encoding parameters of each block in the current video frame and the initial encoding parameters of each block in the preset number of reference frames to obtain the importance value of each block in the current video frame includes: Analyzing the current video frame and the preset number of reference frames to obtain dependency relationships between each block in the current video frame and each block in the preset number of reference frames; The importance value of each block in the current video frame is determined based on the dependency, the initial encoding parameters of each block in the current video frame, and the initial encoding parameters of each block in the preset number of reference frames.

4. The method according to claim 3, characterized in that The determining, based on the dependency, the initial encoding parameters of the blocks in the current video frame, and the initial encoding parameters of the blocks in the preset number of reference frames, the importance value of each block in the current video frame includes: Based on the dependency relationship, the quantization parameter of the current video frame, the pixel value variance of each block in the current video frame, the quantization parameter of each reference frame, the pixel value variance of each block in each reference frame, and the pixel value variance of each block with a dependency relationship in the current video frame and each reference frame, the importance value of each block in the current video frame is determined.

5. The method according to claim 4, characterized in that The determining, based on the dependency relationship, the quantization parameter of the current video frame, the pixel value variance of each block in the current video frame, the quantization parameter of each reference frame, the pixel value variance of each block in each reference frame, and the pixel value variance of each block having a dependency relationship in the current video frame and each reference frame, includes: Determining an importance value for each block in the current video frame based on a quantization parameter of the current video frame, a pixel value variance of each block in the current video frame, a quantization parameter of each reference frame, a pixel value variance of each block in each reference frame, and a pixel value variance of each block having a dependent relationship in the current video frame and each reference frame, and calculating a distortion propagation rate between each block having a dependent relationship in the current video frame and each reference frame; determining an importance value of each block in the current video frame based on the dependency relationship and a distortion propagation rate between each block having the dependency relationship in the current video frame and each reference frame; Among them, the distortion propagation rate is positively correlated with the following parameters: the quantization parameter of the current video frame and the pixel value variance of each block in the current video frame; the distortion propagation rate is negatively correlated with the following parameters: the quantization parameter of each reference frame, the pixel value variance of each block in each reference frame, and the pixel value variance of each block with a dependent relationship in the current video frame and each reference frame.

6. The method according to claim 5, characterized in that The distortion propagation rate is calculated using the following formula: Among them, Q curr represents the quantization parameter of the current video frame, n is a coefficient, Indicates the pixel value variance of each block in the current video frame, Q ref represents the quantization parameter of the reference frame of the current video frame, represents the variance of pixel values ​​of each block in each reference frame, Indicates the variance of pixel values ​​of each block having a dependency relationship between the current video frame and each reference frame.

7. The method according to claim 5, characterized in that If the blocks in the current video frame and each reference frame that have a dependency relationship are estimated using integer pixels, directly using pixels to calculate the variance of the pixel values ​​of the blocks in the current video frame and each reference frame that have a dependency relationship; If the blocks with dependency in the current video frame and each reference frame are estimated pixel by pixel, the pixel value variance of the blocks with dependency in the current video frame and each reference frame is calculated using the interpolated pixels.

8. The method according to any one of claims 1 to 7, characterized in that: The obtaining of the initial encoding parameters of each block in the current video frame and the initial encoding parameters of each block in a preset number of reference frames includes: Get the video to be encoded; Image analysis is performed on the current video frame of the video to be encoded and the preset number of reference frames to determine initial encoding parameters of each block in the current video frame and initial encoding parameters of each reference frame in the preset number of reference frames.

9. The method according to claim 1, characterized in that The obtaining of the initial encoding parameters of each block in the current video frame and the initial encoding parameters of each block in a preset number of reference frames includes: Get the video to be encoded; Determining, based on the current video frame of the video to be encoded and the preset number of reference frames, an importance value of each block in the current video frame; Based on the importance value of each block in the current video frame, an initial encoding parameter of each block in the current video frame is determined.

10. A video encoder, characterized in that include: an image analysis module, configured to perform image analysis on a current video frame of a video to be encoded and a preset number of reference frames to determine initial encoding parameters for each block in the current video frame and initial encoding parameters for each reference frame in the preset number of reference frames, wherein the reference frames are video frames that temporally follow the current video frame; a pre-analysis module, configured to analyze the current video frame and the preset number of reference frames based on initial encoding parameters of each block in the current video frame and initial encoding parameters of each block in the preset number of reference frames, to obtain an importance value of each block in the current video frame; a bit rate control module, configured to adjust initial encoding parameters of each block in the current video frame based on the importance value of each block in the current video frame to obtain target encoding parameters of each block in the current video frame; The encoding module is configured to encode the current video frame using the target encoding parameters of the blocks.

11. A video encoding and decoding system, characterized in that: The device comprises a video decoder and the video encoder according to claim 10.

12. A computer program product, characterized in that The computer program product stores instructions, and when the instructions are executed by a computer, the computer implements the video encoding method according to any one of claims 1 to 7.

Citation Information

Patent Citations

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

    CN115514965A

  • Video processing method, device and equipment and computer readable storage medium

    CN115866250A

  • Video coding method and device and electronic equipment

    CN115914629A

  • Video coding method and device, electronic equipment, computer readable storage medium, computer program product and method for generating bit stream

    CN119484839A

  • Video encoding method, video encoder, electronic equipment and storage medium

    CN119946285A