Video processing method, device, electronic device and storage medium

By allocating it to multiple video processors according to the allocation parameters of the video frame sequence for parallel processing, the problem of waste and slow encoding resources of video frame sequences in different formats is solved, and more efficient encoding speed and resource utilization is achieved.

CN115606176BActive Publication Date: 2025-08-29BOE TECHNOLOGY GROUP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202080003098.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-30
Publication Date
2025-08-29
Estimated Expiration
2040-11-30

AI Technical Summary

Technical Problem

When encoding video frame sequences of different formats, the prior art is prone to waste of resources or slow encoding speed.

Method used

By obtaining the allocation parameters of the video frame sequence, the video frame sequence is assigned to multiple video processors for parallel processing according to these parameters, and the video frame sequence is processed using different combinations of the video processors, including comparisons of resolution, sampling rate, frame rate and code rate to reasonably allocate the video frame sequence.

Benefits of technology

It realizes the efficient use of video processing resources, improves encoding speed and encoding efficiency, and reduces the use of hardware resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115606176B_ABST
    Figure CN115606176B_ABST
Patent Text Reader

Abstract

Disclosed is a video processing method, comprising: obtaining a video frame sequence; obtaining allocation parameters of the video frame sequence, and allocating the video frame sequence to at least one video processor according to the allocation parameters; and processing the allocated video frame sequence using the at least one video processor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Video is a continuous sequence of images, consisting of consecutive frames, with each frame representing an image. Due to the human eye's persistence of vision, when a frame sequence is played at a certain rate, we perceive it as a video of continuous motion. Because consecutive frames are highly similar, to facilitate storage and transmission, the original video must be encoded and compressed to remove redundancy in both spatial and temporal dimensions. Summary of the Invention

[0003] In one aspect, a video processing method is provided, comprising: obtaining a video frame sequence; obtaining allocation parameters of the video frame sequence; and allocating the video frame sequence to at least one video processor based on the allocation parameters; and processing the allocated video frame sequence using the at least one video processor.

[0004] In some embodiments, acquiring allocation parameters of a video frame sequence and allocating the video frame sequence to at least one video processor based on the allocation parameters includes: acquiring a video frame sequence; determining at least one video parameter of the video frame sequence based on the video frame sequence, the at least one video parameter including at least one of resolution, sampling rate, frame rate and bit rate; comparing the at least one video parameter with at least one video parameter threshold to obtain a comparison result; and allocating the video frame sequence to at least one video processor based on the comparison result.

[0005] In some embodiments, the comparing the at least one video parameter with at least one video parameter threshold to obtain a comparison result; and assigning the video frame sequence to at least one video processor based on the comparison result, comprises: determining that the at least one video parameter includes the resolution of the video frame sequence, and determining that the at least one video parameter threshold includes a first resolution and a second resolution, the first resolution being smaller than the second resolution; comparing the resolution of the video frame sequence with the first resolution and the second resolution to obtain a first sub-result; if the first sub-result is that the resolution of the video frame sequence is smaller than or equal to the first resolution, assigning the video frame sequence to the first group of video processors; if the first sub-result is that the resolution of the video frame sequence is greater than the first resolution and smaller than the second resolution, assigning the video frame sequence to the second group of video processors; wherein the number of the video processors in the second group of video processors is greater than the number of the video processors in the first group of video processors.

[0006] In some embodiments, the comparing the at least one video parameter with at least one video parameter threshold to obtain a comparison result; and assigning the video frame sequence to at least one video processor based on the comparison result, further includes: if the first sub-result is that the resolution of the video frame sequence is greater than or equal to the second resolution, determining that the at least one video parameter also includes the sampling rate of the video frame sequence, and determining that the at least one video parameter threshold also includes a first sampling rate and a second sampling rate, and the first sampling rate is higher than the second sampling rate; comparing the sampling rate of the video frame sequence with the first sampling rate and the second sampling rate to obtain a second sub-result; if the second sub-result is that the sampling rate of the video frame sequence is equal to the first sampling rate, assigning the video frame sequence to the third group of video processors; wherein the number of the video processors in the third group of video processors is greater than the number of the video processors in the second group of video processors.

[0007] In some embodiments, the comparing the at least one video parameter with at least one video parameter threshold to obtain a comparison result; assigning the video frame sequence to at least one video processor based on the comparison result, further includes: if the second sub-result is that the sampling rate of the video frame sequence is equal to the second sampling rate, determining that the at least one video parameter also includes the frame rate of the video frame sequence, and determining that the at least one video parameter threshold also includes a first frame rate and a second frame rate, and the first frame rate is less than the second frame rate; comparing the frame rate of the video frame sequence with the first frame rate and the second frame rate to obtain a third sub-result; if the third sub-result is that the frame rate of the video frame sequence is less than or equal to the first frame rate, assigning the video frame sequence to the first group of video processors; if the third sub-result is that the frame rate of the video frame sequence is greater than the first frame rate, assigning the video frame sequence to the second group of video processors or the third group of video processors.

[0008] In some embodiments, the at least one video parameter is compared with at least one video parameter threshold to obtain a comparison result; and the video frame sequence is assigned to at least one video processor based on the comparison result, and further includes: if the third sub-result is that the frame rate of the video frame sequence is greater than or equal to the second frame rate, the video frame sequence is assigned to the third group of video processors.

[0009] In some embodiments, the comparing the at least one video parameter with at least one video parameter threshold to obtain a comparison result; and assigning the video frame sequence to at least one video processor based on the comparison result, further includes: if the third sub-result is that the frame rate of the video frame sequence is greater than the first frame rate and less than the second frame rate, determining that the at least one video parameter also includes the bit rate of the video frame sequence, and determining that the at least one video parameter threshold also includes a preset bit rate; comparing the bit rate of the video frame sequence with the preset bit rate to obtain a fourth sub-result; if the fourth sub-result is that the bit rate of the video frame sequence is less than the preset bit rate, assigning the video frame sequence to the second group of video processors; if the fourth sub-result is that the bit rate of the video frame sequence is greater than or equal to the preset bit rate, assigning the video frame sequence to the third group of video processors.

[0010] In some embodiments, the obtaining of allocation parameters of a video frame sequence and allocating the video frame sequence to at least one video processor according to the frequency division parameters further includes: dividing the video frame sequence into first to Nth subsequences in playback order, where N is greater than or equal to 2; dividing the first to Nth subsequences into at least one part to be encoded, where the number of parts to be encoded is the same as the number of determined video processors, and one part to be encoded includes at least one subsequence; and allocating each part to be encoded and the encoding information corresponding to the part to be encoded to one of the video processors.

[0011] In some embodiments, the video processing method further includes: detecting whether the first to Nth buffer areas corresponding to the first to Nth subsequences receive the N encoded data generated by all the video processors in a one-to-one correspondence; if the first to Nth buffer areas receive the N encoded data in a one-to-one correspondence, then encapsulating the N encoded data in the first to Nth buffer areas and sending them.

[0012] In some embodiments, the video processing method also includes: if there are some buffer areas in the first to Nth buffer areas that have not received or have not fully received the corresponding encoded data, then determining whether the duration between the current moment and the moment when the first to Nth buffer areas start to receive the first encoded data exceeds the receiving duration threshold; if not, the said part of the buffer areas continue to be in the receiving state; if so, the encoded data in the other buffer areas in the first to Nth buffer areas except the said part of the buffer areas are encapsulated and sent.

[0013] In some embodiments, obtaining allocation parameters of a video frame sequence and allocating the video frame sequence to at least one video processor based on the frequency division parameters further includes: obtaining status parameters of the video processor; and allocating the video frame sequence to the at least one video processor based on the status parameters of the video processor.

[0014] In some embodiments, allocating the video frame sequence to the at least one video processor based on the state parameters of the video processor includes: determining the encoding speeds of at least two of the video processors based on the state parameters of the video processor; dividing the video frame sequence into at least two to-be-encoded parts corresponding to the at least two video processors in a playback order based on the encoding speeds of the at least two video processors; wherein the length of the to-be-encoded part is positively correlated with the encoding speed of the video processor, and one to-be-encoded part includes at least one subsequence; and allocating each to-be-encoded part and the encoding information corresponding to the to-be-encoded part to a corresponding one of the video processors.

[0015] In some embodiments, the processing of the allocated video frame sequence by the at least one video processor includes: each of the video processors sequentially encoding all subsequences in the to-be-encoded portion according to the encoding information.

[0016] In another aspect, a video processing device is provided. The device includes a central processing unit (CPU) and at least two video processors, wherein the CPU is configured to: obtain a video frame sequence; obtain allocation parameters for the video frame sequence; and allocate the video frame sequence to at least one video processor based on the allocation parameters; and process the allocated video frame sequence using the at least one video processor.

[0017] In some embodiments, the central processing unit of the video processor is configured to: divide the video frame sequence into first to Nth subsequences in the playback order, where N is greater than or equal to 2; divide the first to Nth subsequences into at least one part to be encoded, where the number of parts to be encoded is the same as the number of determined video processors, and one part to be encoded includes at least one subsequence video processor; and assign each part to be encoded and the encoding information corresponding to the part to be encoded to one of the video processors.

[0018] In some embodiments, the video processing device further includes a memory connected to all of the video processors simultaneously, the memory including first to Nth buffer areas, where N is greater than or equal to 2. Each of the video processors is configured to sequentially encode all subsequences in the portion to be encoded according to the encoding information to generate at least one encoded data; wherein each encoded data corresponds to a subsequence in the portion to be encoded; and the encoded data is sent to the buffer area with the same number according to the corresponding subsequence number.

[0019] In another aspect, an electronic device is provided, comprising: the video processing device according to any one of the above embodiments.

[0020] In some embodiments, the electronic device is a display device.

[0021] In another aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed on a processor, the processor executes the video processing method as described in any one of the above embodiments.

[0022] In another aspect, a computer program product is provided, wherein the computer program product includes computer program instructions, and when the computer program instructions are executed on a computer, the computer program instructions cause the computer to execute the video processing method according to any one of the above embodiments.

[0023] In another aspect, a computer program is provided, which, when executed on a computer, causes the computer to execute the video processing method according to any one of the above embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] To more clearly illustrate the technical solutions of the present disclosure, the following briefly introduces the drawings required for use in some embodiments of the present disclosure. Obviously, the drawings described below are only drawings of some embodiments of the present disclosure, and those skilled in the art can also derive other drawings based on these drawings. Furthermore, the drawings described below are schematic diagrams and are not intended to limit the actual dimensions of the products, actual processes of the methods, actual timing of signals, and the like involved in the embodiments of the present disclosure.

[0025] Figure 1 is a flowchart of a video processing method according to some embodiments;

[0026] Figure 2 is a flowchart of another video processing method according to some embodiments;

[0027] Figure 3 is a flowchart of yet another video processing method according to some embodiments;

[0028] Figure 4 is a flowchart of another video processing method according to some embodiments;

[0029] Figure 5 is a flowchart of another video processing method according to some embodiments;

[0030] Figure 6 is a flowchart of another video processing method according to some embodiments;

[0031] Figure 7 is a flowchart of another video processing method according to some embodiments;

[0032] Figure 8 is a flowchart of another video processing method according to some embodiments;

[0033] Figure 9 is a block diagram of a video processing device according to some embodiments;

[0034] Figure 10 is a flowchart of another video processing method according to some embodiments;

[0035] Figure 11 is a flowchart of another video processing method according to some embodiments;

[0036] Figure 12 is a flowchart of another video processing method according to some embodiments;

[0037] Figure 13 is a flowchart of another video processing method according to some embodiments;

[0038] Figure 14 is a block diagram of another video processing apparatus according to some embodiments;

[0039] Figure 15 is a block diagram of yet another video processing device according to some embodiments;

[0040] Figure 16 is a structural diagram of an electronic device according to some embodiments. DETAILED DESCRIPTION

[0041] The following will be combined with the accompanying drawings to clearly and completely describe the technical solutions in some embodiments of the present disclosure. Obviously, the embodiments described are only some embodiments of the present disclosure, not all embodiments. Based on the embodiments provided by the present disclosure, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of the present disclosure.

[0042] Unless the context requires otherwise, throughout the specification and claims, the term "comprise" and its other forms, such as the third person singular form "comprises" and the present participle form "comprising", are to be interpreted as open and inclusive, that is, "including, but not limited to". In the description of the specification, the terms "one embodiment", "some embodiments", "exemplary embodiments", "example", "specific example" or "some examples" are intended to indicate that the particular features, structures, materials or characteristics associated with the embodiment or example are included in at least one embodiment or example of the present disclosure. The schematic representation of the above terms does not necessarily refer to the same embodiment or example. In addition, the particular features, structures, materials or characteristics may be included in any one or more embodiments or examples in any appropriate manner.

[0043] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more.

[0044] When describing some embodiments, the expressions "coupled" and "connected" and their derivatives may be used. For example, when describing some embodiments, the term "connected" may be used to indicate that two or more components are in direct physical or electrical contact with each other. For another example, when describing some embodiments, the term "coupled" may be used to indicate that two or more components are in direct physical or electrical contact. However, the term "coupled" or "communicatively coupled" may also refer to two or more components that are not in direct contact with each other, but still cooperate or interact with each other. The embodiments disclosed herein are not necessarily limited to the contents of this document.

[0045] “At least one of A, B and C” has the same meaning as “at least one of A, B or C” and both include the following combinations of A, B and C: A only, B only, C only, the combination of A and B, the combination of A and C, the combination of B and C, and the combination of A, B and C.

[0046] “A and / or B” includes the following three combinations: A only, B only, and a combination of A and B.

[0047] As used herein, the term "if" is optionally interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined that" or "if [stated condition or event] is detected" are optionally interpreted to mean "upon determining" or "in response to determining" or "upon detecting [stated condition or event]" or "in response to detecting [stated condition or event]," depending on the context.

[0048] The use of "adapted to" or "configured to" herein is intended to be open and inclusive language that does not exclude devices adapted or configured to perform additional tasks or steps.

[0049] Additionally, the use of “based on” is meant to be open and inclusive, as a process, step, calculation, or other action “based on” one or more stated conditions or values ​​may, in practice, be based on additional conditions or values ​​beyond those stated.

[0050] As used herein, "about" or "approximately" includes the stated value and the average value that is within an acceptable range of deviation from the particular value, where the acceptable range of deviation is determined by one of ordinary skill in the art taking into account the measurements in question and the errors associated with the measurement of the particular quantity (i.e., the limitations of the measurement system).

[0051] Video quality varies across different application scenarios, leading to diverse formats of raw video frame sequences. This means their resolution, frame rate, bit rate, sampling rate, and other characteristics are uncertain. Consequently, using the same coding resources to encode raw video frame sequences of different formats can lead to wasted coding resources or slow encoding speeds.

[0052] Based on this, some embodiments of the present disclosure provide a video processing method, such as Figure 1 As shown, the video processing method includes:

[0053] S1. Obtain a video frame sequence.

[0054] A video frame sequence consists of multiple images, each of which is a frame. Due to the persistence of vision effect of the human eye, when multiple images are played back at a certain rate, the human eye perceives a video with continuous motion.

[0055] The video frame sequence can be a YUV video frame sequence. YUV is divided into three components: "Y" represents luminance (Luminance or Luma), which is the grayscale value; while "U" and "V" represent chrominance (Chroma), which describes the color and saturation of the image and is used to specify the color of the pixel.

[0056] S2. Obtain allocation parameters of a video frame sequence, and allocate the video frame sequence to at least one video processor according to the allocation parameters.

[0057] S3. Utilize the at least one video processor to process the allocated video frame sequence.

[0058] Through the above S1 to S3, for example, the video frame sequence can be divided into multiple groups according to the allocation parameters, and then allocated to multiple video processors for parallel processing, thereby facilitating faster processing of the video frame sequence.

[0059] In some examples, such as Figure 2 As shown, the above S2, obtaining allocation parameters of the video frame sequence, and allocating the video frame sequence to at least one video processor according to the allocation parameters, includes:

[0060] S21. Determine at least one video parameter of the video frame sequence according to the video frame sequence, where the at least one video parameter includes at least one of resolution, sampling rate, frame rate, and bit rate.

[0061] Among them, the resolution determines the fineness of the image. Generally speaking, the higher the resolution, the more pixels the image contains and the clearer the image is.

[0062] The sampling rate determines the color quality of an image. For example, in a YUV video frame sequence, a sampling rate of 4:2:2 means that every two Ys share a set of UV components; a sampling rate of 4:4:4 means that every Y corresponds to a set of UV components. Obviously, images with a sampling rate of 4:4:4 have higher color quality.

[0063] Frame rate refers to the frequency at which frame images appear continuously in a video frame sequence.

[0064] Bit rate refers to the amount of data transmitted per unit time during data transmission.

[0065] S22: Compare the at least one video parameter with at least one video parameter threshold to obtain a comparison result.

[0066] For example, the resolution can be compared with a preset resolution to obtain the relative size between the resolution and the preset resolution; the sampling rate can be compared with a preset sampling rate to obtain the relative size between the sampling rate and the preset sampling rate; the frame rate can be compared with a preset frame rate to obtain the relative size between the frame rate and the preset frame rate; or, the bit rate can be compared with a preset bit rate to obtain the relative size between the bit rate and the preset bit rate.

[0067] It should be noted that the above-mentioned resolution, sampling rate, frame rate and bit rate are only some examples of video parameters. That is, in other examples, video parameters may also be other parameters in addition to resolution, sampling rate, frame rate and bit rate. For example, the other parameters may be parameters that can reflect the amount of video frame sequence data.

[0068] S23: Allocate the video frame sequence to at least one video processor according to the comparison result, wherein the video processor may be, for example, a GPU (Graphics Processing Unit).

[0069] Exemplarily, the video frame sequence can be allocated to at least one video processor based on one or more of the comparison results between the above-mentioned resolution and a preset resolution, the comparison results between the sampling rate and a preset sampling rate, the comparison results between the frame rate and a preset frame rate, and the comparison results between the bit rate and a preset bit rate.

[0070] It should be noted that the data volume of the video frame sequence can be determined by comparing the resolution with a preset resolution, the sampling rate with a preset sampling rate, the frame rate with a preset frame rate, and the bit rate with a preset bit rate. The larger the data volume of the video frame sequence, the higher the encoding complexity and the higher the encoding resources consumed. In this case, allocating the video frame sequence to more video processors will help speed up the encoding process. If the data volume of the video frame sequence is small, the video frame sequence can be allocated to fewer video processors to reduce hardware resource consumption, thereby achieving the purpose of rationally utilizing video processor resources.

[0071] Regarding the above-mentioned S22, comparing the at least one video parameter with at least one video parameter threshold to obtain a comparison result; and S23, assigning the video frame sequence to at least one video processor based on the comparison result, there are many possible implementations, for example, including but not limited to the following embodiments.

[0072] In some embodiments, see Figure 3 , S22 includes S211 and S221, and S23 includes S231 and S232.

[0073] S211. Determine that the at least one video parameter includes a resolution of the video frame sequence, and determine that the at least one video parameter threshold includes a first resolution and a second resolution, wherein the first resolution is smaller than the second resolution.

[0074] It can be understood that the higher the resolution, the finer the displayed image, and at the same time, the larger the data volume of the video frame sequence.

[0075] S221: Compare the resolution of the video frame sequence with the first resolution and the second resolution to obtain a first sub-result.

[0076] S231. If the first sub-result is that the resolution of the video frame sequence is less than or equal to the first resolution, assign the video frame sequence to a first group of video processors.

[0077] S232: If the first sub-result is that the resolution of the video frame sequence is greater than the first resolution and smaller than the second resolution, assign the video frame sequence to a second group of video processors.

[0078] The number of video processors in the second group of video processors is greater than the number of video processors in the first group of video processors. For example, the first group of video processors may include any one video processor from all video processors, and the second group of video processors may include any two video processors from all video processors. For another example, the first group of video processors may include any two video processors from all video processors, and the second group of video processors may include any four video processors from all video processors. Therefore, the present disclosure does not limit the number of video processors in the second group of video processors and the number of video processors in the first group of video processors, as long as the above-mentioned size relationship is satisfied between the two.

[0079] In addition, it should be noted that the first group of video processors and the second group of video processors may include the same video processor or may not include the same video processor, and the present disclosure does not limit this.

[0080] In this solution, when the resolution of the video frame sequence is less than the first resolution, the video frame sequence has a lower resolution. In this case, the video frame sequence typically has a smaller data volume and a lower encoding complexity. Therefore, assigning the video frame sequence to the first group of video processors for encoding can reduce the number of video processors occupied while maintaining encoding speed, thereby reducing the use of system hardware resources during the encoding process.

[0081] When the resolution of the video frame sequence is greater than the first resolution and less than the second resolution, the data volume of the video frame sequence is generally larger than when the resolution of the video frame sequence is less than or equal to the first resolution, and accordingly, the encoding complexity is also increased. In this case, assigning the video frame sequence to the second group of video processors for encoding helps to speed up encoding and improve encoding efficiency.

[0082] For example, the first resolution is approximately 4096px×2160px; and / or the second resolution is approximately 7680px×4320px. "Approximately" may refer to the stated values ​​(i.e., 4096px×2160px, 7680px×4320px), and may also refer to a fluctuation of approximately 10% above or below the stated values.

[0083] In some embodiments, see Figure 4 , S22 also includes S212 and S222, and S23 also includes S233.

[0084] S212. If the first sub-result is that the resolution of the video frame sequence is greater than or equal to the second resolution, determine that the at least one video parameter also includes the sampling rate of the video frame sequence, and determine that the at least one video parameter threshold also includes a first sampling rate and a second sampling rate, and the first sampling rate is higher than the second sampling rate.

[0085] It can be understood that the higher the sampling rate, the better the color quality of the video frame sequence, and at the same time, the larger the data volume of the video frame sequence.

[0086] S222: Compare the sampling rate of the video frame sequence with the first sampling rate and the second sampling rate to obtain a second sub-result.

[0087] When the resolution of the video frame sequence is greater than or equal to the second resolution, further combining the sampling rate of the video frame sequence to make a judgment can more accurately estimate the data volume of the video frame sequence, thereby more reasonably utilizing system hardware resources.

[0088] S333: If the second sub-result is that the sampling rate of the video frame sequence is equal to the first sampling rate, assign the video frame sequence to a third group of video processors.

[0089] The number of the video processors in the third group of video processors is greater than the number of the video processors in the second group of video processors. For example, the second group of video processors may include any two video processors from all video processors, and the third group of video processors may include any three video processors from all video processors. For another example, the second group of video processors may include any three video processors from all video processors, and the third group of video processors may include any six video processors from all video processors. Therefore, the present disclosure does not limit the number of video processors in the third group of video processors and the number of video processors in the second group of video processors, as long as the above-mentioned size relationship is satisfied between the two.

[0090] In addition, it should be noted that the third group of video processors may include the same video processor as the first group of video processors and the second group of video processors, or may not include the same video processor, and this disclosure does not limit this.

[0091] In this solution, when it is determined that the resolution of the video frame sequence is larger (that is, the resolution of the video frame sequence is greater than the second resolution), the video frame sequence is not directly allocated to a larger number of the video processors, but the sampling rate of the video frame sequence is further compared with the first sampling rate and the second sampling rate. For example, when it is further determined that the sampling rate of the video frame sequence is equal to the higher first sampling rate, it is determined that the data volume of the video frame sequence is relatively large and the encoding complexity is high, and then it is determined that the video frame sequence is allocated to the third group of video processors, so that the system hardware resources can be more reasonably utilized to speed up the encoding speed.

[0092] Exemplarily, the first sampling rate may be 4:4:4; and / or the second sampling rate may be 4:2:2.

[0093] In some embodiments, see Figure 5 , the above S22 also includes S213 and S223, and the above S23 also includes S234 and S235.

[0094] S213. If the second sub-result is that the sampling rate of the video frame sequence is equal to the second sampling rate, then determining that the at least one video parameter also includes the frame rate of the video frame sequence, and determining that the at least one video parameter threshold also includes a first frame rate and a second frame rate, and the first frame rate is less than the second frame rate.

[0095] It can be understood that the higher the frame rate, the clearer and more stable the displayed image is, and at the same time, the larger the data volume of the video frame sequence is.

[0096] S223: Compare the frame rate of the video frame sequence with the first frame rate and the second frame rate to obtain a third sub-result.

[0097] Among them, when the resolution of the video frame sequence is greater than or equal to the second resolution, and the sampling rate of the video frame sequence is equal to the second sampling rate, further combining the frame rate of the video frame sequence for judgment can more accurately estimate the data volume of the video frame sequence, thereby more reasonably utilizing system hardware resources.

[0098] S234: If the third sub-result is that the frame rate of the video frame sequence is less than or equal to the first frame rate, assign the video frame sequence to the first group of video processors.

[0099] Among them, when it is determined that the resolution of the video frame sequence is larger (that is, the resolution of the video frame sequence is greater than the second resolution) and the sampling rate of the video frame sequence is smaller (that is, the sampling rate of the video frame sequence is equal to the second sampling rate), the number of the video processors used to encode the video frame sequence is not directly determined, but the frame rate of the video frame sequence is further compared with the first frame rate. For example, when it is further determined that the frame rate of the video frame sequence is less than or equal to the smaller first frame rate, it is determined that the data volume of the video frame sequence is relatively small and the encoding complexity is low, and then it is determined that the video frame sequence is allocated to the first group of video processors. This can more reasonably utilize system hardware resources and reduce the number of video processors occupied while ensuring the encoding speed.

[0100] S235: If the third sub-result is that the frame rate of the video frame sequence is greater than the first frame rate, allocating the video frame sequence to the second group of video processors or the third group of video processors.

[0101] Among them, when it is determined that the resolution of the video frame sequence is larger (that is, the resolution of the video frame sequence is greater than the second resolution) and the sampling rate of the video frame sequence is smaller (that is, the sampling rate of the video frame sequence is equal to the second sampling rate), the number of the video processors used to encode the video frame sequence is not directly determined, but the frame rate of the video frame sequence is further compared with the first frame rate. For example, when it is further determined that the frame rate of the video frame sequence is greater than the first frame rate, it is determined that the data amount of the video frame sequence is increased compared to when the frame rate of the video frame sequence is less than or equal to the first frame rate, and the encoding complexity is increased, and then it is determined that the video frame sequence is allocated to the second group of video processors or the third group of video processors, which can more reasonably utilize system hardware resources and speed up the encoding speed.

[0102] For example, the first frame rate is approximately 30 fps, and / or the second frame rate is approximately 50 fps. "Approximately" may refer to the stated value (i.e., 30 fps, 50 fps), and may also refer to a fluctuation of approximately 10% above or below the stated value.

[0103] For example, see Figure 6 In the above video processing method, S23 may further include S236.

[0104] S236: If the third sub-result is that the frame rate of the video frame sequence is greater than the second frame rate, assign the video frame sequence to a third group of video processors.

[0105] Among them, when it is determined that the resolution of the video frame sequence is larger (that is, the resolution of the video frame sequence is greater than the second resolution) and the sampling rate of the video frame sequence is smaller (that is, the sampling rate of the video frame sequence is equal to the second sampling rate), the number of the video processors used to encode the video frame sequence is not directly determined, but the frame rate of the video frame sequence is further compared with the second frame rate. For example, when it is further determined that the frame rate of the video frame sequence is greater than the second frame rate, it is determined that the data volume of the video frame sequence is larger and the encoding complexity is increased, and then it is determined that the video frame sequence is allocated to the third group of video processors, which helps to speed up the encoding speed of the video frame sequence.

