CN115203470B - Method, device and equipment for storing video image data and readable medium - Google Patents
Method, device and equipment for storing video image data and readable medium Download PDFInfo
- Publication number
- CN115203470B CN115203470B CN202211129967.0A CN202211129967A CN115203470B CN 115203470 B CN115203470 B CN 115203470B CN 202211129967 A CN202211129967 A CN 202211129967A CN 115203470 B CN115203470 B CN 115203470B
- Authority
- CN
- China
- Prior art keywords
- pixel point
- data
- ddr
- row vector
- pixel
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 68
- 239000013598 vector Substances 0.000 claims abstract description 145
- 239000011159 matrix material Substances 0.000 claims abstract description 63
- 238000004590 computer program Methods 0.000 claims description 10
- 238000013500 data storage Methods 0.000 claims description 9
- 230000008569 process Effects 0.000 abstract description 6
- 230000000694 effects Effects 0.000 abstract description 4
- 238000005265 energy consumption Methods 0.000 abstract description 3
- 238000004364 calculation method Methods 0.000 description 21
- 238000010586 diagram Methods 0.000 description 18
- 230000006870 function Effects 0.000 description 6
- 101100498818 Arabidopsis thaliana DDR4 gene Proteins 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000013461 design Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/70—Information retrieval; Database structures therefor; File system structures therefor of video data
- G06F16/71—Indexing; Data structures therefor; Storage structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/70—Information retrieval; Database structures therefor; File system structures therefor of video data
- G06F16/78—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- G06F16/783—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
- G06F16/7847—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using low-level visual features of the video content
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Library & Information Science (AREA)
- Software Systems (AREA)
- Image Processing (AREA)
Abstract
The invention relates to the field of storage, and discloses a method, a device, equipment and a readable medium for storing video image data. The method comprises the following steps: acquiring a pixel matrix of a video image and setting reference pixels in row vector pixels; and sequentially performing logic operation from the pixel points adjacent to the reference pixel points in the row vector pixel points and traversing according to the row vector sequence of the pixel point matrix so as to write the corresponding result of each pixel point of the pixel point matrix into the DDR. The method disclosed by the invention effectively reduces the energy consumption of the DDR read-write process, has a particularly obvious effect on reducing the power consumption of a large-data-volume application scene, and has practical significance on occasions with higher requirements on the power consumption of products.
Description
Technical Field
The present invention relates to the field of storage, and in particular, to a method, an apparatus, a device, and a readable medium for storing video image data.
Background
Video and image are common application scenarios with large Data volume in a system, and DDR (Double Data Rate, full DDR SDRAM, DDR for short) is often used as a cache. Among them, DDR as a cache has the advantages of fast Access speed, small size, and low price compared to SRAM (Static Random-Access Memory), so that DDR becomes a main component in modern digital devices and is mainly responsible for temporary data Access.
With the development of DDR, the memory rate is higher and higher, but the power consumption per access is not significantly reduced. In the prior art, the DDR power consumption is reduced, a hardware control method, such as a gated clock, is mostly adopted, and dynamic power consumption management is realized by controlling the logic operation of a part; or dynamic frequency control is adopted, and according to the working load rate, the DDR working frequency is properly reduced under the conditions of light load and low speed requirement, and the purpose of reducing power consumption is achieved. However, there are many disadvantages to reduce the DDR power consumption by using the hardware control method, the gated clock can only reduce the DDR power consumption without access requirement, and is only part of logic in the DDR controller or PHY, which cannot effectively reduce the DDR power consumption during read-write access, and the effect is not obvious when the DDR load is very high as well as when the DDR load is very high.
Disclosure of Invention
The invention provides a method, a device, equipment and a readable medium for storing video image data. The video image data storage method provided by the invention changes the circuit characteristic of data polarity storage through the similarity of the video image data and DDR, converts the video image data into more '1' high levels for storage during storage, and reduces the power consumption during storage.
In view of the above objects, an aspect of an embodiment of the present invention provides a method of video image data storage, the method including the steps of: acquiring a pixel matrix of a video image and setting reference pixels in row vector pixels; and sequentially performing logic operation from the pixel points adjacent to the reference pixel points in the row vector pixel points and traversing according to the row vector sequence of the pixel point matrix so as to write the corresponding result of each pixel point of the pixel point matrix into the DDR.
In some embodiments, the method further comprises: writing the data of the reference pixel point of the line vector pixel point into the DDR, and updating the previous data of the reference pixel point in the DDR with the data of the reference pixel point of the current line vector pixel point so as to enable the data of the reference pixel point in the DDR to be suitable for the current line vector pixel point.
In some embodiments, the method further comprises: and sequentially carrying out the operation opposite to the logic operation on the data of the pixel points stored in the DDR according to the writing sequence of the DDR so as to restore the data of the pixel points stored in the DDR into original data and read out the original data.
In some embodiments, the performing, in the row vector pixel points, the logical operation in sequence starting from the pixel point adjacent to the reference pixel point and traversing according to the row vector sequence of the pixel point matrix to write the corresponding result of each pixel point of the pixel point matrix into the DDR includes: and carrying out XOR and negation operations in the row vector pixel points in sequence from the pixel points adjacent to the reference pixel points, and traversing according to the row vector sequence of the pixel point matrix.
In some embodiments, the method further comprises: and sequentially carrying out XOR operation on the data of the pixel points stored in the DDR according to the write-in sequence of the DDR so as to restore the data of the pixel points stored in the DDR into original data and read out the original data.
In some embodiments, the obtaining a pixel matrix of the video image and setting the reference pixels in the row vector pixels includes: acquiring a row vector group and a column vector group of a pixel point matrix of a video image to obtain a row vector sequence and a column vector sequence of the pixel point matrix; and setting the first column of pixel points of the current row vector pixel points as reference pixel points of the current row vector pixel points, and sequentially setting according to the row vector sequence to adapt to the logic operation of the current row vector pixel points.
In some embodiments, the method further comprises: performing logic operation on the data of the reference pixel point of the current row vector pixel point and the previous data of the reference pixel point in the DDR; and writing the corresponding result of the reference pixel point of the current row vector pixel point into the DDR, and updating the data of the reference pixel point in the DDR to be the data of the reference pixel point of the current row vector pixel point.
In some embodiments, the performing a logical operation on the data of the reference pixel of the current row vector pixel and the previous data of the reference pixel in the DDR includes: and performing XOR operation on the data of the reference pixel point of the current line vector pixel point and the previous data of the reference pixel point in the DDR, and then performing negation operation.
In some embodiments, the performing, in the row vector pixel points, the logical operation in sequence starting from the pixel point adjacent to the reference pixel point and traversing according to the row vector sequence of the pixel point matrix to write the corresponding result of each pixel point of the pixel point matrix into the DDR includes: sequentially carrying out logic operation on the current row vector pixel point and the data of the previous pixel point according to the sequence of the column vectors and writing a corresponding result into the DDR; and traversing each pixel point of the pixel point matrix according to the row vector sequence and writing the corresponding result into the DDR.
In some embodiments, the performing, in the current row vector pixel, a logical operation with the data of the previous pixel in sequence according to the column vector order and writing the corresponding result into the DDR includes: and performing XOR operation on the current row vector pixel point and the data of the previous pixel point in sequence according to the sequence of the column vectors, and then writing the corresponding result into the DDR.
In another aspect of the embodiments of the present invention, there is also provided an apparatus for storing video image data, the apparatus including the following modules: the first module is used for configuring a pixel point matrix for acquiring a video image and setting reference pixel points in row vector pixel points; and the second module is configured and used for sequentially carrying out logic operation from the pixel point adjacent to the reference pixel point in the row vector pixel points and traversing according to the row vector sequence of the pixel point matrix so as to write the corresponding result of each pixel point of the pixel point matrix into the DDR.
In some embodiments, the apparatus further comprises: and the third module is configured to write the data of the reference pixel point of the row vector pixel point into the DDR, and update the previous data of the reference pixel point in the DDR with the data of the reference pixel point of the current row vector pixel point, so that the data of the reference pixel point in the DDR is adapted to the current row vector pixel point.
In some embodiments, the apparatus further comprises: and the fourth module is configured to sequentially perform the operation opposite to the logic operation on the data of the pixel points stored in the DDR according to the writing sequence of the DDR so as to restore the data of the pixel points stored in the DDR into original data and read the original data.
In another aspect of the embodiments of the present invention, there is also provided a computer device, including at least one processor; and a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of any of the methods described above.
In another aspect of the embodiments of the present invention, a computer-readable storage medium is also provided, in which a computer program for implementing any one of the above method steps is stored when the computer program is executed by a processor.
The invention has at least the following beneficial effects: the invention provides a method, a device, equipment and a readable medium for storing video image data, wherein the method for storing the video image data utilizes the similarity of the video image data and the circuit characteristic of DDR (double data rate) change data polarity storage, effectively reduces the energy consumption of a DDR (double data rate) reading and writing process on the premise of ensuring correct data reading and writing, has an especially obvious effect of reducing the power consumption of a large-data-volume application scene, and has practical significance for occasions with higher requirements on product power consumption.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating an embodiment of a method for storing video image data according to the present invention;
fig. 2 is a schematic diagram illustrating another embodiment of a method for storing video image data according to the present invention;
FIG. 3 is a schematic diagram illustrating another embodiment of a method for storing video image data according to the present invention;
FIG. 4 is a schematic diagram illustrating another embodiment of a method for storing video image data according to the present invention;
FIG. 5 is a schematic diagram illustrating an embodiment of an apparatus for video image data storage according to the present invention;
fig. 6 is a schematic diagram of another embodiment of an apparatus for storing video image data according to the present invention;
fig. 7 is a schematic diagram of another embodiment of an apparatus for storing video image data according to the present invention;
FIG. 8 is a schematic diagram illustrating one embodiment of a computer device provided by the present invention;
FIG. 9 is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided by the present invention.
Detailed Description
Embodiments of the present invention are described below. However, it is to be understood that the disclosed embodiments are merely examples and that other embodiments may take various and alternative forms.
In addition, it should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are only used for convenience of expression and should not be construed as a limitation to the embodiments of the present invention, and the descriptions thereof in the following embodiments are omitted. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The video image data is composed of data of one frame, each frame of data is composed of pixel elements, and the pixel data includes RGB (Red, green, blue, a color system, which represents various colors by variation and superposition of R, G, and B). The adjacent pixel data (horizontal and vertical) of each frame of data generally has continuity, namely, when the video image is accessed by DDR, a large amount of adjacent data can have similarity.
DDR4 is a kind of DDR having a new characteristic compared to the older generation DDR, and DDR4 uses a new driving standard, i.e., "pseudo-open drain" or POD. In POD, the receiver terminates the signal to VDD instead of VDD/2. When DDR transmits 0, both SSTL (STUB SERIES TERMINATED LOGIC STUB SERIES termination LOGIC) and POD have current consumption. DDR4 uses a lower voltage than DDR3, to some extent compensates for the more current consumption of DDR4 to VDD. When DDR transfers 1, POD consumes no power when driving high. Therefore, when the DDR access is performed, if there are more than 4 '0's in the byte, a DBI (Data Bus Inversion, a method for changing Data polarity storage in DDR, which can be used to reduce power consumption) function is adopted, so that more '1's are transmitted, and the purpose of reducing power consumption of the DDR access can be achieved. The principle of the DBI function is: assuming that X xor Y = Z, X xor Z = Y, the base value X is exclusive-ored with the base value Y to obtain the data Z, and the base value Y can be recovered after exclusive-oring the base value X with the data Z.
If the two pixel data are A and B respectively, and C is obtained after the A and B are subjected to XOR, more '0' exists in the value C after the XOR of the two similar data. DBI on C gives D with a high '1' value. And D is transmitted during DDR access, and more '1' values are transmitted, so that the power consumption can be reduced. And after the transmission is finished, changing D into C according to the DBI state, and recovering the original pixel data B after XOR between A and C.
One or more embodiments of the present application will be described below in conjunction with the following drawings.
In view of the above objects, a first aspect of embodiments of the present invention proposes an embodiment of a method for video image data storage. Fig. 1 is a schematic diagram illustrating an embodiment of a method for storing video image data according to the present invention. As shown in fig. 1, a method for storing video image data according to an embodiment of the present invention includes the following steps:
s1, acquiring a pixel matrix of a video image and setting reference pixels in row vector pixels;
and S2, sequentially performing logic operation from the pixel point adjacent to the reference pixel point in the row vector pixel points, and traversing according to the row vector sequence of the pixel point matrix so as to write the corresponding result of each pixel point of the pixel point matrix into the DDR.
In view of the above objects, a first aspect of embodiments of the present invention proposes an embodiment of a method for video image data storage. Fig. 2 is a schematic diagram illustrating another embodiment of a method for storing video image data according to the present invention. As shown in fig. 2, a method for storing video image data according to an embodiment of the present invention includes the following steps:
s1, acquiring a pixel matrix of a video image and setting reference pixels in row vector pixels;
s2, performing logical operation in sequence from the pixel point adjacent to the reference pixel point in the row vector pixel points and traversing according to the row vector sequence of the pixel point matrix so as to write the corresponding result of each pixel point of the pixel point matrix into the DDR;
and S3, writing the data of the reference pixel point of the row vector pixel point into the DDR, and updating the previous data of the reference pixel point in the DDR with the data of the reference pixel point of the current row vector pixel point so as to enable the data of the reference pixel point in the DDR to be adaptive to the current row vector pixel point.
In view of the above objects, a first aspect of embodiments of the present invention proposes an embodiment of a method for video image data storage. Fig. 3 is a schematic diagram illustrating another embodiment of a method for storing video image data according to the present invention. As shown in fig. 3, a method for storing video image data according to an embodiment of the present invention includes the following steps:
s1, acquiring a pixel matrix of a video image and setting reference pixels in row vector pixels;
s2, performing logic operation in sequence from a pixel point adjacent to the reference pixel point in the row vector pixel points and traversing according to the row vector sequence of the pixel point matrix so as to write the corresponding result of each pixel point of the pixel point matrix into the DDR;
s3, writing the data of the reference pixel points of the row vector pixel points into the DDR, and updating the previous data of the reference pixel points in the DDR with the data of the reference pixel points of the current row vector pixel points so as to enable the data of the reference pixel points in the DDR to be suitable for the current row vector pixel points;
and S4, sequentially carrying out operation opposite to the logic operation on the data of the pixel points stored in the DDR according to the writing sequence of the DDR so as to restore the data of the pixel points stored in the DDR into original data and read out the original data.
Fig. 4 is a schematic diagram illustrating another embodiment of a method for storing video image data according to the present invention, as shown in fig. 4, for a pixel arrangement of a 1080P (resolution 1920 × 1080) image, the image data is transmitted in units of pixels in the sequence of x0y0, x1y0, \ 8230;, x1919y0, x0y1, x1y1, \8230;, x1919y1, \8230;, x0y1079, x1y1079, \8230;, x1919y1079, and x1919y1079.
The first row of pixel point data is written into DDR as the reference data of the first row of data, and is cached in RAM as Reg0 by marking the data of the pixel point x0y0 as D [ x0y 0]. And carrying out XOR calculation on data D [ x1y0] of the pixel point x1y0 and data D [ x0y0] of the pixel point x0y0, recording the result as D ' x1y0, then carrying out bitwise negation to obtain D ' [ x1y0], and writing the D ' [ x1y0] into the DDR. And performing exclusive OR calculation on data D [ x2y0] of the pixel point x2y0 and data D [ x1y0] of the pixel point x1y0, recording the result as D 'x 2y0, and performing bitwise inversion to obtain D' x2y0 which is written into the DDR. And analogizing until the last pixel point in the row is calculated to obtain D 'x 1919y0, and then inverting according to bits to obtain D' [ x1919y0] to be written into the DDR.
And the second row of pixel point data records the data of the pixel point x0y1 as D [ x0y1], performs exclusive OR calculation on the data of the pixel point and the data of Reg0, updates the data of Reg0 as D [ x0y1], records the exclusive OR calculation result as D ' x0y1, then performs bit-wise inversion to obtain D ' [ x0y1], and writes the D ' [ x0y1] into the DDR. And performing exclusive OR calculation on data D [ x1y1] of the pixel point x1y1 and data D [ x1y1] of the pixel point x0y0, recording the result as D ' x1y1, performing bitwise negation to obtain D ' x1y1, and writing the D ' x1y1 into DDR. And performing exclusive OR calculation on data D [ x2y1] of the pixel point x2y1 and data D [ x1y1] of the pixel point x1y1, recording the result as D 'x 2y1, and performing bitwise inversion to obtain D' x2y1 which is written into the DDR. And analogizing until the last pixel point in the row is calculated to obtain D 'x 1919y1, and then inverting according to bits to obtain D' [ x1919y1] to be written into the DDR.
And in the third row of pixel point data, the data of the pixel point x0y3 is recorded as D [ x0y2], the XOR calculation is carried out on the data of the pixel point x0y3 and the data of Reg0, the data of Reg0 is updated to be D [ x0y2], the XOR calculation result is recorded as D ' x0y2, then, the D ' x0y2 is obtained by bit inversion, and the D ' x0y2 is written into the DDR. And performing exclusive OR calculation on data D [ x1y2] of the pixel point x1y2 and data D [ x1y2] of the pixel point x0y0, recording the result as D ' x1y2, performing bitwise inversion to obtain D ' x1y2, and writing the D ' x1y2 into the DDR. And performing XOR calculation on data D [ x2y2] of the pixel point x2y2 and data D [ x1y2] of the pixel point x1y2, recording the result as D 'x 2y2, and performing bitwise inversion to obtain D' x2y2 which is written into the DDR. And repeating the steps until the last pixel point in the row is calculated to obtain D 'x 1919y2, and then inverting according to the bit to obtain D' x1919y2 to be written into the DDR. And in the same way, all 1080 rows of data are sequentially calculated and then written into the DDR.
When reading from DDR, the reverse operation of the above-mentioned writing is executed, and the original data can be restored. Firstly, reading data of a pixel point x0y0 as D [ x0y0], taking the data as reference data of a first row of data, caching the reference data in an RAM, and marking the reference data as Reg0. Then, the data D '[ x1y0] of the pixel point x1y0 is read out, the data D' x1y0] is inverted according to bits to obtain D 'x 1y0, and then the data D' x0y0] of the pixel point x0y0 is subjected to XOR calculation, so that the data is restored to D [ x1y0]. Reading out the data D '[ x2y0] of the pixel point x2y0, firstly inverting according to bits to obtain D' x2y0, and then carrying out XOR calculation with the data D [ x1y0] of the pixel point x1y0, so that the data is restored to D [ x2y0]. And repeating the steps until the calculation of the last pixel point in the row is completed to obtain D [ x1919y0].
Reading out the data of the pixel point x0y1 in the second row as D 'x 0y1, inverting according to bit to obtain D' x0y1, carrying out XOR calculation with the data of Reg0 to recover the data D [ x0y1], updating the data of Reg0 as D [ x0y1], reading out the data D 'x 1y1 of the pixel point x1y1, inverting according to bit to obtain D' x1y1, carrying out XOR calculation with the data of D [ x0y1] to recover the data D [ x1y1]. Reading out the data D ' x2y1 of the pixel point x2y1, firstly inverting according to bits to obtain D ' x2y1, carrying out XOR calculation on the D ' x1y1 and the data to recover the data D x2y 1. And repeating the steps until the calculation of the last pixel point in the row is completed to obtain D [ x1919y1].
Reading out the data of a third row of pixel points x0y3 as D 'x 0y2, firstly inverting according to bits to obtain D' x0y2, carrying out XOR calculation with the data of Reg0 to recover the data D [ x0y2], updating the data of Reg0 into D [ x0y2], reading out the data D 'x 1y2 of the pixel points x1y2, firstly inverting according to bits to obtain D' x1y2, carrying out XOR calculation with the data of D [ x0y2], and recovering the data D [ x1y2]. Reading out data D 'x 2y2 of pixel point x2y2, first taking inverse according to bit to obtain D' x2y2, and carrying out XOR calculation with data of D x1y2 to recover data D x2y 2. And repeating the steps until the calculation of the last pixel point in the row is completed to obtain D [ x1919y2].
In the same way, all 1080 rows of data are read out from the DDR in sequence, and the original image data are restored through bitwise negation and XOR operation.
According to the characteristic of similarity of adjacent data, the number of 1 s in the data can be effectively reduced by carrying out XOR operation on the adjacent data, and then the number of 1 s in the data is obviously increased compared with the original data after bit-wise negation by utilizing the DBI characteristic, so that the energy consumption of DDR reading and writing can be effectively reduced. The method is not limited to the DDR storage method of the video image data, can be expanded to the similar DDR use field, can effectively improve and reduce the DDR power consumption, and has practical significance to occasions with high requirements on product power consumption.
In a second aspect of embodiments of the present invention, an apparatus for video image data storage is provided. Fig. 5 is a schematic diagram illustrating an embodiment of an apparatus for storing video image data according to the present invention. As shown in fig. 5, the present invention provides an apparatus for storing video image data, comprising: a first module 011 configured to obtain a pixel matrix of a video image and set reference pixels in row vector pixels; a second module 012, configured to perform logical operations in sequence from the pixel adjacent to the reference pixel among the row vector pixels and traverse according to the row vector sequence of the pixel matrix, so as to write the corresponding result of each pixel of the pixel matrix into the DDR.
In a second aspect of the embodiments of the present invention, an apparatus for storing video image data is provided. Fig. 6 is a schematic diagram illustrating another embodiment of an apparatus for storing video image data according to the present invention. As shown in fig. 6, the present invention provides an apparatus for storing video image data, comprising: the first module 011 is configured to acquire a pixel matrix of a video image and set reference pixels in row vector pixels; a second module 012 configured to perform, in the row vector pixel points, logical operations in sequence from pixel points adjacent to the reference pixel point and perform traversal according to the row vector sequence of the pixel point matrix, so as to write the result corresponding to each pixel point of the pixel point matrix into the DDR; a third module 013, configured to write the data of the reference pixel of the row vector pixel into the DDR, and update the previous data of the reference pixel in the DDR with the data of the reference pixel of the current row vector pixel, so that the data of the reference pixel in the DDR is adapted to the current row vector pixel.
In a second aspect of the embodiments of the present invention, an apparatus for storing video image data is provided. Fig. 7 is a schematic diagram illustrating another embodiment of an apparatus for storing video image data according to the present invention. As shown in fig. 7, an apparatus for storing video image data according to the present invention includes: the first module 011 is configured to acquire a pixel matrix of a video image and set reference pixels in row vector pixels; a second module 012 configured to perform, in the row vector pixel points, logical operations in sequence from a pixel point adjacent to the reference pixel point and perform traversal according to the row vector sequence of the pixel point matrix, so as to write a corresponding result of each pixel point of the pixel point matrix into the DDR; a third module 013, configured to write the data of the reference pixel of the row vector pixel into the DDR, and update the previous data of the reference pixel in the DDR with the data of the reference pixel of the current row vector pixel, so that the data of the reference pixel in the DDR is adapted to the current row vector pixel; a fourth module 014, configured to perform an operation reverse to the logical operation on the data of the pixels stored in the DDR sequentially according to the write-in sequence of the DDR, so as to restore the data of the pixels stored in the DDR to original data and read out the original data.
In view of the above object, a third aspect of the embodiments of the present invention provides a computer device, and fig. 8 is a schematic diagram illustrating an embodiment of a computer device provided by the present invention. As shown in fig. 8, an embodiment of a computer device provided by the present invention includes the following modules: at least one processor 021; and a memory 022, the memory 022 storing computer instructions 023 operable on the processor 021.
The invention also provides a computer readable storage medium. FIG. 9 is a schematic diagram illustrating an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 9, the computer readable storage medium 031 stores a computer program 032 which, when executed by a processor, performs the method as described above. Wherein the computer program 032 executes steps comprising: acquiring a pixel matrix of a video image and setting reference pixels in row vector pixels; and sequentially performing logic operation from the pixel points adjacent to the reference pixel points in the row vector pixel points and traversing according to the row vector sequence of the pixel point matrix so as to write the corresponding result of each pixel point of the pixel point matrix into the DDR.
In some embodiments, the method further comprises: and sequentially carrying out the operation opposite to the logic operation on the data of the pixel points stored in the DDR according to the writing sequence of the DDR so as to restore the data of the pixel points stored in the DDR into original data and read out the original data.
In some embodiments, the method further comprises: and writing the data of the reference pixel points of the row vector pixel points into the DDR, and updating the previous data of the reference pixel points in the DDR with the data of the reference pixel points of the current row vector pixel points so as to enable the data of the reference pixel points in the DDR to be suitable for the current row vector pixel points.
In some embodiments, the performing, in the row vector pixel points, the logical operation in sequence starting from the pixel point adjacent to the reference pixel point and traversing according to the row vector sequence of the pixel point matrix to write the corresponding result of each pixel point of the pixel point matrix into the DDR includes: and carrying out XOR and negation operations in the row vector pixel points in sequence from the pixel points adjacent to the reference pixel points, and traversing according to the row vector sequence of the pixel point matrix.
In some embodiments, the method further comprises: and sequentially carrying out XOR operation on the data of the pixel points stored in the DDR according to the write-in sequence of the DDR so as to restore the data of the pixel points stored in the DDR to original data and read the data.
In some embodiments, the obtaining a pixel matrix of the video image and setting the reference pixels in the row vector pixels includes: acquiring a row vector group and a column vector group of a pixel point matrix of a video image to obtain a row vector sequence and a column vector sequence of the pixel point matrix; and setting the first column of pixel points of the current row vector pixel points as reference pixel points of the current row vector pixel points, and sequentially setting according to the row vector sequence to adapt to the logic operation of the current row vector pixel points.
In some embodiments, the method further comprises: further comprising: performing logic operation on the data of the reference pixel point of the current row vector pixel point and the previous data of the reference pixel point in the DDR; and writing the corresponding result of the reference pixel point of the current row vector pixel point into the DDR, and updating the data of the reference pixel point in the DDR to be the data of the reference pixel point of the current row vector pixel point.
In some embodiments, the performing a logical operation on the data of the reference pixel of the current row vector pixel and the previous data of the reference pixel in the DDR includes: and carrying out XOR operation on the data of the reference pixel point of the current row vector pixel point and the previous data of the reference pixel point in the DDR and then carrying out inversion operation.
In some embodiments, the performing, in the row vector pixel points, the logical operation in sequence starting from the pixel point adjacent to the reference pixel point and traversing according to the row vector sequence of the pixel point matrix to write the corresponding result of each pixel point of the pixel point matrix into the DDR includes: performing logic operation on the current row vector pixel point and the data of the previous pixel point in sequence according to the sequence of the column vectors, and writing a corresponding result into the DDR; and traversing each pixel point of the pixel point matrix according to the row vector sequence and writing the corresponding result into the DDR.
In some embodiments, the performing, in the current row vector pixel, a logical operation with the data of the previous pixel in sequence according to the column vector order and writing the corresponding result into the DDR includes: and performing XOR operation on the current row vector pixel point and the data of the previous pixel point in sequence according to the sequence of the column vectors, and then performing inversion operation on the current row vector pixel point and the data of the previous pixel point, and writing a corresponding result into the DDR.
Finally, it should be noted that, as one of ordinary skill in the art can appreciate that all or part of the processes of the methods of the above embodiments can be implemented by a computer program to instruct related hardware, and the program of the method for setting system parameters can be stored in a computer readable storage medium, and when executed, the program can include the processes of the embodiments of the methods as described above. The storage medium of the program may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments corresponding thereto.
Furthermore, the methods disclosed according to embodiments of the invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. Which when executed by a processor performs the above-described functions defined in the methods disclosed in embodiments of the invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, D0L, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the above embodiments of the present invention are merely for description, and do not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also combinations between technical features in the above embodiments or in different embodiments are possible, and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements and the like that may be made without departing from the spirit or scope of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.
Claims (12)
1. A method of video image data storage, comprising:
acquiring a pixel matrix of a video image and setting reference pixels in row vector pixels;
writing the data of the reference pixel points of the row vector pixel points into a DDR, and updating the previous data of the reference pixel points in the DDR with the data of the reference pixel points of the current row vector pixel points so as to enable the data of the reference pixel points in the DDR to be suitable for the current row vector pixel points;
performing logical operation on the data of the reference pixel point of the current row vector pixel point and the previous data of the reference pixel point in the DDR to obtain a corresponding result of the reference pixel point of the current row vector pixel point, and writing the result into the DDR;
and sequentially performing logic operation from the pixel point adjacent to the reference pixel point in the row vector pixel points and traversing according to the row vector sequence of the pixel point matrix so as to write the corresponding result of each pixel point of the pixel point matrix into the DDR.
2. The method of claim 1, further comprising:
and sequentially carrying out the operation opposite to the logic operation on the data of the pixel points stored in the DDR according to the write-in sequence of the DDR so as to restore the data of the pixel points stored in the DDR into original data and read the original data.
3. The method of claim 1, wherein said performing, in said row vector pixel points, a logical operation in sequence starting with a pixel point adjacent to said reference pixel point and performing a traversal in the row vector sequence of said pixel point matrix to write a corresponding result of each pixel point of said pixel point matrix into the DDR comprises:
and carrying out XOR and then inversion operation in sequence from the pixel point adjacent to the reference pixel point in the row vector pixel points and traversing according to the row vector sequence of the pixel point matrix.
4. The method of claim 3, further comprising:
and sequentially carrying out XOR operation on the data of the pixel points stored in the DDR according to the write-in sequence of the DDR so as to restore the data of the pixel points stored in the DDR to original data and read the data.
5. The method of claim 1, wherein obtaining a matrix of pixels of the video image and arranging reference pixels among the row vector pixels comprises:
acquiring a row vector group and a column vector group of a pixel point matrix of a video image to obtain a row vector sequence and a column vector sequence of the pixel point matrix;
and setting the first column of pixel points of the current row vector pixel points as reference pixel points of the current row vector pixel points, and sequentially setting according to the row vector sequence to adapt to the logic operation of the current row vector pixel points.
6. The method of claim 5, wherein the logically operating the data of the reference pixel of the current row vector pixel with the previous data of the reference pixel in the DDR comprises:
and performing XOR operation on the data of the reference pixel point of the current line vector pixel point and the previous data of the reference pixel point in the DDR, and then performing negation operation.
7. The method of claim 5, wherein said performing, in said row vector pixel points, a logical operation in sequence starting with a pixel point adjacent to said reference pixel point and traversing in a row vector sequence of said matrix of pixel points to write a corresponding result of each pixel point of said matrix of pixel points to the DDR comprises:
sequentially carrying out logic operation on the current row vector pixel point and the data of the previous pixel point according to the sequence of the column vectors and writing a corresponding result into the DDR;
and traversing each pixel point of the pixel point matrix according to the row vector sequence and writing the corresponding result into the DDR.
8. The method of claim 7, wherein the sequentially performing logic operations with data of a previous pixel in the current row vector pixel according to the column vector order and writing a corresponding result into the DDR comprises:
and performing XOR operation on the current row vector pixel point and the data of the previous pixel point in sequence according to the sequence of the column vectors, and then writing the corresponding result into the DDR.
9. An apparatus for video image data storage, comprising:
the first module is used for configuring a pixel point matrix for acquiring a video image and setting reference pixel points in row vector pixel points;
the second module is configured to write the data of the reference pixel point of the row vector pixel point into a DDR, and update the previous data of the reference pixel point in the DDR with the data of the reference pixel point of the current row vector pixel point so that the data of the reference pixel point in the DDR is adapted to the current row vector pixel point;
the third module is configured and used for performing logical operation on the data of the reference pixel point of the current line vector pixel point and the previous data of the reference pixel point in the DDR and writing a corresponding result into the DDR;
and the fourth module is configured to sequentially perform logical operation from a pixel point adjacent to the reference pixel point in the row vector pixel points and traverse according to the row vector sequence of the pixel point matrix so as to write the corresponding result of each pixel point of the pixel point matrix into the DDR.
10. The apparatus of claim 9, further comprising:
and the fifth module is configured to sequentially perform operation opposite to the logic operation on the data of the pixel points stored in the DDR according to the writing sequence of the DDR so as to restore the data of the pixel points stored in the DDR into original data and read the original data.
11. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method of any one of claims 1 to 8.
12. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211129967.0A CN115203470B (en) | 2022-09-16 | 2022-09-16 | Method, device and equipment for storing video image data and readable medium |
PCT/CN2023/077995 WO2024055525A1 (en) | 2022-09-16 | 2023-02-23 | Video image data storage method and apparatus, device, and readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211129967.0A CN115203470B (en) | 2022-09-16 | 2022-09-16 | Method, device and equipment for storing video image data and readable medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115203470A CN115203470A (en) | 2022-10-18 |
CN115203470B true CN115203470B (en) | 2023-02-28 |
Family
ID=83573654
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211129967.0A Active CN115203470B (en) | 2022-09-16 | 2022-09-16 | Method, device and equipment for storing video image data and readable medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115203470B (en) |
WO (1) | WO2024055525A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115203470B (en) * | 2022-09-16 | 2023-02-28 | 苏州浪潮智能科技有限公司 | Method, device and equipment for storing video image data and readable medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101039374B (en) * | 2006-03-14 | 2011-11-02 | 联想(北京)有限公司 | Image lossless compression method |
CN103124350B (en) * | 2012-12-24 | 2016-01-20 | 东软集团股份有限公司 | Based on method for compressing image and the device of RLE |
WO2020181554A1 (en) * | 2019-03-14 | 2020-09-17 | Oppo广东移动通信有限公司 | Method for determining prediction value, decoder, and computer storage medium |
CN112235568B (en) * | 2019-07-15 | 2024-03-26 | 华为技术有限公司 | Image encoding method, decoding method, device and storage medium |
CN113706639B (en) * | 2021-07-21 | 2024-02-23 | 国网江苏省电力有限公司电力科学研究院 | Image compression method and device based on rectangular NAM, storage medium and computing equipment |
CN113689407A (en) * | 2021-08-25 | 2021-11-23 | 青岛睿维申信息科技有限公司 | Image correction method and related equipment |
CN115203470B (en) * | 2022-09-16 | 2023-02-28 | 苏州浪潮智能科技有限公司 | Method, device and equipment for storing video image data and readable medium |
-
2022
- 2022-09-16 CN CN202211129967.0A patent/CN115203470B/en active Active
-
2023
- 2023-02-23 WO PCT/CN2023/077995 patent/WO2024055525A1/en unknown
Also Published As
Publication number | Publication date |
---|---|
CN115203470A (en) | 2022-10-18 |
WO2024055525A1 (en) | 2024-03-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115203470B (en) | Method, device and equipment for storing video image data and readable medium | |
US7719878B2 (en) | Reducing the effect of write disturbs in polymer memories | |
CN104641358B (en) | For the apparatus and method of data movement | |
JPS60160780A (en) | Picture storage device for special effect | |
CN106201363B (en) | Memory and storage method for random real-time access of video stream pixel-level data | |
JP2522258B2 (en) | Signal processor | |
US4931954A (en) | Image storage system and method of storing images such that they are displayed with gradually increasing resolution | |
CN100485719C (en) | Image processing apparatus and image processing method | |
US5438376A (en) | Image processing apparatus and image reception apparatus using the same | |
US6801209B1 (en) | Method and apparatus for storing data in a block-based memory arrangement | |
JPH01136465A (en) | Picture processor | |
JP3081037B2 (en) | Memory device | |
US11972504B2 (en) | Method and system for overlapping sliding window segmentation of image based on FPGA | |
TWM591679U (en) | Image correction system with line buffer | |
JP3082458B2 (en) | Image modification device | |
US20120120039A1 (en) | Driving System for Display and Method of the Same | |
JPS593471A (en) | Image memory control system | |
JP2006323102A (en) | Device and method for reproducing image data | |
JP3427586B2 (en) | Data processing device and storage device | |
JPH04318891A (en) | Graphic controller | |
CN117651128A (en) | Video display method, apparatus, computer device and storage medium | |
TW202015413A (en) | Compensation data encoding device | |
CN115017070A (en) | Image correction method, image correction module, laser projection apparatus, and storage medium | |
CN117135362A (en) | Residual data writing method, device, computer equipment and storage medium | |
JP2883374B2 (en) | Mirror image circuit |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |