Video processing method and device, equipment and medium
By dividing video frames into extended slices and using time-division multiplexing compression coding, the problems of high hardware requirements and power consumption in existing technologies are solved, achieving more efficient video processing.
Patent Information
- Application Number
- CN202511509328.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2026-01-23
AI Technical Summary
Existing technologies have high requirements for hardware conditions, bandwidth and power consumption in video frame processing, which leads to increased chip costs.
The video frame is divided into multiple extended slices, each of which includes multiple sub-slices. Compression encoding is performed in the encoding unit using a time-division multiplexing method, which reduces the requirement for the number of encoding units and makes full use of the idle time of the encoding unit.
It reduced chip area and power consumption requirements while improving resource utilization and video processing efficiency without affecting the total processing time.
Smart Images

Figure CN121397263A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of video processing technology, and in particular to a video processing method, video processing apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] Display Stream Compression (DSC) is a visual lossless compression technology standard developed by the Video Electronics Standards Association (VESA). It aims to address the stringent bandwidth requirements of high-resolution, high-refresh-rate display devices. In DSC technology, the slice is the core processing unit of the compression algorithm; each slice corresponds to an independently coded rectangular region within a video frame. Through this processing method, DSC can decompose complex high-resolution images into multiple independently compressible slices, reducing the amount of data processed per cycle. It also supports hardware parallel encoding and decoding, which helps improve compression efficiency and parallel processing capabilities, while reducing computational latency. However, this technology places high demands on the hardware, bandwidth, and power consumption of the processing system. Summary of the Invention
[0003] This disclosure provides a video processing method, a video processing apparatus, an electronic device, and a computer-readable storage medium.
[0004] In a first aspect, this disclosure provides a video processing method, comprising: dividing a video frame of a video to be processed into multiple extended slices, each extended slice including multiple sub-slices; assigning the multiple extended slices to corresponding coding units for parallel compression coding to obtain sub-bitstreams of each extended slice; wherein, for any extended slice, the coding unit corresponding to the extended slice is used to perform compression coding on the multiple sub-slices in the extended slice based on a time-division multiplexing method; and obtaining a frame bitstream corresponding to the video frame based on the sub-bitstreams of the multiple extended slices.
[0005] Secondly, this disclosure provides a video processing apparatus, comprising: a segmentation module for segmenting a video frame of a video to be processed into multiple extended slices, each of the extended slices comprising multiple sub-slices; an encoding module for assigning the multiple extended slices to corresponding encoding units for parallel compression encoding to obtain sub-bitstreams of each extended slice; wherein, for any extended slice, the encoding unit corresponding to the extended slice is used to perform compression encoding on the multiple sub-slices in the extended slice based on a time-division multiplexing method; and an obtaining module for obtaining a frame bitstream corresponding to the video frame based on the sub-bitstreams of the multiple extended slices.
[0006] Thirdly, this disclosure provides a video processing apparatus, comprising: a scheduling unit, multiple encoding units, and a multiplexing unit connected in sequence; the scheduling unit is configured to divide a video frame of a video to be processed into multiple extended slices, and allocate the multiple extended slices to corresponding encoding units; any one of the encoding units is configured to compress and encode multiple sub-slices in the allocated extended slices based on a time-division multiplexing method to obtain a sub-bitstream of the extended slice, and send the sub-bitstream of the extended slice to the multiplexing unit; the multiplexing unit is configured to obtain a frame bitstream corresponding to the video frame based on the sub-bitstreams of the multiple extended slices.
[0007] The embodiments provided in this disclosure divide the video frame of the video to be processed into multiple extended slices, each extended slice including multiple sub-slices; the multiple extended slices are assigned to corresponding coding units for parallel compression coding to obtain sub-bitstreams of each extended slice; wherein, for any extended slice, the coding unit corresponding to the extended slice is used to compress and code the multiple sub-slices in the extended slice based on time-division multiplexing; and the frame bitstream corresponding to the video frame is obtained based on the sub-bitstreams of the multiple extended slices.
[0008] Therefore, on the one hand, configuring multiple sub-slices into one extended slice, and having each extended slice compressed and encoded by one encoding unit, is equivalent to multiple sub-slices reusing one encoding unit. This reduces the requirement for the number of encoding units, thereby reducing the requirements for chip area and power consumption. On the other hand, for multiple sub-slices in an extended slice, the corresponding encoding units use a time-division multiplexing method for compression and encoding. This method can make full use of the idle time of the encoding units, improving resource utilization without affecting the total processing time, thus ensuring the efficiency of video processing.
[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0010] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the embodiments of the present disclosure to explain the disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the detailed description of exemplary embodiments with reference to the accompanying drawings, in which:
[0011] Figure 1 This is a schematic diagram of a video processing method provided in related technologies.
[0012] Figure 2This is a flowchart of a video processing method provided in an embodiment of the present disclosure.
[0013] Figure 3 This is a schematic flowchart of a video processing method provided in an embodiment of the present disclosure.
[0014] Figure 4 This is a block diagram of a video processing apparatus provided in an embodiment of the present disclosure.
[0015] Figure 5 This is a block diagram of a video processing apparatus provided in an embodiment of the present disclosure.
[0016] Figure 6 A block diagram of an electronic device provided in an embodiment of this disclosure;
[0017] Figure 7 This is a block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0018] To enable those skilled in the art to better understand the technical solutions of this disclosure, exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0019] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.
[0020] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.
[0021] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Words such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.
[0022] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.
[0023] Display stream compression technology can provide visually lossless image quality, suitable for applications such as low-bandwidth, high-resolution video data transmission and display. In related technologies, the display stream compression process requires slicing video frames and using encoding units to encode multiple slices in parallel to improve parallelism.
[0024] Figure 1 This is a schematic diagram of a video processing method provided in related technologies. (Refer to...) Figure 1 The video frame is divided into 8 slices, namely slice S0, slice S1, ..., slice S7. These 8 slices are assigned to 8 coding units for compression encoding. For any slice Si (0≤i≤7), firstly, based on input control, the data is ensured to enter the coding unit in an orderly and stable manner. Then, the color space of slice Si is converted to obtain color conversion data. Based on this, variable length encoding, bitrate control, prediction, and indexing of color history are performed to obtain multiple sub-streams corresponding to slice Si. In the above processing, line buffers can be used for data buffering. The multiple sub-streams of the slice enter the sub-stream multiplexer for data merging and splicing to obtain the sub-bitstream of the slice. After further processing of the sub-bitstream through the rate buffer and the slice multiplexer, the frame bitstream corresponding to the video frame is output.
[0025] The processing of the aforementioned video frames requires the simultaneous participation of eight encoding units. As the number of slices increases, it may be necessary to have more processing units (such as encoding units) participating in data processing simultaneously. This will place higher demands on the chip's area and power consumption, thereby increasing the chip cost.
[0026] In view of the above, embodiments of this disclosure provide a video processing method, a video processing apparatus, an electronic device, and a computer-readable storage medium.
[0027] In this embodiment, on the one hand, multiple sub-slices are configured into an extended slice, and each extended slice is compressed and encoded by an encoding unit. This is equivalent to multiple sub-slices reusing one encoding unit, which reduces the requirement for the number of encoding units, thereby helping to reduce the requirements for chip area and power consumption. On the other hand, for multiple sub-slices in an extended slice, the corresponding encoding units are compressed and encoded in a time-division multiplexing manner. This method can make full use of the idle time of the encoding units, improve resource utilization, and does not affect the total processing time, thereby ensuring the processing efficiency of the video.
[0028] The first aspect of this disclosure provides a video processing method.
[0029] Figure 2 A flowchart illustrating a video processing method provided in an embodiment of this disclosure. (Refer to...) Figure 2 The video processing method may include the following steps.
[0030] Step S21: Divide the video frames of the video to be processed into multiple extended slices, and each extended slice includes multiple sub-slices.
[0031] Step S22: Assign multiple extended slices to corresponding coding units for parallel compression coding to obtain sub-bitstreams of each extended slice; wherein, for any extended slice, the coding unit corresponding to the extended slice is used to compress and code multiple sub-slices in the extended slice based on time-division multiplexing.
[0032] Step S23: Obtain the frame bitstream corresponding to the video frame based on the sub-bitstreams of multiple extended slices.
[0033] Therefore, this disclosure proposes a novel segmentation method for video frames, which divides a video frame into multiple extended slices, and further divides each extended slice into multiple sub-slices. Each extended slice and each sub-slice can be encoded independently. Furthermore, an extended slice is assigned to an encoding unit, which encodes the extended slice. The encoding unit uses time-division multiplexing to compress and encode the multiple sub-slices within the extended slice, which does not affect the total encoding time and improves the resource utilization of the encoding unit. Based on the sub-bitstreams generated from the encoded extended slices, the frame bitstream corresponding to the video frame can be obtained, and then the frame bitstream can be transmitted to the target device.
[0034] In summary, in this embodiment, on the one hand, multiple sub-slices are configured into an extended slice, and each extended slice is compressed and encoded by an encoding unit. This is equivalent to multiple sub-slices reusing one encoding unit, which reduces the requirement for the number of encoding units, thereby helping to reduce the requirements for chip area and power consumption. On the other hand, for multiple sub-slices in an extended slice, the corresponding encoding units are compressed and encoded in a time-division multiplexing manner. This method can make full use of the idle time of the encoding units, improve resource utilization, and does not affect the total processing time, thereby ensuring the processing efficiency of the video.
[0035] The video processing method according to the embodiments of this disclosure will now be described in detail.
[0036] In some optional embodiments, the video to be processed includes video that needs to be compressed and encoded, which may be ultra-high resolution video such as 4K or 8K, and this disclosure does not limit this.
[0037] A video frame is the basic unit representing a specific moment in a video. In other words, a video is composed of a series of consecutive still images (i.e., video frames), which, when played at a certain rate, create the visual effect of continuous motion.
[0038] In related technologies, if the processing rate of video frames does not match the rate of video frames input from the upstream device, it can lead to data congestion or idle processing resources. Therefore, in this embodiment, a distribution buffer is added, which can receive video frames transmitted from the upstream device at any rate and is responsible for distributing these video frames. Furthermore, if there is a data bandwidth inconsistency between upstream and downstream stages, a backpressure function can also be provided.
[0039] In some optional embodiments, before segmenting the video frames of the video to be processed into multiple extended slices, the video processing method further includes: receiving video frames of the video to be processed distributed by a distribution buffer based on a preset rate, the distribution buffer being used to store video frames of the video to be processed sent by an upstream device; and sending a backpressure signal to the distribution buffer when the processing rate of the encoding unit is less than the preset rate, the backpressure signal being used to instruct the distribution buffer to reduce the preset rate.
[0040] For example, the distribution buffer can be implemented based on a reception first-in-first-out (FIFO) buffer, and this disclosure does not limit this implementation.
[0041] In some optional embodiments, after acquiring the video frame, the video frame can be further divided into multiple extended slices according to preset attribute information, with each extended slice including multiple sub-slices. The preset attribute information is used to characterize the attribute parameters of the video frame and the encoding unit used to process the video frame.
[0042] It should be noted that in related technologies, a video frame is usually divided into multiple slices, each slice is encoded independently, and each slice is not further divided into multiple sub-slices.
[0043] In some optional embodiments, the video frame of the video to be processed is divided into multiple extended slices, including: determining the number of extended slices corresponding to the video frame according to preset attribute information; determining the number of sub-slices of each extended slice according to the number of slices and the preset attribute information; and performing segmentation processing on the video frame according to the number of slices and the number of sub-slices to obtain multiple extended slices, wherein each extended slice is divided into multiple sub-slices.
[0044] Since the preset attribute information includes the attribute parameters of the video frame and the encoding unit used to process the video frame, the number of sub-slices corresponding to each extended slice can be determined more accurately and reasonably based on the preset attribute information. On the one hand, the processing efficiency is improved by dividing the extended slice into multiple sub-slices, and on the other hand, it can be ensured that the performance of the hardware device can meet this division method, ensuring the smooth processing of the video.
[0045] In some optional embodiments, the preset attribute information includes video attribute parameter information and encoding attribute parameter information; wherein, the video attribute parameter information includes at least one of the resolution of the video frame, the bit depth of the video frame, and the frame rate corresponding to the video frame, and the encoding attribute parameter information includes at least one of the number of encoding units, the storage capacity of the encoding units, and the interface bandwidth of the encoding units.
[0046] In some optional embodiments, the encoding attribute parameter information includes the number of encoding units. Accordingly, determining the number of slices of the extended slice corresponding to the video frame based on the preset attribute information includes: determining the number of slices of the extended slice corresponding to the video frame based on the number of encoding units.
[0047] For example, the number of slices can be determined as an integer multiple of the number of coding units. For instance, if the number of coding units is M, then the number of slices in the extended slice corresponding to a video frame can be one of M, 2×M, 3×M, etc.
[0048] It should be noted that the reason for using this method to determine the number of slices within a video frame is mainly because each extended slice can be encoded independently, thus enabling the encoding process to be parallelized. The encoding unit is the basic unit for performing specific encoding operations on the data within the extended slice. Therefore, an integer multiple of the number of encoding units can be used as the number of extended slices in a video frame to achieve better parallel processing results.
[0049] In some optional embodiments, the number of extended slices corresponding to a video frame can be determined based on parameters such as the interface bandwidth of the encoding unit to ensure that the hardware device can meet processing requirements. The interface bandwidth of the encoding unit (such as memory bandwidth) determines the amount of data that the encoding unit can read or write per unit time. If the amount of data in the extended slice exceeds the bandwidth capacity of the encoding unit, it will cause processing delays (such as waiting for data loading), thereby affecting video processing efficiency.
[0050] The number of slices determined in this way needs to ensure that the data volume of a single extended slice can complete the corresponding encoding processing within the bandwidth allowable time of the encoding unit, thereby balancing bandwidth requirements and encoding requirements and improving the resource utilization of the encoding unit.
[0051] In some optional embodiments, the number of slices of the extended slice corresponding to the video frame is determined according to preset attribute information, including: determining the data volume of the video frame according to the resolution and bit depth of the video frame; and determining the number of slices of the extended slice corresponding to the video frame according to the data volume of the video frame, the frame rate (Frames Per Second, FPS) of the video frame and the interface bandwidth of the encoding unit.
[0052] For example, if the resolution of a video frame is W×H and the bit depth is B (in bits per pixel), then based on the resolution and bit depth of the video frame, the data size D of the video frame can be obtained as (W×H×B) / 8 (in bytes). Assuming the number of extended slices is N, then the data size Sd of a single extended slice is D / N.
[0053] Furthermore, based on the frame rate F (in fps) corresponding to each video frame, the target processing time for each video frame can be determined to be T = 1000 milliseconds (ms) / F. Therefore, the encoding unit needs to complete the compression encoding of one video frame within T to avoid stuttering. In other words, the ratio of Sd to the interface bandwidth K, Sd / K, should be less than or equal to the target processing time T to avoid stuttering. From this, we can deduce that N ≥ D / (K × T), that is, the number of slices ≥ the data volume of the video frame / (bandwidth × single frame processing time), where the single frame processing time = 1000 ms / frame rate. Based on this, a suitable number of slices can be selected.
[0054] Furthermore, in some optional embodiments, after determining that the number of slices is greater than or equal to the data volume of the video frame / (bandwidth × single frame processing time), the number of slices can also be determined in conjunction with the number of coding units. For example, a minimum value for the number of slices is determined based on the condition that the number of slices is greater than or equal to the minimum value of the video frame / (bandwidth × single frame processing time), and a value greater than or equal to this minimum value, and which is an integer multiple of the number of coding units, is selected as the number of slices.
[0055] For example, if it is determined through calculation that the number of slices is ≥2 and the number of coding units is 4, then the number of slices can be set to 4 to ensure good parallel processing performance.
[0056] In some alternative embodiments, after determining that a video frame needs to be divided into several extended slices, it is also necessary to determine how many sub-slices a single extended slice needs to be divided into.
[0057] In some optional embodiments, considering that multiple sub-slices of an extended slice need to share the storage space of the encoding unit corresponding to the extended slice, the number of sub-slices corresponding to the extended slice can be determined based on whether the storage capacity of the encoding unit can meet its storage requirements.
[0058] In some optional embodiments, determining the number of sub-slices corresponding to the extended slice based on the number of slices and preset attribute information includes: determining multiple candidate sub-slice numbers; determining multiple candidate storage requirements for sub-slices that correspond one-to-one with the multiple candidate sub-slice numbers based on the number of slices, the multiple candidate sub-slice numbers, and the data volume of the video frame, wherein the data volume of the video frame is determined based on the resolution and bit depth of the video frame; and selecting a number of sub-slices from the multiple candidate sub-slice numbers based on the multiple candidate sub-slice storage requirements and the storage capacity of the encoding unit.
[0059] The number of candidate sub-slices is an optional option for the number of sub-slices. For each candidate number of sub-slices, it can be determined whether the storage capacity of the encoding unit can meet its corresponding storage requirements under the current partitioning method, so as to select the final number of sub-slices and divide the extended slices according to the number of sub-slices to ensure that the encoding unit can meet the processing requirements.
[0060] For example, the number of candidate sub-slices is determined to be z1, z2, and z3, respectively. Here, z1 corresponds to the partitioning method of dividing the extended slice into z1 sub-slices, z2 corresponds to the partitioning method of dividing the extended slice into z2 sub-slices, and z3 corresponds to the partitioning method of dividing the extended slice into z3 sub-slices.
[0061] For the case where the number of candidate sub-slices is z1, based on the number of slices N and the data volume D of the video frame, the data volume Sd of each extended slice can be determined as D / N. Combining this with the number of candidate sub-slices z1, the data volume Ssd1 of each candidate sub-slice can be further determined as Sd / z1. Here, a candidate sub-slice is the sub-slice corresponding to the extended slice when the number of candidate sub-slices is z1. Using a preset storage estimation method, the data volume G1 required by each candidate sub-slice during encoding can be estimated, and this data volume is taken as the corresponding candidate storage requirement Gz1. Furthermore, since one extended slice corresponds to z1 candidate sub-slices, the total storage requirement for this extended slice is Gz1×z1. If Gz1×z1 is less than or equal to the storage capacity of the encoding unit, the number of sub-slices corresponding to the extended slice can be determined to be z1. Conversely, if Gz1×z1 is greater than the storage capacity of the encoding unit, it indicates that the encoding unit cannot meet the storage requirements of this number of sub-slice divisions, and the current sub-slice division method cannot be adopted.
[0062] Similarly, for the case where the number of candidate sub-slices is z2, based on the number of slices N and the data volume D of the video frame, the data volume Sd of each extended slice can be determined as D / N. Combining this with the number of candidate sub-slices z2, the data volume Ssd2 of each candidate sub-slice can be further determined as Sd / z2. Here, a candidate sub-slice is the sub-slice corresponding to the extended slice when the number of candidate sub-slices is z2. Using a preset storage estimation method, the data volume G2 required by each candidate sub-slice during encoding can be estimated, and this data volume is taken as the corresponding candidate storage requirement Gz2. Furthermore, since one extended slice corresponds to z2 sub-slices, the total storage requirement for this extended slice is Gz2×z2. If Gz2×z2 is less than or equal to the storage capacity of the encoding unit, the number of sub-slices corresponding to the extended slice can be determined to be z2. Conversely, if Gz2×z2 is greater than the storage capacity of the encoding unit, it indicates that the encoding unit cannot meet the storage requirements of this number of sub-slice divisions, and the current sub-slice division method cannot be adopted. The case with z3 candidate sub-slices is similar to the case described above and will not be described further here.
[0063] The estimation of the amount of data required for a candidate sub-slice during the encoding process, based on its data volume, can be determined not only by the storage estimation method but also by experience. This embodiment of the present disclosure does not impose any limitations on this method. The storage estimation method is a method for evaluating the space required to store intermediate encoding data, determined based on the encoding method and the corresponding encoding difficulty. The intermediate encoding data includes prediction residual data, quantization parameters, etc.
[0064] For example, if the data volume of a candidate sub-slice is Q1, the corresponding candidate storage requirement Q2 can be estimated as α × Q1, where α is the compression coefficient (e.g., α is 25%), which can be determined based on experience, statistical data, and a preset storage requirement prediction model. The preset storage requirement prediction model is a trained model that can predict the corresponding candidate storage requirement of a sub-slice based on its data volume. The training set data for this model can include the data volume of sample sub-slices and the actual storage volume of the sub-slice corresponding to the sample sub-slice (the amount of data actually occupied by the sub-slice in the encoding unit during the encoding process). There are multiple sample sub-slices.
[0065] It should be noted that if multiple alternative sub-slice numbers meet the storage requirements of the encoding unit, one of them can be selected as the final number of sub-slices based on actual needs. These actual needs include the time-division multiplexing processing capability of the encoding unit, the historical idle rate of the encoding unit, and the requirements for encoding duration, etc., which are not limited in this embodiment.
[0066] In some optional embodiments, the video frame is segmented according to the number of slices and the number of sub-slices to obtain multiple extended slices, including: dividing the video frame into multiple initial extended slices according to the number of slices; and for any initial extended slice, dividing the initial extended slice into multiple sub-slices according to the number of sub-slices to obtain an extended slice including multiple sub-slices. The initial extended slice has not yet been divided into multiple sub-slices.
[0067] For example, if the number of slices is N1 and the number of sub-slices is N2, then a video frame can be divided into N1 initial extended slices, and then each initial extended slice can be divided into N2 sub-slices, thus obtaining an extended slice including N2 sub-slices; where N1 > 1 and N2 > 1.
[0068] In some optional embodiments, the video processing method may further include: dividing the storage space of the encoding unit corresponding to the extended slice into multiple storage partitions according to the number of sub-slices included in the extended slice; wherein, there is a correspondence between the multiple storage partitions of the encoding unit and the multiple sub-slices of the extended slice corresponding to the encoding unit, and the storage partitions are used to store the data generated by the corresponding sub-slices during the encoding process. The encoding unit corresponding to the extended slice refers to the encoding unit used for compressing and encoding the extended slice, or in other words, the encoding unit allocated to the extended slice.
[0069] In this way, each sub-slice is allocated a relatively independent storage partition. When encoding a sub-slice, if there is a need for reading or writing, the corresponding storage partition for that sub-slice can be operated on more conveniently and specifically. This is more convenient than having multiple sub-slices share the same storage space, and helps to improve encoding efficiency.
[0070] For example, if the number of sub-slices included in the extended slice is K, then the storage space of the corresponding encoding unit can be divided into K storage partitions. Each storage partition corresponds to one sub-slice and is used to store the data generated by the corresponding sub-slice during the encoding process. For example, the i-th sub-slice corresponds to the i-th storage partition. The data generated by the encoding unit during the encoding of the i-th sub-slice is stored in the i-th storage partition, where 1 ≤ i ≤ K, and K is an integer greater than 1.
[0071] In some optional embodiments, when storing data generated during the encoding process of sub-slices, sub-slice identifiers can be added to this data. These identifiers can then be used to determine the mapping relationship between the stored data in the encoding unit's storage space and the corresponding sub-slices in the extended slice. The sub-slice identifier is used to uniquely identify multiple sub-slices within the extended slice.
[0072] For example, the number of sub-slices included in the extended slice is K, and the sub-slice identifier of the j-th sub-slice is Ij. Accordingly, when the encoding unit compresses and encodes the extended slice, when the data date generated by the j-th sub-slice during the encoding process is stored in the storage space of the encoding unit, the sub-slice identifier Ij can be added to the data date. Subsequently, if it is necessary to read the data of the sub-slice, the data can be read from the storage space based on the sub-slice identifier Ij, where 1≤j≤K, and K is an integer greater than 1.
[0073] In some optional embodiments, for any given encoding unit, after receiving the allocated extended slice, it uses time-division multiplexing to compress and encode multiple sub-slices within the extended slice, obtaining sub-slice bitstreams corresponding to each sub-slice, and then obtains the sub-bitstream of the extended slice based on the multiple sub-slice bitstreams. Furthermore, during the compression and encoding of the sub-slices, some intermediate data (such as prediction residual data, quantization parameter data) and result data may be generated, which can be stored in the storage partition corresponding to the sub-slice within the encoding unit.
[0074] The sub-bitstream of the extended slice may include the sub-slice bitstreams of multiple sub-slices corresponding to the extended slice, or it may be a longer extended slice bitstream obtained by splicing (or merging) the sub-slice bitstreams of multiple sub-slices. This disclosure does not limit this.
[0075] In other words, the splicing (or merging) operation of sub-slice bitstreams of multiple sub-slices in the same extended slice can occur inside the coding unit. Accordingly, the sub-bitstream output by the coding unit is a complete long bitstream (i.e., extended slice bitstream) corresponding to the extended slice. The splicing (or merging) operation of sub-slice bitstreams of multiple sub-slices in the same extended slice can also occur outside the coding unit (such as a multiplexer). Accordingly, the sub-bitstream output by the coding unit is a series of short bitstreams (i.e., sub-slice bitstreams) that correspond one-to-one with the multiple sub-slices in the extended slice.
[0076] It should be noted that in related technologies, the encoding unit may have a certain amount of idle time while waiting to receive or send data. In this embodiment of the present disclosure, since time-division multiplexing compression encoding is used for multiple sub-slices in the same extended slice, the idle time of the encoding unit can be fully utilized. Compared with related technologies, the total processing time may not increase, or may increase only slightly. Based on the fact that it will not affect the video processing efficiency, it can also effectively improve the resource utilization rate.
[0077] In some optional embodiments, obtaining the frame bitstream corresponding to the video frame based on the sub-bitstreams of multiple extended slices includes: determining the output order of the sub-bitstreams of the extended slices according to the corresponding positions of the extended slices in the video frame; and splicing and combining the sub-bitstreams of the multiple extended slices according to the output order of the sub-bitstreams of the multiple extended slices to obtain the frame bitstream corresponding to the video frame.
[0078] Therefore, after obtaining the sub-bitstream of the extended slice, the encoding unit needs to determine the output order of the sub-bitstream of the extended slice according to its corresponding position in the video frame. This ensures that the output order of the sub-bitstreams of multiple extended slices matches their positions in the video frame, facilitating subsequent splicing and combination of these sub-bitstreams to obtain an accurate frame bitstream corresponding to the video frame. In other words, a slice compression progress alignment method can be set so that the sub-bitstreams generated by compression encoding can be reassembled in sequence, avoiding output misalignment or accumulated delay.
[0079] In this case, considering that the sub-stream corresponding to an extended slice can be a complete long bitstream corresponding to that extended slice, or multiple short bitstreams corresponding one-to-one with multiple sub-slices in that extended slice, there are two implementation methods for slice compression progress alignment. Specifically, when the sub-stream is a long bitstream, slice compression progress alignment means that the long bitstreams corresponding to multiple extended slices are output sequentially, and the corresponding position of the extended slice in the video frame refers to the distribution position of each extended slice in the video frame. When the sub-stream includes multiple short bitstreams, slice compression progress alignment means that the multiple short bitstreams corresponding to multiple extended slices are output sequentially, and the corresponding position of the extended slice in the video frame includes the distribution position of each extended slice in the video frame and the distribution position of each sub-slice within the corresponding extended slice.
[0080] For example, the video frame is divided into four parallel extended slices (i.e., each row of the video frame is divided into four columns, with each column corresponding to one extended slice), namely extended slice S1, extended slice S2, extended slice S3, and extended slice S4. Extended slice S1 includes two sub-slices, Ss11 and Ss12; extended slice S2 includes two sub-slices, Ss21 and Ss22; extended slice S3 includes two sub-slices, Ss31 and Ss32; and extended slice S4 includes two sub-slices, Ss41 and Ss42. These four extended slices are respectively assigned to coding unit 1 (corresponding to extended slice S1), coding unit 2 (corresponding to extended slice S2), coding unit 3 (corresponding to extended slice S3), and coding unit 4 (corresponding to extended slice S4) for parallel compression encoding.
[0081] For coding unit e (1≤e≤4), it uses time-division multiplexing to compress and encode the two sub-slices in the corresponding extended slice, resulting in two sub-slice bitstreams. For example, in extended slice S1, sub-slice Ss11 corresponds to sub-slice bitstream DR11, and sub-slice Ss12 corresponds to sub-slice bitstream DR12; in extended slice S2, sub-slice Ss21 corresponds to sub-slice bitstream DR21, and sub-slice Ss22 corresponds to sub-slice bitstream DR22; in extended slice S3, sub-slice Ss31 corresponds to sub-slice bitstream DR31, and sub-slice Ss32 corresponds to sub-slice bitstream DR32; in extended slice S4, sub-slice Ss41 corresponds to sub-slice bitstream DR41, and sub-slice Ss42 corresponds to sub-slice bitstream DR42.
[0082] Furthermore, if the encoding unit directly outputs the sub-slice bitstream, it can output the sub-slice bitstreams DR11, DR12, ..., DR41 and DR42 in sequence according to the distribution positions of each extended slice in the video frame and the distribution positions of each sub-slice in the extended slice.
[0083] If the encoding unit does not directly output the sub-slice bitstream, but instead first concatenates the two sub-slice bitstreams corresponding to the extended slice to obtain a complete long bitstream corresponding to the extended slice, and then outputs the long bitstream, then based on the distribution positions of each extended slice in the video frame, it can sequentially output the sub-bitstream DR1 corresponding to extended slice S1, the sub-bitstream DR2 corresponding to extended slice S2, the sub-bitstream DR3 corresponding to extended slice S3, and the sub-bitstream DR4 corresponding to extended slice S4. When the encoding unit synthesizes or concatenates the long bitstream of the corresponding extended slice based on the sub-slice bitstreams, it can refer to the distribution positions of each sub-slice within the extended slice.
[0084] In summary, slice compression progress alignment can be achieved by aligning the compression encoding progress of multiple extended slices or by aligning the compression encoding progress of multiple sub-slices corresponding to multiple extended slices. Furthermore, this slice compression progress alignment does not directly change the processing progress of the compression encoding itself, but rather achieves alignment by controlling the order of the output sub-bitstreams, thereby reducing alignment costs and difficulties.
[0085] In some optional embodiments, a preset compression progress controller can be used to ensure the alignment of slice compression progress through control signals (which may be hardware signals), and this disclosure does not limit this.
[0086] Figure 3 This is a schematic flowchart illustrating a video processing method provided in an embodiment of this disclosure. Figure 3 As shown, the video frames of the video to be processed sent by the upstream device (or module) are received by the distribution buffer. Furthermore, the distribution buffer can provide backpressure functionality, thus allowing the reception of video frames sent by the upstream device at any rate.
[0087] The distribution buffer is responsible for distributing video frame data, and it can distribute video frames based on a preset rate. For example, the distribution buffer can distribute video frames to the scheduling unit based on a preset rate. After receiving a video frame, the scheduling unit can divide the video frame into multiple extended slices according to preset attribute information, where each extended slice includes multiple sub-slices. For example, the video frame can be divided into 4 extended slices, and each extended slice includes 2 sub-slices. Figure 3 As shown, extended slice S0 includes sub-slices Ss01 and Ss02, extended slice S1 includes sub-slices Ss11 and Ss12, extended slice S2 includes sub-slices Ss21 and Ss22, and extended slice S3 includes sub-slices Ss31 and Ss32. Furthermore, the scheduling unit can allocate multiple extended slices to corresponding coding units.
[0088] Taking an extended slice Sj (0≤j≤3) as an example, the encoding unit can ensure that data enters it in an orderly and stable manner based on input control, and perform compression encoding using time-division multiplexing on the two sub-slices Ssj1 and Ssj2 corresponding to the extended slice Sj. During the compression encoding process, color space conversion, variable length encoding, bitrate control, prediction, and indexing of color history can be performed to obtain multiple monochromatic component sub-streams corresponding to the extended slice Sj. These monochromatic component sub-streams are merged using a sub-stream multiplexer to obtain the sub-bitstream corresponding to the extended slice. Furthermore, the output order of the sub-bitstreams of each extended slice can be controlled by aligning the slice compression progress, so that the sub-bitstreams of multiple extended slices can be spliced and combined according to the output order of the sub-bitstreams of multiple extended slices using a slice multiplexer to obtain the frame bitstream corresponding to the video frame, and then transmitted externally.
[0089] In summary, in this embodiment of the present disclosure, by dividing an extended slice into multiple sub-slices and encoding an extended slice based on a single encoding unit, the number of encoding units required can be reduced, thereby reducing chip area and power consumption, which is beneficial for reducing chip cost. In addition, the encoding unit uses a time-division multiplexing method to encode multiple sub-slices in the extended slice. Since the idle time of the encoding unit is fully utilized in this process, it will not affect the encoding duration (or has a small impact), and therefore will not affect (or have a small impact) the total video processing time, and can also improve the resource utilization of functional units such as the encoding unit.
[0090] A second aspect of this disclosure provides a video processing apparatus.
[0091] Figure 4 This is a block diagram of a video processing apparatus provided according to an embodiment of the present disclosure. (Refer to...) Figure 4 The video processing device 400 may include the following modules.
[0092] The segmentation module 401 is used to segment the video frames of the video to be processed into multiple extended slices, and each extended slice includes multiple sub-slices.
[0093] The encoding module 402 is used to assign multiple extended slices to corresponding encoding units for parallel compression encoding to obtain sub-bitstreams of each extended slice; wherein, for any extended slice, the encoding unit corresponding to the extended slice is used to compress and encode multiple sub-slices in the extended slice based on time-division multiplexing.
[0094] The module 403 is used to obtain the frame bitstream corresponding to the video frame based on the sub-bitstreams of multiple extended slices.
[0095] In this embodiment of the disclosure, the video frame of the video to be processed is divided into multiple extended slices by the segmentation module, and each extended slice includes multiple sub-slices; the multiple extended slices are assigned to corresponding encoding units for parallel compression encoding by the encoding module to obtain the sub-bitstream of each extended slice; wherein, for any extended slice, the encoding unit corresponding to the extended slice is used to compress and encode the multiple sub-slices in the extended slice based on time-division multiplexing; and the frame bitstream corresponding to the video frame is obtained by the obtaining module based on the sub-bitstreams of the multiple extended slices.
[0096] Therefore, it can be seen that the video processing device configures multiple sub-slices into an extended slice, and each extended slice is compressed and encoded by an encoding unit. This is equivalent to multiple sub-slices reusing one encoding unit, which can reduce the number of encoding units required, thereby reducing the chip area and power consumption requirements. On the other hand, for multiple sub-slices in an extended slice, the corresponding encoding units use a time-division multiplexing method for compression and encoding. This method can make full use of the idle time of the encoding units, improve resource utilization, and does not affect the total processing time, thus ensuring the video processing efficiency.
[0097] Figure 5 This is a block diagram of a video processing apparatus provided according to an embodiment of the present disclosure. (Refer to...) Figure 5 The video processing device 500 includes a scheduling unit 510, a plurality of encoding units (e.g., encoding unit 521, encoding unit 522, ..., encoding unit 52M) and a multiplexing unit 530 connected in sequence.
[0098] The scheduling unit 510 is used to divide the video frames of the video to be processed into multiple extended slices and assign the multiple extended slices to the corresponding encoding units.
[0099] Each encoding unit is used to compress and encode multiple sub-slices in the allocated extended slice based on time-division multiplexing, to obtain the sub-bitstream of the extended slice, and send the sub-bitstream of the extended slice to the multiplexing unit.
[0100] The multiplexing unit 530 is used to obtain the frame bitstream corresponding to the video frame based on the sub-bitstreams of multiple extended slices.
[0101] In some optional embodiments, the video processing apparatus 500 may further include a receiving unit (not shown in the figure), which is used to acquire video frames of the video to be processed and send the video frames to the scheduling unit.
[0102] In some alternative embodiments, the receiving unit is provided with a distribution buffer, so that it can receive video frames transmitted by the upstream device at any rate and is responsible for distributing these video frames to the scheduling unit.
[0103] For example, the receiving unit receives video frames of the video to be processed at an arbitrary rate and transmits them to a distribution buffer for buffering. The distribution buffer then distributes the video frames of the video to be processed to the scheduling unit based on a preset rate. If a backpressure signal is received from the scheduling unit 510, the distribution buffer reduces the preset rate of video frame distribution. The backpressure signal is generated and sent when the processing rate of the encoding unit is less than the preset rate, and is used to instruct the distribution buffer to reduce the preset rate. Alternatively, the backpressure signal can also be generated and sent by functional units such as external controllers. These external controllers can detect parameters such as the processing rate of the encoding unit, the preset rate of video frame distribution, and the occupancy of the distribution buffer. If data congestion is suspected based on these parameters, a backpressure signal is generated and sent.
[0104] In some optional embodiments, the receiving unit sends video frames of the video to be processed to the scheduling unit 510 at a preset rate. The scheduling unit 510 dynamically calculates the number of slices (corresponding to extended slices) and the number of sub-slices (corresponding to sub-slices within extended slices) based on preset attribute information. Based on the calculation results, the video frame is divided into multiple extended slices, each containing multiple sub-slices, and each extended slice is assigned to a corresponding encoding unit. Upon receiving an extended slice assigned by the scheduling unit 510, any encoding unit compresses and encodes the multiple sub-slices within that extended slice using a time-division multiplexing method. The data generated during the compression and encoding process of each sub-slice can be stored in the storage partition corresponding to that sub-slice within the encoding unit. Finally, the sub-bitstream of the extended slice is obtained and sent to the multiplexing unit 530. The multiplexing unit 530 can perform operations such as splicing and combining the sub-bitstreams of multiple extended slices corresponding to a certain video frame to obtain the frame bitstream corresponding to that video frame. Furthermore, the frame stream can also be transmitted to a target device, which may be a peer display device, etc., and this embodiment of the present disclosure is not limited thereto. Accordingly, after receiving the frame stream of the video frame, the peer display device can perform decoding and other processing based on the corresponding decoding method before displaying it on the display screen. The processing procedure of any functional unit can refer to the corresponding content in the embodiments of this disclosure, and will not be described in detail here.
[0105] In this embodiment of the present disclosure, the video processing apparatus includes a scheduling unit, multiple encoding units, and a multiplexing unit connected in sequence. The scheduling unit can divide the video frame of the video to be processed into multiple extended slices and allocate the multiple extended slices to corresponding encoding units. Each encoding unit can compress and encode multiple sub-slices in the allocated extended slices based on a time-division multiplexing method to obtain a sub-bitstream of the extended slice, and send the sub-bitstream of the extended slice to the multiplexing unit. The multiplexing unit can obtain a frame bitstream corresponding to the video frame based on the sub-bitstreams of the multiple extended slices.
[0106] Therefore, this video processing device configures multiple sub-slices into one extended slice and schedules each extended slice to be compressed and encoded by one encoding unit. This is equivalent to multiple sub-slices reusing one encoding unit, which reduces the number of encoding units required, thereby reducing the chip area and power consumption requirements. On the other hand, for multiple sub-slices in an extended slice, the corresponding encoding units are compressed and encoded using a time-division multiplexing method. This method can make full use of the idle time of the encoding units. Therefore, while improving resource utilization, it does not affect the total video processing time, thus ensuring video processing efficiency.
[0107] It is understood that the various embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step and the setting of functional modules should be determined by their functions and possible internal logic.
[0108] In addition, this disclosure also provides electronic devices and computer-readable storage media.
[0109] Figure 6 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.
[0110] Reference Figure 6 This disclosure provides an electronic device, which includes: at least one processor 601 connected via a bus, at least one memory 602, and one or more I / O interfaces 603; wherein the memory 602 stores one or more computer programs that can be executed by at least one processor 601, and the one or more computer programs are executed by at least one processor 601 to enable at least one processor 601 to perform the video processing method described in any one of the embodiments of this disclosure.
[0111] Figure 7 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.
[0112] Reference Figure 7 This disclosure provides an electronic device that includes multiple processing cores 701 and an on-chip network 702. The multiple processing cores 701 are all connected to the on-chip network 702, which is used to exchange data between the multiple processing cores and external data.
[0113] One or more processing cores 701 store one or more instructions, and the one or more instructions are executed by one or more processing cores 701 to enable one or more processing cores 701 to perform the video processing method described in any one of the embodiments of this disclosure.
[0114] This disclosure also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor / processing core, implements the video processing method described in any one of the embodiments of this disclosure. The computer-readable storage medium may be a volatile or non-volatile computer-readable storage medium.
[0115] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device executes the video processing method described in any one of the embodiments of this disclosure.
[0116] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).
[0117] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0118] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0119] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0120] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0121] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0122] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0123] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0124] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0125] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.
Claims
1. A video processing method, characterized in that, include: The video frames of the video to be processed are divided into multiple extended slices, and each of the extended slices includes multiple sub-slices; Multiple extended slices are assigned to corresponding coding units for parallel compression coding to obtain sub-bitstreams of each extended slice; wherein, for any extended slice, the coding unit corresponding to the extended slice is used to compress and code multiple sub-slices in the extended slice based on time-division multiplexing. The frame stream corresponding to the video frame is obtained based on the sub-streams of the multiple extended slices.
2. The method according to claim 1, characterized in that, The step of dividing the video frames of the video to be processed into multiple extended slices includes: The number of slices of the extended slice corresponding to the video frame is determined according to the preset attribute information, wherein the preset attribute information is used to characterize the attribute parameters of the video frame and the encoding unit used to process the video frame; Based on the number of slices and the preset attribute information, determine the number of sub-slices corresponding to each extended slice; The video frame is segmented according to the number of slices and the number of sub-slices to obtain multiple extended slices.
3. The method according to claim 2, characterized in that, The process of segmenting the video frame according to the number of slices and the number of sub-slices to obtain multiple extended slices includes: Based on the number of slices, the video frame is divided into multiple initial extended slices; For any given initial extended slice, the initial extended slice is divided into multiple sub-slices according to the number of sub-slices, resulting in an extended slice including multiple sub-slices.
4. The method according to claim 2, characterized in that, The preset attribute information includes video attribute parameter information and encoding attribute parameter information; The video attribute parameter information includes at least one of the resolution of the video frame, the bit depth of the video frame, and the frame rate corresponding to the video frame, and the encoding attribute parameter information includes at least one of the number of encoding units, the storage capacity of the encoding units, and the interface bandwidth of the encoding units.
5. The method according to claim 4, characterized in that, The step of determining the number of extended slices corresponding to the video frame based on preset attribute information includes: The number of slices for the extended slice corresponding to the video frame is determined based on the number of encoding units.
6. The method according to claim 5, characterized in that, The step of determining the number of extended slices corresponding to the video frame based on preset attribute information includes: The data volume of the video frame is determined based on the resolution and bit depth of the video frame. The number of slices for the extended slice corresponding to the video frame is determined based on the data volume of the video frame, the frame rate corresponding to the video frame, and the interface bandwidth of the encoding unit.
7. The method according to any one of claims 4 to 6, characterized in that, Determining the number of sub-slices corresponding to the extended slice based on the number of slices and the preset attribute information includes: Determine the number of multiple candidate sub-slices; Based on the number of slices, the number of multiple candidate sub-slices, and the data volume of the video frame, determine the storage requirements of multiple sub-slices that correspond one-to-one with the number of multiple candidate sub-slices, wherein the data volume of the video frame is determined based on the resolution and bit depth of the video frame. The number of sub-slices is selected from the multiple candidate sub-slice storage requirements and the storage capacity of the encoding unit.
8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: Based on the number of sub-slices included in the extended slice, the storage space of the encoding unit corresponding to the extended slice is divided into multiple storage partitions; There is a correspondence between the multiple storage partitions of the encoding unit and the multiple sub-slices of the extended slice corresponding to the encoding unit, and the storage partitions are used to store the data generated by the corresponding sub-slices during the encoding process.
9. The method according to any one of claims 1 to 7, characterized in that, The step of obtaining the frame bitstream corresponding to the video frame based on the sub-bitstreams of the multiple extended slices includes: The output order of the sub-streams of the extended slice is determined based on the corresponding position of the extended slice in the video frame; Based on the output order of the sub-streams of the multiple extended slices, the sub-streams of the multiple extended slices are spliced and combined to obtain the frame stream corresponding to the video frame.
10. The method according to any one of claims 1 to 7, characterized in that, Before dividing the video frames of the video to be processed into multiple extended slices, the method further includes: Receive video frames of the video to be processed, which are distributed by a distribution buffer based on a preset rate. The distribution buffer is used to store video frames of the video to be processed sent by an upstream device. If the processing rate of the encoding unit is less than the preset rate, a backpressure signal is sent to the distribution buffer, which instructs the distribution buffer to reduce the preset rate.
11. A video processing apparatus, characterized in that, include: A segmentation module is used to segment video frames of the video to be processed into multiple extended slices, each of which includes multiple sub-slices; An encoding module is used to assign multiple extended slices to corresponding encoding units for parallel compression encoding to obtain sub-bitstreams of each extended slice; wherein, for any extended slice, the encoding unit corresponding to the extended slice is used to compress and encode multiple sub-slices in the extended slice based on time-division multiplexing. The obtaining module is used to obtain the frame bitstream corresponding to the video frame based on the sub-bitstreams of the multiple extended slices.
12. A video processing apparatus, characterized in that, include: The scheduling unit, multiple coding units, and multiplexing unit are connected in sequence. The scheduling unit is used to divide the video frames of the video to be processed into multiple extended slices, and to assign the multiple extended slices to the corresponding encoding units. Any of the encoding units is configured to compress and encode multiple sub-slices in the allocated extended slice based on a time-division multiplexing method to obtain a sub-bitstream of the extended slice, and send the sub-bitstream of the extended slice to the multiplexing unit. The multiplexing unit is used to obtain the frame bitstream corresponding to the video frame based on the sub-bitstreams of the multiple extended slices.
13. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the video processing method as described in any one of claims 1-10.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the video processing method as described in any one of claims 1-10.
Citation Information
Patent Citations
Parallel video coding
CN109155850A
Display flow compression encoder and display engine
CN109429069A
Display stream compression coding method and device, equipment and medium
CN118474380A
Coding method, decoding method and device based on display stream compression, computer equipment, readable storage medium and program product
CN119277095A