[0106] In some embodiments, see Figure 7 In the above video processing method, S22 also includes S214 and S224, and S23 also includes S237 and S238.

[0107] S214. If the third sub-result is that the frame rate of the video frame sequence is greater than the first frame rate and less than or equal to the second frame rate, determine that the at least one video parameter also includes the bit rate of the video frame sequence, and determine that the at least one video parameter threshold also includes a preset bit rate.

[0108] It can be understood that the higher the bit rate, the larger the data volume of the video frame sequence.

[0109] S224: Compare the bit rate of the video frame sequence with a preset bit rate to obtain a fourth sub-result.

[0110] Among them, when the resolution of the video frame sequence is greater than or equal to the second resolution, the sampling rate of the video frame sequence is equal to the second sampling rate, and the frame rate of the video frame sequence is greater than the first frame rate and less than or equal to the second frame rate, further combining the bit rate of the video frame sequence to make a judgment can more accurately estimate the data volume of the video frame sequence, thereby more reasonably utilizing system hardware resources.

[0111] S237: If the fourth sub-result is that the bit rate of the video frame sequence is less than the preset bit rate, assign the video frame sequence to a second group of video processors.

[0112] Among them, when it is determined that the resolution of the video frame sequence is large (that is, the resolution of the video frame sequence is greater than the second resolution), the sampling rate of the video frame sequence is small (that is, the sampling rate of the video frame sequence is equal to the second sampling rate), and the frame rate of the video frame sequence is medium (that is, the frame rate of the video frame sequence is greater than the first frame rate and less than or equal to the second frame rate), the number of video processors used to encode the video frame sequence is not directly determined, but the bit rate of the video frame sequence is further compared with the preset bit rate. For example, when it is further determined that the bit rate of the video frame sequence is less than the preset bit rate, it is determined that the data amount of the video frame sequence is medium and the encoding complexity is medium, and then it is determined that the video frame sequence is allocated to the second group of video processors. This is conducive to the rational use of system hardware resources and speeding up the encoding speed of the video frame sequence.

[0113] S238. If the fourth sub-result is that the bit rate of the video frame sequence is greater than or equal to the preset bit rate, allocate the video frame sequence to a third group of video processors.

[0114] Among them, when it is determined that the resolution of the video frame sequence is large (that is, the resolution of the video frame sequence is greater than the second resolution), the sampling rate of the video frame sequence is small (that is, the sampling rate of the video frame sequence is equal to the second sampling rate), and the frame rate of the video frame sequence is medium (that is, the frame rate of the video frame sequence is greater than the first frame rate and less than or equal to the second frame rate), the number of video processors used to encode the video frame sequence is not directly determined, but the bit rate of the video frame sequence is further compared with the preset bit rate. For example, when it is further determined that the bit rate of the video frame sequence is greater than or equal to the preset bit rate, it is determined that the data volume of the video frame sequence is large and the encoding complexity is high, and then it is determined that the video frame sequence is allocated to the third group of video processors, which helps to speed up the encoding speed of the video frame sequence.

[0115] For example, the preset bit rate is about 100 Mbps, where "about" may refer to the stated value, and may also refer to a value that fluctuates by about 10% based on the stated value.

[0116] In some embodiments, as Figure 8 As shown, the above S2, obtaining allocation parameters of the video frame sequence, and allocating the video frame sequence to at least one video processor according to the allocation parameters, also includes S24 to S26.

[0117] S24. Divide the video frame sequence into first to Nth subsequences in a playback order, where N is greater than or equal to 2.

[0118] For example, suppose a video frame sequence includes 90 consecutive images, and the playback order is from image 1 to image 90. In this case, images 1 to 10 can be used as the first subsequence, images 11 to 20 as the second subsequence, images 21 to 30 as the third subsequence, images 31 to 40 as the fourth subsequence, images 41 to 50 as the fifth subsequence, images 51 to 60 as the sixth subsequence, images 61 to 70 as the seventh subsequence, images 71 to 80 as the eighth subsequence, and images 81 to 90 as the ninth subsequence. In other words, N can be equal to 9.

[0119] S25. Divide the first to Nth subsequences into at least one to-be-encoded part, where the number of the to-be-encoded parts is the same as the number of the determined video processors, and one to-be-encoded part includes at least one subsequence.

[0120] For example, if it is determined that the video frame sequence needs to be assigned to one video processor, the first to Nth subsequences can be treated as a whole as a part to be encoded; if it is determined that the video frame sequence needs to be assigned to two video processors, the first to Nth subsequences can be divided into two parts to be encoded; if it is determined that the video frame sequence needs to be assigned to three video processors, the first to Nth subsequences can be divided into three parts to be encoded.

[0121] It should be noted that, for any coding part, it may include only one subsequence, or it may include at least two consecutive subsequences (for example, the first subsequence and the second subsequence), or it may also include at least two discontinuous subsequences (for example, the first subsequence and the third subsequence).

[0122] S26: Allocate each portion to be encoded and the encoding information corresponding to the portion to be encoded to one of the video processors. In this case, only one video processor may be used to encode the received portion to be encoded based on the received encoding information, or multiple video processors may be used simultaneously to encode multiple corresponding portions to be encoded in parallel.

[0123] The encoding information may be a video encoding parameter set including encoding parameters such as key frame interval, frame rate, and resolution.

[0124] Taking the first to ninth subsequences as an example, the first frame of each subsequence can be set as a key frame. At the same time, since there are 10 images in each subsequence, the key frame interval is 10. Of course, this is only an example. In other embodiments of the present disclosure, the key frame interval is not necessarily set to 10. For example, the key frame interval can also be 9, 25, 50, etc.

[0125] Exemplarily, each of the video processors encodes all subsequences in the portion to be encoded in sequence according to the encoding information. After encoding the received portion to be encoded, each video processor generates at least one encoded data (e.g., first encoded data and third encoded data), each encoded data corresponding to a subsequence in the portion to be encoded (e.g., the first encoded data corresponds to the first subsequence, and the third encoded data corresponds to the third subsequence). Afterwards, the video processor can send the encoded data to the buffer area with the same number according to the number of the corresponding subsequence (e.g., the first encoded data can be sent to the first buffer area, and the third encoded data can be sent to the third buffer area). This design allows the N encoded data generated after parallel encoding to be arranged in order and not easily confused.

[0126] There are many ways to put N coded data into the corresponding buffer area. For example, taking N=9 as an example, see Figure 9 , the 9 encoded data can be put into the corresponding buffer area in the following way.

[0127] If (GOP_Num%9=0, that is, the difference between the ninth encoded data and 9 is 0), the data is put into buffer0 (that is, the first buffer area).

[0128] If (GOP_Num%9=1, that is, the difference between the eighth encoded data and 9 is 1), the data is put into buffer1 (that is, the second buffer area).

[0129] If (GOP_Num%9=2, that is, the difference between the seventh encoded data and 9 is 2), the data is put into buffer1 (that is, the third buffer area).

