A method, apparatus, device, medium, and product for processing video data
By comparing the video data of the current segment with adjacent rows and segments of the block pixel size in the SoC chip, and establishing an information table to determine the same or similar data, the problems of resource waste and power consumption increase in the same frame of data are solved, and more efficient data processing and longer chip life are achieved.
Patent Information
- Application Number
- CN202411412653.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2044-10-11
AI Technical Summary
There are problems in the same frame of data in the SoC chip that a large amount of the same data leads to waste of resources and increased power consumption.
By acquiring the initial video data of the current segment, comparing it with adjacent rows and adjacent segments of the block pixel size, a first information table and a second information table are established, the same or similar data are determined, and only a single color space conversion and block conversion are performed to avoid repeated processing.
It reduces the power consumption of the chip, improves the data processing speed and chip performance, and extends the service life.
Smart Images

Figure CN119211502B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of servers, and particularly to a method, device, equipment, medium, and product for processing video data. Background Art
[0002] A system-on-chip (SoC) is a technology that integrates multiple components in a traditional computer or other electronic system onto a single chip. This integration method can not only reduce the volume, lower the cost, but also improve the computing speed and enhance the system functions.
[0003] In an SoC chip, due to the relatively small change in the host operating system interface, there are a large number of identical data within the same frame of data. Whether the data is in compressed mode or pixel mode (YUV mode formed by three components of luminance (Y), blue chrominance (U), and red chrominance (V)), a large amount of on-chip storage resources are occupied for data format conversion processing. Due to the existence of a large amount of identical data, the on-chip resources also process the same data, resulting in a waste of resources and further increasing the power consumption of the chip.
[0004] Therefore, how to save the resources of the SoC chip and reduce the power consumption is an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of the present invention is to provide a method, device, equipment, medium, and product for processing video data to solve the problem of waste of processing resources and increase in chip power consumption caused by a large amount of identical data within the same frame of data.
[0006] To solve the above technical problems, the present invention provides a method for processing video data, including:
[0007] Obtain the initial video data of the current segment stored by the host and / or double data rate synchronous dynamic random access memory;
[0008] Determine the first video data according to the comparison relationship between the initial video data of the current segment and the adjacent rows and the video data of each adjacent first preset segment of the pixel size of the block; and store the address information of the first video data and the initial video data of the current segment in the first information table; wherein, the first video data is the video data that satisfies the first preset range of the difference from the initial video data of the current segment; one row of video data includes at least one segment of video data;
[0009] Determine the second video data based on the comparison relationship between the initial video data of the current segment and the video data of adjacent lines within the adjacent block pixel size of the block pixel size to which it belongs and the video data of each adjacent second preset segment; and store the similarity result between the second video data and the initial video data of the current segment corresponding to the block pixel size and the adjacent block pixel size in the second information table; wherein, the second video data is the video data that satisfies the second preset range of the difference from the initial video data of the current segment.
[0010] Perform data format conversion processing on the initial video data of the current segment according to the video processing strategy corresponding to the first information table and the second information table to obtain the processed video data.
[0011] On the one hand, obtain the initial video data of the current segment stored by the host computer and the double data rate synchronous dynamic random access memory respectively; wherein, the initial video data of each current segment occupies one line respectively.
[0012] On the other hand, in the process of determining the first video data, the adjacent lines of the block pixel size to which it belongs are the line data occupied by the initial video data of each current segment respectively, and the initial video data of each current segment belongs to the same block pixel size.
[0013] In the process of determining the second video data, the initial video data of each current segment occupies different lines of the same block pixel size.
[0014] On the other hand, when the initial video data of the current segment is obtained by the host computer or the double data rate synchronous dynamic random access memory, determine the first video data according to the comparison relationship between the initial video data of the current segment and the stored adjacent lines of the block pixel size to which it belongs and the video data of each adjacent first preset segment.
[0015] Correspondingly, determine the second video data according to the comparison relationship between the initial video data of the current segment and the stored adjacent lines of the adjacent block pixel size to which it belongs and the video data of each adjacent second preset segment.
[0016] On the other hand, determining the first video data according to the comparison relationship between the initial video data of the current segment and the video data of adjacent lines of the block pixel size to which it belongs and the video data of each adjacent first preset segment includes:
[0017] Judge whether the initial video data of each current segment in the adjacent lines in the vertical direction composed of the lines where the initial video data of each current segment is located is the same.
[0018] If they are the same, determine that the initial video data of each current segment is the same, retain one of the initial video data of the current segment, and record the address information corresponding to the initial video data of each current segment.
[0019] If they are different, the video data of adjacent i-th segments in the same row in the horizontal direction are successively subjected to difference processing with the initial video data of their respective current segments; where 1 ≤ i ≤ N, N is a positive integer, and N is less than or equal to the first preset segment.
[0020] If the difference after the difference processing is within the first preset range, the video data of adjacent i-th segments in the same row in the horizontal direction are used as the first video data, and the video data of the adjacent i-th segments or the initial video data of the current segment are retained, and the address information corresponding to the video data of the adjacent i-th segments and the initial video data of the current segment is recorded.
[0021] If the difference after the difference processing is not within the first preset range, it is determined that the first preset range of the difference from the initial video data of the current segment is not satisfied.
[0022] On the other hand, determining the first video data according to the comparison relationship between the initial video data of the current segment and the video data of adjacent rows and adjacent first preset segments of the pixel size of the block to which it belongs includes:
[0023] Judge whether the initial video data of each current segment in adjacent rows in the vertical direction formed by the rows where the initial video data of each current segment is located are the same;
[0024] If they are the same, it is determined that the initial video data of each current segment is the same, one of the initial video data of the current segment is retained, and the address information corresponding to the initial video data of each current segment is recorded;
[0025] If they are different, the video data of adjacent i-th segments in the same row in the horizontal direction are successively subjected to difference processing with the initial video data of their respective current segments; where 1 ≤ i ≤ N, N is a positive integer, and N is less than or equal to the first preset segment.
[0026] If the difference after the difference processing is within the first preset range, the video data of adjacent i-th segments in the same row in the horizontal direction are used as the first video data, and the video data of the adjacent i-th segments or the initial video data of the current segment in the same row in the horizontal direction are retained, and the address information corresponding to the video data of the adjacent i-th segments and the initial video data of the current segment in the same row in the horizontal direction is recorded.
[0027] If the difference after the difference processing is not within the first preset range, it is judged that the video data of cross-adjacent i-th segments in adjacent rows in the vertical direction are respectively subjected to difference processing with the initial video data of their respective current segments;
[0028] If the differences obtained by performing difference processing on the video data of the cross-adjacent i-th segment in adjacent rows in the vertical direction respectively with the initial video data of their respective current segments are within a first preset range, then the video data of the cross-adjacent i-th segment in adjacent rows in the vertical direction is used as the first video data, the video data of the cross-adjacent i-th segment in adjacent rows in the vertical direction or the initial video data of the current segment is retained, and the address information corresponding to the video data of the cross-adjacent i-th segment in adjacent rows in the vertical direction and the initial video data of the current segment is recorded;
[0029] If the differences obtained by performing difference processing on the video data of the adjacent i-th segment in the same row in the vertical direction respectively with the initial video data of their respective current segments are not within the first preset range, it is determined that the first preset range of the differences from the initial video data of the current segment is not satisfied.
[0030] On the other hand, the process of difference processing includes:
[0031] Perform difference processing on the pixel point data corresponding to the video data of the adjacent i-th segment and the initial video data of the current segment to obtain difference data corresponding to each pixel point data;
[0032] Perform summation processing on the difference data corresponding to each pixel point data to obtain a first summation data as the difference after difference processing.
[0033] On the other hand, the segment length of the initial video data of the current segment is determined by the amount of compressed data in the compression mode of the video processing strategy.
[0034] On the other hand, the adjacent rows of the block pixel size are the current row and the previous row data determined by dividing the row data within the block pixel size into every two rows.
[0035] On the other hand, the adjacent rows of the block pixel size are the number of rows in which the row data within the block pixel size is in sequence of the current row and the previous row; among them, except for the first row, each video data of each row is compared twice as adjacent rows.
[0036] On the other hand, the process of establishing the first information table includes:
[0037] Store the video data of the adjacent i-th segment and the initial video data of the current segment in the first information table in the form of binary data, and the video data of each field corresponds to preset bit width information; among them, the position relationship between the segments of the first video data and the initial video data of the current segment is recorded in the binary data corresponding to each video data.
[0038] On the other hand, each row data of different block pixel sizes of the second video data includes one segment data; and the adjacent second preset segment is 0.
[0039] On the other hand, determining the second video data according to the comparison relationship between the initial video data of the current segment and the video data of adjacent rows within the adjacent block pixel size and the video data of each adjacent second preset segment includes:
[0040] Obtain the video data of adjacent rows in the horizontal direction corresponding to the rows where the initial video data of each of the current segments is located within the adjacent block pixel size;
[0041] Compare the video data of adjacent rows in each horizontal direction with the initial video data of each corresponding current segment;
[0042] If the difference between the video data of adjacent rows in each horizontal direction and the initial video data of each corresponding current segment is less than or equal to the second preset range, determine the second video data;
[0043] If there exists a difference between the video data of adjacent rows in each horizontal direction and the initial video data of each corresponding current segment that is greater than the second preset range, compare the video data of the cross rows corresponding to the rows where the initial video data of each of the current segments is located within the adjacent block pixel size;
[0044] If the difference between the video data of the cross rows corresponding to the rows where the initial video data of each of the current segments is located within the adjacent block pixel size is less than or equal to the second preset range, determine the second video data;
[0045] If there exists a difference between the video data of the cross rows corresponding to the rows where the initial video data of each of the current segments is located within the adjacent block pixel size that is greater than the second preset range, determine that the second preset range of the difference from the initial video data of the current segment is not satisfied.
[0046] On the other hand, the process of determining the similarity result of the second video data and the initial video data of the current segment corresponding to the block pixel size and the adjacent block pixel size includes:
[0047] Obtain the comparison result of the video data within the block pixel size and the adjacent block pixel size; wherein, the comparison result includes the second video data and the video data that does not satisfy the second preset range of the difference from the initial video data of the current segment;
[0048] Determine the proportion information occupied by the second video data among each comparison result;
[0049] If the proportion information occupied by the second video data is greater than the preset proportion, determine that the video data within the block pixel size and the adjacent block pixel size is similar.
[0050] On the other hand, the process of determining the similarity result of the pixel size of the block to which the second video data belongs and the pixel size of the adjacent block corresponding to the initial video data of the current segment includes:
[0051] Obtain the comparison result of the video data within the pixel size of the block to which it belongs and the pixel size of the adjacent block; wherein, the comparison result includes the second video data and the video data that does not satisfy the second preset range of the difference from the initial video data of the current segment;
[0052] Determine the proportion information occupied by the second video data among the comparison results;
[0053] If the proportion information occupied by the second video data is greater than the preset proportion, and there are differences between adjacent rows of video data in the horizontal direction that do not satisfy the second preset range, then perform difference processing on the pixel point data corresponding to the adjacent rows of video data in the horizontal direction that do not satisfy the second preset range and the initial video data of the current segment to obtain the difference data corresponding to each pixel point data;
[0054] Perform summation processing on the difference data corresponding to each pixel point data to obtain the second summation data;
[0055] If the second summation data is greater than the first preset data, determine that the video data within the pixel size of the block to which it belongs and the pixel size of the adjacent block are not similar.
[0056] On the other hand, storing the similarity result of the second video data and the initial video data of the current segment corresponding to the pixel size of the block to which it belongs and the pixel size of the adjacent block in the second information table includes:
[0057] Store the similarity result corresponding to the pixel size of the block to which it belongs and the pixel size of the adjacent block in the second information table in the form of binary data; wherein, if the similarity result corresponding to the pixel size of the block to which it belongs and the pixel size of the adjacent block is similar, only read the video data corresponding to the pixel size of the block to which it belongs or the pixel size of the adjacent block.
[0058] On the other hand, performing data format conversion processing on the initial video data of the current segment according to the video processing strategy corresponding to the first information table and the second information table to obtain the processed video data includes:
[0059] When the video processing strategy is the compression mode, perform data format conversion processing on the initial video data of the current segment according to the first information table and the second information table to obtain the processed video data; wherein, the compression mode is that the initial video data undergoes color space conversion and video compression to obtain the video data in the compressed format.
[0060] On the other hand, performing data format conversion processing on the initial video data of the current segment according to the video processing strategy corresponding to the first information table and the second information table to obtain processed video data, including:
[0061] When the video processing strategy is the pixel mode, performing data format conversion processing on the initial video data of the current segment according to the first information table to obtain processed video data; wherein, the pixel mode is video data obtained by converting the initial video data through a color space conversion.
[0062] To solve the above technical problems, the present invention also provides a video data processing device, including:
[0063] An acquisition module, configured to acquire the initial video data of the current segment stored by a host computer and / or a double data rate synchronous dynamic random access memory;
[0064] A first determination module, configured to determine first video data according to the comparison relationship between the initial video data of the current segment and the video data of adjacent rows and adjacent first preset segments of the pixel size of the block to which it belongs; and store the address information of the first video data and the initial video data of the current segment into the first information table; wherein, the first video data is video data that satisfies a first preset range of the difference from the initial video data of the current segment; one row of video data includes at least one segment of video data;
[0065] A second determination module, configured to determine second video data according to the comparison relationship between the initial video data of the current segment and the video data of adjacent rows and adjacent second preset segments within the adjacent block pixel size of the block pixel size to which it belongs; and store the similarity result of the second video data and the initial video data of the current segment corresponding to the block pixel size and the adjacent block pixel size into the second information table; wherein, the second video data is video data that satisfies a second preset range of the difference from the initial video data of the current segment;
[0066] A data conversion module, configured to perform data format conversion processing on the initial video data of the current segment according to the video processing strategy corresponding to the first information table and the second information table to obtain processed video data.
[0067] To solve the above technical problems, the present invention also provides a video data processing device, including:
[0068] A memory, configured to store a computer program;
[0069] A processor, configured to implement the steps of the video data processing method as described above when executing the computer program.
[0070] To solve the above technical problems, the present invention further provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the video data processing method as described above are implemented.
[0071] To solve the above technical problems, the present invention further provides a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, the steps of the video data processing method are implemented.
[0072] The present invention provides a video data processing method. By comparing the initial video data of the current segment with the adjacent rows of the block pixel size and the video data of each adjacent first preset segment, the first video data that satisfies the first preset range of the difference from the initial video data of the current segment is determined. That is, if the difference between each video data and the initial video data of the current segment satisfies the first preset range, it means that the initial video data of the current segment is the same or similar to the video data of this pixel size, and then skip processing is performed, and only one type of data is output. When comparing among different block pixel sizes, according to the comparison relationship between the initial video data of the current segment and the adjacent rows and the video data of each adjacent second preset segment within the adjacent block pixel size of the block pixel size to which the current segment belongs, the second video data that satisfies the second preset range of the difference from the initial video data of the current segment is determined. That is, if the difference between each video data and the initial video data of the current segment satisfies the second preset range, it means that the two block pixel sizes are the same or similar, and only the data of one block pixel size is output.
[0073] The beneficial effects of the present invention are as follows: Before data conversion, the initial video data of the current segment stored in the host and / or DDR ensures the diversity and flexibility of data acquisition. By directly establishing the first information table and the second information table through comparison processing, it can be determined whether there is the same or similar data between the initial video data of the current segment and other video data, which can avoid the waste of resources caused by repeated conversion of each segment of data in the same frame and reduce the power consumption of the chip. During the comparison process of the initial video data of the current segment, through comparison processing, a first information table is created to facilitate single-color space conversion of the same or similar data and avoid repeated data processing. At the same time, based on the comparison processing, a second information table is created to achieve single-block conversion of the same or similar data, avoid repeated data processing, speed up data processing, and improve the performance and service life of the chip.
[0074] Secondly, in the process of obtaining double-line video data, without the need for DDR caching, direct comparison is carried out to improve the efficiency of data processing. In the process of corresponding determination of the first video data and the second video data through row data comparison and block data comparison, the initial video data of each current segment is placed at the corresponding row position to facilitate data comparison. For data comparison, it is necessary to compare with the video data of adjacent rows and adjacent first preset segments stored in the pixel size of the block to which it belongs; and the video data of adjacent rows and adjacent second preset segments stored within the pixel size of adjacent blocks of the pixel size of the block to which it belongs respectively to determine the corresponding first video data and second video data, ensuring that there is a basis for data comparison. In the process of row data comparison, it is a process of comparing the initial video data of the current segment of one's own row with the adjacent rows in the vertical direction and the adjacent segments corresponding to each row, ensuring parallel data comparison while also comparing the video data of adjacent rows, thereby improving the accuracy of data comparison. In the process of difference processing, difference data is obtained by performing difference processing on pixel point data one by one, and then summation processing is carried out to obtain the difference after difference processing, ensuring the calculation accuracy of the corresponding pixel point data in the data comparison process and improving the accuracy of data screening.
[0075] In addition, the present invention also provides a video data processing device, equipment, medium, and product, which have the same beneficial effects as the above-mentioned video data processing method. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the embodiments of the present invention, the accompanying drawings required for use in the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0077] Figure 1 It is a flowchart of a video data processing method provided by an embodiment of the present invention;
[0078] Figure 2 It is a schematic diagram of video processing of a server management control chip provided by an embodiment of the present invention;
[0079] Figure 3 It is a flowchart of Y data calculation for a color space conversion function provided by an embodiment of the present invention;
[0080] Figure 4 It is a flowchart of U data calculation for a color space conversion function provided by an embodiment of the present invention;
[0081] Figure 5 It is a flowchart of V data calculation for a color space conversion function provided by an embodiment of the present invention;
[0082] Figure 6 Processing architecture diagram of a BLOCK conversion module provided by an embodiment of the present invention;
[0083] Figure 7 Schematic diagram of row data comparison provided by an embodiment of the present invention;
[0084] Figure 8 Schematic diagram of block data comparison provided by an embodiment of the present invention;
[0085] Figure 9 Architecture diagram of a data capture preprocessing subsystem provided by an embodiment of the present invention;
[0086] Figure 10 Architecture diagram of a color space conversion subsystem provided by an embodiment of the present invention;
[0087] Figure 11 Architecture diagram of a BLOCK conversion subsystem provided by an embodiment of the present invention;
[0088] Figure 12 Structure diagram of a video data processing device provided by an embodiment of the present invention;
[0089] Figure 13 Structure diagram of a video data processing device provided by an embodiment of the present invention. Specific embodiments
[0090] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the protection scope of the present invention.
[0091] The core of the present invention is to provide a video data processing method, device, equipment, medium and product to solve the problem of waste of processing resources and increase in chip power consumption caused by a large amount of identical data in the same frame of data.
[0092] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0093] The processing flow of the video function of traditional SoC chips is as follows: First, the data in the original optical three-color (Red-Green-Blue, RGB) format is then subjected to a color space conversion to generate video data in the YUV format consisting of three components: luminance (Y), blue chrominance (U), and red chrominance (V) in pixel format. At this time, the YUV data has two paths. One path is to directly write it into a Double Data Rate Synchronous Dynamic Random-Access Memory (DDR). The other path is to pass it through a video compression module (such as the H.264 format, Joint Photographic Experts Group (JPEG) format, etc.) to obtain compressed video data, and the compressed data is then written into the external DDR. In the YUV mode, the YUV-format video is directly input to the output control module and then written into the external DDR.
[0094] For a typical SoC chip with integrated video function, that is, the processing flow of the video function in a traditional baseboard management control chip is: The original video data at the host end is transmitted to the VGA module inside the baseboard management control chip through the Peripheral Component Interconnect Express (PCIe). The VGA generates the original video data in the RGB format and then undergoes the above processing.
[0095] In the actual application scenario of the server management control chip, during the long-term processing and monitoring stage, that is, the change in the server host operating system interface is very small, and there are a large number of identical data within the same frame. However, in the traditional solution, in the compression mode, these identical data within the same frame need to undergo color space conversion and BLOCK format conversion, and in the YUV mode, the identical data within the same frame needs to undergo color space conversion. Since the color space conversion function requires a large number of multiplication and addition operations, it will greatly increase the power consumption of the chip and affect the service life of the chip. And the BLOCK format conversion requires a large amount of on-chip storage resources. In the traditional solution, at least 16 rows of data need to be stored. Calculated according to a resolution of 1920*1200, the on-chip resources required are at least 1920*16*3 = 92160 Bytes, that is, 90 KB of on-chip resources, which will greatly occupy the area of the SoC chip. In the actual server management control chip, this on-chip storage resource accounts for 1 / 4 of the overall chip area, and there are a large number of repeated BLOCK conversions of the same data in the traditional solution. The video data processing method provided by the present invention can solve the above technical problems.
[0096] Figure 1The flowchart of a method for processing video data provided by an embodiment of the present invention is as follows. Figure 1 As shown, the method includes:
[0097] S11: Obtain the initial video data of the current segment stored by the host computer and / or double data rate synchronous dynamic random access memory;
[0098] S12: Determine the first video data according to the comparison relationship between the initial video data of the current segment and the adjacent rows of the pixel size of the block to which it belongs and the video data of each adjacent first preset segment; and store the address information of the first video data and the initial video data of the current segment into the first information table;
[0099] Among them, the first video data is the video data that satisfies the first preset range of the difference from the initial video data of the current segment; one row of video data includes at least one segment of video data;
[0100] S13: Determine the second video data according to the comparison relationship between the initial video data of the current segment and the adjacent rows within the adjacent block pixel size of the block pixel size to which it belongs and the video data of each adjacent second preset segment; and store the similarity result corresponding to the second video data and the initial video data of the current segment in the block pixel size and the adjacent block pixel size into the second information table;
[0101] Among them, the second video data is the video data that satisfies the second preset range of the difference from the initial video data of the current segment;
[0102] S14: Perform data format conversion processing on the initial video data of the current segment according to the video processing strategy corresponding to the first information table and the second information table to obtain the processed video data.
[0103] Specifically, the initial video data of the current segment stored by the host computer and / or DDR in step S11 can be understood that the video data processed in this embodiment is all carried out in the same frame of video data. One frame of video data includes multiple rows of video data, and one row of video data includes at least one segment of video data. The initial video data of the current segment transmitted through two channels can be obtained simultaneously, that is, two segments of the initial video data of the current segment, to achieve subsequent parallel processing. Or the initial video data of the current segment transmitted through any one channel can be obtained, that is, one segment of the initial video data of the current segment, which is not limited here and can be set according to the actual situation. Figure 2 The video processing schematic diagram of a server management control chip provided by an embodiment of the present invention is as follows. Figure 2As shown, one way is that the host HOST transmits data to the data capture module through the Video Graphics Array (VGA) module, that is, the Digital Visual Interface (DVI) method indicated by arrow 1; another way is the active acquisition method obtained from the A space of the double data rate synchronous dynamic random access memory in Figure 2 indicated by arrow 2. The original video data (operating system interface) at the host end is transmitted to the VGA module inside the baseboard management control chip through PCIe, and the VGA generates the original video data in RGB format. Figure 2 The space A in Figure 2 is used to store the data output by the output control module. Figure 2 The space B in is used to store the data output by the output control module.
[0104] The RGB format data is subjected to color space conversion according to the matrix conversion formula to obtain the video data in YUV format. The conversion process is completed using the matrix conversion formula:
[0105] Y = (0.257 * R) + (0.504 * G) + (0.098 * B) + 16;
[0106] U = 0.148 * R – 0.291 * G + 0.439 * B + 128;
[0107] V = 0.439 * R - 0.368 * G - 0.071 * B + 128.
[0108] Among them, Figure 3 FIG. is a flowchart of calculating the Y data of a color space conversion function provided by an embodiment of the present invention. As shown in Figure 3 , the Y data is obtained by adding the data PARAM_3 of 16 to the corresponding data parameters of R, G, and B (PARAM_0, PARAM_1, and PARAM_2 respectively). Figure 3 The Y data is obtained by adding the data PARAM_3 of 16 to the corresponding data parameters of R, G, and B (PARAM_0, PARAM_1, and PARAM_2 respectively). Figure 4 FIG. is a flowchart of calculating the U data of a color space conversion function provided by an embodiment of the present invention. As shown in Figure 4 , the U data is obtained by adding the data PARAM_7 of 128 to the corresponding data parameters of R, G, and B (PARAM_4, PARAM_5, and PARAM_6 respectively). Figure 4 The U data is obtained by adding the data PARAM_7 of 128 to the corresponding data parameters of R, G, and B (PARAM_4, PARAM_5, and PARAM_6 respectively). Figure 5 FIG. is a flowchart of calculating the V data of a color space conversion function provided by an embodiment of the present invention. As shown in Figure 5 , the V data is obtained by adding the data PARAM_11 of 128 to the corresponding data parameters of R, G, and B (PARAM_8, PARAM_9, and PARAM_10 respectively). Figure 5 The V data is obtained by adding the data PARAM_11 of 128 to the corresponding data parameters of R, G, and B (PARAM_8, PARAM_9, and PARAM_10 respectively).
[0109] The video data in YUV format has two channels. One is input to the subsequent BLOCK conversion module to generate BLOCK format data, and the other is directly input to the output control module and then written into the DDR.
[0110] Figure 6 The following is a processing architecture diagram of a BLOCK conversion module provided by an embodiment of the present invention. As Figure 6 shown, the block conversion module (BLOCK conversion module) implements the BLOCK conversion of YUV data. According to the YUV444 / YUV420 format, the size of the BLOCK is 16*16 or 8*8. Therefore, it is composed of 16 Y_RAMs (Y_0 - Y_15), 16 U_RAMs (U_0 - U_15), and 16 V_RAMs (V_0 - V_15) Figure 6 in the YUV_RAM_ARRAY (pixel storage array).
[0111] The JPEG compression module receives the YUV data in BLOCK format and then performs video compression to obtain the compressed data in JPEG format, which is output to the output control module. The output control module receives the compressed video data or the original video data in YUV format and then writes it into the DDR. After being read by the driver program of the network module, it is sent to the remote end through the network for display.
[0112] To determine the first video data according to the comparison relationship between the initial video data of the current segment and the adjacent rows and the video data of each adjacent first preset segment of the pixel size of the block in step S12. If the initial video data of the current segment of one way is obtained, it is necessary to compare it with the video data of the adjacent rows and the adjacent first preset segments within the same pixel size of the block to determine whether there is video data that is the same or similar to the initial video data of the current segment. If so, it is determined as the first video data, and the address information of the first video data and the initial video data of the current segment is stored in the first information table. The corresponding comparison method is not limited. It can be based on comparing the data of each pixel point within the segment to determine the corresponding difference, or it can be determined based on each segment through a certain specific algorithm. Here, it can be set according to the actual situation. The first preset segment can be one adjacent segment, two adjacent segments, etc., which is not limited here. The adjacent row is only the video data set in the previous row where the current segment is located.
[0113] Determine whether the comparison relationship of adjacent rows of the adjacent block pixel sizes corresponding to the initial video data of the current segment in step S13 and the video data of each adjacent second preset segment is the same as or similar to the initial video data of the current segment. If so, use it as the second video data. And store the similarity result of the second video data and the initial video data of the current segment corresponding to the block pixel size and the adjacent block pixel size into the second information table. That is to say, the second information table stores the similarity results of two block pixel sizes. The second preset range corresponding to the second video data can be the same as or different from the first preset range in step S12, which is not limited here and can be set according to the actual situation.
[0114] It can be understood that the comparison process in step S13 can be the same as or different from the comparison process in step S12, which is not limited here.
[0115] In step S14, perform data format conversion processing on the initial video data of the current segment according to the video processing strategy corresponding to the first information table and the second information table to obtain the processed video data. It can be understood that the first information table is located in Figure 2 the color conversion module, and the second information table is located in the block conversion module. Since the video data processing path includes two paths, one is that the color conversion module directly gives to the output control module, and the other is after passing through the color conversion module and the BLOCK conversion module and then through the video compression module to the output control module. Therefore, the video processing strategies of the corresponding first information table and the second information table are designed based on the two paths. There can be only the first information table, or the first information table and the second information table can perform data format conversion processing on the initial video data of the current segment to obtain the processed video data. Specifically, through the first information table and the second information table, it can be known whether the stored video data contains data that is the same as or similar to the initial video data of the current segment, so as to directly skip and not process it, saving some resources.
[0116] An embodiment of the present invention provides a method for processing video data. By comparing the initial video data of the current segment with the adjacent rows of the pixel size of this block and the video data of each adjacent first preset segment, the first video data that satisfies the first preset range of the difference from the initial video data of the current segment is determined. That is to say, if the difference between each video data and the initial video data of the current segment satisfies the first preset range, it means that the initial video data of the current segment is the same or similar to the video data of this pixel size, and then skip processing is performed, and only one type of data is output. When comparing in different block pixel sizes, according to the comparison relationship between the initial video data of the current segment and the adjacent rows and the video data of each adjacent second preset segment within the adjacent block pixel size of the block pixel size to which the current segment belongs, the second video data that satisfies the second preset range of the difference from the initial video data of the current segment is determined. That is to say, if the difference between each video data and the initial video data of the current segment satisfies the second preset range, it means that the two block pixel sizes are the same or similar, and only one type of data of the block pixel size is output. Before data conversion, the initial video data of the current segment stored by the host and / or DDR ensures the diversity and flexibility of data acquisition. By directly establishing the first information table and the second information table through comparison processing, it can be determined whether there is the same data or similar data between the initial video data of the current segment and other video data, which can avoid the waste of resources caused by the repeated conversion of each segment of data in the same frame and reduce the power consumption of the chip. During the comparison process of the initial video data of the current segment, through comparison processing, a first information table is created to facilitate the single color space conversion of the same or similar data and avoid repeated data processing. At the same time, based on the comparison processing, a second information table is created to achieve the single block conversion of the same or similar data, avoid repeated data processing, speed up the data processing speed, and improve the performance and service life of the chip.
[0117] In some embodiments, the initial video data of the current segment stored by the host and the double data rate synchronous dynamic random access memory are obtained; wherein, the initial video data of each current segment occupies one row respectively.
[0118] It can be understood that the two segments of the initial video data of the current segment obtained by the two methods in this embodiment, and the two segments of the initial video data of the current segment each occupy one row, which also forms parallel video data for subsequent comparison, and at the same time captures two adjacent rows of raw video data. One way is obtained through the DVI interface, such as rows 0, 2, 4... and the other way is obtained through the active acquisition method, such as rows 1, 3, 5.... Therefore, this sub-module integrates functions such as DVI interface, AXI Master read interface, resolution parsing, and pixel counting. The two adjacent data obtained are not internally cached and are directly compared in parallel.
[0119] In the process of obtaining dual-line video data provided in this embodiment, direct comparison is performed without the DDR caching process, improving the efficiency of data processing.
[0120] In some embodiments, in the process of determining the first video data, the adjacent rows of the pixel size of the block are the row data respectively occupied by the initial video data of each current segment, and the initial video data of each current segment belongs to the same block pixel size;
[0121] In the process of determining the second video data, the initial video data of each current segment occupies different rows of the same block pixel size.
[0122] It can be understood that in the process of determining the first video data and the second video data, the positions occupied by the initial video data of the current segment are different. In the process of determining the first video data, the initial video data of each current segment occupies different rows, but belongs to the same block pixel size. Figure 7 FIG. is a schematic diagram of line data comparison provided in an embodiment of the present invention. As Figure 7 shown, there are a total of two lines of data, and each line of data includes three segments of data. The initial video data of the current segment is in the last segment of each line of data. In the comparison process, it is based on the initial video data of the current segment of each line for comparison. It can also be for the video data of other adjacent segments of its own line for comparison, or for the video data of adjacent segments of cross lines for comparison, etc.
[0123] Figure 8 FIG. is a schematic diagram of block data comparison provided in an embodiment of the present invention. As Figure 8 shown, the initial video data of each current segment occupies different rows of the same block pixel size, that is, Figure 8 LINE_DATA_0 and LINE_DATA_2 of BLOCK A in
[0124] In the process of determining the first video data and the second video data corresponding to the line data comparison and block data comparison provided by the present invention, the initial video data of each current segment is placed at the corresponding row position to facilitate data comparison.
[0125] In some embodiments, when the initial video data of the current segment is obtained by the host computer or the double data rate synchronous dynamic random access memory, the first video data is determined according to the comparison relationship between the initial video data of the current segment and the stored adjacent rows of the block pixel size and the video data of each adjacent first preset segment;
[0126] Correspondingly, the second video data is determined according to the comparison relationship between the initial video data of the current segment and the stored adjacent rows of the adjacent block pixel size and the video data of each adjacent second preset segment.
[0127] It is understandable that, for the initial video data of the current segment obtained through a certain path of the host or DDR, in order to facilitate the comparison of line data and block data, at this time, it is necessary to compare with the video data of adjacent lines and adjacent segments that have been stored.
[0128] Specifically, determine the first video data according to the comparison relationship between the initial video data of the current segment and the video data of adjacent lines and adjacent first preset segments stored in the pixel size of the block to which the current segment belongs; determine the second video data according to the comparison relationship between the initial video data of the current segment and the video data of adjacent lines and adjacent second preset segments stored within the adjacent block pixel size of the pixel size of the block to which the current segment belongs.
[0129] The data comparison provided in this embodiment needs to compare with the video data of adjacent lines and adjacent first preset segments stored in the pixel size of the block to which it belongs; and the video data of adjacent lines and adjacent second preset segments stored within the adjacent block pixel size of the pixel size of the block to which it belongs respectively to determine the corresponding first video data and second video data, ensuring that the data comparison is based on evidence.
[0130] In some embodiments, determining the first video data according to the comparison relationship between the initial video data of the current segment and the video data of adjacent lines and adjacent first preset segments stored in the pixel size of the block to which the current segment belongs includes:
[0131] Judge whether the initial video data of each current segment in the adjacent lines in the vertical direction formed by the initial video data of each current segment is the same;
[0132] If they are the same, determine that the initial video data of each current segment is the same, retain one initial video data of the current segment, and record the address information corresponding to the initial video data of each current segment;
[0133] If they are different, successively perform difference processing on the video data of adjacent i-th segments in the same row in the horizontal direction with the initial video data of their respective current segments; where 1≤i≤N, N is a positive integer, and N is less than or equal to the first preset segment;
[0134] If the difference after the difference processing is within the first preset range, use the video data of adjacent i-th segments in the same row in the horizontal direction as the first video data, retain the video data of adjacent i-th segments or the initial video data of the current segment, and record the address information corresponding to the video data of adjacent i-th segments and the initial video data of the current segment;
[0135] If the difference after the difference processing is not within the first preset range, determine that it does not meet the first preset range of the difference from the initial video data of the current segment.
[0136] Specifically, such as Figure 7As shown, first, check whether the initial video data of each current segment in adjacent rows in the vertical direction formed by the rows where the initial video data of each current segment is located is the same. If it is the same, it means that there is data identical to the initial video data of the current segment, and only one initial video data of the current segment needs to be retained. The first video data at this time is the data identical to the initial video data of the current segment.
[0137] If it is not the same, then successively perform difference processing on the video data of adjacent segment i in each row in the horizontal direction with the initial video data of their respective current segments. Here, it can be understood that first perform difference processing on the video data of adjacent first segment with the initial video data of their respective current segments. If the difference is within the first preset range, then use the video data of adjacent first segment in each row in the horizontal direction as the first video data, retain the video data of adjacent first segment or the initial video data of the current segment, and record the address information corresponding to the video data of adjacent first segment and the initial video data of the current segment. If the difference after the difference processing is not within the first preset range, it is determined that the first preset range of the difference from the initial video data of the current segment is not satisfied. Continue to compare the video data of adjacent second segment with the initial video data of their respective current segments, and successively compare until the video data of the last segment.
[0138] In the process of comparing row data in this embodiment, by comparing the adjacent rows in the vertical direction and the adjacent segments corresponding to each row with the initial video data of the current segment of their own row, while ensuring parallel data comparison, the video data of adjacent rows is also compared, improving the accuracy of data comparison.
[0139] In some embodiments, determining the first video data according to the comparison relationship between the initial video data of the current segment and the video data of adjacent rows and adjacent first preset segments of the pixel size of the block includes:
[0140] Judge whether the initial video data of each current segment in adjacent rows in the vertical direction formed by the rows where the initial video data of each current segment is located is the same;
[0141] If it is the same, it is determined that the initial video data of each current segment is the same, retain one initial video data of the current segment, and record the address information corresponding to the initial video data of each current segment;
[0142] If it is different, then successively perform difference processing on the video data of adjacent segment i in each row in the horizontal direction with the initial video data of their respective current segments; where 1≤i≤N, N is a positive integer, and N is less than or equal to the first preset segment;
[0143] If the difference after difference processing is within the first preset range, the video data of the adjacent i-th segment in the same row in the horizontal direction is taken as the first video data, the video data of the adjacent i-th segment in the same row in the horizontal direction or the initial video data of the current segment is retained, and the address information corresponding to the video data of the adjacent i-th segment in the same row in the horizontal direction and the initial video data of the current segment is recorded;
[0144] If the difference after difference processing is not within the first preset range, it is judged that the video data of the cross-adjacent i-th segment in the adjacent rows in the vertical direction is respectively subjected to difference processing with the initial video data of their respective current segments;
[0145] If the difference after difference processing obtained by respectively subjecting the video data of the cross-adjacent i-th segment in the adjacent rows in the vertical direction to difference processing with the initial video data of their respective current segments is within the first preset range, the video data of the cross-adjacent i-th segment in the adjacent rows in the vertical direction is taken as the first video data, the video data of the cross-adjacent i-th segment in the adjacent rows in the vertical direction or the initial video data of the current segment is retained, and the address information corresponding to the video data of the cross-adjacent i-th segment in the adjacent rows in the vertical direction and the initial video data of the current segment is recorded;
[0146] If the difference after difference processing obtained by respectively subjecting the video data of the adjacent i-th segment in the same row in the vertical direction to difference processing with the initial video data of their respective current segments is not within the first preset range, it is determined that the first preset range of the difference from the initial video data of the current segment is not satisfied.
[0147] On the basis of combining the above embodiments, if the difference after difference processing is not within the first preset range, it is continued to judge that the video data of the cross-adjacent i-th segment in the adjacent rows in the vertical direction is respectively subjected to difference processing with the initial video data of their respective current segments. For Figure 7 example, for the video data of two adjacent segments, the comparison of the cross-adjacent segments, for example, CUR_DATA_0 (the initial video data_0 of the current segment) is compared with the video data of the first cross-adjacent segment (DATA_1, that is, data_1). CUR_DATA_0 is compared with the video data of the second cross-adjacent segment (DATA_3, that is, data_3). Such a comparison method also adopts successive comparison, and the specific comparison process will not be elaborated.
[0148] In the process of comparing the row data in this embodiment, on the basis of the process of comparing the adjacent rows in the vertical direction and the adjacent segments corresponding to each row with the initial video data of the current segment of their own row, the comparison of the cross-adjacent segments in the vertical direction is added, which ensures the parallel comparison of data while also comparing the video data of the cross-adjacent segments of the adjacent rows, improving the accuracy of data comparison.
[0149] In some embodiments, the process of difference processing includes:
[0150] Performing difference processing on the pixel data corresponding to the video data of the adjacent i-th segment and the initial video data of the current segment to obtain the difference data corresponding to each pixel data;
[0151] Performing summation processing on the difference data corresponding to each pixel data to obtain the first summation data as the difference after difference processing.
[0152] Specifically, the difference processing of the video data between segments is performed based on the pixel data at the same corresponding positions to obtain the difference data corresponding to each pixel data. Performing summation processing on the difference data corresponding to each pixel data to obtain the first summation data as the difference after difference processing.
[0153] This embodiment provides a difference processing process. By performing difference processing on pixel data one by one to obtain the corresponding difference data, and then performing summation processing to obtain the difference after difference processing, it ensures the calculation accuracy of the corresponding pixel data during the data comparison process and improves the accuracy of data screening.
[0154] In some embodiments, the process of establishing the first information table includes:
[0155] Storing the video data of the adjacent i-th segment and the initial video data of the current segment in the first information table in the form of binary data, and the video data of each field corresponds to the preset bit width information; wherein, the position relationship between the segments of the first video data and the initial video data of the current segment is recorded in the binary data corresponding to each video data.
[0156] Specifically, taking Figure 7 the adjacent two segments of data shown as an example, Table 1 is the first information table, as shown in Table 1:
[0157] Table 1
[0158]
[0159] As shown in Table 1, CUR_DATA_0 represents Figure 7 the initial video data_0 of the current segment in Figure 7 ; CUR_DATA_1 represents Figure 7The data_0, data_1, data_2, and data_3 therein. The binary data are 0001, 0010, 0011, 0100, 0101, etc. The video data of each field corresponds to the preset bit width information. Here, the preset bit width information is the same. At the same time, it also corresponds to 4 binary data. Taking 4’h1 as an example, it means that it is represented by 4 binary data. h represents the hexadecimal data 1, and 1 is converted to binary as 0001.
[0160] CUR_DATA_0 refers to the data with a CMP_LENGTH length of the 0 / 2 / 4... segments obtained through the DVI interface (such as the 64th - 95th pixel points). CUR_DATA_1 refers to the data with a CMP_LENGTH length of the 1 / 3 / 5... segments obtained through the active acquisition method (such as the 64th - 95th pixel points).
[0161] DATA_0 refers to the reference data with a length of the previous CMP_LENGTH adjacent to CUR_DATA_0. DATA_2 refers to the reference data with a length of the previous CMP_LENGTH adjacent to DATA_0. DATA_1 refers to the reference data with a length of the previous CMP_LENGTH adjacent to CUR_DATA_1. DATA_3 refers to the reference data with a length of the previous CMP_LENGTH adjacent to DATA_1.
[0162] First, CUR_DATA_0 and CUR_DATA_1 are compared, that is, the corresponding positions are subtracted, and then the absolute value of the subtracted value is accumulated. If the accumulated value does not exceed CMP_THREHOLD, then CUR_DATA_0 and CUR_DATA_1 are considered as similar comparison segments, and the first information table is updated. The final information table is that each field corresponds to a 4-bit width information.
[0163] The establishment process of the first information table provided in this embodiment is stored in the form of binary data, saving the memory space occupied by the data. At the same time, it is convenient to quickly identify the corresponding identical or similar video data.
[0164] In some embodiments, the segment length of the initial video data of the current segment is determined by the amount of compressed data in the compression mode of the video processing strategy.
[0165] Specifically, the segment length is the comparison length when comparing the data of adjacent two rows, such as 16 or 32. The larger this value is, the better the merging of the same or similar data can be carried out, and the larger the amount of reduced data after comparison will be. However, the compression quality during image compression will decrease synchronously. The smaller this value is, the smaller the amount of reduction after comparison will be, and the compression quality during image compression will increase synchronously.
[0166] The specific length of the segment length provided in this embodiment is determined by the amount of compressed data in the compression mode of the video processing strategy, so as to ensure a balanced state in the process of comparing the compression quality and the amount of data of the compressed data volume.
[0167] Correspondingly, the first preset range and the second preset range are similar. The larger the preset range, the larger the amount of reduced data after comparison. However, the compression quality during image compression will decrease synchronously. The smaller this value, the smaller the amount of reduction after comparison, and the compression quality during image compression will increase synchronously. The specific configuration value depends on the user's needs. The system default configuration can also be used.
[0168] In some embodiments, the adjacent rows of the block pixel size are the current row and the previous row data determined by dividing the row data within the block pixel size into two rows each.
[0169] It can be understood that the adjacent rows are the current row and the previous row data determined by dividing into two rows each. That is to say, the row data compared each time is only once. For example, the video data of row 0 and row 1 are compared, the video data of row 2 and row 3 are compared, and so on.
[0170] In other embodiments, in order to improve the accuracy of data comparison, the adjacent rows of the block pixel size are the number of rows in which the row data within the block pixel size are in sequence of the current row and the previous row; among them, except for the first row, each video data of each row is compared twice as adjacent rows.
[0171] Specifically, except for the video data of the first row, each video data of the remaining rows can be used as adjacent rows and compared twice. For example, the video data of row 0 and row 1 are compared, the video data of row 1 and row 2 are compared, and so on, and so forth.
[0172] The comparison process of the two adjacent row data provided in this embodiment saves data comparison time in the embodiment of dividing into two rows. In the second embodiment, except for the comparison of the first row, each video data of each row is compared twice, which improves the accuracy of data comparison.
[0173] In some embodiments, each row data of different block pixel sizes of the second video data includes a segment data; and the adjacent second preset segment is 0.
[0174] Specifically, as Figure 8 shown, each row data includes a segment data, and the corresponding adjacent second preset segment is 0. Therefore, the comparison at this time can only be carried out by comparing the data of different block pixel sizes. If there is an adjacent second preset segment, first compare the data within the same block pixel size, referring to the above process of row data comparison. Then compare the data of different block pixel sizes to finally achieve a similar result of comparing the data of two block pixel sizes.
[0175] In some embodiments, determining the second video data according to the comparison relationship between the initial video data of the current segment and the video data of adjacent rows and adjacent second preset segments within the adjacent block pixel size of the block pixel size of the current segment includes:
[0176] Obtain the video data of adjacent rows in the horizontal direction of the row where the initial video data of each current segment is located within the adjacent block pixel size;
[0177] Compare the video data of adjacent rows in each horizontal direction with the initial video data of the corresponding current segments;
[0178] If the differences between the video data of adjacent rows in each horizontal direction and the initial video data of the corresponding current segments are all less than or equal to the second preset range, determine the second video data;
[0179] If there are differences between the video data of adjacent rows in each horizontal direction and the initial video data of the corresponding current segments that are greater than the second preset range, compare the video data of the cross rows of the rows where the initial video data of each current segment is located within the adjacent block pixel size;
[0180] If the differences between the video data of the cross rows of the rows where the initial video data of each current segment is located within the adjacent block pixel size are all less than or equal to the second preset range, determine the second video data;
[0181] If there are differences between the video data of the cross rows of the rows where the initial video data of each current segment is located within the adjacent block pixel size that are greater than the second preset range, determine that the second preset range of the difference from the initial video data of the current segment is not satisfied.
[0182] Specifically, as Figure 8 shown, since there is no adjacent second preset segment currently, only comparisons are made by rows. Therefore, compare the video data of adjacent rows in each horizontal direction with the initial video data of the corresponding current segments, that is, compare LINE_DATA_0 ( Figure 8 the initial video data_0 of the current segment in Figure 8 ) with LINE_DATA_1 ( Figure 8 the row data_1 in Figure 8 ), compare LINE_DATA_2 ( Figure 8 the initial video data_2 of the current segment in Figure 8 ) with LINE_DATA_3 ( Figure 8 the row data_3 in ). If the corresponding differences are all less than or equal to the second preset range, determine the second video data, that is, it indicates that there is video data that is the same as or similar to the initial video data of each current segment, and use the video data that is the same as or similar to the initial video data of each current segment as the second video data.
[0183] If the difference between the video data of adjacent rows in each horizontal direction and the initial video data of each corresponding current segment is greater than the second preset range, then compare the video data of the cross rows of the rows where the initial video data of each corresponding current segment is located within the adjacent block pixel size; if the differences between the video data of the cross rows of the rows where the initial video data of each corresponding current segment is located within the adjacent block pixel size are all less than or equal to the second preset range, then determine the second video data, which means that there is video data that is the same as or similar to the initial video data of each current segment, and use the video data that is the same as or similar to the initial video data of each current segment as the second video data. If there is a difference between the video data of the cross rows of the rows where the initial video data of each corresponding current segment is located within the adjacent block pixel size that is greater than the second preset range, then it is determined that the second preset range of the difference from the initial video data of the current segment is not satisfied.
[0184] The process of comparing the video data of adjacent rows in the horizontal direction and the video data of cross rows provided in this embodiment further expands the comparison range and improves the accuracy of the comparison data.
[0185] In some embodiments, the process of determining the similarity result of the second video data and the initial video data of the current segment corresponding to the block pixel size of the current segment and the adjacent block pixel size includes:
[0186] Obtain the comparison result of the video data within the block pixel size of the current segment and the adjacent block pixel size; where the comparison result includes the second video data and the video data that does not satisfy the second preset range of the difference from the initial video data of the current segment;
[0187] Determine the proportion information occupied by the second video data among the comparison results;
[0188] If the proportion information occupied by the second video data is greater than the preset proportion, then determine that the video data within the block pixel size of the current segment and the adjacent block pixel size are similar.
[0189] Specifically, taking Figure 8 as an example, the size of the corresponding BLOCK (block pixel size_A and block pixel size_B) is 16*16, and the size of CMP_LENGTH is 32. Therefore, 8 comparison results will be obtained, which are respectively:
[0190] Result_0 (comparison result of the 0th row and the 1st row of BLOCK_A / BLOCK_B) - (similar / dissimilar);
[0191] Result_1 (comparison result of the 2nd row and the 3rd row of BLOCK_A / BLOCK_B) - (similar / dissimilar);
[0192] Result_2 (Comparison result of the 4th and 5th lines of BLOCK_A / BLOCK_B) - (Similar / Not Similar);
[0193] Result_3 (Comparison result of the 6th and 7th lines of BLOCK_A / BLOCK_B) - (Similar / Not Similar);
[0194] Result_4 (Comparison result of the 8th and 9th lines of BLOCK_A / BLOCK_B) - (Similar / Not Similar);
[0195] Result_5 (Comparison result of the 10th and 11th lines of BLOCK_A / BLOCK_B) - (Similar / Not Similar);
[0196] Result_6 (Comparison result of the 12th and 13th lines of BLOCK_A / BLOCK_B) - (Similar / Not Similar);
[0197] Result_7 (Comparison result of the 14th and 15th lines of BLOCK_A / BLOCK_B) - (Similar / Not Similar).
[0198] Determine the proportion information occupied by the second video data in each comparison result, that is, count the number of results that are similar and the same among Result_0 - Result_7 = M; the occupied proportion information is M / 8. If this proportion information is greater than the preset proportion, it means that the video data within the pixel size of the block to which it belongs is similar to the video data within the pixel size of the adjacent block, that is, BLOCK_A and BLOCK_B are similar.
[0199] Among them, the setting of the preset proportion can be configured according to the user in the register, or the default value can be adopted, etc. It is not limited here and can be set according to the actual situation.
[0200] In some other embodiments, the process of determining the similarity result corresponding to the pixel size of the block to which the second video data belongs and the pixel size of the adjacent block with the initial video data of the current segment includes:
[0201] Obtain the comparison result of the video data within the pixel size of the block to which it belongs and the pixel size of the adjacent block; among them, the comparison result includes the second video data and the video data that does not meet the second preset range of the difference from the initial video data of the current segment;
[0202] Determine the proportion information occupied by the second video data in each comparison result;
[0203] If the ratio information occupied by the second video data is greater than a preset ratio, and the difference between adjacent rows of video data in the horizontal direction does not meet the second preset range, then perform a difference process on the video data of adjacent rows in the horizontal direction that do not meet the second preset range and the pixel point data corresponding to the initial video data of the current segment to obtain the difference data corresponding to each pixel point data;
[0204] Perform an addition process on the difference data corresponding to each pixel point data to obtain a second addition data;
[0205] If the second addition data is greater than the first preset data, it is determined that the video data within the pixel size of the block to which it belongs and the pixel size of the adjacent block are not similar.
[0206] Specifically, on the basis of the above embodiments, if the ratio information occupied by the second video data is greater than the preset ratio, continue to compare whether the difference between adjacent rows of video data in the horizontal direction meets the second preset range. If not, perform a difference process on the video data of adjacent rows in the horizontal direction that do not meet the second preset range and the pixel point data corresponding to the initial video data of the current segment to obtain the difference data corresponding to each pixel point data. That is, even if the video data of multiple rows in two block pixel sizes are similar, but there are large differences in the video data of the last row, that is, the difference exceeds the second preset range, it is necessary to continue to determine whether the two block pixel sizes are similar. The second addition data is obtained by performing an addition process on the difference data corresponding to each pixel point data. If the second addition data is greater than the first preset data, it means that the video data of the two block pixel sizes are not similar. To conform to the scenario judgment process where within two adjacent BLOCKs, most of the fields are similar, but only a few are not similar, and at the same time the pixel value differences of these few are very large, making the judgment more accurate.
[0207] The present embodiment provides two specific methods for comparing block data. The first method determines the similarity of the block pixel size only through the ratio information. The second method, on the basis of determining through the ratio information, further determines the similarity of the block pixel size through the difference process of pixel point data. No matter which comparison method is used, the similarity comparison of block pixel processing is realized, improving the comparison accuracy of data.
[0208] In some embodiments, storing the similarity result of the second video data and the initial video data of the current segment corresponding to the pixel size of the block to which it belongs and the pixel size of the adjacent block in the second information table includes:
[0209] Store the similarity result corresponding to the pixel size of the block to which it belongs and the pixel size of the adjacent block in the second information table in the form of binary data; wherein, if the similarity result corresponding to the pixel size of the block to which it belongs and the pixel size of the adjacent block is similar, only read the video data corresponding to the pixel size of the block to which it belongs or the pixel size of the adjacent block.
[0210] Specifically, taking Figure 8 two adjacent segments of data shown as an example, Table 2 is the second information table. In the YUV420 mode, the comparison size inside this module is denoted as BLOCK_LENGTH = 16; in the YUV444 mode, the comparison size inside this module is denoted as N = 8. As shown in Table 2:
[0211] Table 2
[0212]
[0213] As shown in Table 2, LINE_DATA_0 and LINE_DATA_2 respectively represent Figure 8 the initial video data_0 of the current segment and the initial video data_2 of the current segment in Figure 8 LINE_DATA_1 and LINE_DATA_3 respectively represent Figure 8 the line data_1 and line data_3 in Figure 8 It should be noted that the initial video data_0 of the current segment and the initial video data_2 of the current segment in Figure 8 only represent Figure 8 data comparison and have nothing to do with other figures. For similar BLOCK determination results, if a group of BLOCKs are similar (BLOCK_A and BLOCK_B), the information of BLOCK_A is 2'b01 and the information of BLOCK_B is 2'b10; if a group of BLOCKs are not similar (BLOCK_A and BLOCK_B), the information of BLOCK_A is 2'b11 and the information of BLOCK_B is 2'b11.
[0214] The establishment process of the second information table provided in this embodiment is stored in the form of binary data, saving the memory space occupied by data. At the same time, it is convenient to quickly identify the corresponding identical or similar video data.
[0215] In some embodiments, according to the video processing strategy corresponding to the first information table and the second information table, data format conversion processing is performed on the initial video data of the current segment to obtain the processed video data, including:
[0216] When the video processing strategy is the compression mode, data format conversion processing is performed on the initial video data of the current segment according to the first information table and the second information table to obtain the processed video data; where the compression mode is that the initial video data undergoes color space conversion and video compression to obtain video data in a compressed format.
[0217] Figure 9 is the architecture diagram of a data capture preprocessing subsystem provided by an embodiment of the present invention, as Figure 9As shown in the figure, the initial video data of the current segment of two channels is obtained through the dual-line data acquisition module, the segment length and the preset range data in the size threshold module are obtained, the first information table is created through the line data comparison module, and the second information table is created through the block data comparison module.
[0218] Figure 10 This is the architecture diagram of a color space conversion subsystem provided by an embodiment of the present invention. As Figure 10 shown, there are two Y data calculation modules, two U data calculation modules, and two V data calculation modules. This is because it is possible that the RGB data acquisition module may obtain data through two channels simultaneously. For example, obtaining 4'b0101 and 4'b1000 simultaneously means that the RGB data acquisition module (optical primary color data acquisition module) needs to obtain RGB data from two channels (RGB data channel 0 (optical primary color data channel 0) and RGB data channel 1 (optical primary color data channel 1)) simultaneously and perform color space conversion separately. Combining Figures 3 to 5 with the schematic diagram, it avoids the repeated color space conversion of a large amount of identical and similar data. The calculation of one Y / U / V component requires 3 multiplications and 3 additions, greatly reducing the power consumption of the chip and increasing the service life of the chip.
[0219] Mainly through the first information table parsing control module, read information table 1 from the pre-stage data capture and preprocessing subsystem. Each field corresponds to a 4-bit width, and the information of two fields is obtained simultaneously, that is, the data in the first information table with two 4-bit widths is obtained simultaneously. Table 3 is the parsing table for parsing the first information table, as shown in Table 3:
[0220] Table 3
[0221]
[0222] Figure 11 This is the architecture diagram of a BLOCK conversion subsystem provided by an embodiment of the present invention. As Figure 11 shown, it mainly includes a second information table parsing control module, a BLOCK data recovery module, a YUV RAM array (16 Y_RAMs / 16 U_RAMs / 16 V_RAMs), a YUV RAM array write controller, a YUV RAM array read controller, and a YUV data acquisition module.
[0223] Because YUV data is input row by row, Figure 8For example, the information in the second information tables of BLOCK_A and BLOCK_B can only be obtained after the inputs of BLOCK_A and BLOCK_B are completed. Each BLOCK corresponds to a 2-bit width. When obtaining the information of two BLOCKs simultaneously, that is, obtaining the information data in the second information tables with two 2-bit widths simultaneously.
[0224] Therefore, on the writing side, it is the same as the traditional solution. However, on the reading side, the information in the second information table is obtained through the second information table parsing control module. Table 4 is the parsing table for parsing the second information table, as shown in Table 4:
[0225] Table 4
[0226]
[0227] As shown in Table 4, when the second information table parsing controller obtains {2’b01, 2‘b10}, it is parsed that the two sets of BLOCK data in the current BLOCK group are similar. Then, it controls the YUV RAM array reading controller to skip the reading of the latter BLOCK after reading the previous BLOCK in the current group, and directly let the BLOCK data recovery module complete the complement of the BLOCK data. For example, BLOCK_A is read, but the data of BLOCK_B is not read. The size of the current BLOCK is 16*16. The Y_BLOCK is read from Y_RAM_0 - Y_RAM_15 16 times each, the U_BLOCK is read from U_RAM_0 - U_RAM_15 16 times each, and the V_BLOCK is read from V_RAM_0 - V_RAM_15 16 times each. Then, when the next BLOCK of the current BLOCK group is obtained next, there is no need to read again in the YUV RAM array. The BLOCK data recovery module directly copies the data of the previous BLOCK (including Y_BLOCK, U_BLOCK, V_BLOCK) and transfers it to the subsequent JPEG compression module.
[0228] If the second information table parsing controller obtains {2’b11, 2‘b11}, it is the same as the traditional solution, and the sequence of the previous and subsequent BLOCKs of a group of BLOCKs is generated.
[0229] In some other embodiments, according to the video processing strategy corresponding to the first information table and the second information table, data format conversion processing is performed on the initial video data of the current segment to obtain the processed video data, including:
[0230] When the video processing strategy is the pixel mode, data format conversion processing is performed on the initial video data of the current segment according to the first information table to obtain the processed video data; wherein, the pixel mode is the video data obtained by converting the initial video data through the color space.
[0231] It is understandable that based on the corresponding path in the pixel mode, only the initial video data of the current segment is processed for data format conversion through the first information table to obtain the processed video data.
[0232] The two video processing strategies provided in this embodiment have different bases for the corresponding information tables in different modes, enabling diversification of video processing. No matter which video processing strategy is used, it can avoid the repeated generation of adjacent and similar BLOCK data, speed up the video processing speed, and improve the overall performance of the chip.
[0233] The above has described in detail each embodiment corresponding to the method for processing video data. On this basis, the present invention also discloses a device for processing video data corresponding to the above method. Figure 12 It is a structural diagram of a device for processing video data provided by an embodiment of the present invention. As Figure 12 shown, the device for processing video data includes:
[0234] An acquisition module 11, configured to acquire the initial video data of the current segment stored by the host computer and / or the double data rate synchronous dynamic random access memory;
[0235] A first determination module 12, configured to determine the first video data according to the comparison relationship between the initial video data of the current segment and the video data of adjacent rows and adjacent first preset segments of the pixel size of the block to which it belongs; and store the address information of the first video data and the initial video data of the current segment into the first information table; wherein, the first video data is the video data that satisfies the first preset range of the difference from the initial video data of the current segment; at least one row of video data includes one segment of video data;
[0236] A second determination module 13, configured to determine the second video data according to the comparison relationship between the initial video data of the current segment and the video data of adjacent rows and adjacent second preset segments within the adjacent block pixel size of the block pixel size to which it belongs; and store the similarity result of the second video data and the initial video data of the current segment corresponding to the block pixel size and the adjacent block pixel size into the second information table; wherein, the second video data is the video data that satisfies the second preset range of the difference from the initial video data of the current segment;
[0237] A data conversion module 14, configured to perform data format conversion processing on the initial video data of the current segment according to the video processing strategy corresponding to the first information table and the second information table to obtain the processed video data.
[0238] Since the embodiments of the device part correspond to the above embodiments, the embodiments of the device part are described by referring to the embodiments of the above method part and will not be elaborated here.
[0239] For the introduction of a video data processing device provided by the present invention, please refer to the above method embodiments. The present invention will not be elaborated herein, and it has the same beneficial effects as the above video data processing method.
[0240] Figure 13 The following is a structural diagram of a video data processing device provided by an embodiment of the present invention. As Figure 13 shown, the device includes:
[0241] A memory 21 for storing a computer program;
[0242] A processor 22 for implementing the steps of the video data processing method when executing the computer program.
[0243] Among them, the processor 22 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 22 may be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 22 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 22 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 22 may further include an artificial intelligence (AI) processor, and the AI processor is used to process computational operations related to machine learning.
[0244] The memory 21 may include one or more non-volatile storage media, which may be non-transitory. The memory 21 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash storage devices. In this embodiment, the memory 21 is at least used to store the following computer program 211. After the computer program is loaded and executed by the processor 22, it can implement the relevant steps of the video data processing method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 21 may also include an operating system 212 and data 213, etc., and the storage method may be transient storage or permanent storage. Among them, the operating system 212 may include Windows, Unix, Linux, etc. The data 213 may include, but is not limited to, the data involved in the video data processing method, etc.
[0245] In some embodiments, the video data processing device may further include a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27.
[0246] Those skilled in the art can understand that Figure 13 the structure shown in
[0247] does not constitute a limitation on the video data processing device, and may include more or fewer components than shown in the figure.
[0248] For the introduction of a video data processing device provided by the present invention, please refer to the foregoing method embodiments. The present invention will not be elaborated herein, and it has the same beneficial effects as the above video data processing method.
[0249] Furthermore, the present invention also provides a non-volatile storage medium, on which a computer program is stored. When the computer program is executed by the processor 22, it implements the steps of the video data processing method as described above.
[0250] It can be understood that if the method in the above embodiments is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.
[0251] For the introduction of a non-volatile storage medium provided by the present invention, please refer to the above method embodiments. The present invention will not repeat them here, and it has the same beneficial effects as the above video data processing method.
[0252] Furthermore, the present invention also provides a computer program product, including computer programs / instructions. When the computer programs / instructions are executed by a processor, the steps of the video data processing method are implemented.
[0253] For the introduction of a computer program product provided by the present invention, please refer to the above method embodiments. The present invention will not repeat them here, and it has the same beneficial effects as the above video data processing method.
[0254] The above has introduced in detail a video data processing method, device, equipment, medium, and product provided by the present invention. The various embodiments in the specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple. For the relevant parts, please refer to the description in the method part. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the present invention.
[0255] It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
Claims
1. A method for processing video data, characterized in that: include: Obtaining initial video data of a current segment stored by a host machine and / or a double data rate synchronous dynamic random access memory; In the block to which the initial video data of the current segment belongs, the first video data corresponding to the initial video data of the current segment is determined by comparing the initial video data of each current segment in adjacent rows in the vertical direction, and comparing the video data of the adjacent first preset segments in the same row in the horizontal direction with the initial video data of the current segment of its own row; or, on the basis of comparing the initial video data of each current segment in adjacent rows in the vertical direction, and comparing the video data of the adjacent first preset segments in the same row in the horizontal direction with the initial video data of the current segment of its own row, the first video data corresponding to the initial video data of the current segment is determined by adding the comparison of the video data of the intersecting adjacent first preset segments in adjacent rows in the vertical direction with the initial video data of each current segment; and storing the respective address information of the first video data and the initial video data of the current segment in a first information table; wherein, the first video data is video data satisfying that the difference with the initial video data of the current segment is within a first preset range; a row of video data includes at least one segment of video data; and the video data at the same segment position in each row of video data constitute the initial video data of each current segment; Determine second video data corresponding to the initial video data of the current segment by comparing the horizontally adjacent rows and intersecting rows of the row where the initial video data of each current segment is located with the initial video data of the current segment itself in adjacent blocks of the initial video data of the current segment; and determine corresponding similarity results based on the comparison results, and store the similarity results in a second information table; wherein the second video data is video data whose difference with the initial video data of the current segment falls within a second preset range; and the comparison result includes the second video data and video data whose difference with the video data of the current segment does not fall within the second preset range; The initial video data of the current segment is converted into a data format according to the video processing strategy corresponding to the first information table and the second information table to obtain processed video data.
2. The method for processing video data according to claim 1, wherein: When the initial video data of the current segment is acquired by the host machine or the double data rate synchronous dynamic random access memory, within the block to which the initial video data of the current segment belongs, the first video data corresponding to the initial video data of the current segment is determined by comparing the initial video data of the same segment of the current segment in the vertically adjacent rows of the block stored in the block with the initial video data of the same segment of the current segment, and comparing the video data of the adjacent first preset segment in the same row in the horizontal direction with the initial video data of the current segment of the own row; or, based on the comparison of the initial video data of the same segment of the current segment in the vertically adjacent rows of the block stored in the block with the initial video data of the same segment of the current segment, and comparing the video data of the adjacent first preset segment in the same row in the horizontal direction with the initial video data of the current segment of the own row, the first video data corresponding to the initial video data of the current segment is determined by adding the comparison of the video data of the cross-adjacent first preset segments in the vertically adjacent rows with the initial video data of the current segment; Correspondingly, by comparing the stored horizontal adjacent rows and cross rows corresponding to the rows where the initial video data of each current segment is located with the initial video data of the current segment in the adjacent blocks of the initial video data of the current segment, the second video data corresponding to the initial video data of the current segment is determined.
3. The method for processing video data according to claim 1, wherein: Determining first video data corresponding to the initial video data of the current segment by comparing initial video data of each current segment in adjacent rows in the vertical direction and comparing video data of an adjacent first preset segment in the same row in the horizontal direction with the initial video data of the current segment in the current row within the block to which the initial video data of the current segment belongs includes: Determining whether initial video data of initial video data segments in adjacent rows in a vertical direction are the same; If they are the same, retaining the initial video data of the current segment and recording the address information corresponding to the initial video data of each current segment; If they are different, performing difference processing on the video data of the adjacent i-th segment in each row in the horizontal direction and the initial video data of each current segment respectively; wherein 1≤i≤N, N is a positive integer, and N is less than or equal to the first preset segment; If the difference value after the difference processing is within a first preset range, the video data of the adjacent i-th segment in the respective rows in the horizontal direction are used as the first video data, the video data of the adjacent i-th segment or the initial video data of the current segment are retained, and the address information corresponding to the video data of the adjacent i-th segment and the initial video data of the current segment are recorded; If the difference value after the difference processing is not within the first preset range, it is determined that the difference value with the initial video data of the current segment is not within the first preset range.
4. The method for processing video data according to claim 1, wherein: Determining first video data corresponding to the initial video data of the current segment by comparing initial video data of each current segment of adjacent rows in the vertical direction and comparing video data of adjacent first preset segments of the same row in the horizontal direction with the initial video data of the current segment of the row, and then comparing video data of intersecting adjacent first preset segments in adjacent rows in the vertical direction with the initial video data of each current segment, including: Determining whether initial video data of initial video data segments in adjacent rows in a vertical direction are the same; If they are the same, retaining the initial video data of the current segment and recording the address information corresponding to the initial video data of each current segment; If they are different, performing difference processing on the video data of the adjacent i-th segment in each row in the horizontal direction and the initial video data of each current segment respectively; wherein 1≤i≤N, N is a positive integer, and N is less than or equal to the first preset segment; If the difference value after the difference processing is within the first preset range, the video data of the adjacent i-th segment in the respective horizontal lines are used as the first video data, the video data of the adjacent i-th segment in the respective horizontal lines or the initial video data of the current segment are retained, and the address information corresponding to the video data of the adjacent i-th segment in the respective horizontal lines and the initial video data of the current segment are recorded; If the difference after the difference processing is not within the first preset range, performing difference processing on the video data of the i-th segment in the adjacent rows in the vertical direction and the initial video data of the current segment respectively; If the difference value after the difference processing is within a first preset range, use the video data of the i-th segment of the intersecting adjacent rows in the vertical direction as the first video data, retain the video data of the i-th segment of the intersecting adjacent rows in the vertical direction or the initial video data of the current segment, and record address information corresponding to the video data of the i-th segment of the intersecting adjacent rows in the vertical direction and the initial video data of the current segment; If the difference value after the difference processing is not within the first preset range, it is determined that the difference value with the initial video data of the current segment is not within the first preset range.
5. The method for processing video data according to claim 3 or 4, characterized in that: The difference processing process includes: Performing difference processing on the pixel data corresponding to the video data of the adjacent i-th segment and the initial video data of the current segment to obtain difference data corresponding to each pixel data; The difference data corresponding to each pixel point data is summed up to obtain first summed data as the difference value after the difference processing.
6. The method for processing video data according to claim 1, wherein: The segment length of the initial video data of the current segment is determined by the amount of compressed data in the compression mode of the video processing strategy.
7. The method for processing video data according to claim 3 or 4, characterized in that: The process of establishing the first information table includes: The video data of the adjacent i-th segment or the initial video data of the current segment is stored in the first information table in the form of binary data, and the video data of each field corresponds to the preset bit width information; wherein the binary data corresponding to each video data records the segment position relationship between the first video data and the initial video data of the current segment.
8. The method for processing video data according to claim 1, wherein: Determining second video data corresponding to the initial video data of the current segment by comparing the initial video data of the current segment with the adjacent rows and intersecting rows in the horizontal direction corresponding to the row where the initial video data of the current segment is located in the adjacent blocks of the initial video data of the current segment, including: Obtaining video data of adjacent rows in the horizontal direction corresponding to the row where the initial video data of each current segment is located in the adjacent blocks of the initial video data of the current segment; Comparing the video data of adjacent lines in each horizontal direction with the corresponding initial video data of each current segment; If the differences between the video data of the adjacent lines in the horizontal direction and the corresponding initial video data of the current segments are all less than or equal to the second preset range, determining the second video data; If the difference between the video data of the adjacent rows in the horizontal direction and the corresponding initial video data of the current segments is greater than the second preset range, comparing the video data of the intersecting rows of the rows corresponding to the initial video data of the current segments in the adjacent blocks; If the differences between the video data of the intersecting rows corresponding to the rows where the initial video data of each current segment is located in the adjacent blocks are all less than or equal to the second preset range, determining the second video data; If the difference between the video data of the intersecting rows corresponding to the rows where the initial video data of each current segment is located in adjacent blocks is greater than the second preset range, it is determined that the difference with the initial video data of the current segment is not within the second preset range.
9. The method for processing video data according to claim 8, wherein: Determining corresponding similarity results based on comparison results of video data in the block and adjacent blocks, including: Determining the proportion information occupied by the second video data based on a comparison result of the video data in the corresponding block and the video data in the adjacent blocks; If the proportion information occupied by the second video data is greater than a preset proportion, it is determined that the video data in the corresponding block is similar to the video data in the adjacent block.
10. The method for processing video data according to claim 8, wherein: The process of determining a corresponding similarity result based on a comparison result of video data in the block and the adjacent blocks includes: Determining the proportion information occupied by the second video data based on a comparison result of the video data in the corresponding block and the video data in the adjacent blocks; If the proportion information occupied by the second video data is greater than the preset proportion, and the difference between the video data of adjacent horizontal rows does not satisfy the second preset range, performing difference processing on the video data of the adjacent horizontal rows that does not satisfy the second preset range and the pixel data corresponding to the initial video data of the current segment to obtain difference data corresponding to each pixel data; Adding the difference data corresponding to each pixel point data to obtain second summed data; If the second summed data is greater than the first preset data, it is determined that the video data in the corresponding block is not similar to the video data in the adjacent block.
11. The method for processing video data according to claim 9 or 10, characterized in that: Storing similar results in the second information table includes: The similarity results corresponding to the block and the adjacent block are stored in the second information table in the form of binary data; wherein, if the similarity results corresponding to the block and the adjacent block are similar, only the video data corresponding to the block or the adjacent block is read.
12. The method for processing video data according to claim 1, wherein: Performing data format conversion processing on the initial video data of the current segment according to the video processing strategies corresponding to the first information table and the second information table to obtain processed video data, including: When the video processing strategy is a compression mode, the initial video data of the current segment is converted into a data format according to the first information table and the second information table to obtain processed video data; wherein, the compression mode is the initial video data being subjected to color space conversion and video compression to obtain compressed format video data.
13. The method for processing video data according to claim 1, wherein: Performing data format conversion processing on the initial video data of the current segment according to the video processing strategies corresponding to the first information table and the second information table to obtain processed video data, including: When the video processing strategy is a pixel mode, the initial video data of the current segment is converted into a data format according to the first information table to obtain processed video data; wherein, the pixel mode is the video data obtained by converting the initial video data into a color space.
14. A video data processing device, characterized in that: include: an acquisition module, configured to acquire initial video data of a current segment stored by a host machine and / or a double data rate synchronous dynamic random access memory; A first determination module is configured to determine, within a block to which the initial video data of the current segment belongs, first video data corresponding to the initial video data of the current segment by comparing the initial video data of each current segment in adjacent vertical rows, and comparing the video data of adjacent first preset segments in the same horizontal row with the initial video data of the current segment of its own row; or, by comparing the initial video data of each current segment in adjacent vertical rows, and comparing the video data of adjacent first preset segments in the same horizontal row with the initial video data of the current segment of its own row, adding comparison of the video data of intersecting adjacent first preset segments in adjacent vertical rows with the initial video data of each current segment, to determine the first video data corresponding to the initial video data of the current segment; and storing the respective address information of the first video data and the initial video data of the current segment in a first information table; wherein the first video data is video data satisfying a difference with the initial video data of the current segment within a first preset range; a row of video data includes at least one segment of video data; and video data at the same segment position in each row of video data constitute the initial video data of each current segment; A second determination module is configured to determine second video data corresponding to the initial video data of the current segment by comparing the initial video data of the current segment with the initial video data of the current segment in the adjacent blocks of the initial video data of the current segment, the adjacent rows and the intersecting rows in the horizontal direction corresponding to the row where the initial video data of the current segment is located, and the initial video data of the current segment in the row thereof; and to determine a corresponding similarity result based on the comparison result, and to store the similarity result in a second information table; wherein the second video data is video data whose difference with the initial video data of the current segment falls within a second preset range; and the comparison result includes the second video data and video data whose difference with the video data of the current segment does not fall within the second preset range; The data conversion module is used to perform data format conversion processing on the initial video data of the current segment according to the video processing strategy corresponding to the first information table and the second information table to obtain processed video data.
15. A video data processing device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for processing video data according to any one of claims 1 to 13 when executing the computer program.
16. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for processing video data according to any one of claims 1 to 13 are implemented.
17. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the method for processing video data according to any one of claims 1 to 13 are implemented.
Citation Information
Patent Citations
Method and apparatus for decoding image based on skip mode
CN102511163A
Image compression system, method, equipment and medium
CN117156287A
Image data processing method, product, equipment and medium
CN118214820A