[0130] If (GOP_Num%9=3, that is, the difference between the sixth encoded data and 9 is 3), the data is put into buffer1 (that is, the fourth buffer area).

[0131] If (GOP_Num%9=4, that is, the difference between the fifth encoded data and 9 is 4), the data is put into buffer1 (that is, the fifth buffer area).

[0132] If (GOP_Num%9=5, that is, the remainder of the fourth encoded data and 9 is 5), the data is put into buffer1 (that is, the sixth buffer area).

[0133] If (GOP_Num%9=6, that is, the remainder of the third encoded data and 9 is 6, the data is put into buffer1 (that is, the seventh buffer area).

[0134] If (GOP_Num%9=7, that is, the remainder of the second encoded data and 9 is 7), the data is put into buffer1 (that is, the eighth buffer area).

[0135] If (GOP_Num%9=8, that is, the remainder of the first encoded data and 9 is 8), the data is put into buffer1 (that is, the ninth buffer area).

[0136] Among them, the I frames in each buffer (for example, I0~I n ) is a key frame. There can be multiple P frames between the key frame of the first buffer area and the key frame of the second buffer area. For example, when i=9, there can be 9 P frames. At this time, the interval between two adjacent I frames is recorded as 10.

[0137] The above-mentioned buffer area may be a buffer area in a memory connected to the video processor. For example, the memory may include the first to Nth buffer areas.

[0138] On this basis, for example, Figure 10 As shown, the encoding method further includes S5 and S6.

[0139] S5. Detect whether the first to Nth buffer areas corresponding to the first to Nth subsequences have received N coded data generated by encoding by all the video processors in a one-to-one correspondence.

[0140] S6. If the first to Nth buffer areas receive the N coded data in a one-to-one correspondence, encapsulate the N coded data in the first to Nth buffer areas and then send them.

[0141] Wherein, when the first to Nth buffer areas receive the N coded data one by one, it means that the coding of this video frame sequence is completed.

[0142] Exemplarily, the N coded data may be encapsulated and sent via RTP (Real-time Transport Protocol) after adding a video coding parameter set, wherein the video coding parameter set may be, for example, sps (Sequence Parameter Set), pps (Picture Parameter Set), etc.

[0143] Exemplarily, after the N coded data are encapsulated and sent, the coded data in the first to Nth buffer areas are cleared so that the first to Nth buffer areas can be used to store the coded data of the next video frame sequence.

[0144] In some embodiments, as Figure 11 As shown, the video processing method further includes S7 to S9.

[0145] S7. If some of the first to Nth buffer areas have not received or have not fully received the corresponding encoded data, determine whether the time between the current moment and the moment when the first to Nth buffer areas start to receive the first encoded data exceeds the receiving time threshold.

[0146] If not, execute S8 and the part of the buffer area continues to be in the receiving state.

[0147] If so, execute S9, encapsulate the coded data in the other buffer areas of the first to Nth buffer areas except the partial buffer areas and send them.

[0148] The receiving time threshold may be, for example, 300ms. It is understood that the receiving time threshold may be determined based on the total data volume of the video frame sequence to be encoded. That is, if the total data volume of the video frame sequence to be encoded increases, the corresponding receiving time threshold will also increase; and if the total data volume of the video frame sequence to be encoded decreases, the corresponding receiving time threshold will also decrease.

[0149] By setting the above-mentioned receiving time threshold, it is possible to avoid that some buffer areas are not filled normally due to problems with different video processors, resulting in the coded data in other buffer areas not being properly encapsulated and sent.

[0150] Exemplarily, after the N coded data are encapsulated and sent, the coded data in the first to Nth buffer areas are cleared so that the first to Nth buffer areas can be used to store the coded data of the next video frame sequence.

[0151] In other embodiments, Figure 12 As shown, the above S2, obtaining allocation parameters of the video frame sequence, and allocating the video frame sequence to at least one video processor according to the allocation parameters, includes:

[0152] S27: Obtain status parameters of the video processor.

[0153] S28. Allocate the video frame sequence to the at least one video processor according to the state parameters of the video processor.

[0154] According to the state parameters of the video processor, for example, it can be determined whether the video processor has completed the encoding process of the previous portion to be encoded, or the encoding speed of the video processor.

[0155] For example, Figure 13 As shown, allocating the video frame sequence to the at least one video processor according to the state parameters of the video processor may include S281 to S283.

[0156] S281. Determine encoding speeds of at least two of the video processors according to state parameters of the video processors.

[0157] S282. According to the encoding speeds of at least two of the video processors, the video frame sequence is divided into at least two parts to be encoded corresponding to the at least two video processors in a playback order; wherein the length of the part to be encoded is positively correlated with the encoding speed of the video processor (for example, the two can be in a directly proportional relationship), and one part to be encoded includes at least one subsequence.

[0158] S283: Allocate each to-be-encoded portion and the encoding information corresponding to the to-be-encoded portion to a corresponding video processor.

[0159] Afterwards, each of the video processors may sequentially encode all subsequences in the portion to be encoded according to the encoding information. Specific encoding processes can be found in the previous description and will not be described in detail here.

[0160] This design allows for dynamic allocation of video frame sequences when processed in parallel by two or more video processors. For example, allocation can be based on encoding speed: longer portions to be encoded (i.e., portions with larger data volumes) can be allocated to the faster encoding processor, while shorter portions to be encoded (i.e., portions with smaller data volumes) can be allocated to the faster encoding processor. This results in a more balanced load on the two or more video processors, allowing for faster processing of the video frame sequence.

[0161] The lengths of the subsequences can be equal (i.e., each subsequence includes the same frame). In this case, the length of each portion to be encoded can be changed by changing the number of subsequences in each portion to be encoded. Alternatively, the lengths of the subsequences can be unequal. In this case, the length of each portion to be encoded can be changed by changing the length and / or number of subsequences in each portion to be encoded.

[0162] For example, assuming that a 60-frame YUY video frame sequence is captured at the first second, the 60-frame YUY video frame sequence is directly allocated to, for example, two video processors, or the 60-frame YUY video frame sequence is allocated to, for example, two video processors according to the comparison result of the at least one video parameter and the at least one video parameter threshold. In this case, the 60-frame YUY video frame sequence captured at the first second can be directly divided into two equal-length portions to be encoded, for example, each portion to be encoded includes a 30-frame subsequence. At the same time, after the 60-frame YUY video frame sequence captured at the second second arrives, the encoding speeds of the two video processors can be first determined. If the encoding speed of the first video processor is faster than that of the second video processor, the 60-frame video frame sequence at the second second can be divided into two portions to be encoded of unequal lengths. For example, the first portion to be encoded can include a subsequence with 35 frames, and the other portion to be encoded can include a subsequence with 25 frames. Then, after the first video processor completes encoding, the first portion to be encoded is allocated to the first video processor; after the second video processor completes encoding, the second portion to be encoded is allocated to the second video processor.

[0163] It can be understood that if it is determined that the encoding speeds of the two video processors are the same, the 60-frame video frame sequence at the second second can be divided into two to-be-encoded parts of equal length.

[0164] The above mainly introduces the solutions provided by some embodiments of the present disclosure through method examples. Based on this, some embodiments of the present disclosure provide a video processing device. In order to realize the above functions, the video processing device may include hardware structures and / or software modules corresponding to the execution of each function. It should be easy for those skilled in the art to realize that, in combination with the method steps of each example described in the embodiments disclosed herein, the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in a hardware or computer software driven hardware manner depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present disclosure.

[0165] The video processing device provided in the embodiment of the present disclosure can be divided into functional modules according to the above-mentioned method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present disclosure is schematic and is only a logical functional division. In actual implementation, there may be other division methods.

[0166] In the case of dividing each functional module into corresponding functional modules, Figure 14 FIG. 1 shows a possible structural diagram of the video processing device involved in some of the above embodiments. Figure 14 As shown, the video processing device 200 includes at least: an acquisition module 201, an allocation module 202, and a control module 203. The acquisition module 201 can be used to support the video processing device 200 in executing the above-mentioned S1. The allocation module 202 can be used to support the video processing device 200 in executing the above-mentioned S2. The control module 203 can be used to support the video processing device 200 in executing the above-mentioned S3.

[0167] Exemplarily, the allocation module 202 may also be configured to support the video processing apparatus 200 in executing the above-mentioned S21 to S28 , S211 to S214 , S221 to S224 , S231 to S238 , and S281 to S283 .

[0168] On this basis, for example, Figure 15 As shown, the video processing device 200 may further include a detection and judgment module 204 and a sending module 205. The detection and judgment module 204 may be used to support the video processing device 200 in executing the above S4 and S6. The sending module 205 may be used to support the video processing device 200 in executing the above S5 and S8.

[0169] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0170] also, Figure 9 FIG. 4 shows another possible structural diagram of the video processing device involved in some of the above embodiments. Figure 9 As shown, the video processing device 100 includes a central processing unit 1 and at least two video processors 2. The central processing unit 1 can be configured to execute the above-mentioned S1-S8, S21-S28, S211-S214, S221-S224, S231-S238, and S281-S283.

[0171] In some examples, such as Figure 9 As shown, the video processing device 100 further includes a memory 3 , which includes first to Nth buffer areas, where N is greater than or equal to 2.

[0172] On this basis, illustratively, each video processor 2 may sequentially encode all subsequences in the received portion to be encoded according to the received encoding information to generate at least one encoded data, wherein each encoded data corresponds to a subsequence in the portion to be encoded.

[0173] Furthermore, each video processor 2 can send the coded data to a buffer with the same number according to the corresponding subsequence number, so that the multiple coded data generated after parallel coding can be arranged in order and not easily confused.

[0174] Some embodiments of the present disclosure provide an electronic device 300, such as Figure 12 As shown, the electronic device 300 includes the video processing device described in any of the above embodiments (for example, the video processing device 100 or the video processing device 200).

[0175] The electronic device 300 can execute the video processing methods described in some of the above embodiments through a video processing device. Therefore, the electronic device 300 has all the same beneficial effects as the above video processing methods, which will not be described in detail here.

[0176] The electronic device 300 may be a display device, for example, a mobile phone, a tablet computer, a television, a monitor, a laptop computer, a digital photo frame, a navigator, or any other product or component with a display function.

[0177] Some embodiments of the present disclosure provide a computer-readable storage medium (e.g., a non-transitory computer-readable storage medium), which stores computer program instructions. When the computer program instructions are executed on a processor, the processor executes the video processing method described in any of the above embodiments.

[0178] Exemplarily, the above-mentioned computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks, or magnetic tapes, etc.), optical disks (e.g., CDs (Compact Disks), DVDs (Digital Versatile Disks), etc.), smart cards, and flash memory devices (e.g., EPROMs (Erasable Programmable Read-Only Memory), cards, sticks, or key drives, etc.). The various computer-readable storage media described in the present disclosure may represent one or more devices and / or other machine-readable storage media for storing information. The term "machine-readable storage medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing, and / or carrying instructions and / or data.

[0179] Some embodiments of the present disclosure further provide a computer program product, which includes computer program instructions, and when the computer program instructions are executed on a computer, the computer program instructions cause the computer to execute the video processing method described in the above embodiments.

[0180] Some embodiments of the present disclosure further provide a computer program. When the computer program is executed on a computer, the computer program enables the computer to perform the video processing method described in the above embodiments.

[0181] The beneficial effects of the above-mentioned computer-readable storage medium, computer program product and computer program are the same as the beneficial effects of the video processing methods described in some of the above-mentioned embodiments, and will not be repeated here.

[0182] The above description is merely a specific embodiment of the present disclosure, but the scope of protection of the present disclosure is not limited thereto. Any changes or substitutions that a person skilled in the art can conceive within the technical scope disclosed in the present disclosure should be included within the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.

Claims

1. A video processing method, characterized in that: include: Get video frame sequence; Acquiring allocation parameters of a video frame sequence, and allocating the video frame sequence to at least one video processor according to the allocation parameters; The allocation parameters include a comparison result between at least one video parameter of the video frame sequence and a threshold value corresponding to each video parameter, and a state parameter of a video processor; wherein the at least one video parameter includes at least one of resolution, sampling rate, frame rate, and bit rate; different comparison results correspond to different numbers of at least one video processor; and the state parameter of the video processor is used to determine whether the video processor has completed the encoding process of the previous portion to be encoded; The video frame sequence is allocated to the at least one video processor according to the comparison result or the state parameter of the at least one video processor, and the allocated video frame sequence is processed by the at least one video processor.

2. The video processing method according to claim 1, wherein: The obtaining of allocation parameters of a video frame sequence and allocating the video frame sequence to at least one video processor according to the allocation parameters includes: Comparing the at least one video parameter with at least one video parameter threshold to obtain a comparison result; The video frame sequence is distributed to at least one video processor according to the comparison result.

3. The video processing method according to claim 2, wherein: comparing the at least one video parameter with at least one video parameter threshold to obtain a comparison result; Allocating the video frame sequence to at least one video processor according to the comparison result includes: determining that the at least one video parameter includes a resolution of the sequence of video frames, and determining that the at least one video parameter threshold includes a first resolution and a second resolution, the first resolution being less than the second resolution; Comparing the resolution of the video frame sequence with the first resolution and the second resolution to obtain a first sub-result; If the first sub-result is that the resolution of the video frame sequence is less than or equal to the first resolution, allocating the video frame sequence to a first group of the video processors; If the first sub-result is that the resolution of the video frame sequence is greater than the first resolution and less than the second resolution, allocating the video frame sequence to a second group of the video processors; The number of the video processors in the second group of video processors is greater than the number of the video processors in the first group of video processors.

4. The video processing method according to claim 3, wherein: The step of comparing the at least one video parameter with at least one video parameter threshold to obtain a comparison result; and allocating the video frame sequence to at least one video processor based on the comparison result, further comprising: If the first sub-result is that the resolution of the video frame sequence is greater than or equal to the second resolution, determining that the at least one video parameter further includes a sampling rate of the video frame sequence, and determining that the at least one video parameter threshold further includes a first sampling rate and a second sampling rate, wherein the first sampling rate is higher than the second sampling rate; Comparing the sampling rate of the video frame sequence with the first sampling rate and the second sampling rate to obtain a second sub-result; If the second sub-result is that the sampling rate of the video frame sequence is equal to the first sampling rate, determining to allocate the video frame sequence to a third group of the video processors; The number of the video processors in the third group of video processors is greater than the number of the video processors in the second group of video processors.

5. The video processing method according to claim 4, wherein: The step of comparing the at least one video parameter with at least one video parameter threshold to obtain a comparison result; and allocating the video frame sequence to at least one video processor based on the comparison result, further comprising: If the second sub-result is that the sampling rate of the video frame sequence is equal to the second sampling rate, determining that the at least one video parameter also includes a frame rate of the video frame sequence, and determining that the at least one video parameter threshold also includes a first frame rate and a second frame rate, and the first frame rate is less than the second frame rate; Comparing the frame rate of the video frame sequence with the first frame rate and the second frame rate to obtain a third sub-result; If the third sub-result is that the frame rate of the video frame sequence is less than or equal to the first frame rate, allocating the video frame sequence to the first group of video processors; If the third sub-result is that the frame rate of the video frame sequence is greater than the first frame rate, the video frame sequence is allocated to the second group of video processors or the third group of video processors.

6. The video processing method according to claim 5, characterized in that: The step of comparing the at least one video parameter with at least one video parameter threshold to obtain a comparison result; and allocating the video frame sequence to at least one video processor based on the comparison result, further comprising: If the third sub-result is that the frame rate of the video frame sequence is greater than or equal to the second frame rate, the video frame sequence is allocated to the third group of video processors.

7. The video processing method according to claim 5, characterized in that: The step of comparing the at least one video parameter with at least one video parameter threshold to obtain a comparison result; and allocating the video frame sequence to at least one video processor based on the comparison result, further comprising: If the third sub-result is that the frame rate of the video frame sequence is greater than the first frame rate and less than the second frame rate, determining that the at least one video parameter also includes the bit rate of the video frame sequence, and determining that the at least one video parameter threshold also includes a preset bit rate; Comparing the bit rate of the video frame sequence with a preset bit rate to obtain a fourth sub-result; If the fourth sub-result is that the bit rate of the video frame sequence is less than the preset bit rate, allocating the video frame sequence to the second group of video processors; If the fourth sub-result is that the bit rate of the video frame sequence is greater than or equal to the preset bit rate, the video frame sequence is allocated to the third group of video processors.

8. The video processing method according to any one of claims 1 to 7, characterized in that: The step of obtaining allocation parameters of a video frame sequence and allocating the video frame sequence to at least one video processor according to the allocation parameters further includes: Dividing the video frame sequence into first to Nth subsequences in the playback order, where N is greater than or equal to 2; Dividing the first to Nth subsequences into at least one to-be-encoded portion, wherein the number of the to-be-encoded portions is the same as the number of the determined video processors, and one to-be-encoded portion includes at least one subsequence; Each to-be-encoded portion and the encoding information corresponding to the to-be-encoded portion are allocated to one of the video processors.

9. The video processing method according to claim 8, characterized in that: Also includes: detecting whether first to Nth buffer areas corresponding to the first to Nth subsequences have received N coded data generated by encoding by all the video processors in a one-to-one correspondence; If the first to Nth buffer areas receive the N coded data in a one-to-one correspondence, the N coded data in the first to Nth buffer areas are encapsulated and then sent.

10. The video processing method according to claim 9, characterized in that: Also includes: If some of the first to Nth buffer areas have not received or have not fully received the corresponding coded data, determining whether the time between the current moment and the moment when the first to Nth buffer areas start receiving the first coded data exceeds a reception time threshold; If not, the partial buffer area continues to be in the receiving state; If so, the coded data in the other buffer areas of the first to Nth buffer areas except the partial buffer areas are encapsulated and sent.

11. The video processing method according to claim 1, wherein: Allocating the video frame sequence to the at least one video processor according to the state parameter of the video processor includes: determining encoding speeds of at least two of the video processors according to state parameters of the video processors; Dividing the video frame sequence into at least two to-be-encoded portions corresponding to the at least two video processors in a playback order according to encoding speeds of the at least two video processors; wherein the length of the to-be-encoded portion is positively correlated with the encoding speed of the video processor, and each to-be-encoded portion includes at least one subsequence; Each to-be-encoded portion and the encoding information corresponding to the to-be-encoded portion are allocated to a corresponding one of the video processors.

12. The video processing method according to any one of claims 9, 10 and 11, characterized in that: The processing of the allocated video frame sequence by the at least one video processor comprises: Each video processor is used to sequentially encode all subsequences in the to-be-encoded portion according to the encoding information.

13. A video processing device, characterized in that: The system includes a central processing unit and at least two video processors, wherein the central processing unit is configured to perform the following operations: Get video frame sequence; Obtaining allocation parameters of a video frame sequence, and allocating the video frame sequence to at least one video processor based on the allocation parameters; the allocation parameters include a comparison result between at least one video parameter of the video frame sequence and a threshold value corresponding to each video parameter, and a state parameter of the video processor; wherein the at least one video parameter includes at least one of resolution, sampling rate, frame rate, and bit rate; different comparison results correspond to different numbers of at least one video processor; the state parameter of the video processor is used to determine whether the video processor has completed the encoding process of the previous portion to be encoded and / or the encoding speed of the video processor; The video frame sequence is allocated to the at least one video processor according to the comparison result or the state parameter of the at least one video processor, and the allocated video frame sequence is processed by the at least one video processor.

14. The video processing device according to claim 13, wherein: The central processing unit is specifically configured as follows: Dividing the video frame sequence into first to Nth subsequences in the playback order, where N is greater than or equal to 2; Dividing the first to Nth subsequences into at least one to-be-encoded portion, wherein the number of the to-be-encoded portions is the same as the number of the determined video processors, and one to-be-encoded portion includes at least one subsequence; Each to-be-encoded portion and the encoding information corresponding to the to-be-encoded portion are allocated to one of the video processors.

15. The video processing device according to claim 14, wherein: Also included is a memory connected to all of the video processors simultaneously, the memory including first to Nth buffer areas, wherein N is greater than or equal to 2; Each of the video processors is configured to sequentially encode all subsequences in the portion to be encoded according to the encoding information to generate at least one encoded data; wherein each encoded data corresponds to a subsequence in the portion to be encoded; The encoded data is sent to the buffer area with the same number according to the number of the corresponding subsequence.

16. An electronic device, characterized in that: include: The video processing device according to any one of claims 13 to 15.

17. The electronic device according to claim 16, wherein: The electronic device is a display device.

18. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions. When the computer program instructions are executed on a central processing unit, the central processing unit is enabled to execute the video processing method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Parallel video processing apparatus using multicore system and method thereof

    US20170238000A1

  • Parallel video processing using multicore system

    US20180089000A1